diff options
Diffstat (limited to 'sw/source/ui/shells')
26 files changed, 21034 insertions, 0 deletions
diff --git a/sw/source/ui/shells/basesh.cxx b/sw/source/ui/shells/basesh.cxx new file mode 100644 index 0000000000..ace32c1bbd --- /dev/null +++ b/sw/source/ui/shells/basesh.cxx @@ -0,0 +1,2507 @@ +/************************************************************************* + * + * $RCSfile: basesh.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:46 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +#ifdef PRECOMPILED +#include "ui_pch.hxx" +#endif + +#pragma hdrstop +#include <sot/factory.hxx> +#ifndef _HINTIDS_HXX +#include <hintids.hxx> +#endif +#ifndef _UIPARAM_HXX +#include <uiparam.hxx> +#endif +#ifndef SVTOOLS_URIHELPER_HXX +#include <svtools/urihelper.hxx> +#endif + + +#ifndef _SVXLINKMGR_HXX //autogen +#include <svx/linkmgr.hxx> +#endif +#ifndef _SVX_HTMLMODE_HXX //autogen +#include <svx/htmlmode.hxx> +#endif +#ifndef _IMAPDLG_HXX_ //autogen +#include <svx/imapdlg.hxx> +#endif +#ifndef _SBASLTID_HRC //autogen +#include <offmgr/sbasltid.hrc> +#endif +#ifndef _SFXDISPATCH_HXX //autogen +#include <sfx2/dispatch.hxx> +#endif +#ifndef _EXPLORER_HXX //autogen +#include <sfx2/explorer.hxx> +#endif +#ifndef _SFX_BINDINGS_HXX //autogen +#include <sfx2/bindings.hxx> +#endif +#ifndef _SFXREQUEST_HXX //autogen +#include <sfx2/request.hxx> +#endif +#ifndef _SFX_WHITER_HXX //autogen +#include <svtools/whiter.hxx> +#endif +#ifndef _SFX_OBJITEM_HXX //autogen +#include <sfx2/objitem.hxx> +#endif +#ifndef _FILTER_HXX //autogen +#include <svtools/filter.hxx> +#endif +#ifndef _GALLERY_HXX_ //autogen +#include <svx/gallery.hxx> +#endif +#ifndef _CLIP_HXX //autogen +#include <vcl/clip.hxx> +#endif +#ifndef _CONTDLG_HXX_ //autogen +#include <svx/contdlg.hxx> +#endif +#ifndef _GRAPH_HXX //autogen +#include <vcl/graph.hxx> +#endif +#ifndef _SVX_IMPGRF_HXX //autogen +#include <svx/impgrf.hxx> +#endif +#ifndef _SFXSLSTITM_HXX //autogen +#include <svtools/slstitm.hxx> +#endif +#ifndef _MSGBOX_HXX //autogen +#include <vcl/msgbox.hxx> +#endif +#ifndef _SFXPTITEM_HXX //autogen +#include <svtools/ptitem.hxx> +#endif +#ifndef _POLY_HXX //autogen +#include <vcl/poly.hxx> +#endif +#ifndef _SFXSTRITEM_HXX //autogen +#include <svtools/stritem.hxx> +#endif +#ifndef _SVX_COLRITEM_HXX //autogen +#include <svx/colritem.hxx> +#endif +#ifndef _SVX_SHADITEM_HXX //autogen +#include <svx/shaditem.hxx> +#endif +#ifndef _SVX_BOXITEM_HXX //autogen +#include <svx/boxitem.hxx> +#endif +#ifndef _SVX_SRCHITEM_HXX +#include <svx/srchitem.hxx> +#endif +#ifndef _SVX_ULSPITEM_HXX //autogen +#include <svx/ulspitem.hxx> +#endif +#ifndef _SVX_LRSPITEM_HXX //autogen +#include <svx/lrspitem.hxx> +#endif +#ifndef _SVX_BRSHITEM_HXX //autogen +#include <svx/brshitem.hxx> +#endif +#ifndef _SVX_OPAQITEM_HXX //autogen +#include <svx/opaqitem.hxx> +#endif +#ifndef _SVX_SIZEITEM_HXX //autogen +#include <svx/sizeitem.hxx> +#endif +#ifndef _SVX_BORDER_HXX +#include <svx/border.hxx> +#endif + +#ifndef _FMTURL_HXX //autogen +#include <fmturl.hxx> +#endif +#ifndef _FMTHDFT_HXX //autogen +#include <fmthdft.hxx> +#endif +#ifndef _FMTCLDS_HXX //autogen +#include <fmtclds.hxx> +#endif +#ifndef _DOCSH_HXX +#include <docsh.hxx> +#endif +#ifndef _WRTSH_HXX +#include <wrtsh.hxx> +#endif +#ifndef _VIEW_HXX +#include <view.hxx> +#endif +#ifndef _SWMODULE_HXX +#include <swmodule.hxx> +#endif +#ifndef _SWUNDO_HXX +#include <swundo.hxx> +#endif +#ifndef _FLDBAS_HXX +#include <fldbas.hxx> +#endif +#ifndef _UITOOL_HXX +#include <uitool.hxx> +#endif +#ifndef _BASESH_HXX +#include <basesh.hxx> +#endif +#ifndef _VIEWOPT_HXX +#include <viewopt.hxx> +#endif +#ifndef _CHANGEDB_HXX +#include <changedb.hxx> +#endif +#ifndef _BOOKMARK_HXX +#include <bookmark.hxx> +#endif +#ifndef _BOOKMRK_HXX +#include <bookmrk.hxx> +#endif +#ifndef _DOCSTAT_HXX +#include <docstat.hxx> +#endif +#ifndef _USRFLD_HXX +#include <usrfld.hxx> +#endif +#ifndef _EXPFLD_HXX +#include <expfld.hxx> +#endif +#ifndef _FLDMGR_HXX +#include <fldmgr.hxx> +#endif +#ifndef _FRMMGR_HXX +#include <frmmgr.hxx> +#endif +#ifndef _TABLEMGR_HXX +#include <tablemgr.hxx> +#endif +#ifndef _MDIEXP_HXX +#include <mdiexp.hxx> +#endif +#ifndef _DATAEX_HXX +#include <dataex.hxx> +#endif +#ifndef _PAGEDESC_HXX +#include <pagedesc.hxx> +#endif +#ifndef _CONVERT_HXX +#include <convert.hxx> +#endif +#ifndef _PATTERN_HXX +#include <pattern.hxx> +#endif +#ifndef _UIBORDER_HXX +#include <uiborder.hxx> +#endif +#ifndef _FMTCOL_HXX +#include <fmtcol.hxx> +#endif +#ifndef _EDTWIN_HXX +#include <edtwin.hxx> +#endif +#ifndef _TBLAFMT_HXX +#include <tblafmt.hxx> +#endif +#ifndef _CAPTION_HXX +#include <caption.hxx> +#endif +#ifndef _SWWAIT_HXX +#include <swwait.hxx> +#endif + +#ifndef _CMDID_H +#include <cmdid.h> +#endif +#ifndef _GLOBALS_HRC +#include <globals.hrc> +#endif +#ifndef _SHELLS_HRC +#include <shells.hrc> +#endif +#ifndef _STATSTR_HRC +#include <statstr.hrc> +#endif +#ifndef _GLOBALS_H +#include <globals.h> +#endif + +#ifdef OS2 +#include <vcl/sysdep.hxx> +#endif +#ifndef _FSYS_HXX +#include <tools/fsys.hxx> +#endif + +USHORT SwBaseShell::nFrameMode = FLY_DRAG_END; +#define C2S(cChar) UniString::CreateFromAscii(cChar) + +//Fuer die Erkennung der Id, die variable von Gallery mit SID_GALLERY_BG_BRUSH +//ankommt. +static BYTE nParagraphPos; +static BYTE nGraphicPos; +static BYTE nOlePos; +static BYTE nFramePos; +static BYTE nTablePos; +static BYTE nTableRowPos; +static BYTE nTableCellPos; +static BYTE nPagePos; +static BYTE nHeaderPos; +static BYTE nFooterPos; + +//!!OS: das muss ein if/else bleiben, weil BLC das nicht anders versteht +#define SVDATAOBJ \ + SvDataObjectRef xObj; \ + if ( Clipboard::GetFormatCount() ) \ + { \ + SwModule* pMod = SW_MOD(); \ + if ( pMod->pClipboard ) \ + xObj = pMod->pClipboard ; \ + else \ + xObj = SvDataObject::PasteClipboard(); \ + } + +#define Interior +#include <svx/svxslots.hxx> + +#define SwBaseShell +#define Shadow +#include "itemdef.hxx" +#include "swslots.hxx" + +#define SWCONTOURDLG(rView) ( (SvxContourDlg*) ( rView.GetViewFrame()->GetChildWindow( \ + SvxContourDlgChildWindow::GetChildWindowId() )-> \ + GetWindow() ) ) + +#define SWIMAPDLG(rView) ( (SvxIMapDlg*) ( rView.GetViewFrame()->GetChildWindow( \ + SvxIMapDlgChildWindow::GetChildWindowId() )-> \ + GetWindow() ) ) + +SFX_IMPL_INTERFACE(SwBaseShell, SfxShell, SW_RES(0)) +{ + SFX_CHILDWINDOW_REGISTRATION(SvxIMapDlgChildWindow::GetChildWindowId()); + SFX_CHILDWINDOW_REGISTRATION(SvxContourDlgChildWindow::GetChildWindowId()); +} + +TYPEINIT1(SwBaseShell,SfxShell) + +/*-------------------------------------------------------------------- + Beschreibung: statics + --------------------------------------------------------------------*/ + + +void lcl_UpdateIMapDlg(SwWrtShell& rSh) +{ + Graphic aGrf(rSh.GetIMapGraphic()); + TargetList* pList = new TargetList; + rSh.GetView().GetViewFrame()->GetTopFrame()->GetTargetList(*pList); + + SfxItemSet aSet( rSh.GetAttrPool(), RES_URL, RES_URL ); + rSh.GetFlyFrmAttr( aSet ); + const SwFmtURL &rURL = (SwFmtURL&)aSet.Get( RES_URL ); + SvxIMapDlgChildWindow::UpdateIMapDlg( + aGrf, rURL.GetMap(), pList, rSh.GetIMapInventor() ); + + USHORT nCount = (USHORT)pList->Count(); + if(nCount) + for( USHORT i = nCount; i; i-- ) + { + delete pList->GetObject(i-1); + } + delete pList; +} + + +BOOL lcl_UpdateContourDlg( SwWrtShell &rSh, int nSel ) +{ + Graphic aGraf( rSh.GetIMapGraphic() ); + BOOL bRet = GRAPHIC_NONE != aGraf.GetType(); + if( bRet ) + { + String aGrfName; + if ( nSel & SwWrtShell::SEL_GRF ) + rSh.GetGrfNms( &aGrfName, 0 ); + + SvxContourDlg *pDlg = SWCONTOURDLG(rSh.GetView()); + pDlg->Update( aGraf, aGrfName.Len() > 0, + rSh.GetGraphicPolygon(), rSh.GetIMapInventor() ); + } + return bRet; +} + +/*-------------------------------------------------------------------- + Beschreibung: Alle Items disablen, wird auch aus anderen Source gerufen + --------------------------------------------------------------------*/ + +void DisableAllItems(SfxItemSet &rSet) +{ + SfxWhichIter aIter(rSet); + + USHORT nWhich = aIter.FirstWhich(); + ASSERT(nWhich, leeres Set); + while(nWhich) + { + rSet.DisableItem(nWhich); + nWhich = aIter.NextWhich(); + } +} + +/*-------------------------------------------------------------------- + Beschreibung: loeschen + --------------------------------------------------------------------*/ + +void SwBaseShell::ExecDelete(SfxRequest &rReq) +{ + SwWrtShell &rSh = GetShell(); + switch(rReq.GetSlot()) + { + case SID_DELETE: + rSh.DelRight(TRUE); + break; + + case FN_BACKSPACE: + + if( rSh.IsNoNum() ) + { + rSh.SttCrsrMove(); + BOOL bLeft = rSh.Left( TRUE ); + if( bLeft ) + { + // JP 28.03.96: ein Backspace im Absatz ohne Nummer wird zum Delete + rSh.SwapPam(); + rSh.DelRight( FALSE ); + } + else + // JP 15.07.96: wenns nicht mehr nach vorne geht, die + // Numerierung aufheben. Z.B. am Doc-/ + // Rahmen-/Tabellen-/Bereichs-Anfang + rSh.DelNumRules(); + + rSh.EndCrsrMove(); + break; + } + + // ansonsten DelLeft rufen + case FN_SHIFT_BACKSPACE: + rSh.DelLeft(); + break; + default: + DBG_ERROR("falscher Dispatcher"); + return; + } +} + +/*-------------------------------------------------------------------- + Beschreibung: + --------------------------------------------------------------------*/ + +void SwBaseShell::ExecClpbrd(SfxRequest &rReq) +{ + //Achtung: Suizid gefaehrdet! Nach Paste, Paste special kann der die + //Shell zerstoert sein. + + + SwWrtShell &rSh = GetShell(); + USHORT nId = rReq.GetSlot(); + switch( nId ) + { + case SID_CUT: + case SID_COPY: + rView.GetEditWin().FlushInBuffer( &rSh ); + if ( rSh.HasSelection() ) + { + SwDataExchangeRef aDataEx( new SwDataExchange( rSh ) ); + if ( nId == SID_CUT ) + aDataEx->Cut(); + else + aDataEx->Copy( FALSE ); + break; + } + return; + + case SID_PASTE: + { + SVDATAOBJ; + if ( xObj.Is() && SwDataExchange::IsPaste( GetShell(), *xObj ) ) + { + // temp. Variablen, da die Shell nach dem Paste schon + // zerstoert sein kann + SwView* pView = &rView; + SwDataExchange::Paste( rSh, *xObj ); + if( rSh.IsFrmSelected() || rSh.IsObjSelected()) + rSh.EnterSelFrmMode(); + pView->AttrChangedNotify(&rSh); + } + else + return; + } + break; + case FN_PASTESPECIAL: + { + SVDATAOBJ; + int nRet; + if ( xObj.Is() && + SwDataExchange::IsPasteSpecial( rSh, *xObj ) ) + { + // temp. Variablen, da die Shell nach dem Paste schon + // zerstoert sein kann + SwView* pView = &rView; + + nRet = SwDataExchange::PasteSpecial( rSh, *xObj ); + if (rSh.IsFrmSelected() || rSh.IsObjSelected()) + rSh.EnterSelFrmMode(); + pView->AttrChangedNotify(&rSh); + } + else + return; + rReq.SetReturnValue(SfxInt16Item(nId, nRet)); + } + break; + default: + DBG_ERROR("falscher Dispatcher"); + return; + } +} + +/*-------------------------------------------------------------------- + Beschreibung: ClipBoard-Status + --------------------------------------------------------------------*/ + +void SwBaseShell::StateClpbrd(SfxItemSet &rSet) +{ + SwWrtShell &rSh = GetShell(); + SfxWhichIter aIter(rSet); + + const BOOL bCopy = rSh.HasSelection(); + SVDATAOBJ; + + USHORT nWhich = aIter.FirstWhich(); + + while(nWhich) + { + switch(nWhich) + { + case SID_CUT: + if (rSh.IsSelObjProtected( (FlyProtectType)(FLYPROTECT_CONTENT|FLYPROTECT_PARENT) ) != 0) + { + rSet.DisableItem( nWhich ); + break; + } + case SID_COPY: + if( !bCopy ) + rSet.DisableItem( nWhich ); + break; + case SID_PASTE: + if( !xObj.Is() || !SwDataExchange::IsPaste( rSh, *xObj)) + rSet.DisableItem( SID_PASTE ); + break; + case FN_PASTESPECIAL: + if( !xObj.Is() || + !SwDataExchange::IsPasteSpecial( rSh, *xObj ) ) + rSet.DisableItem( FN_PASTESPECIAL ); + break; + } + nWhich = aIter.NextWhich(); + } +} + +/*-------------------------------------------------------------------- + Beschreibung: Undo ausfuehren + --------------------------------------------------------------------*/ + +void SwBaseShell::ExecUndo(SfxRequest &rReq) +{ + SwWrtShell &rSh = GetShell(); + switch(rReq.GetSlot()) + { + case SID_UNDO: + rSh.Do( SwWrtShell::UNDO ); + break; + + case SID_REDO: + rSh.Do( SwWrtShell::REDO ); + break; + + case SID_REPEAT: + rSh.Do( SwWrtShell::REPEAT ); + break; + + default: + DBG_ERROR("falscher Dispatcher"); + return; + } +} + +/*-------------------------------------------------------------------- + Beschreibung: Zustand Undo + --------------------------------------------------------------------*/ + +void SwBaseShell::StateUndo(SfxItemSet &rSet) +{ + SwWrtShell &rSh = GetShell(); + SfxWhichIter aIter(rSet); + USHORT nWhich = aIter.FirstWhich(); + while(nWhich) + { + switch(nWhich) + { + case SID_UNDO: + { + if(rSh.GetUndoIds()) + rSet.Put(SfxStringItem(nWhich, + rSh.GetDoString(SwWrtShell::UNDO))); + else + rSet.DisableItem(nWhich); + break; + } + case SID_REDO: + { + if(rSh.GetRedoIds()) + rSet.Put(SfxStringItem(nWhich, + rSh.GetDoString(SwWrtShell::REDO))); + else + rSet.DisableItem(nWhich); + break; + } + case SID_REPEAT: + { // Repeat nur moeglich wenn kein REDO moeglich - UI-Restriktion + if(rSh.GetRedoIds() == 0 && + !rSh.IsSelFrmMode() && + rSh.GetRepeatIds() ) + rSet.Put(SfxStringItem(nWhich, rSh.GetRepeatString())); + else + rSet.DisableItem(nWhich); + break; + } + } + nWhich = aIter.NextWhich(); + } +} + +/*-------------------------------------------------------------------- + Beschreibung: Slot-Id auswerten bzw. Dispatchen + --------------------------------------------------------------------*/ + +void SwBaseShell::Execute(SfxRequest &rReq) +{ + const SfxPoolItem *pItem; + SwWrtShell &rSh = GetShell(); + const SfxItemSet* pArgs = rReq.GetArgs(); + BOOL bUp = FALSE; + BOOL bMore = FALSE; + + USHORT nSlot = rReq.GetSlot(); + switch(nSlot) + { + case FN_REPAGINATE: + rSh.CalcLayout(); + break; + case FN_UPDATE_FIELDS: + { + SwDocStat aDocStat; + rSh.UpdateDocStat(aDocStat); + rSh.EndAllTblBoxEdit(); + rSh.ViewShell::UpdateFlds(TRUE); + + if( rSh.IsCrsrInTbl() ) + { + if( !rSh.IsTblComplexForChart() ) + SwTableFUNC( &rSh, FALSE).UpdateChart(); + rSh.ClearTblBoxCntnt(); + rSh.SaveTblBoxCntnt(); + } + } + break; + case FN_UPDATE_CHARTS: + { + SwWait aWait( *rView.GetDocShell(), TRUE ); + rSh.UpdateAllCharts(); + } + break; + + case FN_UPDATE_ALL: + { + rSh.EnterStdMode(); + if( rSh.GetLinkManager().GetLinks().Count() ) + { + rSh.StartAllAction(); + rSh.GetLinkManager().UpdateAllLinks( FALSE, TRUE, TRUE ); + rSh.EndAllAction(); + } + SfxDispatcher &rDis = *GetView().GetViewFrame()->GetDispatcher(); + rDis.Execute( FN_UPDATE_FIELDS ); + rDis.Execute( FN_UPDATE_TOX ); + rDis.Execute( FN_UPDATE_CHARTS ); + rSh.CalcLayout(); + } + break; + + case FN_UPDATE_INPUTFIELDS: + rSh.UpdateInputFlds(NULL, FALSE); + break; + case FN_PREV_BOOKMARK: + rReq.SetReturnValue(SfxBoolItem( nSlot, rSh.GoPrevBookmark())); + break; + case FN_NEXT_BOOKMARK: + rReq.SetReturnValue(SfxBoolItem( nSlot, rSh.GoNextBookmark())); + break; + + case FN_GOTO_NEXT_MARK: + case FN_GOTO_PREV_MARK: + { + SwFldMgr aFldMgr; + SwFieldType* pFldType = aFldMgr.GetFldType(RES_JUMPEDITFLD); + + if (pFldType) + { + if (rSh.IsSelFrmMode()) + { + rSh.UnSelectFrm(); + rSh.LeaveSelFrmMode(); + } + + if (rSh.HasMark()) + { + MV_KONTEXT(&rSh); + if (rSh.IsCrsrPtAtEnd()) + rSh.SwapPam(); + rSh.ClearMark(); + rSh.EndSelect(); + } + BOOL bRet = rSh.MoveFldType(pFldType, nSlot == FN_GOTO_NEXT_MARK); + if (bRet) + rSh.ClickToField(*rSh.GetCurFld()); + rReq.SetReturnValue(SfxBoolItem( nSlot, bRet)); + } + } + break; + + case FN_START_DOC_DIRECT: + case FN_END_DOC_DIRECT: + { + if (rSh.IsSelFrmMode()) + { + rSh.UnSelectFrm(); + rSh.LeaveSelFrmMode(); + } + rSh.EnterStdMode(); + nSlot == FN_START_DOC_DIRECT ? + rSh.SwCrsrShell::SttDoc() : + rSh.SwCrsrShell::EndDoc(); + } + break; + case FN_GOTO_PREV_OBJ: + case FN_GOTO_NEXT_OBJ: + { + BOOL bSuccess = rSh.GotoObj( + nSlot == FN_GOTO_NEXT_OBJ ? TRUE : FALSE); + rReq.SetReturnValue(SfxBoolItem(nSlot, bSuccess)); + if (bSuccess && !rSh.IsSelFrmMode()) + { + rSh.HideCrsr(); + rSh.EnterSelFrmMode(); + GetView().AttrChangedNotify( &rSh ); + } + } + break; + case SID_GALLERY_FORMATS: + { + const int nSelType = rSh.GetSelectionType(); + if ( !rSh.IsSelFrmMode() || nSelType & SwWrtShell::SEL_GRF ) + { + if( SFX_ITEM_SET == pArgs->GetItemState( nSlot, TRUE, &pItem) && + SGA_FORMAT_GRAPHIC & ((SfxUInt32Item*)pItem)->GetValue()) + { + + GalleryExplorer* pGal = SVX_GALLERY(); + + if ( pGal ) + { + SwWait aWait( *rView.GetDocShell(), TRUE ); + + String aGrfName, aFltName; + const Graphic aGrf( pGal->GetGraphic() ); + + if( pGal->IsLinkage() ) + { + // Verknuepft + aGrfName = pGal->GetURL().PathToFileName(); + aGrfName = URIHelper::SmartRelToAbs(aGrfName); + aFltName = pGal->GetFilterName(); + } + + if ( nSelType & SwWrtShell::SEL_GRF ) + rSh.ReRead( aGrfName, aFltName, &aGrf ); + else + rSh.Insert( aGrfName, aFltName, aGrf ); + + GetView().GetEditWin().GrabFocus(); + } + } + } + } + break; + case FN_PAGE_STYLE_SET_COLS: + { + if (pArgs) + { + // aktuellen PageDescriptor ermitteln und damit den Set fuellen + const USHORT nCurIdx = rSh.GetCurPageDesc(); + SwPageDesc aPageDesc(rSh.GetPageDesc(nCurIdx)); + + SwFrmFmt &rFmt = aPageDesc.GetMaster(); + + SwFmtCol aFmtCol = rFmt.GetCol(); + + USHORT nCount; + if(SFX_ITEM_SET == pArgs->GetItemState(nSlot)) + nCount = ((SfxUInt16Item &)pArgs->Get(nSlot)).GetValue(); + else + nCount = ((SfxUInt16Item &)pArgs->Get(SID_ATTR_COLUMNS)).GetValue(); + USHORT nGutterWidth = DEF_GUTTER_WIDTH; + + aFmtCol.Init(nCount ? nCount : 1, nGutterWidth, USHRT_MAX); + aFmtCol.SetWishWidth(USHRT_MAX); + aFmtCol.SetGutterWidth(nGutterWidth, USHRT_MAX); + + rFmt.SetAttr(aFmtCol); + + rSh.ChgPageDesc(nCurIdx, aPageDesc); + } + else + GetView().GetViewFrame()->GetDispatcher()->Execute(FN_FORMAT_PAGE_COLUMN_DLG, FALSE); + } + break; + case FN_CONVERT_TEXT_TABLE: + { + char cDelim = 0; + USHORT nInsTblFlags = ALL_TBL_INS_ATTR; + SwTableAutoFmt* pTAFmt = 0; + SwConvertTableDlg *pDlg = new SwConvertTableDlg( GetView() ); + if( RET_OK == pDlg->Execute() ) + { + pDlg->GetValues( cDelim, nInsTblFlags, pTAFmt ); + + } + delete pDlg; + + if( cDelim ) + { + //Shellwechsel! + SwView& rSaveView = rView; + BOOL bInserted = FALSE; + if( rSh.GetTableFmt() ) + rSh.TableToText( cDelim ); + else + bInserted = rSh.TextToTable( cDelim, HORI_FULL, + nInsTblFlags, pTAFmt ); + rSh.EnterStdMode(); + + if( bInserted ) + rSaveView.AutoCaption( TABLE_CAP ); + } + delete pTAFmt; + } + break; + case SID_STYLE_WATERCAN: + case SID_STYLE_UPDATE_BY_EXAMPLE: + case SID_STYLE_NEW_BY_EXAMPLE: + case SID_STYLE_APPLY: + { + ShellModes eMode = GetView().GetShellMode(); + if ( SEL_DRAW != eMode && + SEL_DRAW_CTRL != eMode && + SEL_DRAW_FORM != eMode && + SEL_DRAWTEXT != eMode && + SEL_BEZIER != eMode ) + { + // wird von der DocShell aufgezeichnet + GetView().GetDocShell()->ExecStyleSheet(rReq); + } + } + break; + case FN_ESCAPE: + GetView().ExecuteSlot(rReq); + break; + case SID_IMAP: + { + USHORT nId = SvxIMapDlgChildWindow::GetChildWindowId(); + + SfxViewFrame* pVFrame = GetView().GetViewFrame(); + pVFrame->ToggleChildWindow( nId ); + pVFrame->GetBindings().Invalidate( SID_IMAP ); + + if ( pVFrame->HasChildWindow( nId ) && rSh.IsFrmSelected() ) + lcl_UpdateIMapDlg(rSh); + } + break; + case SID_IMAP_EXEC: + { + SvxIMapDlg* pDlg = SWIMAPDLG(GetView()); + + // Kontrolle, ob Zuweisung ueberhaupt sinnvoll/erlaubt + if ( rSh.IsFrmSelected() && + pDlg->GetEditingObject() == rSh.GetIMapInventor() ) + { + SfxItemSet aSet( rSh.GetAttrPool(), RES_URL, RES_URL ); + rSh.GetFlyFrmAttr( aSet ); + SwFmtURL aURL( (SwFmtURL&)aSet.Get( RES_URL ) ); + aURL.SetMap( &pDlg->GetImageMap() ); + aSet.Put( aURL ); + rSh.SetFlyFrmAttr( aSet ); + } + } + break; + case SID_CONTOUR_DLG: + { + USHORT nId = SvxContourDlgChildWindow::GetChildWindowId(); + + SfxViewFrame* pVFrame = GetView().GetViewFrame(); + pVFrame->ToggleChildWindow( nId ); + pVFrame->GetBindings().Invalidate( SID_CONTOUR_DLG ); + + int nSel = rSh.GetSelectionType(); + if ( pVFrame->HasChildWindow( nId ) && + (nSel & (SwWrtShell::SEL_GRF|SwWrtShell::SEL_OLE)) ) + { + lcl_UpdateContourDlg( rSh, nSel ); + } + } + break; + case SID_CONTOUR_EXEC: + { + SvxContourDlg *pDlg = SWCONTOURDLG(GetView()); + + // Kontrolle, ob Zuweisung ueberhaupt sinnvoll/erlaubt + int nSel = rSh.GetSelectionType(); + if ( nSel & (SwWrtShell::SEL_GRF|SwWrtShell::SEL_OLE) ) + { + if ( pDlg->GetEditingObject() == rSh.GetIMapInventor() ) + { + rSh.StartAction(); + SfxItemSet aSet( rSh.GetAttrPool(), RES_SURROUND, RES_SURROUND); + rSh.GetFlyFrmAttr( aSet ); + SwFmtSurround aSur( (SwFmtSurround&)aSet.Get( RES_SURROUND ) ); + if ( !aSur.IsContour() ) + { + aSur.SetContour( TRUE ); + if ( aSur.GetSurround() == SURROUND_NONE ) + aSur.SetSurround( SURROUND_PARALLEL ); + aSet.Put( aSur ); + rSh.SetFlyFrmAttr( aSet ); + } + const PolyPolygon aPoly( pDlg->GetPolyPolygon() ); + rSh.SetGraphicPolygon( &aPoly ); + if ( pDlg->IsGraphicChanged() ) + rSh.ReRead( aEmptyStr, aEmptyStr, &pDlg->GetGraphic()); + rSh.EndAction(); + } + } + } + break; + case FN_FRAME_TO_ANCHOR: + { + rSh.GotoFlyAnchor(); + rSh.EnterStdMode(); + rSh.CallChgLnk(); + } + break; + case FN_TOOL_ANKER: + break; + case FN_TOOL_ANKER_PAGE: + case FN_TOOL_ANKER_PARAGRAPH: + case FN_TOOL_ANKER_CHAR: + case FN_TOOL_ANKER_AT_CHAR: + case FN_TOOL_ANKER_FRAME: + { + RndStdIds eSet = nSlot == FN_TOOL_ANKER_PAGE + ? FLY_PAGE + : nSlot == FN_TOOL_ANKER_PARAGRAPH + ? FLY_AT_CNTNT + : nSlot == FN_TOOL_ANKER_FRAME + ? FLY_AT_FLY + : nSlot == FN_TOOL_ANKER_CHAR + ? FLY_IN_CNTNT + : FLY_AUTO_CNTNT; + rSh.StartUndo(); + if( rSh.IsObjSelected() ) + rSh.ChgAnchor( eSet ); + else if( rSh.IsFrmSelected() ) + { + // Der Set beinhaltet auch VERT/HORI_ORIENT, da in FEShell:: + // SetFlyFrmAttr/SetFlyFrmAnchor ggf. als Folge des Umankerns + // die Ausrichtungen veraendert werden sollen. + SfxItemSet aSet( GetPool(), RES_VERT_ORIENT, RES_ANCHOR ); + SwFmtAnchor aAnc( eSet, rSh.GetPhyPageNum() ); + aSet.Put( aAnc ); + rSh.SetFlyFrmAttr(aSet); + } + + USHORT nHtmlMode = ::GetHtmlMode(GetView().GetDocShell()); + if( nHtmlMode ) + { + SfxItemSet aSet(GetPool(), RES_SURROUND, RES_HORI_ORIENT); + rSh.GetFlyFrmAttr(aSet); + + const SwFmtSurround& rSurround = (const SwFmtSurround&)aSet.Get(RES_SURROUND); + const SwFmtVertOrient& rVert = (const SwFmtVertOrient&)aSet.Get(RES_VERT_ORIENT); + const SwFmtHoriOrient& rHori = (const SwFmtHoriOrient&)aSet.Get(RES_HORI_ORIENT); + SwVertOrient eVOrient = rVert.GetVertOrient(); + SwHoriOrient eHOrient = rHori.GetHoriOrient(); + SwSurround eSurround = rSurround.GetSurround(); + + switch( eSet ) + { + case FLY_AT_FLY: + case FLY_PAGE: + + //Durchlauf, links oder von links, oben, von oben + if(eSurround != SURROUND_THROUGHT) + aSet.Put(SwFmtSurround(SURROUND_THROUGHT)); + + if( eVOrient != VERT_TOP && eVOrient != VERT_NONE) + aSet.Put(SwFmtVertOrient(0, VERT_TOP)); + + if(eHOrient != HORI_NONE || eHOrient != HORI_LEFT) + aSet.Put(SwFmtHoriOrient(0, HORI_LEFT)); + break; + + case FLY_AT_CNTNT: + //links, von links, rechts, oben, kein Uml, li+re Umlauf, + if(eSurround != SURROUND_LEFT || eSurround != SURROUND_RIGHT) + aSet.Put(SwFmtSurround(SURROUND_LEFT)); + + if( eVOrient != VERT_TOP) + aSet.Put(SwFmtVertOrient(0, VERT_TOP)); + + if(eHOrient != HORI_NONE || eHOrient != HORI_LEFT || eHOrient != HORI_RIGHT) + aSet.Put(SwFmtHoriOrient(0, HORI_LEFT)); + break; + + case FLY_AUTO_CNTNT: + //links, von links, rechts, oben, Durchlauf + if(eSurround != SURROUND_THROUGHT) + aSet.Put(SwFmtSurround(SURROUND_THROUGHT)); + + if( eVOrient != VERT_TOP) + aSet.Put(SwFmtVertOrient(0, VERT_TOP)); + + if(eHOrient != HORI_NONE || eHOrient != HORI_LEFT || eHOrient != HORI_RIGHT) + aSet.Put(SwFmtHoriOrient(0, HORI_LEFT)); + break; + } + + if( aSet.Count() ) + rSh.SetFlyFrmAttr( aSet ); + } + rSh.EndUndo(); + + GetView().GetViewFrame()->GetBindings().Invalidate( FN_TOOL_ANKER ); + } + break; + + case FN_FRAME_NOWRAP: + case FN_FRAME_WRAP: + case FN_FRAME_WRAP_IDEAL: + case FN_FRAME_WRAPTHRU: + case FN_FRAME_WRAPTHRU_TRANSP: + case FN_FRAME_WRAP_CONTOUR: + case FN_WRAP_ANCHOR_ONLY: + case FN_FRAME_WRAP_LEFT: + case FN_FRAME_WRAP_RIGHT: + SetWrapMode( nSlot ); + break; + + case FN_UPDATE_ALL_LINKS: + { + if( rSh.GetLinkManager().GetLinks().Count() ) + { + BOOL bUpdateGrf = FALSE, bCallErrHdl = FALSE; + rSh.EnterStdMode(); + rSh.StartAllAction(); + rSh.GetLinkManager().UpdateAllLinks( FALSE, bCallErrHdl, bUpdateGrf ); + rSh.EndAllAction(); + } + } + break; + + default: + bMore = TRUE; + } + if(bMore && pArgs) + { + pItem = 0; + pArgs->GetItemState(GetPool().GetWhich(nSlot), FALSE, &pItem); + if(pItem) + switch(nSlot) + { + case SID_ATTR_BORDER_SHADOW: + case RES_SHADOW: + { + rSh.StartAllAction(); + SfxItemSet aSet( rSh.GetAttrPool(), + RES_SHADOW, RES_SHADOW ); + + aSet.Put(*pItem); + // Tabellenzelle(n) selektiert? + if ( rSh.IsTableMode() ) + { + SwFrmFmt *pFmt = rSh.GetTableFmt(); + pFmt->SetAttr( *pItem ); + } + else if ( rSh.IsFrmSelected() ) + { + // Umrandungsattribute ueber Frame-Manager setzen + SwFlyFrmAttrMgr aMgr( FALSE, &rSh, FRMMGR_TYPE_NONE ); + aMgr.SetAttrSet( *pArgs ); + aMgr.UpdateFlyFrm(); + } + else + { + rSh.SetAttr( *pArgs ); + } + rSh.EndAllAction(); + } + break; + case FN_PAGE_STYLE_SET_LR_MARGIN: + case FN_PAGE_STYLE_SET_UL_MARGIN: + case FN_PAGE_STYLE_SET_NUMBER_FORMAT: + case FN_PAGE_STYLE_SET_PAPER_SIZE: + case FN_PAGE_STYLE_SET_PAPER_BIN: + { + DBG_ERROR("not implemented") + } + break; + + case SID_ATTR_BORDER_OUTER: + { + // Tabellenzelle(n) selektiert? + if ( rSh.IsTableMode() ) + { + // Umrandungattribute Get/SetTabBorders() setzen + rSh.SetTabBorders(*pArgs); + } + else if ( rSh.IsFrmSelected() ) + { + // Umrandungsattribute ueber Frame-Manager setzen + SwFlyFrmAttrMgr aMgr( FALSE, &rSh, FRMMGR_TYPE_NONE ); + aMgr.SetAttrSet(*pArgs); + aMgr.UpdateFlyFrm(); + } + else + { + // Umrandungsattribute ganz normal ueber Shell setzen + rSh.SetAttr( *pItem ); + } + } + break; + default: + DBG_ERROR("falscher Dispatcher"); + } + + } + + if(bUp) + { + SfxBindings &rBnd = GetView().GetViewFrame()->GetBindings(); + rBnd.Invalidate(rReq.GetSlot()); + rBnd.Update(rReq.GetSlot()); + } +} + +/* -----------------14.04.99 15:10------------------- + * Hier wird der State fuer SID_IMAP / SID_CONTOUR behandelt, + * wenn die Grafik ausgeswappt ist + * --------------------------------------------------*/ +IMPL_LINK(SwBaseShell, GraphicArrivedHdl, SwCrsrShell* , pCrShell ) +{ + SwWrtShell &rSh = GetShell(); + if( CNT_GRF == rSh.SwEditShell::GetCntType() && + GRAPHIC_NONE != rSh.GetGraphicType() ) + { + BOOL bProtect = 0 != rSh.IsSelObjProtected( (FlyProtectType) + (FLYPROTECT_CONTENT|FLYPROTECT_PARENT) ); + + SfxViewFrame* pVFrame = GetView().GetViewFrame(); + if( bUpdateSID_IMap || bUpdateSID_IMapExec ) + { + USHORT nId = SvxIMapDlgChildWindow::GetChildWindowId(); + SvxIMapDlg *pDlg = pVFrame->HasChildWindow( nId ) ? + (SvxIMapDlg*) ( pVFrame->GetChildWindow( nId )->GetWindow()) : 0; + + if( pDlg && ( bUpdateSID_IMapExec || (bUpdateSID_IMap && !bProtect)) && + pDlg->GetEditingObject() != rSh.GetIMapInventor() ) + lcl_UpdateIMapDlg(rSh); + + if( !bProtect && bUpdateSID_IMap ) + { + SfxBoolItem aBool(SID_IMAP, 0 != pDlg); + if( pGetStateSet ) + pGetStateSet->Put( aBool ); + else + pVFrame->GetBindings().SetState( aBool ); + } + } + + if( !bProtect && ( bUpdateSID_IContour || bUpdateSID_IContourDlg )) + { + if( bUpdateSID_IContourDlg ) + { + USHORT nId = SvxContourDlgChildWindow::GetChildWindowId(); + SvxIMapDlg *pDlg = pVFrame->HasChildWindow( nId ) ? + (SvxIMapDlg*) ( pVFrame->GetChildWindow( nId )->GetWindow()) : 0; + if( pDlg && pDlg->GetEditingObject() != rSh.GetIMapInventor() ) + lcl_UpdateContourDlg( rSh, SwWrtShell::SEL_GRF ); + + SfxBoolItem aBool(SID_CONTOUR_DLG, 0 != pDlg); + if( pGetStateSet ) + pGetStateSet->Put( aBool ); + else + pVFrame->GetBindings().SetState( aBool ); + } + if( bUpdateSID_IContour ) + { + SfxItemSet aSet(GetPool(), RES_SURROUND, RES_SURROUND); + rSh.GetFlyFrmAttr(aSet); + const SwFmtSurround& rWrap = (const SwFmtSurround&)aSet.Get(RES_SURROUND); + + SfxBoolItem aBool( FN_FRAME_WRAP_CONTOUR, rWrap.IsContour() ); + if( pGetStateSet ) + pGetStateSet->Put( aBool ); + else + pVFrame->GetBindings().SetState( aBool ); + } + } + + bUpdateSID_IMap = FALSE; + bUpdateSID_IMapExec = FALSE; + bUpdateSID_IContour = FALSE; + bUpdateSID_IContourDlg = FALSE; + } + return 0; +} + +void SwBaseShell::GetState( SfxItemSet &rSet ) +{ + SwWrtShell &rSh = GetShell(); + SfxViewFrame* pVFrame = GetView().GetViewFrame(); + SfxWhichIter aIter( rSet ); + USHORT nWhich = aIter.FirstWhich(); + pGetStateSet = &rSet; + while ( nWhich ) + { + switch ( nWhich ) + { + case SID_GALLERY_FORMATS: + if ( rSh.IsObjSelected() || + (rSh.IsSelFrmMode() && + !(rSh.GetSelectionType() & SwWrtShell::SEL_GRF)) ) + rSet.DisableItem( nWhich ); + break; + case SID_GALLERY_ENABLE_ADDCOPY: + rSet.Put( SfxBoolItem( SID_GALLERY_ENABLE_ADDCOPY, + 0 == (HTMLMODE_ON & ::GetHtmlMode(GetView().GetDocShell())))); + break; + case FN_EDIT_REGION: + if( !rSh.IsAnySectionInDoc() ) + rSet.DisableItem(nWhich); + break; + + case FN_INSERT_REGION: + case FN_INSERT_COLUMN_SECTION: + if( rSh.IsSelFrmMode() || + !rSh.IsInsRegionAvailable() ) + rSet.DisableItem( nWhich ); + break; + case FN_CONVERT_TEXT_TABLE: + { + USHORT eFrmType = rSh.GetFrmType(0,TRUE); + if( (eFrmType & FRMTYPE_FOOTNOTE) || + (!rSh.GetTableFmt() && !rSh.IsTextToTableAvailable() ) ) + rSet.DisableItem( nWhich ); + } + break; + case RES_SHADOW: + { + SfxItemSet aSet( rSh.GetAttrPool(), + RES_SHADOW, RES_SHADOW ); + + // Tabellenzelle(n) selektiert? + if ( rSh.IsTableMode() ) + { + SwFrmFmt *pFmt = rSh.GetTableFmt(); + aSet.Put(pFmt->GetAttr( nWhich, TRUE )); + } + else if( rSh.IsFrmSelected() ) + { + SwFlyFrmAttrMgr aMgr( FALSE, &rSh, FRMMGR_TYPE_NONE ); + aSet.Put( aMgr.GetAttrSet() ); + } + else + rSh.GetAttr( aSet ); +#ifdef DEBUG + + const SvxShadowItem& rShItem = (const SvxShadowItem&)aSet.Get(nWhich); + rSet.Put(rShItem); +#else + rSet.Put((const SvxShadowItem&)aSet.Get(nWhich)); +#endif + } + break; + case SID_IMAP: + { + USHORT nId = SvxIMapDlgChildWindow::GetChildWindowId(); + BOOL bHas = pVFrame->HasChildWindow( nId ); + BOOL bFrmSel = rSh.IsFrmSelected(); + BOOL bProtect = 0 != rSh.IsSelObjProtected( (FlyProtectType) + (FLYPROTECT_CONTENT|FLYPROTECT_PARENT) ); + + BOOL bIsGraphicSelection = rSh.GetSelectionType() == SwWrtShell::SEL_GRF; + + //wenn die Grafik ausgeswappt ist, dann muss der + //Status asynchron ermittelt werden + //bis dahin wird der Slot disabled + if(bIsGraphicSelection && rSh.IsGrfSwapOut(TRUE)) + { + rSet.DisableItem(nWhich); + if( !bUpdateSID_IMap ) + { + bUpdateSID_IMap = TRUE; + rSh.GetGraphic(FALSE); // start the loading + } + } + else + { + + if( bProtect || ( !bHas && ( !bFrmSel || + (bIsGraphicSelection && + rSh.GetIMapGraphic().GetType() == GRAPHIC_NONE )) )) + rSet.DisableItem( nWhich ); + else + { + SfxBoolItem aBool(nWhich, bHas); + if ( bHas && bFrmSel ) + lcl_UpdateIMapDlg(rSh); + rSet.Put(aBool); + } + } + } + break; + case SID_IMAP_EXEC: + { + BOOL bDisable = FALSE; + if( !rSh.IsFrmSelected()) + bDisable = TRUE; + USHORT nId = SvxIMapDlgChildWindow::GetChildWindowId(); + if(!bDisable && pVFrame->HasChildWindow( nId )) + { + if(rSh.GetSelectionType() == SwWrtShell::SEL_GRF + && rSh.IsGrfSwapOut(TRUE)) + { + if( !bUpdateSID_IMapExec ) + { + bUpdateSID_IMapExec = TRUE; + rSh.GetGraphic(FALSE); // start the loading + } + } + else + { + SvxIMapDlg *pDlg = SWIMAPDLG(GetView()); + if( pDlg->GetEditingObject() != rSh.GetIMapInventor() ) + lcl_UpdateIMapDlg(rSh); + } + } + rSet.Put(SfxBoolItem(nWhich, bDisable)); + } + break; + case FN_BACKSPACE: + case SID_DELETE: + if (rSh.IsSelObjProtected( (FlyProtectType)(FLYPROTECT_CONTENT|FLYPROTECT_PARENT) ) != 0) + rSet.DisableItem( nWhich ); + break; + case SID_CONTOUR_DLG: + { + BOOL bParentCntProt = 0 != rSh.IsSelObjProtected( + (FlyProtectType)(FLYPROTECT_CONTENT|FLYPROTECT_PARENT) ); + + if( bParentCntProt || 0 != (HTMLMODE_ON & ::GetHtmlMode( + GetView().GetDocShell() )) ) + rSet.DisableItem( nWhich ); + else + { + USHORT nId = SvxContourDlgChildWindow::GetChildWindowId(); + BOOL bHas = GetView().GetViewFrame()->HasChildWindow( nId ); + int nSel = rSh.GetSelectionType(); + BOOL bOk = 0 != (nSel & (SwWrtShell::SEL_GRF|SwWrtShell::SEL_OLE)); + + BOOL bDisable; + if( !bHas && !bOk ) + bDisable = TRUE; + // wenn die Grafik ausgeswappt ist, dann muss der Status + // asynchron ermittelt werden bis dahin wird der Slot + // disabled + else if( (nSel & SwWrtShell::SEL_GRF) && + rSh.IsGrfSwapOut(TRUE)) + { + bDisable = TRUE; + if( !bUpdateSID_IContourDlg ) + { + bUpdateSID_IContourDlg = TRUE; + rSh.GetGraphic(FALSE); // start the loading + } + } + else if( bHas && bOk ) + bDisable = !lcl_UpdateContourDlg( rSh, nSel ); + else if( bOk ) + bDisable = GRAPHIC_NONE == rSh.GetIMapGraphic().GetType(); + + if( bDisable ) + rSet.DisableItem( nWhich ); + else + rSet.Put( SfxBoolItem(nWhich, bHas) ); + } + } + break; + case SID_CONTOUR_EXEC: + { + BOOL bDisable = FALSE; + int nSel = rSh.GetSelectionType(); + if( !(nSel & (SwWrtShell::SEL_GRF|SwWrtShell::SEL_OLE)) ) + bDisable = TRUE; + USHORT nId = SvxContourDlgChildWindow::GetChildWindowId(); + if( !bDisable && GetView().GetViewFrame()->HasChildWindow( nId )) + { + SvxContourDlg *pDlg = SWCONTOURDLG(GetView()); + if( pDlg->GetEditingObject() != rSh.GetIMapInventor() ) + bDisable = TRUE; + } + rSet.Put(SfxBoolItem(nWhich, bDisable)); + } + break; + + case SID_SBA_BRW_UPDATE: + case SID_SBA_BRW_INSERT: + case SID_SBA_BRW_MERGE: + { + //Damit der Datenbankbrowser die Buttons fuer alle Shells + //anzeigt. Aber nur disabled, enabled wird nur in der Textsh. + const int nSelType = rSh.GetSelectionType(); + rSet.Put(SfxBoolItem(nWhich, + nSelType & SwWrtShell::SEL_TXT ? TRUE : FALSE )); + } + break; + + case FN_TOOL_ANKER: + case FN_TOOL_ANKER_PAGE: + case FN_TOOL_ANKER_PARAGRAPH: + case FN_TOOL_ANKER_CHAR: + case FN_TOOL_ANKER_AT_CHAR: + case FN_TOOL_ANKER_FRAME: + { + BOOL bObj = 0 != rSh.IsObjSelected(); + BOOL bParentCntProt = rSh.IsSelObjProtected( (FlyProtectType)(FLYPROTECT_CONTENT|FLYPROTECT_PARENT) ) != 0; + + if( !bParentCntProt && (bObj || rSh.IsFrmSelected())) + { + SfxItemSet aSet(GetPool(), RES_ANCHOR, RES_ANCHOR); + if(bObj) + rSh.GetObjAttr(aSet); + 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); + if(nWhich != FN_TOOL_ANKER) + { + USHORT nHtmlMode = ::GetHtmlMode(GetView().GetDocShell()); + if( ( nWhich == FN_TOOL_ANKER_PAGE && + ((HTMLMODE_ON & nHtmlMode) && (0 == (nHtmlMode & HTMLMODE_SOME_ABS_POS)))) || + ( nWhich == FN_TOOL_ANKER_FRAME && !rSh.IsFlyInFly() ) || + ( nWhich == FN_TOOL_ANKER_AT_CHAR && !rSh.IsFrmSelected())|| + ( nWhich == FN_TOOL_ANKER_PAGE && rSh.IsInHeaderFooter() )) + rSet.DisableItem(nWhich); + else + rSet.Put(SfxBoolItem(nWhich, bSet)); + } + else + { + USHORT nSlotId = 0; + + switch (eSet) + { + case FLY_PAGE: + nSlotId = FN_TOOL_ANKER_PAGE; + break; + case FLY_AT_CNTNT: + nSlotId = FN_TOOL_ANKER_PARAGRAPH; + break; + case FLY_IN_CNTNT: + nSlotId = FN_TOOL_ANKER_CHAR; + break; + case FLY_AUTO_CNTNT: + nSlotId = FN_TOOL_ANKER_AT_CHAR; + break; + case FLY_AT_FLY: + nSlotId = FN_TOOL_ANKER_FRAME; + break; + } + rSet.Put(SfxUInt16Item(nWhich, nSlotId)); + } + } + else + rSet.DisableItem( nWhich ); + } + break; + case FN_FRAME_NOWRAP: + case FN_FRAME_WRAP: + case FN_FRAME_WRAP_IDEAL: + case FN_FRAME_WRAPTHRU: + case FN_FRAME_WRAPTHRU_TRANSP: + case FN_FRAME_WRAP_CONTOUR: + case FN_WRAP_ANCHOR_ONLY: + case FN_FRAME_WRAP_LEFT: + case FN_FRAME_WRAP_RIGHT: + { + BOOL bObj = 0 != rSh.IsObjSelected(); + BOOL bParentCntProt = rSh.IsSelObjProtected( (FlyProtectType)(FLYPROTECT_CONTENT|FLYPROTECT_PARENT) ) != 0; + + if( !bParentCntProt && (bObj || rSh.IsFrmSelected())) + { + SfxItemSet aSet(GetPool(), RES_OPAQUE, RES_ANCHOR); + int nAnchorType; + if(bObj) + { + rSh.GetObjAttr(aSet); + nAnchorType = rSh.GetAnchorId(); + } + else + { + rSh.GetFlyFrmAttr(aSet); + nAnchorType = ((SwFmtAnchor&)aSet.Get(RES_ANCHOR)).GetAnchorId(); + } + const SwFmtSurround& rWrap = (const SwFmtSurround&)aSet.Get(RES_SURROUND); + + const SvxOpaqueItem& rOpaque = (const SvxOpaqueItem&)aSet.Get(RES_OPAQUE); + BOOL bOpaque = rOpaque.GetValue(); + SwSurround nSurround = rWrap.GetSurround(); + BOOL bSet; + + BOOL bDisable = nAnchorType == - 1 || nAnchorType == FLY_IN_CNTNT; + BOOL bHtmlMode = 0 != ::GetHtmlMode(GetView().GetDocShell()); + + switch( nWhich ) + { + case FN_FRAME_NOWRAP: + bDisable |= (bHtmlMode || + ( nAnchorType != FLY_AT_CNTNT && + nAnchorType != FLY_AUTO_CNTNT && nAnchorType != FLY_PAGE)); + bSet = nSurround == SURROUND_NONE; + break; + case FN_FRAME_WRAP: + bDisable |= bHtmlMode; + bSet = nSurround == SURROUND_PARALLEL; + break; + case FN_FRAME_WRAP_IDEAL: + bDisable |= bHtmlMode; + bSet = nSurround == SURROUND_IDEAL; + break; + case FN_FRAME_WRAPTHRU: + bDisable |= (bHtmlMode || + (nAnchorType != FLY_AT_CNTNT&& nAnchorType != FLY_AUTO_CNTNT && nAnchorType != FLY_PAGE)); + if(bObj) + bSet = nSurround == SURROUND_THROUGHT && rSh.GetLayerId(); + else + bSet = nSurround == SURROUND_THROUGHT && bOpaque; + break; + case FN_FRAME_WRAPTHRU_TRANSP: + bDisable |= bHtmlMode; + if(bObj) + bSet = nSurround == SURROUND_THROUGHT && !rSh.GetLayerId(); + else + bSet = nSurround == SURROUND_THROUGHT && !bOpaque; + break; + case FN_FRAME_WRAP_CONTOUR: + bDisable |= bHtmlMode; + bSet = rWrap.IsContour(); + if( !bDisable ) + { + int nSel = rSh.GetSelectionType(); + if( (nSel & SwWrtShell::SEL_GRF) && + rSh.IsGrfSwapOut(TRUE)) + { + bDisable = TRUE; + if( !bUpdateSID_IContour ) + { + bUpdateSID_IContour = TRUE; + rSh.GetGraphic(FALSE); // start the loading + } + } + else if( rSh.IsFrmSelected() ) + bDisable = GRAPHIC_NONE == + rSh.GetIMapGraphic().GetType(); + } + bSet = bDisable ? FALSE : rWrap.IsContour(); + + break; + case FN_WRAP_ANCHOR_ONLY: + bDisable |= (bHtmlMode || + (nAnchorType != FLY_AT_CNTNT)); + bSet = rWrap.IsAnchorOnly(); + break; + case FN_FRAME_WRAP_LEFT: + bSet = nSurround == SURROUND_LEFT; + break; + case FN_FRAME_WRAP_RIGHT: + bSet = nSurround == SURROUND_RIGHT; + break; + } + + if(bDisable) + rSet.DisableItem(nWhich); + else + rSet.Put(SfxBoolItem(nWhich, bSet)); + } + else + rSet.DisableItem(nWhich); + } + break; + case FN_UPDATE_CHARTS: + if( !rSh.HasCharts() ) + rSet.DisableItem( nWhich ); + break; + case FN_UPDATE_ALL_LINKS: + if ( !rSh.GetLinkManager().GetLinks().Count() ) + rSet.DisableItem(nWhich); + break; + } + nWhich = aIter.NextWhich(); + } + pGetStateSet = 0; +} + +/*-------------------------------------------------------------------- + Beschreibung: Slots mit dieser Statusmethode disablen + --------------------------------------------------------------------*/ + + +void SwBaseShell::StateDisableItems( SfxItemSet &rSet ) +{ + SfxWhichIter aIter(rSet); + USHORT nWhich = aIter.FirstWhich(); + + while (nWhich) + { + rSet.DisableItem( nWhich ); + nWhich = aIter.NextWhich(); + } +} + +/*-------------------------------------------------------------------- + Beschreibung: Slots mit dieser Statusmethode disablen + --------------------------------------------------------------------*/ + + +void SwBaseShell::StateStyle( SfxItemSet &rSet ) +{ + BOOL bParentCntProt = GetShell().IsSelObjProtected( (FlyProtectType)(FLYPROTECT_CONTENT|FLYPROTECT_PARENT) ) != 0; + ShellModes eMode = GetView().GetShellMode(); + + if ( bParentCntProt || + SEL_DRAW == eMode || + SEL_DRAW_CTRL == eMode || + SEL_DRAW_FORM == eMode || + SEL_DRAWTEXT == eMode || + SEL_BEZIER == eMode ) + { + SfxWhichIter aIter( rSet ); + USHORT nWhich = aIter.FirstWhich(); + while ( nWhich ) + { + rSet.DisableItem( nWhich ); + nWhich = aIter.NextWhich(); + } + } + else + GetView().GetDocShell()->StateStyleSheet(rSet, &GetShell()); +} + +/*-------------------------------------------------------------------- + Beschreibung: + --------------------------------------------------------------------*/ + + +void SwBaseShell::SetWrapMode( USHORT nSlot ) +{ + SwWrtShell &rSh = GetShell(); + BOOL bObj = 0 != rSh.IsObjSelected(); + if( bObj || rSh.IsFrmSelected()) + { + SfxItemSet aSet(GetPool(), RES_OPAQUE, RES_SURROUND); + if(bObj) + rSh.GetObjAttr(aSet); + else + rSh.GetFlyFrmAttr(aSet); + SwFmtSurround aWrap( (SwFmtSurround&)aSet.Get(RES_SURROUND) ); + SwSurround nOldSurround(aWrap.GetSurround()); + SwSurround nSurround = SURROUND_PARALLEL; + + switch (nSlot) + { + case FN_FRAME_NOWRAP: + nSurround = SURROUND_NONE; + if (aWrap.IsContour()) + aWrap.SetContour(FALSE); + break; + case FN_FRAME_WRAP_IDEAL: + nSurround = SURROUND_IDEAL; + break; + case FN_WRAP_ANCHOR_ONLY: + aWrap.SetAnchorOnly(!aWrap.IsAnchorOnly()); + break; + case FN_FRAME_WRAP_CONTOUR: + aWrap.SetContour(!aWrap.IsContour()); + if (nSurround == SURROUND_THROUGHT) + nSurround = SURROUND_PARALLEL; + break; + case FN_FRAME_WRAPTHRU_TRANSP: + if (aWrap.IsContour()) + aWrap.SetContour(FALSE); + // kein break!!! + case FN_FRAME_WRAPTHRU: + nSurround = SURROUND_THROUGHT; + break; + + case FN_FRAME_WRAP_LEFT: + nSurround = SURROUND_LEFT; + break; + + case FN_FRAME_WRAP_RIGHT: + nSurround = SURROUND_RIGHT; + break; + + default: + break; + } + aWrap.SetSurround(nSurround); + + if (nSlot != FN_FRAME_WRAP_CONTOUR) + { + // Konturumfluss bei Draw-Objekten defaulten + if (bObj && nOldSurround != nSurround && + (nOldSurround == SURROUND_NONE || nOldSurround == SURROUND_THROUGHT)) + { + aWrap.SetContour(TRUE); + } + } + + aSet.Put( aWrap ); + aSet.Put(SvxOpaqueItem(RES_OPAQUE, nSlot != FN_FRAME_WRAPTHRU_TRANSP)); + if(bObj) + { + rSh.SetObjAttr(aSet); + if (nSlot != FN_FRAME_WRAPTHRU_TRANSP) + rSh.SelectionToHeaven(); + else + rSh.SelectionToHell(); + } + else + rSh.SetFlyFrmAttr(aSet); + } +} + +/*-------------------------------------------------------------------- + Beschreibung: Update der Statuszeile erzwingen + --------------------------------------------------------------------*/ + +void SwBaseShell::SetFrmMode(USHORT nMode, SwWrtShell *pSh ) +{ + nFrameMode = nMode; + SfxBindings &rBnd = pSh->GetView().GetViewFrame()->GetBindings(); + + if( nMode == FLY_DRAG || + (pSh && (pSh->IsFrmSelected() || pSh->IsObjSelected())) ) + { + const SfxPointItem aTmp1( SID_ATTR_POSITION, pSh->GetAnchorObjDiff()); + const SvxSizeItem aTmp2( SID_ATTR_SIZE, pSh->GetObjSize()); + rBnd.SetState( aTmp1 ); + rBnd.SetState( aTmp2 ); + } + else if( nMode == FLY_DRAG_END ) + { + static USHORT __READONLY_DATA aInval[] = + { + SID_ATTR_POSITION, SID_ATTR_SIZE, 0 + }; + rBnd.Invalidate(aInval); + } +} + +/*-------------------------------------------------------------------- + Beschreibung: Ctor + --------------------------------------------------------------------*/ + +SwBaseShell::SwBaseShell(SwView& rVw) : + SfxShell( &rVw ), + rView(rVw), + pFrmMgr(0), + pGetStateSet(0), + bUpdateSID_IMap(FALSE), + bUpdateSID_IMapExec(FALSE), + bUpdateSID_IContour(FALSE), + bUpdateSID_IContourDlg(FALSE) +{ + SwWrtShell& rWrtSh = rView.GetWrtShell(); + + SetPool(&rWrtSh.GetAttrPool()); + SetName(C2S("Base")); + rWrtSh.SetGrfArrivedLnk( LINK( this, SwBaseShell, GraphicArrivedHdl)); +} + + +SwBaseShell::~SwBaseShell() +{ + delete pFrmMgr; + if( rView.GetCurShell() == this ) + rView.ResetSubShell(); + + Link aTmp( LINK( this, SwBaseShell, GraphicArrivedHdl)); + if( aTmp == rView.GetWrtShell().GetGrfArrivedLnk() ) + rView.GetWrtShell().SetGrfArrivedLnk( Link() ); +} + +/*-------------------------------------------------------------------- + Beschreibung: + --------------------------------------------------------------------*/ + +void SwBaseShell::ExecTxtCtrl(SfxRequest& rReq) +{ + const SfxItemSet *pArgs = rReq.GetArgs(); + + SwWrtShell &rSh = GetShell(); + if (!pArgs) + GetView().GetViewFrame()->GetDispatcher()->Execute( SID_CHAR_DLG, FALSE); + else + { + rSh.SetAttr(*pArgs); + SwTxtFmtColl* pColl = rSh.GetCurTxtFmtColl(); + if(pColl && pColl->IsAutoUpdateFmt()) + rSh.AutoUpdatePara(pColl, *pArgs); + + } +} + +/*-------------------------------------------------------------------- + Beschreibung: + --------------------------------------------------------------------*/ + +void SwBaseShell::GetTxtCtrlState(SfxItemSet& rSet) +{ + GetShell().GetAttr(rSet); +/* +#ifdef UNX + // Timing-Probleme: Wenn der Timer ausloest, der u.a. die FontList ermitteln + // will, ist die DocShell u.U. (bei langen Startup-Phasen wie z.B. unter + // Unix) noch gar nicht angelegt (->SF). In diesem Fall holen wir uns + // die FontList einfach vom AppWindow. Ein sp"aterer Timer-Aufruf wird's + // dann schon richten. + if( !GetView().GetDocShell() ) + { + FontList aFontList(::GetGetpApp()()->GetAppWindow()); + SvxFontListItem aFontListItem( &aFontList , SID_ATTR_CHAR_FONTLIST ); + rSet.Put( aFontListItem ); + } + else +#endif + { + SvxFontListItem aFontListItem(GetView().GetDocShell()->GetFontList(), SID_ATTR_CHAR_FONTLIST); + rSet.Put(aFontListItem); + } + + GetShell().GetAttr(rSet); // *alle* Textattribute von der Core erfragen + */ +} + +/*-------------------------------------------------------------------- + Beschreibung: + --------------------------------------------------------------------*/ + +void SwBaseShell::GetBckColState(SfxItemSet &rSet) +{ + SwWrtShell &rSh = GetShell(); + SfxWhichIter aIter( rSet ); + USHORT nWhich = aIter.FirstWhich(); + int nSelType = rSh.GetSelectionType(); + +// if ( nSelType & SwWrtShell::SEL_GRF || + if( nSelType & SwWrtShell::SEL_OLE ) + { + rSet.DisableItem( SID_BACKGROUND_COLOR ); + return; + } + + if ( nSelType & SwWrtShell::SEL_FRM ) + { + BOOL bParentCntProt = rSh.IsSelObjProtected( (FlyProtectType)(FLYPROTECT_CONTENT|FLYPROTECT_PARENT) ) != 0; + if (bParentCntProt) + { + rSet.DisableItem( SID_BACKGROUND_COLOR ); + return; + } + } + + SvxBrushItem aBrushItem; + + if( SwWrtShell::SEL_TBL_CELLS & nSelType ) + rSh.GetBoxBackground( aBrushItem ); + else + { + SfxItemSet aCoreSet(GetPool(), RES_BACKGROUND, RES_BACKGROUND); + if( nSelType & SwWrtShell::SEL_GRF || SwWrtShell::SEL_FRM & nSelType ) + rSh.GetFlyFrmAttr( aCoreSet ); + else + rSh.GetAttr( aCoreSet ); + aBrushItem = (const SvxBrushItem&)aCoreSet.Get(RES_BACKGROUND); + } + + while ( nWhich ) + { + switch(nWhich) + { + case SID_BACKGROUND_COLOR : + { + SvxColorItem aColorItem(aBrushItem.GetColor()); + rSet.Put( aColorItem, SID_BACKGROUND_COLOR ); + } + break; + case SID_ATTR_BRUSH: + case RES_BACKGROUND: + rSet.Put( aBrushItem, GetPool().GetWhich(nWhich) ); + break; + } + nWhich = aIter.NextWhich(); + } +} + +/*-------------------------------------------------------------------- + Beschreibung: + --------------------------------------------------------------------*/ + +void SwBaseShell::ExecBckCol(SfxRequest& rReq) +{ + SwWrtShell &rSh = GetShell(); + int nSelType = rSh.GetSelectionType(); + if ( nSelType & SwWrtShell::SEL_OLE ) + { + return; + } + + const SfxItemSet* pArgs = rReq.GetArgs(); + USHORT nSlot = rReq.GetSlot(); + if( !pArgs && nSlot != SID_BACKGROUND_COLOR) + return ; + + SvxBrushItem aBrushItem; + + if( SwWrtShell::SEL_TBL & nSelType ) + { + rSh.GetBoxBackground( aBrushItem ); + } + else + { + SfxItemSet aCoreSet(GetPool(), RES_BACKGROUND, RES_BACKGROUND); + if( (SwWrtShell::SEL_FRM & nSelType) || (SwWrtShell::SEL_GRF & nSelType) ) + rSh.GetFlyFrmAttr( aCoreSet ); + else + rSh.GetAttr( aCoreSet ); + aBrushItem = (const SvxBrushItem&)aCoreSet.Get(RES_BACKGROUND); + } + +// BOOL bMsgOk = FALSE; + + switch (nSlot) + { + // RES_BACKGROUND (=SID_ATTR_BRUSH) muss ueber zwei IDs + // gesetzt werden: + case SID_BACKGROUND_COLOR: + { + aBrushItem.SetGraphicPos(GPOS_NONE); + + //Brush &rBrush = aBrushItem.GetBrush(); + if(pArgs) + { + const SvxColorItem& rNewColorItem = (const SvxColorItem&) + pArgs->Get(SID_BACKGROUND_COLOR); + const Color& rNewColor = rNewColorItem.GetValue(); + aBrushItem.SetColor( rNewColor ); + GetView().GetViewFrame()->GetBindings().SetState(rNewColorItem); + } + else + aBrushItem.SetColor( COL_TRANSPARENT ); + } + break; + + case SID_ATTR_BRUSH: + case RES_BACKGROUND: + { + const SvxBrushItem& rNewBrushItem = (const SvxBrushItem&) + pArgs->Get( GetPool().GetWhich(nSlot) ); + aBrushItem = rNewBrushItem; + } + break; + default: +// bMsgOk = FALSE; + DBG_ERROR( "Unbekannte Message bei ExecuteAttr!" ); + return; + } + + if( SwWrtShell::SEL_TBL & nSelType ) + { + rSh.SetBoxBackground( aBrushItem ); + } + else if( (SwWrtShell::SEL_FRM & nSelType) || + (SwWrtShell::SEL_GRF & nSelType) ) + { + SfxItemSet aCoreSet(GetPool(), RES_BACKGROUND, RES_BACKGROUND); + aCoreSet.Put( aBrushItem ); + // Vorlagen-AutoUpdate + SwFrmFmt* pFmt = rSh.GetCurFrmFmt(); + if(pFmt && pFmt->IsAutoUpdateFmt()) + rSh.AutoUpdateFrame( pFmt, aCoreSet); + else + rSh.SetFlyFrmAttr( aCoreSet ); + } + else + { + SwTxtFmtColl* pColl = rSh.GetCurTxtFmtColl(); + if( pColl && pColl->IsAutoUpdateFmt()) + { + SfxItemSet aSet(GetPool(), RES_BACKGROUND, RES_BACKGROUND ); + aSet.Put(aBrushItem); + rSh.AutoUpdatePara( pColl, aSet); + } + else + rSh.SetAttr( aBrushItem ); + } +} + +/*-------------------------------------------------------------------- + Beschreibung: + --------------------------------------------------------------------*/ + + +void SwBaseShell::GetBorderState(SfxItemSet &rSet) +{ + SwWrtShell &rSh = GetShell(); + // Tabellenzelle(n) selektiert? + BOOL bPrepare = TRUE; + if ( rSh.IsTableMode() ) + { + SfxItemSet aCoreSet( GetPool(), + RES_BOX, RES_BOX, + SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER, 0 ); + SvxBoxInfoItem aBoxInfo; + aCoreSet.Put( aBoxInfo ); + rSh.GetTabBorders( aCoreSet ); + rSet.Put( aCoreSet ); + } + else if ( rSh.IsFrmSelected() ) + { + SwFlyFrmAttrMgr aMgr( FALSE, &rSh, FRMMGR_TYPE_NONE ); + rSet.Put( aMgr.GetAttrSet() ); + bPrepare = FALSE; + } + else + // Umrandungsattribute ganz normal ueber Shell holen + rSh.GetAttr( rSet ); + + if ( bPrepare ) + ::PrepareBoxInfo( rSet, rSh ); +} + +/*-------------------------------------------------------------------- + Beschreibung: + --------------------------------------------------------------------*/ + + +void SwBaseShell::ExecDlg(SfxRequest &rReq) +{ + SwWrtShell &rSh = GetShell(); + Window *pMDI = &GetView().GetViewFrame()->GetWindow(); + //Damit aus dem Basic keine Dialoge fuer Hintergrund-Views aufgerufen werden: + BOOL bBackground = (&GetView() != GetActiveView()); + const SfxPoolItem* pItem = 0; + const SfxItemSet* pArgs = rReq.GetArgs(); + + USHORT nSlot = rReq.GetSlot(); + const SfxItemSet* pOutSet = 0; + if(pArgs) + pArgs->GetItemState( GetPool().GetWhich(nSlot), FALSE, &pItem ); + + switch ( nSlot ) + { + case FN_FORMAT_PAGE_COLUMN_DLG: + case FN_FORMAT_PAGE_DLG: + { + if( !bBackground ) + { + const USHORT nCurIdx = rSh.GetCurPageDesc(); + const SwPageDesc& rPageDesc = rSh.GetPageDesc( nCurIdx ); + //temp. View, weil die Shell nach dem Dialog nicht mehr gueltig sein muss + //z.B. Kopfzeile ausschalten + SwView& rView = GetView(); + rView.GetDocShell()->FormatPage(rPageDesc.GetName(), + nSlot == FN_FORMAT_PAGE_COLUMN_DLG, + &rSh ); + rView.InvalidateRulerPos(); + } + } + break; + case FN_FORMAT_BORDER_DLG: + { + SfxItemSet aSet( rSh.GetAttrPool(), + RES_BOX , RES_SHADOW, + SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER, + 0 ); + SwBorderDlg* pDlg = 0; + + // Tabellenzelle(n) selektiert? + if ( rSh.IsTableMode() ) + { + // Umrandungattribute Get/SetTabBorders() setzen + ::PrepareBoxInfo( aSet, rSh ); + rSh.GetTabBorders( aSet ); + pDlg = new SwBorderDlg( pMDI, aSet, SW_BORDER_MODE_TABLE ); + if ( pDlg->Execute() == RET_OK ) + { + rSh.SetTabBorders( *pDlg->GetOutputItemSet() ); + pOutSet = pDlg->GetOutputItemSet(); + } + } + else if ( rSh.IsFrmSelected() ) + { + // Umrandungsattribute ueber Frame-Manager setzen + SwFlyFrmAttrMgr aMgr( FALSE, &rSh, FRMMGR_TYPE_NONE ); + aSet.Put( aMgr.GetAttrSet() ); + + pDlg = new SwBorderDlg( pMDI, aSet, SW_BORDER_MODE_FRAME ); + if ( pDlg->Execute() == RET_OK ) + { + aMgr.SetAttrSet( *pDlg->GetOutputItemSet() ); + aMgr.UpdateFlyFrm(); + pOutSet = pDlg->GetOutputItemSet(); + } + } + else + { + // Umrandungsattribute ganz normal ueber Shell setzen + rSh.GetAttr( aSet ); + ::PrepareBoxInfo( aSet, rSh ); + + pDlg = new SwBorderDlg( pMDI, aSet, SW_BORDER_MODE_PARA ); + if ( pDlg->Execute() == RET_OK ) + { + rSh.SetAttr( *pDlg->GetOutputItemSet() ); + pOutSet = pDlg->GetOutputItemSet(); + } + } + delete pDlg; + } + break; + case FN_FORMAT_BACKGROUND_DLG: + { + SfxItemSet aSet( rSh.GetAttrPool(), + RES_BACKGROUND, RES_BACKGROUND ); + + SwBackgroundDlg* pDlg = 0; + + // Tabellenzelle(n) selektiert? + if ( rSh.IsTableMode() ) + { + //Hintergrundattribute der Tabelle holen und in den Set packen + SvxBrushItem aBrush(RES_BACKGROUND); + rSh.GetBoxBackground( aBrush ); + pDlg = new SwBackgroundDlg( pMDI, aSet ); + aSet.Put( aBrush ); + if ( pDlg->Execute() == RET_OK ) + { + //aBrush = (SvxBrushItem) pDlg->GetOutputItemSet()->Get( RES_BACKGROUND ); + + rSh.SetBoxBackground( (SvxBrushItem&) + pDlg->GetOutputItemSet()->Get( RES_BACKGROUND )); + pOutSet = pDlg->GetOutputItemSet(); + } + } + else if ( rSh.IsFrmSelected() ) + { + + rSh.GetFlyFrmAttr( aSet ); + + pDlg = new SwBackgroundDlg( pMDI, aSet ); + if ( pDlg->Execute() == RET_OK ) + { + rSh.SetFlyFrmAttr((SfxItemSet &) *pDlg->GetOutputItemSet() ); + pOutSet = pDlg->GetOutputItemSet(); + } + } + else + { + // Umrandungsattribute ganz normal ueber Shell setzen + rSh.GetAttr( aSet ); + + pDlg = new SwBackgroundDlg( pMDI, aSet ); + if ( pDlg->Execute() == RET_OK ) + { + rSh.SetAttr( *pDlg->GetOutputItemSet() ); + pOutSet = pDlg->GetOutputItemSet(); + } + } + delete pDlg; + + } + break; + default:DBG_ERROR("falscher Dispatcher (basesh.cxx)"); + } +} + +/*-------------------------------------------------------------------- + Beschreibung: + --------------------------------------------------------------------*/ + +int SwBaseShell::InsertGraphic( const String &rPath, const String &rFilter, + BOOL bLink, GraphicFilter *pFlt, + Graphic* pPreviewGrf, BOOL bRule ) +{ + SwWait aWait( *rView.GetDocShell(), TRUE ); + + Graphic aGrf; + int nRes = GRFILTER_OK; + if ( pPreviewGrf ) + aGrf = *pPreviewGrf; + else + { + if( !pFlt ) + pFlt = ::GetGrfFilter(); + Link aOldLink = pFlt->GetUpdatePercentHdl(); + pFlt->SetUpdatePercentHdl( LINK( this, SwBaseShell, UpdatePercentHdl )); + ::StartProgress( STR_STATSTR_IMPGRF, 0, 100, rView.GetDocShell() ); + nRes = ::LoadGraphic( rPath, rFilter, aGrf, pFlt /*, nFilter*/ ); + ::EndProgress( rView.GetDocShell() ); + pFlt->SetUpdatePercentHdl( aOldLink ); + } + + if( GRFILTER_OK == nRes ) + { + SwWrtShell &rSh = GetShell(); + rSh.StartAction(); + if( bLink ) + rSh.Insert( URIHelper::SmartRelToAbs( rPath ), + rFilter, aGrf, pFrmMgr, bRule ); + else + rSh.Insert( aEmptyStr, aEmptyStr, aGrf, pFrmMgr ); + // nach dem EndAction ist es zu spaet, weil die Shell dann schon zerstoert sein kann + DELETEZ(pFrmMgr); + rSh.EndAction(); + } + return nRes; +} + + +IMPL_LINK_INLINE_START( SwBaseShell, UpdatePercentHdl, GraphicFilter *, pFilter ) +{ + ::SetProgressState( pFilter->GetPercent(), rView.GetDocShell() ); + return 0; +} +IMPL_LINK_INLINE_END( SwBaseShell, UpdatePercentHdl, GraphicFilter *, pFilter ) + + +// ---------------------------------------------------------------------------- + + +SwWrtShell& SwBaseShell::GetShell() +{ + return rView.GetWrtShell(); +} + +// ---------------------------------------------------------------------------- + +SwWrtShell* SwBaseShell::GetShellPtr() +{ + return rView.GetWrtShellPtr(); +} + + +void SwBaseShell::GetGalleryState( SfxItemSet &rSet ) +{ + SwWrtShell &rSh = GetShell(); + SfxWhichIter aIter( rSet ); + USHORT nWhich = aIter.FirstWhich(); + switch ( nWhich ) + { + case SID_GALLERY_BG_BRUSH: + { + int nSel = rSh.GetSelectionType(); + SfxStringListItem aLst( nWhich ); + List *pLst = aLst.GetList(); + nParagraphPos = nGraphicPos = nOlePos = nFramePos = nTablePos = + nTableRowPos = nTableCellPos = nPagePos = + nHeaderPos = nFooterPos = 0; + BYTE nPos = 1; + pLst->Insert( (void*) new SW_RESSTR( STR_SWBG_PAGE ), pLst->Count() ); + nPagePos = nPos++; + USHORT nHtmlMode = ::GetHtmlMode(GetView().GetDocShell()); + BOOL bHtmlMode = 0 != (nHtmlMode & HTMLMODE_ON); + + if ( (!bHtmlMode || (nHtmlMode & HTMLMODE_FULL_STYLES)) && + (nSel & SwWrtShell::SEL_TXT) ) + { + pLst->Insert( (void*) new SW_RESSTR( STR_SWBG_PARAGRAPH ), pLst->Count() ); + nParagraphPos = nPos++; + } + if ( (!bHtmlMode || (nHtmlMode & HTMLMODE_SOME_STYLES)) && + nSel & (SwWrtShell::SEL_TBL|SwWrtShell::SEL_TBL_CELLS) ) + { + pLst->Insert( (void*) new SW_RESSTR( STR_SWBG_TABLE ), pLst->Count() ); + nTablePos = nPos++; + + if(!bHtmlMode) + { + pLst->Insert( (void*) new SW_RESSTR( STR_SWBG_TABLE_ROW ), pLst->Count() ); + nTableRowPos = nPos++; + } + + pLst->Insert( (void*) new SW_RESSTR( STR_SWBG_TABLE_CELL), pLst->Count() ); + nTableCellPos = nPos++; + } + if(!bHtmlMode) + { + if ( nSel & SwWrtShell::SEL_FRM ) + { + pLst->Insert( (void*) new SW_RESSTR( STR_SWBG_FRAME ), pLst->Count() ); + nFramePos = nPos++; + } + if ( nSel & SwWrtShell::SEL_GRF ) + { + pLst->Insert( (void*) new SW_RESSTR( STR_SWBG_GRAPHIC ), pLst->Count() ); + nGraphicPos = nPos++; + } + if ( nSel & SwWrtShell::SEL_OLE ) + { + pLst->Insert( (void*) new SW_RESSTR( STR_SWBG_OLE ), pLst->Count() ); + nOlePos = nPos++; + } + const USHORT nType = rSh.GetFrmType(0,TRUE); + if ( nType & FRMTYPE_HEADER ) + { + pLst->Insert( (void*) new SW_RESSTR( STR_SWBG_HEADER ), pLst->Count() ); + nHeaderPos = nPos++; + } + if ( nType & FRMTYPE_FOOTER ) + { + pLst->Insert( (void*) new SW_RESSTR( STR_SWBG_FOOTER ), pLst->Count() ); + nFooterPos = nPos; + } + } + if ( pLst->Count() ) + rSet.Put( aLst ); + else + rSet.DisableItem( nWhich ); + break; + } + } +} + + +void SwBaseShell::ExecuteGallery(SfxRequest &rReq) +{ + SwWrtShell &rSh = GetShell(); + rSh.StartAction(); + const SfxItemSet* pArgs = rReq.GetArgs(); + USHORT nSlot = rReq.GetSlot(); + switch(nSlot) + { + case SID_GALLERY_BG_BRUSH: + { + int nSel = rSh.GetSelectionType(); + if ( nSel & SwWrtShell::SEL_DRW_TXT ) + break; + + BYTE nPos = (BYTE)((SfxUInt16Item &)pArgs->Get(SID_GALLERY_BG_POS)).GetValue(); + ++nPos; + + SvxBrushItem aBrush( (SvxBrushItem&)pArgs->Get(SID_GALLERY_BG_BRUSH)); + aBrush.SetWhich( RES_BACKGROUND ); + if ( nPos == nParagraphPos ) + rSh.SetAttr( aBrush ); + else if ( nPos == nTablePos ) + rSh.SetTabBackground( aBrush ); + else if ( nPos == nTableRowPos ) + rSh.SetRowBackground( aBrush ); + else if ( nPos == nTableCellPos ) + rSh.SetBoxBackground( aBrush ); + else if ( nPos == nFramePos || nPos == nGraphicPos || nPos == nOlePos ) + { + SfxItemSet aCoreSet(GetPool(), RES_BACKGROUND, RES_BACKGROUND); + aCoreSet.Put( aBrush ); + rSh.SetFlyFrmAttr( aCoreSet ); + } + else if ( nPos == nPagePos || nPos == nHeaderPos || nPos == nFooterPos ) + { + USHORT nDesc = rSh.GetCurPageDesc(); + SwPageDesc aDesc( rSh.GetPageDesc( nDesc ) ); + if ( nPos == nPagePos ) + aDesc.GetMaster().SetAttr( aBrush ); + else if ( nPos == nHeaderPos ) + { + SwFmtHeader aHead( aDesc.GetMaster().GetHeader() ); + aHead.GetHeaderFmt()->SetAttr( aBrush ); + aDesc.GetMaster().SetAttr( aHead ); + } + else if ( nPos == nFooterPos ) + { + SwFmtFooter aFoot( aDesc.GetMaster().GetFooter() ); + aFoot.GetFooterFmt()->SetAttr( aBrush ); + aDesc.GetMaster().SetAttr( aFoot ); + } + rSh.ChgPageDesc( nDesc, aDesc ); + } + break; + } + } + rSh.EndAction(); +} + +void SwBaseShell::ExecField( SfxRequest& rReq ) +{ + USHORT nSlot = rReq.GetSlot(); + switch( nSlot ) + { + case FN_CHANGE_DBFIELD: + { + SwChangeDBDlg *pDlg = new SwChangeDBDlg(GetView()); + pDlg->Execute(); + delete pDlg; + } + break; + default: + ASSERT(FALSE, falscher Dispatcher); + } +} + +/*------------------------------------------------------------------------ + + $Log: not supported by cvs2svn $ + Revision 1.404 2000/09/18 16:06:02 willem.vandorp + OpenOffice header added. + + Revision 1.403 2000/09/13 11:38:45 ka + use URL method of Gallery instead of DirEntry method + + Revision 1.402 2000/09/12 13:16:50 kz + add. include tools/fsys.hxx + + Revision 1.401 2000/09/08 08:12:51 os + Change: Set/Toggle/Has/Knows/Show/GetChildWindow + + Revision 1.400 2000/09/07 15:59:28 os + change: SFX_DISPATCHER/SFX_BINDINGS removed + + Revision 1.399 2000/08/17 11:42:20 jp + remove the SW graphicmanager + + Revision 1.398 2000/08/15 13:51:49 os + #77616# allow background color for graphic objects + + Revision 1.397 2000/07/11 18:54:25 jp + Task #70407#: use the GraphikObject + + Revision 1.396 2000/07/11 17:56:35 jp + Bug #76736#: Execute - UpdateFields reativate + + Revision 1.395 2000/06/26 13:17:56 os + INetURLObject::SmartRelToAbs removed + + Revision 1.394 2000/06/07 13:18:20 os + using UCB + + Revision 1.393 2000/05/30 10:40:31 os + unused slots removed + + Revision 1.392 2000/05/26 07:21:31 os + old SW Basic API Slots removed + + Revision 1.391 2000/05/10 11:53:01 os + Basic API removed + + Revision 1.390 2000/05/09 14:41:35 os + BASIC interface partially removed + + Revision 1.389 2000/05/08 11:22:47 os + CreateSubObject + + Revision 1.388 2000/04/18 14:58:23 os + UNICODE + +------------------------------------------------------------------------*/ + + diff --git a/sw/source/ui/shells/beziersh.cxx b/sw/source/ui/shells/beziersh.cxx new file mode 100644 index 0000000000..28f3203ce8 --- /dev/null +++ b/sw/source/ui/shells/beziersh.cxx @@ -0,0 +1,488 @@ +/************************************************************************* + * + * $RCSfile: beziersh.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:46 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +#ifdef PRECOMPILED +#include "ui_pch.hxx" +#endif + +#pragma hdrstop + +#include "cmdid.h" + +#ifndef _SVDVIEW_HXX //autogen +#include <svx/svdview.hxx> +#endif +#ifndef _SVX_SRCHITEM_HXX //autogen +#include <svx/srchitem.hxx> +#endif +#ifndef _SFXENUMITEM_HXX //autogen +#include <svtools/eitem.hxx> +#endif +#ifndef _SFX_WHITER_HXX //autogen +#include <svtools/whiter.hxx> +#endif +#ifndef _SVDOPATH_HXX //autogen +#include <svx/svdopath.hxx> +#endif +#ifndef _SFXREQUEST_HXX //autogen +#include <sfx2/request.hxx> +#endif +#ifndef _SFXDISPATCH_HXX //autogen +#include <sfx2/dispatch.hxx> +#endif +#ifndef _SFXVIEWFRM_HXX +#include <sfx2/viewfrm.hxx> +#endif +#ifndef _SFX_BINDINGS_HXX //autogen +#include <sfx2/bindings.hxx> +#endif +#ifndef _SFXOBJFACE_HXX //autogen +#include <sfx2/objface.hxx> +#endif +#ifndef _SFXAPP_HXX //autogen +#include <sfx2/app.hxx> +#endif + +#include "wrtsh.hxx" +#include "view.hxx" +#include "edtwin.hxx" +#include "helpid.h" +#include "globals.hrc" +#include "drawbase.hxx" +#include "beziersh.hxx" + +#include "popup.hrc" +#include "shells.hrc" + +#define SwBezierShell +#include "itemdef.hxx" +#include "swslots.hxx" + +#define C2S(cChar) UniString::CreateFromAscii(cChar) +SFX_IMPL_INTERFACE(SwBezierShell, SwBezierShell, SW_RES(STR_SHELLNAME_BEZIER)) +{ + SFX_POPUPMENU_REGISTRATION(SW_RES(MN_DRAW_POPUPMENU)); + SFX_OBJECTBAR_REGISTRATION(SFX_OBJECTBAR_OBJECT, SW_RES(RID_BEZIER_TOOLBOX)); + SFX_OBJECTMENU_REGISTRATION(SID_OBJECTMENU0, SW_RES(MN_OBJECTMENU_DRAW)); +} + +TYPEINIT1(SwBezierShell,SwBaseShell) + +/*-------------------------------------------------------------------- + Beschreibung: + --------------------------------------------------------------------*/ + + +SwBezierShell::SwBezierShell(SwView &rView): + SwBaseShell( rView ) +{ + SetName(C2S("Bezier")); + SetHelpId(SW_BEZIERSHELL); + + SwWrtShell *pSh = &GetShell(); + SdrView* pSdrView = pSh->GetDrawView(); + pSdrView->SetEliminatePolyPointLimitAngle(1500L); +} + +/*-------------------------------------------------------------------- + Beschreibung: + --------------------------------------------------------------------*/ + + +void SwBezierShell::Execute(SfxRequest &rReq) +{ + SwWrtShell *pSh = &GetShell(); + SdrView* pSdrView = pSh->GetDrawView(); + const SfxItemSet *pArgs = rReq.GetArgs(); + USHORT nSlotId = rReq.GetSlot(); + BOOL bChanged = pSdrView->GetModel()->IsChanged(); + pSdrView->GetModel()->SetChanged(FALSE); + const SfxPoolItem* pItem; + if(pArgs) + pArgs->GetItemState(nSlotId, FALSE, &pItem); + + switch (nSlotId) + { + case SID_DELETE: + case FN_BACKSPACE: + if (pSh->IsObjSelected()) + { + if (pSdrView->HasMarkedPoints()) + pSh->GetView().GetViewFrame()->GetDispatcher()->Execute(SID_BEZIER_DELETE, FALSE); + else + { + pSh->DelSelectedObj(); + if (pSh->IsSelFrmMode()) + { + pSh->LeaveSelFrmMode(); + pSh->NoEdit(); + } + GetView().AttrChangedNotify(pSh); // ggf Shellwechsel... + } + } + break; + + case FN_ESCAPE: + if (pSdrView->HasMarkedPoints()) + pSdrView->UnmarkAllPoints(); + else + { + if ( pSh->IsDrawCreate() ) + { + GetView().GetDrawFuncPtr()->BreakCreate(); + GetView().AttrChangedNotify(pSh); // ggf Shellwechsel... + } + else if ( pSh->HasSelection() || GetView().IsDrawMode() ) + { + GetView().LeaveDrawCreate(); + pSh->EnterStdMode(); + GetView().AttrChangedNotify(pSh); // ggf Shellwechsel... + } + } + break; + + case SID_BEZIER_MOVE: + case SID_BEZIER_INSERT: + { + GetView().GetEditWin().SetBezierMode(nSlotId); + static USHORT __READONLY_DATA aInva[] = + { + SID_BEZIER_INSERT, + SID_BEZIER_MOVE, + 0 + }; + GetView().GetViewFrame()->GetBindings().Invalidate(aInva); + } + break; + + case SID_BEZIER_DELETE: + case SID_BEZIER_CUTLINE: + case SID_BEZIER_CONVERT: + case SID_BEZIER_EDGE: + case SID_BEZIER_SMOOTH: + case SID_BEZIER_SYMMTR: + case SID_BEZIER_CLOSE: + case SID_BEZIER_ELIMINATE_POINTS: + { + const SdrMarkList& rMarkList = pSdrView->GetMarkList(); + + if (rMarkList.GetMark(0) && !pSdrView->IsAction()) + { + switch (nSlotId) + { + case SID_BEZIER_DELETE: + pSdrView->DeleteMarkedPoints(); + break; + + case SID_BEZIER_CUTLINE: + { + pSdrView->RipUpAtMarkedPoints(); + pSh->CheckUnboundObjects(); + } + break; + + case SID_BEZIER_CONVERT: + { + pSdrView->SetMarkedSegmentsKind(SDRPATHSEGMENT_TOGGLE); + break; + } + + case SID_BEZIER_EDGE: + case SID_BEZIER_SMOOTH: + case SID_BEZIER_SYMMTR: + { + SdrPathSmoothKind eKind; + + switch (nSlotId) + { + case SID_BEZIER_EDGE: eKind = SDRPATHSMOOTH_ANGULAR; break; + case SID_BEZIER_SMOOTH: eKind = SDRPATHSMOOTH_ASYMMETRIC; break; + case SID_BEZIER_SYMMTR: eKind = SDRPATHSMOOTH_SYMMETRIC; break; + } + + SdrPathSmoothKind eSmooth = pSdrView->GetMarkedPointsSmooth(); + if (eKind != eSmooth) + { + pSdrView->SetMarkedPointsSmooth(eKind); + + static USHORT __READONLY_DATA aInva[] = + { + SID_BEZIER_SMOOTH, + SID_BEZIER_EDGE, + SID_BEZIER_SYMMTR, + 0 + }; + GetView().GetViewFrame()->GetBindings().Invalidate(aInva); + } + break; + } + + case SID_BEZIER_CLOSE: + { + SdrPathObj* pPathObj = (SdrPathObj*) rMarkList.GetMark(0)->GetObj(); + pSdrView->UnmarkAllPoints(); + Size aDist(GetView().GetEditWin().PixelToLogic(Size(8,8))); + pPathObj->ToggleClosed(aDist.Width()); + break; + } + + case SID_BEZIER_ELIMINATE_POINTS: + pSdrView->SetEliminatePolyPoints(!pSdrView->IsEliminatePolyPoints()); + break; + } + } + } + break; + + default: + break; + } + + if (pSdrView->GetModel()->IsChanged()) + GetShell().SetModified(); + else if (bChanged) + pSdrView->GetModel()->SetChanged(TRUE); +} + +/*-------------------------------------------------------------------- + Beschreibung: + --------------------------------------------------------------------*/ + + +void SwBezierShell::GetState(SfxItemSet &rSet) +{ + SdrView* pSdrView = GetShell().GetDrawView(); + + SfxWhichIter aIter( rSet ); + USHORT nWhich = aIter.FirstWhich(); + + while( nWhich ) + { + switch( nWhich ) + { + case SID_BEZIER_MOVE: + case SID_BEZIER_INSERT: + { + USHORT nEditMode = GetView().GetEditWin().GetBezierMode(); + + rSet.Put(SfxBoolItem(nWhich, nEditMode == nWhich)); + } + break; + + case SID_BEZIER_CUTLINE: + if (!pSdrView->IsRipUpAtMarkedPointsPossible()) + { + rSet.DisableItem(SID_BEZIER_CUTLINE); + } + break; + + case SID_BEZIER_DELETE: + if (!pSdrView->IsDeleteMarkedPointsPossible()) + { + rSet.DisableItem(SID_BEZIER_DELETE); + } + break; + + case SID_BEZIER_CONVERT: + if (!pSdrView->IsSetMarkedSegmentsKindPossible()) + { + rSet.DisableItem(SID_BEZIER_CONVERT); + } + else + { + SdrPathSegmentKind eSegm = pSdrView->GetMarkedSegmentsKind(); + switch (eSegm) + { + case SDRPATHSEGMENT_DONTCARE: rSet.InvalidateItem(SID_BEZIER_CONVERT); break; + case SDRPATHSEGMENT_LINE : rSet.Put(SfxBoolItem(SID_BEZIER_CONVERT,FALSE)); break; // Button reingedrueckt = Kurve + case SDRPATHSEGMENT_CURVE : rSet.Put(SfxBoolItem(SID_BEZIER_CONVERT,TRUE)); break; + } + } + break; + + case SID_BEZIER_EDGE: + case SID_BEZIER_SMOOTH: + case SID_BEZIER_SYMMTR: + if (!pSdrView->IsSetMarkedPointsSmoothPossible()) + rSet.DisableItem(nWhich); + else + { + SdrPathSmoothKind eSmooth = pSdrView->GetMarkedPointsSmooth(); + BOOL bEnable = FALSE; + switch (eSmooth) + { + case SDRPATHSMOOTH_DONTCARE : + break; + case SDRPATHSMOOTH_ANGULAR : + bEnable = nWhich == SID_BEZIER_EDGE; + break; + case SDRPATHSMOOTH_ASYMMETRIC: + bEnable = nWhich == SID_BEZIER_SMOOTH; + break; + case SDRPATHSMOOTH_SYMMETRIC : + bEnable = nWhich == SID_BEZIER_SYMMTR; + break; + } + rSet.Put(SfxBoolItem(nWhich, bEnable)); + } + break; + + case SID_BEZIER_CLOSE: + if (!pSdrView->IsOpenCloseMarkedObjectsPossible()) + { + rSet.DisableItem(SID_BEZIER_CLOSE); + } + else + { + SdrObjClosedKind eClose = pSdrView->GetMarkedObjectsClosedState(); + switch (eClose) + { + case SDROBJCLOSED_DONTCARE: rSet.InvalidateItem(SID_BEZIER_CLOSE); break; + case SDROBJCLOSED_OPEN : rSet.Put(SfxBoolItem(SID_BEZIER_CLOSE,FALSE)); break; + case SDROBJCLOSED_CLOSED : rSet.Put(SfxBoolItem(SID_BEZIER_CLOSE,TRUE)); break; + } + } + break; + + case SID_BEZIER_ELIMINATE_POINTS: + rSet.Put(SfxBoolItem(SID_BEZIER_ELIMINATE_POINTS, pSdrView->IsEliminatePolyPoints())); + break; + + default: + break; + } + nWhich = aIter.NextWhich(); + } +} + +/*------------------------------------------------------------------------ + + $Log: not supported by cvs2svn $ + Revision 1.21 2000/09/18 16:06:03 willem.vandorp + OpenOffice header added. + + Revision 1.20 2000/09/07 15:59:28 os + change: SFX_DISPATCHER/SFX_BINDINGS removed + + Revision 1.19 2000/05/26 07:21:32 os + old SW Basic API Slots removed + + Revision 1.18 2000/05/10 11:53:01 os + Basic API removed + + Revision 1.17 2000/04/18 14:58:23 os + UNICODE + + Revision 1.16 1997/11/29 14:51:26 MA + includes + + + Rev 1.15 29 Nov 1997 15:51:26 MA + includes + + Rev 1.14 24 Nov 1997 09:46:54 MA + includes + + Rev 1.13 03 Nov 1997 13:55:46 MA + precomp entfernt + + Rev 1.12 05 Sep 1997 12:02:00 MH + chg: header + + Rev 1.11 05 Aug 1997 16:18:42 TJ + include svx/srchitem.hxx + + Rev 1.10 01 Aug 1997 11:45:44 MH + chg: header + + Rev 1.9 08 Jul 1997 12:07:10 OM + Draw-Selektionsmodi aufgeraeumt + + Rev 1.8 16 Jun 1997 15:30:24 OM + GPF behoben: Backspace wie Delete behandeln + + Rev 1.7 07 Apr 1997 17:50:00 MH + chg: header + + Rev 1.6 21 Feb 1997 13:25:14 MA + #35942# Hack: CheckUnboundObjects + + Rev 1.5 23 Jan 1997 16:07:44 OM + Aufgeraeumt + + Rev 1.4 22 Jan 1997 11:20:48 OM + Neue Shells: DrawBaseShell und DrawControlShell + + Rev 1.3 16 Jan 1997 14:46:24 OM + Zweistufiges Escape + + Rev 1.2 14 Jan 1997 15:37:38 OM + Statusmethode fuer Bezier-Fkts + + Rev 1.1 13 Jan 1997 15:56:10 OM + Bezier-Punkte loeschen + + Rev 1.0 08 Jan 1997 12:46:44 OM + Initial revision. + +------------------------------------------------------------------------*/ + + diff --git a/sw/source/ui/shells/drawdlg.cxx b/sw/source/ui/shells/drawdlg.cxx new file mode 100644 index 0000000000..47a3f086ed --- /dev/null +++ b/sw/source/ui/shells/drawdlg.cxx @@ -0,0 +1,439 @@ +/************************************************************************* + * + * $RCSfile: drawdlg.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:46 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +#ifdef PRECOMPILED +#include "ui_pch.hxx" +#endif + +#pragma hdrstop + +#define ITEMID_COLOR_TABLE SID_COLOR_TABLE + + +#ifndef _SVX_SVXIDS_HRC //autogen +#include <svx/svxids.hrc> +#endif +#ifndef _MSGBOX_HXX //autogen +#include <vcl/msgbox.hxx> +#endif +#ifndef _SFXREQUEST_HXX //autogen +#include <sfx2/request.hxx> +#endif +#ifndef _OFF_APP_HXX //autogen +#include <offmgr/app.hxx> +#endif +#ifndef _SFXDISPATCH_HXX //autogen +#include <sfx2/dispatch.hxx> +#endif +#ifndef _SFX_BINDINGS_HXX //autogen +#include <sfx2/bindings.hxx> +#endif +#ifndef _SVDVIEW_HXX //autogen +#include <svx/svdview.hxx> +#endif +#ifndef _SVX_TEXTANIM_HXX //autogen +#include <svx/textanim.hxx> +#endif +#ifndef _SVX_TAB_AREA_HXX //autogen +#include <svx/tabarea.hxx> +#endif +#ifndef _SVX_TAB_LINE_HXX //autogen +#include <svx/tabline.hxx> +#endif +#ifndef _SVX_DRAWITEM_HXX //autogen +#include <svx/drawitem.hxx> +#endif + + +#include "view.hxx" +#include "wrtsh.hxx" +#include "docsh.hxx" +#include "cmdid.h" + +#include "drawsh.hxx" + + +/*-------------------------------------------------------------------- + Beschreibung: + --------------------------------------------------------------------*/ + + +void SwDrawShell::ExecDrawDlg(SfxRequest& rReq) +{ + SwWrtShell* pSh = &GetShell(); + SdrView* pView = pSh->GetDrawView(); + SdrModel* pDoc = pView->GetModel(); + Window* pWin = GetView().GetWindow(); + BOOL bChanged = pDoc->IsChanged(); + pDoc->SetChanged(FALSE); + + SfxItemSet aNewAttr( pDoc->GetItemPool() ); + pView->GetAttributes( aNewAttr ); + + GetView().NoRotate(); + + pSh->StartAction(); + + switch (rReq.GetSlot()) + { + case FN_DRAWTEXT_ATTR_DLG: + { + SvxTextTabDialog* pDlg = new SvxTextTabDialog( NULL, &aNewAttr , pView); + USHORT nResult = pDlg->Execute(); + + if (nResult == RET_OK) + { + if (pView->HasMarkedObj()) + pView->SetAttributes(*pDlg->GetOutputItemSet()); + } + delete( pDlg ); + } + break; + + case SID_ATTRIBUTES_AREA: + { + BOOL bHasMarked = pView->HasMarkedObj(); + + +#if SUPD>352 + SvxAreaTabDialog* pDlg = new SvxAreaTabDialog( NULL, &aNewAttr, pDoc, pView ); +#else + SvxAreaTabDialog* pDlg = new SvxAreaTabDialog( NULL, &aNewAttr, pDoc); +#endif + const SvxColorTableItem* pColorItem = (const SvxColorTableItem*) + GetView().GetDocShell()->GetItem(SID_COLOR_TABLE); + if(pColorItem->GetColorTable() == OFF_APP()->GetStdColorTable()) + pDlg->DontDeleteColorTable(); + if (pDlg->Execute() == RET_OK) + { + if (bHasMarked) + pView->SetAttributes(*pDlg->GetOutputItemSet()); + else + pView->SetDefaultAttr(*pDlg->GetOutputItemSet(), FALSE); + + static USHORT __READONLY_DATA aInval[] = + { + SID_ATTR_FILL_STYLE, SID_ATTR_FILL_COLOR, 0 + }; + SfxBindings &rBnd = GetView().GetViewFrame()->GetBindings(); + rBnd.Invalidate(aInval); + rBnd.Update(SID_ATTR_FILL_STYLE); + rBnd.Update(SID_ATTR_FILL_COLOR); + } + delete pDlg; + } + break; + + case SID_ATTRIBUTES_LINE: + { + BOOL bHasMarked = pView->HasMarkedObj(); + + const SdrObject* pObj = NULL; + const SdrMarkList& rMarkList = pView->GetMarkList(); + if( rMarkList.GetMarkCount() == 1 ) + pObj = rMarkList.GetMark(0)->GetObj(); + + SvxLineTabDialog* pDlg = new SvxLineTabDialog(NULL, &aNewAttr, + pDoc, pObj, bHasMarked); + + if (pDlg->Execute() == RET_OK) + { + if(bHasMarked) + pView->SetAttrToMarked(*pDlg->GetOutputItemSet(), FALSE); + else + pView->SetDefaultAttr(*pDlg->GetOutputItemSet(), FALSE); + + static USHORT __READONLY_DATA aInval[] = + { + SID_ATTR_LINE_STYLE, SID_ATTR_LINE_WIDTH, + SID_ATTR_LINE_COLOR, 0 + }; + + GetView().GetViewFrame()->GetBindings().Invalidate(aInval); + } + delete pDlg; + } + break; + + default: + break; + } + + pSh->EndAction(); + + if (pDoc->IsChanged()) + GetShell().SetModified(); + else + if (bChanged) + pDoc->SetChanged(TRUE); +} + +/*-------------------------------------------------------------------- + Beschreibung: + --------------------------------------------------------------------*/ + + +void SwDrawShell::ExecDrawAttrArgs(SfxRequest& rReq) +{ + SwWrtShell* pSh = &GetShell(); + SdrView* pView = pSh->GetDrawView(); + const SfxItemSet* pArgs = rReq.GetArgs(); + BOOL bChanged = pView->GetModel()->IsChanged(); + pView->GetModel()->SetChanged(FALSE); + + GetView().NoRotate(); + + if (pArgs) + { + if(pView->HasMarkedObj()) + pView->SetAttrToMarked(*rReq.GetArgs(), FALSE); + else + pView->SetDefaultAttr(*rReq.GetArgs(), FALSE); + } + else + { + SfxDispatcher* pDis = pSh->GetView().GetViewFrame()->GetDispatcher(); + switch (rReq.GetSlot()) + { + case SID_ATTR_FILL_STYLE: + case SID_ATTR_FILL_COLOR: + case SID_ATTR_FILL_GRADIENT: + case SID_ATTR_FILL_HATCH: + case SID_ATTR_FILL_BITMAP: + pDis->Execute(SID_ATTRIBUTES_AREA, FALSE); + break; + case SID_ATTR_LINE_STYLE: + case SID_ATTR_LINE_DASH: + case SID_ATTR_LINE_WIDTH: + case SID_ATTR_LINE_COLOR: + pDis->Execute(SID_ATTRIBUTES_LINE, FALSE); + break; + } + } + if (pView->GetModel()->IsChanged()) + GetShell().SetModified(); + else + if (bChanged) + pView->GetModel()->SetChanged(TRUE); +} + +/*-------------------------------------------------------------------- + Beschreibung: + --------------------------------------------------------------------*/ + + +void SwDrawShell::GetDrawAttrState(SfxItemSet& rSet) +{ + SdrView* pSdrView = GetShell().GetDrawView(); + + if (pSdrView->HasMarkedObj()) + { + BOOL bDisable = Disable( rSet ); + + if( !bDisable ) + pSdrView->GetAttributes( rSet ); + } + else + rSet.Put(pSdrView->GetDefaultAttr()); +} + +/************************************************************************* + + Source Code Control System - History + + $Log: not supported by cvs2svn $ + Revision 1.85 2000/09/18 16:06:03 willem.vandorp + OpenOffice header added. + + Revision 1.84 2000/09/07 15:59:28 os + change: SFX_DISPATCHER/SFX_BINDINGS removed + + Revision 1.83 2000/07/14 14:41:26 ama + Fix #75805#: Start/EndAction prevents from performanceproblems + + Revision 1.82 2000/05/26 07:21:32 os + old SW Basic API Slots removed + + Revision 1.81 2000/02/11 14:57:07 hr + #70473# changes for unicode ( patched by automated patchtool ) + + Revision 1.80 1999/06/21 13:20:24 JP + Interface changes: SdrView::GetAttributes + + + Rev 1.79 21 Jun 1999 15:20:24 JP + Interface changes: SdrView::GetAttributes + + Rev 1.78 29 Nov 1997 15:54:02 MA + includes + + Rev 1.77 24 Nov 1997 09:46:54 MA + includes + + Rev 1.76 02 Sep 1997 13:23:16 OS + includes + + Rev 1.75 01 Sep 1997 13:27:30 OS + DLL-Umstellung + + Rev 1.74 26 Aug 1997 16:13:08 TRI + VCL Anpassungen + + Rev 1.73 07 Apr 1997 17:42:54 MH + chg: header + + Rev 1.72 23 Jan 1997 10:45:50 OM + Neue Shells: Control- und DrawBaseShell + + Rev 1.71 22 Jan 1997 11:35:56 OM + Neuer Parameter fuer SvxAreaTabDialog + + Rev 1.70 22 Jan 1997 11:20:50 OM + Neue Shells: DrawBaseShell und DrawControlShell + + Rev 1.69 13 Jan 1997 15:56:10 OM + Bezier-Punkte loeschen + + Rev 1.68 08 Jan 1997 12:48:56 OM + Neue Segs + + Rev 1.67 08 Jan 1997 12:47:20 OM + Aenderungen fuer Bezier-Shell + + Rev 1.66 20 Dec 1996 13:22:18 MA + includes + + Rev 1.65 13 Dec 1996 12:19:10 OM + Bezier-Controller Status und Execute + + Rev 1.64 29 Nov 1996 10:57:42 OM + #33865# Fehlende Draw-Attribute gesetzt + + Rev 1.63 28 Nov 1996 16:32:32 OM + Malattribute nur ohne selektiertes Objekt als Default setzen + + Rev 1.62 28 Nov 1996 13:07:44 OM + #33823# Dok-Switch bei Draw-Dialogen unterbunden + + Rev 1.61 27 Nov 1996 16:15:08 OM + #33427# Zeichenobjekte: automatischer Layerwechsel je nach Umlaufart + + Rev 1.60 27 Nov 1996 10:05:18 OM + #33627# SetGeoAttr durch SetAttributes ersetzt + + Rev 1.59 19 Nov 1996 15:55:20 NF + clooks... + + Rev 1.58 15 Nov 1996 13:34:00 OS + SvxTextTabDialog angebunden + + Rev 1.57 08 Nov 1996 15:59:24 OM + Schuetzen neu organisiert, transparenz im Draw-Mode + + Rev 1.56 29 Oct 1996 17:21:48 OM + Abstaende auch im Drawmode + + Rev 1.55 23 Oct 1996 20:04:46 OM + Drawobjekt Textumfluss-Dlg + + Rev 1.54 23 Oct 1996 13:04:46 OS + DontDeleteColorTable am SvxAreaTabDialog ruen + + Rev 1.53 01 Oct 1996 16:54:00 OM + Hyperlinks editieren + + Rev 1.52 28 Aug 1996 15:55:02 OS + includes + + Rev 1.51 15 Aug 1996 13:44:20 JP + svdraw.hxx entfernt + + Rev 1.50 31 May 1996 11:01:36 NF + CLOOKS + + Rev 1.49 29 May 1996 13:05:26 OS + headerstop wieder vor den Win31-defines + + Rev 1.48 29 May 1996 09:49:00 TRI + CLOOKS + + Rev 1.47 21 May 1996 16:57:12 AMA + Fix: Start+EndAction nach dem DrawDialog. + + Rev 1.46 21 May 1996 08:50:42 NF + CLOOKS + + Rev 1.45 14 May 1996 15:17:06 HJS + CLOOKS + + Rev 1.44 10 May 1996 15:57:18 OS + Zeichenbindung an Drawobjekten + + Rev 1.43 30 Apr 1996 13:45:18 OS + veraenderter TransformDlg ab 315 + + Rev 1.42 07 Mar 1996 14:55:58 HJS + 2 defines zu viel + +*************************************************************************/ + + + diff --git a/sw/source/ui/shells/drawsh.cxx b/sw/source/ui/shells/drawsh.cxx new file mode 100644 index 0000000000..a31d5ab5ce --- /dev/null +++ b/sw/source/ui/shells/drawsh.cxx @@ -0,0 +1,640 @@ +/************************************************************************* + * + * $RCSfile: drawsh.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:46 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +#ifdef PRECOMPILED +#include "ui_pch.hxx" +#endif + +#pragma hdrstop + + +#ifndef _SVDVIEW_HXX //autogen +#include <svx/svdview.hxx> +#endif +#ifndef _SVDOTEXT_HXX //autogen +#include <svx/svdotext.hxx> +#endif +#ifndef _SFX_WHITER_HXX //autogen +#include <svtools/whiter.hxx> +#endif +#ifndef _SFXENUMITEM_HXX //autogen +#include <svtools/eitem.hxx> +#endif +#ifndef _SVX_FONTWORK_HXX //autogen +#include <svx/fontwork.hxx> +#endif +#ifndef _SFXREQUEST_HXX //autogen +#include <sfx2/request.hxx> +#endif +#ifndef _SFX_BINDINGS_HXX //autogen +#include <sfx2/bindings.hxx> +#endif +#ifndef _SFXOBJFACE_HXX //autogen +#include <sfx2/objface.hxx> +#endif +#ifndef _SFXITEMITER_HXX //autogen +#include <svtools/itemiter.hxx> +#endif +#ifndef _OFF_APP_HXX //autogen +#include <offmgr/app.hxx> +#endif +#ifndef _SVX_SRCHITEM_HXX +#include <svx/srchitem.hxx> +#endif +#ifndef _SVX_XFTSFIT_HXX //autogen +#include <svx/xftsfit.hxx> +#endif +#ifndef _SFXVIEWFRM_HXX +#include <sfx2/viewfrm.hxx> +#endif + + +#include "swundo.hxx" +#include "view.hxx" +#include "wrtsh.hxx" +#include "cmdid.h" +#include "globals.hrc" +#include "helpid.h" +#include "popup.hrc" +#include "shells.hrc" +#include "drwbassh.hxx" +#include "drawsh.hxx" + +#define SwDrawShell +#include "itemdef.hxx" +#include "swslots.hxx" + + +SFX_IMPL_INTERFACE(SwDrawShell, SwDrawBaseShell, SW_RES(STR_SHELLNAME_DRAW)) +{ + SFX_POPUPMENU_REGISTRATION(SW_RES(MN_DRAW_POPUPMENU)); + SFX_OBJECTBAR_REGISTRATION(SFX_OBJECTBAR_OBJECT, SW_RES(RID_DRAW_TOOLBOX)); + SFX_OBJECTMENU_REGISTRATION(SID_OBJECTMENU0, SW_RES(MN_OBJECTMENU_DRAW)); + SFX_CHILDWINDOW_REGISTRATION(SvxFontWorkChildWindow::GetChildWindowId()); +} + +TYPEINIT1(SwDrawShell,SwDrawBaseShell) + +/*-------------------------------------------------------------------- + Beschreibung: + --------------------------------------------------------------------*/ + + +void SwDrawShell::Execute(SfxRequest &rReq) +{ + SwWrtShell &rSh = GetShell(); + SdrView *pSdrView = rSh.GetDrawView(); + const SfxItemSet *pArgs = rReq.GetArgs(); + SfxBindings &rBnd = GetView().GetViewFrame()->GetBindings(); + USHORT nSlotId = rReq.GetSlot(); + BOOL bChanged = pSdrView->GetModel()->IsChanged(); + + pSdrView->GetModel()->SetChanged(FALSE); + + const SfxPoolItem* pItem; + if(pArgs) + pArgs->GetItemState(nSlotId, FALSE, &pItem); + + BOOL bMirror = TRUE, bTopParam = TRUE, bBottomParam = TRUE; + + switch (nSlotId) + { + case SID_OBJECT_ROTATE: + if (rSh.IsObjSelected() && pSdrView->IsRotateAllowed()) + { + if (GetView().IsDrawRotate()) + rSh.SetDragMode(SDRDRAG_MOVE); + else + rSh.SetDragMode(SDRDRAG_ROTATE); + + GetView().FlipDrawRotate(); + } + break; + + case SID_BEZIER_EDIT: + if (GetView().IsDrawRotate()) + { + rSh.SetDragMode(SDRDRAG_MOVE); + GetView().FlipDrawRotate(); + } + GetView().FlipDrawSelMode(); + pSdrView->SetFrameDragSingles(GetView().IsDrawSelMode()); + GetView().AttrChangedNotify(&rSh); // Shellwechsel... + break; + + case SID_OBJECT_HELL: + if (rSh.IsObjSelected()) + { + rSh.StartUndo( UNDO_START ); + SetWrapMode(FN_FRAME_WRAPTHRU_TRANSP); + rSh.SelectionToHell(); + rSh.EndUndo( UNDO_END ); + rBnd.Invalidate(SID_OBJECT_HEAVEN); + } + break; + + case SID_OBJECT_HEAVEN: + if (rSh.IsObjSelected()) + { + rSh.StartUndo( UNDO_START ); + SetWrapMode(FN_FRAME_WRAPTHRU); + rSh.SelectionToHeaven(); + rSh.EndUndo( UNDO_END ); + rBnd.Invalidate(SID_OBJECT_HELL); + } + break; + + case FN_TOOL_HIERARCHIE: + if (rSh.IsObjSelected()) + { + rSh.StartUndo( UNDO_START ); + if (rSh.GetLayerId() == 0) + { + SetWrapMode(FN_FRAME_WRAPTHRU); + rSh.SelectionToHeaven(); + } + else + { + SetWrapMode(FN_FRAME_WRAPTHRU_TRANSP); + rSh.SelectionToHell(); + } + rSh.EndUndo( UNDO_END ); + rBnd.Invalidate( SID_OBJECT_HELL, SID_OBJECT_HEAVEN, 0 ); + } + break; + + case FN_TOOL_VMIRROR: + bMirror = FALSE; + /* no break */ + case FN_TOOL_HMIRROR: + rSh.MirrorSelection( bMirror ); + break; + + case SID_FONTWORK: + { + SfxViewFrame* pVFrame = GetView().GetViewFrame(); + if (pArgs) + { + pVFrame->SetChildWindow(SvxFontWorkChildWindow::GetChildWindowId(), + ((const SfxBoolItem&)(pArgs->Get(SID_FONTWORK))).GetValue()); + } + else + pVFrame->ToggleChildWindow( SvxFontWorkChildWindow::GetChildWindowId() ); + pVFrame->GetBindings().Invalidate(SID_FONTWORK); + } + break; + + default: + DBG_ASSERT(!this, "falscher Dispatcher"); + return; + } + if (pSdrView->GetModel()->IsChanged()) + rSh.SetModified(); + else if (bChanged) + pSdrView->GetModel()->SetChanged(TRUE); +} + +/*-------------------------------------------------------------------- + Beschreibung: + --------------------------------------------------------------------*/ + + + +void SwDrawShell::GetState(SfxItemSet& rSet) +{ + SwWrtShell &rSh = GetShell(); + SdrView* pSdrView = rSh.GetDrawViewWithValidMarkList(); + SfxWhichIter aIter( rSet ); + USHORT nWhich = aIter.FirstWhich(); + BOOL bProtected = rSh.IsSelObjProtected(FLYPROTECT_CONTENT); + + if (!bProtected) // Im Parent nachsehen + bProtected |= rSh.IsSelObjProtected( (FlyProtectType)(FLYPROTECT_CONTENT|FLYPROTECT_PARENT) ) != 0; + + while( nWhich ) + { + switch( nWhich ) + { + case SID_OBJECT_HELL: + if ( !rSh.IsObjSelected() || rSh.GetLayerId() == 0 || bProtected ) + rSet.DisableItem( nWhich ); + break; + + case SID_OBJECT_HEAVEN: + if ( !rSh.IsObjSelected() || rSh.GetLayerId() == 1 || bProtected ) + rSet.DisableItem( nWhich ); + break; + + case FN_TOOL_HIERARCHIE: + if ( !rSh.IsObjSelected() || bProtected ) + rSet.DisableItem( nWhich ); + break; + + case SID_OBJECT_ROTATE: + { + const BOOL bIsRotate = GetView().IsDrawRotate(); + if ( !bIsRotate && !pSdrView->IsRotateAllowed() || bProtected ) + rSet.DisableItem( nWhich ); + else + rSet.Put( SfxBoolItem( nWhich, bIsRotate ) ); + } + break; + + case SID_BEZIER_EDIT: + if (!Disable(rSet, nWhich)) + rSet.Put( SfxBoolItem( nWhich, !GetView().IsDrawSelMode())); + break; + + case FN_TOOL_VMIRROR: + if ( !pSdrView->IsMirrorAllowed() || bProtected ) + rSet.DisableItem( nWhich ); + break; + + case FN_TOOL_HMIRROR: + if ( !pSdrView->IsMirrorAllowed() || bProtected ) + rSet.DisableItem( nWhich ); + break; + + case SID_FONTWORK: + { + if (bProtected) + rSet.DisableItem( nWhich ); + else + { + const USHORT nId = SvxFontWorkChildWindow::GetChildWindowId(); + rSet.Put(SfxBoolItem( nWhich , GetView().GetViewFrame()->HasChildWindow(nId))); + } + } + break; + } + nWhich = aIter.NextWhich(); + } +} + +/*-------------------------------------------------------------------- + Beschreibung: + --------------------------------------------------------------------*/ + + + +SwDrawShell::SwDrawShell(SwView &rView) : + SwDrawBaseShell(rView) +{ + SetHelpId(SW_DRAWSHELL); + SetName(String::CreateFromAscii("Draw")); +} + +/************************************************************************* +|* +|* SfxRequests fuer FontWork bearbeiten +|* +\************************************************************************/ + + + +void SwDrawShell::ExecFormText(SfxRequest& rReq) +{ + SwWrtShell &rSh = GetShell(); + SdrView* pDrView = rSh.GetDrawView(); + BOOL bChanged = pDrView->GetModel()->IsChanged(); + pDrView->GetModel()->SetChanged(FALSE); + + const SdrMarkList& rMarkList = pDrView->GetMarkList(); + + if ( rMarkList.GetMarkCount() == 1 && rReq.GetArgs() ) + { + const SfxItemSet& rSet = *rReq.GetArgs(); + const SfxPoolItem* pItem; + + if ( pDrView->IsTextEdit() ) + { + pDrView->EndTextEdit( TRUE ); + GetView().AttrChangedNotify(&rSh); + } + + if ( rSet.GetItemState(XATTR_FORMTXTSTDFORM, TRUE, &pItem) == + SFX_ITEM_SET && + ((const XFormTextStdFormItem*) pItem)->GetValue() != XFTFORM_NONE ) + { + + const USHORT nId = SvxFontWorkChildWindow::GetChildWindowId(); + + SvxFontWorkDialog* pDlg = (SvxFontWorkDialog*)(GetView().GetViewFrame()-> + GetChildWindow(nId)->GetWindow()); + + pDlg->CreateStdFormObj(*pDrView, *pDrView->GetPageViewPvNum(0), + rSet, *rMarkList.GetMark(0)->GetObj(), + ((const XFormTextStdFormItem*) pItem)-> + GetValue()); + + } + else + pDrView->SetAttributes(rSet); + } + if (pDrView->GetModel()->IsChanged()) + rSh.SetModified(); + else + if (bChanged) + pDrView->GetModel()->SetChanged(TRUE); +} + +/************************************************************************* +|* +|* Statuswerte fuer FontWork zurueckgeben +|* +\************************************************************************/ + + + +void SwDrawShell::GetFormTextState(SfxItemSet& rSet) +{ + SwWrtShell &rSh = GetShell(); + SdrView* pDrView = rSh.GetDrawView(); + const SdrMarkList& rMarkList = pDrView->GetMarkList(); + const SdrObject* pObj = NULL; + SvxFontWorkDialog* pDlg = NULL; + + const USHORT nId = SvxFontWorkChildWindow::GetChildWindowId(); + + SfxViewFrame* pVFrame = GetView().GetViewFrame(); + if ( pVFrame->HasChildWindow(nId) ) + pDlg = (SvxFontWorkDialog*)(pVFrame->GetChildWindow(nId)->GetWindow()); + + if ( rMarkList.GetMarkCount() == 1 ) + pObj = rMarkList.GetMark(0)->GetObj(); + + if ( pObj == NULL || !pObj->ISA(SdrTextObj) || + !((SdrTextObj*) pObj)->HasText() ) + { +#define XATTR_ANZ 12 + static const USHORT nXAttr[ XATTR_ANZ ] = + { + XATTR_FORMTXTSTYLE, XATTR_FORMTXTADJUST, XATTR_FORMTXTDISTANCE, + XATTR_FORMTXTSTART, XATTR_FORMTXTMIRROR, XATTR_FORMTXTSTDFORM, + XATTR_FORMTXTHIDEFORM, XATTR_FORMTXTOUTLINE, XATTR_FORMTXTSHADOW, + XATTR_FORMTXTSHDWCOLOR, XATTR_FORMTXTSHDWXVAL, XATTR_FORMTXTSHDWYVAL + }; + for( USHORT i = 0; i < XATTR_ANZ; ) + rSet.DisableItem( nXAttr[ i++ ] ); + } + else + { + if ( pDlg ) + pDlg->SetColorTable(OFF_APP()->GetStdColorTable()); + + pDrView->GetAttributes( rSet ); + } +} + +/************************************************************************* + + Source Code Control System - History + + $Log: not supported by cvs2svn $ + Revision 1.143 2000/09/18 16:06:03 willem.vandorp + OpenOffice header added. + + Revision 1.142 2000/09/08 08:12:51 os + Change: Set/Toggle/Has/Knows/Show/GetChildWindow + + Revision 1.141 2000/09/07 15:59:29 os + change: SFX_DISPATCHER/SFX_BINDINGS removed + + Revision 1.140 2000/05/26 07:21:32 os + old SW Basic API Slots removed + + Revision 1.139 2000/05/10 11:53:01 os + Basic API removed + + Revision 1.138 2000/04/18 14:58:23 os + UNICODE + + Revision 1.137 1999/06/21 13:20:24 JP + Interface changes: SdrView::GetAttributes + + + Rev 1.136 21 Jun 1999 15:20:24 JP + Interface changes: SdrView::GetAttributes + + Rev 1.135 12 Jan 1999 17:13:44 TJ + include + + Rev 1.134 11 Jan 1999 12:41:48 MA + #60294# Undo-Klammerung vervollstaendigt + + Rev 1.133 06 Oct 1998 12:44:58 JP + Bug #57153#: neu GetDrawViewWithValidMarkList + + Rev 1.132 10 Jun 1998 11:23:18 OM + Hell/Heaven nicht in FormShell + + Rev 1.131 15 Apr 1998 15:32:24 OM + #49467 Objekte innerhalb von geschuetzten Rahmen duerfen nicht veraendert werden + + Rev 1.130 29 Nov 1997 15:52:14 MA + includes + + Rev 1.129 24 Nov 1997 09:46:56 MA + includes + + Rev 1.128 03 Nov 1997 13:55:44 MA + precomp entfernt + + Rev 1.127 01 Sep 1997 13:23:04 OS + DLL-Umstellung + + Rev 1.126 05 Aug 1997 16:21:54 TJ + include svx/srchitem.hxx + + Rev 1.125 05 Aug 1997 13:29:54 MH + chg: header + + Rev 1.124 01 Aug 1997 11:47:18 MH + chg: header + + Rev 1.123 18 Jun 1997 18:10:34 HJS + Typeinit wieder hinein + + Rev 1.122 17 Jun 1997 16:15:18 MA + DrawTxtShell nicht von BaseShell ableiten + Opts + + Rev 1.121 13 May 1997 13:24:26 OM + Unnoetigen Include entfernt + + Rev 1.120 07 Apr 1997 17:41:54 MH + chg: header + + Rev 1.119 24 Feb 1997 16:53:08 OM + Silbentrennung in Draw-Objekten + + Rev 1.118 22 Jan 1997 14:40:30 OM + unnoetige Includes entfernt + + Rev 1.117 22 Jan 1997 11:20:50 OM + Neue Shells: DrawBaseShell und DrawControlShell + + Rev 1.116 16 Jan 1997 16:46:46 OM + Editmode on/off nur im richtigen Mode + + Rev 1.115 14 Jan 1997 15:37:58 OM + Beziermode korrigiert + + Rev 1.114 13 Jan 1997 15:56:10 OM + Bezier-Punkte loeschen + + Rev 1.113 13 Jan 1997 10:12:10 OM + Selektionsmode fuer Bezier-Objekte + + Rev 1.112 09 Jan 1997 16:24:02 OM + Selektionsmode fuer Bezier-Objekte + + Rev 1.111 08 Jan 1997 12:48:58 OM + Neue Segs + + Rev 1.110 08 Jan 1997 12:47:22 OM + Aenderungen fuer Bezier-Shell + + Rev 1.109 18 Dec 1996 15:47:28 OM + #34500# Keine Texteingabe im Drawmode + + Rev 1.108 13 Dec 1996 12:19:10 OM + Bezier-Controller Status und Execute + + Rev 1.107 11 Dec 1996 12:34:06 OM + Bezier-Controller + + Rev 1.106 30 Nov 1996 14:06:16 OS + Ausrichtung ueber Menue: EnumItem auswerten + + Rev 1.105 29 Nov 1996 17:02:48 OS + FN_TOOL_ANKER jetzt in der Baseshell + + Rev 1.104 27 Nov 1996 16:15:18 OM + #33427# Zeichenobjekte: automatischer Layerwechsel je nach Umlaufart + + Rev 1.103 26 Nov 1996 11:56:22 NF + defines entfernt... + + Rev 1.102 25 Nov 1996 10:55:28 OS + Slotumrechnung fuer SID_OBJECT_ALIGN entfernt + + Rev 1.101 18 Nov 1996 13:39:32 MA + chg: State fuer align + + Rev 1.100 15 Nov 1996 19:38:56 MA + opt, include + + Rev 1.99 11 Nov 1996 13:37:34 MA + ResMgr + + Rev 1.97 08 Nov 1996 11:59:20 HJS + include w.g. positivdefine + + Rev 1.96 07 Nov 1996 16:20:08 OS + Wrap- und Anker-Methoden an die BaseShell + + Rev 1.95 17 Oct 1996 14:35:18 MH + add: include + + Rev 1.94 01 Oct 1996 16:54:00 OM + Hyperlinks editieren + + Rev 1.93 28 Aug 1996 15:54:54 OS + includes + + Rev 1.92 23 Aug 1996 12:51:56 HJS + clooks + + Rev 1.91 22 Aug 1996 16:37:44 NF + clooks + + Rev 1.90 14 Aug 1996 19:33:06 JP + svdraw.hxx entfernt + + Rev 1.89 13 Aug 1996 12:38:42 OS + neue Shellnamen im IDL-Interface + + Rev 1.88 09 Aug 1996 15:15:04 OS + neu: ObjectName und Value an Controls + + Rev 1.87 02 Aug 1996 10:39:36 MH + Wer zum Teufel braucht sfxexp.hxx an dieser Stelle ? + Win16 jedenfalls nicht + + Rev 1.86 30 Jul 1996 16:43:02 OS + FN_TOOL_ANKER_PAGE wieder ohne Statusmethode + + Rev 1.85 27 Jul 1996 14:58:42 OS + Aenderungen fuer den Html-Mode + + Rev 1.84 24 Jul 1996 11:06:36 NF + defines in ifdef win geklammert... + + Rev 1.83 24 Jul 1996 09:13:04 NF + defines entfernt ... + + Rev 1.82 23 Jul 1996 14:33:28 NF + CLOOKS + +*************************************************************************/ + + + diff --git a/sw/source/ui/shells/drformsh.cxx b/sw/source/ui/shells/drformsh.cxx new file mode 100644 index 0000000000..ad41700f61 --- /dev/null +++ b/sw/source/ui/shells/drformsh.cxx @@ -0,0 +1,375 @@ +/************************************************************************* + * + * $RCSfile: drformsh.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:46 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +#ifdef PRECOMPILED +#include "ui_pch.hxx" +#endif + +#pragma hdrstop + +#include <hintids.hxx> +#ifndef _SVX_HLNKITEM_HXX //autogen +#include <svx/hlnkitem.hxx> +#endif +#ifndef _SVDVIEW_HXX //autogen +#include <svx/svdview.hxx> +#endif +#ifndef _SFX_WHITER_HXX //autogen +#include <svtools/whiter.hxx> +#endif +#ifndef _SFXREQUEST_HXX //autogen +#include <sfx2/request.hxx> +#endif +#ifndef _SFXOBJFACE_HXX //autogen +#include <sfx2/objface.hxx> +#endif +#ifndef _SFXAPP_HXX //autogen +#include <sfx2/app.hxx> +#endif +#ifndef _SVX_SRCHITEM_HXX +#include <svx/srchitem.hxx> +#endif +#ifndef _SVX_FMGLOB_HXX +#include <svx/fmglob.hxx> +#endif +#ifndef _SVDOUNO_HXX //autogen +#include <svx/svdouno.hxx> +#endif +#ifndef _COM_SUN_STAR_FORM_FORMBUTTONTYPE_HPP_ +#include <com/sun/star/form/FormButtonType.hpp> +#endif +#ifndef _SVX_HTMLMODE_HXX +#include <svx/htmlmode.hxx> +#endif +#ifndef _URLOBJ_HXX //autogen +#include <tools/urlobj.hxx> +#endif + +#include "viewopt.hxx" +#include "swmodule.hxx" +#include "wrtsh.hxx" +#include "cmdid.h" +#include "globals.hrc" +#include "helpid.h" +#include "popup.hrc" +#include "shells.hrc" +#include "drwbassh.hxx" +#include "drformsh.hxx" +#include "view.hxx" + +#define SwDrawFormShell +#include "itemdef.hxx" +#include "swslots.hxx" + +#define C2U(cChar) OUString::createFromAscii(cChar) + +using namespace ::com::sun::star; +using namespace ::rtl; + +SFX_IMPL_INTERFACE(SwDrawFormShell, SwDrawBaseShell, SW_RES(STR_SHELLNAME_DRAWFORM)) +{ + SFX_POPUPMENU_REGISTRATION(SW_RES(MN_DRAWFORM_POPUPMENU)); + SFX_OBJECTBAR_REGISTRATION(SFX_OBJECTBAR_OBJECT, SW_RES(RID_DRAWFORM_TOOLBOX)); + SFX_OBJECTMENU_REGISTRATION(SID_OBJECTMENU0, SW_RES(MN_OBJECTMENU_DRAWFORM)); +} + + +TYPEINIT1(SwDrawFormShell, SwDrawBaseShell) + + +void SwDrawFormShell::Execute(SfxRequest &rReq) +{ + SwWrtShell &rSh = GetShell(); + const SfxPoolItem* pItem = 0; + const SfxItemSet *pArgs = rReq.GetArgs(); + + switch ( rReq.GetSlot() ) + { + case SID_HYPERLINK_SETLINK: + { + if(pArgs) + pArgs->GetItemState(SID_HYPERLINK_SETLINK, sal_False, &pItem); + if(pItem) + { + SdrView *pSdrView = rSh.GetDrawView(); + const SvxHyperlinkItem& rHLinkItem = *(const SvxHyperlinkItem *)pItem; + const SdrMarkList& rMarkList = pSdrView->GetMarkList(); + if (rMarkList.GetMark(0)) + { + SdrUnoObj* pUnoCtrl = PTR_CAST(SdrUnoObj, rMarkList.GetMark(0)->GetObj()); + if (pUnoCtrl && FmFormInventor == pUnoCtrl->GetObjInventor()) + { + uno::Reference< awt::XControlModel > xControlModel = pUnoCtrl->GetUnoControlModel(); + + ASSERT( xControlModel.is(), "UNO-Control ohne Model" ); + if( !xControlModel.is() ) + return; + + uno::Reference< beans::XPropertySet > xPropSet(xControlModel, uno::UNO_QUERY); + + uno::Any aTmp; + + // Darf man eine URL an dem Objekt setzen? + uno::Reference< beans::XPropertySetInfo > xPropInfoSet = xPropSet->getPropertySetInfo(); + beans::Property aProp = xPropInfoSet->getPropertyByName( C2U("TargetURL" )); + if (aProp.Name.getLength()) + { + // Ja! + aTmp <<= OUString(rHLinkItem.GetName()); + xPropSet->setPropertyValue(C2U("Label"), aTmp ); + + aTmp <<= OUString(INetURLObject::RelToAbs(rHLinkItem.GetURL())); + xPropSet->setPropertyValue( C2U("TargetURL"), aTmp ); + + if( rHLinkItem.GetTargetFrame().Len() ) + { + aTmp <<= OUString(rHLinkItem.GetTargetFrame()); + xPropSet->setPropertyValue( C2U("TargetFrame"), aTmp ); + } + + + form::FormButtonType eButtonType = form::FormButtonType_URL; + aTmp.setValue( &eButtonType, ::getCppuType((const form::FormButtonType*)0)); + xPropSet->setPropertyValue( C2U("ButtonType"), aTmp ); + } + } + } + } + } + break; + + default: + DBG_ASSERT(!this, "falscher Dispatcher"); + return; + } +} + +void SwDrawFormShell::GetState(SfxItemSet& rSet) +{ + SwWrtShell &rSh = GetShell(); + SfxWhichIter aIter( rSet ); + sal_uInt16 nWhich = aIter.FirstWhich(); + + while( nWhich ) + { + switch( nWhich ) + { + case SID_HYPERLINK_GETLINK: + { + SdrView* pSdrView = rSh.GetDrawViewWithValidMarkList(); + const SdrMarkList& rMarkList = pSdrView->GetMarkList(); + SvxHyperlinkItem aHLinkItem; + if (rMarkList.GetMark(0)) + { + SdrUnoObj* pUnoCtrl = PTR_CAST(SdrUnoObj, rMarkList.GetMark(0)->GetObj()); + if (pUnoCtrl && FmFormInventor == pUnoCtrl->GetObjInventor()) + { + uno::Reference< awt::XControlModel > xControlModel = pUnoCtrl->GetUnoControlModel(); + + ASSERT( xControlModel.is(), "UNO-Control ohne Model" ); + if( !xControlModel.is() ) + return; + + uno::Reference< beans::XPropertySet > xPropSet(xControlModel, uno::UNO_QUERY); + + uno::Any aTmp; + uno::Reference< beans::XPropertySetInfo > xInfo = xPropSet->getPropertySetInfo(); + if(xInfo->hasPropertyByName(C2U("ButtonType" ))) + { + form::FormButtonType eButtonType = form::FormButtonType_URL; + aTmp = xPropSet->getPropertyValue( C2U("ButtonType") ); + if( aTmp.getValueType() == ::getCppuType((form::FormButtonType*)0) + && eButtonType == *( form::FormButtonType*)aTmp.getValue()) + { + // Label + if(xInfo->hasPropertyByName( C2U("Label") )) + { + aTmp = xPropSet->getPropertyValue( C2U("Label") ); + if( aTmp.getValueType() == ::getCppuType((const OUString*)0) ) + { + OUString sTmp = *(OUString*)aTmp.getValue(); + if(sTmp.getLength()) + aHLinkItem.SetName(sTmp); + } + } + + // URL + if(xInfo->hasPropertyByName( C2U("TargetURL" ))) + { + aTmp = xPropSet->getPropertyValue( C2U("TargetURL") ); + if( aTmp.getValueType() == ::getCppuType((const OUString*)0)) + { + OUString sTmp = *(OUString*)aTmp.getValue(); + if(sTmp.getLength()) + aHLinkItem.SetURL(sTmp); + } + } + + // Target + if(xInfo->hasPropertyByName( C2U("TargetFrame") )) + { + aTmp = xPropSet->getPropertyValue( C2U("TargetFrame") ); + if( aTmp.getValueType() == ::getCppuType((const OUString*)0)) + { + OUString sTmp = *(OUString*) aTmp.getValue(); + if(sTmp.getLength()) + aHLinkItem.SetTargetFrame(sTmp); + } + } + aHLinkItem.SetInsertMode(HLINK_BUTTON); + } + } + } + } + sal_uInt16 nHtmlMode = ::GetHtmlMode(GetView().GetDocShell()); + aHLinkItem.SetInsertMode((SvxLinkInsertMode)(aHLinkItem.GetInsertMode() | + ((nHtmlMode & HTMLMODE_ON) != 0 ? HLINK_HTMLMODE : 0))); + + rSet.Put(aHLinkItem); + } + break; + } + nWhich = aIter.NextWhich(); + } +} + + +SwDrawFormShell::SwDrawFormShell(SwView &rView) : + SwDrawBaseShell(rView) +{ + SetHelpId(SW_DRAWFORMSHELL); + GetShell().NoEdit(sal_True); + SetName(String::CreateFromAscii("DrawForm")); +} + +SwDrawFormShell::~SwDrawFormShell() +{ +} + +/************************************************************************* + + Source Code Control System - History + + $Log: not supported by cvs2svn $ + Revision 1.19 2000/09/18 16:06:03 willem.vandorp + OpenOffice header added. + + Revision 1.18 2000/05/26 07:21:32 os + old SW Basic API Slots removed + + Revision 1.17 2000/05/16 09:15:13 os + project usr removed + + Revision 1.16 2000/05/10 11:53:01 os + Basic API removed + + Revision 1.15 2000/04/18 14:58:23 os + UNICODE + + Revision 1.14 2000/03/23 07:49:14 os + UNO III + + Revision 1.13 2000/02/11 14:57:20 hr + #70473# changes for unicode ( patched by automated patchtool ) + + Revision 1.12 1999/11/19 16:40:24 os + modules renamed + + Revision 1.11 1999/09/24 14:38:32 os + hlnkitem.hxx now in SVX + + Revision 1.10 1999/03/29 08:31:06 OS + #64017# vor getPropertyValue immer hasPropertyByName rufen + + + Rev 1.9 29 Mar 1999 10:31:06 OS + #64017# vor getPropertyValue immer hasPropertyByName rufen + + Rev 1.8 26 Jan 1999 14:48:26 OS + #56371# TF_ONE51 + + Rev 1.7 26 Nov 1998 15:19:44 MA + #59896# Raster usw jetzt an der Application + + Rev 1.6 02 Nov 1998 09:22:10 MA + #58294# Slots fuer Raster + + Rev 1.5 07 Oct 1998 10:58:48 JP + Bug #57153#: in allen GetStates einer DrawShell die MarkListe aktualisieren + + Rev 1.4 07 Jul 1998 14:03:54 OM + #51853# URL-Button wiederbelebt + + Rev 1.3 06 Jul 1998 14:18:44 OM + #51853# URL-Button einfuegen + + Rev 1.2 19 May 1998 12:45:50 OM + SvxMacro-Umstellung + + Rev 1.1 08 Apr 1998 13:46:58 OM + #42505 Keine URL-Buttons in Html-Dokumenten + + Rev 1.0 11 Mar 1998 17:06:02 OM + Initial revision. + +*************************************************************************/ + + diff --git a/sw/source/ui/shells/drwbassh.cxx b/sw/source/ui/shells/drwbassh.cxx new file mode 100644 index 0000000000..8f1057b949 --- /dev/null +++ b/sw/source/ui/shells/drwbassh.cxx @@ -0,0 +1,762 @@ +/************************************************************************* + * + * $RCSfile: drwbassh.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:46 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +#ifdef PRECOMPILED +#include "ui_pch.hxx" +#endif + +#pragma hdrstop + +#include "hintids.hxx" + +#ifndef _SFXOBJFACE_HXX //autogen +#include <sfx2/objface.hxx> +#endif +#ifndef _SFXREQUEST_HXX //autogen +#include <sfx2/request.hxx> +#endif +#ifndef _SFX_BINDINGS_HXX //autogen +#include <sfx2/bindings.hxx> +#endif +#ifndef _AEITEM_HXX //autogen +#include <svtools/aeitem.hxx> +#endif +#ifndef _SVDVIEW_HXX //autogen +#include <svx/svdview.hxx> +#endif +#ifndef _MSGBOX_HXX //autogen +#include <vcl/msgbox.hxx> +#endif +#ifndef _SVX_SRCHITEM_HXX //autogen +#include <svx/srchitem.hxx> +#endif +#ifndef _SFX_WHITER_HXX //autogen +#include <svtools/whiter.hxx> +#endif +#ifndef _SVX_TRANSFRM_HXX //autogen +#include <svx/transfrm.hxx> +#endif +#ifndef _SVX_LABDLG_HXX //autogen +#include <svx/labdlg.hxx> +#endif +#ifndef _SVX_ANCHORID_HXX //autogen +#include <svx/anchorid.hxx> +#endif +#ifndef _SVX_HTMLMODE_HXX //autogen +#include <svx/htmlmode.hxx> +#endif +#ifndef _SFXVIEWFRM_HXX +#include <sfx2/viewfrm.hxx> +#endif + + +#ifndef _FMTORNT_HXX +#include <fmtornt.hxx> +#endif +#include "cmdid.h" +#include "wrtsh.hxx" +#include "view.hxx" +#include "edtwin.hxx" +#include "viewopt.hxx" +#include "dcontact.hxx" +#include "frmfmt.hxx" +#include "wrap.hxx" +#include "drawbase.hxx" +#include "drwbassh.hxx" + +#define SwDrawBaseShell +#include "itemdef.hxx" +#include "swslots.hxx" + +SFX_IMPL_INTERFACE(SwDrawBaseShell, SwBaseShell, SW_RES(0)) +{ +} + +TYPEINIT1(SwDrawBaseShell,SwBaseShell) + +/*-------------------------------------------------------------------- + Beschreibung: + --------------------------------------------------------------------*/ + + +SwDrawBaseShell::SwDrawBaseShell(SwView &rView): + SwBaseShell( rView ) +{ + GetShell().NoEdit(TRUE); + + SwEditWin& rWin = GetView().GetEditWin(); + + rWin.SetBezierMode(SID_BEZIER_MOVE); + + if ( !rView.GetDrawFuncPtr() ) + rView.GetEditWin().StdDrawMode(SID_OBJECT_SELECT); +} + +/*-------------------------------------------------------------------- + Beschreibung: + --------------------------------------------------------------------*/ + + +__EXPORT SwDrawBaseShell::~SwDrawBaseShell() +{ + GetView().ExitDraw(); + GetShell().Edit(); +} + +/*-------------------------------------------------------------------- + Beschreibung: + --------------------------------------------------------------------*/ + + +void SwDrawBaseShell::Execute(SfxRequest &rReq) +{ + SwWrtShell *pSh = &GetShell(); + SdrView* pSdrView = pSh->GetDrawView(); + const SfxItemSet *pArgs = rReq.GetArgs(); + USHORT nSlotId = rReq.GetSlot(); + BOOL bChanged = pSdrView->GetModel()->IsChanged(); + pSdrView->GetModel()->SetChanged(FALSE); + const SfxPoolItem* pItem = 0; + if(pArgs) + pArgs->GetItemState(nSlotId, FALSE, &pItem); + + //Sonderfall Align per Menue + if(pItem && nSlotId == SID_OBJECT_ALIGN) + { + DBG_ASSERT(PTR_CAST(SfxEnumItem, pItem),"SfxEnumItem erwartet") + nSlotId += ((const SfxEnumItem*)pItem)->GetValue(); + nSlotId++; + } + + BOOL bAlignPossible = pSh->IsAlignPossible(); + + BOOL bTopParam = TRUE, bBottomParam = TRUE; + BOOL bNotify = FALSE; + BOOL bDone = FALSE; + SfxBindings& rBind = GetView().GetViewFrame()->GetBindings(); + + switch (nSlotId) + { + case FN_DRAW_WRAP_DLG: + { + if(pSdrView->HasMarkedObj()) + { + const SfxItemSet* pArgs = rReq.GetArgs(); + + if(!pArgs) + { + const SdrMarkList& rMarkList = pSdrView->GetMarkList(); + if( rMarkList.GetMark(0) != 0 ) + { + SfxItemSet aSet(GetPool(), RES_SURROUND, RES_SURROUND, + RES_ANCHOR, RES_ANCHOR, + RES_LR_SPACE, RES_UL_SPACE, + SID_HTML_MODE, SID_HTML_MODE, + FN_DRAW_WRAP_DLG, FN_DRAW_WRAP_DLG, + 0); + + const SwViewOption* pVOpt = pSh->GetViewOptions(); + aSet.Put(SfxBoolItem(SID_HTML_MODE, + 0 != ::GetHtmlMode(pSh->GetView().GetDocShell()))); + + aSet.Put(SfxInt16Item(FN_DRAW_WRAP_DLG, pSh->GetLayerId())); + + pSh->GetObjAttr(aSet); + SwWrapDlg aDlg(GetView().GetWindow(), aSet, pSh, TRUE); + + if (aDlg.Execute() == RET_OK) + { + const SfxPoolItem* pItem; + const SfxItemSet* pOutSet = aDlg.GetOutputItemSet(); + if(SFX_ITEM_SET == pOutSet->GetItemState(FN_DRAW_WRAP_DLG, FALSE, &pItem)) + { + short nLayer = ((const SfxInt16Item*)pItem)->GetValue(); + if (nLayer == 1) + pSh->SelectionToHeaven(); + else + pSh->SelectionToHell(); + } + + pSh->SetObjAttr(*pOutSet); + } + } + } + } + } + break; + + case SID_ATTR_TRANSFORM: + { + if(pSdrView->HasMarkedObj()) + { + const SfxItemSet* pArgs = rReq.GetArgs(); + + if(!pArgs) + { + const SdrMarkList& rMarkList = pSdrView->GetMarkList(); + if( rMarkList.GetMark(0) != 0 ) + { + SdrObject* pObj = rMarkList.GetMark(0)->GetObj(); + SfxTabDialog *pDlg; + BOOL bCaption = FALSE; + + // Erlaubte Verankerungen: + USHORT nAnchor = pSh->GetAnchorId(); + USHORT nAllowedAnchors = SVX_OBJ_AT_CNTNT|SVX_OBJ_IN_CNTNT; + USHORT nHtmlMode = ::GetHtmlMode(pSh->GetView().GetDocShell()); + if( !((HTMLMODE_ON & nHtmlMode) && (0 == (nHtmlMode & HTMLMODE_SOME_ABS_POS))) ) + nAllowedAnchors |= SVX_OBJ_PAGE; + if ( pSh->IsFlyInFly() ) + nAllowedAnchors |= SVX_OBJ_AT_FLY; + + if (pObj->GetObjIdentifier() == OBJ_CAPTION ) + bCaption = TRUE; + + if (bCaption) + pDlg = new SvxCaptionTabDialog(NULL, pSdrView, nAllowedAnchors); + else + pDlg = new SvxTransformTabDialog(NULL, NULL, pSdrView, nAllowedAnchors); + + SfxItemSet aNewAttr(pSdrView->GetGeoAttrFromMarked()); + + const USHORT* pRange = pDlg->GetInputRanges( *aNewAttr.GetPool() ); + SfxItemSet aSet( *aNewAttr.GetPool(), pRange ); + aSet.Put( aNewAttr, FALSE ); + + if (bCaption) + pSdrView->GetAttributes( aSet ); + + aSet.Put(SfxUInt16Item(SID_ATTR_TRANSFORM_ANCHOR, nAnchor)); + + SwFrmFmt* pFrmFmt = FindFrmFmt( pObj ); + SwFmtVertOrient aVOrient((SwFmtVertOrient&)pFrmFmt->GetAttr(RES_VERT_ORIENT)); + USHORT nOrient = aVOrient.GetVertOrient(); + aSet.Put(SfxUInt16Item(SID_ATTR_TRANSFORM_VERT_ORIENT, nOrient)); + + pDlg->SetInputSet( &aSet ); + + if (pDlg->Execute() == RET_OK) + { + const SfxItemSet* pOutSet = pDlg->GetOutputItemSet(); + pSh->StartAllAction(); + pSdrView->SetGeoAttrToMarked(*pOutSet); + + if (bCaption) + pSdrView->SetAttributes(*pOutSet); + + BOOL bPosCorr = + SFX_ITEM_SET != pOutSet->GetItemState( + SID_ATTR_TRANSFORM_POS_X, FALSE ) && + SFX_ITEM_SET != pOutSet->GetItemState( + SID_ATTR_TRANSFORM_POS_Y, FALSE ); + + const SfxPoolItem* pItem; + if(SFX_ITEM_SET == pOutSet->GetItemState( + SID_ATTR_TRANSFORM_ANCHOR, FALSE, &pItem)) + pSh->ChgAnchor(((const SfxUInt16Item*)pItem) + ->GetValue(), FALSE, bPosCorr ); + + if( SFX_ITEM_SET == pOutSet->GetItemState( + SID_ATTR_TRANSFORM_VERT_ORIENT, FALSE, &pItem)) + { + aVOrient.SetVertOrient( (SwVertOrient) + ((const SfxUInt16Item*)pItem)->GetValue()); + pFrmFmt->SetAttr( aVOrient ); + } + + rBind.InvalidateAll(FALSE); + pSh->EndAllAction(); + } + delete pDlg; + } + } + } + } + break; + + case SID_DELETE: + case FN_BACKSPACE: + if (pSh->IsObjSelected() && !pSdrView->IsTextEdit()) + { + bDone = TRUE; + + if( GetView().IsDrawRotate() ) + { + pSh->SetDragMode( SDRDRAG_MOVE ); + GetView().FlipDrawRotate(); + } + + pSh->SetModified(); + pSh->DelSelectedObj(); + + if (rReq.IsAPI()) + { + // Wenn Basic-Aufruf, dann zurck in die Textshell, da das + // Basic sonst keine Rckkehrm”glichkeit hat. + if (GetView().GetDrawFuncPtr()) + { + GetView().GetDrawFuncPtr()->Deactivate(); + GetView().SetDrawFuncPtr(NULL); + } + GetView().LeaveDrawCreate(); // In Selektionsmode wechseln + } + + if (pSh->IsSelFrmMode()) + { + pSh->LeaveSelFrmMode(); + pSh->NoEdit(); + } + bNotify = TRUE; + } + break; + + case SID_GROUP: + if (pSh->IsObjSelected() > 1 && pSh->IsGroupAllowed()) + { + pSh->GroupSelection(); // Objekt gruppieren + rBind.Invalidate(SID_UNGROUP); + } + break; + + case SID_UNGROUP: + if (pSh->IsGroupSelected()) + { + pSh->UnGroupSelection(); // Objektgruppierung aufheben + rBind.Invalidate(SID_GROUP); + } + break; + + case SID_ENTER_GROUP: + if (pSh->IsGroupSelected()) + { + pSdrView->EnterMarkedGroup(); + rBind.InvalidateAll(FALSE); + } + break; + + case SID_LEAVE_GROUP: + if (pSdrView->IsGroupEntered()) + { + pSdrView->LeaveOneGroup(); + rBind.Invalidate(SID_ENTER_GROUP); + rBind.Invalidate(SID_UNGROUP); + } + break; + + case SID_OBJECT_ALIGN_LEFT: + case SID_OBJECT_ALIGN_CENTER: + case SID_OBJECT_ALIGN_RIGHT: + case SID_OBJECT_ALIGN_UP: + case SID_OBJECT_ALIGN_MIDDLE: + case SID_OBJECT_ALIGN_DOWN: + { + if ( bAlignPossible ) + { + const SdrMarkList& rMarkList = pSdrView->GetMarkList(); + if( rMarkList.GetMarkCount() == 1 && bAlignPossible ) + { // Objekte nicht aneinander ausrichten + + USHORT nAnchor = pSh->GetAnchorId(); + if (nAnchor == FLY_IN_CNTNT) + { + int nVertOrient = -1; + + switch (nSlotId) + { + case SID_OBJECT_ALIGN_UP: + nVertOrient = SVX_VERT_TOP; + break; + case SID_OBJECT_ALIGN_MIDDLE: + nVertOrient = SVX_VERT_CENTER; + break; + case SID_OBJECT_ALIGN_DOWN: + nVertOrient = SVX_VERT_BOTTOM; + break; + default: + break; + } + if (nVertOrient != -1) + { + pSh->StartAction(); + SdrObject* pObj = rMarkList.GetMark(0)->GetObj(); + SwFrmFmt* pFrmFmt = FindFrmFmt( pObj ); + SwFmtVertOrient aVOrient((SwFmtVertOrient&)pFrmFmt->GetAttr(RES_VERT_ORIENT)); + aVOrient.SetVertOrient((SwVertOrient)nVertOrient); + pFrmFmt->SetAttr(aVOrient); + pSh->EndAction(); + } + break; + } + if (nAnchor == FLY_AT_CNTNT) + break; // Absatzverankerte Rahmen nicht ausrichten + } + + pSh->StartAction(); + switch (nSlotId) + { + case SID_OBJECT_ALIGN_LEFT: + pSdrView->AlignMarkedObjects(SDRHALIGN_LEFT, SDRVALIGN_NONE); + break; + case SID_OBJECT_ALIGN_CENTER: + pSdrView->AlignMarkedObjects(SDRHALIGN_CENTER, SDRVALIGN_NONE); + break; + case SID_OBJECT_ALIGN_RIGHT: + pSdrView->AlignMarkedObjects(SDRHALIGN_RIGHT, SDRVALIGN_NONE); + break; + case SID_OBJECT_ALIGN_UP: + pSdrView->AlignMarkedObjects(SDRHALIGN_NONE, SDRVALIGN_TOP); + break; + case SID_OBJECT_ALIGN_MIDDLE: + pSdrView->AlignMarkedObjects(SDRHALIGN_NONE, SDRVALIGN_CENTER); + break; + case SID_OBJECT_ALIGN_DOWN: + pSdrView->AlignMarkedObjects(SDRHALIGN_NONE, SDRVALIGN_BOTTOM); + break; + } + pSh->EndAction(); + } + } + break; + + case FN_FRAME_UP: + bTopParam = FALSE; + /* no break */ + case SID_FRAME_TO_TOP: + pSh->SelectionToTop( bTopParam ); + break; + + case FN_FRAME_DOWN: + bBottomParam = FALSE; + /* no break */ + case SID_FRAME_TO_BOTTOM: + pSh->SelectionToBottom( bBottomParam ); + break; + + default: + DBG_ASSERT(!this, "falscher Dispatcher"); + return; + } + if(!bDone) + { + if(nSlotId >= SID_OBJECT_ALIGN_LEFT && nSlotId <= SID_OBJECT_ALIGN_DOWN) + rBind.Invalidate(SID_ATTR_LONG_LRSPACE); + if (pSdrView->GetModel()->IsChanged()) + pSh->SetModified(); + else if (bChanged) + pSdrView->GetModel()->SetChanged(TRUE); + // 40220: Nach dem Loeschen von DrawObjekten ueber die API GPF durch Selbstzerstoerung + if(bNotify) + GetView().AttrChangedNotify(pSh); // ggf Shellwechsel... + } +} + +/*-------------------------------------------------------------------- + Beschreibung: + --------------------------------------------------------------------*/ + + +void SwDrawBaseShell::GetState(SfxItemSet& rSet) +{ + SwWrtShell &rSh = GetShell(); + SdrView* pSdrView = rSh.GetDrawViewWithValidMarkList(); + SfxWhichIter aIter( rSet ); + USHORT nWhich = aIter.FirstWhich(); + BOOL bProtected = rSh.IsSelObjProtected(FLYPROTECT_CONTENT); + + if (!bProtected) // Im Parent nachsehen + bProtected |= rSh.IsSelObjProtected( (FlyProtectType)(FLYPROTECT_CONTENT|FLYPROTECT_PARENT) ) != 0; + + while( nWhich ) + { + switch( nWhich ) + { + case FN_DRAW_WRAP_DLG: + case SID_ATTR_TRANSFORM: + case SID_FRAME_TO_TOP: + case SID_FRAME_TO_BOTTOM: + case FN_FRAME_UP: + case FN_FRAME_DOWN: + case SID_DELETE: + case FN_BACKSPACE: + if (bProtected) + rSet.DisableItem( nWhich ); + break; + case SID_GROUP: + if ( rSh.IsObjSelected() < 2 || bProtected || !rSh.IsGroupAllowed() ) + rSet.DisableItem( nWhich ); + break; + case SID_UNGROUP: + if ( !rSh.IsGroupSelected() || bProtected ) + rSet.DisableItem( nWhich ); + break; + case SID_ENTER_GROUP: + if ( !rSh.IsGroupSelected() ) + rSet.DisableItem( nWhich ); + break; + case SID_LEAVE_GROUP: + if ( !pSdrView->IsGroupEntered() ) + rSet.DisableItem( nWhich ); + break; + case SID_OBJECT_ALIGN_LEFT: + case SID_OBJECT_ALIGN_CENTER: + case SID_OBJECT_ALIGN_RIGHT: + case SID_OBJECT_ALIGN_UP: + case SID_OBJECT_ALIGN_MIDDLE: + case SID_OBJECT_ALIGN_DOWN: + case SID_OBJECT_ALIGN: + if ( !rSh.IsAlignPossible() || bProtected ) + rSet.DisableItem( nWhich ); + else + { + rSet.Put(SfxAllEnumItem(nWhich, USHRT_MAX)); + } + break; + } + nWhich = aIter.NextWhich(); + } +} + +/*-------------------------------------------------------------------- + Beschreibung: + --------------------------------------------------------------------*/ + + +BOOL SwDrawBaseShell::Disable(SfxItemSet& rSet, USHORT nWhich) +{ + BOOL bDisable = GetShell().IsSelObjProtected(FLYPROTECT_CONTENT); + + if (bDisable) + { + if (nWhich) + rSet.DisableItem( nWhich ); + else + { + SfxWhichIter aIter( rSet ); + nWhich = aIter.FirstWhich(); + while (nWhich) + { + rSet.DisableItem( nWhich ); + nWhich = aIter.NextWhich(); + } + } + } + + return bDisable; +} + +/*------------------------------------------------------------------------ + + $Log: not supported by cvs2svn $ + Revision 1.49 2000/09/18 16:06:03 willem.vandorp + OpenOffice header added. + + Revision 1.48 2000/09/07 15:59:29 os + change: SFX_DISPATCHER/SFX_BINDINGS removed + + Revision 1.47 2000/08/10 16:34:18 jp + Bug #77310#: don't call a method with a zero pointer + + Revision 1.46 2000/05/29 16:40:53 jp + Bug #69159#: delete selection reset the rotate mode + + Revision 1.45 2000/05/26 07:21:32 os + old SW Basic API Slots removed + + Revision 1.44 2000/05/10 11:53:01 os + Basic API removed + + Revision 1.43 2000/02/11 14:57:25 hr + #70473# changes for unicode ( patched by automated patchtool ) + + Revision 1.42 1999/06/21 13:20:24 JP + Interface changes: SdrView::GetAttributes + + + Rev 1.41 21 Jun 1999 15:20:24 JP + Interface changes: SdrView::GetAttributes + + Rev 1.40 07 Oct 1998 10:58:48 JP + Bug #57153#: in allen GetStates einer DrawShell die MarkListe aktualisieren + + Rev 1.39 06 Jul 1998 18:10:14 OM + Images zum gruppieren + + Rev 1.38 06 Jul 1998 16:09:54 OM + #52065# Gruppe verlassen bei Beendigung der DrawShell + + Rev 1.37 03 Jul 1998 16:28:48 OM + #51420# Nur erlaubte Verankerungsarten im PositionsDialog + + Rev 1.36 01 Jul 1998 12:13:44 OM + #51323# Zeichengebundene Objekte nicht gruppieren + + Rev 1.35 16 Jun 1998 13:03:32 OM + Gruppenobjekte per Ctrl selektieren + + Rev 1.34 12 Jun 1998 16:08:56 OM + Gruppierung betreten/verlassen + + Rev 1.33 12 Jun 1998 13:34:02 OM + Wieder SID_OBJECT_SELECT statt SID_DRAW_SELECT + + Rev 1.32 11 Jun 1998 16:13:14 OM + Gruppierungsmenue + + Rev 1.31 10 Jun 1998 11:23:18 OM + Hell/Heaven nicht in FormShell + + Rev 1.30 09 Jun 1998 15:36:00 OM + VC-Controls entfernt + + Rev 1.29 22 May 1998 15:19:06 OS + wird ein DrawObject geloescht, darf nicht mehr auf this zugegriffen werden + + Rev 1.28 15 May 1998 16:22:02 OM + #49467# Geschtzte Rahmen nicht bearbeiten + + Rev 1.27 15 Apr 1998 15:32:24 OM + #49467 Objekte innerhalb von geschuetzten Rahmen duerfen nicht veraendert werden + + Rev 1.26 29 Nov 1997 15:51:24 MA + includes + + Rev 1.25 24 Nov 1997 09:46:58 MA + includes + + Rev 1.24 20 Oct 1997 12:45:06 OM + Kein Legenden-Dialog bei URL-Buttons + + Rev 1.23 20 Oct 1997 12:15:18 OM + #44751# Umankern auch bei Legendenobjekten + + Rev 1.22 15 Oct 1997 13:00:06 AMA + Fix #44651#: Umankern mit gleichzeitiger Positionsaenderung + + Rev 1.21 05 Sep 1997 12:04:22 MH + chg: header + + Rev 1.20 02 Sep 1997 13:23:16 OS + includes + + Rev 1.19 16 Aug 1997 12:59:54 OS + include + + Rev 1.18 05 Aug 1997 16:23:12 TJ + include svx/srchitem.hxx + + Rev 1.17 01 Aug 1997 11:47:18 MH + chg: header + + Rev 1.16 10 Jul 1997 17:27:44 MA + #41589# nicht die dontcare verlieren, damit auch GPF umpopeln + + Rev 1.15 08 Jul 1997 12:16:26 OM + Draw-Selektionsmodi aufgeraeumt + + Rev 1.14 08 Jul 1997 12:07:10 OM + Draw-Selektionsmodi aufgeraeumt + + Rev 1.13 25 Jun 1997 13:34:18 OM + #40966# DrawBaseShell-Ptr wieder eingefuehrt + + Rev 1.12 25 Jun 1997 09:10:18 MA + #40965#, SubShell abmelden + + Rev 1.11 17 Jun 1997 15:52:52 MA + DrawTxtShell nicht von BaseShell ableiten + Opts + + Rev 1.10 16 Jun 1997 15:31:56 OM + GPF behoben: Backspace wie Delete behandeln + + Rev 1.9 27 May 1997 16:39:24 OM + Zeichengebundene Zeichenobjekte korrekt ausrichten + + Rev 1.8 27 May 1997 12:52:46 OS + AttrChangedNotify erst am Ende des ::Execute rufen #40220# + + Rev 1.7 30 Apr 1997 11:34:50 MA + #39469# erstmal GPF umpopelt + + Rev 1.6 07 Apr 1997 17:43:34 MH + chg: header + + Rev 1.5 02 Apr 1997 21:42:20 MH + chg: header SfxDialoge + + Rev 1.4 19 Mar 1997 11:54:26 OM + #37302# Shellwechsel nach Basic-Delete ausloesen + + Rev 1.3 27 Jan 1997 16:31:04 OS + HtmlMode entfernt + + Rev 1.2 23 Jan 1997 10:45:52 OM + Neue Shells: Control- und DrawBaseShell + + Rev 1.1 22 Jan 1997 14:40:32 OM + unnoetige Includes entfernt + + Rev 1.0 22 Jan 1997 11:23:24 OM + Initial revision. + +------------------------------------------------------------------------*/ + + + diff --git a/sw/source/ui/shells/drwtxtex.cxx b/sw/source/ui/shells/drwtxtex.cxx new file mode 100644 index 0000000000..3738dddf25 --- /dev/null +++ b/sw/source/ui/shells/drwtxtex.cxx @@ -0,0 +1,1021 @@ +/************************************************************************* + * + * $RCSfile: drwtxtex.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:46 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifdef PRECOMPILED +#include "ui_pch.hxx" +#endif + +#pragma hdrstop + +#include "hintids.hxx" + +#ifndef _SVDVIEW_HXX //autogen +#include <svx/svdview.hxx> +#endif +#ifndef _SVX_SPLTITEM_HXX //autogen +#include <svx/spltitem.hxx> +#endif +#ifndef _SVX_ORPHITEM_HXX //autogen +#include <svx/orphitem.hxx> +#endif +#ifndef _SVX_BRKITEM_HXX //autogen +#include <svx/brkitem.hxx> +#endif +#ifndef _SVX_WIDWITEM_HXX //autogen +#include <svx/widwitem.hxx> +#endif +#ifndef _SVX_BRKITEM_HXX //autogen +#include <svx/brkitem.hxx> +#endif +#ifndef _SVX_KERNITEM_HXX //autogen +#include <svx/kernitem.hxx> +#endif +#ifndef _SVX_ESCPITEM_HXX //autogen +#include <svx/escpitem.hxx> +#endif +#ifndef _SVX_PARAITEM_HXX //autogen +#include <svx/lspcitem.hxx> +#endif +#ifndef _SVX_ADJITEM_HXX //autogen +#include <svx/adjitem.hxx> +#endif +#ifndef _SVX_CRSDITEM_HXX //autogen +#include <svx/crsditem.hxx> +#endif +#ifndef _SVX_SHDDITEM_HXX //autogen +#include <svx/shdditem.hxx> +#endif +#ifndef _SVX_HYZNITEM_HXX //autogen +#include <svx/hyznitem.hxx> +#endif +#ifndef _SVX_UDLNITEM_HXX //autogen +#include <svx/udlnitem.hxx> +#endif +#ifndef _SVX_FONTITEM_HXX //autogen +#include <svx/fontitem.hxx> +#endif +#ifndef _SVX_FHGTITEM_HXX //autogen +#include <svx/fhgtitem.hxx> +#endif +#ifndef _SVX_COLRITEM_HXX //autogen +#include <svx/colritem.hxx> +#endif +#ifndef _SVX_WGHTITEM_HXX //autogen +#include <svx/wghtitem.hxx> +#endif +#ifndef _SVX_CNTRITEM_HXX //autogen +#include <svx/cntritem.hxx> +#endif +#ifndef _SVX_POSTITEM_HXX //autogen +#include <svx/postitem.hxx> +#endif +#ifndef _SVDOUTL_HXX +#include <svx/svdoutl.hxx> +#endif +#ifndef _SFXVIEWFRM_HXX +#include <sfx2/viewfrm.hxx> +#endif +#ifndef _SFX_WHITER_HXX //autogen +#include <svtools/whiter.hxx> +#endif +#ifndef _SFX_BINDINGS_HXX //autogen +#include <sfx2/bindings.hxx> +#endif +#ifndef _MSGBOX_HXX //autogen +#include <vcl/msgbox.hxx> +#endif +#ifndef _SFX_SAVEOPT_HXX //autogen +#include <sfx2/saveopt.hxx> +#endif +#ifndef _SFXDISPATCH_HXX //autogen +#include <sfx2/dispatch.hxx> +#endif +#ifndef _SFXREQUEST_HXX //autogen +#include <sfx2/request.hxx> +#endif +#ifndef _SVX_FLDITEM_HXX +# ifndef ITEMID_FIELD +# ifndef _MyEDITDATA_HXX //autogen +# include <svx/editdata.hxx> // das include wird wg. EE_FEATURE_FIELD benoetigt +# endif +# define ITEMID_FIELD EE_FEATURE_FIELD /* wird fuer #include <flditem.hxx> benoetigt */ +# endif +# ifndef _SVX_FLDITEM_HXX //autogen +# include <svx/flditem.hxx> +# endif +#endif +#ifndef _EDITSTAT_HXX //autogen +#include <svx/editstat.hxx> +#endif +#ifndef _OUTLINER_HXX //autogen +#include <svx/outliner.hxx> +#endif +#ifndef _SVX_HLNKITEM_HXX //autogen +#include <svx/hlnkitem.hxx> +#endif +#ifndef _SVX_HTMLMODE_HXX +#include <svx/htmlmode.hxx> +#endif + +#ifndef _SVX_LANGITEM_HXX +#include <svx/langitem.hxx> +#endif +#ifndef _UNO_LINGU_HXX +#include <svx/unolingu.hxx> +#endif + +#include "doc.hxx" + +#ifndef _COM_SUN_STAR_LINGUISTIC_XTHESAURUS_HPP_ +#include <com/sun/star/linguistic/XThesaurus.hpp> +#endif + +#include "wview.hxx" +#include "viewopt.hxx" +#include "wrtsh.hxx" +#include "uiparam.hxx" +#include "uitool.hxx" +#include "cmdid.h" +#include "globals.hrc" +#include "shells.hrc" +#include "chrdlg.hxx" +#include "pardlg.hxx" +#include "dataex.hxx" +#include "drwtxtsh.hxx" +#include "swmodule.hxx" +#include "initui.hxx" // fuer SpellPointer + +using namespace ::com::sun::star; + +/*-------------------------------------------------------------------- + Beschreibung: + --------------------------------------------------------------------*/ + + + +void SwDrawTextShell::Execute(SfxRequest &rReq) +{ + SwWrtShell &rSh = GetShell(); + + SfxItemSet aEditAttr(pOLV->GetAttribs()); + SfxItemSet aNewAttr(*(aEditAttr.GetPool()), aEditAttr.GetRanges()); + + sal_uInt16 nSlot = rReq.GetSlot(); + sal_uInt16 nWhich = GetPool().GetWhich(nSlot); + const SfxItemSet *pNewAttrs = rReq.GetArgs(); + + switch (nSlot) + { + case SID_ATTR_CHAR_FONT: + case SID_ATTR_CHAR_FONTHEIGHT: + case SID_ATTR_CHAR_COLOR: + { + if (!pNewAttrs) + rSh.GetView().GetViewFrame()->GetDispatcher()->Execute(SID_CHAR_DLG, sal_False); + else + { + switch (nSlot) + { + case SID_ATTR_CHAR_FONT: + aNewAttr.Put(((const SvxFontItem&)pNewAttrs->Get(nWhich)), EE_CHAR_FONTINFO); + break; + case SID_ATTR_CHAR_FONTHEIGHT: + aNewAttr.Put(((const SvxFontHeightItem&)pNewAttrs->Get(nWhich)), EE_CHAR_FONTHEIGHT); + break; + case SID_ATTR_CHAR_COLOR: + aNewAttr.Put(((const SvxColorItem&)pNewAttrs->Get(nWhich)), EE_CHAR_COLOR); + break; + } + } + } + break; + + case SID_ATTR_CHAR_WEIGHT: + { + FontWeight eFW = ((const SvxWeightItem&)aEditAttr.Get(EE_CHAR_WEIGHT)).GetWeight(); + aNewAttr.Put(SvxWeightItem(eFW == WEIGHT_NORMAL ? WEIGHT_BOLD : WEIGHT_NORMAL, EE_CHAR_WEIGHT)); + } + break; + + case SID_ATTR_CHAR_POSTURE: + { + FontItalic eFI = ((const SvxPostureItem&)aEditAttr.Get(EE_CHAR_ITALIC)).GetPosture(); + aNewAttr.Put(SvxPostureItem(eFI == ITALIC_NORMAL ? ITALIC_NONE : ITALIC_NORMAL, EE_CHAR_ITALIC)); + } + break; + + case SID_ATTR_CHAR_UNDERLINE: + { + FontUnderline eFU = ((const SvxUnderlineItem&)aEditAttr.Get(EE_CHAR_UNDERLINE)).GetUnderline(); + aNewAttr.Put(SvxUnderlineItem(eFU == UNDERLINE_SINGLE ? UNDERLINE_NONE : UNDERLINE_SINGLE, EE_CHAR_UNDERLINE)); + } + break; + + case SID_ATTR_CHAR_CONTOUR: + aNewAttr.Put((const SvxContourItem&)pNewAttrs->Get(nWhich), EE_CHAR_OUTLINE); + break; + case SID_ATTR_CHAR_SHADOWED: + aNewAttr.Put((const SvxShadowedItem&)pNewAttrs->Get(nWhich), EE_CHAR_SHADOW); + break; + case SID_ATTR_CHAR_STRIKEOUT: + aNewAttr.Put((const SvxCrossedOutItem&)pNewAttrs->Get(nWhich), EE_CHAR_STRIKEOUT); + break; + + case SID_ATTR_PARA_ADJUST_LEFT: + aNewAttr.Put(SvxAdjustItem(SVX_ADJUST_LEFT, EE_PARA_JUST)); + break; + case SID_ATTR_PARA_ADJUST_CENTER: + aNewAttr.Put(SvxAdjustItem(SVX_ADJUST_CENTER, EE_PARA_JUST)); + break; + case SID_ATTR_PARA_ADJUST_RIGHT: + aNewAttr.Put(SvxAdjustItem(SVX_ADJUST_RIGHT, EE_PARA_JUST)); + break; + case SID_ATTR_PARA_ADJUST_BLOCK: + aNewAttr.Put(SvxAdjustItem(SVX_ADJUST_BLOCK, EE_PARA_JUST)); + break; + + case SID_ATTR_PARA_LINESPACE_10: + { + SvxLineSpacingItem aItem(SVX_LINESPACE_ONE_LINE, EE_PARA_SBL); + aItem.SetPropLineSpace(100); + aNewAttr.Put(aItem); + } + break; + case SID_ATTR_PARA_LINESPACE_15: + { + SvxLineSpacingItem aItem(SVX_LINESPACE_ONE_POINT_FIVE_LINES, EE_PARA_SBL); + aItem.SetPropLineSpace(150); + aNewAttr.Put(aItem); + } + break; + case SID_ATTR_PARA_LINESPACE_20: + { + SvxLineSpacingItem aItem(SVX_LINESPACE_TWO_LINES, EE_PARA_SBL); + aItem.SetPropLineSpace(200); + aNewAttr.Put(aItem); + } + break; + + case FN_SET_SUPER_SCRIPT: + { + SvxEscapementItem aItem(EE_CHAR_ESCAPEMENT); + SvxEscapement eEsc = (SvxEscapement ) ( (const SvxEscapementItem&) + aEditAttr.Get( EE_CHAR_ESCAPEMENT ) ).GetEnumValue(); + + if( eEsc == SVX_ESCAPEMENT_SUPERSCRIPT ) + aItem.SetEscapement( SVX_ESCAPEMENT_OFF ); + else + aItem.SetEscapement( SVX_ESCAPEMENT_SUPERSCRIPT ); + aNewAttr.Put( aItem, EE_CHAR_ESCAPEMENT ); + } + break; + case FN_SET_SUB_SCRIPT: + { + SvxEscapementItem aItem(EE_CHAR_ESCAPEMENT); + SvxEscapement eEsc = (SvxEscapement ) ( (const SvxEscapementItem&) + aEditAttr.Get( EE_CHAR_ESCAPEMENT ) ).GetEnumValue(); + + if( eEsc == SVX_ESCAPEMENT_SUBSCRIPT ) + aItem.SetEscapement( SVX_ESCAPEMENT_OFF ); + else + aItem.SetEscapement( SVX_ESCAPEMENT_SUBSCRIPT ); + aNewAttr.Put( aItem, EE_CHAR_ESCAPEMENT ); + } + break; + + case SID_CHAR_DLG: + { + const SfxItemSet* pArgs = rReq.GetArgs(); + + if( !pArgs ) + { + SwView* pView = &GetView(); + FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebView, pView)); + SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, eMetric)); + SfxItemSet aDlgAttr(GetPool(), EE_ITEMS_START, EE_ITEMS_END); + + // util::Language gibts an der EditEngine nicht! Daher nicht im Set. + + aDlgAttr.Put( aEditAttr ); + aDlgAttr.Put( SvxKerningItem() ); + + SwCharDlg* pDlg = new SwCharDlg(pView->GetWindow(), *pView, aDlgAttr, 0, sal_True); + + sal_uInt16 nResult = pDlg->Execute(); + + switch( nResult ) + { + case RET_OK: + { + pArgs = rReq.GetArgs(); + } + break; + + default: + { + delete pDlg; + } + return; // Abbruch + } + delete( pDlg ); + } + aNewAttr.Put(*pArgs); + } + break; + + case SID_PARA_DLG: + { + const SfxItemSet* pArgs = rReq.GetArgs(); + + if (!pArgs) + { + SwView* pView = &GetView(); + FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebView, pView)); + SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, eMetric)); + SfxItemSet aDlgAttr(GetPool(), + EE_ITEMS_START, EE_ITEMS_END, + SID_ATTR_PARA_HYPHENZONE, SID_ATTR_PARA_HYPHENZONE, + SID_ATTR_PARA_SPLIT, SID_ATTR_PARA_SPLIT, + SID_ATTR_PARA_WIDOWS, SID_ATTR_PARA_WIDOWS, + SID_ATTR_PARA_ORPHANS, SID_ATTR_PARA_ORPHANS, + 0); + + aDlgAttr.Put(aEditAttr); + + // Die Werte sind erst einmal uebernommen worden, um den Dialog anzuzeigen. + // Muss natuerlich noch geaendert werden + // aDlgAttr.Put( SvxParaDlgLimitsItem( 567 * 50, 5670) ); + + aDlgAttr.Put( SvxHyphenZoneItem() ); + aDlgAttr.Put( SvxFmtBreakItem() ); + aDlgAttr.Put( SvxFmtSplitItem() ); + aDlgAttr.Put( SvxWidowsItem() ); + aDlgAttr.Put( SvxOrphansItem() ); + + SwParaDlg* pDlg = new SwParaDlg(GetView().GetWindow(), GetView(), aDlgAttr, DLG_STD, 0, sal_True); + + sal_uInt16 nResult = pDlg->Execute(); + + switch( nResult ) + { + case RET_OK: + { + pArgs = rReq.GetArgs(); + } + break; + + default: + { + delete pDlg; + } + return; // Abbruch + } + delete( pDlg ); + } + aNewAttr.Put(*pArgs); + } + break; + case SID_AUTOSPELL_MARKOFF: + case SID_AUTOSPELL_CHECK: + { + pSdrView = rSh.GetDrawView(); + pOutliner = pSdrView->GetTextEditOutliner(); + sal_uInt32 nCtrl = pOutliner->GetControlWord(); + + sal_Bool bSet = ((const SfxBoolItem&)rReq.GetArgs()->Get(nSlot)).GetValue(); + if(nSlot == SID_AUTOSPELL_MARKOFF) + { + if(bSet) + nCtrl |= EE_CNTRL_NOREDLINES; + else + nCtrl &= ~EE_CNTRL_NOREDLINES; + } + else + { + if(bSet) + nCtrl |= EE_CNTRL_ONLINESPELLING|EE_CNTRL_ALLOWBIGOBJS; + else + nCtrl &= ~EE_CNTRL_ONLINESPELLING; + } + pOutliner->SetControlWord(nCtrl); + + SW_MOD()->ExecuteSlot(rReq); + } + break; + case SID_HYPERLINK_SETLINK: + { + const SfxPoolItem* pItem = 0; + if(pNewAttrs) + pNewAttrs->GetItemState(nSlot, sal_False, &pItem); + + if(pItem) + { + const SvxHyperlinkItem& rHLinkItem = *(const SvxHyperlinkItem *)pItem; + SvxURLField aFld(rHLinkItem.GetURL(), rHLinkItem.GetName(), SVXURLFORMAT_APPDEFAULT); + aFld.SetTargetFrame(rHLinkItem.GetTargetFrame()); + + const SvxFieldItem* pFieldItem = pOLV->GetFieldAtSelection(); + + if (pFieldItem && pFieldItem->GetField()->ISA(SvxURLField)) + { + // Feld selektieren, so dass es beim Insert geloescht wird + ESelection aSel = pOLV->GetSelection(); + aSel.nEndPos++; + pOLV->SetSelection(aSel); + } + pOLV->InsertField(aFld); + } + } + break; + + default: + ASSERT(!this, falscher Dispatcher); + return; + } + SetAttrToMarked(aNewAttr); + + GetView().GetViewFrame()->GetBindings().InvalidateAll(sal_False); + + if (IsTextEdit() && pOLV->GetOutliner()->IsModified()) + rSh.SetModified(); +} + +/*-------------------------------------------------------------------- + Beschreibung: + --------------------------------------------------------------------*/ + + + +void SwDrawTextShell::GetState(SfxItemSet& rSet) +{ + if (!IsTextEdit()) // Sonst manchmal Absturz! + return; + + SfxItemSet aEditAttr(pOLV->GetAttribs()); + sal_uInt16 nWhich = 0; + + const SfxPoolItem* pItem = 0; + SfxItemState eState = aEditAttr.GetItemState(EE_PARA_JUST, sal_False, &pItem); + if (eState == SFX_ITEM_DONTCARE || !pItem) + { + rSet.InvalidateItem( SID_ATTR_PARA_ADJUST_LEFT ); + rSet.InvalidateItem( SID_ATTR_PARA_ADJUST_CENTER ); + rSet.InvalidateItem( SID_ATTR_PARA_ADJUST_RIGHT ); + rSet.InvalidateItem( SID_ATTR_PARA_ADJUST_BLOCK ); + } + else + { + SvxAdjust eAdjust = ((const SvxAdjustItem*)pItem)->GetAdjust(); + switch( eAdjust ) + { + case SVX_ADJUST_LEFT: nWhich = SID_ATTR_PARA_ADJUST_LEFT; break; + case SVX_ADJUST_CENTER: nWhich = SID_ATTR_PARA_ADJUST_CENTER; break; + case SVX_ADJUST_RIGHT: nWhich = SID_ATTR_PARA_ADJUST_RIGHT; break; + case SVX_ADJUST_BLOCK: nWhich = SID_ATTR_PARA_ADJUST_BLOCK; break; + } + if( nWhich ) + rSet.Put( SfxBoolItem( nWhich, sal_True ) ); + } + + eState = aEditAttr.GetItemState(EE_PARA_SBL, sal_False, &pItem); + if (eState == SFX_ITEM_DONTCARE || !pItem) + { + rSet.InvalidateItem( SID_ATTR_PARA_LINESPACE_10 ); + rSet.InvalidateItem( SID_ATTR_PARA_LINESPACE_15 ); + rSet.InvalidateItem( SID_ATTR_PARA_LINESPACE_20 ); + } + else + { + const sal_Int8 nSpace = ((const SvxLineSpacingItem*)pItem)->GetPropLineSpace(); + nWhich = 0; + switch( nSpace ) + { + case 100: + nWhich = SID_ATTR_PARA_LINESPACE_10; + break; + case 150: + nWhich = SID_ATTR_PARA_LINESPACE_15; + break; + case 200: + nWhich = SID_ATTR_PARA_LINESPACE_20; + break; + } + if( nWhich ) + rSet.Put( SfxBoolItem( nWhich, sal_True ) ); + } + + SvxEscapement eEsc = (SvxEscapement)((const SvxEscapementItem&) + aEditAttr.Get(EE_CHAR_ESCAPEMENT)).GetEnumValue(); + + if( eEsc == SVX_ESCAPEMENT_SUPERSCRIPT ) + rSet.Put( SfxBoolItem( FN_SET_SUPER_SCRIPT, sal_True ) ); + else if( eEsc == SVX_ESCAPEMENT_SUBSCRIPT ) + rSet.Put( SfxBoolItem( FN_SET_SUB_SCRIPT, sal_True ) ); + + + // disable "Thesaurus" if the language is not supported + const SfxPoolItem &rItem = GetShell().GetDoc()->GetDefault(RES_CHRATR_LANGUAGE); + LanguageType nLang = ((const SvxLanguageItem &) rItem).GetLanguage(); + // + uno::Reference< linguistic::XThesaurus > xThes( ::GetThesaurus() ); + if (!xThes.is() || nLang == LANGUAGE_NONE || + !xThes->hasLocale( SvxCreateLocale( nLang ) )) + rSet.DisableItem( FN_THESAURUS_DLG ); +} + +/*-------------------------------------------------------------------- + Beschreibung: + --------------------------------------------------------------------*/ + + + +void SwDrawTextShell::GetDrawTxtCtrlState(SfxItemSet& rSet) +{ + if (!IsTextEdit()) // Sonst Absturz! + return; + + SfxItemSet aEditAttr(pOLV->GetAttribs()); + + SfxWhichIter aIter(rSet); + sal_uInt16 nWhich = aIter.FirstWhich(); + + while(nWhich) + { + switch(GetPool().GetSlotId(nWhich)) + { + case SID_ATTR_CHAR_FONT: + rSet.Put(aEditAttr.Get(EE_CHAR_FONTINFO, sal_True), nWhich); + break; + case SID_ATTR_CHAR_FONTHEIGHT: + rSet.Put(aEditAttr.Get(EE_CHAR_FONTHEIGHT, sal_True), nWhich); + break; + case SID_ATTR_CHAR_COLOR: + rSet.Put(aEditAttr.Get(EE_CHAR_COLOR, sal_True), nWhich); + break; + case SID_ATTR_CHAR_WEIGHT: + rSet.Put(aEditAttr.Get(EE_CHAR_WEIGHT, sal_True), nWhich); + break; + case SID_ATTR_CHAR_POSTURE: + rSet.Put(aEditAttr.Get(EE_CHAR_ITALIC, sal_True), nWhich); + break; + case SID_ATTR_CHAR_UNDERLINE: + rSet.Put(aEditAttr.Get(EE_CHAR_UNDERLINE, sal_True), nWhich); + break; + case SID_ATTR_CHAR_CONTOUR: + rSet.Put(aEditAttr.Get(EE_CHAR_OUTLINE, sal_True), nWhich); + break; + case SID_ATTR_CHAR_SHADOWED: + rSet.Put(aEditAttr.Get(EE_CHAR_SHADOW, sal_True), nWhich); + break; + case SID_ATTR_CHAR_STRIKEOUT: + rSet.Put(aEditAttr.Get(EE_CHAR_STRIKEOUT, sal_True), nWhich); + break; + case SID_AUTOSPELL_MARKOFF: + case SID_AUTOSPELL_CHECK: + const SfxPoolItem* pState = SW_MOD()->GetSlotState(nWhich); + if (pState) + rSet.Put(SfxBoolItem(nWhich, ((const SfxBoolItem*)pState)->GetValue())); + else + rSet.DisableItem( nWhich ); + break; + } + nWhich = aIter.NextWhich(); + } +} + +/*-------------------------------------------------------------------- + Beschreibung: + --------------------------------------------------------------------*/ + + + +void SwDrawTextShell::ExecClpbrd(SfxRequest &rReq) +{ + if (!IsTextEdit()) // Sonst Absturz! + return; + + sal_uInt16 nId = rReq.GetSlot(); + switch( nId ) + { + case SID_CUT: + pOLV->Cut(); + return; + + case SID_COPY: + pOLV->Copy(); + return; + + case SID_PASTE: + pOLV->PasteSpecial(); + break; + + default: + DBG_ERROR("falscher Dispatcher"); + return; + } +} + +/*-------------------------------------------------------------------- + Beschreibung: ClipBoard-Status + --------------------------------------------------------------------*/ + + + +void SwDrawTextShell::StateClpbrd(SfxItemSet &rSet) +{ + if (!IsTextEdit()) // Sonst Absturz! + return; + + ESelection aSel(pOLV->GetSelection()); + const sal_Bool bCopy = (aSel.nStartPara != aSel.nEndPara) || (aSel.nStartPos != aSel.nEndPos); + + + SfxWhichIter aIter(rSet); + sal_uInt16 nWhich = aIter.FirstWhich(); + + while(nWhich) + { + switch(nWhich) + { + case SID_CUT: + case SID_COPY: + if( !bCopy ) + rSet.DisableItem( nWhich ); + break; + + case SID_PASTE: + { + //!!OS: das muss ein if/else bleiben, weil BLC das + // nicht anders versteht + SwModule* pMod = SW_MOD(); + SvDataObjectRef xObj; + if( pMod->pClipboard ) + xObj = pMod->pClipboard; + else + xObj = SvDataObject::PasteClipboard(); + + if( !xObj.Is() || + !SwDataExchange::IsPaste( GetShell(), *xObj ) ) + rSet.DisableItem( SID_PASTE ); + } + break; + + case FN_PASTESPECIAL: + rSet.DisableItem( FN_PASTESPECIAL ); + break; + } + nWhich = aIter.NextWhich(); + } +} + +/*-------------------------------------------------------------------- + Beschreibung: Hyperlink-Status + --------------------------------------------------------------------*/ + +void SwDrawTextShell::StateInsert(SfxItemSet &rSet) +{ + if (!IsTextEdit()) // Sonst Absturz! + return; + + SfxWhichIter aIter(rSet); + sal_uInt16 nWhich = aIter.FirstWhich(); + + while(nWhich) + { + switch(nWhich) + { + case SID_HYPERLINK_GETLINK: + { + SvxHyperlinkItem aHLinkItem; + aHLinkItem.SetInsertMode(HLINK_FIELD); + + const SvxFieldItem* pFieldItem = pOLV->GetFieldAtSelection(); + + if (pFieldItem) + { + const SvxFieldData* pField = pFieldItem->GetField(); + + if (pField->ISA(SvxURLField)) + { + aHLinkItem.SetName(((const SvxURLField*) pField)->GetRepresentation()); + aHLinkItem.SetURL(((const SvxURLField*) pField)->GetURL()); + aHLinkItem.SetTargetFrame(((const SvxURLField*) pField)->GetTargetFrame()); + } + } + else + { + String sSel(pOLV->GetSelected()); + sSel.Erase(255); + sSel.EraseTrailingChars(); + aHLinkItem.SetName(sSel); + } + + sal_uInt16 nHtmlMode = ::GetHtmlMode(GetView().GetDocShell()); + aHLinkItem.SetInsertMode((SvxLinkInsertMode)(aHLinkItem.GetInsertMode() | + ((nHtmlMode & HTMLMODE_ON) != 0 ? HLINK_HTMLMODE : 0))); + + rSet.Put(aHLinkItem); + } + break; + } + nWhich = aIter.NextWhich(); + } +} + +/************************************************************************* + + $Log: not supported by cvs2svn $ + Revision 1.69 2000/09/18 16:06:03 willem.vandorp + OpenOffice header added. + + Revision 1.68 2000/09/07 15:59:29 os + change: SFX_DISPATCHER/SFX_BINDINGS removed + + Revision 1.67 2000/05/26 07:21:32 os + old SW Basic API Slots removed + + Revision 1.66 2000/04/18 14:58:23 os + UNICODE + + Revision 1.65 2000/03/23 07:49:14 os + UNO III + + Revision 1.64 2000/02/16 21:00:17 tl + #72219# Locale Umstellung + + Revision 1.63 2000/02/11 14:57:32 hr + #70473# changes for unicode ( patched by automated patchtool ) + + Revision 1.62 2000/01/21 13:34:45 tl + #70503# GetState method added for FN_THESAURUS_DLG + + Revision 1.61 1999/11/30 09:44:05 jp + StateClpbrd: pObj contains sometimes no Pointer + + Revision 1.60 1999/09/24 14:38:32 os + hlnkitem.hxx now in SVX + + Revision 1.59 1999/08/04 09:09:50 JP + have to change: Outliner -> SdrOutlines + + + Rev 1.58 04 Aug 1999 11:09:50 JP + have to change: Outliner -> SdrOutlines + + Rev 1.57 18 Mar 1999 14:41:18 OS + #61169# #61489# Masseinheiten fuer Text u. HTML am Module setzen, nicht an der App + + Rev 1.56 04 Nov 1998 17:29:54 OM + #58904# Assertion umpropelt + + Rev 1.55 08 Sep 1998 17:03:08 OS + #56134# Metric fuer Text und HTML getrennt + + Rev 1.54 25 Jun 1998 14:11:18 JP + SvDataObject -> SotObject + + Rev 1.53 08 Apr 1998 13:47:22 OM + #42505 Keine util::URL-Buttons in Html-Dokumenten + + Rev 1.52 12 Mar 1998 11:28:12 OM + #48017# GPF entfernt + + Rev 1.51 05 Feb 1998 14:48:14 OS + Absatzdialog enthaelt keinen TableMode + + Rev 1.50 29 Nov 1997 15:52:12 MA + includes + + Rev 1.49 24 Nov 1997 09:47:00 MA + includes + + Rev 1.48 03 Nov 1997 13:55:46 MA + precomp entfernt + + Rev 1.47 17 Sep 1997 13:09:18 OM + Editierbare Links in DrawText-Objekten + + Rev 1.46 01 Sep 1997 13:24:00 OS + DLL-Umstellung + + Rev 1.45 11 Aug 1997 08:50:18 OS + paraitem/frmitems/textitem aufgeteilt + + Rev 1.44 08 Aug 1997 17:28:46 OM + Headerfile-Umstellung + + Rev 1.43 07 Jul 1997 12:28:14 OM + #41258# Execute: Nur benoetigte Items putten + + Rev 1.42 17 Jun 1997 16:00:00 MA + DrawTxtShell nicht von BaseShell ableiten + Opts + + Rev 1.41 04 Jun 1997 11:24:06 TRI + svwin.h nur unter WIN oder WNT includen + + Rev 1.40 04 Jun 1997 09:50:08 NF + Includes... + + Rev 1.39 28 May 1997 15:06:30 OM + #40067# DontCare-State fuer Absatzausrichtung beruecksichtigen + + Rev 1.38 16 May 1997 17:16:40 OM + Links aus Hyperlinkleiste in DrawText-Objekte einfuegen + + Rev 1.37 19 Mar 1997 12:48:42 AMA + Fix #37035: Speller am Outliner setzen. + + Rev 1.36 23 Feb 1997 18:20:08 AMA + Fix #36843#: GPF in der EditEngine durch nicht gesetzten SpellChecker + + Rev 1.35 22 Jan 1997 18:42:26 MH + add: include + + Rev 1.34 16 Jan 1997 16:36:52 OS + Metric vor Dialogaufruf an der App setzen + + Rev 1.33 14 Jan 1997 09:31:34 TRI + includes + + Rev 1.32 16 Dec 1996 19:10:40 HJS + includes + + Rev 1.31 13 Dec 1996 16:38:22 OS + Autospell fuer aktives DrawTextObject + + Rev 1.30 22 Nov 1996 14:53:32 OS + FN_SET_JUSTIFY_PARA -> SID_ATTR_PARA_ADJUST_BLOCK + + Rev 1.29 28 Aug 1996 15:55:10 OS + includes + + Rev 1.28 22 Mar 1996 15:14:32 TRI + sfxiiter.hxx included + + Rev 1.27 05 Feb 1996 17:28:42 OM + Parent-Win an Par/Chardlg uebergeben + + Rev 1.26 12 Dec 1995 17:43:58 OM + Text-Attribute richtig setzen + + Rev 1.25 11 Dec 1995 18:21:26 OM + Neuer DrawText Dialog + + Rev 1.24 08 Dec 1995 18:10:28 OM + CharAttr-Stati richtig updaten + + Rev 1.23 07 Dec 1995 18:25:36 OM + Neu: GetDrawTxtCtrlState + + Rev 1.22 24 Nov 1995 16:59:34 OM + PCH->PRECOMPILED + + Rev 1.21 10 Nov 1995 18:24:24 OM + Init-Fkt optimiert/repariert + + Rev 1.20 09 Nov 1995 18:00:12 OS + Id fuer FormatPage/CharDlg auf SID_ umgestellt + + Rev 1.19 31 Oct 1995 18:40:42 OM + GetFrameWindow entfernt + + Rev 1.18 17 Oct 1995 19:27:14 OM + Clipboard fuer Drawtext + + Rev 1.17 14 Oct 1995 17:58:10 OM + Prophylaktische Absturzvorsorge... + + Rev 1.16 14 Oct 1995 17:33:44 OM + Bug 20805: DrawTextShell komplettiert + + Rev 1.15 05 Oct 1995 18:40:44 OM + Aufgeraeumt + + Rev 1.14 04 Oct 1995 18:43:10 OM + Text-Reset angefangen + + Rev 1.13 13 Sep 1995 17:28:06 OM + Modified fuer Drawtext-Objekte geaendert + + Rev 1.12 28 Aug 1995 19:03:34 MA + Renovierung: IDL, Shells, Textshell-Doktrin aufgegeben + + Rev 1.11 21 Aug 1995 21:00:00 MA + chg: svxitems-header entfernt + + Rev 1.10 16 Aug 1995 17:50:12 MA + Riesenheader dialogs entfernt. + + Rev 1.9 09 Aug 1995 18:39:10 OM + Statusmethode abgesichert + + Rev 1.8 07 Aug 1995 18:41:54 OM + Zeichendialog richtig attributiert + + Rev 1.7 06 Aug 1995 18:27:32 OM + DrawTextShell-Popup + + Rev 1.6 23 Jul 1995 17:04:24 OS + Zeilenabstand kann nur 100/150/200 sein + + Rev 1.5 14 Jul 1995 18:16:40 OM + Farbcontroller rausgeschmissen + + Rev 1.4 04 May 1995 10:10:04 JP + Items Optimierung + + Rev 1.3 03 May 1995 23:32:52 ER + add: editdata.hxx + + Rev 1.2 28 Mar 1995 20:07:58 ER + header-adder + + Rev 1.1 05 Mar 1995 20:44:44 OM + Linienabstand, drawing::Alignment, ... + + Rev 1.0 05 Mar 1995 16:36:00 OM + Textfarbe setzen + + Rev 1.6 04 Mar 1995 19:20:44 OM + Aenderungen fuer 241 + + Rev 1.5 04 Mar 1995 19:03:18 OM + Execute und State fuer Texthintergrund + + Rev 1.4 03 Mar 1995 18:16:06 OM + virtual GetPool implementiert + + Rev 1.3 03 Mar 1995 02:07:32 OM + State-Methode fuer Font-Controller entfernt + + Rev 1.2 02 Mar 1995 19:19:26 OM + Font-Controller eingebunden + + Rev 1.1 01 Mar 1995 19:07:18 OM + DrawTextShell 2.Runde + + Rev 1.0 28 Feb 1995 19:45:08 OM + Initial revision. + +*************************************************************************/ + + + + diff --git a/sw/source/ui/shells/drwtxtsh.cxx b/sw/source/ui/shells/drwtxtsh.cxx new file mode 100644 index 0000000000..951301a2de --- /dev/null +++ b/sw/source/ui/shells/drwtxtsh.cxx @@ -0,0 +1,815 @@ +/************************************************************************* + * + * $RCSfile: drwtxtsh.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:46 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifdef PRECOMPILED +#include "ui_pch.hxx" +#endif + +#pragma hdrstop + +#include "hintids.hxx" + + +#if defined( WIN ) || defined( WNT ) +//#include <svwin.h> +#endif +#ifndef _OFF_APP_HXX //autogen +#include <offmgr/app.hxx> +#endif +#ifndef _SVX_FONTITEM_HXX //autogen +#include <svx/fontitem.hxx> +#endif +#ifndef _SVX_LANGITEM_HXX //autogen +#include <svx/langitem.hxx> +#endif +#ifndef _SVDVIEW_HXX //autogen +#include <svx/svdview.hxx> +#endif +#ifndef _SV_MSGBOX_HXX //autogen +#include <vcl/msgbox.hxx> +#endif +#ifndef _SVX_CHARMAP_HXX //autogen +#include <svx/charmap.hxx> +#endif +#ifndef _SFXVIEWFRM_HXX //autogen +#include <sfx2/viewfrm.hxx> +#endif +#ifndef _SVDOTEXT_HXX //autogen +#include <svx/svdotext.hxx> +#endif +#ifndef _SVX_XFTSFIT_HXX //autogen +#include <svx/xftsfit.hxx> +#endif +#ifndef _EEITEM_HXX //autogen +#include <svx/eeitem.hxx> +#endif +#ifndef _SVDOBJ_HXX //autogen +#include <svx/svdobj.hxx> +#endif +#ifndef _SVX_TEXTANIM_HXX //autogen +#include <svx/textanim.hxx> +#endif +#ifndef _XDEF_HXX //autogen +#include <xdef.hxx> +#endif +#ifndef _SFX_BINDINGS_HXX //autogen +#include <sfx2/bindings.hxx> +#endif +#ifndef _SVX_XFTSFIT_HXX //autogen +#include <svx/xftsfit.hxx> +#endif +#ifndef _SVX_FONTWORK_HXX //autogen +#include <svx/fontwork.hxx> +#endif +#ifndef _SFXREQUEST_HXX //autogen +#include <sfx2/request.hxx> +#endif +#ifndef _SFX_WHITER_HXX //autogen +#include <svtools/whiter.hxx> +#endif +#ifndef _OUTLINER_HXX //autogen +#include <svx/outliner.hxx> +#endif +#ifndef _EDITSTAT_HXX //autogen +#include <svx/editstat.hxx> +#endif +#ifndef _SVDOUTL_HXX +#include <svx/svdoutl.hxx> +#endif + + +#include "swtypes.hxx" +#include "view.hxx" +#include "wrtsh.hxx" +#include "uiparam.hxx" +#include "viewopt.hxx" +#include "cmdid.h" +#include "globals.hrc" +#include "helpid.h" +#include "shells.hrc" +#include "initui.hxx" // fuer SpellPointer +#include "drwtxtsh.hxx" +#include "swundo.hxx" + +#ifndef _SFXOBJFACE_HXX //autogen +#include <sfx2/objface.hxx> +#endif +#define SwDrawTextShell +#include "itemdef.hxx" +#include "swslots.hxx" +#include "popup.hrc" + +SFX_IMPL_INTERFACE(SwDrawTextShell, SfxShell, SW_RES(STR_SHELLNAME_DRAW_TEXT)) +{ + SFX_POPUPMENU_REGISTRATION(SW_RES(MN_DRWTXT_POPUPMENU)); + SFX_OBJECTBAR_REGISTRATION(SFX_OBJECTBAR_OBJECT, SW_RES(RID_DRAW_TEXT_TOOLBOX)); + SFX_OBJECTMENU_REGISTRATION(SID_OBJECTMENU0, SW_RES(MN_OBJECTMENU_DRWTXT)); + SFX_CHILDWINDOW_REGISTRATION(SvxFontWorkChildWindow::GetChildWindowId()); +} + +TYPEINIT1(SwDrawTextShell,SfxShell) + +/*-------------------------------------------------------------------- + Beschreibung: + --------------------------------------------------------------------*/ + + + +void SwDrawTextShell::Init() +{ + SwWrtShell &rSh = GetShell(); + pSdrView = rSh.GetDrawView(); + pOutliner = pSdrView->GetTextEditOutliner(); + pOLV = pSdrView->GetTextEditOutlinerView(); + ULONG nCtrl = pOutliner->GetControlWord(); + nCtrl |= EE_CNTRL_AUTOCORRECT; + + SetUndoManager(&pOutliner->GetUndoManager()); + + // jetzt versuchen wir mal ein AutoSpell + + const SwViewOption* pVOpt = rSh.GetViewOptions(); + if(pVOpt->IsOnlineSpell()) + { + nCtrl |= EE_CNTRL_ONLINESPELLING|EE_CNTRL_ALLOWBIGOBJS; + if(pVOpt->IsHideSpell()) + nCtrl |= EE_CNTRL_NOREDLINES; + } + else + nCtrl &= ~(EE_CNTRL_ONLINESPELLING|EE_CNTRL_NOREDLINES); + + pOutliner->SetControlWord(nCtrl); + pOLV->ShowCursor(); +} + +/*-------------------------------------------------------------------- + Beschreibung: + --------------------------------------------------------------------*/ + + +SwDrawTextShell::SwDrawTextShell(SwView &rV) : + SfxShell(&rV), + rView(rV) +{ + SwWrtShell &rSh = GetShell(); + SetPool(rSh.GetAttrPool().GetSecondaryPool()); + + Init(); + + rSh.NoEdit(TRUE); + SetName(String::CreateFromAscii("ObjectText")); + SetHelpId(SW_DRWTXTSHELL); +} + +/*-------------------------------------------------------------------- + Beschreibung: + --------------------------------------------------------------------*/ + + + +__EXPORT SwDrawTextShell::~SwDrawTextShell() +{ + if ( GetView().GetCurShell() == this ) + rView.ResetSubShell(); + + //MA 13. Nov. 96: Das kommt durchaus vor #33141#: + //(doppel-)Klick von einem Texteditmode in ein anderes Objekt, zwischendurch + //wird eine andere (Draw-)Shell gepusht, die alte aber noch nicht deletet. + //Dann wird vor dem Flush wieder ein DrawTextShell gepusht und der Mode ist + //eingeschaltet. In diesem Moment wird der Dispatcher geflusht und die alte + //DrawTextShell zerstoert. +// ASSERT( !pSdrView->IsTextEdit(), "TextEdit in DTor DrwTxtSh?" ); +// if (pSdrView->IsTextEdit()) +// GetShell().EndTextEdit(); // Danebengeklickt, Ende mit Edit + +// GetShell().Edit(); +} + +SwWrtShell& SwDrawTextShell::GetShell() +{ + return rView.GetWrtShell(); +} + + +/*-------------------------------------------------------------------- + Beschreibung: Slots mit dieser Statusmethode disablen + --------------------------------------------------------------------*/ + +void SwDrawTextShell::StateDisableItems( SfxItemSet &rSet ) +{ + SfxWhichIter aIter(rSet); + USHORT nWhich = aIter.FirstWhich(); + + while (nWhich) + { + rSet.DisableItem( nWhich ); + nWhich = aIter.NextWhich(); + } +} + + +/************************************************************************* +|* +|* Attribute setzen +|* +\************************************************************************/ + + + +void SwDrawTextShell::SetAttrToMarked(const SfxItemSet& rAttr) +{ + Rectangle aNullRect; + Rectangle aOutRect = pOLV->GetOutputArea(); + + if (aNullRect != aOutRect) + { + GetShell().GetDrawView()->SetAttributes(rAttr); +// Init(); + } +} + +/*-------------------------------------------------------------------- + Beschreibung: + --------------------------------------------------------------------*/ + + + +BOOL SwDrawTextShell::IsTextEdit() +{ + if (!pOutliner || !pOLV) + Init(); + + if (!pOutliner || !pOLV) + return (FALSE); + + return (pSdrView->IsTextEdit()); +} + +/*-------------------------------------------------------------------- + Beschreibung: + --------------------------------------------------------------------*/ + + + +void SwDrawTextShell::ExecFontWork(SfxRequest& rReq) +{ + SfxViewFrame* pVFrame = GetView().GetViewFrame(); + if ( rReq.GetArgs() ) + { + pVFrame->SetChildWindow(SvxFontWorkChildWindow::GetChildWindowId(), + ((const SfxBoolItem&) (rReq.GetArgs()-> + Get(SID_FONTWORK))).GetValue()); + } + else + pVFrame->ToggleChildWindow(SvxFontWorkChildWindow::GetChildWindowId()); + + pVFrame->GetBindings().Invalidate(SID_FONTWORK); +} + +/*-------------------------------------------------------------------- + Beschreibung: + --------------------------------------------------------------------*/ + + + +void SwDrawTextShell::StateFontWork(SfxItemSet& rSet) +{ + const USHORT nId = SvxFontWorkChildWindow::GetChildWindowId(); + rSet.Put(SfxBoolItem(SID_FONTWORK, GetView().GetViewFrame()->HasChildWindow(nId))); +} + +/************************************************************************* +|* +|* SfxRequests fuer FontWork bearbeiten +|* +\************************************************************************/ + + + +void SwDrawTextShell::ExecFormText(SfxRequest& rReq) +{ + SwWrtShell &rSh = GetShell(); + SdrView* pDrView = rSh.GetDrawView(); + + const SdrMarkList& rMarkList = pDrView->GetMarkList(); + + if ( rMarkList.GetMarkCount() == 1 && rReq.GetArgs() ) + { + const SfxItemSet& rSet = *rReq.GetArgs(); + const SfxPoolItem* pItem; + + if ( pDrView->IsTextEdit() ) + { + pDrView->EndTextEdit( TRUE ); + GetView().AttrChangedNotify(&rSh); + } + + if ( rSet.GetItemState(XATTR_FORMTXTSTDFORM, TRUE, &pItem) == + SFX_ITEM_SET && + ((const XFormTextStdFormItem*) pItem)->GetValue() != XFTFORM_NONE ) + { + + const USHORT nId = SvxFontWorkChildWindow::GetChildWindowId(); + + SvxFontWorkDialog* pDlg = (SvxFontWorkDialog*)(GetView().GetViewFrame()-> + GetChildWindow(nId)->GetWindow()); + + pDlg->CreateStdFormObj(*pDrView, *pDrView->GetPageViewPvNum(0), + rSet, *rMarkList.GetMark(0)->GetObj(), + ((const XFormTextStdFormItem*) pItem)-> + GetValue()); + } + else + pDrView->SetAttributes(rSet); + } + +} + +/************************************************************************* +|* +|* Statuswerte fuer FontWork zurueckgeben +|* +\************************************************************************/ + + + +void SwDrawTextShell::GetFormTextState(SfxItemSet& rSet) +{ + SwWrtShell &rSh = GetShell(); + SdrView* pDrView = rSh.GetDrawView(); + const SdrMarkList& rMarkList = pDrView->GetMarkList(); + const SdrObject* pObj = NULL; + SvxFontWorkDialog* pDlg = NULL; + + const USHORT nId = SvxFontWorkChildWindow::GetChildWindowId(); + + SfxViewFrame* pVFrame = GetView().GetViewFrame(); + if ( pVFrame->HasChildWindow(nId) ) + pDlg = (SvxFontWorkDialog*)(pVFrame->GetChildWindow(nId)->GetWindow()); + + if ( rMarkList.GetMarkCount() == 1 ) + pObj = rMarkList.GetMark(0)->GetObj(); + + if ( pObj == NULL || !pObj->ISA(SdrTextObj) || + !((SdrTextObj*) pObj)->HasText() ) + { +#define XATTR_ANZ 12 + static const USHORT nXAttr[ XATTR_ANZ ] = + { XATTR_FORMTXTSTYLE, XATTR_FORMTXTADJUST, XATTR_FORMTXTDISTANCE, + XATTR_FORMTXTSTART, XATTR_FORMTXTMIRROR, XATTR_FORMTXTSTDFORM, + XATTR_FORMTXTHIDEFORM, XATTR_FORMTXTOUTLINE, XATTR_FORMTXTSHADOW, + XATTR_FORMTXTSHDWCOLOR, XATTR_FORMTXTSHDWXVAL, XATTR_FORMTXTSHDWYVAL + }; + for( USHORT i = 0; i < XATTR_ANZ; ) + rSet.DisableItem( nXAttr[ i++ ] ); + } + else + { + if ( pDlg ) + pDlg->SetColorTable(OFF_APP()->GetStdColorTable()); + + pDrView->GetAttributes( rSet ); + } +} + +/*-------------------------------------------------------------------- + Beschreibung: + --------------------------------------------------------------------*/ + + + +void SwDrawTextShell::ExecDrawLingu(SfxRequest &rReq) +{ + SwWrtShell &rSh = GetShell(); + + if( rSh.GetDrawView()->GetMarkList().GetMarkCount() ) + { + LanguageType nLang = ((const SvxLanguageItem&)rSh. + GetDefault(RES_CHRATR_LANGUAGE)).GetLanguage(); + switch(rReq.GetSlot()) + { + case FN_THESAURUS_DLG: + { + pOLV->StartThesaurus( nLang ); + break; + } + case FN_SPELLING_DLG: + { + pOLV->StartSpeller( nLang ); + break; + } + default: + ASSERT(!this, "unexpected slot-id"); + return; + } + } +} + +/*-------------------------------------------------------------------- + Beschreibung: + --------------------------------------------------------------------*/ + + + +void SwDrawTextShell::ExecDraw(SfxRequest &rReq) +{ + SwWrtShell &rSh = GetShell(); + pSdrView = rSh.GetDrawView(); + + + switch (rReq.GetSlot()) + { + case FN_INSERT_SYMBOL: // Sonderzeichen einfuegen + InsertSymbol(); + break; + + case SID_SELECTALL: + { + ULONG nParaCount = pOutliner->GetParagraphCount(); + if (nParaCount > 0) + pOLV->SelectRange(0L, USHORT(nParaCount) ); + } + break; + + case FN_FORMAT_RESET: // Harte Textattributierung l”schen + { + SfxItemSet aEmptyAttr(GetPool(), EE_ITEMS_START, EE_ITEMS_END); + pSdrView->SetAttributes(aEmptyAttr, TRUE); + } + break; + + case FN_ESCAPE: + if (pSdrView->IsTextEdit()) + { + // Shellwechsel! + rSh.EndTextEdit(); + rSh.GetView().AttrChangedNotify(&rSh); + return; + } + break; + + case FN_DRAWTEXT_ATTR_DLG: + { + SfxItemSet aNewAttr( pSdrView->GetModel()->GetItemPool() ); + pSdrView->GetAttributes( aNewAttr ); + SvxTextTabDialog* pDlg = new SvxTextTabDialog( + &(GetView().GetViewFrame()->GetWindow()), + &aNewAttr, pSdrView ); + USHORT nResult = pDlg->Execute(); + + if (nResult == RET_OK) + { + if (pSdrView->HasMarkedObj()) + pSdrView->SetAttributes(*pDlg->GetOutputItemSet()); + } + delete( pDlg ); + } + break; + + default: + ASSERT(!this, "unexpected slot-id"); + return; + } + + GetView().GetViewFrame()->GetBindings().InvalidateAll(FALSE); + + if (IsTextEdit() && pOLV->GetOutliner()->IsModified()) + rSh.SetModified(); +} + +/*-------------------------------------------------------------------- + Beschreibung: Undo ausfuehren + --------------------------------------------------------------------*/ + + + +void SwDrawTextShell::ExecUndo(SfxRequest &rReq) +{ + if ( !IsTextEdit() ) + return; + + SfxViewFrame *pSfxViewFrame = GetView().GetViewFrame(); + pSfxViewFrame->ExecuteSlot(rReq, pSfxViewFrame->GetInterface()); +} + +/*-------------------------------------------------------------------- + Beschreibung: Zustand Undo + --------------------------------------------------------------------*/ + + + +void SwDrawTextShell::StateUndo(SfxItemSet &rSet) +{ + if ( !IsTextEdit() ) + return; + + SfxViewFrame *pSfxViewFrame = GetView().GetViewFrame(); + SfxWhichIter aIter(rSet); + USHORT nWhich = aIter.FirstWhich(); + while(nWhich) + { + pSfxViewFrame->GetSlotState(nWhich, pSfxViewFrame->GetInterface(), &rSet ); + nWhich = aIter.NextWhich(); + } +} + +/*-------------------------------------------------------------------- + Beschreibung: Sonderzeichen einfuegen (siehe SDraw: FUBULLET.CXX) + --------------------------------------------------------------------*/ + + + +void SwDrawTextShell::InsertSymbol() +{ + SvxCharacterMap* pDlg = new SvxCharacterMap( NULL, FALSE ); + + // Wenn Zeichen selektiert ist kann es angezeigt werden + // pDLg->SetFont( ); + // pDlg->SetChar( ); + USHORT nResult = pDlg->Execute(); + + //char c; + String s; + + Font aFont; + + if( nResult == RET_OK ) + { + aFont = pDlg->GetCharFont(); + s = pDlg->GetCharacters(); + } + delete( pDlg ); + + if( nResult == RET_OK ) + { + // Sonderzeichen einfuegen + if (pOLV) + { + // nicht flackern + pOLV->HideCursor(); + pOutliner->SetUpdateMode(FALSE); + + SfxItemSet aOldSet(pOLV->GetAttribs()); + SvxFontItem aOldFontItem((const SvxFontItem&)aOldSet.Get(EE_CHAR_FONTINFO)); + + // String einfuegen + pOLV->InsertText(s, TRUE); + + // attributieren (Font setzen) + SfxItemSet aSet(pOutliner->GetEmptyItemSet()); + SvxFontItem aFontItem (aFont.GetFamily(), aFont.GetName(), + aFont.GetStyleName(), aFont.GetPitch(), + aFont.GetCharSet(), + EE_CHAR_FONTINFO); + aSet.Put(aFontItem); + pOLV->SetAttribs(aSet); + + // Selektion loeschen + ESelection aSel(pOLV->GetSelection()); + aSel.nStartPara = aSel.nEndPara; + aSel.nStartPos = aSel.nEndPos; + pOLV->SetSelection(aSel); + + // Alten Font restaurieren + aSet.Put(aOldFontItem); + pOLV->SetAttribs(aSet); + + // ab jetzt wieder anzeigen + pOutliner->SetUpdateMode(TRUE); + pOLV->ShowCursor(); + } + } +} + +/************************************************************************* + + Source Code Control System - History + + $Log: not supported by cvs2svn $ + Revision 1.113 2000/09/18 16:06:03 willem.vandorp + OpenOffice header added. + + Revision 1.112 2000/09/08 08:12:51 os + Change: Set/Toggle/Has/Knows/Show/GetChildWindow + + Revision 1.111 2000/09/07 15:59:29 os + change: SFX_DISPATCHER/SFX_BINDINGS removed + + Revision 1.110 2000/05/26 07:21:32 os + old SW Basic API Slots removed + + Revision 1.109 2000/05/10 11:53:01 os + Basic API removed + + Revision 1.108 2000/04/18 14:58:23 os + UNICODE + + Revision 1.107 1999/08/04 09:09:52 JP + have to change: Outliner -> SdrOutlines + + + Rev 1.106 04 Aug 1999 11:09:52 JP + have to change: Outliner -> SdrOutlines + + Rev 1.105 21 Jun 1999 15:20:24 JP + Interface changes: SdrView::GetAttributes + + Rev 1.104 10 Jun 1999 13:16:36 JP + have to change: no AppWin from SfxApp + + Rev 1.103 02 Feb 1999 13:17:36 JP + Bug #61335#: Schnistelle zu SwView geaendert/aufgeraeumt + + Rev 1.102 12 Oct 1998 10:13:20 OM + #57790# Dialog nicht mehr AppModal + + Rev 1.101 06 May 1998 16:20:42 OS + AttrChangedNotify nach Shellwechsel nicht ueber this aufrufen + + Rev 1.100 29 Nov 1997 15:52:14 MA + includes + + Rev 1.99 24 Nov 1997 09:47:00 MA + includes + + Rev 1.98 03 Nov 1997 13:55:46 MA + precomp entfernt + + Rev 1.97 30 Sep 1997 16:30:46 TJ + include + + Rev 1.96 01 Sep 1997 13:23:56 OS + DLL-Umstellung + + Rev 1.95 11 Aug 1997 08:34:16 OS + paraitem/frmitems/textitem aufgeteilt + + Rev 1.94 06 Aug 1997 14:19:50 TRI + VCL: GetpApp() statt pApp + + Rev 1.93 05 Aug 1997 13:29:54 MH + chg: header + + Rev 1.92 25 Jun 1997 09:10:18 MA + #40965#, SubShell abmelden + + Rev 1.91 19 Jun 1997 16:39:16 MA + fix: reste vom DrawText-Umbau + + Rev 1.90 19 Jun 1997 16:05:42 HJS + includes + + Rev 1.89 17 Jun 1997 15:54:12 MA + DrawTxtShell nicht von BaseShell ableiten + Opts + + Rev 1.88 04 Jun 1997 11:30:26 TRI + svwin.h nur unter WIN oder WNT includen + + Rev 1.87 04 Jun 1997 09:54:48 NF + Includes... + + Rev 1.86 02 May 1997 20:15:40 NF + includes... + + Rev 1.85 08 Apr 1997 10:52:22 OM + Fehlende Includes + + Rev 1.84 02 Apr 1997 14:07:00 JP + Bug #38398#: StateUndo - Itemset weitergeben + + Rev 1.83 19 Mar 1997 12:48:20 AMA + Fix #37035: Speller am Outliner setzen. + + Rev 1.82 24 Feb 1997 16:53:08 OM + Silbentrennung in Draw-Objekten + + Rev 1.81 16 Dec 1996 10:41:50 OM + Cursor nach Initialisierung anzeigen + + Rev 1.80 11 Dec 1996 10:50:58 MA + Warnings + + Rev 1.79 26 Nov 1996 16:53:06 OS + Erste Schritte fuer OnlineSpelling in DrawTextObjekten + + Rev 1.78 19 Nov 1996 16:02:30 NF + defines... + + Rev 1.77 18 Nov 1996 16:05:50 OS + Set/GetControlWord an der OutlinerView benutzen + + Rev 1.76 18 Nov 1996 15:46:40 OS + AutoKorrektur auch im DrawText + + Rev 1.75 15 Nov 1996 13:34:02 OS + SvxTextTabDialog angebunden + + Rev 1.74 13 Nov 1996 20:29:36 MA + #33141# nicht den Mode verlassen + + Rev 1.73 07 Nov 1996 16:22:52 OM + Font nach Einfuegen:Sonderzeichen restaurieren + + Rev 1.72 07 Nov 1996 15:28:18 OM + RefDevice am Outliner setzen + + Rev 1.71 06 Nov 1996 16:41:26 OS + SID_SW_START statt RID_APP_START + + Rev 1.70 26 Sep 1996 15:41:54 OM + Neues Parent fuer Sonderzeichen-Dlg + + Rev 1.69 28 Aug 1996 15:55:00 OS + includes + + Rev 1.68 15 Aug 1996 13:44:22 JP + svdraw.hxx entfernt + + Rev 1.67 31 May 1996 11:09:30 NF + CLOOKS + + Rev 1.66 28 May 1996 11:56:16 TRI + CLOOKS + + Rev 1.65 21 May 1996 08:58:00 NF + CLOOKS + + Rev 1.64 22 Mar 1996 15:17:00 TRI + sfxiiter.hxx included + + Rev 1.63 29 Feb 1996 21:14:40 HJS + clooks + + Rev 1.62 19 Feb 1996 18:30:58 MA + chg: EndTextEdit ueber die fesh + + Rev 1.61 16 Feb 1996 09:14:48 SWG + CLOOK's + + Rev 1.60 07 Feb 1996 08:07:22 OS + SvxTextAttrDialog hat jetzt endgueltig 3 Parameter + + Rev 1.59 01 Feb 1996 08:07:18 SWG + TextAttrDialog wieder mal als nicht-Emergency-Version + +*************************************************************************/ + + + diff --git a/sw/source/ui/shells/frmsh.cxx b/sw/source/ui/shells/frmsh.cxx new file mode 100644 index 0000000000..e7351badd0 --- /dev/null +++ b/sw/source/ui/shells/frmsh.cxx @@ -0,0 +1,1082 @@ +/************************************************************************* + * + * $RCSfile: frmsh.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:46 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +#ifdef PRECOMPILED +#include "ui_pch.hxx" +#endif + +#pragma hdrstop + +#ifndef _HINTIDS_HXX +#include <hintids.hxx> +#endif +#ifndef _UIPARAM_HXX +#include <uiparam.hxx> +#endif + +#ifndef _SFX_WHITER_HXX //autogen +#include <svtools/whiter.hxx> +#endif +#ifndef _OFF_APP_HXX //autogen +#include <offmgr/app.hxx> +#endif +#ifndef _GOODIES_IMAPOBJ_HXX +#include <svtools/imapobj.hxx> +#endif +#ifndef _SVX_SRCHITEM_HXX +#include <svx/srchitem.hxx> +#endif +#ifndef _SFX_SAVEOPT_HXX //autogen +#include <sfx2/saveopt.hxx> +#endif +#ifndef _IMAP_HXX //autogen +#include <svtools/imap.hxx> +#endif +#ifndef _SFXVIEWFRM_HXX //autogen +#include <sfx2/viewfrm.hxx> +#endif +#ifndef _SB_SBSTAR_HXX //autogen +#include <basic/sbstar.hxx> +#endif +#ifndef _SFXRECTITEM_HXX //autogen +#include <svtools/rectitem.hxx> +#endif +#ifndef _SFXPTITEM_HXX //autogen +#include <svtools/ptitem.hxx> +#endif +#ifndef _SFXSTRITEM_HXX //autogen +#include <svtools/stritem.hxx> +#endif +#ifndef _SVX_COLRITEM_HXX //autogen +#include <svx/colritem.hxx> +#endif +#ifndef _SVX_BOLNITEM_HXX //autogen +#include <svx/bolnitem.hxx> +#endif +#ifndef _SVX_BOXITEM_HXX //autogen +#include <svx/boxitem.hxx> +#endif +#ifndef _SVX_PROTITEM_HXX //autogen +#include <svx/protitem.hxx> +#endif +#ifndef _SFXDISPATCH_HXX //autogen +#include <sfx2/dispatch.hxx> +#endif +#ifndef _SFXREQUEST_HXX //autogen +#include <sfx2/request.hxx> +#endif +#ifndef _SFXOBJFACE_HXX //autogen +#include <sfx2/objface.hxx> +#endif +#ifndef _SVX_HLNKITEM_HXX //autogen +#include <svx/hlnkitem.hxx> +#endif + + +#ifndef _FMTURL_HXX //autogen +#include <fmturl.hxx> +#endif +#ifndef _FMTCLDS_HXX //autogen +#include <fmtclds.hxx> +#endif +#ifndef _FMTCNCT_HXX //autogen +#include <fmtcnct.hxx> +#endif +#ifndef _SWMODULE_HXX +#include <swmodule.hxx> +#endif +#ifndef _WRTSH_HXX +#include <wrtsh.hxx> +#endif +#ifndef _VIEW_HXX +#include <view.hxx> +#endif +#ifndef _FRMATR_HXX +#include <frmatr.hxx> +#endif +#ifndef _UITOOL_HXX +#include <uitool.hxx> +#endif +#ifndef _FRMFMT_HXX +#include <frmfmt.hxx> +#endif +#ifndef _FRMSH_HXX +#include <frmsh.hxx> +#endif +#ifndef _FRMMGR_HXX +#include <frmmgr.hxx> +#endif +#ifndef _FRMDLG_HXX +#include <frmdlg.hxx> +#endif +#ifndef _SWEVENT_HXX +#include <swevent.hxx> +#endif +#ifndef _USRPREF_HXX +#include <usrpref.hxx> +#endif +#ifndef _EDTWIN_HXX +#include <edtwin.hxx> +#endif + +#ifndef _HELPID_H +#include <helpid.h> +#endif +#ifndef _CMDID_H +#include <cmdid.h> +#endif +#ifndef _GLOBALS_HRC +#include <globals.hrc> +#endif +#ifndef _POPUP_HRC +#include <popup.hrc> +#endif +#ifndef _SHELLS_HRC +#include <shells.hrc> +#endif + +// Prototypen ------------------------------------------------------------ + +void lcl_FrmGetMaxLineWidth(const SvxBorderLine* pBorderLine, SvxBorderLine& rBorderLine); + +#define SwFrameShell +#include "itemdef.hxx" +#include "swslots.hxx" + +SFX_IMPL_INTERFACE(SwFrameShell, SwBaseShell, SW_RES(STR_SHELLNAME_FRAME)) +{ + SFX_POPUPMENU_REGISTRATION(SW_RES(MN_FRM_POPUPMENU)); + SFX_OBJECTBAR_REGISTRATION(SFX_OBJECTBAR_OBJECT, SW_RES(RID_FRAME_TOOLBOX)); + SFX_OBJECTMENU_REGISTRATION(SID_OBJECTMENU0, SW_RES(MN_OBJECTMENU_FRAME)); +} + + + +void SwFrameShell::Execute(SfxRequest &rReq) +{ + //Erstmal die, die keinen FrmMgr benoetigen. + SwWrtShell &rSh = GetShell(); + BOOL bMore = FALSE; + const SfxItemSet* pArgs = rReq.GetArgs(); + const SfxPoolItem* pItem; + USHORT nSlot = rReq.GetSlot(); + + switch ( nSlot ) + { + case FN_FRAME_TO_ANCHOR: + if ( rSh.IsFrmSelected() ) + { + rSh.GotoFlyAnchor(); + rSh.EnterStdMode(); + rSh.CallChgLnk(); + } + break; + case SID_FRAME_TO_TOP: + rSh.SelectionToTop(); + break; + + case SID_FRAME_TO_BOTTOM: + rSh.SelectionToBottom(); + break; + + case FN_FRAME_UP: + rSh.SelectionToTop( FALSE ); + break; + + case FN_FRAME_DOWN: + rSh.SelectionToBottom( FALSE ); + break; + case FN_INSERT_FRAME: + if (!pArgs) + { + // Rahmen existiert bereits, Rahmendialog zur Bearbeitung oeffnen + SfxUInt16Item aDefPage(FN_FORMAT_FRAME_DLG, TP_COLUMN); + rSh.GetView().GetViewFrame()->GetDispatcher()->Execute( FN_FORMAT_FRAME_DLG, + SFX_CALLMODE_SYNCHRON|SFX_CALLMODE_RECORD, + &aDefPage, 0L ); + + } + else + { + // Rahmen existiert bereits, nur Spaltenanzahl wird geaendert + USHORT nCols = 1; + if(pArgs->GetItemState(SID_ATTR_COLUMNS, FALSE, &pItem) == SFX_ITEM_SET) + nCols = ((SfxUInt16Item *)pItem)->GetValue(); + + SfxItemSet aSet(GetPool(),RES_COL,RES_COL); + rSh.GetFlyFrmAttr( aSet ); + SwFmtCol aCol((const SwFmtCol&)aSet.Get(RES_COL)); + // GutterWidth wird nicht immer uebergeben, daher erst besorgen (siehe view2: Execute auf diesen Slot) + USHORT nGutterWidth = aCol.GetGutterWidth(); + if(!nCols ) + nCols++; + aCol.Init(nCols, nGutterWidth, aCol.GetWishWidth()); + aSet.Put(aCol); + // Vorlagen-AutoUpdate + SwFrmFmt* pFmt = rSh.GetCurFrmFmt(); + if(pFmt && pFmt->IsAutoUpdateFmt()) + { + rSh.AutoUpdateFrame(pFmt, aSet); + } + else + { + rSh.StartAllAction(); + rSh.SetFlyFrmAttr( aSet ); + rSh.SetModified(); + rSh.EndAllAction(); + } + + } + return; + + case SID_HYPERLINK_SETLINK: + { + if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_HYPERLINK_SETLINK, FALSE, &pItem)) + { + const SvxHyperlinkItem& rHLinkItem = *(const SvxHyperlinkItem *)pItem; + const String& rURL = rHLinkItem.GetURL(); + const String& rTarget = rHLinkItem.GetTargetFrame(); + + SfxItemSet aSet( rSh.GetAttrPool(), RES_URL, RES_URL ); + rSh.GetFlyFrmAttr( aSet ); + SwFmtURL aURL( (SwFmtURL&)aSet.Get( RES_URL ) ); + + String sOldName(rHLinkItem.GetName()); + String sFlyName(rSh.GetFlyName()); + if (sOldName.ToUpperAscii() != sFlyName.ToUpperAscii()) + { + String sName(sOldName); + USHORT i = 1; + while (rSh.FindFlyByName(sName)) + { + sName = sOldName; + sName += '_'; + sName += String::CreateFromInt32(i++); + } + rSh.SetFlyName(sName); + } + aURL.SetURL( rURL, FALSE ); + aURL.SetTargetFrameName(rTarget); + + aSet.Put( aURL ); + rSh.SetFlyFrmAttr( aSet ); + } + } + break; + + case FN_FRAME_CHAIN: + rSh.GetView().GetEditWin().SetChainMode( !rSh.GetView().GetEditWin().IsChainMode() ); + break; + + case FN_FRAME_UNCHAIN: + rSh.Unchain( (SwFrmFmt&)*rSh.GetFlyFrmFmt() ); + GetView().GetViewFrame()->GetBindings().Invalidate(FN_FRAME_CHAIN); + break; + + default: bMore = TRUE; + } + + if ( !bMore ) + { + return; + } + + SwFlyFrmAttrMgr aMgr( FALSE, &rSh, FRMMGR_TYPE_NONE ); + BOOL bUpdateMgr = TRUE; + BOOL bCopyToFmt = FALSE; + switch ( nSlot ) + { + case FN_FRAME_ALIGN_VERT_CENTER: + aMgr.SetVertOrientation( SVX_VERT_CENTER ); + break; + + case FN_FRAME_ALIGN_VERT_BOTTOM: + aMgr.SetVertOrientation( SVX_VERT_BOTTOM ); + break; + + case FN_FRAME_ALIGN_VERT_TOP: + aMgr.SetVertOrientation( SVX_VERT_TOP ); + break; + + case FN_FRAME_ALIGN_VERT_CHAR_CENTER: + aMgr.SetVertOrientation( SVX_VERT_CHAR_CENTER ); + break; + + case FN_FRAME_ALIGN_VERT_CHAR_BOTTOM: + aMgr.SetVertOrientation( SVX_VERT_CHAR_BOTTOM ); + break; + + case FN_FRAME_ALIGN_VERT_CHAR_TOP: + aMgr.SetVertOrientation( SVX_VERT_CHAR_TOP ); + break; + + case FN_FRAME_ALIGN_VERT_ROW_CENTER: + aMgr.SetVertOrientation( SVX_VERT_LINE_CENTER ); + break; + + case FN_FRAME_ALIGN_VERT_ROW_BOTTOM: + aMgr.SetVertOrientation( SVX_VERT_LINE_BOTTOM ); + break; + + case FN_FRAME_ALIGN_VERT_ROW_TOP: + aMgr.SetVertOrientation( SVX_VERT_LINE_TOP ); + break; + + case FN_FRAME_ALIGN_HORZ_CENTER: + aMgr.SetHorzOrientation( HORI_CENTER ); + break; + + case FN_FRAME_ALIGN_HORZ_RIGHT: + aMgr.SetHorzOrientation( HORI_RIGHT ); + break; + + case FN_FRAME_ALIGN_HORZ_LEFT: + aMgr.SetHorzOrientation( HORI_LEFT ); + break; + + case FN_SET_FRM_POSITION: + { + aMgr.SetAbsPos(((SfxPointItem &)pArgs->Get + (FN_SET_FRM_POSITION)).GetValue()); + } + break; + case SID_ATTR_BRUSH: + { + if(pArgs) + { + aMgr.SetAttrSet( *pArgs ); + bCopyToFmt = TRUE; + } + } + break; + case SID_ATTR_ULSPACE: + case SID_ATTR_LRSPACE: + { + if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(GetPool().GetWhich(nSlot), FALSE, &pItem)) + { + aMgr.SetAttrSet( *pArgs ); + if(SID_ATTR_ULSPACE == nSlot && SID_ATTR_ULSPACE == nSlot) + bCopyToFmt = TRUE; + } + } + break; + case FN_FORMAT_FRAME_DLG: + { + const int nSel = rSh.GetSelectionType(); + if (nSel & SwWrtShell::SEL_GRF) + { + rSh.GetView().GetViewFrame()->GetDispatcher()->Execute(FN_FORMAT_GRAFIC_DLG); + bUpdateMgr = FALSE; + } + else + { + //SFX_APP()->GetOptions().SetMetric(::GetDfltMetric()); + SfxItemSet aSet(GetPool(), RES_FRMATR_BEGIN, RES_FRMATR_END-1, + SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER, + FN_GET_PRINT_AREA, FN_GET_PRINT_AREA, + SID_ATTR_PAGE_SIZE, SID_ATTR_PAGE_SIZE, + SID_ATTR_BRUSH, SID_ATTR_BRUSH, + SID_ATTR_LRSPACE, SID_ATTR_ULSPACE, + FN_SURROUND, FN_HORI_ORIENT, + FN_SET_FRM_NAME, FN_SET_FRM_NAME, + FN_KEEP_ASPECT_RATIO, FN_KEEP_ASPECT_RATIO, + SID_DOCFRAME, SID_DOCFRAME, + SID_HTML_MODE, SID_HTML_MODE, + FN_SET_FRM_ALT_NAME, FN_SET_FRM_ALT_NAME, + 0); + + const SwViewOption* pVOpt = rSh.GetViewOptions(); + if(nSel & SwWrtShell::SEL_OLE) + { + 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 & SwWrtShell::SEL_OLE) + aSet.Put(SfxStringItem(FN_SET_FRM_ALT_NAME, rSh.GetAlternateText())); + + const SwRect &rPg = rSh.GetAnyCurRect(RECT_PAGE); + SwFmtFrmSize aFrmSize(ATT_VAR_SIZE, rPg.Width(), rPg.Height()); + aFrmSize.SetWhich(GetPool().GetWhich(SID_ATTR_PAGE_SIZE)); + aSet.Put(aFrmSize); + + const SwRect &rPr = rSh.GetAnyCurRect(RECT_PAGE_PRT); + SwFmtFrmSize aPrtSize(ATT_VAR_SIZE, rPr.Width(), rPr.Height()); + aPrtSize.SetWhich(GetPool().GetWhich(FN_GET_PRINT_AREA)); + aSet.Put(aPrtSize); + + aSet.Put(aMgr.GetAttrSet()); + aSet.SetParent( aMgr.GetAttrSet().GetParent() ); + + // Bei %-Werten Groesse initialisieren + SwFmtFrmSize& rSize = (SwFmtFrmSize&)aSet.Get(RES_FRM_SIZE); + if (rSize.GetWidthPercent() && rSize.GetWidthPercent() != 0xff) + rSize.SetWidth(rSh.GetAnyCurRect(RECT_FLY_EMBEDDED).Width()); + if (rSize.GetHeightPercent() && rSize.GetHeightPercent() != 0xff) + rSize.SetHeight(rSh.GetAnyCurRect(RECT_FLY_EMBEDDED).Height()); + + UINT16 nDefPage = 0; + 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())); + + + SwFrmDlg *pDlg = new SwFrmDlg( GetView().GetViewFrame(), + GetView().GetWindow(), + aSet, FALSE, + nSel & SwWrtShell::SEL_GRF ? DLG_FRM_GRF : + nSel & SwWrtShell::SEL_OLE ? DLG_FRM_OLE : + DLG_FRM_STD, + FALSE, + nDefPage); + + if ( pDlg->Execute() ) + { + const SfxItemSet* pOutSet = pDlg->GetOutputItemSet(); + if(pOutSet) + { + if(nSel & SwWrtShell::SEL_OLE && + SFX_ITEM_SET == pOutSet->GetItemState(FN_KEEP_ASPECT_RATIO, TRUE, &pItem)) + { + SwViewOption aUsrPref( *pVOpt ); + aUsrPref.SetKeepRatio(((const SfxBoolItem*)pItem)->GetValue()); + SW_MOD()->ApplyUsrPref(aUsrPref, &GetView()); + } + if (SFX_ITEM_SET == pOutSet->GetItemState(FN_SET_FRM_ALT_NAME, TRUE, &pItem)) + { + rSh.SetAlternateText(((const SfxStringItem*)pItem)->GetValue()); + } + // Vorlagen-AutoUpdate + SwFrmFmt* pFmt = rSh.GetCurFrmFmt(); + if(pFmt && pFmt->IsAutoUpdateFmt()) + { + rSh.AutoUpdateFrame(pFmt, *pOutSet); + const SfxPoolItem* pItem; + // alles, dass das Format nicht kann, muss hart + // gesetzt werden + if(SFX_ITEM_SET == pOutSet->GetItemState(FN_SET_FRM_NAME, FALSE, &pItem)) + rSh.SetFlyName(((SfxStringItem*)pItem)->GetValue()); + SfxItemSet aShellSet(GetPool(), RES_FRM_SIZE, RES_FRM_SIZE, + RES_SURROUND, RES_SURROUND, + RES_ANCHOR, RES_ANCHOR, + RES_VERT_ORIENT,RES_HORI_ORIENT, + 0); + aShellSet.Put(*pOutSet); + aMgr.SetAttrSet(aShellSet); + if(SFX_ITEM_SET == pOutSet->GetItemState(FN_SET_FRM_NAME, FALSE, &pItem)) + rSh.SetFlyName(((SfxStringItem*)pItem)->GetValue()); + } + else + aMgr.SetAttrSet( *pOutSet ); + + } + } + else + bUpdateMgr = FALSE; + delete pDlg; + } + } + break; + case FN_FRAME_MIRROR_ON_EVEN_PAGES: + { + SwFmtHoriOrient aHori(aMgr.GetHoriOrient()); + BOOL bMirror = !aHori.IsPosToggle(); + aHori.SetPosToggle(bMirror); + SfxItemSet aSet(GetPool(), RES_HORI_ORIENT, RES_HORI_ORIENT); + aSet.Put(aHori); + aMgr.SetAttrSet(aSet); + bCopyToFmt = TRUE; + rReq.SetReturnValue(SfxBoolItem(nSlot, bMirror)); + } + break; + default: + ASSERT( !this, "falscher Dispatcher" ); + return; + } + // Vorlagen-AutoUpdate + SwFrmFmt* pFmt = rSh.GetCurFrmFmt(); + if ( bUpdateMgr ) + { + if(bCopyToFmt && pFmt && pFmt->IsAutoUpdateFmt()) + { + rSh.AutoUpdateFrame(pFmt, aMgr.GetAttrSet()); + } + else + aMgr.UpdateFlyFrm(); + } + +} + +/*-------------------------------------------------------------------- + Beschreibung: + --------------------------------------------------------------------*/ + + +void SwFrameShell::GetState(SfxItemSet& rSet) +{ + SwWrtShell &rSh = GetShell(); + BOOL bHtmlMode = 0 != ::GetHtmlMode(rSh.GetView().GetDocShell()); + if (rSh.IsFrmSelected()) + { + SfxItemSet aSet( rSh.GetAttrPool(), + RES_LR_SPACE, RES_UL_SPACE, + RES_PROTECT, RES_HORI_ORIENT, + RES_OPAQUE, RES_OPAQUE, + RES_PRINT, RES_OPAQUE, + 0 ); + rSh.GetFlyFrmAttr( aSet ); + + BOOL bProtect = rSh.IsSelObjProtected(FLYPROTECT_POS); + BOOL bParentCntProt = rSh.IsSelObjProtected( (FlyProtectType)(FLYPROTECT_CONTENT|FLYPROTECT_PARENT) ) != 0; + + bProtect |= bParentCntProt; + + const USHORT eFrmType = rSh.GetFrmType(0,TRUE); + SwFlyFrmAttrMgr aMgr( FALSE, &rSh, FRMMGR_TYPE_NONE ); + + SfxWhichIter aIter( rSet ); + USHORT nWhich = aIter.FirstWhich(); + while ( nWhich ) + { + switch ( nWhich ) + { + case RES_FRM_SIZE: + { + SwFmtFrmSize aSz(aMgr.GetFrmSize()); + rSet.Put(aSz); + } + break; + case RES_VERT_ORIENT: + case RES_HORI_ORIENT: + case SID_ATTR_ULSPACE: + case SID_ATTR_LRSPACE: + case RES_LR_SPACE: + case RES_UL_SPACE: + case RES_PROTECT: + case RES_OPAQUE: + case RES_PRINT: + case RES_SURROUND: + { + rSet.Put(aSet.Get(GetPool().GetWhich(nWhich), TRUE )); + } + break; + case FN_FRAME_ALIGN_HORZ_CENTER: + case FN_FRAME_ALIGN_HORZ_RIGHT: + case FN_FRAME_ALIGN_HORZ_LEFT: + if ( (eFrmType & FRMTYPE_FLY_INCNT) || + bProtect || + nWhich == FN_FRAME_ALIGN_HORZ_CENTER && bHtmlMode ) + rSet.DisableItem( nWhich ); + break; + case FN_FRAME_ALIGN_VERT_ROW_TOP: + case FN_FRAME_ALIGN_VERT_ROW_CENTER: + case FN_FRAME_ALIGN_VERT_ROW_BOTTOM: + case FN_FRAME_ALIGN_VERT_CHAR_TOP: + 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 ) + rSet.DisableItem( nWhich ); + break; + 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) + rSet.DisableItem( nWhich ); + else + { + USHORT nId = 0; + if (eFrmType & FRMTYPE_FLY_INCNT) + { + switch (nWhich) + { + case FN_FRAME_ALIGN_VERT_TOP: + nId = STR_TOP_BASE; break; + case FN_FRAME_ALIGN_VERT_CENTER: + nId = STR_CENTER_BASE; break; + case FN_FRAME_ALIGN_VERT_BOTTOM: + if(!bHtmlMode) + nId = STR_BOTTOM_BASE; + else + rSet.DisableItem( nWhich ); + break; + } + } + else + { + if (nWhich == FN_FRAME_ALIGN_VERT_CENTER || + nWhich == FN_FRAME_ALIGN_VERT_BOTTOM) + { + if (aMgr.GetAnchor() == FLY_AT_FLY) + { + const SwFrmFmt* pFmt = rSh.IsFlyInFly(); + if (pFmt) + { + const SwFmtFrmSize& rFrmSz = pFmt->GetFrmSize(); + if (rFrmSz.GetSizeType() != ATT_FIX_SIZE) + { + rSet.DisableItem( nWhich ); + break; + } + } + } + } + switch (nWhich) + { + case FN_FRAME_ALIGN_VERT_TOP: + nId = STR_TOP; break; + case FN_FRAME_ALIGN_VERT_CENTER: + nId = STR_CENTER_VERT; break; + case FN_FRAME_ALIGN_VERT_BOTTOM: + nId = STR_BOTTOM; break; + } + } + if ( nId ) + rSet.Put( SfxStringItem( nWhich, SW_RES(nId) )); + } + break; + case SID_HYPERLINK_GETLINK: + { + String sURL; + SvxHyperlinkItem aHLinkItem; + const SfxPoolItem* pItem; + + SfxItemSet aSet(GetPool(), RES_URL, RES_URL); + rSh.GetFlyFrmAttr( aSet ); + + if(SFX_ITEM_SET == aSet.GetItemState(RES_URL, TRUE, &pItem)) + { + const SwFmtURL* pFmtURL = (const SwFmtURL*)pItem; + aHLinkItem.SetURL(pFmtURL->GetURL()); + aHLinkItem.SetTargetFrame(pFmtURL->GetTargetFrameName()); + aHLinkItem.SetName(rSh.GetFlyName()); + } + + aHLinkItem.SetInsertMode((SvxLinkInsertMode)(aHLinkItem.GetInsertMode() | + (bHtmlMode ? HLINK_HTMLMODE : 0))); + + rSet.Put(aHLinkItem); + } + break; + + case FN_FRAME_CHAIN: + { + const SwFrmFmt *pFmt = rSh.GetFlyFrmFmt(); + if ( bParentCntProt || rSh.GetView().GetEditWin().GetApplyTemplate() || + !pFmt || pFmt->GetChain().GetNext() ) + { + rSet.DisableItem( FN_FRAME_CHAIN ); + } + else + { + BOOL bChainMode = rSh.GetView().GetEditWin().IsChainMode(); + rSet.Put( SfxBoolItem( FN_FRAME_CHAIN, bChainMode ) ); + } + break; + } + + case FN_FRAME_UNCHAIN: + { + const SwFrmFmt *pFmt = rSh.GetFlyFrmFmt(); + if ( bParentCntProt || rSh.GetView().GetEditWin().GetApplyTemplate() || + !pFmt || !pFmt->GetChain().GetNext() ) + { + rSet.DisableItem( FN_FRAME_UNCHAIN ); + } + break; + } + + case SID_FRAME_TO_TOP: + case SID_FRAME_TO_BOTTOM: + case FN_FRAME_UP: + case FN_FRAME_DOWN: + case FN_FORMAT_FRAME_DLG: + if ( bParentCntProt ) + rSet.DisableItem( nWhich ); + break; + + default: + /* do nothing */; + break; + } + nWhich = aIter.NextWhich(); + } + } +} + +/*-------------------------------------------------------------------- + Beschreibung: Ctor fuer FrameShell + --------------------------------------------------------------------*/ + + +SwFrameShell::SwFrameShell(SwView &rView) : + SwBaseShell( rView ) +{ + SetName(String::CreateFromAscii("Frame")); + SetHelpId(SW_FRAMESHELL); +} + +/*-------------------------------------------------------------------- + Beschreibung: + --------------------------------------------------------------------*/ + + + +void SwFrameShell::ExecFrameStyle(SfxRequest& rReq) +{ + SwWrtShell &rSh = GetShell(); + BOOL bDefault = FALSE; + if (!rSh.IsFrmSelected()) + return; + + // Erst Default-BoxItem aus Pool holen. Wenn ungleich normalem Boxitem, + // dann ist es bereits geaendert worden (neues ist kein Default). + const SvxBoxItem* pPoolBoxItem = (const SvxBoxItem*)::GetDfltAttr(RES_BOX); + + const SfxItemSet *pArgs = rReq.GetArgs(); + SfxItemSet aFrameSet(rSh.GetAttrPool(), RES_BOX, RES_BOX); + + rSh.GetFlyFrmAttr( aFrameSet ); + const SvxBoxItem& rBoxItem = (const SvxBoxItem&)aFrameSet.Get(RES_BOX); + + if (pPoolBoxItem == &rBoxItem) + bDefault = TRUE; + + SvxBoxItem aBoxItem(rBoxItem); + + SvxBorderLine aBorderLine; + const SfxPoolItem *pItem = 0; + + if(pArgs) //irgendein Controller kann auch mal nichts liefern #48169# + { + switch (rReq.GetSlot()) + { + case SID_ATTR_BORDER: + { + if (pArgs->GetItemState(RES_BOX, TRUE, &pItem) == SFX_ITEM_SET) + { + SvxBoxItem aNewBox(*((SvxBoxItem *)pItem)); + const SvxBorderLine* pBorderLine; + + if ((pBorderLine = aBoxItem.GetTop()) != NULL) + lcl_FrmGetMaxLineWidth(pBorderLine, aBorderLine); + if ((pBorderLine = aBoxItem.GetBottom()) != NULL) + lcl_FrmGetMaxLineWidth(pBorderLine, aBorderLine); + if ((pBorderLine = aBoxItem.GetLeft()) != NULL) + lcl_FrmGetMaxLineWidth(pBorderLine, aBorderLine); + if ((pBorderLine = aBoxItem.GetRight()) != NULL) + lcl_FrmGetMaxLineWidth(pBorderLine, aBorderLine); + + if(aBorderLine.GetOutWidth() == 0) + { + aBorderLine.SetInWidth(0); + aBorderLine.SetOutWidth(DEF_LINE_WIDTH_0); + aBorderLine.SetDistance(0); + } + //Distance nur setzen, wenn der Request vom Controller kommt + + if(!StarBASIC::IsRunning()) + { + aNewBox.SetDistance( rBoxItem.GetDistance() ); + } + + aBoxItem = aNewBox; + SvxBorderLine aDestBorderLine; + + if ((pBorderLine = aBoxItem.GetTop()) != NULL) + aBoxItem.SetLine(&aBorderLine, BOX_LINE_TOP); + if ((pBorderLine = aBoxItem.GetBottom()) != NULL) + aBoxItem.SetLine(&aBorderLine, BOX_LINE_BOTTOM); + if ((pBorderLine = aBoxItem.GetLeft()) != NULL) + aBoxItem.SetLine(&aBorderLine, BOX_LINE_LEFT); + if ((pBorderLine = aBoxItem.GetRight()) != NULL) + aBoxItem.SetLine(&aBorderLine, BOX_LINE_RIGHT); + } + } + break; + + case SID_FRAME_LINESTYLE: + { + if (pArgs->GetItemState(SID_FRAME_LINESTYLE, FALSE, &pItem) == SFX_ITEM_SET) + { + const SvxLineItem* pLineItem = + (const SvxLineItem*)pItem; + + if ( pLineItem->GetLine() ) + { + aBorderLine = *(pLineItem->GetLine()); + + if (!aBoxItem.GetTop() && !aBoxItem.GetBottom() && + !aBoxItem.GetLeft() && !aBoxItem.GetRight()) + { + aBoxItem.SetLine(&aBorderLine, BOX_LINE_TOP); + aBoxItem.SetLine(&aBorderLine, BOX_LINE_BOTTOM); + aBoxItem.SetLine(&aBorderLine, BOX_LINE_LEFT); + aBoxItem.SetLine(&aBorderLine, BOX_LINE_RIGHT); + } + else + { + if( aBoxItem.GetTop() ) + { + aBorderLine.SetColor( aBoxItem.GetTop()->GetColor() ); + aBoxItem.SetLine(&aBorderLine, BOX_LINE_TOP); + } + if( aBoxItem.GetBottom() ) + { + aBorderLine.SetColor( aBoxItem.GetBottom()->GetColor()); + aBoxItem.SetLine(&aBorderLine, BOX_LINE_BOTTOM); + } + if( aBoxItem.GetLeft() ) + { + aBorderLine.SetColor( aBoxItem.GetLeft()->GetColor()); + aBoxItem.SetLine(&aBorderLine, BOX_LINE_LEFT); + } + if( aBoxItem.GetRight() ) + { + aBorderLine.SetColor(aBoxItem.GetRight()->GetColor()); + aBoxItem.SetLine(&aBorderLine, BOX_LINE_RIGHT); + } + } + } + else + { + aBoxItem.SetLine(0, BOX_LINE_TOP); + aBoxItem.SetLine(0, BOX_LINE_BOTTOM); + aBoxItem.SetLine(0, BOX_LINE_LEFT); + aBoxItem.SetLine(0, BOX_LINE_RIGHT); + } + } + } + break; + + case SID_FRAME_LINECOLOR: + { + if (pArgs->GetItemState(SID_FRAME_LINECOLOR, FALSE, &pItem) == SFX_ITEM_SET) + { + const Color& rNewColor = ((const SvxColorItem*)pItem)->GetValue(); + + if (!aBoxItem.GetTop() && !aBoxItem.GetBottom() && + !aBoxItem.GetLeft() && !aBoxItem.GetRight()) + { + aBorderLine.SetColor( rNewColor ); + aBoxItem.SetLine(&aBorderLine, BOX_LINE_TOP); + aBoxItem.SetLine(&aBorderLine, BOX_LINE_BOTTOM); + aBoxItem.SetLine(&aBorderLine, BOX_LINE_LEFT); + aBoxItem.SetLine(&aBorderLine, BOX_LINE_RIGHT); + } + else + { + if ( aBoxItem.GetTop() ) + ((SvxBorderLine*)aBoxItem.GetTop())->SetColor( rNewColor ); + if ( aBoxItem.GetBottom() ) + ((SvxBorderLine*)aBoxItem.GetBottom())->SetColor( rNewColor ); + if ( aBoxItem.GetLeft() ) + ((SvxBorderLine*)aBoxItem.GetLeft())->SetColor( rNewColor ); + if ( aBoxItem.GetRight() ) + ((SvxBorderLine*)aBoxItem.GetRight())->SetColor( rNewColor ); + } + } + } + break; + } + } + if (bDefault && (aBoxItem.GetTop() || aBoxItem.GetBottom() || + aBoxItem.GetLeft() || aBoxItem.GetRight())) + { + aBoxItem.SetDistance(MIN_BORDER_DIST); + } + aFrameSet.Put( aBoxItem ); + // Vorlagen-AutoUpdate + SwFrmFmt* pFmt = rSh.GetCurFrmFmt(); + if(pFmt && pFmt->IsAutoUpdateFmt()) + { + rSh.AutoUpdateFrame(pFmt, aFrameSet); + } + else + rSh.SetFlyFrmAttr( aFrameSet ); + +} + + + +void lcl_FrmGetMaxLineWidth(const SvxBorderLine* pBorderLine, SvxBorderLine& rBorderLine) +{ + if(pBorderLine->GetInWidth() > rBorderLine.GetInWidth()) + rBorderLine.SetInWidth(pBorderLine->GetInWidth()); + + if(pBorderLine->GetOutWidth() > rBorderLine.GetOutWidth()) + rBorderLine.SetOutWidth(pBorderLine->GetOutWidth()); + + if(pBorderLine->GetDistance() > rBorderLine.GetDistance()) + rBorderLine.SetDistance(pBorderLine->GetDistance()); + + rBorderLine.SetColor(pBorderLine->GetColor()); +} + + + +void SwFrameShell::GetLineStyleState(SfxItemSet &rSet) +{ + SwWrtShell &rSh = GetShell(); + BOOL bParentCntProt = rSh.IsSelObjProtected( (FlyProtectType)(FLYPROTECT_CONTENT|FLYPROTECT_PARENT) ) != 0; + + if (bParentCntProt) + { + if (rSh.IsFrmSelected()) + rSet.DisableItem( SID_FRAME_LINECOLOR ); + + rSet.DisableItem( SID_ATTR_BORDER ); + rSet.DisableItem( SID_FRAME_LINESTYLE ); + } + else + { + if (rSh.IsFrmSelected()) + { + SfxItemSet aFrameSet( rSh.GetAttrPool(), RES_BOX, RES_BOX ); + + rSh.GetFlyFrmAttr(aFrameSet); + + const SvxBorderLine* pLine = ((const SvxBoxItem&)aFrameSet.Get(RES_BOX)).GetTop(); + rSet.Put(SvxColorItem(pLine ? pLine->GetColor() : Color(), SID_FRAME_LINECOLOR)); + } + rSet.Put(SfxUInt16Item(SID_ATTR_BORDER, TRUE)); // Rahmencontroller: letzte Zeile einklappen + } +} + + + +void SwFrameShell::GetBckColState(SfxItemSet &rSet) +{ + SwBaseShell::GetBckColState( rSet ); +} + + + +void SwFrameShell::ExecBckCol(SfxRequest& rReq) +{ + SwBaseShell::ExecBckCol( rReq ); +} + + + +void SwFrameShell::StateInsert(SfxItemSet &rSet) +{ + const int nSel = GetShell().GetSelectionType(); + + if ((nSel & SwWrtShell::SEL_GRF) || (nSel & SwWrtShell::SEL_OLE)) + rSet.DisableItem(FN_INSERT_FRAME); +} + +/*------------------------------------------------------------------------ + + $Log: not supported by cvs2svn $ + Revision 1.199 2000/09/18 16:06:04 willem.vandorp + OpenOffice header added. + + Revision 1.198 2000/09/07 15:59:29 os + change: SFX_DISPATCHER/SFX_BINDINGS removed + + Revision 1.197 2000/08/17 11:42:59 jp + remove the SW graphicmanager + + Revision 1.196 2000/05/26 07:21:32 os + old SW Basic API Slots removed + + Revision 1.195 2000/05/10 11:53:01 os + Basic API removed + + Revision 1.194 2000/04/20 12:51:52 os + GetName() returns String& + + Revision 1.193 2000/04/18 14:58:23 os + UNICODE + + Revision 1.192 2000/03/03 15:17:03 os + StarView remainders removed + + Revision 1.191 1999/09/24 14:38:32 os + hlnkitem.hxx now in SVX + + Revision 1.190 1999/07/30 15:39:08 HR + #65293#: conflict with <goodies/grfmgr.hxx> + + + Rev 1.189 30 Jul 1999 17:39:08 HR + #65293#: conflict with <goodies/grfmgr.hxx> + + Rev 1.188 02 Feb 1999 13:35:28 JP + Task #58423#: InsertDBCol - optional kann eine Rahmenvorlage mitgegeben werden + + Rev 1.187 29 Jan 1999 17:19:38 JP + Task #58423#: Reports mit Bildern aus der Datenbank + + Rev 1.186 27 Nov 1998 15:50:18 AMA + Fix #59951#59825#: Unterscheiden zwischen Rahmen-,Seiten- und Bereichsspalten + + Rev 1.185 08 Sep 1998 17:03:06 OS + #56134# Metric fuer Text und HTML getrennt + +------------------------------------------------------------------------*/ + + + diff --git a/sw/source/ui/shells/grfsh.cxx b/sw/source/ui/shells/grfsh.cxx new file mode 100644 index 0000000000..df4587e111 --- /dev/null +++ b/sw/source/ui/shells/grfsh.cxx @@ -0,0 +1,1010 @@ +/************************************************************************* + * + * $RCSfile: grfsh.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:46 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +#ifdef PRECOMPILED +#include "ui_pch.hxx" +#endif + +#pragma hdrstop + + +#ifndef _CMDID_H +#include <cmdid.h> +#endif +#ifndef _HINTIDS_HXX +#include <hintids.hxx> +#endif +#ifndef _UIPARAM_HXX +#include <uiparam.hxx> +#endif + +#ifndef _URLOBJ_HXX //autogen +#include <tools/urlobj.hxx> +#endif +#ifndef _MSGBOX_HXX //autogen +#include <vcl/msgbox.hxx> +#endif +#ifndef _SFXSTRITEM_HXX //autogen +#include <svtools/stritem.hxx> +#endif +#ifndef _SFX_WHITER_HXX //autogen +#include <svtools/whiter.hxx> +#endif +#ifndef SVTOOLS_URIHELPER_HXX +#include <svtools/urihelper.hxx> +#endif +#ifndef _SFXDISPATCH_HXX //autogen +#include <sfx2/dispatch.hxx> +#endif +#ifndef _SVX_SIZEITEM_HXX //autogen +#include <svx/sizeitem.hxx> +#endif +#ifndef _SVX_PROTITEM_HXX //autogen +#include <svx/protitem.hxx> +#endif +#ifndef _SFX_SAVEOPT_HXX //autogen +#include <sfx2/saveopt.hxx> +#endif +#ifndef _SFXREQUEST_HXX //autogen +#include <sfx2/request.hxx> +#endif +#ifndef _SVX_SRCHITEM_HXX +#include <svx/srchitem.hxx> +#endif +#ifndef _SVX_IMPGRF_HXX //autogen +#include <svx/impgrf.hxx> +#endif +#ifndef _SVX_HTMLMODE_HXX //autogen +#include <svx/htmlmode.hxx> +#endif +#ifndef _SDGLUITM_HXX +#include <svx/sdgluitm.hxx> +#endif +#ifndef _SDGCOITM_HXX +#include <svx/sdgcoitm.hxx> +#endif +#ifndef _SDGGAITM_HXX +#include <svx/sdggaitm.hxx> +#endif +#ifndef _SDGTRITM_HXX +#include <svx/sdgtritm.hxx> +#endif +#ifndef _SDGINITM_HXX +#include <svx/sdginitm.hxx> +#endif +#ifndef _SDGMOITM_HXX +#include <svx/sdgmoitm.hxx> +#endif +#ifndef _SVX_BRSHITEM_HXX //autogen +#include <svx/brshitem.hxx> +#endif + +#ifndef _FMTURL_HXX //autogen +#include <fmturl.hxx> +#endif +#ifndef _VIEW_HXX +#include <view.hxx> +#endif +#ifndef _WRTSH_HXX +#include <wrtsh.hxx> +#endif +#ifndef _VIEWOPT_HXX +#include <viewopt.hxx> +#endif +#ifndef _SWMODULE_HXX +#include <swmodule.hxx> +#endif +#ifndef _FRMATR_HXX +#include <frmatr.hxx> +#endif +#ifndef _SWUNDO_HXX +#include <swundo.hxx> +#endif +#ifndef _UITOOL_HXX +#include <uitool.hxx> +#endif +#ifndef _DOCSH_HXX +#include <docsh.hxx> +#endif +#ifndef _TEXTSH_HXX +#include <textsh.hxx> +#endif +#ifndef _GRFSH_HXX +#include <grfsh.hxx> +#endif +#ifndef _FRMMGR_HXX +#include <frmmgr.hxx> +#endif +#ifndef _FRMDLG_HXX +#include <frmdlg.hxx> +#endif +#ifndef _FRMFMT_HXX +#include <frmfmt.hxx> +#endif +#ifndef _GRFATR_HXX +#include <grfatr.hxx> +#endif +#ifndef _USRPREF_HXX +#include <usrpref.hxx> +#endif +#ifndef _EDTWIN_HXX +#include <edtwin.hxx> +#endif +#ifndef _CAPTION_HXX +#include <caption.hxx> +#endif +#ifndef _SWWAIT_HXX +#include <swwait.hxx> +#endif + +#ifndef _SHELLS_HRC +#include <shells.hrc> +#endif +#ifndef _POPUP_HRC +#include <popup.hrc> +#endif + +#define SwGrfShell +#include "itemdef.hxx" +#include "swslots.hxx" + + + +SFX_IMPL_INTERFACE(SwGrfShell, SwBaseShell, SW_RES(STR_SHELLNAME_GRAPHIC)) +{ + SFX_POPUPMENU_REGISTRATION(SW_RES(MN_GRF_POPUPMENU)); + SFX_OBJECTBAR_REGISTRATION(SFX_OBJECTBAR_OBJECT, SW_RES(RID_GRAFIK_TOOLBOX)); + SFX_OBJECTMENU_REGISTRATION(SID_OBJECTMENU0, SW_RES(MN_OBJECTMENU_GRAFIK)); +} + + +void SwGrfShell::Execute(SfxRequest &rReq) +{ + const SfxItemSet* pArgs = rReq.GetArgs(); + SwWrtShell &rSh = GetShell(); + + USHORT nSlot = rReq.GetSlot(); + switch(nSlot) + { + case SID_INSERT_GRAPHIC: + case FN_FORMAT_GRAFIC_DLG: + { + SwFlyFrmAttrMgr aMgr( FALSE, &rSh, rSh.IsFrmSelected() ? + FRMMGR_TYPE_NONE : FRMMGR_TYPE_GRF); + const SwViewOption* pVOpt = rSh.GetViewOptions(); + SwViewOption aUsrPref( *pVOpt ); + + SfxItemSet aSet(GetPool(), RES_FRMATR_BEGIN, RES_FRMATR_END-1, + RES_GRFATR_MIRRORGRF, RES_GRFATR_CROPGRF, + SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER, + SID_ATTR_GRAF_KEEP_ZOOM, SID_ATTR_GRAF_KEEP_ZOOM, + SID_ATTR_GRAF_FRMSIZE, SID_ATTR_GRAF_FRMSIZE, + SID_ATTR_GRAF_FRMSIZE_PERCENT, SID_ATTR_GRAF_FRMSIZE_PERCENT, + SID_ATTR_GRAF_GRAPHIC, SID_ATTR_GRAF_GRAPHIC, + FN_PARAM_GRF_CONNECT, FN_PARAM_GRF_CONNECT, + SID_ATTR_PAGE_SIZE, SID_ATTR_PAGE_SIZE, + FN_GET_PRINT_AREA, FN_GET_PRINT_AREA, + FN_SET_FRM_NAME, FN_KEEP_ASPECT_RATIO, + FN_PARAM_GRF_DIALOG, FN_PARAM_GRF_DIALOG, + SID_DOCFRAME, SID_DOCFRAME, + SID_HTML_MODE, SID_HTML_MODE, + FN_SET_FRM_ALT_NAME, FN_SET_FRM_ALT_NAME, + 0); + + USHORT nHtmlMode = ::GetHtmlMode(GetView().GetDocShell()); + aSet.Put(SfxUInt16Item(SID_HTML_MODE, nHtmlMode)); + FieldUnit eMetric = ::GetDfltMetric((0 != (nHtmlMode&HTMLMODE_ON))); + SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, eMetric)); + + const SwRect* pRect = &rSh.GetAnyCurRect(RECT_PAGE); + SwFmtFrmSize aFrmSize( ATT_VAR_SIZE, pRect->Width(), pRect->Height()); + aFrmSize.SetWhich( GetPool().GetWhich( SID_ATTR_PAGE_SIZE ) ); + aSet.Put( aFrmSize ); + + aSet.Put(SfxStringItem(FN_SET_FRM_NAME, rSh.GetFlyName())); + if(nSlot == FN_FORMAT_GRAFIC_DLG) + aSet.Put(SfxStringItem(FN_SET_FRM_ALT_NAME, rSh.GetAlternateText())); + + pRect = &rSh.GetAnyCurRect(RECT_PAGE_PRT); + aFrmSize.SetWidth( pRect->Width() ); + aFrmSize.SetHeight( pRect->Height() ); + aFrmSize.SetWhich( GetPool().GetWhich(FN_GET_PRINT_AREA) ); + aSet.Put( aFrmSize ); + + aSet.Put( aMgr.GetAttrSet() ); + aSet.SetParent( aMgr.GetAttrSet().GetParent() ); + + // Bei %-Werten Groesse initialisieren + SwFmtFrmSize& rSize = (SwFmtFrmSize&)aSet.Get(RES_FRM_SIZE); + if (rSize.GetWidthPercent() && rSize.GetWidthPercent() != 0xff) + rSize.SetWidth(rSh.GetAnyCurRect(RECT_FLY_EMBEDDED).Width()); + if (rSize.GetHeightPercent() && rSize.GetHeightPercent() != 0xff) + rSize.SetHeight(rSh.GetAnyCurRect(RECT_FLY_EMBEDDED).Height()); + + // and now set the size for "external" tabpages + { + SvxSizeItem aSzItm( SID_ATTR_GRAF_FRMSIZE, rSize.GetSize() ); + aSet.Put( aSzItm ); + + Size aSz( rSize.GetWidthPercent(), rSize.GetHeightPercent() ); + if( 0xff == aSz.Width() ) aSz.Width() = 0; + if( 0xff == aSz.Height() ) aSz.Height() = 0; + + aSzItm.SetSize( aSz ); + aSzItm.SetWhich( SID_ATTR_GRAF_FRMSIZE_PERCENT ); + aSet.Put( aSzItm ); + } + + String sGrfNm, sFilterNm; + rSh.GetGrfNms( &sGrfNm, &sFilterNm ); + if( sGrfNm.Len() ) + { + aSet.Put( SvxBrushItem( INetURLObject::decode( sGrfNm, + INET_HEX_ESCAPE, + INetURLObject::DECODE_WITH_CHARSET, + RTL_TEXTENCODING_UTF8 ), + sFilterNm, GPOS_LT, + SID_ATTR_GRAF_GRAPHIC )); + } + else + { + aSet.Put( SvxBrushItem( rSh.GetGraphicObj(), GPOS_LT, + SID_ATTR_GRAF_GRAPHIC )); + } + aSet.Put(SfxBoolItem( FN_PARAM_GRF_CONNECT, sGrfNm.Len() )); + + // get Mirror and Crop + { + SfxItemSet aTmpSet( rSh.GetAttrPool(), + RES_GRFATR_MIRRORGRF, RES_GRFATR_CROPGRF ); + + rSh.GetAttr( aTmpSet ); + aSet.Put( aTmpSet ); + } + + 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())); + + SwFrmDlg *pDlg = new SwFrmDlg( GetView().GetViewFrame(), + GetView().GetWindow(), + aSet, FALSE, DLG_FRM_GRF ); + if( pDlg->Execute() ) + { + rSh.StartAllAction(); + rSh.StartUndo(UNDO_START); + const SfxPoolItem* pItem; + SfxItemSet* pSet = (SfxItemSet*)pDlg->GetOutputItemSet(); + + // change the 2 frmsize SizeItems to the correct SwFrmSizeItem + if( SFX_ITEM_SET == pSet->GetItemState( + SID_ATTR_GRAF_FRMSIZE, FALSE, &pItem )) + { + SwFmtFrmSize aSize; + const Size& rSz = ((SvxSizeItem*)pItem)->GetSize(); + aSize.SetWidth( rSz.Width() ); + aSize.SetHeight( rSz.Height() ); + + if( SFX_ITEM_SET == pSet->GetItemState( + SID_ATTR_GRAF_FRMSIZE_PERCENT, FALSE, &pItem )) + { + const Size& rSz = ((SvxSizeItem*)pItem)->GetSize(); + aSize.SetWidthPercent( rSz.Width() ); + aSize.SetHeightPercent( rSz.Height() ); + } + pSet->Put( aSize ); + } + else + pSet->ClearItem( RES_FRM_SIZE ); + + // Vorlagen-AutoUpdate + SwFrmFmt* pFmt = rSh.GetCurFrmFmt(); + if(pFmt && pFmt->IsAutoUpdateFmt()) + { + pFmt->SetAttr(*pSet); + SfxItemSet aShellSet(GetPool(), RES_FRM_SIZE, RES_FRM_SIZE, + RES_SURROUND, RES_SURROUND, + RES_ANCHOR, RES_ANCHOR, + RES_VERT_ORIENT,RES_HORI_ORIENT, + 0); + aShellSet.Put(*pSet); + aMgr.SetAttrSet(aShellSet); + } + else + { + aMgr.SetAttrSet(*pSet); + } + aMgr.UpdateFlyFrm(); + + BOOL bApplyUsrPref = FALSE; + if (SFX_ITEM_SET == pSet->GetItemState( + FN_KEEP_ASPECT_RATIO, TRUE, &pItem )) + { + aUsrPref.SetKeepRatio( + ((const SfxBoolItem*)pItem)->GetValue() ); + bApplyUsrPref = TRUE; + } + if( SFX_ITEM_SET == pSet->GetItemState( + SID_ATTR_GRAF_KEEP_ZOOM, TRUE, &pItem )) + { + aUsrPref.SetGrfKeepZoom( + ((const SfxBoolItem*)pItem)->GetValue() ); + bApplyUsrPref = TRUE; + } + + if( bApplyUsrPref ) + SW_MOD()->ApplyUsrPref(aUsrPref, &GetView()); + + // and now set all the graphic attributes and other stuff + if( SFX_ITEM_SET == pSet->GetItemState( + SID_ATTR_GRAF_GRAPHIC, TRUE, &pItem )) + { + if( ((SvxBrushItem*)pItem)->GetGraphicLink() ) + sGrfNm = *((SvxBrushItem*)pItem)->GetGraphicLink(); + else + sGrfNm.Erase(); + + if( ((SvxBrushItem*)pItem)->GetGraphicFilter() ) + sFilterNm = *((SvxBrushItem*)pItem)->GetGraphicFilter(); + else + sFilterNm.Erase(); + + if( sGrfNm.Len() ) + { + SwWait aWait( *GetView().GetDocShell(), TRUE ); + rSh.ReRead( URIHelper::SmartRelToAbs( sGrfNm ), + sFilterNm, 0 ); + } + } + if( SFX_ITEM_SET == pSet->GetItemState( + FN_SET_FRM_ALT_NAME, TRUE, &pItem )) + rSh.SetAlternateText( + ((const SfxStringItem*)pItem)->GetValue() ); + + SfxItemSet aGrfSet( rSh.GetAttrPool(), RES_GRFATR_BEGIN, + RES_GRFATR_END-1 ); + aGrfSet.Put( *pSet ); + if( aGrfSet.Count() ) + rSh.SetAttr( aGrfSet ); + + rSh.EndUndo(UNDO_END); + rSh.EndAllAction(); + } + delete pDlg; + } + break; + + case SID_SIM_START: + if ( SFX_APP()->HasFeature( SFX_FEATURE_SIMAGE )) + { + String sGrfNm; + rSh.GetGrfNms( &sGrfNm, 0 ); + + if( sGrfNm.Len() ) + { + InfoBox aAsk( GetView().GetWindow(), + SW_RES(MSG_REMOVE_LINK)); + if( RET_NO == aAsk.Execute()) + break; + } + + GetView().GetEditWin().GrfToOle(); + if( rSh.IsOLEObj() ) + { + rSh.LaunchOLEObj(); + } + else + rSh.GetView().GetViewFrame()->GetDispatcher()->Execute( FN_FORMAT_GRAFIC_DLG ); + } + break; + case FN_GRAPHIC_MIRROR_ON_EVEN_PAGES: + { + SfxItemSet aSet(rSh.GetAttrPool(), RES_GRFATR_MIRRORGRF, RES_GRFATR_MIRRORGRF); + rSh.GetAttr( aSet ); + SwMirrorGrf aGrf((const SwMirrorGrf &)aSet.Get(RES_GRFATR_MIRRORGRF)); + aGrf.SetGrfToggle(!aGrf.IsGrfToggle()); + rSh.SetAttr(aGrf); + } + break; + + + default: + ASSERT(!this, falscher Dispatcher); + return; + } + +} + + +void SwGrfShell::ExecAttr( SfxRequest &rReq ) +{ + USHORT nGrfType; + if( CNT_GRF == GetShell().GetCntType() && + ( GRAPHIC_BITMAP == ( nGrfType = GetShell().GetGraphicType()) || + GRAPHIC_GDIMETAFILE == nGrfType )) + { + SfxItemSet aGrfSet( GetShell().GetAttrPool(), RES_GRFATR_BEGIN, + RES_GRFATR_END -1 ); + const SfxItemSet *pArgs = rReq.GetArgs(); + const SfxPoolItem* pItem; + USHORT nSlot = rReq.GetSlot(); + if( !pArgs || SFX_ITEM_SET != pArgs->GetItemState( nSlot, FALSE, &pItem )) + pItem = 0; + + switch( nSlot ) + { + case FN_FLIP_VERT_GRAFIC: + case FN_FLIP_HORZ_GRAFIC: + { + GetShell().GetAttr( aGrfSet ); + SwMirrorGrf aMirror( (SwMirrorGrf&)aGrfSet.Get( + RES_GRFATR_MIRRORGRF ) ); + USHORT nMirror = aMirror.GetValue(); + if( FN_FLIP_VERT_GRAFIC == nSlot ) + switch( nMirror ) + { + case RES_DONT_MIRROR_GRF: nMirror = RES_MIRROR_GRF_VERT; + break; + case RES_MIRROR_GRF_HOR: nMirror = RES_MIRROR_GRF_BOTH; + break; + case RES_MIRROR_GRF_VERT: nMirror = RES_DONT_MIRROR_GRF; + break; + case RES_MIRROR_GRF_BOTH: nMirror = RES_MIRROR_GRF_HOR; + break; + } + else + switch( nMirror ) + { + case RES_DONT_MIRROR_GRF: nMirror = RES_MIRROR_GRF_HOR; + break; + case RES_MIRROR_GRF_VERT: nMirror = RES_MIRROR_GRF_BOTH; + break; + case RES_MIRROR_GRF_HOR: nMirror = RES_DONT_MIRROR_GRF; + break; + case RES_MIRROR_GRF_BOTH: nMirror = RES_MIRROR_GRF_VERT; + break; + } + aMirror.SetValue( nMirror ); + aGrfSet.ClearItem(); + aGrfSet.Put( aMirror ); + } + break; + + case SID_ATTR_GRAF_LUMINANCE: + if( pItem ) + aGrfSet.Put( SwLuminanceGrf( + ((SfxInt16Item*)pItem)->GetValue() )); + break; + case SID_ATTR_GRAF_CONTRAST: + if( pItem ) + aGrfSet.Put( SwContrastGrf( + ((SfxInt16Item*)pItem)->GetValue() )); + break; + case SID_ATTR_GRAF_RED: + if( pItem ) + aGrfSet.Put( SwChannelRGrf( + ((SfxInt16Item*)pItem)->GetValue() )); + break; + case SID_ATTR_GRAF_GREEN: + if( pItem ) + aGrfSet.Put( SwChannelGGrf( + ((SfxInt16Item*)pItem)->GetValue() )); + break; + case SID_ATTR_GRAF_BLUE: + if( pItem ) + aGrfSet.Put( SwChannelBGrf( + ((SfxInt16Item*)pItem)->GetValue() )); + break; + case SID_ATTR_GRAF_GAMMA: + if( pItem ) + aGrfSet.Put( SwGammaGrf( + ((SfxUInt32Item*)pItem)->GetValue() / 100 )); + break; + case SID_ATTR_GRAF_TRANSPARENCE: + if( pItem ) + aGrfSet.Put( SwTransparencyGrf( + ((SfxUInt16Item*)pItem)->GetValue() )); + break; + case SID_ATTR_GRAF_INVERT: + if( pItem ) + aGrfSet.Put( SwInvertGrf( + ((SfxBoolItem*)pItem)->GetValue() )); + break; + + case SID_ATTR_GRAF_MODE: + if( pItem ) + aGrfSet.Put( SwDrawModeGrf( + ((SfxUInt16Item*)pItem)->GetValue() )); + break; + + default: + ASSERT(!this, falscher Dispatcher); + } + if( aGrfSet.Count() ) + GetShell().SetAttr( aGrfSet ); + } + GetView().GetViewFrame()->GetBindings().Invalidate(rReq.GetSlot()); +} + + +void SwGrfShell::GetState(SfxItemSet &rSet) +{ + // case SID_SIM_START: + if ( GetShell().IsSelObjProtected(FLYPROTECT_CONTENT) || + !SFX_APP()->HasFeature( SFX_FEATURE_SIMAGE ) ) + { + rSet.DisableItem(SID_SIM_START); + } + else + { + SwDocShell &rSh = *GetView().GetDocShell(); + if ( rSh.GetProtocol().IsInPlaceActive() || + rSh.GetCreateMode() == SFX_CREATE_MODE_EMBEDDED ) + rSet.DisableItem(SID_SIM_START); + } +} + + +void SwGrfShell::GetAttrState(SfxItemSet &rSet) +{ + SwWrtShell &rSh = GetShell(); + SfxItemSet aCoreSet( GetPool(), aNoTxtNodeSetRange ); + rSh.GetAttr( aCoreSet ); + BOOL bParentCntProt = 0 != rSh.IsSelObjProtected( + (FlyProtectType)(FLYPROTECT_CONTENT|FLYPROTECT_PARENT) ); + + SfxWhichIter aIter( rSet ); + USHORT nWhich = aIter.FirstWhich(); + while( nWhich ) + { + BOOL bDisable = bParentCntProt; + switch( nWhich ) + { + case FN_FORMAT_GRAFIC_DLG: + break; + + case FN_FLIP_VERT_GRAFIC: + if( !bParentCntProt ) + { + UINT16 nState = ((const SwMirrorGrf &) aCoreSet.Get( + RES_GRFATR_MIRRORGRF )).GetValue(); + + rSet.Put(SfxBoolItem( nWhich, nState == RES_MIRROR_GRF_VERT || + nState == RES_MIRROR_GRF_BOTH)); + } + break; + + case FN_FLIP_HORZ_GRAFIC: + if( !bParentCntProt ) + { + UINT16 nState = ((const SwMirrorGrf &) aCoreSet.Get( + RES_GRFATR_MIRRORGRF )).GetValue(); + + rSet.Put(SfxBoolItem( nWhich, nState == RES_MIRROR_GRF_HOR || + nState == RES_MIRROR_GRF_BOTH)); + } + break; + + + case SID_ATTR_GRAF_LUMINANCE: + if( !bParentCntProt ) + rSet.Put( SfxInt16Item( nWhich, ((SwLuminanceGrf&) + aCoreSet.Get(RES_GRFATR_LUMINANCE)).GetValue() )); + break; + case SID_ATTR_GRAF_CONTRAST: + if( !bParentCntProt ) + rSet.Put( SfxInt16Item( nWhich, ((SwContrastGrf&) + aCoreSet.Get(RES_GRFATR_CONTRAST)).GetValue() )); + break; + case SID_ATTR_GRAF_RED: + if( !bParentCntProt ) + rSet.Put( SfxInt16Item( nWhich, ((SwChannelRGrf&) + aCoreSet.Get(RES_GRFATR_CHANNELR)).GetValue() )); + break; + case SID_ATTR_GRAF_GREEN: + if( !bParentCntProt ) + rSet.Put( SfxInt16Item( nWhich, ((SwChannelGGrf&) + aCoreSet.Get(RES_GRFATR_CHANNELG)).GetValue() )); + break; + case SID_ATTR_GRAF_BLUE: + if( !bParentCntProt ) + rSet.Put( SfxInt16Item( nWhich, ((SwChannelBGrf&) + aCoreSet.Get(RES_GRFATR_CHANNELB)).GetValue() )); + break; + + case SID_ATTR_GRAF_GAMMA: + if( !bParentCntProt ) + rSet.Put( SfxUInt32Item( nWhich, ((SwGammaGrf&) + aCoreSet.Get(RES_GRFATR_GAMMA)).GetValue() * 100 )); + break; + case SID_ATTR_GRAF_TRANSPARENCE: + if( !bParentCntProt ) + { + const GraphicObject& rGrfObj = rSh.GetGraphicObj(); + if( rGrfObj.IsAnimated() || + GRAPHIC_GDIMETAFILE == rGrfObj.GetType() ) + bDisable = TRUE; + else + rSet.Put( SfxUInt16Item( nWhich, ((SwTransparencyGrf&) + aCoreSet.Get(RES_GRFATR_TRANSPARENCY)).GetValue() )); + } + break; + case SID_ATTR_GRAF_INVERT: + if( !bParentCntProt ) + rSet.Put( SfxBoolItem( nWhich, ((SwInvertGrf&) + aCoreSet.Get(RES_GRFATR_INVERT)).GetValue() )); + break; + + case SID_ATTR_GRAF_MODE: + if( !bParentCntProt ) + rSet.Put( SfxUInt16Item( nWhich, (GraphicDrawMode)((SwDrawModeGrf&) + aCoreSet.Get(RES_GRFATR_DRAWMODE)).GetValue() )); + break; + + default: + bDisable = FALSE; + } + + if( bDisable ) + rSet.DisableItem( nWhich ); + nWhich = aIter.NextWhich(); + } +} + + +SwGrfShell::SwGrfShell(SwView &rView) : + SwBaseShell(rView) + +{ + SetName(String::CreateFromAscii("Graphic")); + SetHelpId(SW_GRFSHELL); +} + + +BOOL SwTextShell::InsertGraphicDlg() +{ +#ifndef ENABLE_PROP_WITHOUTLINK +#define ENABLE_PROP_WITHOUTLINK 0x08 +#endif + + BOOL bReturn = FALSE; + SwView &rVw = GetView(); + USHORT nHtmlMode = ::GetHtmlMode(rVw.GetDocShell()); + // im HTML-Mode nur verknuepft einfuegen + USHORT nEnable = ENABLE_ALL; + if(nHtmlMode & HTMLMODE_ON) + { + nEnable &= ~ENABLE_LINK; + nEnable |= ENABLE_PROP_WITHOUTLINK; + } + SvxImportGraphicDialog *pDlg = + new SvxImportGraphicDialog( rVw.GetWindow(), + SW_RESSTR(STR_INSERT_GRAPHIC ), nEnable ); + + pDlg->SetPropertyHdl(LINK(this, SwTextShell, InitGraphicFrame)); + + ASSERT( !pInsGrfSetPtr, "who has not delete the GraphicSet pointer?" ); + pInsGrfSetPtr = 0; + + if( pDlg->Execute() == RET_OK ) + { + GetShell().StartAction(); + GetShell().StartUndo(UNDO_INSERT); + Graphic* pPreViewGrf = pDlg->GetGraphic(); + + BOOL bAsLink = nHtmlMode & HTMLMODE_ON ? TRUE : pDlg->AsLink(); + USHORT nError = InsertGraphic( pDlg->GetPath(), pDlg->GetCurFilter(), + bAsLink, &pDlg->GetFilter(), pPreViewGrf ); + + // Format ist ungleich Current Filter, jetzt mit auto. detection + if( nError == GRFILTER_FORMATERROR ) + nError = InsertGraphic( pDlg->GetPath(), aEmptyStr, bAsLink, + &pDlg->GetFilter(), pPreViewGrf ); + + RESOURCE_TYPE nResId = 0; + switch( nError ) + { + case GRFILTER_OPENERROR: + nResId = STR_GRFILTER_OPENERROR; + break; + case GRFILTER_IOERROR: + nResId = STR_GRFILTER_IOERROR; + break; + case GRFILTER_FORMATERROR: + nResId = STR_GRFILTER_FORMATERROR; + break; + case GRFILTER_VERSIONERROR: + nResId = STR_GRFILTER_VERSIONERROR; + break; + case GRFILTER_FILTERERROR: + nResId = STR_GRFILTER_FILTERERROR; + break; + case GRFILTER_TOOBIG: + nResId = STR_GRFILTER_TOOBIG; + break; + } + + if( nResId ) + { + GetShell().EndAction(); + InfoBox aInfoBox( rVw.GetWindow(), SW_RESSTR( nResId )); + aInfoBox.Execute(); + } + else + { + // set the specific graphic attrbutes to the graphic + if( pInsGrfSetPtr ) + { + // set the normal graphic attributes + SwWrtShell& rSh = GetShell(); + rSh.SetAttr( *pInsGrfSetPtr ); + const SfxPoolItem* pItem; + if( SFX_ITEM_SET == pInsGrfSetPtr->GetItemState( + FN_SET_FRM_ALT_NAME, TRUE, &pItem )) + rSh.SetAlternateText( + ((const SfxStringItem*)pItem)->GetValue() ); + } + GetShell().EndAction(); + bReturn = TRUE; + rVw.AutoCaption( GRAPHIC_CAP ); + } + rVw.GetWrtShell().EndUndo(UNDO_INSERT); // wegen moegl. Shellwechsel + } + + delete pInsGrfSetPtr, pInsGrfSetPtr = 0; + + DELETEZ( pFrmMgr ); + delete pDlg; + + return bReturn; +} + +/*-------------------------------------------------------------------- + Beschreibung: + --------------------------------------------------------------------*/ + + +IMPL_LINK( SwTextShell, InitGraphicFrame, Button *, pButton ) +{ +//OS: pButton ist eigentlich der Pointer auf den GrafikEinfuegen-Dialog + SwWrtShell &rSh = GetShell(); + SwViewOption aUsrPref( *rSh.GetViewOptions() ); + SvxImportGraphicDialog* pGrfDlg = (SvxImportGraphicDialog*) pButton; + if (!pFrmMgr) + pFrmMgr = new SwFlyFrmAttrMgr( TRUE, &rSh, FRMMGR_TYPE_GRF ); + + static USHORT __READONLY_DATA aGrfAttrRange[] = + { + RES_FRMATR_BEGIN, RES_FRMATR_END-1, + SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER, + + SID_ATTR_GRAF_KEEP_ZOOM, SID_ATTR_GRAF_KEEP_ZOOM, + SID_ATTR_GRAF_FRMSIZE, SID_ATTR_GRAF_FRMSIZE, + SID_ATTR_GRAF_FRMSIZE_PERCENT, SID_ATTR_GRAF_FRMSIZE_PERCENT, + SID_ATTR_GRAF_GRAPHIC, SID_ATTR_GRAF_GRAPHIC, + + FN_PARAM_GRF_CONNECT, FN_PARAM_GRF_CONNECT, + FN_PARAM_FILTER, FN_PARAM_FILTER, + RES_GRFATR_MIRRORGRF, RES_GRFATR_CROPGRF, + SID_ATTR_PAGE_SIZE, SID_ATTR_PAGE_SIZE, + FN_GET_PRINT_AREA, FN_GET_PRINT_AREA, + FN_SET_FRM_NAME, FN_SET_FRM_NAME, + FN_KEEP_ASPECT_RATIO, FN_KEEP_ASPECT_RATIO, + FN_PARAM_GRF_REALSIZE, FN_PARAM_GRF_DIALOG, + SID_DOCFRAME, SID_DOCFRAME, + SID_HTML_MODE, SID_HTML_MODE, + FN_SET_FRM_ALT_NAME, FN_SET_FRM_ALT_NAME, + 0 + }; + + SfxItemSet aSet(GetPool(), aGrfAttrRange ); + + const SwRect &rPg = GetShell().GetAnyCurRect(RECT_PAGE); + SwFmtFrmSize aFrmSize(ATT_VAR_SIZE, rPg.Width(), rPg.Height()); + aFrmSize.SetWhich(GetPool().GetWhich(SID_ATTR_PAGE_SIZE)); + aSet.Put(aFrmSize); + + const SwRect &rPr = GetShell().GetAnyCurRect(RECT_PAGE_PRT); + SwFmtFrmSize aPrtSize(ATT_VAR_SIZE, rPr.Width(), rPr.Height()); + aPrtSize.SetWhich(GetPool().GetWhich(FN_GET_PRINT_AREA)); + aSet.Put(aPrtSize); + + aSet.Put( pFrmMgr->GetAttrSet() ); + aSet.SetParent( pFrmMgr->GetAttrSet().GetParent() ); + + aSet.Put(SfxFrameItem( SID_DOCFRAME, GetView().GetViewFrame()->GetTopFrame())); + + // niemals connected, sonst darf man den Grafikdialog doppelt aufrufen! + aSet.Put(SfxBoolItem(FN_PARAM_GRF_CONNECT, FALSE)); + aSet.Put(SfxBoolItem(FN_KEEP_ASPECT_RATIO, aUsrPref.IsKeepRatio())); + + aSet.Put(SfxUInt16Item(SID_HTML_MODE, ::GetHtmlMode(GetView().GetDocShell()))); + + const Graphic* pGrf = pGrfDlg->GetGraphic(); + if(pGrf) + { + Size aSize = ::GetGraphicSizeTwip(*pGrf, &GetView().GetEditWin()); + aSize.Width() += pFrmMgr->CalcWidthSpace(); + aSize.Height()+= pFrmMgr->CalcHeightSpace(); + aSet.Put(SwFmtFrmSize(ATT_VAR_SIZE, aSize.Width(), aSize.Height())); + aSet.Put(SvxSizeItem( FN_PARAM_GRF_REALSIZE, aSize )); + aSet.Put( SvxSizeItem( SID_ATTR_GRAF_FRMSIZE, aSize )); + + String sGrfNm( pGrfDlg->GetPath() ); + if( sGrfNm.Len() ) + { + aSet.Put( SvxBrushItem( INetURLObject::decode( sGrfNm, + INET_HEX_ESCAPE, + INetURLObject::DECODE_WITH_CHARSET, + RTL_TEXTENCODING_UTF8 ), + aEmptyStr, GPOS_LT, + SID_ATTR_GRAF_GRAPHIC )); + } + else + { + aSet.Put( SvxBrushItem( *pGrf, GPOS_LT, SID_ATTR_GRAF_GRAPHIC )); + } + } + + + SwFrmDlg *pDlg = new SwFrmDlg( GetView().GetViewFrame(), pButton, + aSet, pGrf == 0, DLG_FRM_GRF ); + if( pDlg->Execute() ) + { + SfxItemSet* pSet = (SfxItemSet*)pDlg->GetOutputItemSet(); + + // change the 2 frmsize SizeItems to the correct SwFrmSizeItem + const SfxPoolItem* pItem; + if( SFX_ITEM_SET == pSet->GetItemState( + SID_ATTR_GRAF_FRMSIZE, FALSE, &pItem )) + { + SwFmtFrmSize aSize; + const Size& rSz = ((SvxSizeItem*)pItem)->GetSize(); + aSize.SetWidth( rSz.Width() ); + aSize.SetHeight( rSz.Height() ); + + if( SFX_ITEM_SET == pSet->GetItemState( + SID_ATTR_GRAF_FRMSIZE_PERCENT, FALSE, &pItem )) + { + const Size& rSz = ((SvxSizeItem*)pItem)->GetSize(); + aSize.SetWidthPercent( rSz.Width() ); + aSize.SetHeightPercent( rSz.Height() ); + } + pSet->Put( aSize ); + } + else + pSet->ClearItem( RES_FRM_SIZE ); + + pFrmMgr->SetAttrSet( *pSet ); + + if( SFX_ITEM_SET == pSet->GetItemState(FN_KEEP_ASPECT_RATIO, TRUE, &pItem)) + { + aUsrPref.SetKeepRatio( ((const SfxBoolItem*)pItem)->GetValue() ); + SW_MOD()->ApplyUsrPref(aUsrPref, &GetView()); + } + + if( pInsGrfSetPtr ) + pInsGrfSetPtr->ClearItem(); + else + pInsGrfSetPtr = new SfxItemSet( rSh.GetAttrPool(), + RES_GRFATR_MIRRORGRF, RES_GRFATR_CROPGRF, + FN_SET_FRM_ALT_NAME, FN_SET_FRM_ALT_NAME, + 0 ); + + pInsGrfSetPtr->Put( *pSet ); + if( !pInsGrfSetPtr->Count() ) + delete pInsGrfSetPtr, pInsGrfSetPtr = 0; + } + + delete pDlg; + + return 0; +} + +/*------------------------------------------------------------------------ + + $Log: not supported by cvs2svn $ + Revision 1.134 2000/09/18 16:06:04 willem.vandorp + OpenOffice header added. + + Revision 1.133 2000/09/07 15:59:29 os + change: SFX_DISPATCHER/SFX_BINDINGS removed + + Revision 1.132 2000/08/25 14:08:54 jp + Graphic Crop-Attribut and TabPage exported to SVX + + Revision 1.131 2000/08/17 11:43:17 jp + remove the SW graphicmanager and UI with decoded URLs + + Revision 1.130 2000/08/17 06:34:11 jp + Bug #77713#: GetAttrState - Transparency not for animated graphics and metafiles + + Revision 1.129 2000/08/08 13:44:14 os + #77423# separate graphic shell + + Revision 1.128 2000/08/02 08:04:26 jp + changes for graphic attributes + + Revision 1.127 2000/07/31 19:25:36 jp + new attributes for CJK/CTL and graphic + + Revision 1.126 2000/05/26 07:21:32 os + old SW Basic API Slots removed + + Revision 1.125 2000/05/10 11:53:02 os + Basic API removed + + Revision 1.124 2000/04/18 14:58:24 os + UNICODE + + Revision 1.123 2000/02/11 14:57:17 hr + #70473# changes for unicode ( patched by automated patchtool ) + + Revision 1.122 1999/11/22 14:55:36 os + operator precedence + + Revision 1.121 1999/03/18 13:40:50 OS + #61169# #61489# Masseinheiten fuer Text u. HTML am Module setzen, nicht an der App + +------------------------------------------------------------------------*/ + + diff --git a/sw/source/ui/shells/listsh.cxx b/sw/source/ui/shells/listsh.cxx new file mode 100644 index 0000000000..243499deb3 --- /dev/null +++ b/sw/source/ui/shells/listsh.cxx @@ -0,0 +1,362 @@ +/************************************************************************* + * + * $RCSfile: listsh.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:47 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +#ifdef PRECOMPILED +#include "ui_pch.hxx" +#endif + +#pragma hdrstop + +#include "cmdid.h" +#include "uiparam.hxx" +#include "hintids.hxx" + +#ifndef _SVX_SIZEITEM_HXX //autogen +#include <svx/sizeitem.hxx> +#endif +#ifndef _SVX_BRSHITEM_HXX //autogen +#include <svx/brshitem.hxx> +#endif +#ifndef _SFXAPP_HXX //autogen +#include <sfx2/app.hxx> +#endif +#ifndef _SFXREQUEST_HXX //autogen +#include <sfx2/request.hxx> +#endif +#ifndef _SFXOBJFACE_HXX //autogen +#include <sfx2/objface.hxx> +#endif +#ifndef _SFX_BINDINGS_HXX //autogen +#include <sfx2/bindings.hxx> +#endif +#ifndef _SFXSTRITEM_HXX //autogen +#include <svtools/stritem.hxx> +#endif +#ifndef _SFXENUMITEM_HXX //autogen +#include <svtools/eitem.hxx> +#endif +#ifndef _URLOBJ_HXX //autogen +#include <tools/urlobj.hxx> +#endif +#ifndef _SFX_WHITER_HXX //autogen +#include <svtools/whiter.hxx> +#endif +#ifndef _SFXINTITEM_HXX //autogen +#include <svtools/intitem.hxx> +#endif +#ifndef _SHL_HXX //autogen +#include <tools/shl.hxx> +#endif +#ifndef _SVX_SRCHITEM_HXX //autogen +#include <svx/srchitem.hxx> +#endif +#ifndef _SFXVIEWFRM_HXX +#include <sfx2/viewfrm.hxx> +#endif + + +#ifndef _FMTORNT_HXX //autogen +#include <fmtornt.hxx> +#endif +#include "wrtsh.hxx" +#include "swmodule.hxx" +#include "frmatr.hxx" +#include "helpid.h" +#include "globals.hrc" +#include "shells.hrc" +#include "uinums.hxx" +#include "listsh.hxx" +#include "poolfmt.hxx" +#include "view.hxx" +#include "edtwin.hxx" + +#define SwListShell +#include "itemdef.hxx" +#include "swslots.hxx" + + +SFX_IMPL_INTERFACE(SwListShell, SwBaseShell, SW_RES(STR_SHELLNAME_LIST)) +{ + SFX_OBJECTBAR_REGISTRATION(SFX_OBJECTBAR_OBJECT, SW_RES(RID_NUM_TOOLBOX)); + SFX_OBJECTMENU_REGISTRATION(SID_OBJECTMENU0, SW_RES(MN_OBJECTMENU_LIST)); +} + + +TYPEINIT1(SwListShell,SwBaseShell) + + +void SwListShell::Execute(SfxRequest &rReq) +{ + const SfxItemSet* pArgs = rReq.GetArgs(); + USHORT nSlot = rReq.GetSlot(); + SwWrtShell& rSh = GetShell(); + switch (nSlot) + { + case FN_NUM_BULLET_DOWN: + rSh.NumUpDown(); + GetView().GetViewFrame()->GetBindings().Invalidate( SID_TABLE_CELL ); // StatusZeile updaten! + break; + + case FN_NUM_BULLET_NEXT: + rSh.GotoNextNum(); + break; + + case FN_NUM_BULLET_NONUM: + rSh.NoNum(); + break; + + case FN_NUM_BULLET_OFF: + rSh.DelNumRules(); + break; + + case FN_NUM_BULLET_OUTLINE_DOWN: + rSh.MoveNumParas(FALSE, FALSE); + break; + + case FN_NUM_BULLET_OUTLINE_MOVEDOWN: + rSh.MoveNumParas(TRUE, FALSE); + break; + + case FN_NUM_BULLET_OUTLINE_MOVEUP: + rSh.MoveNumParas(TRUE, TRUE); + break; + + case FN_NUM_BULLET_OUTLINE_UP: + rSh.MoveNumParas(FALSE, TRUE); + break; + + case FN_NUM_BULLET_PREV: + rSh.GotoPrevNum(); + break; + + case FN_NUM_BULLET_UP: + rSh.NumUpDown(FALSE); + GetView().GetViewFrame()->GetBindings().Invalidate( SID_TABLE_CELL ); // StatusZeile updaten! + break; + + + case FN_NUM_OR_NONUM: + { + BOOL bApi = rReq.IsAPI(); + BOOL bDelete = !rSh.IsNoNum(!bApi); + if(pArgs ) + bDelete = ((SfxBoolItem &)pArgs->Get(rReq.GetSlot())).GetValue(); + rSh.NumOrNoNum( bDelete, !bApi ); + } + break; + case FN_NUMBER_NEWSTART: + rSh.SetNumRuleStart(!rSh.IsNumRuleStart()); + break; + + default: + ASSERT(!this, falscher Dispatcher); + return; + } +} + + +void SwListShell::GetState(SfxItemSet &rSet) +{ + SfxWhichIter aIter( rSet ); + USHORT nWhich = aIter.FirstWhich(); + while ( nWhich ) + { + switch( nWhich ) + { + case FN_NUM_OR_NONUM: + rSet.Put(SfxBoolItem(nWhich, GetShell().IsNoNum(FALSE))); + break; + case FN_NUMBER_NEWSTART: + rSet.Put(SfxBoolItem(nWhich, GetShell().IsNumRuleStart())); + break; + } + nWhich = aIter.NextWhich(); + } +} + + +SwListShell::SwListShell(SwView &rView) : + SwBaseShell(rView) +{ + SetName(String::CreateFromAscii("List")); + SetHelpId(SW_LISTSHELL); +} + +/*------------------------------------------------------------------------ + + $Log: not supported by cvs2svn $ + Revision 1.68 2000/09/18 16:06:04 willem.vandorp + OpenOffice header added. + + Revision 1.67 2000/09/07 15:59:30 os + change: SFX_DISPATCHER/SFX_BINDINGS removed + + Revision 1.66 2000/05/26 07:21:32 os + old SW Basic API Slots removed + + Revision 1.65 2000/05/10 11:53:02 os + Basic API removed + + Revision 1.64 2000/04/18 14:58:24 os + UNICODE + + Revision 1.63 1999/03/12 14:13:38 OS + #63141# BulletURL setzen-> Groesse ermitteln + + + Rev 1.62 12 Mar 1999 15:13:38 OS + #63141# BulletURL setzen-> Groesse ermitteln + + Rev 1.61 17 Nov 1998 10:58:32 OS + #58263# NumType durch SvxExtNumType ersetzt + + Rev 1.60 06 Nov 1998 14:41:48 OS + #57903# NumOff kann weg + + Rev 1.59 08 Dec 1997 11:50:04 OS + benannte Numerierungen entfernt + + Rev 1.58 03 Dec 1997 17:07:08 OS + FN_NUMBER_NEWSTART eingebaut + + Rev 1.57 24 Nov 1997 11:01:02 JP + Execute: bei NumUp/-Down die Statusleiste invalidieren + + Rev 1.56 24 Nov 1997 09:47:04 MA + includes + + Rev 1.55 17 Nov 1997 10:21:14 JP + Umstellung Numerierung + + Rev 1.54 03 Nov 1997 13:55:48 MA + precomp entfernt + + Rev 1.53 19 Aug 1997 10:54:50 OS + Exchange wird per API mit String beliefert #42898# + + Rev 1.52 15 Aug 1997 11:48:38 OS + chartar/frmatr/txtatr aufgeteilt + + Rev 1.51 11 Aug 1997 09:12:28 OS + paraitem/frmitems/textitem aufgeteilt + + Rev 1.50 05 Aug 1997 16:29:14 TJ + include svx/srchitem.hxx + + Rev 1.49 08 Jul 1997 14:11:46 OS + ConfigItems von der App ans Module + + Rev 1.48 11 Mar 1997 16:27:00 AMA + New: Absaetze verschieben durch Strg + CursorUp/Down (auch ausserhalb von Num.) + + Rev 1.47 20 Feb 1997 19:40:08 OS + includes + + Rev 1.46 20 Feb 1997 17:18:26 OS + kleiner Bug + + Rev 1.45 20 Feb 1997 11:58:54 OS + NumLevel ans Basic rausgeben + + Rev 1.44 19 Feb 1997 16:57:22 OS + Basic fuer die NumRules + + Rev 1.43 11 Dec 1996 10:50:56 MA + Warnings + + Rev 1.42 11 Nov 1996 13:37:34 MA + ResMgr + + Rev 1.41 28 Aug 1996 15:55:18 OS + includes + + Rev 1.40 13 Aug 1996 12:38:40 OS + neue Shellnamen im IDL-Interface + + Rev 1.39 22 Jul 1996 20:54:26 JP + Anpassung an die neuen SwUiNumRules + + Rev 1.38 25 Jun 1996 19:50:52 HJS + includes + + Rev 1.37 17 Apr 1996 09:32:52 OM + Unbenutzte Fkt Disable entfernt + + Rev 1.36 28 Mar 1996 14:20:50 OS + neu: NumberOrNoNumber + + Rev 1.35 03 Dec 1995 11:22:08 OS + +include itemdef.hxx + + Rev 1.34 29 Nov 1995 13:48:42 OS + -slotadd.hxx + + Rev 1.33 27 Nov 1995 19:39:40 OM + swslots->303a + + Rev 1.32 24 Nov 1995 16:59:32 OM + PCH->PRECOMPILED + + Rev 1.31 17 Nov 1995 13:02:00 MA + Segmentierung + +------------------------------------------------------------------------*/ + diff --git a/sw/source/ui/shells/makefile.mk b/sw/source/ui/shells/makefile.mk new file mode 100644 index 0000000000..a07d291ae4 --- /dev/null +++ b/sw/source/ui/shells/makefile.mk @@ -0,0 +1,120 @@ +#************************************************************************* +# +# $RCSfile: makefile.mk,v $ +# +# $Revision: 1.1.1.1 $ +# +# last change: $Author: hr $ $Date: 2000-09-18 17:14:47 $ +# +# The Contents of this file are made available subject to the terms of +# either of the following licenses +# +# - GNU Lesser General Public License Version 2.1 +# - Sun Industry Standards Source License Version 1.1 +# +# Sun Microsystems Inc., October, 2000 +# +# GNU Lesser General Public License Version 2.1 +# ============================================= +# Copyright 2000 by Sun Microsystems, Inc. +# 901 San Antonio Road, Palo Alto, CA 94303, USA +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License version 2.1, as published by the Free Software Foundation. +# +# This library 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 for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# +# +# Sun Industry Standards Source License Version 1.1 +# ================================================= +# The contents of this file are subject to the Sun Industry Standards +# Source License Version 1.1 (the "License"); You may not use this file +# except in compliance with the License. You may obtain a copy of the +# License at http://www.openoffice.org/license.html. +# +# Software provided under this License is provided on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, +# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, +# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. +# See the License for the specific provisions governing your rights and +# obligations concerning the Software. +# +# The Initial Developer of the Original Code is: Sun Microsystems, Inc. +# +# Copyright: 2000 by Sun Microsystems, Inc. +# +# All Rights Reserved. +# +# Contributor(s): _______________________________________ +# +# +# +#************************************************************************* + +PRJ=..$/..$/.. + +PRJNAME=sw +TARGET=shells + +AUTOSEG=true + +PROJECTPCH=ui_pch +PDBTARGET=ui_pch +PROJECTPCHSOURCE=..\ui_1st\ui_pch + +# --- Settings ----------------------------------------------------- + +.INCLUDE : $(PRJ)$/inc$/swpre.mk +.INCLUDE : settings.mk +.INCLUDE : $(PRJ)$/inc$/sw.mk + +# --- Files -------------------------------------------------------- + +SRCFILES = \ + shells.src \ + pseudo.src + +SLOFILES = \ + $(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)$/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)$/textsh2.obj \ + +# --- Tagets ------------------------------------------------------- + +.INCLUDE : target.mk + +$(SRS)$/shells.srs: $(SOLARINCDIR)$/svx$/globlmn.hrc + diff --git a/sw/source/ui/shells/olesh.cxx b/sw/source/ui/shells/olesh.cxx new file mode 100644 index 0000000000..ab5ea34e73 --- /dev/null +++ b/sw/source/ui/shells/olesh.cxx @@ -0,0 +1,224 @@ +/************************************************************************* + * + * $RCSfile: olesh.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:47 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +#ifdef PRECOMPILED +#include "ui_pch.hxx" +#endif + +#pragma hdrstop + +#ifndef _IPOBJ_HXX //autogen +#include <so3/ipobj.hxx> +#endif +#ifndef _SFXAPP_HXX //autogen +#include <sfx2/app.hxx> +#endif +#ifndef _SFXREQUEST_HXX //autogen +#include <sfx2/request.hxx> +#endif +#ifndef _SFXOBJFACE_HXX //autogen +#include <sfx2/objface.hxx> +#endif +#ifndef _SFX_OBJITEM_HXX //autogen +#include <sfx2/objitem.hxx> +#endif +#ifndef _WRTSH_HXX +#include <wrtsh.hxx> +#endif +#ifndef _VIEW_HXX +#include <view.hxx> +#endif +#ifndef _HELPID_H +#include <helpid.h> +#endif +#ifndef _GLOBALS_HRC +#include <globals.hrc> +#endif +#ifndef _FRMSH_HXX +#include <frmsh.hxx> +#endif +#ifndef _OLESH_HXX +#include <olesh.hxx> +#endif + +#ifndef _CMDID_H +#include <cmdid.h> +#endif +#ifndef _POPUP_HRC +#include <popup.hrc> +#endif +#ifndef _SHELLS_HRC +#include <shells.hrc> +#endif + + +#define SwOleShell +#ifndef _ITEMDEF_HXX +#include <itemdef.hxx> +#endif +#ifndef _SWSLOTS_HXX +#include <swslots.hxx> +#endif + + +SFX_IMPL_INTERFACE(SwOleShell, SwFrameShell, SW_RES(STR_SHELLNAME_OBJECT)) +{ + SFX_POPUPMENU_REGISTRATION(SW_RES(MN_OLE_POPUPMENU)); + SFX_OBJECTBAR_REGISTRATION(SFX_OBJECTBAR_OBJECT, SW_RES(RID_OLE_TOOLBOX)); + SFX_OBJECTMENU_REGISTRATION(SID_OBJECTMENU0, SW_RES(MN_OBJECTMENU_OLE)); +} + + +SwOleShell::SwOleShell(SwView &rView) : + SwFrameShell(rView) + +{ + SetName(String::CreateFromAscii("Object")); + SetHelpId(SW_OLESHELL); +} + +/*------------------------------------------------------------------------ + + $Log: not supported by cvs2svn $ + Revision 1.35 2000/09/18 16:06:04 willem.vandorp + OpenOffice header added. + + Revision 1.34 2000/05/26 07:21:32 os + old SW Basic API Slots removed + + Revision 1.33 2000/05/16 09:15:14 os + project usr removed + + Revision 1.32 2000/05/10 11:53:02 os + Basic API removed + + Revision 1.31 2000/05/09 14:41:35 os + BASIC interface partially removed + + Revision 1.30 2000/04/18 14:58:24 os + UNICODE + + Revision 1.29 2000/02/11 14:57:36 hr + #70473# changes for unicode ( patched by automated patchtool ) + + Revision 1.28 1998/11/03 10:53:02 JP + Task #57916#: Vorbereitungen fuer den Selektionshandler vom Chart + + + Rev 1.27 03 Nov 1998 11:53:02 JP + Task #57916#: Vorbereitungen fuer den Selektionshandler vom Chart + + Rev 1.26 24 Nov 1997 09:46:52 MA + includes + + Rev 1.25 03 Nov 1997 13:55:48 MA + precomp entfernt + + Rev 1.24 26 Aug 1997 16:31:10 TRI + VCL Anpassungen + + Rev 1.23 08 Aug 1997 17:29:08 OM + Headerfile-Umstellung + + Rev 1.22 05 Aug 1997 16:29:12 TJ + include svx/srchitem.hxx + + Rev 1.21 01 Aug 1997 11:45:44 MH + chg: header + + Rev 1.20 11 Nov 1996 13:37:34 MA + ResMgr + + Rev 1.19 28 Aug 1996 15:55:14 OS + includes + + Rev 1.18 13 Aug 1996 12:38:40 OS + neue Shellnamen im IDL-Interface + + Rev 1.17 25 Jun 1996 19:51:50 HJS + includes + + Rev 1.16 20 Mar 1996 12:41:14 HJS + funcdefs muessen unique sein! + + Rev 1.15 06 Feb 1996 15:16:22 OS + neu: Activate/Deactivate fuer Objekte + + Rev 1.14 26 Jan 1996 10:54:12 OS + neu: GetState - Ole-Objekt dem Basic herausreichen + + Rev 1.13 03 Dec 1995 11:22:08 OS + +include itemdef.hxx + + Rev 1.12 29 Nov 1995 13:47:54 OS + -slotadd.hxx + + Rev 1.11 27 Nov 1995 19:40:06 OM + swslots->303a + + Rev 1.10 24 Nov 1995 16:59:36 OM + PCH->PRECOMPILED + + Rev 1.9 17 Nov 1995 13:03:40 MA + Segmentierung + +------------------------------------------------------------------------*/ + diff --git a/sw/source/ui/shells/shells.src b/sw/source/ui/shells/shells.src new file mode 100644 index 0000000000..cd95397a30 --- /dev/null +++ b/sw/source/ui/shells/shells.src @@ -0,0 +1,2392 @@ +/************************************************************************* + * + * $RCSfile: shells.src,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:47 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +#include <svx/svxids.hrc> +#include <svx/globlmn.hrc> +#include "toolbox.hrc" +#include "helpid.h" +InfoBox MSG_REMOVE_LINK +{ + Buttons = WB_YES_NO ; + Defbutton = WB_DEF_YES ; + Message = "Diese Grafik ist mit dem Dokument verknüpft. Möchten Sie die Verknüpfung aufheben, um die Grafik zu bearbeiten?" ; + Message [ English ] = "This is a linked graphic. Do you want to unlink the graphic in order to edit the graphic?" ; + Message [ norwegian ] = "Dette er +++linked grafikk. Řnsker du ĺ +++unlink the graphic for ĺ redigere?" ; + Message [ italian ] = "Questra immagine č collegata con il documento. Desiderate scollegare l'immagine per poterla modificare?" ; + Message [ portuguese_brazilian ] = "This is a linked graphic. Do you want to unlink the graphic in order to edit the graphic?" ; + Message [ portuguese ] = "Esta imagem está ligada a um documento. Deseja cancelar a ligaçăo para poder editá-la?" ; + Message [ english_us ] = "This graphic is linked to a document. Do you want to unlink the graphic in order to edit it?" ; + Message [ finnish ] = "This is a linked graphic. Do you want to unlink the graphic in order to edit the graphic?" ; + Message [ danish ] = "Denne grafik er kćdet til dokumentet. Vil du ophćve kćden for at kunne redigere grafikken." ; + Message [ french ] = "Cette image est liée ŕ un document. Désirez-vous supprimer le lien pour l'édition ?" ; + Message [ swedish ] = "Den här grafiken är länkad till dokumentet. Vill Du upphäva länken för att kunna redigera grafiken?" ; + Message [ dutch ] = "Deze afbeelding is met het document gekoppeld. Wilt u de koppeling opheffen om de afbeelding te bewerken?" ; + Message [ spanish ] = "Esta imagen está vinculada al documento. żDesea deshacer el vínculo para editar la imagen?" ; + Message[ chinese_simplified ] = "Őâ¸öÍĽĐÎĘÇşÍŇ»¸öÎĵµĎŕÁ´˝ÓµÄˇŁÄúҪȡĎűŐâ¸öÁ´˝ÓŁ¬±ŕĽŐâ¸öÍĽĐÎÂđŁż"; + Message[ russian ] = "Ýňîň đčńóíîę ńńűëŕĺňń˙ íŕ äîęóěĺíň. Âű őîňčňĺ ńí˙ňü ńńűëęó äë˙ âîçěîćíîńňč ďđŕâęč đčńóíęŕ?"; + Message[ polish ] = "Ta grafika jest połączona z dokumentem. Czy chcesz usunąć to połączenie, aby móc edytować grafikę?"; + Message[ japanese ] = "‚±‚Ě}‚ͤÄŢ·ŇÝÄ‚ĆŘݸ‚ł‚ę‚Ä‚˘‚Ü‚·B}‚đ•ŇŹW‚·‚é‚˝‚ß‚ÉŘݸ‚đ‰đŹś‚µ‚Ü‚·‚©H"; + Message[ chinese_traditional ] = "łoӹϤů¬O©M¤@ÓŔɮ׬۳sµ˛ŞşˇC±zn¨ú®řłoÓ±¶®|ˇA˝sżčłoӹϤůˇH"; + Message[ arabic ] = "ĺĐĺ ÇáŃÓăÉ ăŃĘČŘÉ ČÇáăÓĘäĎ. ĺá ĘŃíĎ ĹŇÇáÉ ÇáÇŃĘČÇŘ áßí ĘĘăßä ăä ĘÍŃíŃ ÇáŃÓăÉż"; + Message[ dutch ] = "Deze afbeelding is met het document gekoppeld. Wilt u de koppeling opheffen om de afbeelding te bewerken?"; + Message[ chinese_simplified ] = "Őâ¸öÍĽĐÎĘÇşÍŇ»¸öÎĵµĎŕÁ´˝ÓµÄˇŁÄúҪȡĎűŐâ¸öÁ´˝ÓŁ¬±ŕĽŐâ¸öÍĽĐÎÂđŁż"; + Message[ greek ] = "Ôď ăńáöéęü áőôü ĺßíáé óőíäĺäĺěÝíď ěĺ ôď Ýăăńáöď. ČÝëĺôĺ íá ęáôáńăçčĺß ç óýíäĺóç ăéá íá ĺđĺîĺńăÜóĺôĺ ôď ăńáöéęü;"; + Message[ korean ] = "ŔĚ ±×·ˇÇČŔş ą®ĽżÍ ż¬°áµÇľî ŔÖ˝Ŕ´Ď´Ů. ±×·ˇÇČ ĆíÁýŔ» Ŕ§ÇŘ ż¬°áŔ» ÇŘÁ¦ÇϽðڽŔ´Ď±î?"; + Message[ turkish ] = "Bu grafik belgeye bađlý. Grafigi düzenlemek için bu bađlantýyý kaldýrmak istiyor musunuz?"; + Message[ language_user1 ] = " "; +}; +InfoBox MSG_NO_RULER +{ + BUTTONS = WB_OK ; + DEFBUTTON = WB_DEF_OK ; + MESSAGE = "Es sind keine Grafiken im Gallery-Thema 'Rulers' vorhanden." ; + MESSAGE [ English ] = "Thera are no bitmaps in the Gallery theme 'Rulers'." ; + Message [ portuguese ] = "Năo existem imagens no tema 'Rulers' da Gallery." ; + Message [ english_us ] = "There are no bitmaps in the Gallery theme 'Rulers'." ; + Message [ portuguese_brazilian ] = "Es sind keine Grafiken im Gallery-Thema 'Rulers' vorhanden." ; + Message [ swedish ] = "Det finns inga grafiker i Gallery-temat 'Rulers'." ; + Message [ danish ] = "Der findes ingen billeder i Gallery-emnet 'Rulers'." ; + Message [ italian ] = "Nella gallery con argomento 'Ruler' non ci sono immagini." ; + Message [ spanish ] = "No hay imágenes en el tema de Gallery 'Rulers'." ; + Message [ french ] = "Il n'existe pas d'image pour le thčme 'Rulers' dans la Gallery." ; + Message [ dutch ] = "Onder het gallery-onderwerp 'Rulers' komen geen afbeeldingen voor." ; + Message[ chinese_simplified ] = "ÔÚ»ŔČÖ÷Ěâ'ł¤ĚőĐÎ'ÄÚÎŢČÎşÎÍĽĐΡŁ"; + Message[ russian ] = " ňĺěĺ ăŕëĺđĺč 'Ëčíĺéęč' đčńóíęîâ íĺ čěĺĺňń˙."; + Message[ polish ] = "Nie ma żadnych grafik w temacie galerii \"Obramowania\""; + Message[ japanese ] = "·Ţ¬×Ř°Ă°Ď'Ů°×°'‚ɸŢ×̨Ż¸˝‚Í‚ ‚č‚Ü‚ą‚ńB"; + Message[ chinese_traditional ] = "µe´YĄDĂD'Şř±ř§Î'¤şµLĄô¦óąĎ¤ůˇC"; + Message[ arabic ] = "áÇ ĘćĚĎ ĂíÉ ŐćŃ Ýí ăćÖćÚ ÇáĚÇáíŃí 'Rulers'."; + Message[ dutch ] = "Onder het gallery-onderwerp 'Rulers' komen geen afbeeldingen voor."; + Message[ chinese_simplified ] = "ÔÚ»ŔČÖ÷Ěâ'ł¤ĚőĐÎ'ÄÚÎŢČÎşÎÍĽĐΡŁ"; + Message[ greek ] = "Äĺí őđÜń÷ďőí ăńáöéęÜ óôç óőëëďăŢ ěĺ čÝěá 'Rulers'."; + Message[ korean ] = "Gallery ÁÖÁ¦ 'Rulers'żˇ ±×·ˇÇČŔĚ ľř˝Ŕ´Ď´Ů."; + Message[ turkish ] = "'Rulers' galeri konusunda bit eţlem grafik mevcut deđil."; + Message[ language_user1 ] = " "; +}; +String STR_GRFILTER_OPENERROR +{ + Text = "Grafikdatei kann nicht geöffnet werden" ; + Text [ English ] = "Can't open graphic file" ; + Text [ norwegian ] = "Can't open graphic file" ; + Text [ italian ] = "Impossibile aprire il file grafico" ; + Text [ portuguese_brazilian ] = "NĆo consigo abrir arquivo gr fico" ; + Text [ portuguese ] = "Impossível abrir ficheiro gráfico." ; + Text [ finnish ] = "Grafiikkatiedostoa ei voi avata" ; + Text [ danish ] = "Det er ikke muligt at ĺbne grafikfilen" ; + Text [ french ] = "Ouverture du fichier graphique impossible" ; + Text [ swedish ] = "Grafikfil kan inte öppnas" ; + Text [ dutch ] = "Grafisch bestand kan niet worden geopend" ; + Text [ spanish ] = "No es posible abrir el archivo gráfico" ; + Text [ english_us ] = "Graphics file cannot be opened" ; + Text[ chinese_simplified ] = "ÎŢ·¨´ňżŞÍĽĐÎÎÄĽţ"; + Text[ russian ] = "Îňęđűňü ăđŕôč÷ĺńęčé ôŕéë íĺâîçěîćíî"; + Text[ polish ] = "Pliku graficznego nie można było otworzyć"; + Text[ japanese ] = "¸Ţ×̨Ż¸Ě§˛Ů‚đŠJ‚‚±‚Ć‚Ş‚Ĺ‚«‚Ü‚ą‚ńB"; + Text[ chinese_traditional ] = "µLŞk¶}±ŇąĎ¤ůŔÉ®×"; + Text[ arabic ] = "áÇ íăßä ÝĘÍ ăáÝ ÇáŃÓćăÇĘ"; + Text[ dutch ] = "Grafisch bestand kan niet worden geopend"; + Text[ chinese_simplified ] = "ÎŢ·¨´ňżŞÍĽĐÎÎÄĽţ"; + Text[ greek ] = "Äĺí ĺßíáé äőíáôü ôď Üíďéăěá ôďő áń÷ĺßďő ăńáöéęţí"; + Text[ korean ] = "±×·ˇÇČ ĆÄŔĎŔĚ ż·ÁÁöÁö ľĘ˝Ŕ´Ď´Ů."; + Text[ turkish ] = "Grafik dosyasý açýlamýyor"; + Text[ language_user1 ] = " "; +}; +String STR_GRFILTER_IOERROR +{ + Text = "Grafikdatei kann nicht gelesen werden" ; + Text [ English ] = "Can't read graphic file" ; + Text [ norwegian ] = "Can't read graphic file" ; + Text [ italian ] = "Impossibile leggere il file grafico" ; + Text [ portuguese_brazilian ] = "NĆo consigo ler arquivo gr fico" ; + Text [ portuguese ] = "Impossível ler o ficheiro gráfico." ; + Text [ finnish ] = "Grafiikkatiedostoa ei voi lukea" ; + Text [ danish ] = "Det er ikke muligt at lćse grafikfilen" ; + Text [ french ] = "Lecture du fichier graphique impossible" ; + Text [ swedish ] = "Grafikfil kan inte läsas" ; + Text [ dutch ] = "Grafisch bestand is onleesbaar" ; + Text [ spanish ] = "No es posible leer el archivo gráfico" ; + Text [ english_us ] = "Graphics file cannot be read" ; + Text[ chinese_simplified ] = "ÎŢ·¨¶ÁȡͼĐÎÎÄĽţ"; + Text[ russian ] = "Ďđî÷čňŕňü ăđŕôč÷ĺńęčé ôŕéë íĺâîçěîćíî"; + Text[ polish ] = "Pliku graficznego nie można było odczytać"; + Text[ japanese ] = "¸Ţ×̨Ż¸Ě§˛Ů‚Ş“Ç‚ß‚Ü‚ą‚ńB"; + Text[ chinese_traditional ] = "µLŞkĹŞ¨úąĎ¤ůŔÉ®×"; + Text[ arabic ] = "áÇ íăßä ŢŃÇÁÉ ăáÝ ÇáŃÓćăÇĘ"; + Text[ dutch ] = "Grafisch bestand is onleesbaar"; + Text[ chinese_simplified ] = "ÎŢ·¨¶ÁȡͼĐÎÎÄĽţ"; + Text[ greek ] = "Äĺí ĺßíáé äőíáôŢ ç áíÜăíůóç ôďő áń÷ĺßďő ăńáöéęţí"; + Text[ korean ] = "±×·ˇÇČ ĆÄŔĎŔĚ ŔĐÇôÁöÁö ľĘ˝Ŕ´Ď´Ů."; + Text[ turkish ] = "Grafik dosyasý okunamýyor"; + Text[ language_user1 ] = " "; +}; +String STR_GRFILTER_FORMATERROR +{ + Text = "Unbekanntes Grafikformat" ; + Text [ English ] = "Unknown graphic format" ; + Text [ norwegian ] = "Unknown graphic format" ; + Text [ italian ] = "Formato grafico sconosciuto" ; + Text [ portuguese_brazilian ] = "Formato gr fico desconhecido" ; + Text [ portuguese ] = "Formato de gráfico desconhecido." ; + Text [ finnish ] = "Tuntematon grafiikkamuoto" ; + Text [ danish ] = "Ukendt grafikformat" ; + Text [ french ] = "Format d'image inconnu" ; + Text [ swedish ] = "Okänt grafikformat" ; + Text [ dutch ] = "Onbekend grafisch formaat" ; + Text [ spanish ] = "Formato de imagen desconocido" ; + Text [ english_us ] = "Unknown graphic format" ; + Text[ chinese_simplified ] = "˛»Ă÷µÄÍĽĐθńĘ˝"; + Text[ russian ] = "Íĺčçâĺńňíűé ăđŕôč÷ĺńęčé ôîđěŕň"; + Text[ polish ] = "Nieznany format graficzny"; + Text[ japanese ] = "•s–ľ‚ȸŢ×̨Ż¸Ź‘Ž®"; + Text[ chinese_traditional ] = "¤Ł©úŞşąĎ¤ů®ć¦ˇ"; + Text[ arabic ] = "ĘäÓíŢ ŃÓćăÇĘ ŰíŃ ăÚŃćÝ"; + Text[ dutch ] = "Onbekend grafisch formaat"; + Text[ chinese_simplified ] = "˛»Ă÷µÄÍĽĐθńĘ˝"; + Text[ greek ] = "˘ăíůóôç ěďńöŢ ăńáöéęţí"; + Text[ korean ] = "ľË·ÁÁöÁö ľĘŔş ±×·ˇÇČ Ľ˝Ä"; + Text[ turkish ] = "Bilinmeyen grafik formatý"; + Text[ language_user1 ] = " "; +}; +String STR_GRFILTER_VERSIONERROR +{ + Text = "Die Version der Grafikdatei wird nicht unterstützt" ; + Text [ English ] = "Version of graphic file not supported" ; + Text [ norwegian ] = "Version of graphic file not supported" ; + Text [ italian ] = "Versione del file grafico non supportata" ; + Text [ portuguese_brazilian ] = "VersĆo de arquivo gr fico nĆo suportada" ; + Text [ portuguese ] = "Versăo do ficheiro gráfico năo suportada." ; + Text [ finnish ] = "Ei tukea grafiikkatiedoston versiolle" ; + Text [ danish ] = "Grafikfilens version bliver ikke understřttet" ; + Text [ french ] = "Version du fichier graphique non supportée" ; + Text [ swedish ] = "Grafikfilens version stöds inte" ; + Text [ dutch ] = "Deze versie van het grafisch bestand wordt niet ondersteund" ; + Text [ spanish ] = "No se acepta la versión del archivo gráfico" ; + Text [ english_us ] = "This graphic file version is not supported" ; + Text[ chinese_simplified ] = "˛»Ö§łÖŐâ¸ö°ć±ľµÄÍĽĐÎÎÄĽţ"; + Text[ russian ] = "Âĺđńč˙ ăđŕôč÷ĺńęîăî ôŕéëŕ íĺ ďîääĺđćčâŕĺňń˙"; + Text[ polish ] = "Wersja pliku graficznego nie będzie obsługiwana"; + Text[ japanese ] = "¸Ţ×̨Ż¸Ě§˛Ů‚ĚĘŢ°ĽŢ®Ý‚ÍA»Îß°Ä‚ł‚ę‚Ä‚˘‚Ü‚ą‚ńB"; + Text[ chinese_traditional ] = "¤Ł¤ä´©łoÓŞ©Ą»ŞşąĎ¤ů¤ĺĄó"; + Text[ arabic ] = "áÇ íĘă ĎÚă ĹŐĎÇŃ ăáÝ ÇáŃÓćăÇĘ"; + Text[ dutch ] = "Deze versie van het grafisch bestand wordt niet ondersteund"; + Text[ chinese_simplified ] = "˛»Ö§łÖŐâ¸ö°ć±ľµÄÍĽĐÎÎÄĽţ"; + Text[ greek ] = "Äĺí őđďóôçńßćĺôáé ç Ýęäďóç áőôďý ôďő áń÷ĺßďő ăńáöéęţí"; + Text[ korean ] = "ŔĚ ±×·ˇÇČ ĆÄŔĎŔÇ ąöÁŻŔş ÁöżřµÇÁö ľĘ˝Ŕ´Ď´Ů."; + Text[ turkish ] = "Grafik dosyasýnýnýn versiyonu desteklenmiyor"; + Text[ language_user1 ] = " "; +}; +String STR_GRFILTER_FILTERERROR +{ + Text = "Grafikfilter nicht gefunden" ; + Text [ English ] = "Graphic filter not found" ; + Text [ norwegian ] = "Graphic filter not found" ; + Text [ italian ] = "Filtro grafico non trovato" ; + Text [ portuguese_brazilian ] = "Filtro gr fico nĆo encontrado" ; + Text [ portuguese ] = "Filtro de gráficos năo encontrado." ; + Text [ finnish ] = "Grafiikkasuodinta ei löydy" ; + Text [ danish ] = "Grafikfilter blev ikke fundet" ; + Text [ french ] = "Filtre graphique introuvable" ; + Text [ swedish ] = "Grafikfilter hittades inte" ; + Text [ dutch ] = "Grafische filter niet gevonden" ; + Text [ spanish ] = "No se encontró el filtro de imagen" ; + Text [ english_us ] = "Graphics filter not found" ; + Text[ chinese_simplified ] = "Ă»ÓĐŐҵ˝ÍĽĐÎąýÂËĆ÷"; + Text[ russian ] = "Ăđŕôč÷ĺńęčé ôčëüĺđ íĺ íŕéäĺí"; + Text[ polish ] = "Nie znaleziono filtrów graficznych"; + Text[ japanese ] = "¸Ţ×̨Ż¸Ě¨ŮŔ‚ŞŚ©‚‚©‚č‚Ü‚ą‚ńB"; + Text[ chinese_traditional ] = "¨S¦ł§ä¨ěąĎ¤ůąLÂoľą"; + Text[ arabic ] = "ĘÚĐŃ ÇáÚËćŃ Úáě ÝáĘŃ ÇáŃÓćăÇĘ"; + Text[ dutch ] = "Grafische filter niet gevonden"; + Text[ chinese_simplified ] = "Ă»ÓĐŐҵ˝ÍĽĐÎąýÂËĆ÷"; + Text[ greek ] = "Äĺí âńÝčçęĺ ôď ößëôńď ăńáöéęţí"; + Text[ korean ] = "±×·ˇÇČ ÇĘĹÍ°ˇ ąß°ßµÇÁö ľĘ˝Ŕ´Ď´Ů."; + Text[ turkish ] = "Grafik filtresi bulunamadý"; + Text[ language_user1 ] = " "; +}; +String STR_GRFILTER_TOOBIG +{ + Text = "Nicht genug Speicher zum Einfügen der Grafik" ; + Text [ English ] = "Not enough memory to insert graphic" ; + Text [ norwegian ] = "Not enough memory to insert graphic" ; + Text [ italian ] = "Memoria insufficiente per inserirei l'immagine" ; + Text [ portuguese_brazilian ] = "Mem˘ria insuficiente para inserir o gr fico" ; + Text [ portuguese ] = "Memória insuficiente para inserir gráfico." ; + Text [ finnish ] = "Muisti ei riitä grafiikan lisäämiseen" ; + Text [ danish ] = "Ikke nok hukommelse til at indsćtte billedet" ; + Text [ french ] = "Mémoire insuffisante pour l'insertion de l'image" ; + Text [ swedish ] = "Inte tillräckligt med minne för att infoga grafiken" ; + Text [ dutch ] = "Niet genoeg geheugen voor het invoegen van de afbeelding" ; + Text [ spanish ] = "No hay suficiente memoria para insertar la imagen" ; + Text [ english_us ] = "Not enough memory to insert the picture." ; + Text[ chinese_simplified ] = "Äڴ治ą»Ł¬ÎŢ·¨˛ĺČëÍĽĐÎ"; + Text[ russian ] = "Íĺäîńňŕňî÷íî ďŕě˙ňč äë˙ âńňŕâęč đčńóíęŕ"; + Text[ polish ] = "Za mało pamięci do wstawienia grafiki"; + Text[ japanese ] = "}‚đ‘}“ü‚·‚é‚Ě‚ÉŇÓŘ‚ŞŹ[•Ş‚Ĺ‚ ‚č‚Ü‚ą‚ńB"; + Text[ chinese_traditional ] = "°OľĐĹ餣¨¬ˇAµLŞk´ˇ¤JąĎ¤ů"; + Text[ arabic ] = "áÇ íćĚĎ ĐÇßŃÉ ßÇÝíÉ áĹĎŃÇĚ ÇáŃÓă"; + Text[ dutch ] = "Niet genoeg geheugen voor het invoegen van de afbeelding"; + Text[ chinese_simplified ] = "Äڴ治ą»Ł¬ÎŢ·¨˛ĺČëÍĽĐÎ"; + Text[ greek ] = "Ç ěíŢěç äĺí ĺđáńęĺß ăéá ôçí đńďóčŢęç ôďő ăńáöéęďý."; + Text[ korean ] = "±×¸˛Ŕ» »đŔÔÇϴµĄ ¸Ţ¸đ¸®°ˇ şÎÁ· ÇŐ´Ď´Ů."; + Text[ turkish ] = "Grafiđin eklenmesi için yeterli bellek yok"; + Text[ language_user1 ] = " "; +}; +String STR_INSERT_GRAPHIC +{ + Text = "Grafik einfügen" ; + Text [ English ] = "Insert graphic" ; + Text [ norwegian ] = "Insert graphic" ; + Text [ italian ] = "Inserisci immagine" ; + Text [ portuguese_brazilian ] = "Inserir gr fico" ; + Text [ portuguese ] = "Inserir imagem" ; + Text [ finnish ] = "Lisää kuva" ; + Text [ danish ] = "Indsćt billede" ; + Text [ french ] = "Insérer une image" ; + Text [ swedish ] = "Infoga grafik" ; + Text [ dutch ] = "Afbeelding invoegen" ; + Text [ spanish ] = "Insertar imagen" ; + Text [ english_us ] = "Insert Graphics" ; + Text[ chinese_simplified ] = "˛ĺČëÍĽĐÎ"; + Text[ russian ] = "Âńňŕâčňü đčńóíîę"; + Text[ polish ] = "Wstaw grafikę"; + Text[ japanese ] = "¸Ţ×̨Ż¸‚Ě‘}“ü"; + Text[ chinese_traditional ] = "´ˇ¤JąĎ¤ů"; + Text[ arabic ] = "ĹĎŃÇĚ ŐćŃÉ"; + Text[ dutch ] = "Afbeelding invoegen"; + Text[ chinese_simplified ] = "˛ĺČëÍĽĐÎ"; + Text[ greek ] = "ĐńďóčŢęç ăńáöéęďý"; + Text[ korean ] = "±×·ˇÇČ »đŔÔ"; + Text[ turkish ] = "Grafik ekle"; + Text[ language_user1 ] = " "; +}; +String STR_NO_ADDRESSBOOK +{ + Text = "Kein Adressbuch vorhanden" ; + Text [ English ] = "No directory available" ; + Text [ dutch ] = "Geen adresboek voorhanden" ; + Text [ english_us ] = "An Address Book does not exist" ; + Text [ italian ] = "Manca la rubrica" ; + Text [ spanish ] = "No hay ninguna libreta de direcciones disponible" ; + Text [ french ] = "Aucun carnet d'adresses disponible" ; + Text [ swedish ] = "Ingen adressbok tillgänglig" ; + Text [ danish ] = "Der finde intet adressekartotek" ; + Text [ portuguese_brazilian ] = "Kein Adressbuch vorhanden" ; + Text [ portuguese ] = "Năo há livro de endereços disponível." ; + Text[ chinese_simplified ] = "ͨѶ˛ľ˛»´ćÔÚ"; + Text[ russian ] = "Ŕäđĺńíîé ęíčăč íĺ čěĺĺňń˙"; + Text[ polish ] = "Brak książki adresowej"; + Text[ japanese ] = "±ÄŢÚ˝’ ‚Ş‚ ‚č‚Ü‚ą‚ń"; + Text[ chinese_traditional ] = "łq°Tżý¤Ł¦s¦b"; + Text[ arabic ] = "áÇ íćĚĎ ĎÝĘŃ ÚäÇćíä"; + Text[ dutch ] = "Geen adresboek voorhanden"; + Text[ chinese_simplified ] = "ͨѶ˛ľ˛»´ćÔÚ"; + Text[ greek ] = "Äĺí őđÜń÷ĺé áôćÝíôá"; + Text[ korean ] = "»çżë °ˇ´ÉÇŃ ÁÖĽŇ·ĎŔĚ ľř˝Ŕ´Ď´Ů."; + Text[ turkish ] = "Adres defteri mevcut deđil"; + Text[ language_user1 ] = " "; +}; +String STR_NOTIZ_INSERT +{ + TEXT = "Notiz einfügen" ; + TEXT [ English ] = "Insert Note" ; + TEXT [ norwegian ] = "Sett inn Merknad" ; + TEXT [ italian ] = "Inserisci nota" ; + TEXT [ portuguese_brazilian ] = "Inserir Observaçăo" ; + TEXT [ portuguese ] = "Inserir anotaçăo" ; + TEXT [ finnish ] = "Lisää huomautus" ; + TEXT [ danish ] = "Indsćt note" ; + TEXT [ french ] = "Insérer une note" ; + TEXT [ swedish ] = "Infoga anteckning" ; + TEXT [ dutch ] = "Aantekening invoegen" ; + TEXT [ spanish ] = "Insertar nota" ; + TEXT [ english_us ] = "Insert Note" ; + TEXT[ chinese_simplified ] = "˛ĺČ뱸ע"; + TEXT[ russian ] = "Âńňŕâčňü ďđčěĺ÷ŕíčĺ"; + TEXT[ polish ] = "Wstaw notatkę"; + TEXT[ japanese ] = "ŇÓ‚đ‘}“ü"; + TEXT[ chinese_traditional ] = "´ˇ¤JłĆŞ`"; + TEXT[ arabic ] = "ĹĎŃÇĚ ăáÇÍŮÉ"; + TEXT[ dutch ] = "Aantekening invoegen"; + TEXT[ chinese_simplified ] = "˛ĺČ뱸ע"; + TEXT[ greek ] = "ĐńďóčŢęç óçěĺßůóçň"; + TEXT[ korean ] = "¸Ţ¸đ »đŔÔ"; + TEXT[ turkish ] = "Not ekle"; + TEXT[ language_user1 ] = " "; +}; +String STR_REDLINE_COMMENT +{ + TEXT = "Kommentieren: " ; + TEXT [ English ] = "Comment: " ; + Text [ english_us ] = "Comment: " ; + Text [ portuguese_brazilian ] = "Kommentieren: " ; + Text [ swedish ] = "Kommentera: " ; + Text [ danish ] = "Kommenter: " ; + Text [ italian ] = "Commento: " ; + Text [ spanish ] = "Comentario: " ; + Text [ french ] = "Commentaire : " ; + Text [ dutch ] = "Commentaar: " ; + Text [ portuguese ] = "Comentário: " ; + Text[ chinese_simplified ] = "ĆŔÓ "; + Text[ russian ] = "Ęîěěĺíňčđîâŕňü: "; + Text[ polish ] = "Skomentuj: "; + Text[ japanese ] = "şŇÝÄ: "; + Text[ chinese_traditional ] = "µű»yˇG "; + Text[ arabic ] = "ĘÚáíŢ: "; + Text[ dutch ] = "Commentaar: "; + Text[ chinese_simplified ] = "ĆŔÓ "; + Text[ greek ] = "Ó÷üëéď: "; + Text[ korean ] = "¸Ţ¸đ: "; + Text[ turkish ] = "Açýklalama ekle: "; + Text[ language_user1 ] = " "; +}; +String STR_REDLINE_INSERTED +{ + TEXT = "Einfügung" ; + TEXT [ English ] = "Inserted" ; + Text [ english_us ] = "Insertions" ; + Text [ portuguese_brazilian ] = "Einfügung" ; + Text [ swedish ] = "Infogning" ; + Text [ danish ] = "Indsat" ; + Text [ italian ] = "Inserimento" ; + Text [ spanish ] = "Inserción" ; + Text [ french ] = "Insertion" ; + Text [ dutch ] = "Invoeging" ; + Text [ portuguese ] = "Inserido" ; + Text[ chinese_simplified ] = "˛ĺČë"; + Text[ russian ] = "Âńňŕâęŕ"; + Text[ polish ] = "Wstawienie"; + Text[ japanese ] = "‘}“ü"; + Text[ chinese_traditional ] = "´ˇ¤J"; + Text[ arabic ] = "ĹĎŃÇĚ"; + Text[ dutch ] = "Invoeging"; + Text[ chinese_simplified ] = "˛ĺČë"; + Text[ greek ] = "ĐńďóčŢęç"; + Text[ korean ] = "»đŔÔ"; + Text[ turkish ] = "Ekle"; + Text[ language_user1 ] = " "; +}; +String STR_REDLINE_DELETED +{ + TEXT = "Löschung" ; + TEXT [ English ] = "Deleted" ; + Text [ english_us ] = "Deletions" ; + Text [ portuguese_brazilian ] = "Löschung" ; + Text [ swedish ] = "Radering" ; + Text [ danish ] = "Slettet" ; + Text [ italian ] = "Elimina" ; + Text [ spanish ] = "Eliminación" ; + Text [ french ] = "Suppression" ; + Text [ dutch ] = "Gewist" ; + Text [ portuguese ] = "Eliminado" ; + Text[ chinese_simplified ] = "Éľłý"; + Text[ russian ] = "Óäŕëĺíčĺ"; + Text[ polish ] = "Usunięcie"; + Text[ japanese ] = "ŤíŹś"; + Text[ chinese_traditional ] = "§R°Ł"; + Text[ arabic ] = "ÍĐÝ"; + Text[ dutch ] = "Gewist"; + Text[ chinese_simplified ] = "Éľłý"; + Text[ greek ] = "ÄéáăńáöŢ"; + Text[ korean ] = "»čÁ¦"; + Text[ turkish ] = "Silindi"; + Text[ language_user1 ] = " "; +}; +String STR_REDLINE_AUTOFMT +{ + TEXT = "AutoFormat" ; + TEXT [ English ] = "AutoFormat" ; + TEXT[ italian ] = "Formattazione automatica"; + TEXT[ portuguese_brazilian ] = "AutoFormat"; + TEXT[ portuguese ] = "AutoFormato"; + TEXT[ danish ] = "AutoFormat"; + TEXT[ french ] = "AutoFormat"; + TEXT[ swedish ] = "AutoFormat"; + TEXT[ dutch ] = "AutoOpmaak"; + TEXT[ spanish ] = "AutoFormato"; + TEXT[ english_us ] = "AutoFormat"; + TEXT[ chinese_simplified ] = "×Ô¶Ż¸ńĘ˝"; + TEXT[ russian ] = "Ŕâňîôîđěŕň"; + TEXT[ polish ] = "Autoformatowanie"; + TEXT[ japanese ] = "µ°ÄĚ«°ĎŻÄ"; + TEXT[ chinese_traditional ] = "¦Ű°Ę®ć¦ˇ"; + TEXT[ arabic ] = "ĘäÓíŢ ĘáŢÇĆí"; + TEXT[ dutch ] = "AutoOpmaak"; + TEXT[ chinese_simplified ] = "×Ô¶Ż¸ńĘ˝"; + TEXT[ greek ] = "ÁőôďĚďńöďđďßçóç"; + TEXT[ korean ] = "ŔÚµż Ľ˝Ä"; + TEXT[ turkish ] = "Otomatik formatlama"; + TEXT[ language_user1 ] = " "; +}; +String STR_REDLINE_FORMATED +{ + Text = "Attributierung" ; + Text [ english ] = "Formatted" ; + Text [ english_us ] = "Formats" ; + Text [ portuguese_brazilian ] = "Attributierung" ; + Text [ swedish ] = "Attributering" ; + Text [ danish ] = "Formateret" ; + Text [ italian ] = "Attribuzione" ; + Text [ spanish ] = "Formateado" ; + Text [ french ] = "Mise en forme" ; + Text [ dutch ] = "Opmaak" ; + Text [ portuguese ] = "Formatado" ; + Text[ chinese_simplified ] = "ĘôĐÔ"; + Text[ russian ] = "Îňôîđěŕňčđîâŕíî"; + Text[ polish ] = "Dodawanie atrybutów"; + Text[ japanese ] = "‘®«‚đŽw’č‚·‚é"; + Text[ chinese_traditional ] = "ÄÝ©Ę"; + Text[ arabic ] = "ĘäÓíŢ"; + Text[ language_user1 ] = " "; + Text[ dutch ] = "Opmaak"; + Text[ chinese_simplified ] = "ĘôĐÔ"; + Text[ greek ] = "Ěďńöďđďßçóç"; + Text[ korean ] = "Ľ˝ÄŔÖ´Â"; + Text[ turkish ] = "Öznitelikler"; +}; +String STR_REDLINE_TABLECHG +{ + Text = "Tabellenänderung" ; + Text [ english ] = "Changed table" ; + Text [ english_us ] = "Table Changes" ; + Text [ portuguese_brazilian ] = "Tabellenänderung" ; + Text [ swedish ] = "Tabelländring" ; + Text [ danish ] = "Ćndret tabel" ; + Text [ italian ] = "Modifica tabella" ; + Text [ spanish ] = "Modificación de tabla" ; + Text [ french ] = "Modification de tableau" ; + Text [ dutch ] = "Tabelwijziging" ; + Text [ portuguese ] = "Tabela modificada" ; + Text[ chinese_simplified ] = "Đ޸ıí¸ń"; + Text[ russian ] = "Čçěĺíĺíč˙ ňŕáëčöű"; + Text[ polish ] = "Zmiany w tabelach"; + Text[ japanese ] = "Ă°ĚŢŮ‚Ě•ĎŤX"; + Text[ chinese_traditional ] = "קďŞí®ć"; + Text[ arabic ] = "ĘÚĎíá ÇáĚĎćá"; + Text[ dutch ] = "Tabelwijziging"; + Text[ chinese_simplified ] = "Đ޸ıí¸ń"; + Text[ greek ] = "Ôńďđďđďßçóç đßíáęá"; + Text[ korean ] = "ÇĄ°ˇ ąŮ˛îľú˝Ŕ´Ď´Ů."; + Text[ turkish ] = "Tablo deđiţikliđi"; + Text[ language_user1 ] = " "; +}; +String STR_REDLINE_FMTCOLLSET +{ + Text = "Absatzvorlage gesetzt" ; + Text [ english ] = "Paragraph Styles set" ; + Text[ italian ] = "Modello di paragrafo impostato"; + Text[ portuguese_brazilian ] = "Paragraph Styles set"; + Text[ portuguese ] = "Estilo de parágrafo definido"; + Text[ danish ] = "Afsnitstypografi defineret"; + Text[ french ] = "Le style de paragraphe a été défini"; + Text[ swedish ] = "Styckeformatmall definierad"; + Text[ dutch ] = "Alinea-opmaakprofiel gedefinieerd"; + Text[ spanish ] = "Aplicado estilo de párrafo"; + Text[ english_us ] = "Applied Paragraph Styles"; + Text[ chinese_simplified ] = "É趨Á˶ÎÂäŃůĘ˝"; + Text[ russian ] = "Ńňčëü ŕáçŕöŕ óńňŕíîâëĺí"; + Text[ polish ] = "Ustaw styl akapitu"; + Text[ japanese ] = "’i—Ž˝Ŕ˛Ů‚ĚÝ’č"; + Text[ chinese_traditional ] = "ł]©w¤F¬q¸¨ĽË¦ˇ"; + Text[ arabic ] = "Ęă ĘÚííä äăŘ ÇáÝŢŃÉ"; + Text[ dutch ] = "Alinea-opmaakprofiel gedefinieerd"; + Text[ chinese_simplified ] = "É趨Á˶ÎÂäŃůĘ˝"; + Text[ greek ] = "Ďńéóěüň đńďôýđďő đáńáăńÜöďő"; + Text[ korean ] = "´Ü¶ô ŔŻÇü ĽłÁ¤"; + Text[ turkish ] = "Paragraf biçimi seçildi"; + Text[ language_user1 ] = " "; +}; +String STR_REDLINE_TITLE +{ + Text = "AutoFormat" ; + Text [ English ] = "AutoFormat" ; + Text[ italian ] = "Formattazione automatica"; + Text[ portuguese_brazilian ] = "AutoFormat"; + Text[ portuguese ] = "AutoFormato"; + Text[ danish ] = "AutoFormat"; + Text[ french ] = "AutoFormat"; + Text[ swedish ] = "AutoFormat"; + Text[ dutch ] = "AutoOpmaak"; + Text[ spanish ] = "AutoFormato"; + Text[ english_us ] = "AutoFormat"; + Text[ chinese_simplified ] = "×Ô¶Ż¸ńĘ˝"; + Text[ russian ] = "Ŕâňîôîđěŕň"; + Text[ polish ] = "Autoformatowanie"; + Text[ japanese ] = "µ°ÄĚ«°ĎŻÄ"; + Text[ chinese_traditional ] = "¦Ű°Ę®ć¦ˇ"; + Text[ arabic ] = "ĘäÓíŢ ĘáŢÇĆí"; + Text[ dutch ] = "AutoOpmaak"; + Text[ chinese_simplified ] = "×Ô¶Ż¸ńĘ˝"; + Text[ greek ] = "ÁőôďĚďńöďđďßçóç"; + Text[ korean ] = "ŔÚµż Ľ˝Ä"; + Text[ turkish ] = "Otomatik formatlama"; + Text[ language_user1 ] = " "; +}; +String STR_REDLINE_MSG +{ + Text = "Das AutoFormat ist beendet.\nSie können jetzt alle Änderungen annehmen oder ablehnen,\noder sie einzeln annehmen oder ablehnen." ; + Text [ English ] = "AutoFormat completed.\nYou can accept or reject all changes, or\naccept or reject individual changes." ; + Text[ italian ] = "La formattazione automatica č terminata.\nPotete accettare o rifiutare tutte le modifiche oppure\naccettare o rifiutare singolarmente le modifiche."; + Text[ portuguese_brazilian ] = "AutoFormat completed.\nYou can accept or reject all changes, or\naccept or reject individual changes."; + Text[ portuguese ] = "Concluído AutoFormato.\nPoderá aceitar ou rejeitar todas as modificaçőes de\numa só vez ou uma a uma."; + Text[ danish ] = "AutoFormat er fuldfřrt.\nDu kan nu acceptere eller forkaste alle ćndringer,\neller acceptere eller forkaste dem enkeltvis."; + Text[ french ] = "L'AutoFormat a terminé.\nVous pouvez choisir d'en accepter ou rejeter en une seule fois toutes les modifications, ou\n de vous faire afficher toutes les modifications pour les revoir."; + Text[ swedish ] = "AutoFormat är färdigt.\nDu kan acceptera eller kasta bort alla ändringar eller\nacceptera eller kasta bort enstaka ändringar."; + Text[ dutch ] = "AutoOpmaak voltooid.\nU kunt nu alle wijzigingen accepteren of verwerpen,\nof afzonderlijke wijzigingen accepteren of verwerpen."; + Text[ spanish ] = "El AutoFormato ha concluido.\nAhora puede aceptar o rechazar todos los cambios\na la vez o uno por uno."; + Text[ english_us ] = "AutoFormat completed.\nYou can accept or reject all changes,\nor accept or reject particular changes."; + Text[ chinese_simplified ] = "ŇŃľÍęłÉ×Ô¶Ż¸ńĘ˝ˇŁ\nÄúĎÖÔÚÄÜą»˝ÓĘÜ»ňľÜľřËůÓеĸü¸ÄŁ¬»ňŐß\n˝ÓĘÜ»ňľÜľřµĄ¸ö¸ü¸ÄˇŁ"; + Text[ russian ] = "Ŕâňîôîđěŕňčđîâŕíčĺ çŕęîí÷ĺíî.\nŃĺé÷ŕń Âű ěîćĺňĺ ďđčí˙ňü čëč îňęëîíčňü ńđŕçó âńĺ čçěĺíĺíč˙,\nčëč ęŕćäîĺ ďî îňäĺëüíîńňč."; + Text[ polish ] = "Autoformatowanie jest zakończone.\nMożesz zaaakceptować lub odrzucić teraz wszystkie zmiany,\nlub akceptować je oraz odrzucać pojedynczo."; + Text[ japanese ] = "µ°ÄĚ«°ĎŻÄ‚ŞŹI—ą‚µ‚Ü‚µ‚˝B\n‚·‚ׂĂ̕ύX‚đŽó‚Ż“ü‚ę‚é‚©AŚł‚É–ß‚·‚±‚Ć‚Ş‚Ĺ‚«‚Ü‚·B\n‚Ü‚˝‚͂ЂƂ‚ЂƂ‚̕ύX‚ɂ‚˘‚ÄŚź“˘‚·‚邱‚Ć‚ŕ‚Ĺ‚«‚Ü‚·B"; + Text[ chinese_traditional ] = "¤w¸g§ą¦¨¦Ű°Ę®ć¦ˇˇC\n±z˛{¦bŻŕ°÷±µ¨ü©Î©Úµ´©Ň¦łŞşĹܧóˇA±z¤]Żŕ°÷\n±µ¨ü©Î©Úµ´łćÓŞşĹܧóˇC"; + Text[ arabic ] = "ĘăřóĘ ÚăáíÉ ÇáĘäÓíŢ ÇáĘáŢÇĆí.\níăßäß ÇáÂä ŢČćá Ăć ŃÝÖ ÇáĘŰííŃÇĘ ßáĺǡ\nĂć ŢČćá Ăć ŃÝÖ ßá ĘŰííŃ Úáě ÍĎĺ."; + Text[ dutch ] = "AutoOpmaak voltooid.\nU kunt nu alle wijzigingen accepteren of verwerpen,\nof afzonderlijke wijzigingen accepteren of verwerpen."; + Text[ chinese_simplified ] = "ŇŃľÍęłÉ×Ô¶Ż¸ńĘ˝ˇŁ\nÄúĎÖÔÚÄÜą»˝ÓĘÜ»ňľÜľřËůÓеĸü¸ÄŁ¬»ňŐß\n˝ÓĘÜ»ňľÜľřµĄ¸ö¸ü¸ÄˇŁ"; + Text[ greek ] = "Ç ÁőôďĚďńöďđďßçóç ďëďęëçńţčçęĺ.\n¸÷ĺôĺ ôç äőíáôüôçôá íá áđďäĺ÷ôĺßôĺ Ţ íá áđďńńßřĺôĺ üëĺň Ţ ěĺěďíůěÝíĺň áëëáăÝň."; + Text[ korean ] = "ŔÚµż Ľ˝ÄŔĚ Áľ·áµÇľú˝Ŕ´Ď´Ů.\nÁö±Ý şŻ°ć»çÇ×Ŕ» ¸đµÎ ŔűżëÇĎ°ĹłŞ ĂëĽŇÇŇ Ľö ŔÖŔ¸¸ç\nȤŔş °łş°ŔűŔ¸·Î ŔűżëÇĎ°ĹłŞ ĂëĽŇÇŇ Ľö ŔÖ˝Ŕ´Ď´Ů."; + Text[ turkish ] = "Otomatik formatlama tamamlandý.\nŢimdi deđiţiklikleri tümden veya tek tek\n kabul ya da redd edebilirsiniz."; + Text[ language_user1 ] = " "; +}; +String STR_REDLINE_ACCEPT_ALL +{ + Text = "Alles ~annehmen" ; + Text [ English ] = "~Accept All" ; + Text[ italian ] = "~Accetta tutto"; + Text[ portuguese_brazilian ] = "~Accept All"; + Text[ portuguese ] = "~Aceitar tudo"; + Text[ danish ] = "Accepter alle"; + Text[ french ] = "Tout ~accepter"; + Text[ swedish ] = "~Acceptera alla"; + Text[ dutch ] = "~Alles accepteren"; + Text[ spanish ] = "~Aceptar todo"; + Text[ english_us ] = "Accept All"; + Text[ chinese_simplified ] = "Č«˛ż˝ÓĘÜ"; + Text[ russian ] = "Ďđčí˙ňü âńĺ"; + Text[ polish ] = "Zaakceptuj wszystko"; + Text[ japanese ] = "‚·‚ׂĎ󂯓ü‚ę‚é"; + Text[ chinese_traditional ] = "Ąţłˇ±µ¨ü"; + Text[ arabic ] = "ŢČćá Çáßá"; + Text[ dutch ] = "~Alles accepteren"; + Text[ chinese_simplified ] = "Č«˛ż˝ÓĘÜ"; + Text[ greek ] = "Áđďäď÷Ţ üëůí"; + Text[ korean ] = "¸đµÎ Ŕűżë"; + Text[ turkish ] = "Tümünü kabul et"; + Text[ language_user1 ] = " "; +}; +String STR_REDLINE_REJECT_ALL +{ + Text = "Alles ableh~nen" ; + Text [ English ] = "~Reject All" ; + Text[ italian ] = "Rifiuta tutto"; + Text[ portuguese_brazilian ] = "~Reject All"; + Text[ portuguese ] = "~Rejeitar tudo"; + Text[ danish ] = "Forkast alle"; + Text[ french ] = "~Tout rejeter"; + Text[ swedish ] = "~Kasta bort alla"; + Text[ dutch ] = "~Alles verwerpen"; + Text[ spanish ] = "~Ocultar todo"; + Text[ english_us ] = "Reject All"; + Text[ chinese_simplified ] = "Č«˛żľÜľř"; + Text[ russian ] = "Îňęëîíčňü âńĺ"; + Text[ polish ] = "Odrzuć wszystko"; + Text[ japanese ] = "‚·‚ׂČł‚É–ß‚·"; + Text[ chinese_traditional ] = "Ąţłˇ©Úµ´"; + Text[ arabic ] = "ŃÝÖ Çáßá"; + Text[ dutch ] = "~Alles verwerpen"; + Text[ chinese_simplified ] = "Č«˛żľÜľř"; + Text[ greek ] = "Áđüńńéřç üëůí"; + Text[ korean ] = "¸đµÎ ĂëĽŇ"; + Text[ turkish ] = "Tümünü reddet"; + Text[ language_user1 ] = " "; +}; +String STR_REDLINE_EDIT +{ + Text = "Änderungen ~bearbeiten" ; + Text [ English ] = "Review ~Changes" ; + Text[ italian ] = "Modifica cambiamenti"; + Text[ portuguese_brazilian ] = "Review ~Changes"; + Text[ portuguese ] = "Editar ~modificaçőes"; + Text[ danish ] = "Rediger ćndringer"; + Text[ french ] = "~Revoir les modifications"; + Text[ swedish ] = "Redigera ~ändringar"; + Text[ dutch ] = "Wijzigingen ~bewerken"; + Text[ spanish ] = "Editar ~modificaciones"; + Text[ english_us ] = "Edit Changes"; + Text[ chinese_simplified ] = "±ŕĽ¸ü¸Ä"; + Text[ russian ] = "Ŕíŕëčç čçěĺíĺíčé"; + Text[ polish ] = "Edytuj zmiany"; + Text[ japanese ] = "•ĎŤX‚Ě•ŇŹW"; + Text[ chinese_traditional ] = "˝sżčĹܧó"; + Text[ arabic ] = "ĘÍŃíŃ ÇáĘŰííŃÇĘ"; + Text[ dutch ] = "Wijzigingen ~bewerken"; + Text[ chinese_simplified ] = "±ŕĽ¸ü¸Ä"; + Text[ greek ] = "Ĺđĺîĺńăáóßá áëëáăţí"; + Text[ korean ] = "şŻ°ć ł»żë °ËĹä"; + Text[ turkish ] = "Deđiţiklikleri düzenle"; + Text[ language_user1 ] = " "; +}; +QueryBox DLG_IMPORT_DBNAME +{ + BUTTONS = WB_YES_NO ; + DEFBUTTON = WB_DEF_NO ; + MESSAGE = "Soll der Datenbankname als Standarddatenbank für das Dokument übernommen werden?" ; + MESSAGE [ English ] = "Should the database name be used as document default?" ; + Message [ dutch ] = "Moet de database-naam als standaard database voor het document worden overgenomen?" ; + Message [ english_us ] = "Use database name as default database for the document?" ; + Message [ italian ] = "Si vuole che il nome del database venga usato come database standard per il documento?" ; + Message [ spanish ] = "żDesea adoptar el nombre de la base de datos como base de datos estándar para el documento?" ; + Message [ french ] = "Le nom de la base de données doit-il ętre utilisé comme nom de base de données par défaut ?" ; + Message [ swedish ] = "Ska databasnamnet övertas som standarddatabas för dokumentet?" ; + Message [ danish ] = "Skal databasenavnet overtages som standarddatabase for dokumentet?" ; + Message [ portuguese_brazilian ] = "Soll der Datenbankname als Standarddatenbank für das Dokument übernommen werden?" ; + Message [ portuguese ] = "Deseja adoptar o nome da base de dados como base de dados padrăo para o documento?" ; + Message[ chinese_simplified ] = "ŇŞČĂÎÄĽţĚ×ÓĂĬČϵÄĘýľÝżâĂűłĆŁż"; + Message[ russian ] = "Čńďîëüçîâŕňü čě˙ áŕçű äŕííűő â ęŕ÷ĺńňâĺ ńňŕíäŕđňíîé áŕçű äŕííűő äë˙ ýňîăî äîęóěĺíňŕ?"; + Message[ polish ] = "Czy nazwa bazy danych ma zostać zastosowana w dokumencie jako standardowa baza danych?"; + Message[ japanese ] = "‚±‚ĚĂŢ°ŔÍŢ°˝‚Ě–Ľ‘O‚đ•WŹ€ĂŢ°ŔÍŢ°˝‚Ć‚µ‚Ä‚±‚Ě•¶Ź‘‚ÉŽg—p‚µ‚Ü‚·‚©H"; + Message[ chinese_traditional ] = "Ĺý¤ĺĄó±ÄĄÎŔq»{Şş¸ę®Ć®w¦WşŮˇH"; + Message[ arabic ] = "ĺá ĘŃíĎ ÇÓĘÎĎÇă ÇÓă ŢÇÚĎÉ ÇáČíÇäÇĘ ßŢÇÚĎÉ ČíÇäÇĘ ÇÝĘŃÇÖíÉ ááăÓĘäĎż"; + Message[ dutch ] = "Moet de database-naam als standaard database voor het document worden overgenomen?"; + Message[ chinese_simplified ] = "ŇŞČĂÎÄĽţĚ×ÓĂĬČϵÄĘýľÝżâĂűłĆŁż"; + Message[ greek ] = "ČÝëĺôĺ íá ÷ńçóéěďđďéçčĺß ôď üíďěá ôçň âÜóçň äĺäďěÝíůí ůň âÜóç äĺäďěÝíůí đńďĺđéëďăŢň ăéá ôď Ýăăńáöď;"; + Message[ korean ] = "µĄŔĚĹÍşŁŔĚ˝ş Ŕ̸§Ŕ» ą®ĽŔÇ ±âş» µĄŔĚĹÍşŁŔĚ˝ş·Î »çżëÇϽðڽŔ´Ď±î?"; + Message[ turkish ] = "Veritabaný adý, belge için standart veritabaný olarak kullanýlsýn mý?"; + Message[ language_user1 ] = " "; +}; +String STR_PAGE +{ + TEXT = "Seite " ; + TEXT [ English ] = "Page " ; + TEXT [ norwegian ] = "Side " ; + TEXT [ italian ] = "Pagina " ; + TEXT [ portuguese_brazilian ] = "Página " ; + TEXT [ portuguese ] = "Página " ; + TEXT [ finnish ] = "Sivu " ; + TEXT [ danish ] = "Side " ; + TEXT [ french ] = "Page " ; + TEXT [ swedish ] = "Sida " ; + TEXT [ dutch ] = "Pagina " ; + TEXT [ spanish ] = "Página " ; + TEXT [ english_us ] = "Page " ; + TEXT[ chinese_simplified ] = "ŇłĂć "; + TEXT[ russian ] = "Ńňđŕíčöŕ "; + TEXT[ polish ] = "Strona "; + TEXT[ japanese ] = "Íß°ĽŢ "; + TEXT[ chinese_traditional ] = "¶± "; + TEXT[ arabic ] = "ŐÝÍÉ "; + TEXT[ dutch ] = "Pagina "; + TEXT[ chinese_simplified ] = "ŇłĂć "; + TEXT[ greek ] = "Óĺëßäá "; + TEXT[ korean ] = "ĆäŔĚÁö "; + TEXT[ turkish ] = "Sayfa "; + TEXT[ language_user1 ] = " "; +}; +String RID_TEXT_TOOLBOX +{ + /* ### ACHTUNG: Neuer Text in Resource? Textobjektleiste : Textleiste */ + Text = "Textobjektleiste" ; + Text [ English ] = "Text object bar" ; + Text [ portuguese ] = "Barra de objectos de texto" ; + Text [ english_us ] = "Text Object Bar" ; + Text [ portuguese_brazilian ] = "Textobjektleiste" ; + Text [ swedish ] = "Textobjektlist" ; + Text [ danish ] = "Tekstobjektlinje" ; + Text [ italian ] = "Barra degli oggetti di testo" ; + Text [ spanish ] = "Barra de objetos de texto" ; + Text [ french ] = "Barre d'objets de texte" ; + Text [ dutch ] = "Tekstbalk" ; + Text[ chinese_simplified ] = "ÎÄ×Ö¶ÔĎóŔ¸"; + Text[ russian ] = "Ďŕíĺëü îáúĺęňîâ ňĺęńňŕ"; + Text[ polish ] = "Pasek obiektów tabeli"; + Text[ japanese ] = "Ă·˝ÄµĚŢĽŢŞ¸ÄĘŢ°"; + Text[ chinese_traditional ] = "¤ĺ¦rŞ«Ąó¦C"; + Text[ arabic ] = "ÔŃíŘ ßÇĆäÇĘ ÇáäŐ"; + Text[ dutch ] = "Tekstbalk"; + Text[ chinese_simplified ] = "ÎÄ×Ö¶ÔĎóŔ¸"; + Text[ greek ] = "ĂńáěěŢ áíôéęĺéěÝíůí ęĺéěÝíďő"; + Text[ korean ] = "ĹŘ˝şĆ® °łĂĽ ¸đŔ˝"; + Text[ turkish ] = "Metin nesne çubuđu"; + Text[ language_user1 ] = " "; +}; +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_LINESPACE + MN_TEXT2 + MN_TEXT_BACKGROUND + MN_TEXT_DIALOGS(TRUE) + }; + Scroll = TRUE ; +}; +String RID_TABLE_TOOLBOX +{ + Text = "Tabellenobjektleiste" ; + Text [ English ] = "Table objectbar" ; + Text [ norwegian ] = "Table" ; + Text [ italian ] = "Barra degli oggetti per tabelle" ; + Text [ portuguese_brazilian ] = "Tabela" ; + Text [ portuguese ] = "Barra de objectos de tabela" ; + Text [ finnish ] = "Taulukko" ; + Text [ danish ] = "Tabelobjektlinje" ; + Text [ french ] = "Barre d'objets de tableau" ; + Text [ swedish ] = "Tabellobjektlist" ; + Text [ dutch ] = "Tabelobjectbalk" ; + Text [ spanish ] = "Barra de objetos para tablas" ; + Text [ english_us ] = "Table Object Bar" ; + Text[ chinese_simplified ] = "±í¸ń¶ÔĎóŔ¸"; + Text[ russian ] = "Ďŕíĺëü îáúĺęňŕ ňŕáëčöű"; + Text[ polish ] = "Pasek obiektów tabeli"; + Text[ japanese ] = "•\\µĚŢĽŢŞ¸ÄĘŢ°"; + Text[ chinese_traditional ] = "Şí®ćŞ«Ąó¦C"; + Text[ arabic ] = "ÔŃíŘ ßÇĆäÇĘ ĚĎćá"; + Text[ dutch ] = "Tabelobjectbalk"; + Text[ chinese_simplified ] = "±í¸ń¶ÔĎóŔ¸"; + Text[ greek ] = "ĂńáěěŢ áíôéęĺéěÝíůí đßíáęá"; + Text[ korean ] = "ÇĄ °łĂĽ ¸đŔ˝"; + Text[ turkish ] = "Tablo nesne çubuđu"; + Text[ language_user1 ] = " "; +}; +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 = "Rahmenobjektleiste" ; + Text [ English ] = "Frame objectbar" ; + Text [ norwegian ] = "Ramme" ; + Text [ italian ] = "Barra degli oggetti per cornice" ; + Text [ portuguese_brazilian ] = "Moldura" ; + Text [ portuguese ] = "Barra de molduras" ; + Text [ finnish ] = "Kehys" ; + Text [ danish ] = "Rammeobjektlinje" ; + Text [ french ] = "Barre d'objets de cadre" ; + Text [ swedish ] = "Ramobjektlist" ; + Text [ dutch ] = "Kaderobjectbalk" ; + Text [ spanish ] = "Barra de objetos de marco" ; + Text [ english_us ] = "Frame Object Bar" ; + Text[ chinese_simplified ] = "żň¶ÔĎóŔ¸"; + Text[ russian ] = "Ďŕíĺëü îáúĺęňîâ ęŕäđîâ"; + Text[ polish ] = "Pasek obiektów ramki"; + Text[ japanese ] = "gµĚŢĽŢŞ¸ÄĘŢ°"; + Text[ chinese_traditional ] = "®ŘŞ«Ąó¦C"; + Text[ arabic ] = "ÔŃíŘ ßÇĆäÇĘ ÇáĹŘÇŃ"; + Text[ dutch ] = "Kaderobjectbalk"; + Text[ chinese_simplified ] = "żň¶ÔĎóŔ¸"; + Text[ greek ] = "ĂńáěěŢ áíôéęĺéěÝíůí đëáéóßďő"; + Text[ korean ] = "ÇÁ·ąŔÓ °łĂĽ ¸đŔ˝"; + Text[ turkish ] = "Çerçeve nesne çubuđu"; + Text[ language_user1 ] = " "; +}; +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 = "Grafikobjektleiste" ; + Text [ English ] = "Graphic objectbar" ; + Text [ norwegian ] = "Graphic" ; + Text [ italian ] = "Barra degli oggetti grafici" ; + Text [ portuguese_brazilian ] = "Gr fico" ; + Text [ portuguese ] = "Barra de gráficos" ; + Text [ finnish ] = "Kuva" ; + Text [ danish ] = "Grafikobjektlinje" ; + Text [ french ] = "Barre d'objets graphiques" ; + Text [ swedish ] = "Grafikobjektlist" ; + Text [ dutch ] = "Objectbalk afbeeldingen" ; + Text [ spanish ] = "Barra de objetos gráficos" ; + Text [ english_us ] = "Graphics Object Bar" ; + Text[ chinese_simplified ] = "ÍĽĐζÔĎóŔ¸"; + Text[ russian ] = "Ďŕíĺëü ăđŕôč÷ĺńęčő îáúĺęňîâ"; + Text[ polish ] = "Pasek obiektów graficznych"; + Text[ japanese ] = "}Ś`•`‰ćµĚŢĽŢŞ¸ÄĘŢ°"; + Text[ chinese_traditional ] = "ąĎ¤ůŞ«Ąó¦C"; + Text[ arabic ] = "ÔŃíŘ ßÇĆäÇĘ ŐćŃÉ"; + Text[ dutch ] = "Objectbalk afbeeldingen"; + Text[ chinese_simplified ] = "ÍĽĐζÔĎóŔ¸"; + Text[ greek ] = "ĂńáěěŢ ăńáöéęţí áíôéęĺéěÝíůí"; + Text[ korean ] = "±×·ˇÇČ °łĂĽ ¸đŔ˝"; + Text[ turkish ] = "Grafik nesne çubuđu"; + Text[ language_user1 ] = " "; +}; +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_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 ; }; + ToolBoxItem + { + ITEM_TOOLBAR_SIM_START + }; + MN_ATTRIBUTES_GRAFIK + }; + Scroll = TRUE ; +}; +String RID_OLE_TOOLBOX +{ + Text = "Objekt" ; + Text [ English ] = "Object" ; + Text [ norwegian ] = "Object" ; + Text [ italian ] = "Oggetto" ; + Text [ portuguese_brazilian ] = "Objeto" ; + Text [ portuguese ] = "Objecto" ; + Text [ finnish ] = "Objekti" ; + Text [ danish ] = "Objekt" ; + Text [ french ] = "Objet" ; + Text [ swedish ] = "Objekt" ; + Text [ dutch ] = "Object" ; + Text [ spanish ] = "Objeto" ; + Text [ english_us ] = "Object" ; + Text[ chinese_simplified ] = "¶ÔĎó"; + Text[ russian ] = "Îáúĺęň"; + Text[ polish ] = "Obiekt"; + Text[ japanese ] = "µĚŢĽŢŞ¸Ä"; + Text[ chinese_traditional ] = "Ş«Ąó"; + Text[ arabic ] = "ßÇĆä"; + Text[ dutch ] = "Object"; + Text[ chinese_simplified ] = "¶ÔĎó"; + Text[ greek ] = "Áíôéęĺßěĺíď"; + Text[ korean ] = "°łĂĽ"; + Text[ turkish ] = "Nesne"; + Text[ language_user1 ] = " "; +}; +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 = "Zeichenobjektleiste" ; + Text [ English ] = "Draw objectbar" ; + Text [ norwegian ] = "Draw" ; + Text [ italian ] = "Barra degli oggetti per disegno" ; + Text [ portuguese_brazilian ] = "Desenhar" ; + Text [ portuguese ] = "Barra de objectos de desenho" ; + Text [ finnish ] = "Piirrä" ; + Text [ danish ] = "Tegneobjektlinje" ; + Text [ french ] = "Barre d'objets de dessin" ; + Text [ swedish ] = "Ritobjektlist" ; + Text [ dutch ] = "Tekenobjectbalk" ; + Text [ spanish ] = "Barra de objetos de dibujo" ; + Text [ english_us ] = "Draw Object Bar" ; + Text[ chinese_simplified ] = "»ćÍĽ¶ÔĎóŔ¸"; + Text[ russian ] = "Ďŕíĺëü ăđŕôč÷ĺńęîăî îáúĺęňŕ"; + Text[ polish ] = "Pasek obiektów rysunkowych"; + Text[ japanese ] = "}Ś`•`‰ćµĚŢĽŢŞ¸ÄĘŢ°"; + Text[ chinese_traditional ] = "øąĎŞ«Ąó¦C"; + Text[ arabic ] = "ÔŃíŘ ÇáßÇĆäÇĘ ÇáŃÓćăíÉ"; + Text[ dutch ] = "Tekenobjectbalk"; + Text[ chinese_simplified ] = "»ćÍĽ¶ÔĎóŔ¸"; + Text[ greek ] = "ĂńáěěŢ áíôéęĺéěÝíůí ó÷ĺäßáóçň"; + Text[ korean ] = "±×¸®±â °łĂĽ ¸đŔ˝"; + Text[ turkish ] = "Çizim nesne çubuđu"; + Text[ language_user1 ] = " "; +}; +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_DRAWFORM_TOOLBOX +{ + Text = "Kontrollfeldleiste" ; + Text [ English ] = "Control bar" ; + Text [ portuguese ] = "Barra de controlos" ; + Text [ english_us ] = "Control Bar" ; + Text [ portuguese_brazilian ] = "Kontrollfeldleiste" ; + Text [ swedish ] = "Kontrollfältlist" ; + Text [ danish ] = "Kontrolelementlinje" ; + Text [ italian ] = "Barra dei campi di controllo" ; + Text [ spanish ] = "Barra de campos de control" ; + Text [ french ] = "Barre de contrôles" ; + Text [ dutch ] = "Controleveldbalk" ; + Text[ chinese_simplified ] = "żŘÖĆ×Ö¶ÎŔ¸"; + Text[ russian ] = "Ďŕíĺëü ýëĺěĺíňîâ óďđŕâëĺíč˙"; + Text[ polish ] = "Pasek pól kontrolnych"; + Text[ japanese ] = "şÝÄŰ°ŮĘŢ°"; + Text[ chinese_traditional ] = "±±¨î¶µ¦C"; + Text[ arabic ] = "ÔŃíŘ ÚäÇŐŃ ÇáĘÍßă"; + Text[ dutch ] = "Controleveldbalk"; + Text[ chinese_simplified ] = "żŘÖĆ×Ö¶ÎŔ¸"; + Text[ greek ] = "ĂńáěěŢ ĺëÝă÷ďő đĺäßůí"; + Text[ korean ] = "ÄÁĆ®·Ń ¸đŔ˝"; + Text[ turkish ] = "Komut alaný çubuđu"; + Text[ language_user1 ] = " "; +}; +ToolBox RID_DRAWFORM_TOOLBOX +{ + HelpID = HID_DRAWFORM_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 = + { + ToolBoxItem + { + Identifier = FN_TOOL_ANKER ; + HelpID = FN_TOOL_ANKER ; + DropDown = TRUE ; + }; + ToolBoxItem + { + Type = TOOLBOXITEM_SEPARATOR ; + }; + ToolBoxItem + { + Identifier = SID_ATTR_TRANSFORM ; + HelpID = SID_ATTR_TRANSFORM ; + }; + ToolBoxItem + { + Identifier = SID_FM_CTL_PROPERTIES ; + HelpID = SID_FM_CTL_PROPERTIES ; + }; + ToolBoxItem + { + Identifier = SID_FM_PROPERTIES ; + HelpID = SID_FM_PROPERTIES ; + }; + ToolBoxItem + { + Identifier = SID_FM_SHOW_FMEXPLORER ; + HelpID = SID_FM_SHOW_FMEXPLORER ; + }; + ToolBoxItem + { + Identifier = SID_FM_TAB_DIALOG ; + HelpID = SID_FM_TAB_DIALOG ; + }; + ToolBoxItem + { + Identifier = SID_FM_ADD_FIELD ; + HelpID = SID_FM_ADD_FIELD ; + }; + ToolBoxItem + { + Identifier = SID_FM_DESIGN_MODE ; + HelpID = SID_FM_DESIGN_MODE ; + }; + ToolBoxItem + { + Type = TOOLBOXITEM_SEPARATOR ; + }; + MN_LAYER + ToolBoxItem + { + Type = TOOLBOXITEM_SEPARATOR ; + }; + ToolBoxItem + { + Identifier = SID_GROUP ; + HelpID = SID_GROUP ; + }; + ToolBoxItem + { + Identifier = SID_UNGROUP ; + HelpID = SID_UNGROUP ; + }; + ToolBoxItem + { + Identifier = SID_ENTER_GROUP ; + HelpID = SID_ENTER_GROUP ; + }; + ToolBoxItem + { + Identifier = SID_LEAVE_GROUP ; + HelpID = SID_LEAVE_GROUP ; + }; + MN_GRID( HIDE=FALSE ) + ToolBoxItem + { + Type = TOOLBOXITEM_SEPARATOR ; + }; + ToolBoxItem + { + Identifier = SID_OBJECT_ALIGN ; + HelpID = SID_OBJECT_ALIGN ; + DropDown = TRUE ; + }; + }; +}; +String RID_BEZIER_TOOLBOX +{ + Text = "Bezierobjektleiste" ; + Text [ English ] = "Bezier objectbar" ; + Text [ english_us ] = "Bézier object bar" ; + Text [ swedish ] = "Bézierobjektlist" ; + Text [ danish ] = "Bezierobjektlinje" ; + Text [ italian ] = "Barra degli oggetti di Bézier" ; + Text [ spanish ] = "Barra de objetos Bézier" ; + Text [ french ] = "Barre d'objets Bézier" ; + Text [ dutch ] = "Bézierobjectbalk" ; + Text [ portuguese ] = "Barra de objectos Bézier" ; + Text [ portuguese_brazilian ] = "Bezierobjektleiste" ; + Text[ chinese_simplified ] = "ÇúĎ߶ÔĎóŔ¸"; + Text[ russian ] = "Ďŕíĺëü îáúĺęňîâ Áĺçüĺ"; + Text[ polish ] = "Pasek obiektów Beziera"; + Text[ japanese ] = "ÍŢĽŢŞ‹ČüµĚŢĽŢŞ¸ÄĘŢ°"; + Text[ chinese_traditional ] = "¦±˝uŞ«Ąó¦C"; + Text[ arabic ] = "ÔŃíŘ ßÇĆäÇĘ Bézier"; + Text[ dutch ] = "Bézierobjectbalk"; + Text[ chinese_simplified ] = "ÇúĎ߶ÔĎóŔ¸"; + Text[ greek ] = "ĂńáěěŢ áíôéęĺéěÝíůí Bezier"; + Text[ korean ] = "şŁÁöľî °łĂĽ ¸đŔ˝"; + Text[ turkish ] = "Bezier nesne çubuđu"; + Text[ language_user1 ] = " "; +}; +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 = "Textobjektleiste" ; + Text [ English ] = "Text objectbar" ; + Text [ norwegian ] = "Tegne tekstmodus" ; + Text [ italian ] = "Barra degli oggetti di testo" ; + Text [ portuguese_brazilian ] = "Modo desenhar texto" ; + Text [ portuguese ] = "Barra de objectos de texto" ; + Text [ finnish ] = "Piirroksen tekstitila" ; + Text [ danish ] = "Tekstobjektlinje" ; + Text [ french ] = "Barre d'objets de texte" ; + Text [ swedish ] = "Textobjektlist" ; + Text [ dutch ] = "Tekstobjectbalk" ; + Text [ spanish ] = "Barra de objetos de texto" ; + Text [ english_us ] = "Text Object Bar" ; + Text[ chinese_simplified ] = "ÎÄ×Ö¶ÔĎóŔ¸"; + Text[ russian ] = "Ďŕíĺëü îáúĺęňîâ ňĺęńňŕ"; + Text[ polish ] = "Pasek obiektów tekstowych"; + Text[ japanese ] = "Ă·˝ÄµĚŢĽŢŞ¸ÄĘŢ°"; + Text[ chinese_traditional ] = "¤ĺ¦rŞ«Ąó¦C"; + Text[ arabic ] = "ÔŃíŘ ßÇĆäÇĘ ÇáäŐ"; + Text[ dutch ] = "Tekstobjectbalk"; + Text[ chinese_simplified ] = "ÎÄ×Ö¶ÔĎóŔ¸"; + Text[ greek ] = "ĂńáěěŢ áíôéęĺéěÝíůí ęĺéěÝíďő"; + Text[ korean ] = "ĹŘ˝şĆ® °łĂĽ ¸đŔ˝"; + Text[ turkish ] = "Metin nesne çubuđu"; + Text[ language_user1 ] = " "; +}; +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_DIALOGS(FALSE) + }; + Scroll = TRUE ; +}; +String RID_NUM_TOOLBOX +{ + Text = "Nummerierungsobjektleiste" ; + Text [ English ] = "Outlining objectbar" ; + Text [ norwegian ] = "+++Outlining" ; + Text [ italian ] = "Barra degli oggetti per la numerazione" ; + Text [ portuguese_brazilian ] = "Vazado" ; + Text [ portuguese ] = "Barra de objectos de numeraçăo" ; + Text [ finnish ] = "Jäsennys" ; + Text [ danish ] = "Nummereringsobjektlinje" ; + Text [ french ] = "Barre d'objets de numérotation" ; + Text [ swedish ] = "Numreringsobjektlist" ; + Text [ dutch ] = "Nummeringsobjectbalk" ; + Text [ spanish ] = "Barra de objetos de numeración" ; + Text [ english_us ] = "Numbering Object Bar" ; + Text[ chinese_simplified ] = "±ŕşĹ¶ÔĎóŔ¸"; + Text[ russian ] = "Ďŕíĺëü îáúĺęňîâ íóěĺđŕöčč"; + Text[ polish ] = "Pasek obiektów numeracji"; + Text[ japanese ] = "”ÔŤ†•t‚ŻµĚŢĽŢŞ¸ÄĘŢ°"; + Text[ chinese_traditional ] = "˝s¸ąŞ«Ąó¦C"; + Text[ arabic ] = "ÔŃíŘ ßÇĆäÇĘ ÇáĘŃŢíă"; + Text[ dutch ] = "Nummeringsobjectbalk"; + Text[ chinese_simplified ] = "±ŕşĹ¶ÔĎóŔ¸"; + Text[ greek ] = "ĂńáěěŢ áíôéęĺéěÝíůí áńßčěçóçň"; + Text[ korean ] = "ąřČŁ °łĂĽ ¸đŔ˝"; + Text[ turkish ] = "Numaralama nesne çubuđu"; + Text[ language_user1 ] = " "; +}; +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 = "Text" ; + Text [ ENGLISH ] = "Text" ; + Text [ dutch ] = "Tekst" ; + Text [ english_us ] = "Text" ; + Text [ italian ] = "Testo" ; + Text [ spanish ] = "Texto" ; + Text [ french ] = "Texte" ; + Text [ swedish ] = "Text" ; + Text [ danish ] = "Tekst" ; + Text [ portuguese_brazilian ] = "Text" ; + Text [ portuguese ] = "Texto" ; + Text[ chinese_simplified ] = "ÎÄ×Ö"; + Text[ russian ] = "Ňĺęńň"; + Text[ polish ] = "Tekst"; + Text[ japanese ] = "Ă·˝Ä"; + Text[ chinese_traditional ] = "¤ĺ¦r"; + Text[ arabic ] = "äŐ"; + Text[ dutch ] = "Tekst"; + Text[ chinese_simplified ] = "ÎÄ×Ö"; + Text[ greek ] = "Ęĺßěĺíď"; + Text[ korean ] = "ĹŘ˝şĆ®"; + Text[ turkish ] = "Metin"; + Text[ language_user1 ] = " "; +}; +String STR_SHELLNAME_TABLE +{ + Text = "Tabelle" ; + Text [ ENGLISH ] = "Table" ; + Text [ dutch ] = "Tabel" ; + Text [ english_us ] = "Table" ; + Text [ italian ] = "Tabella" ; + Text [ spanish ] = "Tabla" ; + Text [ french ] = "Tableau" ; + Text [ swedish ] = "Tabell" ; + Text [ danish ] = "Tabel" ; + Text [ portuguese_brazilian ] = "Tabelle" ; + Text [ portuguese ] = "Tabela" ; + Text[ chinese_simplified ] = "±í¸ń"; + Text[ russian ] = "Ňŕáëčöŕ"; + Text[ polish ] = "Tabela"; + Text[ japanese ] = "Ă°ĚŢŮ"; + Text[ chinese_traditional ] = "Şí®ć"; + Text[ arabic ] = "ĚĎćá"; + Text[ dutch ] = "Tabel"; + Text[ chinese_simplified ] = "±í¸ń"; + Text[ greek ] = "Đßíáęáň"; + Text[ korean ] = "ÇĄ"; + Text[ turkish ] = "Tablo"; + Text[ language_user1 ] = " "; +}; +String STR_SHELLNAME_FRAME +{ + Text = "Rahmen" ; + Text [ ENGLISH ] = "Frame" ; + Text [ dutch ] = "Kader" ; + Text [ english_us ] = "Frame" ; + Text [ italian ] = "Cornice" ; + Text [ spanish ] = "Marco" ; + Text [ french ] = "Cadre" ; + Text [ swedish ] = "Ram" ; + Text [ danish ] = "Ramme" ; + Text [ portuguese_brazilian ] = "Rahmen" ; + Text [ portuguese ] = "Moldura" ; + Text[ chinese_simplified ] = "żň"; + Text[ russian ] = "Ňĺęńňîâîĺ ďîëĺ"; + Text[ polish ] = "Ramka"; + Text[ japanese ] = "g"; + Text[ chinese_traditional ] = "¤ĺ¦r¤č¶ô"; + Text[ arabic ] = "ĹŘÇŃ"; + Text[ dutch ] = "Kader"; + Text[ chinese_simplified ] = "żň"; + Text[ greek ] = "Đĺńßăńáěěá"; + Text[ korean ] = "ÇÁ·ąŔÓ"; + Text[ turkish ] = "Çerçeve"; + Text[ language_user1 ] = " "; +}; +String STR_SHELLNAME_GRAPHIC +{ + Text = "Grafik" ; + Text [ ENGLISH ] = "Graphic" ; + Text [ english_us ] = "Graphics" ; + Text [ italian ] = "Grafico" ; + Text [ spanish ] = "Imagen" ; + Text [ french ] = "Image" ; + Text [ dutch ] = "Afbeelding" ; + Text [ swedish ] = "Grafik" ; + Text [ danish ] = "Billede" ; + Text [ portuguese_brazilian ] = "Grafik" ; + Text [ portuguese ] = "Imagem" ; + Text[ chinese_simplified ] = "ÍĽĐÎ"; + Text[ russian ] = "Đčńóíîę"; + Text[ polish ] = "Grafika"; + Text[ japanese ] = "}"; + Text[ chinese_traditional ] = "ąĎ¤ů"; + Text[ arabic ] = "ŐćŃÉ"; + Text[ dutch ] = "Afbeelding"; + Text[ chinese_simplified ] = "ÍĽĐÎ"; + Text[ greek ] = "Ăńáöéęü"; + Text[ korean ] = "±×·ˇÇČ"; + Text[ turkish ] = "Grafik"; + Text[ language_user1 ] = " "; +}; +String STR_SHELLNAME_OBJECT +{ + Text = "Objekt" ; + Text [ ENGLISH ] = "Object" ; + Text [ english_us ] = "Object" ; + Text [ italian ] = "Oggetto" ; + Text [ spanish ] = "Objeto" ; + Text [ french ] = "Objet" ; + Text [ dutch ] = "Object" ; + Text [ swedish ] = "Objekt" ; + Text [ danish ] = "Objekt" ; + Text [ portuguese_brazilian ] = "Objekt" ; + Text [ portuguese ] = "Objecto" ; + Text[ chinese_simplified ] = "¶ÔĎó"; + Text[ russian ] = "Îáúĺęň"; + Text[ polish ] = "Obiekt"; + Text[ japanese ] = "µĚŢĽŢŞ¸Ä"; + Text[ chinese_traditional ] = "Ş«Ąó"; + Text[ arabic ] = "ßÇĆä"; + Text[ dutch ] = "Object"; + Text[ chinese_simplified ] = "¶ÔĎó"; + Text[ greek ] = "Áíôéęĺßěĺíď"; + Text[ korean ] = "°łĂĽ"; + Text[ turkish ] = "Nesne"; + Text[ language_user1 ] = " "; +}; +String STR_SHELLNAME_LIST +{ + Text = "Liste" ; + Text [ ENGLISH ] = "List" ; + Text [ dutch ] = "Lijst" ; + Text [ english_us ] = "List" ; + Text [ italian ] = "Elenco" ; + Text [ spanish ] = "Lista" ; + Text [ french ] = "Liste" ; + Text [ swedish ] = "Lista" ; + Text [ danish ] = "Liste" ; + Text [ portuguese_brazilian ] = "Liste" ; + Text [ portuguese ] = "Lista" ; + Text[ chinese_simplified ] = "Áбí"; + Text[ russian ] = "Ńďčńîę"; + Text[ polish ] = "Lista"; + Text[ japanese ] = "Ř˝Ä"; + Text[ chinese_traditional ] = "˛Młć"; + Text[ arabic ] = "ŢÇĆăÉ"; + Text[ dutch ] = "Lijst"; + Text[ chinese_simplified ] = "Áбí"; + Text[ greek ] = "Ëßóôá"; + Text[ korean ] = "¸®˝şĆ®"; + Text[ turkish ] = "Liste"; + Text[ language_user1 ] = " "; +}; +String STR_SHELLNAME_DRAW +{ + Text = "Zeichnung" ; + Text [ ENGLISH ] = "Drawing" ; + Text [ dutch ] = "Tekening" ; + Text [ english_us ] = "Drawing" ; + Text [ italian ] = "Disegno" ; + Text [ spanish ] = "Dibujo" ; + Text [ french ] = "Dessin" ; + Text [ swedish ] = "Teckning" ; + Text [ danish ] = "Tegning" ; + Text [ portuguese_brazilian ] = "Zeichnung" ; + Text [ portuguese ] = "Desenho" ; + Text[ chinese_simplified ] = "»ćÍĽ"; + Text[ russian ] = "Đčńóíîę"; + Text[ polish ] = "Rysunek"; + Text[ japanese ] = "}Ś`•`‰ć"; + Text[ chinese_traditional ] = "øąĎ"; + Text[ arabic ] = "ŃÓă"; + Text[ dutch ] = "Tekening"; + Text[ chinese_simplified ] = "»ćÍĽ"; + Text[ greek ] = "Ó÷Ýäéď"; + Text[ korean ] = "±×¸®±â"; + Text[ turkish ] = "Çizim"; + Text[ language_user1 ] = " "; +}; +String STR_SHELLNAME_DRAWFORM +{ + Text = "Forms" ; + Text [ ENGLISH ] = "Forms" ; + Text [ english_us ] = "Forms" ; + Text [ portuguese_brazilian ] = "Forms" ; + Text [ swedish ] = "Forms" ; + Text [ danish ] = "Formular" ; + Text [ italian ] = "Forms" ; + Text [ spanish ] = "Formularios" ; + Text [ french ] = "Formulaires" ; + Text [ dutch ] = "Forms" ; + Text [ portuguese ] = "Formulários" ; + Text[ chinese_simplified ] = "ą«Ę˝"; + Text[ russian ] = "Ôîđěű"; + Text[ polish ] = "Kształty"; + Text[ japanese ] = "Ě«°Ń"; + Text[ chinese_traditional ] = "¤˝¦ˇ"; + Text[ arabic ] = "äăÇĐĚ"; + Text[ dutch ] = "Forms"; + Text[ chinese_simplified ] = "ą«Ę˝"; + Text[ greek ] = "Öüńěĺň"; + Text[ korean ] = "ľç˝Ä"; + Text[ turkish ] = "Form"; + Text[ language_user1 ] = " "; +}; +String STR_SHELLNAME_BEZIER +{ + Text = "Bezier" ; + Text [ ENGLISH ] = "Bezier" ; + Text [ english_us ] = "Bézier" ; + Text [ portuguese_brazilian ] = "Bezier" ; + Text [ swedish ] = "Bézier" ; + Text [ danish ] = "Bezier" ; + Text [ italian ] = "Bezier" ; + Text [ spanish ] = "Bézier" ; + Text [ french ] = "Bézier" ; + Text [ dutch ] = "Bézier" ; + Text [ portuguese ] = "Bézier" ; + Text[ chinese_simplified ] = "ÇúĎß"; + Text[ russian ] = "Áĺçüĺ"; + Text[ polish ] = "Bezier"; + Text[ japanese ] = "ÍŢĽŢŞ‹Čü"; + Text[ chinese_traditional ] = "¦±˝u"; + Text[ arabic ] = "Bézier"; + Text[ dutch ] = "Bézier"; + Text[ chinese_simplified ] = "ÇúĎß"; + Text[ greek ] = "Bezier"; + Text[ korean ] = "şŁÁöľî"; + Text[ turkish ] = "Bezier"; + Text[ language_user1 ] = " "; +}; +String STR_SHELLNAME_DRAW_TEXT +{ + Text = "Zeichentext" ; + Text [ ENGLISH ] = "Draw text" ; + Text [ english_us ] = "Draw text" ; + Text [ italian ] = "Testo di disegno" ; + Text [ spanish ] = "Texto de diseńo" ; + Text [ french ] = "Texte dessiné" ; + Text [ dutch ] = "Tekentekst" ; + Text [ swedish ] = "Teckningstext" ; + Text [ danish ] = "Tegnetekst" ; + Text [ portuguese_brazilian ] = "Zeichentext" ; + Text [ portuguese ] = "Texto de desenho" ; + Text[ chinese_simplified ] = "»ćÍĽÎÄ×Ö"; + Text[ russian ] = "Ňĺęńň đčńóíęŕ"; + Text[ polish ] = "Tekst rysunku"; + Text[ japanese ] = "}Ś`•`‰ćĂ·˝Ä"; + Text[ chinese_traditional ] = "øąĎ¤ĺ¦r"; + Text[ arabic ] = "äŐ ŃÓă"; + Text[ dutch ] = "Tekentekst"; + Text[ chinese_simplified ] = "»ćÍĽÎÄ×Ö"; + Text[ greek ] = "Ęĺßěĺíď ó÷ĺäßďő"; + Text[ korean ] = "ĹŘ˝şĆ® ±×¸®±â"; + Text[ turkish ] = "Çizim metni"; + Text[ language_user1 ] = " "; +}; + //Strings fuer Gallery/Hintergrund +String STR_SWBG_PARAGRAPH +{ + Text = "Absatz" ; + Text [ ENGLISH ] = "Paragraph" ; + Text [ english_us ] = "Paragraph" ; + Text [ portuguese_brazilian ] = "Absatz" ; + Text [ swedish ] = "Stycke" ; + Text [ danish ] = "Afsnit" ; + Text [ italian ] = "Paragrafo" ; + Text [ spanish ] = "Párrafo" ; + Text [ french ] = "Paragraphe" ; + Text [ dutch ] = "Alinea" ; + Text [ portuguese ] = "Parágrafo" ; + Text[ chinese_simplified ] = "¶ÎÂä"; + Text[ russian ] = "Ŕáçŕö"; + Text[ polish ] = "Akapit"; + Text[ japanese ] = "’i—Ž"; + Text[ chinese_traditional ] = "¬q¸¨"; + Text[ arabic ] = "ÝŢŃÉ"; + Text[ dutch ] = "Alinea"; + Text[ chinese_simplified ] = "¶ÎÂä"; + Text[ greek ] = "ĐáńÜăńáöďň"; + Text[ korean ] = "´Ü¶ô"; + Text[ turkish ] = "Paragraf"; + Text[ language_user1 ] = " "; +}; +String STR_SWBG_GRAPHIC +{ + Text = "Grafik" ; + Text [ ENGLISH ] = "Graphic" ; + Text [ english_us ] = "Graphics" ; + Text [ portuguese_brazilian ] = "Grafik" ; + Text [ swedish ] = "Grafik" ; + Text [ danish ] = "Billede" ; + Text [ italian ] = "Immagine" ; + Text [ spanish ] = "Imagen" ; + Text [ french ] = "Image" ; + Text [ dutch ] = "Afbeelding" ; + Text [ portuguese ] = "Imagem" ; + Text[ chinese_simplified ] = "ÍĽĐÎ"; + Text[ russian ] = "Đčńóíîę"; + Text[ polish ] = "Grafika"; + Text[ japanese ] = "}"; + Text[ chinese_traditional ] = "ąĎ¤ů"; + Text[ arabic ] = "ŐćŃÉ"; + Text[ dutch ] = "Afbeelding"; + Text[ chinese_simplified ] = "ÍĽĐÎ"; + Text[ greek ] = "Ăńáöéęü"; + Text[ korean ] = "±×·ˇÇČ"; + Text[ turkish ] = "Grafik"; + Text[ language_user1 ] = " "; +}; +String STR_SWBG_OLE +{ + Text = "OLE Objekt" ; + Text [ ENGLISH ] = "OLE Object" ; + Text [ english_us ] = "OLE object" ; + Text [ portuguese_brazilian ] = "OLE Objekt" ; + Text [ swedish ] = "OLE-objekt" ; + Text [ danish ] = "OLE-objekt" ; + Text [ italian ] = "Oggetto OLE" ; + Text [ spanish ] = "Objeto OLE" ; + Text [ french ] = "Objet OLE" ; + Text [ dutch ] = "OLE-object" ; + Text [ portuguese ] = "Objecto OLE" ; + Text[ chinese_simplified ] = "OLE ¶ÔĎó"; + Text[ russian ] = "Îáúĺęň OLE"; + Text[ polish ] = "Obiekt OLE"; + Text[ japanese ] = "OLE µĚŢĽŢŞ¸Ä"; + Text[ chinese_traditional ] = "OLE Ş«Ąó"; + Text[ arabic ] = "ßÇĆä OLE"; + Text[ dutch ] = "OLE-object"; + Text[ chinese_simplified ] = "OLE ¶ÔĎó"; + Text[ greek ] = "Áíôéęĺßěĺíď OLE"; + Text[ korean ] = "OLE °łĂĽ"; + Text[ turkish ] = "OLE nesnesi"; + Text[ language_user1 ] = " "; +}; +String STR_SWBG_FRAME +{ + Text = "Rahmen" ; + Text [ ENGLISH ] = "Frame" ; + Text [ english_us ] = "Frame" ; + Text [ portuguese_brazilian ] = "Rahmen" ; + Text [ swedish ] = "Ram" ; + Text [ danish ] = "Ramme" ; + Text [ italian ] = "Cornice" ; + Text [ spanish ] = "Marco" ; + Text [ french ] = "Cadre" ; + Text [ dutch ] = "Kader" ; + Text [ portuguese ] = "Moldura" ; + Text[ chinese_simplified ] = "żň"; + Text[ russian ] = "Ňĺęńňîâîĺ ďîëĺ"; + Text[ polish ] = "Ramka"; + Text[ japanese ] = "g"; + Text[ chinese_traditional ] = "¤ĺ¦r¤č¶ô"; + Text[ arabic ] = "ĹŘÇŃ"; + Text[ dutch ] = "Kader"; + Text[ chinese_simplified ] = "żň"; + Text[ greek ] = "Đĺńßăńáěěá"; + Text[ korean ] = "ÇÁ·ąŔÓ"; + Text[ turkish ] = "Çerçeve"; + Text[ language_user1 ] = " "; +}; +String STR_SWBG_TABLE +{ + Text = "Tabelle" ; + Text [ ENGLISH ] = "Table" ; + Text [ english_us ] = "Table" ; + Text [ portuguese_brazilian ] = "Tabelle" ; + Text [ swedish ] = "Tabell" ; + Text [ danish ] = "Tabel" ; + Text [ italian ] = "Tabella" ; + Text [ spanish ] = "Tabla" ; + Text [ french ] = "Tableau" ; + Text [ dutch ] = "Tabel" ; + Text [ portuguese ] = "Tabela" ; + Text[ chinese_simplified ] = "±í¸ń"; + Text[ russian ] = "Ňŕáëčöŕ"; + Text[ polish ] = "Tabela"; + Text[ japanese ] = "Ă°ĚŢŮ"; + Text[ chinese_traditional ] = "Şí®ć"; + Text[ arabic ] = "ĚĎćá"; + Text[ dutch ] = "Tabel"; + Text[ chinese_simplified ] = "±í¸ń"; + Text[ greek ] = "Đßíáęáň"; + Text[ korean ] = "ÇĄ"; + Text[ turkish ] = "Tablo"; + Text[ language_user1 ] = " "; +}; +String STR_SWBG_TABLE_ROW +{ + Text = "Tabellenzeile" ; + Text [ ENGLISH ] = "Tablerow" ; + Text [ english_us ] = "Table row" ; + Text [ portuguese_brazilian ] = "Tabellenzeile" ; + Text [ swedish ] = "Tabellrad" ; + Text [ danish ] = "Tabelrćkke" ; + Text [ italian ] = "Riga" ; + Text [ spanish ] = "Fila de la tabla" ; + Text [ french ] = "Ligne de table" ; + Text [ dutch ] = "Tabelrij" ; + Text [ portuguese ] = "Linha de tabela" ; + Text[ chinese_simplified ] = "ą¤×÷±íµĄÔ޸ń"; + Text[ russian ] = "Ńňđîęŕ ňŕáëčöű"; + Text[ polish ] = "Wiersz tabeli"; + Text[ japanese ] = "•\\‚ĚŤs"; + Text[ chinese_traditional ] = "¤u§@ŞíŔx¦s®ć"; + Text[ arabic ] = "ŐÝ ĚĎćá"; + Text[ dutch ] = "Tabelrij"; + Text[ chinese_simplified ] = "ą¤×÷±íµĄÔ޸ń"; + Text[ greek ] = "ĂńáěěŢ đßíáęá"; + Text[ korean ] = "ÇĄ Çŕ"; + Text[ turkish ] = "Tablo satýrý"; + Text[ language_user1 ] = " "; +}; +String STR_SWBG_TABLE_CELL +{ + Text = "Tabellenzelle" ; + Text [ ENGLISH ] = "Tablecell" ; + Text [ english_us ] = "Table cell" ; + Text [ portuguese_brazilian ] = "Tabellenzelle" ; + Text [ swedish ] = "Tabellcell" ; + Text [ danish ] = "Tabelcelle" ; + Text [ italian ] = "Cella" ; + Text [ spanish ] = "Celda de la tabla" ; + Text [ french ] = "Cellule de table" ; + Text [ dutch ] = "Tabelcel" ; + Text [ portuguese ] = "Célula de tabela" ; + Text[ chinese_simplified ] = "ą¤×÷±íµĄÔ޸ń"; + Text[ russian ] = "ß÷ĺéęŕ ňŕáëčöű"; + Text[ polish ] = "Komórka tabeli"; + Text[ japanese ] = "Ă°ĚŢŮ‚ĚľŮ"; + Text[ chinese_traditional ] = "¤u§@ŞíŔx¦s®ć"; + Text[ arabic ] = "ÎáíÉ ĚĎćá"; + Text[ dutch ] = "Tabelcel"; + Text[ chinese_simplified ] = "ą¤×÷±íµĄÔ޸ń"; + Text[ greek ] = "Ęĺëß đßíáęá"; + Text[ korean ] = "ÇĄ Ľż"; + Text[ turkish ] = "Tablo hücresi"; + Text[ language_user1 ] = " "; +}; +String STR_SWBG_PAGE +{ + Text = "Seite" ; + Text [ ENGLISH ] = "Page" ; + Text [ english_us ] = "Page" ; + Text [ portuguese_brazilian ] = "Seite" ; + Text [ swedish ] = "Sida" ; + Text [ danish ] = "Side" ; + Text [ italian ] = "Pagina" ; + Text [ spanish ] = "Página" ; + Text [ french ] = "Page" ; + Text [ dutch ] = "Pagina" ; + Text [ portuguese ] = "Página" ; + Text[ chinese_simplified ] = "Ňł"; + Text[ russian ] = "Ńňđŕíčöŕ"; + Text[ polish ] = "Strona"; + Text[ japanese ] = "Íß°ĽŢ"; + Text[ chinese_traditional ] = "¶"; + Text[ arabic ] = "ŐÝÍÉ"; + Text[ dutch ] = "Pagina"; + Text[ chinese_simplified ] = "Ňł"; + Text[ greek ] = "Óĺëßäá"; + Text[ korean ] = "ĆäŔĚÁö"; + Text[ turkish ] = "Sayfa"; + Text[ language_user1 ] = " "; +}; +String STR_SWBG_HEADER +{ + Text = "Kopfzeile" ; + Text [ ENGLISH ] = "Header" ; + Text [ english_us ] = "Header" ; + Text [ portuguese_brazilian ] = "Kopfzeile" ; + Text [ swedish ] = "Sidhuvud" ; + Text [ danish ] = "Sidehoved" ; + Text [ italian ] = "Riga d'intestazione" ; + Text [ spanish ] = "Encabezamiento" ; + Text [ french ] = "En-tęte" ; + Text [ dutch ] = "Koptekst" ; + Text [ portuguese ] = "Cabeçalho" ; + Text[ chinese_simplified ] = "ҳü"; + Text[ russian ] = "Âĺđőíčé ęîëîíňčňóë"; + Text[ polish ] = "Nagłówek"; + Text[ japanese ] = "ÍŻŔŢ"; + Text[ chinese_traditional ] = "¶ş"; + Text[ arabic ] = "ŃĂÓ ÇáŐÝÍÉ"; + Text[ dutch ] = "Koptekst"; + Text[ chinese_simplified ] = "ҳü"; + Text[ greek ] = "Ęĺöáëßäá"; + Text[ korean ] = "¸Ó¸®±Ű"; + Text[ turkish ] = "Üstbilgi"; + Text[ language_user1 ] = " "; +}; +String STR_SWBG_FOOTER +{ + Text = "Fußzeile" ; + Text [ ENGLISH ] = "Footer" ; + Text [ english_us ] = "Footer" ; + Text [ portuguese_brazilian ] = "Fußzeile" ; + Text [ swedish ] = "Sidfot" ; + Text [ danish ] = "Sidefod" ; + Text [ italian ] = "Pič di pagina" ; + Text [ spanish ] = "Pie de página" ; + Text [ french ] = "Pied de page" ; + Text [ dutch ] = "Voettekst" ; + Text [ portuguese ] = "Rodapé" ; + Text[ chinese_simplified ] = "Ňł˝Ĺ"; + Text[ russian ] = "Íčćíčé ęîëîíňčňóë"; + Text[ polish ] = "Stopka"; + Text[ japanese ] = "‹r’Ť"; + Text[ chinese_traditional ] = "¶§Ŕ"; + Text[ arabic ] = "ĘĐííá ÇáŐÝÍÉ"; + Text[ dutch ] = "Voettekst"; + Text[ chinese_simplified ] = "Ňł˝Ĺ"; + Text[ greek ] = "ŐđďóÝëéäď"; + Text[ korean ] = "ąŮ´Ú±Ű"; + Text[ turkish ] = "Altbilgi"; + Text[ language_user1 ] = " "; +}; + //Ende: Strings fuer Gallery/Hintergrund + diff --git a/sw/source/ui/shells/slotadd.cxx b/sw/source/ui/shells/slotadd.cxx new file mode 100644 index 0000000000..c6f99016c3 --- /dev/null +++ b/sw/source/ui/shells/slotadd.cxx @@ -0,0 +1,423 @@ +/************************************************************************* + * + * $RCSfile: slotadd.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:47 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifdef PRECOMPILED +#include "ui_pch.hxx" +#endif +#pragma hdrstop + +#include "hintids.hxx" +#include "uiitems.hxx" +#include "uiparam.hxx" +#include "cmdid.h" + +#ifndef _AEITEM_HXX //autogen +#include <svtools/aeitem.hxx> +#endif +#ifndef _SFXRECTITEM_HXX //autogen +#include <svtools/rectitem.hxx> +#endif +#ifndef _SFX_OBJITEM_HXX //autogen +#include <sfx2/objitem.hxx> +#endif +#ifndef _SFX_DBCOLL_HXX //autogen +#include <offmgr/dbcoll.hxx> +#endif +#ifndef _SVX_RULRITEM_HXX //autogen +#include <svx/rulritem.hxx> +#endif +#ifndef _IDETEMP_HXX //autogen +#include <basctl/idetemp.hxx> +#endif +#ifndef _SVX_ZOOMITEM_HXX //autogen +#include <svx/zoomitem.hxx> +#endif +#ifndef _SVX_HLNKITEM_HXX //autogen +#include <svx/hlnkitem.hxx> +#endif +#ifndef _SFXPTITEM_HXX //autogen +#include <svtools/ptitem.hxx> +#endif +#ifndef _SVX_PAGEITEM_HXX //autogen +#include <svx/pageitem.hxx> +#endif +#ifndef _SVX_SRCHITEM_HXX //autogen +#include <svx/srchitem.hxx> +#endif +#ifndef _SFX_TPLPITEM_HXX //autogen +#include <sfx2/tplpitem.hxx> +#endif +#ifndef _SVX_WRLMITEM_HXX //autogen +#include <svx/wrlmitem.hxx> +#endif +#ifndef _SVX_PROTITEM_HXX //autogen +#include <svx/protitem.hxx> +#endif +#ifndef _SVX_OPAQITEM_HXX //autogen +#include <svx/opaqitem.hxx> +#endif +#ifndef _SVX_TSTPITEM_HXX //autogen +#include <svx/tstpitem.hxx> +#endif +#ifndef _SVX_AKRNITEM_HXX //autogen +#include <svx/akrnitem.hxx> +#endif +#ifndef _SVX_KEEPITEM_HXX //autogen +#include <svx/keepitem.hxx> +#endif +#ifndef _SVX_KERNITEM_HXX //autogen +#include <svx/kernitem.hxx> +#endif +#ifndef _SVX_SPLTITEM_HXX //autogen +#include <svx/spltitem.hxx> +#endif +#ifndef _SVX_BRSHITEM_HXX //autogen +#include <svx/brshitem.hxx> +#endif +#ifndef _SVX_WGHTITEM_HXX //autogen +#include <svx/wghtitem.hxx> +#endif +#ifndef _SVX_SHADITEM_HXX //autogen +#include <svx/shaditem.hxx> +#endif +#ifndef _SVX_PBINITEM_HXX //autogen +#include <svx/pbinitem.hxx> +#endif +#ifndef _SVX_ULSPITEM_HXX //autogen +#include <svx/ulspitem.hxx> +#endif +#ifndef _SVX_PRNTITEM_HXX //autogen +#include <svx/prntitem.hxx> +#endif +#ifndef _SVX_ORPHITEM_HXX //autogen +#include <svx/orphitem.hxx> +#endif +#ifndef _SVX_WIDWITEM_HXX //autogen +#include <svx/widwitem.hxx> +#endif +#ifndef _SVX_BOLNITEM_HXX //autogen +#include <svx/bolnitem.hxx> +#endif +#ifndef _SVX_PMDLITEM_HXX //autogen +#include <svx/pmdlitem.hxx> +#endif +#ifndef _SVX_CMAPITEM_HXX //autogen +#include <svx/cmapitem.hxx> +#endif +#ifndef _SVX_LANGITEM_HXX //autogen +#include <svx/langitem.hxx> +#endif +#ifndef _SVX_BRKITEM_HXX //autogen +#include <svx/brkitem.hxx> +#endif +#ifndef _SVX_HYZNITEM_HXX //autogen +#include <svx/hyznitem.hxx> +#endif +#ifndef _SVX_ESCPITEM_HXX //autogen +#include <svx/escpitem.hxx> +#endif +#ifndef _SVX_LSPCITEM_HXX //autogen +#include <svx/lspcitem.hxx> +#endif +#ifndef _SVX_ADJITEM_HXX //autogen +#include <svx/adjitem.hxx> +#endif +#ifndef _SVX_CRSDITEM_HXX //autogen +#include <svx/crsditem.hxx> +#endif +#ifndef _SVX_FONTITEM_HXX //autogen +#include <svx/fontitem.hxx> +#endif +#ifndef _SVX_SHDDITEM_HXX //autogen +#include <svx/shdditem.hxx> +#endif +#ifndef _SVX_UDLNITEM_HXX //autogen +#include <svx/udlnitem.hxx> +#endif +#ifndef _SVX_POSTITEM_HXX //autogen +#include <svx/postitem.hxx> +#endif +#ifndef _SVX_FHGTITEM_HXX //autogen +#include <svx/fhgtitem.hxx> +#endif +#ifndef _SVX_CNTRITEM_HXX //autogen +#include <svx/cntritem.hxx> +#endif +#ifndef _SVX_COLRITEM_HXX //autogen +#include <svx/colritem.hxx> +#endif +#ifndef _SVX_BOXITEM_HXX //autogen +#include <svx/boxitem.hxx> +#endif +#ifndef _SVX_SIZEITEM_HXX //autogen +#include <svx/sizeitem.hxx> +#endif +#ifndef _SVX_LRSPITEM_HXX //autogen +#include <svx/lrspitem.hxx> +#endif +#ifndef _SVX__XGRADIENT_HXX //autogen +#include <svx/xgrad.hxx> +#endif +#ifndef _SVX_XLNSTIT_HXX //autogen +#include <svx/xlnstit.hxx> +#endif +#ifndef _SVX_XLNEDIT_HXX //autogen +#include <svx/xlnedit.hxx> +#endif +#ifndef SVX_XFILLIT0_HXX //autogen +#include <svx/xfillit0.hxx> +#endif +#ifndef _SVX_XFLCLIT_HXX //autogen +#include <svx/xflclit.hxx> +#endif +#ifndef _SVX_XFLGRIT_HXX //autogen +#include <svx/xflgrit.hxx> +#endif +#ifndef _SVX_XFLHTIT_HXX //autogen +#include <svx/xflhtit.hxx> +#endif +#ifndef _SVX_XBTMPIT_HXX //autogen +#include <svx/xbtmpit.hxx> +#endif +#ifndef _SVX_XLINEIT0_HXX //autogen +#include <svx/xlineit0.hxx> +#endif +#ifndef _SVX_XLNWTIT_HXX //autogen +#include <svx/xlnwtit.hxx> +#endif +#ifndef _SVX_XLNDSIT_HXX //autogen +#include <svx/xlndsit.hxx> +#endif +#ifndef _SVX_XLNCLIT_HXX //autogen +#include <svx/xlnclit.hxx> +#endif +#ifndef _SVX_TEXTIT0_HXX //autogen +#include <svx/xtextit0.hxx> +#endif +#ifndef _SVX_XFTADIT_HXX //autogen +#include <svx/xftadit.hxx> +#endif +#ifndef _SVX_XFTDIIT_HXX //autogen +#include <svx/xftdiit.hxx> +#endif +#ifndef _SVX_XFTSTIT_HXX //autogen +#include <svx/xftstit.hxx> +#endif +#ifndef _SVX_XFTMRIT_HXX //autogen +#include <svx/xftmrit.hxx> +#endif +#ifndef _SVX_XFTOUIT_HXX //autogen +#include <svx/xftouit.hxx> +#endif +#ifndef _SVX_XFTSHIT_HXX //autogen +#include <svx/xftshit.hxx> +#endif +#ifndef _SVX_XFTSHCLIT_HXX //autogen +#include <svx/xftshcit.hxx> +#endif +#ifndef _SVX_XFTSHXY_HXX //autogen +#include <svx/xftshxy.hxx> +#endif +#ifndef _SVX_XFTSFIT_HXX //autogen +#include <svx/xftsfit.hxx> +#endif + + +#ifndef _FMTORNT_HXX //autogen +#include <fmtornt.hxx> +#endif +#ifndef _PARATR_HXX //autogen +#include <paratr.hxx> +#endif +#ifndef _FMTINFMT_HXX //autogen +#include <fmtinfmt.hxx> +#endif +#ifndef _FMTFSIZE_HXX //autogen +#include <fmtfsize.hxx> +#endif +#ifndef _FMTSRND_HXX //autogen +#include <fmtsrnd.hxx> +#endif +#include "frmatr.hxx" +#include "cfgitems.hxx" +#include "grfatr.hxx" + + +#ifndef PROFILE +// Code zum Initialisieren von Statics im eigenen Code-Segment +#pragma code_seg( "SWSTATICS" ) +#endif + +#define SwShadowItem SvxShadowItem +#define SwPageSizeItem SvxSizeItem +#define SwGraphicSizeItem SvxSizeItem +#define SvxDrawToolItem SfxEnumItem +#define SvxDrawAlignItem SfxEnumItem +#define SvxDrawBezierItem SfxEnumItem +#define SwPageLRSpaceItem SvxLRSpaceItem +#define SwPageULSpaceItem SvxULSpaceItem + +#define SFX_TYPEMAP +#include "itemdef.hxx" +#include "swslots.hxx" + +#ifndef PROFILE +#pragma code_seg() +#endif + +/*------------------------------------------------------------------------- + $Log: not supported by cvs2svn $ + Revision 1.36 2000/09/18 16:06:05 willem.vandorp + OpenOffice header added. + + Revision 1.35 2000/09/04 11:44:07 tbe + basicide, isetbrw, si, vcdlged moved from svx to basctl + + Revision 1.34 2000/08/02 08:04:34 jp + changes for graphic attributes + + Revision 1.33 2000/07/31 19:25:39 jp + new attributes for CJK/CTL and graphic + + Revision 1.32 1999/09/24 14:38:32 os + hlnkitem.hxx now in SVX + + Revision 1.31 1998/04/23 10:30:04 OS + PageLeft/Right/Top/BottomMargin #49761# + + + Rev 1.30 23 Apr 1998 12:30:04 OS + PageLeft/Right/Top/BottomMargin #49761# + + Rev 1.29 29 Nov 1997 15:52:54 MA + includes + + Rev 1.28 24 Nov 1997 09:47:06 MA + includes + + Rev 1.27 03 Nov 1997 13:55:42 MA + precomp entfernt + + Rev 1.26 15 Aug 1997 11:48:38 OS + chartar/frmatr/txtatr aufgeteilt + + Rev 1.25 11 Aug 1997 10:06:46 OS + paraitem/frmitems/textitem aufgeteilt + + Rev 1.24 05 Aug 1997 16:29:08 TJ + include svx/srchitem.hxx + + Rev 1.23 11 Apr 1997 10:34:48 TRI + includes + + Rev 1.22 07 Apr 1997 16:45:24 OM + HyperlinkItem recorden + + Rev 1.21 28 Feb 1997 12:47:12 MH + Segmentierug mit WorkingSetTuner nun moeglich + + Rev 1.20 18 Feb 1997 16:56:40 OM + dbcoll.hxx eingetragen + + Rev 1.19 11 Dec 1996 20:12:26 NF + SvxDrawBezierItem dazu... + + Rev 1.18 19 Sep 1996 14:07:24 JP + eigenes Segment fuer statische Objecte + + Rev 1.17 28 Aug 1996 15:55:04 OS + includes + + Rev 1.16 15 Aug 1996 18:17:16 OS + URL als Attribut - auch fuer die API + + Rev 1.15 26 Mar 1996 10:07:22 OS + neu: SvxGraphicSizeItem-dummy + + Rev 1.14 25 Mar 1996 13:35:36 OS + dummy SwPageSizeItem definiert + + Rev 1.13 21 Mar 1996 11:41:56 MA + Umstellung SV311 + + Rev 1.12 07 Mar 1996 08:08:54 OS + jetzt auch mit PCH + + Rev 1.11 26 Jan 1996 11:20:40 OS + +include sfxshobj.hxx + + Rev 1.10 16 Jan 1996 16:26:56 OS + neu: SwShadowItem(nur ueberdefiniertes SvxShadowItem) + + Rev 1.9 08 Jan 1996 15:14:08 OS + +include frmatr.hxx + + Rev 1.8 22 Dec 1995 15:09:20 OS + +include adritem.hxx + + Rev 1.7 07 Dec 1995 18:25:56 OM + Define fuer Enum-Slot + + Rev 1.6 04 Dec 1995 16:09:40 OS + includes geaendert + + -------------------------------------------------------------------------*/ + + diff --git a/sw/source/ui/shells/tabsh.cxx b/sw/source/ui/shells/tabsh.cxx new file mode 100644 index 0000000000..62248052a1 --- /dev/null +++ b/sw/source/ui/shells/tabsh.cxx @@ -0,0 +1,1575 @@ +/************************************************************************* + * + * $RCSfile: tabsh.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:47 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +#ifdef PRECOMPILED +#include "ui_pch.hxx" +#endif + +#pragma hdrstop + +#ifndef _UIPARAM_HXX +#include <uiparam.hxx> +#endif +#ifndef _HINTIDS_HXX +#include <hintids.hxx> +#endif + +#ifndef _ZFORLIST_HXX +#define _ZFORLIST_DECLARE_TABLE +#include <svtools/zforlist.hxx> +#endif +#ifndef _SFXSTRITEM_HXX //autogen +#include <svtools/stritem.hxx> +#endif +#ifndef _SFX_WHITER_HXX //autogen +#include <svtools/whiter.hxx> +#endif +#ifndef _SVX_RULRITEM_HXX //autogen +#include <svx/rulritem.hxx> +#endif +#ifndef _OFF_APP_HXX //autogen +#include <offmgr/app.hxx> +#endif +#ifndef _SVX_SRCHITEM_HXX +#include <svx/srchitem.hxx> +#endif +#ifndef _SVX_LRSPITEM_HXX //autogen +#include <svx/lrspitem.hxx> +#endif +#ifndef _SVX_ULSPITEM_HXX //autogen +#include <svx/ulspitem.hxx> +#endif +#ifndef _SVX_BRSHITEM_HXX //autogen +#include <svx/brshitem.hxx> +#endif +#ifndef _SVX_BOXITEM_HXX //autogen +#include <svx/boxitem.hxx> +#endif +#ifndef _SVX_SHADITEM_HXX //autogen +#include <svx/shaditem.hxx> +#endif +#ifndef _SVX_SPLTITEM_HXX //autogen +#include <svx/spltitem.hxx> +#endif +#ifndef _SVX_LANGITEM_HXX //autogen +#include <svx/langitem.hxx> +#endif +#ifndef _SVX_KEEPITEM_HXX //autogen +#include <svx/keepitem.hxx> +#endif +#ifndef _SVX_BOLNITEM_HXX //autogen +#include <svx/bolnitem.hxx> +#endif +#ifndef _SVX_COLRITEM_HXX //autogen +#include <svx/colritem.hxx> +#endif +#ifndef _SVX_NUMINF_HXX //autogen +#include <svx/numinf.hxx> +#endif +#ifndef _ZFORMAT_HXX //autogen +#include <svtools/zformat.hxx> +#endif +#ifndef _SFX_SAVEOPT_HXX //autogen +#include <sfx2/saveopt.hxx> +#endif +#ifndef _SFX_BINDINGS_HXX //autogen +#include <sfx2/bindings.hxx> +#endif +#ifndef _MSGBOX_HXX //autogen +#include <vcl/msgbox.hxx> +#endif +#ifndef _SFXREQUEST_HXX //autogen +#include <sfx2/request.hxx> +#endif +#ifndef _SFXDISPATCH_HXX //autogen +#include <sfx2/dispatch.hxx> +#endif +#ifndef _SFXOBJFACE_HXX //autogen +#include <sfx2/objface.hxx> +#endif + + +#ifndef _FMTORNT_HXX //autogen +#include <fmtornt.hxx> +#endif +#ifndef _FMTCLDS_HXX //autogen +#include <fmtclds.hxx> +#endif +#ifndef _FMTTSPLT_HXX //autogen +#include <fmtlsplt.hxx> +#endif +#ifndef _FMTFSIZE_HXX //autogen +#include <fmtfsize.hxx> +#endif +#ifndef _SWMODULE_HXX +#include <swmodule.hxx> +#endif +#ifndef _WRTSH_HXX +#include <wrtsh.hxx> +#endif +#ifndef _WVIEW_HXX +#include <wview.hxx> +#endif +#ifndef _FRMATR_HXX +#include <frmatr.hxx> +#endif +#ifndef _UITOOL_HXX +#include <uitool.hxx> +#endif +#ifndef _INPUTWIN_HXX +#include <inputwin.hxx> +#endif +#ifndef _UIITEMS_HXX +#include <uiitems.hxx> +#endif +#ifndef _USRPREF_HXX +#include <usrpref.hxx> +#endif +#ifndef _TABSH_HXX +#include <tabsh.hxx> +#endif +#ifndef _TABLEDLG_HXX +#include <tabledlg.hxx> +#endif +#ifndef _TABLEMGR_HXX +#include <tablemgr.hxx> +#endif +#ifndef _TAUTOFMT_HXX +#include <tautofmt.hxx> +#endif +#ifndef _CELLATR_HXX +#include <cellatr.hxx> +#endif +#ifndef _FRMFMT_HXX +#include <frmfmt.hxx> +#endif +#ifndef _ROWHT_HXX +#include <rowht.hxx> +#endif +#ifndef _SPLIT_HXX +#include <split.hxx> +#endif +#ifndef _INSRC_HXX +#include <insrc.hxx> +#endif +#ifndef _SWUNDO_HXX +#include <swundo.hxx> +#endif +#ifndef _SWTABLE_HXX +#include <swtable.hxx> +#endif +#ifndef _TBLNUMFM_HXX +#include <tblnumfm.hxx> +#endif +#ifndef _DOCSH_HXX +#include <docsh.hxx> +#endif +#ifndef _SPLITTBL_HXX +#include <splittbl.hxx> +#endif +#ifndef _MERGETBL_HXX +#include <mergetbl.hxx> +#endif +#ifndef _TBLSEL_HXX +#include <tblsel.hxx> +#endif + +#ifndef _POPUP_HRC +#include <popup.hrc> +#endif +#ifndef _SHELLS_HRC +#include <shells.hrc> +#endif +#ifndef _TABLE_HRC +#include <table.hrc> +#endif +#ifndef _CMDID_H +#include <cmdid.h> +#endif +#ifndef _GLOBALS_HRC +#include <globals.hrc> +#endif +#ifndef _HELPID_H +#include <helpid.h> +#endif + +#define SwTableShell +#ifndef _ITEMDEF_HXX +#include <itemdef.hxx> +#endif +#ifndef _SWSLOTS_HXX +#include <swslots.hxx> +#endif + +//----------------------------------------------------------------------------- +BOOL lcl_IsNumeric(const String& rStr) +{ + for(xub_StrLen i = 0; i < rStr.Len(); i++) + { + sal_Unicode c = rStr.GetChar(i); + if((c < '0') || (c > '9')) + return FALSE; + } + return TRUE; + +} + +SFX_IMPL_INTERFACE(SwTableShell, SwBaseShell, SW_RES(STR_SHELLNAME_TABLE)) +{ + SFX_POPUPMENU_REGISTRATION(SW_RES(MN_TAB_POPUPMENU)); + SFX_OBJECTBAR_REGISTRATION(SFX_OBJECTBAR_OBJECT, SW_RES(RID_TABLE_TOOLBOX)); + SFX_OBJECTMENU_REGISTRATION(SID_OBJECTMENU0, SW_RES(MN_OBJECTMENU_TABLE)); +} + + +TYPEINIT1(SwTableShell,SwBaseShell) + +/************************************************************************/ + + +const USHORT __FAR_DATA aUITableAttrRange[] = +{ + FN_PARAM_TABLE_NAME, FN_PARAM_TABLE_NAME, + FN_PARAM_TABLE_HEADLINE, FN_PARAM_TABLE_HEADLINE, + FN_PARAM_TABLE_SPACE, FN_PARAM_TABLE_SPACE, + FN_TABLE_REP, FN_TABLE_REP, + SID_RULER_BORDERS, SID_RULER_BORDERS, + RES_LR_SPACE, RES_UL_SPACE, + SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_SHADOW, + RES_BOX, RES_SHADOW, + RES_BACKGROUND, RES_BACKGROUND, + SID_BACKGRND_DESTINATION, SID_BACKGRND_DESTINATION, + SID_HTML_MODE, SID_HTML_MODE, + SID_ATTR_BRUSH_ROW, SID_ATTR_BRUSH_TABLE, + RES_PAGEDESC, RES_BREAK, + RES_KEEP, RES_KEEP, + RES_LAYOUT_SPLIT, RES_LAYOUT_SPLIT, + FN_TABLE_SET_VERT_ALIGN, FN_TABLE_SET_VERT_ALIGN, + 0 +}; + + + + +void lcl_SetAttr( SwWrtShell &rSh, const SfxPoolItem &rItem ) +{ + SfxItemSet aSet( rSh.GetView().GetPool(), rItem.Which(), rItem.Which(), 0); + aSet.Put( rItem ); + rSh.SetTblAttr( aSet ); +} + +/************************************************************************/ + + +SwTableRep* lcl_TableParamToItemSet( SfxItemSet& rSet, SwWrtShell &rSh ) +{ + SwFrmFmt *pFmt = rSh.GetTableFmt(); + SwTabCols aCols; + rSh.GetTabCols( aCols ); + + //Ersteinmal die einfachen Attribute besorgen. + rSet.Put( SfxStringItem( FN_PARAM_TABLE_NAME, pFmt->GetName())); + rSet.Put( SfxBoolItem( FN_PARAM_TABLE_HEADLINE, rSh.IsHeadlineRepeat()) ); + rSet.Put( pFmt->GetShadow() ); + rSet.Put(SfxUInt16Item(FN_TABLE_SET_VERT_ALIGN, rSh.GetBoxAlign())); + SvxULSpaceItem aULSpace( pFmt->GetULSpace() ); + rSet.Put( aULSpace ); + + USHORT nBackgroundDestination = rSh.GetViewOptions()->GetTblDest(); + rSet.Put(SwBackgroundDestinationItem(SID_BACKGRND_DESTINATION, nBackgroundDestination )); + SvxBrushItem aBrush( RES_BACKGROUND ); +// rSh.GetBoxBackground(aBrush); +// rSet.Put( aBrush ); + rSh.GetRowBackground(aBrush); + rSet.Put( aBrush, SID_ATTR_BRUSH_ROW ); + rSh.GetTabBackground(aBrush); + rSet.Put( aBrush, SID_ATTR_BRUSH_TABLE ); + FASTBOOL bTableSel = rSh.IsTableMode(); + if(!bTableSel) + { + rSh.StartAllAction(); + rSh.Push(); + rSh.GetView().GetViewFrame()->GetDispatcher()->Execute( FN_TABLE_SELECT_ALL, FALSE ); + } + SvxBoxInfoItem aBoxInfo; + + // Tabellenvariante, wenn mehrere Tabellenzellen selektiert + rSh.GetCrsr(); //Damit GetCrsrCnt() auch das Richtige liefert + aBoxInfo.SetTable (rSh.IsTableMode() && rSh.GetCrsrCnt() > 1 || + !bTableSel); + // Abstandsfeld immer anzeigen + aBoxInfo.SetDist ((BOOL) TRUE); + // Minimalgroesse in Tabellen und Absaetzen setzen + aBoxInfo.SetMinDist( !bTableSel || rSh.IsTableMode() || + rSh.GetSelectionType() & + (SwWrtShell::SEL_TXT | SwWrtShell::SEL_TBL)); + // Default-Abstand immer setzen + aBoxInfo.SetDefDist (MIN_BORDER_DIST); + // Einzelne Linien koennen nur in Tabellen DontCare-Status haben + aBoxInfo.SetValid( VALID_DISABLE, !bTableSel || !rSh.IsTableMode() ); + + rSet.Put(aBoxInfo); + rSh.GetTabBorders( rSet ); + + if(!bTableSel) + { + rSh.ClearMark(); + rSh.Pop(FALSE); + rSh.EndAllAction(); + } + + SwTabCols aTabCols; + rSh.GetTabCols( aTabCols ); + SvxColumnItem aColItem; + + + // Pointer wird nach der Dialogausfuehrung geloescht + SwTableRep* pRep = new SwTableRep( aTabCols, rSh.IsTblComplex()); + pRep->SetSpace(aCols.GetRightMax()); + + USHORT nPercent = 0; + long nWidth = ::GetTableWidth(pFmt, aCols, &nPercent, &rSh ); + // Die Tabellenbreite ist fuer relative Angaben nicht korrekt + if(nPercent) + nWidth = pRep->GetSpace() * nPercent / 100; + USHORT nAlign = pFmt->GetHoriOrient().GetHoriOrient(); + pRep->SetAlign(nAlign); + SvxLRSpaceItem aLRSpace( pFmt->GetLRSpace() ); + SwTwips nLeft = aLRSpace.GetLeft(); + SwTwips nRight = aLRSpace.GetRight(); + SwTwips nDiff = pRep->GetSpace() - nRight - nLeft - nWidth; + if(nAlign != HORI_FULL && Abs(nDiff) > 2) + { + SwTwips nLR = pRep->GetSpace() - nWidth; + switch ( nAlign ) + { + case HORI_CENTER: nLeft = nRight = nLR / 2; + break; + case HORI_LEFT: nRight = nLR; nLeft = 0; + break; + case HORI_RIGHT: nLeft = nLR, nRight = 0; + break; + case HORI_LEFT_AND_WIDTH: + nRight = nLR - nLeft; + break; + case HORI_NONE: + if(!nPercent) + nWidth = pRep->GetSpace() - nLeft - nRight; + break; + } + } + pRep->SetLeftSpace(nLeft); + pRep->SetRightSpace(nRight); + + pRep->SetWidth(nWidth); + pRep->SetWidthPercent(nPercent); + // sind einzelne Zeilen/Zellen selektiert, wird die Spaltenbearbeitung veraendert + pRep->SetLineSelected(bTableSel && ! rSh.HasWholeTabSelection()); + rSet.Put(SwPtrItem(FN_TABLE_REP, pRep)); + return pRep; +} + +/************************************************************************/ + + +void lcl_ItemSetToTableParam( const SfxItemSet& rSet, + SwWrtShell &rSh ) +{ + rSh.StartAllAction(); + rSh.StartUndo( UNDO_TABLE_ATTR ); + const SfxPoolItem* pItem = 0; + + SwViewOption aUsrPref( *rSh.GetViewOptions() ); + USHORT nBackgroundDestination = aUsrPref.GetTblDest(); + if(SFX_ITEM_SET == rSet.GetItemState(SID_BACKGRND_DESTINATION, FALSE, &pItem)) + { + nBackgroundDestination = ((SfxUInt16Item*)pItem)->GetValue(); + aUsrPref.SetTblDest((BYTE)nBackgroundDestination); + SW_MOD()->ApplyUsrPref(aUsrPref, &rSh.GetView()); + } + FASTBOOL bBorder = ( SFX_ITEM_SET == rSet.GetItemState( RES_BOX ) || + SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BORDER_INNER ) ); + pItem = 0; + BOOL bBackground = SFX_ITEM_SET == rSet.GetItemState( RES_BACKGROUND, FALSE, &pItem ); + const SfxPoolItem* pRowItem = 0, *pTableItem = 0; + bBackground |= SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BRUSH_ROW, FALSE, &pRowItem ); + bBackground |= SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BRUSH_TABLE, FALSE, &pTableItem ); + if( bBackground || bBorder) + { + /* + Die Umrandung wird auf die vorliegende Selektion angewendet + Liegt keine Selektion vor, wird die Tabelle vollstaendig selektiert. + Der Hintergrund wird immer auf den aktuellen Zustand angewendet. + */ + + FASTBOOL bTableSel = rSh.IsTableMode(); + rSh.StartAllAction(); + + if(bBackground) + { + if(pItem) + rSh.SetBoxBackground( *(const SvxBrushItem*)pItem ); + if(pRowItem) + { + SvxBrushItem aBrush(*(const SvxBrushItem*)pRowItem); + aBrush.SetWhich(RES_BACKGROUND); + rSh.SetRowBackground(aBrush); + } + if(pTableItem) + { + SvxBrushItem aBrush(*(const SvxBrushItem*)pTableItem); + aBrush.SetWhich(RES_BACKGROUND); + rSh.SetTabBackground( aBrush ); + } + } + + if(bBorder) + { + rSh.Push(); + if(!bTableSel) + { + rSh.GetView().GetViewFrame()->GetDispatcher()->Execute( FN_TABLE_SELECT_ALL ); + } + rSh.SetTabBorders( rSet ); + + if(!bTableSel) + { + rSh.ClearMark(); + } + rSh.Pop(FALSE); + } + rSh.EndAllAction(); + } + + SwTabCols aTabCols; + BOOL bTabCols = FALSE; + BOOL bSingleLine = FALSE; + SwTableRep* pRep = 0; + SwFrmFmt *pFmt = rSh.GetTableFmt(); + SfxItemSet aSet( rSh.GetAttrPool(), RES_FRMATR_BEGIN, RES_FRMATR_END-1 ); + if(SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_REP, FALSE, &pItem )) + { + pRep = (SwTableRep*)((const SwPtrItem*)pItem)->GetValue(); + + const SwTwips nWidth = pRep->GetWidth(); + if ( HORI_FULL == (SwHoriOrient)pRep->GetAlign() ) + { + SwFmtHoriOrient aAttr( pFmt->GetHoriOrient() ); + aAttr.SetHoriOrient( HORI_FULL ); + aSet.Put( aAttr ); + } + else + { + SwFmtFrmSize aSz( ATT_VAR_SIZE, nWidth ); + if(pRep->GetWidthPercent()) + { + aSz.SetWidthPercent( (BYTE)pRep->GetWidthPercent() ); + } + aSet.Put(aSz); + } + + SvxLRSpaceItem aLRSpace( RES_LR_SPACE ); + aLRSpace.SetLeft(pRep->GetLeftSpace()); + aLRSpace.SetRight(pRep->GetRightSpace()); + aSet.Put( aLRSpace ); + + SwHoriOrient eOrient = (SwHoriOrient)pRep->GetAlign(); + SwFmtHoriOrient aAttr( 0, eOrient ); + aSet.Put( aAttr ); + // Damit beim recording die Ausrichtung nicht durch die Abstaende ueberschrieben + // wird, darf das Item nur bei manueller Ausrichtung aufgez. werden + if(eOrient != HORI_NONE) + ((SfxItemSet&)rSet).ClearItem( SID_ATTR_LRSPACE ); + + + if(pRep->HasColsChanged()) + { + bTabCols = TRUE; + } + } + + + if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_TABLE_HEADLINE, FALSE, &pItem)) + rSh.SetHeadlineRepeat( ((SfxBoolItem*)pItem)->GetValue() ); + + if( SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_SET_VERT_ALIGN, FALSE, &pItem)) + rSh.SetBoxAlign(((SfxUInt16Item*)(pItem))->GetValue()); + + if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_TABLE_NAME, FALSE, &pItem )) + rSh.SetTableName( *pFmt, ((const SfxStringItem*)pItem)->GetValue() ); + + // kopiere die ausgesuchten Attribute in den ItemSet + static USHORT __READONLY_DATA aIds[] = + { + RES_PAGEDESC, RES_BREAK, + RES_KEEP, RES_LAYOUT_SPLIT, + RES_UL_SPACE, RES_SHADOW, + 0 + }; + for( const USHORT* pIds = aIds; *pIds; ++pIds ) + if( SFX_ITEM_SET == rSet.GetItemState( *pIds, FALSE, &pItem)) + aSet.Put( *pItem ); + + if( aSet.Count() ) + rSh.SetTblAttr( aSet ); + + if(bTabCols) + { + rSh.GetTabCols( aTabCols ); + bSingleLine = pRep->FillTabCols( aTabCols ); + rSh.SetTabCols( aTabCols, bSingleLine ); + } + + rSh.EndUndo( UNDO_TABLE_ATTR ); + rSh.EndAllAction(); +} + +/************************************************************************/ + + +void lcl_TabGetMaxLineWidth(const SvxBorderLine* pBorderLine, SvxBorderLine& rBorderLine) +{ + if(pBorderLine->GetInWidth() > rBorderLine.GetInWidth()) + rBorderLine.SetInWidth(pBorderLine->GetInWidth()); + + if(pBorderLine->GetOutWidth() > rBorderLine.GetOutWidth()) + rBorderLine.SetOutWidth(pBorderLine->GetOutWidth()); + + if(pBorderLine->GetDistance() > rBorderLine.GetDistance()) + rBorderLine.SetDistance(pBorderLine->GetDistance()); + + rBorderLine.SetColor(pBorderLine->GetColor()); +} + + +void SwTableShell::Execute(SfxRequest &rReq) +{ + + const SfxItemSet* pArgs = rReq.GetArgs(); + SwWrtShell &rSh = GetShell(); + + //Erstmal die Slots, die keinen FrmMgr benoetigen. + BOOL bMore = FALSE; + const SfxPoolItem* pItem = 0; + USHORT nSlot = rReq.GetSlot(); + if(pArgs) + pArgs->GetItemState(GetPool().GetWhich(nSlot), FALSE, &pItem); + switch ( nSlot ) + { + case SID_ATTR_BORDER: + { +/* BOOL bPopCrsr = FALSE; + if ( !rReq.IsAPI() ) + { + //Keine Tabellenselektion -> Aenderung wird auf die gesamte + //Tabelle. + if ( !rSh.IsTableMode() ) + { + rSh.StartAction(); + bPopCrsr = TRUE; + rSh.Push(); + rSh.EnterStdMode(); + rSh.MoveTable( fnTableCurr, fnTableStart ); + rSh.SttSelect(); + rSh.MoveTable( fnTableCurr, fnTableEnd ); + rSh.EndSelect(); + } + }*/ + if(!pArgs) + break; + //Items erzeugen, weil wir sowieso nacharbeiten muessen + SvxBoxItem aBox; + SfxItemSet aCoreSet( GetPool(), + RES_BOX, RES_BOX, + SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER, 0); + SvxBoxInfoItem aCoreInfo; + aCoreSet.Put(aCoreInfo); + rSh.GetTabBorders( aCoreSet ); + const SvxBoxItem& rCoreBox = (const SvxBoxItem&) + aCoreSet.Get(RES_BOX); + const SfxPoolItem *pItem = 0; + if ( pArgs->GetItemState(RES_BOX, TRUE, &pItem) == SFX_ITEM_SET ) + { + aBox = *(SvxBoxItem*)pItem; + if ( !rReq.IsAPI() ) + aBox.SetDistance( Max(rCoreBox.GetDistance(),USHORT(55)) ); + else if ( aBox.GetDistance() < MIN_BORDER_DIST ) + aBox.SetDistance( Max(rCoreBox.GetDistance(),(USHORT)MIN_BORDER_DIST) ); + } + else + {ASSERT( !this, "Wo ist das Box-Item?" )} + + SvxBoxInfoItem aInfo; + if (pArgs->GetItemState(SID_ATTR_BORDER_INNER, TRUE, &pItem) == SFX_ITEM_SET) + aInfo = *(SvxBoxInfoItem*)pItem; + aInfo.SetTable( TRUE ); + aInfo.SetValid( VALID_DISABLE, FALSE ); + + +// Die Attribute aller Linien werden gelesen und das staerkste gewinnt + const SvxBorderLine* pBorderLine; + SvxBorderLine aBorderLine; + if ((pBorderLine = rCoreBox.GetTop()) != NULL) + lcl_TabGetMaxLineWidth(pBorderLine, aBorderLine); + if ((pBorderLine = rCoreBox.GetBottom()) != NULL) + lcl_TabGetMaxLineWidth(pBorderLine, aBorderLine); + if ((pBorderLine = rCoreBox.GetLeft()) != NULL) + lcl_TabGetMaxLineWidth(pBorderLine, aBorderLine); + if ((pBorderLine = rCoreBox.GetRight()) != NULL) + lcl_TabGetMaxLineWidth(pBorderLine, aBorderLine); + if ((pBorderLine = aCoreInfo.GetHori()) != NULL) + lcl_TabGetMaxLineWidth(pBorderLine, aBorderLine); + if ((pBorderLine = aCoreInfo.GetVert()) != NULL) + lcl_TabGetMaxLineWidth(pBorderLine, aBorderLine); + + if(aBorderLine.GetOutWidth() == 0) + { + aBorderLine.SetInWidth(0); + aBorderLine.SetOutWidth(DEF_LINE_WIDTH_0); + } + + BOOL bLine = FALSE; + if ( (pBorderLine = aBox.GetTop()) != NULL) + aBox.SetLine(&aBorderLine, BOX_LINE_TOP), bLine |= TRUE; + if ((pBorderLine = aBox.GetBottom()) != NULL) + aBox.SetLine(&aBorderLine, BOX_LINE_BOTTOM), bLine |= TRUE; + if ((pBorderLine = aBox.GetLeft()) != NULL) + aBox.SetLine(&aBorderLine, BOX_LINE_LEFT), bLine |= TRUE; + if ((pBorderLine = aBox.GetRight()) != NULL) + aBox.SetLine(&aBorderLine, BOX_LINE_RIGHT), bLine |= TRUE; + if ((pBorderLine = aInfo.GetHori()) != NULL) + aInfo.SetLine(&aBorderLine, BOXINFO_LINE_HORI), bLine |= TRUE; + if ((pBorderLine = aInfo.GetVert()) != NULL) + aInfo.SetLine(&aBorderLine, BOXINFO_LINE_VERT), bLine |= TRUE; + +// if ( bPopCrsr && !bLine ) +// aBox.SetDistance( 0 ); + + aCoreSet.Put( aBox ); + aCoreSet.Put( aInfo ); + rSh.SetTabBorders( aCoreSet ); + +/* if ( bPopCrsr ) + { + rSh.KillPams(); + rSh.Pop(FALSE); + rSh.EndAction(); + }*/ + } + break; + case SID_ATTR_BRUSH: + if(pItem) + rSh.SetBoxBackground( *(SvxBrushItem*)pItem ); + break; + case FN_INSERT_TABLE: + case FN_FORMAT_TABLE_DLG: + { + SfxItemSet aCoreSet( GetPool(), aUITableAttrRange); + + SwTableRep* pTblRep = ::lcl_TableParamToItemSet( aCoreSet, rSh ); + SwTableTabDlg* pDlg = new SwTableTabDlg( GetView().GetWindow(), + GetPool(), &aCoreSet, &rSh); + aCoreSet.Put(SfxUInt16Item(SID_HTML_MODE, ::GetHtmlMode(GetView().GetDocShell()))); + rSh.GetTblAttr(aCoreSet); + // GetTblAttr buegelt den Background ueber! + SvxBrushItem aBrush( RES_BACKGROUND ); + rSh.GetBoxBackground(aBrush); + aCoreSet.Put( aBrush ); + + if ( pDlg->Execute() == RET_OK ) + { + const SfxItemSet* pOutSet = pDlg->GetOutputItemSet(); + ::lcl_ItemSetToTableParam( *pOutSet, rSh ); + } + delete pDlg; + delete pTblRep; + SfxBindings& rBindings = GetView().GetViewFrame()->GetBindings(); + rBindings.Update(SID_RULER_BORDERS); + rBindings.Update(SID_ATTR_TABSTOP); + } + break; + case FN_NUM_FORMAT_TABLE_DLG: + { + SwView* pView = GetActiveView(); + if(pView) + { + FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebView, pView)); + SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, eMetric)); + SvNumberFormatter* pFormatter = rSh.GetNumberFormatter(); + SfxItemSet aCoreSet( GetPool(), + SID_ATTR_NUMBERFORMAT_VALUE, SID_ATTR_NUMBERFORMAT_VALUE, + SID_ATTR_NUMBERFORMAT_INFO, SID_ATTR_NUMBERFORMAT_INFO, + 0 ); + + SfxItemSet aBoxSet( *aCoreSet.GetPool(), + RES_BOXATR_FORMAT, RES_BOXATR_FORMAT, + RES_BOXATR_VALUE, RES_BOXATR_VALUE, + 0 ); + rSh.GetTblBoxFormulaAttrs( aBoxSet ); + + SfxItemState eState = aBoxSet.GetItemState(RES_BOXATR_FORMAT); + if(eState == SFX_ITEM_DEFAULT) + { + aCoreSet.Put( SfxUInt32Item( SID_ATTR_NUMBERFORMAT_VALUE, + pFormatter->GetFormatIndex(NF_TEXT, LANGUAGE_SYSTEM))); + } + else + aCoreSet.Put( SfxUInt32Item( SID_ATTR_NUMBERFORMAT_VALUE, + ((SwTblBoxNumFormat&)aBoxSet.Get( + RES_BOXATR_FORMAT )).GetValue() )); + + aCoreSet.Put( SvxNumberInfoItem( pFormatter, + ((SwTblBoxValue&)aBoxSet.Get( + RES_BOXATR_VALUE)).GetValue(), + SID_ATTR_NUMBERFORMAT_INFO )); + + SwNumFmtDlg* pDlg = new SwNumFmtDlg(GetView().GetWindow(), aCoreSet); + + if (RET_OK == pDlg->Execute()) + { + const SfxPoolItem* pItem = GetView().GetDocShell()-> + GetItem( SID_ATTR_NUMBERFORMAT_INFO ); + + if( pItem && 0 != ((SvxNumberInfoItem*)pItem)->GetDelCount() ) + { + const ULONG* pDelArr = ((SvxNumberInfoItem*) + pItem)->GetDelArray(); + + for ( USHORT i = 0; i < ((SvxNumberInfoItem*)pItem)->GetDelCount(); i++ ) + ((SvxNumberInfoItem*)pItem)-> + GetNumberFormatter()->DeleteEntry( pDelArr[i] ); + } + + if( SFX_ITEM_SET == pDlg->GetOutputItemSet()->GetItemState( + SID_ATTR_NUMBERFORMAT_VALUE, FALSE, &pItem )) + { + SfxItemSet aBoxSet( *aCoreSet.GetPool(), + RES_BOXATR_FORMAT, RES_BOXATR_FORMAT ); + aBoxSet.Put( SwTblBoxNumFormat( + ((SfxUInt32Item*)pItem)->GetValue() )); + rSh.SetTblBoxFormulaAttrs( aBoxSet ); + + } + } + delete pDlg; + } + } + break; + case FN_CALC_TABLE: + rSh.UpdateTable(); + break; + case FN_TABLE_OPTIMAL_HEIGHT: + { + const SwFmtFrmSize aSz; + rSh.SetRowHeight( aSz ); + } + break; + case FN_TABLE_DELETE_COL: + if ( rSh.DeleteCol() && rSh.HasSelection() ) + rSh.EnterStdMode(); + break; + case FN_END_TABLE: + rSh.MoveTable( fnTableCurr, fnTableEnd ); + break; + case FN_START_TABLE: + rSh.MoveTable( fnTableCurr, fnTableStart ); + break; + + case FN_TABLE_DELETE_ROW: + if ( rSh.DeleteRow() && rSh.HasSelection() ) + rSh.EnterStdMode(); + break; + case FN_TABLE_MERGE_CELLS: + if ( rSh.IsTableMode() ) + switch ( rSh.MergeTab() ) + { + case TBLMERGE_OK: + case TBLMERGE_NOSELECTION: break; + case TBLMERGE_TOOCOMPLEX: + { + InfoBox aInfoBox( GetView().GetWindow(), + SW_RES( MSG_ERR_TABLE_MERGE ) ); + aInfoBox.Execute(); + break; + } + default: ASSERT( !this, "unbekannter Returnwert MergeTab."); + } + break; + case FN_TABLE_ADJUST_CELLS: + if ( rSh.IsAdjustCellWidthAllowed() ) + rSh.AdjustCellWidth(); + break; + case FN_TABLE_BALANCE_CELLS: + if ( rSh.IsAdjustCellWidthAllowed(TRUE) ) + rSh.AdjustCellWidth(TRUE); + break; + case FN_TABLE_BALANCE_ROWS: + if ( rSh.BalanceRowHeight(TRUE) ) + rSh.BalanceRowHeight(FALSE); + break; + case FN_TABLE_SELECT_ALL: + rSh.EnterStdMode(); + rSh.MoveTable( fnTableCurr, fnTableStart ); + rSh.SttSelect(); + rSh.MoveTable( fnTableCurr, fnTableEnd ); + rSh.EndSelect(); + break; + case FN_TABLE_SELECT_COL: + rSh.EnterStdMode(); + rSh.SelectTableCol(); + break; + case FN_TABLE_SELECT_ROW: + rSh.EnterStdMode(); + rSh.SelectTableRow(); + break; + case FN_TABLE_SET_READ_ONLY_CELLS: + rSh.ProtectCells(); + rSh.ResetSelect( 0, FALSE ); + break; + case FN_TABLE_UNSET_READ_ONLY_CELLS: + rSh.UnProtectCells(); + break; + case SID_AUTOFORMAT: + { + SwAutoFormatDlg* pDlg = new SwAutoFormatDlg( + &GetView().GetViewFrame()->GetWindow(), &rSh ); + pDlg->Execute(); + delete pDlg; + } + break; + case FN_TABLE_SET_ROW_HEIGHT: + { + SwTableHeightDlg *pDlg = new SwTableHeightDlg( + GetView().GetWindow(), rSh ); + pDlg->Execute(); + delete pDlg; + } + break; + case FN_NUMBER_BULLETS: + case FN_NUM_BULLET_ON: + ASSERT( !this, "Funktion darf zur Zeit nicht gerufen werden." ); + break; + + case FN_TABLE_INSERT_COL: + case FN_TABLE_INSERT_ROW: + { + BOOL bColumn = rReq.GetSlot() == FN_TABLE_INSERT_COL; + USHORT nCount = 0; + BOOL bAfter = TRUE; + if (pItem) + { + nCount = ((const SfxInt16Item* )pItem)->GetValue(); + if(SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_INSERT_AFTER, TRUE, &pItem)) + bAfter = ((const SfxBoolItem* )pItem)->GetValue(); + } + else if( !rReq.IsAPI() ) + ++nCount; + + if( nCount ) + { + if( bColumn ) + rSh.InsertCol( nCount, bAfter ); + else if ( !rSh.IsInRepeatedHeadline() ) + rSh.InsertRow( nCount, bAfter ); + break; + } + + nSlot = bColumn ? FN_TABLE_INSERT_COL_DLG : FN_TABLE_INSERT_ROW_DLG; + } + // kein break; bei Count = 0 kommt der Dialog + case FN_TABLE_INSERT_COL_DLG: + case FN_TABLE_INSERT_ROW_DLG: + { + if ( FN_TABLE_INSERT_ROW_DLG != nSlot || !rSh.IsInRepeatedHeadline()) + { + SwInsRowColDlg *pDlg = new SwInsRowColDlg( GetView(), + FN_TABLE_INSERT_COL_DLG == nSlot ); + pDlg->Execute(); + delete pDlg; + } + } + break; + case FN_TABLE_SPLIT_CELLS: + { + SwSplitTableDlg *pDlg = new SwSplitTableDlg( GetView().GetWindow(), rSh ); + pDlg->Execute(); + delete pDlg; + } + break; + + case FN_TABLE_SPLIT_TABLE: + { + SwSplitTblDlg *pDlg = new SwSplitTblDlg( GetView().GetWindow(), rSh ); + pDlg->Execute(); + delete pDlg; + } + break; + + case FN_TABLE_MERGE_TABLE: + { + BOOL bPrev = rSh.CanMergeTable( TRUE ); + BOOL bNext = rSh.CanMergeTable( FALSE ); + + if( bPrev && bNext ) + { + // Dialog: welche denn? + SwMergeTblDlg* pDlg = new SwMergeTblDlg( + GetView().GetWindow(), bPrev ); + if( RET_OK != pDlg->Execute() ) + bPrev = bNext = FALSE; + delete pDlg; + } + + if( bPrev || bNext ) + rSh.MergeTable( bPrev ); + } + break; + + case FN_TABLE_MODE_FIX : + case FN_TABLE_MODE_FIX_PROP : + case FN_TABLE_MODE_VARIABLE : + { + rSh.SetTblChgMode( ( FN_TABLE_MODE_FIX == nSlot ? TBLFIX_CHGABS + : FN_TABLE_MODE_FIX_PROP == nSlot + ? TBLFIX_CHGPROP + : TBLVAR_CHGABS ) ); + + SfxBindings& rBind = GetView().GetViewFrame()->GetBindings(); + static USHORT __READONLY_DATA aInva[] = + { FN_TABLE_MODE_FIX, + FN_TABLE_MODE_FIX_PROP, + FN_TABLE_MODE_VARIABLE, + 0 + }; + rBind.Invalidate( aInva ); + } + break; + case FN_TABLE_AUTOSUM: + { + SfxViewFrame* pVFrame = GetView().GetViewFrame(); + pVFrame->GetDispatcher()->Execute(FN_EDIT_FORMULA, SFX_CALLMODE_SYNCHRON); + const USHORT nId = SwInputChild::GetChildWindowId(); + SwInputChild* pChildWin = (SwInputChild*)pVFrame-> + GetChildWindow( nId ); + String sSum; + GetShell().GetAutoSum(sSum); + if( pChildWin ) + pChildWin->SetFormula( sSum ); + + } + break; + default: + bMore = TRUE; + } + + if ( !bMore ) + { + return; + } + else + bMore = FALSE; + //Jetzt die Slots, die direkt auf dem TableFmt arbeiten. + SwFrmFmt *pFmt = rSh.GetTableFmt(); + switch ( nSlot ) + { + case SID_ATTR_ULSPACE: + { + if(pItem) + { + SvxULSpaceItem aULSpace( *(const SvxULSpaceItem*)pItem ); + aULSpace.SetWhich( RES_UL_SPACE ); + ::lcl_SetAttr( rSh, aULSpace ); + } + } + break; + + case SID_ATTR_LRSPACE: + { + if(pItem) + { + SfxItemSet aSet( GetPool(), RES_LR_SPACE, RES_LR_SPACE, + RES_HORI_ORIENT, RES_HORI_ORIENT, 0 ); + SvxLRSpaceItem aLRSpace( *(const SvxLRSpaceItem*)pItem ); + aLRSpace.SetWhich( RES_LR_SPACE ); + aSet.Put( aLRSpace ); + SwFmtHoriOrient aHori( pFmt->GetHoriOrient() ); + aHori.SetHoriOrient( HORI_NONE ); + aSet.Put( aLRSpace ); + rSh.SetTblAttr( aSet ); + } + } + break; +// der letzte case-Zweig der noch einen TabellenManager braucht!! + case FN_TABLE_SET_COL_WIDTH: + { + SwTableFUNC aMgr( &rSh, FALSE); + aMgr.ColWidthDlg(GetView().GetWindow()); + } + break; + case FN_TABLE_VERT_NONE: + case FN_TABLE_VERT_CENTER: + case FN_TABLE_VERT_BOTTOM: + { + USHORT nAlign = nSlot == FN_TABLE_VERT_NONE ? + VERT_NONE : + nSlot == FN_TABLE_VERT_CENTER ? + VERT_CENTER : VERT_BOTTOM; + rSh.SetBoxAlign(nAlign); + } + break; + + case SID_ATTR_PARA_SPLIT: + if ( pItem ) + { + SwFmtLayoutSplit aSplit( ((const SvxFmtSplitItem*)pItem)->GetValue()); + SfxItemSet aSet(GetPool(), RES_LAYOUT_SPLIT, RES_LAYOUT_SPLIT, 0 ); + aSet.Put(aSplit); + rSh.SetTblAttr(aSet); + } + break; + + case SID_ATTR_PARA_KEEP: + if ( pItem ) + { + SvxFmtKeepItem aKeep( *(const SvxFmtKeepItem*)pItem ); + aKeep.SetWhich( RES_KEEP ); + SfxItemSet aSet(GetPool(), RES_KEEP, RES_KEEP, 0 ); + aSet.Put(aKeep); + rSh.SetTblAttr(aSet); + } + break; + + default: + ASSERT( !this, "falscher Dispatcher" ); + return; + } +} +/*-------------------------------------------------------------------- + Beschreibung: + --------------------------------------------------------------------*/ + +void SwTableShell::GetState(SfxItemSet &rSet) +{ + SfxWhichIter aIter( rSet ); + SwWrtShell &rSh = GetShell(); + SwFrmFmt *pFmt = rSh.GetTableFmt(); + USHORT nSlot = aIter.FirstWhich(); + while ( nSlot ) + { + switch ( nSlot ) + { + case FN_TABLE_MERGE_CELLS: + if ( !rSh.IsTableMode() ) + rSet.DisableItem(FN_TABLE_MERGE_CELLS); + break; + case FN_TABLE_ADJUST_CELLS: + if ( !rSh.IsAdjustCellWidthAllowed() ) + rSet.DisableItem(FN_TABLE_ADJUST_CELLS); + break; + + case FN_TABLE_BALANCE_CELLS: + if ( !rSh.IsAdjustCellWidthAllowed(TRUE) ) + rSet.DisableItem(FN_TABLE_BALANCE_CELLS); + break; + + case FN_TABLE_BALANCE_ROWS: + if ( !rSh.BalanceRowHeight(TRUE) ) + rSet.DisableItem(FN_TABLE_BALANCE_ROWS); + break; + + case SID_INSERT_DIAGRAM: + if ( !SFX_APP()->HasFeature( SFX_FEATURE_SMATH ) || + rSh.IsTblComplexForChart() ) + rSet.DisableItem(nSlot); + break; + + case FN_INSERT_TABLE: + // Irgendeinen Wert "putten", damit Controller enabled bleibt. + // Statt "Insert:Table" erscheint dann "Format:Table". + rSet.Put(SfxUInt16Item(nSlot, 1)); + break; + + case FN_TABLE_OPTIMAL_HEIGHT: + { + //Disablen wenn bereits auto-Hoehe eingestellt ist. + SwFmtFrmSize *pSz; + rSh.GetRowHeight( pSz ); + if ( pSz ) + { + if ( ATT_VAR_SIZE == pSz->GetSizeType() ) + rSet.DisableItem( nSlot ); + delete pSz; + } + } + break; + case FN_TABLE_INSERT_ROW: + case FN_TABLE_INSERT_ROW_DLG: + { + if ( rSh.IsInRepeatedHeadline() ) + rSet.DisableItem( nSlot ); + } + break; + case RES_LR_SPACE: + rSet.Put(pFmt->GetLRSpace()); + break; + case RES_UL_SPACE: + rSet.Put(pFmt->GetULSpace()); + break; + case FN_TABLE_VERT_NONE: + case FN_TABLE_VERT_CENTER: + case FN_TABLE_VERT_BOTTOM: + { + USHORT nAlign = rSh.GetBoxAlign(); + BOOL bSet = nSlot == FN_TABLE_VERT_NONE && nAlign == VERT_NONE|| + nSlot == FN_TABLE_VERT_CENTER && nAlign == VERT_CENTER || + nSlot == FN_TABLE_VERT_BOTTOM && nAlign == VERT_BOTTOM; + rSet.Put(SfxBoolItem(nSlot, bSet)); + } + break; + + case FN_TABLE_MODE_FIX : + case FN_TABLE_MODE_FIX_PROP : + case FN_TABLE_MODE_VARIABLE : + { + USHORT 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; + rSet.Put(SfxBoolItem(nSlot, bSet)); + } + break; + + case SID_ATTR_PARA_SPLIT: + rSet.Put( pFmt->GetKeep() ); + break; + + case SID_ATTR_PARA_KEEP: + rSet.Put( pFmt->GetLayoutSplit() ); + break; + case FN_TABLE_SPLIT_TABLE: + { + if ( rSh.IsInHeadline() ) + rSet.DisableItem( nSlot ); + } + break; + case FN_TABLE_MERGE_TABLE: + { + BOOL bAsk; + if( !rSh.CanMergeTable( TRUE, &bAsk )) + rSet.DisableItem( nSlot ); + } + break; + + case FN_TABLE_DELETE_ROW: + { + SwSelBoxes aBoxes; + ::GetTblSel( rSh, aBoxes, TBLSEARCH_ROW ); + if( ::HasProtectedCells( aBoxes )) + rSet.DisableItem( nSlot ); + } + break; + case FN_TABLE_DELETE_COL: + { + SwSelBoxes aBoxes; + ::GetTblSel( rSh, aBoxes, TBLSEARCH_COL ); + if( ::HasProtectedCells( aBoxes )) + rSet.DisableItem( nSlot ); + } + break; + } + nSlot = aIter.NextWhich(); + } +} + +/*-------------------------------------------------------------------- + Beschreibung: + --------------------------------------------------------------------*/ + +SwTableShell::SwTableShell(SwView &rView) : + SwBaseShell(rView) +{ + SetName(String::CreateFromAscii("Table")); + SetHelpId(SW_TABSHELL); +} + +/*-------------------------------------------------------------------- + Beschreibung: + --------------------------------------------------------------------*/ + +void SwTableShell::GetFrmBorderState(SfxItemSet &rSet) +{ + SfxItemSet aCoreSet( GetPool(), + RES_BOX, RES_BOX, + SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER, 0 ); + SvxBoxInfoItem aBoxInfo; + aCoreSet.Put( aBoxInfo ); + GetShell().GetTabBorders( aCoreSet ); + rSet.Put( aCoreSet ); + rSet.Put(SfxUInt16Item(SID_ATTR_BORDER, FALSE)); // Rahmencontroller: letzte Zeile ausklappen +} + +/*-------------------------------------------------------------------- + Beschreibung: + --------------------------------------------------------------------*/ + +void SwTableShell::ExecTableStyle(SfxRequest& rReq) +{ + SwWrtShell &rSh = GetShell(); + const SfxItemSet *pArgs = rReq.GetArgs(); + if(pArgs) + switch ( rReq.GetSlot() ) + { + case SID_FRAME_LINESTYLE: + case SID_FRAME_LINECOLOR: + { +/* Tabellenselektion ist abgeschafft + BOOL bPopCrsr = FALSE; + if ( !rReq.IsAPI() ) + { + //Keine Tabellenselektion -> Aenderung wird auf die gesamte + //Tabelle. + if ( !rSh.IsTableMode() ) + { + bPopCrsr = TRUE; + rSh.Push(); + rSh.StartAction(); + rSh.EnterStdMode(); + rSh.MoveTable( fnTableCurr, fnTableStart ); + rSh.SttSelect(); + rSh.MoveTable( fnTableCurr, fnTableEnd ); + rSh.EndSelect(); + } + }*/ + if ( rReq.GetSlot() == SID_FRAME_LINESTYLE ) + { + const SvxLineItem &rLineItem = (const SvxLineItem&)pArgs-> + Get( SID_FRAME_LINESTYLE ); + const SvxBorderLine* pBorderLine = rLineItem.GetLine(); + rSh.SetTabLineStyle( 0, TRUE, pBorderLine); + } + else + { + const SvxColorItem &rNewColorItem = (const SvxColorItem&)pArgs-> + Get( SID_FRAME_LINECOLOR ); + rSh.SetTabLineStyle( &rNewColorItem.GetValue() ); + } +/* if ( bPopCrsr ) + { + rSh.KillPams(); + rSh.Pop(FALSE); + rSh.EndAction(); + }*/ + break; + } + } +} + + +void SwTableShell::GetLineStyleState(SfxItemSet &rSet) +{ + SfxItemSet aCoreSet( GetPool(), + RES_BOX, RES_BOX, + SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER, 0); + SvxBoxInfoItem aCoreInfo; + aCoreSet.Put(aCoreInfo); + GetShell().GetTabBorders( aCoreSet ); + + const SvxBoxItem& rBoxItem = (const SvxBoxItem&)aCoreSet.Get( RES_BOX ); + const SvxBorderLine* pLine = rBoxItem.GetTop(); + + rSet.Put( SvxColorItem( pLine ? pLine->GetColor() : Color(), SID_FRAME_LINECOLOR ) ); + SvxLineItem aLine( SID_FRAME_LINESTYLE ); + aLine.SetLine(pLine); + rSet.Put( aLine ); +} + +void SwTableShell::ExecNumberFormat(SfxRequest& rReq) +{ + const SfxItemSet* pArgs = rReq.GetArgs(); + SwWrtShell &rSh = GetShell(); + + //Erstmal die Slots, die keinen FrmMgr benoetigen. + const SfxPoolItem* pItem = 0; + USHORT nSlot = rReq.GetSlot(); + if(pArgs) + pArgs->GetItemState(GetPool().GetWhich(nSlot), FALSE, &pItem); + + // Sprache immer von Cursorposition besorgen + SfxItemSet aSet( rSh.GetAttrPool(), RES_CHRATR_LANGUAGE, + RES_CHRATR_LANGUAGE ); + rSh.GetAttr( aSet ); + LanguageType eLang = ((const SvxLanguageItem&)aSet.Get( + RES_CHRATR_LANGUAGE )).GetLanguage(); + SvNumberFormatter* pFormatter = rSh.GetNumberFormatter(); + ULONG nNumberFormat = NUMBERFORMAT_ENTRY_NOT_FOUND; + USHORT nFmtType = 0, nOffset = 0; + + switch ( nSlot ) + { + case FN_NUMBER_FORMAT: + if( pItem ) + { + // Index fuer String bestimmen + String aCode( ((const SfxStringItem*)pItem)->GetValue() ); + nNumberFormat = pFormatter->GetEntryKey( aCode, eLang ); + if( NUMBERFORMAT_ENTRY_NOT_FOUND == nNumberFormat ) + { + // neu eintragen + xub_StrLen nErrPos; + short nType; + if( !pFormatter->PutEntry( aCode, nErrPos, nType, + nNumberFormat, eLang )) + nNumberFormat = NUMBERFORMAT_ENTRY_NOT_FOUND; + } + } + break; + case FN_NUMBER_STANDARD: nFmtType = NUMBERFORMAT_NUMBER; break; + case FN_NUMBER_SCIENTIFIC: nFmtType = NUMBERFORMAT_SCIENTIFIC; break; + case FN_NUMBER_DATE: nFmtType = NUMBERFORMAT_DATE; break; + case FN_NUMBER_TIME: nFmtType = NUMBERFORMAT_TIME; break; + case FN_NUMBER_CURRENCY: nFmtType = NUMBERFORMAT_CURRENCY; break; + case FN_NUMBER_PERCENT: nFmtType = NUMBERFORMAT_PERCENT; break; + + case FN_NUMBER_TWODEC: // #.##0,00 + nFmtType = NUMBERFORMAT_NUMBER; + nOffset = NF_NUMBER_1000DEC2; + break; + + default: + ASSERT(FALSE, falscher Dispatcher); + return; + } + + if( nFmtType ) + nNumberFormat = pFormatter->GetStandardFormat( nFmtType, eLang ) + nOffset; + + if( NUMBERFORMAT_ENTRY_NOT_FOUND != nNumberFormat ) + { + SfxItemSet aBoxSet( *aSet.GetPool(), RES_BOXATR_FORMAT, RES_BOXATR_FORMAT ); + aBoxSet.Put( SwTblBoxNumFormat( nNumberFormat )); + rSh.SetTblBoxFormulaAttrs( aBoxSet ); + } + +} +/*------------------------------------------------------------------------ + + $Log: not supported by cvs2svn $ + Revision 1.246 2000/09/18 16:06:05 willem.vandorp + OpenOffice header added. + + Revision 1.245 2000/09/08 08:12:52 os + Change: Set/Toggle/Has/Knows/Show/GetChildWindow + + Revision 1.244 2000/09/07 15:59:30 os + change: SFX_DISPATCHER/SFX_BINDINGS removed + + Revision 1.243 2000/08/25 09:02:38 os + negative margins enabled + + Revision 1.242 2000/07/03 20:02:16 jp + Bug #70403#: dont delete protected cells + + Revision 1.241 2000/05/26 07:21:32 os + old SW Basic API Slots removed + + Revision 1.240 2000/05/18 08:37:25 os + lcl_IsNumeric + + Revision 1.239 2000/05/16 14:32:51 jp + Changes for Unicode + + Revision 1.238 2000/05/10 11:53:02 os + Basic API removed + + Revision 1.237 2000/04/20 12:51:52 os + GetName() returns String& + + Revision 1.236 2000/04/18 14:58:24 os + UNICODE + + Revision 1.235 2000/02/11 14:57:39 hr + #70473# changes for unicode ( patched by automated patchtool ) + + Revision 1.234 2000/02/03 15:10:42 os + #72601# record deleting of rows or column prior to execution + + Revision 1.233 1999/08/23 07:49:02 OS + #61218# correct handling of left_and_width oriented tables + + + Rev 1.232 23 Aug 1999 09:49:02 OS + #61218# correct handling of left_and_width oriented tables + + Rev 1.231 21 Jul 1999 13:29:58 JP + WhichId-Ranges of SfxItemSets: EndId is inclusive + + Rev 1.230 09 Jun 1999 19:33:58 JP + have to change: no cast from GetpApp to SfxApp/OffApp, SfxShell only subclass of SfxApp + + Rev 1.229 11 May 1999 21:51:40 JP + Task #66127#: ueberfluessigen Code entfernt + + Rev 1.228 05 May 1999 11:23:18 OS + #63790# Tabellen-Update nur bei Bedarf rufen + + Rev 1.227 28 Apr 1999 22:41:34 JP + Bug #65545#: lcl_TableParamToItemSet - umgebene spaltige Bereiche beachten + + Rev 1.226 18 Mar 1999 14:40:48 OS + #61169# #61489# Masseinheiten fuer Text u. HTML am Module setzen, nicht an der App + + Rev 1.225 22 Feb 1999 11:50:32 JP + fuer Bug #61545#: Code optimiert + + Rev 1.224 17 Feb 1999 21:14:20 JP + Task #61764#: neu: Tabellen zusammenfassen + + Rev 1.223 27 Nov 1998 14:52:54 AMA + Fix #59951#59825#: Unterscheiden zwischen Rahmen-,Seiten- und Bereichsspalten + + Rev 1.222 05 Oct 1998 15:36:02 OM + Vernuenftiges Standardformat verwenden + + Rev 1.221 15 Sep 1998 11:20:36 JP + Bug #56201#: GoNextCell - per Flag das anhaengen von Lines steuern + + Rev 1.220 08 Sep 1998 17:03:00 OS + #56134# Metric fuer Text und HTML getrennt + + Rev 1.219 30 Jul 1998 10:58:18 OS + Tabellenbreit ergibt sich fuer HORI-NONE aus verfuegbarer Breite - Raender #54030# + + Rev 1.218 20 Jul 1998 10:44:52 MA + #53013# Nach Anweisung abgeklemmt + + Rev 1.217 26 Jun 1998 17:36:06 OS + SwBGDestItem mit Which #51751# + + Rev 1.216 18 Jun 1998 18:18:46 OS + SwBackgroundDestinationItem + + Rev 1.215 02 Jun 1998 10:53:16 JP + aUITableAttrRange sollte ein const Array sein + + Rev 1.214 29 May 1998 19:08:26 JP + SS vom SwTableReq geaendert + + Rev 1.213 12 May 1998 23:44:08 JP + neu: InserTable/TextToTable mit optionalen AutoFormat + + Rev 1.212 28 Apr 1998 09:16:18 OS + GetTableWidth() verschoben + + Rev 1.211 18 Mar 1998 19:44:20 MA + State fuer Split + + Rev 1.210 17 Mar 1998 16:20:42 OS + Tabelle auftrennen + + Rev 1.209 17 Mar 1998 14:12:06 OS + Border-Slot auch ohne Argumente ueberleben #48169# + + Rev 1.208 16 Mar 1998 23:21:04 JP + SplitTable: zusaetzlich einen Modus angeben - Headline kopieren/Attr. Kopieren/Border korrigieren + + Rev 1.207 02 Mar 1998 14:19:34 OS + Zahlenformat statt Default auf Text einstellen#46574# + + Rev 1.206 25 Feb 1998 12:53:52 MA + new: SplitTable + + Rev 1.205 29 Nov 1997 15:53:00 MA + includes + + Rev 1.204 24 Nov 1997 09:47:06 MA + includes + + Rev 1.203 11 Nov 1997 10:49:08 OS + Parameter fuer Split und ColumnWidth richtig pruefen + + Rev 1.202 03 Nov 1997 13:55:48 MA + precomp entfernt + + Rev 1.201 01 Sep 1997 13:23:08 OS + DLL-Umstellung + + Rev 1.200 15 Aug 1997 11:48:50 OS + chartar/frmatr/txtatr aufgeteilt + + Rev 1.199 12 Aug 1997 14:43:10 MH + chg: header + + Rev 1.198 11 Aug 1997 15:42:10 JP + Bugfix #42478#: ueber die DocShell die geloeschten Formate besorgen + + Rev 1.198 11 Aug 1997 15:41:44 JP + Bugfix #42478#: ueber die DocShell die geloeschten Formate besorgen + + Rev 1.197 11 Aug 1997 08:48:54 OS + paraitem/frmitems/textitem aufgeteilt + + Rev 1.196 08 Aug 1997 17:28:52 OM + Headerfile-Umstellung + + +------------------------------------------------------------------------*/ + + diff --git a/sw/source/ui/shells/textdrw.cxx b/sw/source/ui/shells/textdrw.cxx new file mode 100644 index 0000000000..8f2d399fde --- /dev/null +++ b/sw/source/ui/shells/textdrw.cxx @@ -0,0 +1,278 @@ +/************************************************************************* + * + * $RCSfile: textdrw.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:47 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +#ifdef PRECOMPILED +#include "ui_pch.hxx" +#endif + +#pragma hdrstop + +#ifndef _SVDVIEW_HXX //autogen +#include <svx/svdview.hxx> +#endif +#ifndef _URLOBJ_HXX //autogen +#include <tools/urlobj.hxx> +#endif +#ifndef _SVX_FMGLOB_HXX +#include <svx/fmglob.hxx> +#endif +#ifndef _SVDOUNO_HXX //autogen +#include <svx/svdouno.hxx> +#endif +#ifndef _COM_SUN_STAR_FORM_FORMBUTTONTYPE_HPP_ +#include <com/sun/star/form/FormButtonType.hpp> +#endif +#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_ +#include <com/sun/star/beans/XPropertySet.hpp> +#endif + +#ifndef _VIEW_HXX +#include <view.hxx> +#endif +#ifndef _WRTSH_HXX +#include <wrtsh.hxx> +#endif +#ifndef _EDTWIN_HXX +#include <edtwin.hxx> +#endif +#ifndef _SWUNDO_HXX +#include <swundo.hxx> +#endif +#ifndef _TEXTSH_HXX +#include <textsh.hxx> +#endif + +#ifndef _POOLFMT_HRC +#include <poolfmt.hrc> +#endif + +#define C2U(cChar) rtl::OUString::createFromAscii(cChar) +using namespace ::com::sun::star; +using namespace ::rtl; +/*--------------------------------------------------------------------------- + Beschreibung: + ----------------------------------------------------------------------------*/ + +void SwTextShell::InsertURLButton(const String& rURL, const String& rTarget, const String& rTxt) +{ + SwWrtShell& rSh = GetShell(); + + if (!rSh.HasDrawView()) + rSh.MakeDrawView(); + SdrView *pSdrView = rSh.GetDrawView(); + + // OBJ_FM_BUTTON + pSdrView->SetCurrentObj(OBJ_FM_BUTTON); + pSdrView->SetEditMode(sal_False); + + Point aStartPos(rSh.GetCharRect().Pos() + Point(0, 1)); + + rSh.StartAction(); + rSh.StartUndo( UIUNDO_INSERT_URLBTN ); + if (rSh.BeginCreate(OBJ_FM_BUTTON, FmFormInventor, aStartPos)) + { + pSdrView->SetOrtho(sal_False); + Size aSz(GetView().GetEditWin().PixelToLogic(Size(140, 20))); + Point aEndPos(aSz.Width(), aSz.Height()); + + rSh.MoveCreate(aStartPos + aEndPos); + rSh.EndCreate(SDRCREATE_FORCEEND); + + const SdrMarkList& rMarkList = pSdrView->GetMarkList(); + if (rMarkList.GetMark(0)) + { + SdrUnoObj* pUnoCtrl = PTR_CAST(SdrUnoObj, rMarkList.GetMark(0)->GetObj()); + uno::Reference< awt::XControlModel > xControlModel = pUnoCtrl->GetUnoControlModel(); + + ASSERT( xControlModel.is(), "UNO-Control ohne Model" ); + if( !xControlModel.is() ) + return; + + uno::Reference< beans::XPropertySet > xPropSet(xControlModel, uno::UNO_QUERY); + + + uno::Any aTmp; + + aTmp <<= OUString(rTxt); + xPropSet->setPropertyValue( C2U("Label"), aTmp ); + + aTmp <<= OUString(INetURLObject::RelToAbs(rURL)); + xPropSet->setPropertyValue( C2U("TargetURL"), aTmp ); + + if( rTarget.Len() ) + { + aTmp <<= OUString(rTarget); + xPropSet->setPropertyValue( C2U("TargetFrame"), aTmp ); + } + + + form::FormButtonType eButtonType = form::FormButtonType_URL; + aTmp.setValue( &eButtonType, ::getCppuType((const form::FormButtonType*)0)); + xPropSet->setPropertyValue( C2U("ButtonType"), aTmp ); + } + + if (rSh.IsObjSelected()) + { +// rSh.ChgAnchor(FLY_AT_CNTNT); + rSh.UnSelectFrm(); + } + } + rSh.EndUndo( UIUNDO_INSERT_URLBTN ); + rSh.EndAction(); +} + +/*------------------------------------------------------------------------ + + $Log: not supported by cvs2svn $ + Revision 1.36 2000/09/18 16:06:05 willem.vandorp + OpenOffice header added. + + Revision 1.35 2000/05/16 09:15:14 os + project usr removed + + Revision 1.34 2000/04/18 14:58:24 os + UNICODE + + Revision 1.33 2000/03/23 07:49:14 os + UNO III + + Revision 1.32 2000/02/11 14:57:44 hr + #70473# changes for unicode ( patched by automated patchtool ) + + Revision 1.31 1999/11/19 16:40:24 os + modules renamed + + Revision 1.30 1999/01/26 13:48:26 OS + #56371# TF_ONE51 + + + Rev 1.29 26 Jan 1999 14:48:26 OS + #56371# TF_ONE51 + + Rev 1.28 21 Jan 1999 23:59:00 JP + Bug #61062#: InsertURL mit eigener UndoId + + Rev 1.27 07 Jul 1998 14:03:54 OM + #51853# util::URL-Button wiederbelebt + + Rev 1.26 06 Jul 1998 14:18:46 OM + #51853# util::URL-Button einfuegen + + Rev 1.25 09 Jun 1998 15:35:58 OM + VC-Controls entfernt + + Rev 1.24 29 Nov 1997 15:52:54 MA + includes + + Rev 1.23 24 Nov 1997 09:47:08 MA + includes + + Rev 1.22 03 Nov 1997 13:55:46 MA + precomp entfernt + + Rev 1.21 05 Sep 1997 12:08:16 MH + chg: header + + Rev 1.20 29 Jul 1997 16:00:16 TJ + include VCURLButton + + Rev 1.19 04 Apr 1997 16:41:46 HJS + includes + + Rev 1.18 08 Nov 1996 11:59:22 HJS + include w.g. positivdefine + + Rev 1.17 28 Aug 1996 15:55:04 OS + includes + + Rev 1.16 15 Aug 1996 13:44:24 JP + svdraw.hxx entfernt + + Rev 1.15 11 Jul 1996 12:15:44 OM + #29283# Buttons zeichengebunden einfuegen + + Rev 1.14 26 Jun 1996 15:21:00 OS + Aufruf von Dispatcher.Execute an 324 angepasst + + Rev 1.13 25 Jun 1996 22:07:12 JP + SmartRelToAbs: Flag fuer CutMark hat jetzt inverse Bedeutung + + Rev 1.12 18 Jun 1996 12:29:36 JP + SmartRelToAbs: text::Bookmark soll beibehalten werden + + Rev 1.11 13 Jun 1996 15:55:36 MA + splitt si.hxx + + Rev 1.10 12 Jun 1996 15:09:18 OM + Target am util::URL-Button setzen + + Rev 1.9 12 Jun 1996 14:56:48 OM + Target aus Hyperlinkleiste uebernehmen + + Rev 1.8 31 May 1996 11:17:14 NF + CLOOKS + + Rev 1.7 11 Apr 1996 17:22:40 JP + Umstellung - RelToAbs/AbsToRel + +------------------------------------------------------------------------*/ + + diff --git a/sw/source/ui/shells/textfld.cxx b/sw/source/ui/shells/textfld.cxx new file mode 100644 index 0000000000..66f90cd8cb --- /dev/null +++ b/sw/source/ui/shells/textfld.cxx @@ -0,0 +1,1175 @@ +/************************************************************************* + * + * $RCSfile: textfld.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:47 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +#ifdef PRECOMPILED +#include "ui_pch.hxx" +#endif + +#pragma hdrstop + +#include "hintids.hxx" //_immer_ vor den solar-Items +#include "uiparam.hxx" + +#ifndef _SVX_POSTATTR_HXX //autogen +#include <svx/postattr.hxx> +#endif +#ifndef _SVX_HLNKITEM_HXX //autogen +#include <svx/hlnkitem.hxx> +#endif +#ifndef _SVXLINKMGR_HXX +#include <svx/linkmgr.hxx> +#endif +#ifndef _LINKDLG_HXX //autogen +#include <so3/linkdlg.hxx> +#endif +#ifndef _SVX_POSTDLG_HXX //autogen +#include <svx/postdlg.hxx> +#endif +#ifndef _SFXITEMPOOL_HXX //autogen +#include <svtools/itempool.hxx> +#endif +#ifndef _SFXINIMGR_HXX //autogen +#include <svtools/iniman.hxx> +#endif +#ifndef _OFF_APP_HXX //autogen +#include <offmgr/app.hxx> +#endif +#ifndef _SFX_INIMGR_HXX //autogen +#include <sfx2/inimgr.hxx> +#endif +#ifndef _SFX_WHITER_HXX //autogen +#include <svtools/whiter.hxx> +#endif +#ifndef _MSGBOX_HXX //autogen +#include <vcl/msgbox.hxx> +#endif +#ifndef _URLOBJ_HXX //autogen +#include <tools/urlobj.hxx> +#endif +#ifndef _SFXENUMITEM_HXX //autogen +#include <svtools/eitem.hxx> +#endif +#ifndef _SFXMACITEM_HXX //autogen +#include <svtools/macitem.hxx> +#endif +#ifndef _SVX_ADRITEM_HXX //autogen +#include <svx/adritem.hxx> +#endif +#ifndef _LINKDLG_HXX //autogen +#include <so3/linkdlg.hxx> +#endif +#ifndef _SFXVIEWFRM_HXX //autogen +#include <sfx2/viewfrm.hxx> +#endif +#ifndef _SFXREQUEST_HXX //autogen +#include <sfx2/request.hxx> +#endif + + +#ifndef _FMTINFMT_HXX //autogen +#include <fmtinfmt.hxx> +#endif +#ifndef _FLDWRAP_HXX //autogen +#include <fldwrap.hxx> +#endif +#include "redline.hxx" +#include "view.hxx" +#include "wrtsh.hxx" +#include "cmdid.h" +#include "basesh.hxx" +#include "wrtsh.hxx" +#include "finder.hxx" +#include "flddat.hxx" +#include "javaedit.hxx" +#include "numrule.hxx" +#include "textsh.hxx" +#include "docufld.hxx" +#include "usrfld.hxx" +#include "ddefld.hxx" +#include "expfld.hxx" +#include "fldmgr.hxx" +#include "fldedt.hxx" +//#include "addrdlg.hxx" +#include "shells.hrc" + + +extern BOOL bNoInterrupt; // in mainwn.cxx + +String& lcl_AppendRedlineStr( String& rStr, USHORT nRedlId ) +{ + USHORT nResId = 0; + switch( nRedlId ) + { + case REDLINE_INSERT: nResId = STR_REDLINE_INSERTED; break; + case REDLINE_DELETE: nResId = STR_REDLINE_DELETED; break; + case REDLINE_FORMAT: nResId = STR_REDLINE_FORMATED; break; + case REDLINE_TABLE: nResId = STR_REDLINE_TABLECHG; break; + case REDLINE_FMTCOLL: nResId = STR_REDLINE_FMTCOLLSET; break; + } + if( nResId ) + rStr += SW_RESSTR( nResId ); + return rStr; +} + +// STATIC DATA ----------------------------------------------------------- + +void SwTextShell::ExecField(SfxRequest &rReq) +{ + SwWrtShell& rSh = GetShell(); + OfficeApplication* pOffApp = OFF_APP(); + const SfxPoolItem* pItem = 0; + + USHORT nSlot = rReq.GetSlot(); + const SfxItemSet* pArgs = rReq.GetArgs(); + if(pArgs) + pArgs->GetItemState(GetPool().GetWhich(nSlot), FALSE, &pItem); + + Window *pMDI = &GetView().GetViewFrame()->GetWindow(); + BOOL bMore = FALSE; + USHORT nInsertType = 0; + USHORT nInsertSubType = 0; + USHORT nInsertFormat = 0; + + switch(nSlot) + { + case FN_EDIT_FIELD: + { + SwField* pFld = rSh.GetCurFld(); + if( pFld ) + { + switch ( pFld->GetTypeId() ) + { + case TYP_DDEFLD: + { +#if !defined(DDE_AVAILABLE) + return; +#endif + SvBaseLinksDialog aDlg( pMDI, + &rSh.GetLinkManager() ); + aDlg.SetActLink( ((SwDDEFieldType*)pFld->GetTyp())-> + GetBaseLink() ); + aDlg.Execute(); + break; + } + default: + { + SwFldEditDlg *pDlg = new SwFldEditDlg(GetView()); + // SetCareWin geht nicht, da Feld nicht selektiert wird + // rSh.SetCareWin(pDlg); + pDlg->Execute(); + delete pDlg; + //rSh.SetCareWin(NULL); + } + } + } + break; + } + case FN_EXECUTE_MACROFIELD: + { + SwField* pFld = rSh.GetCurFld(); + if(pFld && pFld->GetTyp()->Which() == RES_MACROFLD) + { + + const String& rMacro = ((SwMacroField*)pFld)->GetMacro(); + USHORT nPos = rMacro.Search('.', 0); + if(nPos != STRING_NOTFOUND) + { + SvxMacro aMacro( rMacro.Copy(nPos + 1), rMacro.Copy(0,nPos), STARBASIC ); + rSh.ExecMacro(aMacro); + } + } + } + break; + + case FN_GOTO_NEXT_INPUTFLD: + case FN_GOTO_PREV_INPUTFLD: + { + BOOL bRet = FALSE; + SwFieldType* pFld = rSh.GetFldType( 0, RES_INPUTFLD ); + if( pFld && rSh.MoveFldType( pFld, + FN_GOTO_NEXT_INPUTFLD == nSlot )) + { + rSh.ClearMark(); + rSh.StartInputFldDlg( rSh.GetCurFld(), FALSE ); + bRet = TRUE; + } + + rReq.SetReturnValue( SfxBoolItem( nSlot, bRet )); + } + break; + + default: + bMore = TRUE; + } + if(bMore) + { + // hier kommen die Slots mit FldMgr + SwFldMgr aFldMgr(GetShellPtr()); + switch(nSlot) + { + case FN_INSERT_FIELD_CTRL: + case FN_INSERT_FIELD: + { + BOOL bRes = FALSE; + SfxViewFrame* pVFrame = GetView().GetViewFrame(); + pVFrame->ToggleChildWindow(FN_INSERT_FIELD); + bRes = pVFrame->GetChildWindow( nSlot ) != 0; + Invalidate(rReq.GetSlot()); + Invalidate(FN_INSERT_FIELD_CTRL); + rReq.SetReturnValue(SfxBoolItem( nSlot, bRes )); + } + break; + + case FN_INSERT_REF_FIELD: + { + SfxViewFrame* pVFrame = GetView().GetViewFrame(); + if (!pVFrame->HasChildWindow(FN_INSERT_FIELD)) + pVFrame->ToggleChildWindow(FN_INSERT_FIELD); // Dialog anzeigen + + // Flddlg auf neue TabPage umschalten + USHORT nId = SwFldDlgWrapper::GetChildWindowId(); + SwFldDlgWrapper *pWrp = (SwFldDlgWrapper*)pVFrame->GetChildWindow(nId); + if (pWrp) + pWrp->ShowPage(); + } + break; + + + case FN_POSTIT: + { + pPostItFldMgr = new SwFldMgr; + SwPostItField* pPostIt = (SwPostItField*)pPostItFldMgr->GetCurFld(); + BOOL bNew = !(pPostIt && pPostIt->GetTyp()->Which() == RES_POSTITFLD); + BOOL bTravel = FALSE; + BOOL bNext, bPrev; + + SfxItemSet aSet(GetPool(), SvxPostItDialog::GetRanges()); + + if(!bNew) + { + aSet.Put(SvxPostItTextItem(pPostIt->GetPar2().ConvertLineEnd(), SID_ATTR_POSTIT_TEXT)); + aSet.Put(SvxPostItAuthorItem(pPostIt->GetPar1(), SID_ATTR_POSTIT_AUTHOR)); + aSet.Put(SvxPostItDateItem( + Application::GetAppInternational(). + GetDate(pPostIt->GetDate()), + SID_ATTR_POSTIT_DATE)); + + // Traveling nur bei mehr als einem Feld + rSh.StartAction(); + + bNext = pPostItFldMgr->GoNext(); + if( bNext ) + pPostItFldMgr->GoPrev(); + + if( 0 != ( bPrev = pPostItFldMgr->GoPrev() ) ) + pPostItFldMgr->GoNext(); + bTravel |= bNext|bPrev; + + rSh.EndAction(); + } + else + { + SvxAddressItem aAdr( pPathFinder->GetAddress() ); + aSet.Put(SvxPostItTextItem(aEmptyStr, SID_ATTR_POSTIT_TEXT)); + aSet.Put(SvxPostItAuthorItem(aAdr.GetShortName(), SID_ATTR_POSTIT_AUTHOR)); + aSet.Put(SvxPostItDateItem( + Application::GetAppInternational(). + GetDate(Date()), SID_ATTR_POSTIT_DATE)); + } + + SvxPostItDialog *pDlg = new SvxPostItDialog( pMDI, aSet, bTravel); + pDlg->SetReadonlyPostIt(rSh.IsReadOnlyAvailable() && rSh.HasReadonlySel()); + + if (bTravel) + { + pDlg->EnableTravel(bNext, bPrev); + pDlg->SetPrevHdl(LINK(this, SwTextShell, PostItPrevHdl)); + pDlg->SetNextHdl(LINK(this, SwTextShell, PostItNextHdl)); + } + + if (bNew) + pDlg->SetText(SW_RESSTR(STR_NOTIZ_INSERT)); + + bNoInterrupt = TRUE; + if ( pDlg->Execute() == RET_OK ) + { + const SfxItemSet* pOutSet = pDlg->GetOutputItemSet(); + String sMsg(((const SvxPostItTextItem&)pOutSet->Get(SID_ATTR_POSTIT_TEXT)).GetValue()); + String sAuthor(((const SvxPostItAuthorItem&)pOutSet->Get(SID_ATTR_POSTIT_AUTHOR)).GetValue()); + + if(bNew) + // neues PostIt anlegen + pPostItFldMgr->InsertFld(TYP_POSTITFLD, 0, sAuthor, sMsg, 0); + else + // altes PostIt updaten + pPostItFldMgr->UpdateCurFld(0, sAuthor, sMsg); + } + + delete pDlg; + delete pPostItFldMgr; + bNoInterrupt = FALSE; + GetView().AttrChangedNotify(GetShellPtr()); + } + break; + + case FN_REDLINE_COMMENT: + { + BOOL bNew = TRUE; + String sComment; + const SwRedline *pRedline = rSh.GetCurrRedline(); + + if (pRedline) + { + sComment = pRedline->GetComment(); + + + BOOL bTravel = FALSE; + + SfxItemSet aSet(GetPool(), SvxPostItDialog::GetRanges()); + const International& rIntl = Application::GetAppInternational(); + + aSet.Put(SvxPostItTextItem(sComment.ConvertLineEnd(), SID_ATTR_POSTIT_TEXT)); + aSet.Put(SvxPostItAuthorItem(pRedline->GetAuthorString(), SID_ATTR_POSTIT_AUTHOR)); + + const DateTime &rDT = pRedline->GetRedlineData().GetTimeStamp(); + + String sDate(rIntl.GetDate( rDT )); + (sDate += ' ' ) += rIntl.GetTime( rDT, FALSE, FALSE ); + + aSet.Put(SvxPostItDateItem(sDate, SID_ATTR_POSTIT_DATE)); + + // Traveling nur bei mehr als einem Feld + rSh.StartAction(); + + rSh.Push(); + const SwRedline *pActRed = rSh.SelPrevRedline(); + + if (pActRed == pRedline) + { // Neuer Cursor steht am Anfang des Current Redlines + rSh.Pop(); // Alten Cursor wegwerfen + rSh.Push(); + pActRed = rSh.SelPrevRedline(); + } + + BOOL bPrev = pActRed != 0; + rSh.Pop(FALSE); + rSh.EndAction(); + + rSh.ClearMark(); + rSh.SelNextRedline(); // Aktueller Redline wird selektiert + + rSh.StartAction(); + rSh.Push(); + pActRed = rSh.SelNextRedline(); + BOOL bNext = pActRed != 0; + rSh.Pop(FALSE); // Cursorpos restaurieren + + if( rSh.IsCrsrPtAtEnd() ) + rSh.SwapPam(); + + rSh.EndAction(); + + bTravel |= bNext|bPrev; + + SvxPostItDialog *pDlg = new SvxPostItDialog( pMDI, aSet, bTravel, TRUE); + pDlg->HideAuthor(); + + String sTitle(SW_RES(STR_REDLINE_COMMENT)); + ::lcl_AppendRedlineStr( sTitle, pRedline->GetType() ); + + pDlg->SetText(sTitle); + + if (bTravel) + { + pDlg->EnableTravel(bNext, bPrev); + pDlg->SetPrevHdl(LINK(this, SwTextShell, RedlinePrevHdl)); + pDlg->SetNextHdl(LINK(this, SwTextShell, RedlineNextHdl)); + } + + rSh.SetCareWin(pDlg); + bNoInterrupt = TRUE; + + if ( pDlg->Execute() == RET_OK ) + { + const SfxItemSet* pOutSet = pDlg->GetOutputItemSet(); + String sMsg(((const SvxPostItTextItem&)pOutSet->Get(SID_ATTR_POSTIT_TEXT)).GetValue()); + + // Kommentar einfuegen bzw aendern + rSh.SetRedlineComment(sMsg); + } + + delete pDlg; + rSh.SetCareWin(NULL); + bNoInterrupt = FALSE; + rSh.ClearMark(); + GetView().AttrChangedNotify(GetShellPtr()); + } + } + break; + + case FN_JAVAEDIT: + { + SwJavaEditDialog *pDlg = new SwJavaEditDialog( pMDI, &rSh); + pDlg->Execute(); + delete pDlg; + } + break; + + case FN_INSERT_FLD_DATE : + nInsertType = TYP_DATEFLD; + goto FIELD_INSERT; + case FN_INSERT_FLD_TIME : + nInsertType = TYP_TIMEFLD; + goto FIELD_INSERT; + case FN_INSERT_FLD_PGNUMBER: + nInsertType = TYP_PAGENUMBERFLD; + nInsertFormat = SVX_NUM_PAGEDESC; // wie Seitenvorlage + goto FIELD_INSERT; + case FN_INSERT_FLD_PGCOUNT : + nInsertType = TYP_DOCSTATFLD; + nInsertSubType = 0; + nInsertFormat = SVX_NUM_PAGEDESC; + goto FIELD_INSERT; + case FN_INSERT_FLD_TOPIC : + nInsertType = TYP_DOCINFOFLD; + nInsertSubType = DI_THEMA; + goto FIELD_INSERT; + case FN_INSERT_FLD_TITLE : + nInsertType = TYP_DOCINFOFLD; + nInsertSubType = DI_TITEL; + goto FIELD_INSERT; + case FN_INSERT_FLD_AUTHOR : + nInsertType = TYP_AUTHORFLD; + +FIELD_INSERT: + aFldMgr.InsertFld(nInsertType, nInsertSubType, + aEmptyStr, aEmptyStr, nInsertFormat); + break; + default: + ASSERT(FALSE, falscher Dispatcher); + return; + } + } +} + + +void SwTextShell::StateField( SfxItemSet &rSet ) +{ + SwWrtShell& rSh = GetShell(); + SfxWhichIter aIter( rSet ); + const SwField* pField = 0; + int bGetField = FALSE; + USHORT nWhich = aIter.FirstWhich(); + + while (nWhich) + { + switch (nWhich) + { + case FN_EDIT_FIELD: + { + if( rSh.HasSelection() ) + rSet.DisableItem(nWhich); + else + { + if( !bGetField ) + { + pField = rSh.GetCurFld(); + bGetField = TRUE; + } + + USHORT nTempWhich = pField ? pField->GetTyp()->Which() : USHRT_MAX; + if( USHRT_MAX == nTempWhich || + RES_POSTITFLD == nTempWhich || + RES_SCRIPTFLD == nTempWhich || + RES_AUTHORITY == nTempWhich ) + rSet.DisableItem( nWhich ); + } + } + break; + case FN_EXECUTE_MACROFIELD: + { + if(!bGetField) + { + pField = rSh.GetCurFld(); + bGetField = TRUE; + } + if(!pField || pField->GetTyp()->Which() != RES_MACROFLD) + rSet.DisableItem(nWhich); + } + break; + + case FN_INSERT_FIELD: + { + SfxViewFrame* pVFrame = GetView().GetViewFrame(); + if (pVFrame->KnowsChildWindow(FN_INSERT_FIELD)) + rSet.Put(SfxBoolItem( FN_INSERT_FIELD, pVFrame->HasChildWindow(nWhich))); + else + rSet.DisableItem(FN_INSERT_FIELD); + } + break; + case FN_INSERT_REF_FIELD: + { + SfxViewFrame* pVFrame = GetView().GetViewFrame(); + if (!pVFrame->KnowsChildWindow(FN_INSERT_FIELD)) + rSet.DisableItem(FN_INSERT_REF_FIELD); + } + break; + case FN_INSERT_FIELD_CTRL: + rSet.Put(SfxBoolItem( nWhich, GetView().GetViewFrame()->HasChildWindow(FN_INSERT_FIELD))); + break; + case FN_REDLINE_COMMENT: + if (!rSh.GetCurrRedline()) + rSet.DisableItem(nWhich); + break; + case FN_POSTIT : + case FN_JAVAEDIT : + BOOL bCurField = FALSE; + SwField* pField = rSh.GetCurFld(); + if(nWhich == FN_POSTIT) + bCurField = pField && pField->GetTyp()->Which() == RES_POSTITFLD; + else + bCurField = pField && pField->GetTyp()->Which() == RES_SCRIPTFLD; + + if(!bCurField && rSh.IsReadOnlyAvailable() && rSh.HasReadonlySel() ) + rSet.DisableItem(nWhich); + break; + } + nWhich = aIter.NextWhich(); + } +} + +/*--------------------------------------------------------------------------- + Beschreibung: + ----------------------------------------------------------------------------*/ + + +void SwTextShell::InsertHyperlink(const SvxHyperlinkItem& rHlnkItem) +{ + const String& rName = rHlnkItem.GetName(); + const String& rURL = rHlnkItem.GetURL(); + const String& rTarget = rHlnkItem.GetTargetFrame(); + USHORT nType = (USHORT)rHlnkItem.GetInsertMode(); + const SvxMacroTableDtor* pMacroTbl = rHlnkItem.GetMacroTbl(); + + SwWrtShell& rSh = GetShell(); + + if( rSh.GetSelectionType() & SwWrtShell::SEL_TXT ) + { + switch (nType) + { + case HLINK_DEFAULT: + case HLINK_FIELD: + { + rSh.StartAction(); + BOOL bSel = rSh.HasSelection(); + SfxItemSet aSet(GetPool(), RES_TXTATR_INETFMT, RES_TXTATR_INETFMT); + rSh.GetAttr( aSet ); + + const SfxPoolItem* pItem; + if(SFX_ITEM_SET == aSet.GetItemState(RES_TXTATR_INETFMT, FALSE, &pItem)) + { + const SwFmtINetFmt* pINetFmt = (const SwFmtINetFmt*)pItem; + + // Links selektieren + rSh.SwCrsrShell::SelectTxtAttr(RES_TXTATR_INETFMT); + } + SwFmtINetFmt aINetFmt( rURL, rTarget ); + aINetFmt.SetName(rHlnkItem.GetIntName()); + if(pMacroTbl) + { + SvxMacro *pMacro = pMacroTbl->Get( SFX_EVENT_MOUSEOVER_OBJECT ); + if( pMacro ) + aINetFmt.SetMacro(SFX_EVENT_MOUSEOVER_OBJECT, *pMacro); + pMacro = pMacroTbl->Get( SFX_EVENT_MOUSECLICK_OBJECT ); + if( pMacro ) + aINetFmt.SetMacro(SFX_EVENT_MOUSECLICK_OBJECT, *pMacro); + pMacro = pMacroTbl->Get( SFX_EVENT_MOUSEOUT_OBJECT ); + if( pMacro ) + aINetFmt.SetMacro(SFX_EVENT_MOUSEOUT_OBJECT, *pMacro); + } + rSh.InsertURL( aINetFmt, rName, TRUE ); + rSh.EndAction(); + } + break; + + case HLINK_BUTTON: + InsertURLButton( rURL, rTarget, rName ); + rSh.EnterStdMode(); + break; + } + } +} + +/*--------------------------------------------------------------------------- + Beschreibung: + ----------------------------------------------------------------------------*/ + + +void SwTextShell::InsertDBFld(const String& sFldName) +{ + SwFldMgr aFldMgr(GetShellPtr()); + + aFldMgr.InsertFld(TYP_DBFLD, 0, sFldName, aEmptyStr, 0, FALSE, TRUE); +} + +/*-------------------------------------------------------------------- + Beschreibung: Traveling zwishen PostIts + --------------------------------------------------------------------*/ + + +IMPL_LINK( SwTextShell, PostItNextHdl, Button *, pBtn ) +{ + SvxPostItDialog *pDlg = (SvxPostItDialog*)pBtn; + + if( pDlg->IsOkEnabled() ) + pPostItFldMgr->UpdateCurFld( 0, + SFX_INIMANAGER()->Get(SFX_KEY_USER_ID), + pDlg->GetNote() ); + pPostItFldMgr->GoNext(); + SwPostItField* pPostIt = (SwPostItField*)pPostItFldMgr->GetCurFld(); + pDlg->SetNote(pPostIt->GetPar2().ConvertLineEnd()); + pDlg->ShowLastAuthor(pPostIt->GetPar1(), Application::GetAppInternational().GetDate(pPostIt->GetDate())); + + // Traveling nur bei mehr als einem Feld + SwWrtShell* pSh = GetShellPtr(); + pDlg->SetReadonlyPostIt(pSh->IsReadOnlyAvailable() && pSh->HasReadonlySel()); + pSh->StartAction(); + + BOOL bEnable = FALSE; + if( pPostItFldMgr->GoNext() ) + { + bEnable = TRUE; + pPostItFldMgr->GoPrev(); + } + pDlg->EnableTravel(bEnable, TRUE); + + pSh->EndAction(); + + return 0; +} + +/*-------------------------------------------------------------------- + Beschreibung: + --------------------------------------------------------------------*/ + + +IMPL_LINK( SwTextShell, PostItPrevHdl, Button *, pBtn ) +{ + SvxPostItDialog *pDlg = (SvxPostItDialog*)pBtn; + + if( pDlg->IsOkEnabled() ) + pPostItFldMgr->UpdateCurFld( 0, + SFX_INIMANAGER()->Get(SFX_KEY_USER_ID), + pDlg->GetNote() ); + pPostItFldMgr->GoPrev(); + SwPostItField* pPostIt = (SwPostItField*)pPostItFldMgr->GetCurFld(); + pDlg->SetNote(pPostIt->GetPar2().ConvertLineEnd()); + pDlg->ShowLastAuthor(pPostIt->GetPar1(), Application::GetAppInternational().GetDate(pPostIt->GetDate())); + + // Traveling nur bei mehr als einem Feld + SwWrtShell* pSh = GetShellPtr(); + pDlg->SetReadonlyPostIt(pSh->IsReadOnlyAvailable() && pSh->HasReadonlySel()); + pSh->StartAction(); + + BOOL bEnable = FALSE; + if( pPostItFldMgr->GoPrev() ) + { + bEnable = TRUE; + pPostItFldMgr->GoNext(); + } + pDlg->EnableTravel(TRUE, bEnable); + + pSh->EndAction(); + + return 0; +} + +/*-------------------------------------------------------------------- + Beschreibung: Traveling zwischen Redlines + --------------------------------------------------------------------*/ + + +IMPL_LINK( SwTextShell, RedlineNextHdl, Button *, pBtn ) +{ + SwWrtShell* pSh = GetShellPtr(); + SvxPostItDialog *pDlg = (SvxPostItDialog*)pBtn; + + // Kommentar einfuegen bzw aendern + pSh->SetRedlineComment(pDlg->GetNote()); + + const SwRedline *pRedline = pSh->GetCurrRedline(); + + BOOL bNew = TRUE; + String sComment; + + if (pRedline) + { + // Traveling nur bei mehr als einem Feld + if( !pSh->IsCrsrPtAtEnd() ) + pSh->SwapPam(); // Cursor hinter den Redline stellen + + pSh->Push(); + const SwRedline *pActRed = pSh->SelNextRedline(); + pSh->Pop(pActRed != 0); + + BOOL bEnable = FALSE; + + if (pActRed) + { + pSh->StartAction(); + pSh->Push(); + bEnable = pSh->SelNextRedline() != 0; + pSh->Pop(FALSE); + pSh->EndAction(); + } + + pDlg->EnableTravel(bEnable, TRUE); + + if( pSh->IsCrsrPtAtEnd() ) + pSh->SwapPam(); + + pRedline = pSh->GetCurrRedline(); + sComment = pRedline->GetComment(); + + const International& rIntl = Application::GetAppInternational(); + + const DateTime &rDT = pRedline->GetRedlineData().GetTimeStamp(); + + String sDate(rIntl.GetDate( rDT )); + (sDate += ' ' ) += rIntl.GetTime( rDT, FALSE, FALSE ); + + pDlg->SetNote(sComment.ConvertLineEnd()); + pDlg->ShowLastAuthor(pRedline->GetAuthorString(), sDate); + + String sTitle(SW_RES(STR_REDLINE_COMMENT)); + ::lcl_AppendRedlineStr( sTitle, pRedline->GetType() ); + + pDlg->SetText(sTitle); + } + + return 0; +} + +/*-------------------------------------------------------------------- + Beschreibung: + --------------------------------------------------------------------*/ + + +IMPL_LINK( SwTextShell, RedlinePrevHdl, Button *, pBtn ) +{ + SwWrtShell* pSh = GetShellPtr(); + SvxPostItDialog *pDlg = (SvxPostItDialog*)pBtn; + + // Kommentar einfuegen bzw aendern + pSh->SetRedlineComment(pDlg->GetNote()); + + const SwRedline *pRedline = pSh->GetCurrRedline(); + + BOOL bNew = TRUE; + String sComment; + + if (pRedline) + { + // Traveling nur bei mehr als einem Feld + pSh->Push(); + const SwRedline *pActRed = pSh->SelPrevRedline(); + pSh->Pop(pActRed != 0); + + BOOL bEnable = FALSE; + + if (pActRed) + { + pSh->StartAction(); + pSh->Push(); + bEnable = pSh->SelPrevRedline() != 0; + pSh->Pop(FALSE); + pSh->EndAction(); + } + + pDlg->EnableTravel(TRUE, bEnable); + + pRedline = pSh->GetCurrRedline(); + sComment = pRedline->GetComment(); + + const International& rIntl = Application::GetAppInternational(); + + const DateTime &rDT = pRedline->GetRedlineData().GetTimeStamp(); + + String sDate(rIntl.GetDate( rDT )); + (sDate += ' ' ) += rIntl.GetTime( rDT, FALSE, FALSE ); + + pDlg->SetNote(sComment.ConvertLineEnd()); + pDlg->ShowLastAuthor(pRedline->GetAuthorString(), sDate); + + String sTitle(SW_RES(STR_REDLINE_COMMENT)); + ::lcl_AppendRedlineStr( sTitle, pRedline->GetType() ); + + pDlg->SetText(sTitle); + } + + return 0; +} + +// ----------------------------------------------------------------------- +/*------------------------------------------------------------------------ + + $Log: not supported by cvs2svn $ + Revision 1.117 2000/09/18 16:06:05 willem.vandorp + OpenOffice header added. + + Revision 1.116 2000/09/08 08:12:52 os + Change: Set/Toggle/Has/Knows/Show/GetChildWindow + + Revision 1.115 2000/06/30 08:52:04 os + #76541# string assertions removed + + Revision 1.114 2000/05/26 07:21:33 os + old SW Basic API Slots removed + + Revision 1.113 2000/04/18 14:58:24 os + UNICODE + + Revision 1.112 2000/04/11 11:32:34 os + #74939# select inserted URLs + + Revision 1.111 2000/02/25 09:26:37 hr + #73447#: removed temporary + + Revision 1.110 2000/02/11 14:58:18 hr + #70473# changes for unicode ( patched by automated patchtool ) + + Revision 1.109 2000/01/20 10:59:55 os + #72115# set name of inserted hyperlink + + Revision 1.108 2000/01/18 12:10:40 pw + #71932# Use SFX_EVENT_-constants to get a macro from a macrotable + + Revision 1.107 1999/10/27 06:37:49 os + HyperLink dialog interface, events + + Revision 1.106 1999/10/20 16:33:19 jp + Bug #69239#: return correct state of FN_EDIT_FIELD + + Revision 1.105 1999/09/24 14:38:32 os + hlnkitem.hxx now in SVX + + Revision 1.104 1999/09/15 14:15:43 os + AuthorityField(-Type), RES_AUTHORITY + + Revision 1.103 1999/07/16 14:04:08 JP + Bug #67677#: PostIdNext-/-PrevHdl - if OkButton is enabled the field can changed + + + Rev 1.102 16 Jul 1999 16:04:08 JP + Bug #67677#: PostIdNext-/-PrevHdl - if OkButton is enabled the field can changed + + Rev 1.101 10 Jun 1999 13:16:36 JP + have to change: no AppWin from SfxApp + + Rev 1.100 10 May 1999 13:50:12 OS + #64780# Notizen in gesch. Bereichen + + Rev 1.99 19 Apr 1999 13:42:20 OS + #63005# Notizen und Scripts in gesch. Bereichen + + Rev 1.98 17 Nov 1998 10:58:32 OS + #58263# NumType durch SvxExtNumType ersetzt + + Rev 1.97 21 Oct 1998 16:19:32 OM + #58157# Querverweise einfuegen + + Rev 1.96 09 Oct 1998 17:06:04 JP + Bug #57741#: neue ResourceIds, optimiert + + Rev 1.95 17 Jul 1998 17:26:14 OM + #52865# Neue HelpIDs fuer Redline-bearbeiten Dlg + + Rev 1.94 14 Jul 1998 14:19:10 OM + #52859# Autor-Button nicht anzeigen + + Rev 1.93 09 Jul 1998 09:53:22 JP + EmptyStr benutzen + + Rev 1.92 13 Jun 1998 16:08:48 OS + FN_INSERT_FIELD_CONTROL ruft auch Feldbefehl-Dialog + + Rev 1.91 19 May 1998 12:45:50 OM + SvxMacro-Umstellung + + Rev 1.90 24 Mar 1998 13:43:34 JP + neu: Redline fuer harte Attributierung + + Rev 1.89 18 Mar 1998 18:20:10 OM + Redlines schneller selektieren + + Rev 1.88 18 Mar 1998 18:06:26 OM + Redlines schneller selektieren + + Rev 1.87 28 Feb 1998 15:13:54 OM + Accept / reject changes + + Rev 1.86 26 Feb 1998 11:10:02 OM + Redlining-Travelling anzeigen + + Rev 1.85 25 Feb 1998 16:49:46 OM + Fixe Author- und ExtUser-Felder + + Rev 1.84 12 Feb 1998 13:22:48 OM + Traveling zwischen Redline-Objekten + + Rev 1.83 10 Feb 1998 17:08:58 OM + Redlining kommentieren + + Rev 1.82 27 Jan 1998 22:42:18 JP + GetNumDepend durch GetDepends ersetzt + + Rev 1.81 23 Jan 1998 16:07:14 MA + includes + + Rev 1.80 13 Jan 1998 16:57:54 OM + #46549# Notiz einfuegen + + Rev 1.79 12 Jan 1998 17:09:32 OM + Zu TYP_SETREFFLD per Basic springen + + Rev 1.78 19 Dec 1997 18:25:34 OM + Feldbefehl-bearbeiten Dlg + + Rev 1.77 10 Dec 1997 10:08:28 OM + Alten Feldbefehl-Dlg entfernt + + Rev 1.76 05 Dec 1997 13:16:56 OM + #45750# DDE-Field Delimiter fuer Basic wandeln + + Rev 1.75 04 Dec 1997 08:31:50 OS + NextFieldByType: SubType fuer SETFLD nicht setzen #45912# + + Rev 1.74 29 Nov 1997 15:52:12 MA + includes + + Rev 1.73 24 Nov 1997 09:47:08 MA + includes + + Rev 1.72 10 Nov 1997 15:40:04 OS + MoveFldType mit SubType #45425# + + Rev 1.71 03 Nov 1997 13:55:48 MA + precomp entfernt + + Rev 1.70 28 Oct 1997 15:07:16 OM + Neuer Feldbefehl-Dialog angefangen + + Rev 1.69 20 Oct 1997 15:41:24 OS + GotoNext/PrevInputField: Selektion aufheben #44846# + + Rev 1.68 24 Sep 1997 15:20:30 OM + Feldumstellung + + Rev 1.67 03 Sep 1997 16:02:10 OS + include + + Rev 1.66 01 Sep 1997 13:23:58 OS + DLL-Umstellung + + Rev 1.65 15 Aug 1997 11:48:38 OS + chartar/frmatr/txtatr aufgeteilt + + Rev 1.64 08 Aug 1997 17:28:48 OM + Headerfile-Umstellung + + Rev 1.63 12 Jul 1997 12:11:02 OS + FN_JAVAEDIT: Parameter fuer URL und ScriptType nachgetragen + + Rev 1.62 10 Jul 1997 16:07:22 OM + Aufgeraeumt + + Rev 1.61 26 Jun 1997 09:43:40 OM + Basic: Datenbank in Feldbefehlen ersetzen + + Rev 1.60 25 Jun 1997 15:42:26 OS + CurField(Sub)Type: DATE und TIME mappen #40967# + + Rev 1.59 21 Jun 1997 14:52:24 OS + neu: FieldPrompt + + Rev 1.58 20 Jun 1997 15:17:38 OS + GetShell()s reduziert + + Rev 1.57 18 Jun 1997 18:09:38 OM + Adressfeld: Focus je nach Typ im Dialog setzen + + Rev 1.56 12 Jun 1997 15:34:08 JP + Feld-Slots aus der TextShell in die BaseShell verschoben + + Rev 1.55 09 Jun 1997 11:39:46 JP + fuer TYP_SETREFFLD gibt es keinen FeldTypen + + Rev 1.54 04 Jun 1997 14:08:06 OM + #40431# Scriptfeld: Felbefehle bearbeiten disablen + + Rev 1.53 27 May 1997 13:36:24 OS + neu: CurFieldType, CurFieldSubType + + Rev 1.52 12 May 1997 16:09:26 OM + #39823# GPF bei blaettern zwischen Notizen behoben + + Rev 1.51 23 Apr 1997 15:15:44 OS + FieldType anlegen + + Rev 1.50 08 Apr 1997 10:52:22 OM + Fehlende Includes + + Rev 1.49 07 Apr 1997 16:45:24 OM + HyperlinkItem recorden + + Rev 1.48 18 Mar 1997 15:31:16 OM + Segmentiert + + Rev 1.47 18 Mar 1997 15:30:56 OM + Datenbanktrenner wandeln + + Rev 1.46 23 Feb 1997 15:05:20 OS + SetUserFieldValue liefert BOOL + + Rev 1.45 21 Feb 1997 16:08:38 OM + Eingefuegten Hyperlink aufzeichnen + + Rev 1.44 13 Feb 1997 17:38:22 OM + Script-Dlg + + Rev 1.43 11 Feb 1997 16:52:24 OM + Eingabefeld ueber Basic ohne Dialog einfuegen + + Rev 1.42 05 Feb 1997 12:39:32 OM + Feldbefehl Seitennummer auf Standardvorlage defaulten + + Rev 1.41 09 Dec 1996 14:43:16 OM + SwPostItDlg durch SvxPostItDlg ersetzt + + Rev 1.40 06 Nov 1996 07:10:16 OS + FN_GET_FIELD_VALUE optimiert + + Rev 1.39 01 Oct 1996 16:54:02 OM + Hyperlinks editieren + + Rev 1.38 26 Sep 1996 14:40:28 OM + Datenbankfelder ueber Basic einfuegen + + Rev 1.37 24 Sep 1996 16:42:32 OS + neue Slots fuer FieldTypes + + Rev 1.36 24 Sep 1996 13:49:58 OM + Neuer Datenbanktrenner + + Rev 1.35 20 Sep 1996 12:01:42 OS + Formate fuer Seitennummer/Seitenzahl-Felder korrigiert + + Rev 1.34 19 Sep 1996 16:08:34 OS + neue Slots zum direkten Feldeinfuegen + + Rev 1.33 19 Sep 1996 10:58:56 OM + neue Parameter fuer GetDatabaseFieldValue + + Rev 1.32 02 Sep 1996 18:43:08 JP + INetFeld entfernt + + Rev 1.31 30 Aug 1996 12:41:24 OS + InputFldDlg mit Next-Button + + Rev 1.30 28 Aug 1996 15:54:56 OS + includes + + Rev 1.29 23 Aug 1996 14:49:20 OM + Neue Segs + + Rev 1.28 23 Aug 1996 14:48:00 OM + Datenbank: Drag&Drop + + Rev 1.27 21 Aug 1996 13:09:24 OS + FldMgr mit Shell anlegen -> richtige view benutzen + + Rev 1.26 20 Aug 1996 17:23:00 JP + InsertURL: Shell wieder in StdMode schalten + + Rev 1.25 20 Aug 1996 15:39:10 JP + InsertURL: statt FeldManager direkt an die Shell gehen + + Rev 1.24 24 Jun 1996 18:29:14 HJS + includes + + Rev 1.23 12 Jun 1996 15:16:30 OM + Optimiert + + Rev 1.22 12 Jun 1996 14:56:50 OM + Target aus Hyperlinkleiste uebernehmen + + Rev 1.21 04 Jun 1996 18:43:46 JP + neu: ab CursorPosition Next/Prev-InputField suchen und Dialog hochziehem + + Rev 1.20 31 May 1996 15:27:08 OM + Ueberfluessigen Include entfernt + + Rev 1.19 28 May 1996 15:23:38 OM + Neue Basic-Cmds fuer Datenbanken + +------------------------------------------------------------------------*/ + + diff --git a/sw/source/ui/shells/textglos.cxx b/sw/source/ui/shells/textglos.cxx new file mode 100644 index 0000000000..22925154d1 --- /dev/null +++ b/sw/source/ui/shells/textglos.cxx @@ -0,0 +1,209 @@ +/************************************************************************* + * + * $RCSfile: textglos.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:47 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +#ifdef PRECOMPILED +#include "ui_pch.hxx" +#endif + +#pragma hdrstop + +#ifndef _SFXREQUEST_HXX //autogen +#include <sfx2/request.hxx> +#endif +#ifndef _SFXENUMITEM_HXX //autogen +#include <svtools/eitem.hxx> +#endif +#ifndef _SFXITEMSET_HXX //autogen +#include <svtools/itemset.hxx> +#endif +#ifndef _SFXSTRITEM_HXX //autogen +#include <svtools/stritem.hxx> +#endif + +#include "errhdl.hxx" +#include "view.hxx" +#include "initui.hxx" +#include "cmdid.h" +#include "textsh.hxx" +#include "initui.hxx" +#include "glossary.hxx" +#include "gloshdl.hxx" +#include "glosdoc.hxx" +#include "gloslst.hxx" + +// STATIC DATA ----------------------------------------------------------- + +void SwTextShell::ExecGlossary(SfxRequest &rReq) +{ + USHORT nSlot = rReq.GetSlot(); + ::GetGlossaries()->UpdateGlosPath(!rReq.IsAPI() || + FN_GLOSSARY_DLG == nSlot ); + SwGlossaryHdl* pGlosHdl = GetView().GetGlosHdl(); + // SwGlossaryList updaten? + BOOL bUpdateList = FALSE; + + switch( nSlot ) + { + case FN_GLOSSARY_DLG: + pGlosHdl->GlossaryDlg(); + bUpdateList = TRUE; + break; + case FN_EXPAND_GLOSSARY: + { + BOOL bReturn; + bReturn = pGlosHdl->ExpandGlossary( TRUE ); + rReq.SetReturnValue( SfxBoolItem( nSlot, bReturn ) ); + } + break; + default: + ASSERT(FALSE, falscher Dispatcher); + return; + } + if(bUpdateList) + { + SwGlossaryList* pList = ::GetGlossaryList(); + if(pList->IsActive()) + pList->Update(); + } +} + +/*------------------------------------------------------------------------ + + $Log: not supported by cvs2svn $ + Revision 1.24 2000/09/18 16:06:06 willem.vandorp + OpenOffice header added. + + Revision 1.23 2000/05/26 07:21:33 os + old SW Basic API Slots removed + + Revision 1.22 2000/04/18 14:58:24 os + UNICODE + + Revision 1.21 2000/02/10 10:37:03 os + #70359# titles added to AutoText groups + + Revision 1.20 1997/11/24 08:47:08 MA + includes + + + Rev 1.19 24 Nov 1997 09:47:08 MA + includes + + Rev 1.18 03 Nov 1997 13:55:46 MA + precomp entfernt + + Rev 1.17 20 Aug 1997 15:24:28 OS + GetGlossaryGroupName: Pfad-Extension an Position Null nicht ausgeben #42968# + + Rev 1.16 19 Aug 1997 10:39:04 OS + ExpandGlossary darf per API keine MessageBoxen erzeugen #42903# + + Rev 1.15 07 Apr 1997 17:42:26 MH + chg: header + + Rev 1.14 14 Mar 1997 14:38:18 OS + neu: CreateGlossaryGroup + + Rev 1.13 27 Sep 1996 12:51:52 OS + Updates fuer die GlossaryList + + Rev 1.12 21 Sep 1996 15:57:32 OS + InsertGlossary returnt BOOL + + Rev 1.11 30 Aug 1996 12:41:02 OS + UpdateGlosPath kann Blockliste aktualisieren + + Rev 1.10 28 Aug 1996 15:54:48 OS + includes + + Rev 1.9 29 Jul 1996 12:12:18 OS + vor jeder Textblock-Operation den GlossaryPath updaten + + Rev 1.8 17 Jul 1996 07:48:52 OS + neu: GetGlossaryShortName + + Rev 1.7 22 May 1996 15:33:06 OS + InsertGlossary: akt. Gruppe auch am pGlosHdl setzen + + Rev 1.6 30 Apr 1996 08:04:00 OS + auch im RenameGlossary darf die aktuelle Gruppe nicht am gloshdl eingestell werden, Bug#27350# + + Rev 1.5 13 Mar 1996 16:25:48 OS + neu: RenameGlossary + + Rev 1.4 10 Mar 1996 15:46:34 OS + neue Slots fuer Autotext: Gruppenanzahl und Elemente erfragen + + Rev 1.3 17 Feb 1996 12:36:00 OS + neu: Textbausteine und -gruppen loeschen, Bug #25606#, NewGlossary legt jetzt auch Bereiche neu an, Bug #25576# + + Rev 1.2 26 Jan 1996 11:00:16 OS + akt. Gruppe fuer Textbausteine nur am GlossaryDlg und nicht am GlossaryHdl setzen, Bug #24473# + + Rev 1.1 30 Nov 1995 15:26:28 OS + +pragma + + Rev 1.0 30 Nov 1995 12:37:28 OM + Initial revision. + +------------------------------------------------------------------------*/ + + diff --git a/sw/source/ui/shells/textidx.cxx b/sw/source/ui/shells/textidx.cxx new file mode 100644 index 0000000000..644a128216 --- /dev/null +++ b/sw/source/ui/shells/textidx.cxx @@ -0,0 +1,437 @@ +/************************************************************************* + * + * $RCSfile: textidx.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:47 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +#ifdef PRECOMPILED +#include "ui_pch.hxx" +#endif + +#pragma hdrstop +#include <hintids.hxx> +#include <uiparam.hxx> +#ifndef _MSGBOX_HXX //autogen +#include <vcl/msgbox.hxx> +#endif +#ifndef _SFXREQUEST_HXX //autogen +#include <sfx2/request.hxx> +#endif +#ifndef _SFXITEMSET_HXX //autogen +#include <svtools/itemset.hxx> +#endif +#ifndef _SFXVIEWFRM_HXX //autogen +#include <sfx2/viewfrm.hxx> +#endif +#ifndef _SFXSTRITEM_HXX //autogen +#include <svtools/stritem.hxx> +#endif + +#ifndef _OFF_APP_HXX //autogen +#include <offmgr/app.hxx> +#endif +#ifndef _SFXENUMITEM_HXX //autogen +#include <svtools/eitem.hxx> +#endif +#ifndef _SVX_SIZEITEM_HXX //autogen +#include <svx/sizeitem.hxx> +#endif +#ifndef _FMTFSIZE_HXX //autogen +#include <fmtfsize.hxx> +#endif +#ifndef _FLDBAS_HXX +#include <fldbas.hxx> +#endif + +#include "viewopt.hxx" +#include "cmdid.h" +#include "view.hxx" +#include "wrtsh.hxx" +#include "swundo.hxx" // fuer Undo-Ids +#include "textsh.hxx" +#include "idx.hxx" +#include "idxmrk.hxx" +#include "multmrk.hxx" +#include "usridx.hxx" +#include "cnttab.hxx" +#include "toxmgr.hxx" + +// STATIC DATA ----------------------------------------------------------- + +void SwTextShell::ExecIdx(SfxRequest &rReq) +{ + const SfxItemSet *pArgs = rReq.GetArgs(); + const SfxPoolItem* pItem = 0; + USHORT nSlot = rReq.GetSlot(); + if(pArgs) + pArgs->GetItemState(nSlot, FALSE, &pItem ); + + SfxViewFrame* pVFrame = GetView().GetViewFrame(); + Window *pMDI = &pVFrame->GetWindow(); + + switch( nSlot ) + { + case FN_EDIT_AUTH_ENTRY_DLG : + { + SwAuthMarkModalDlg* pDlg = new SwAuthMarkModalDlg(pMDI, GetShell()); + pDlg->Execute(); + delete pDlg; + } + break; + case FN_INSERT_AUTH_ENTRY_DLG: + { + // no BASIC support + pVFrame->ToggleChildWindow(FN_INSERT_AUTH_ENTRY_DLG); + + SwInsertAuthMarkWrapper *pAuthMrk = (SwInsertAuthMarkWrapper*) + pVFrame->GetChildWindow(FN_INSERT_AUTH_ENTRY_DLG); + + Invalidate(rReq.GetSlot()); + } + break; + case FN_INSERT_IDX_ENTRY_DLG: + { + pVFrame->ToggleChildWindow(FN_INSERT_IDX_ENTRY_DLG); + Invalidate(rReq.GetSlot()); + } + break; + case FN_EDIT_IDX_ENTRY_DLG: + { + SwTOXMgr aMgr(GetShellPtr()); + USHORT nRet = RET_OK; + if(aMgr.GetTOXMarkCount() > 1) + { // Mehrere Marken, welche solls denn sein ? + // + SwMultiTOXMarkDlg* pMultDlg = new SwMultiTOXMarkDlg(pMDI, aMgr); + nRet = pMultDlg->Execute(); + delete pMultDlg; + } + if( nRet == RET_OK) + { + SwIndexMarkModalDlg* pDlg = new SwIndexMarkModalDlg(pMDI, GetShell()); + pDlg->Execute(); + delete pDlg; + } + break; + } + case FN_IDX_MARK_TO_IDX: + { + GetShell().GotoTOXMarkBase(); + break; + } + case FN_INSERT_MULTI_TOX: + { + SfxItemSet aSet(GetPool(), + RES_COL, RES_COL, + RES_BACKGROUND, RES_BACKGROUND, + RES_FRM_SIZE, RES_FRM_SIZE, + SID_ATTR_PAGE_SIZE, SID_ATTR_PAGE_SIZE, + RES_LR_SPACE, RES_LR_SPACE, + FN_PARAM_TOX_TYPE, FN_PARAM_TOX_TYPE, + 0 ); + SwWrtShell& rSh = GetShell(); + SwRect aRect; + rSh.CalcBoundRect(aRect, FLY_IN_CNTNT); + + long nWidth = aRect.Width(); + aSet.Put(SwFmtFrmSize(ATT_VAR_SIZE, nWidth)); + // Hoehe=Breite fuer konsistentere Vorschau (analog zu Bereich bearbeiten) + aSet.Put(SvxSizeItem(SID_ATTR_PAGE_SIZE, Size(nWidth, nWidth))); + const SwTOXBase* pCurTOX = rSh.GetCurTOX(); + if(pCurTOX) + { + const SfxItemSet* pSet = pCurTOX->GetAttrSet(); + if(pSet) + aSet.Put(*pSet); + } + + SwMultiTOXTabDialog* pDlg = new SwMultiTOXTabDialog(pMDI, aSet, rSh, pCurTOX); + pDlg->Execute(); + delete pDlg; + } + break; + case FN_REMOVE_CUR_TOX: + { + SwWrtShell& rSh = GetShell(); + const SwTOXBase* pBase = rSh.GetCurTOX(); + DBG_ASSERT(pBase, "no TOXBase to remove") + if( pBase ) + rSh.DeleteTOX(*pBase, TRUE); + } + break; + default: + ASSERT(!this, falscher Dispatcher); + return; + } +} + + +void SwTextShell::GetIdxState(SfxItemSet &rSet) +{ + SwWrtShell& rSh = GetShell(); + SfxViewFrame* pVFrame = GetView().GetViewFrame(); + SwInsertIdxMarkWrapper *pIdxMrk = (SwInsertIdxMarkWrapper*) + pVFrame->GetChildWindow(FN_INSERT_IDX_ENTRY_DLG); + + SfxChildWindow* pAuthMark = pVFrame->GetChildWindow(FN_INSERT_AUTH_ENTRY_DLG); + + const BOOL bHtmlMode = 0 != ::GetHtmlMode( GetView().GetDocShell() ); + const SwTOXBase* pBase = 0; + if( bHtmlMode || 0 != ( pBase = rSh.GetCurTOX()) ) + { + USHORT nBase = 0; + if( pBase ) + { + if(pBase->IsTOXBaseInReadonly()) + { + rSet.DisableItem( FN_INSERT_MULTI_TOX ); + } + } + + rSet.DisableItem( FN_EDIT_IDX_ENTRY_DLG ); + rSet.DisableItem( FN_EDIT_AUTH_ENTRY_DLG ); + + if(!pIdxMrk) + rSet.DisableItem( FN_INSERT_IDX_ENTRY_DLG ); + else + rSet.Put(SfxBoolItem(FN_INSERT_IDX_ENTRY_DLG, TRUE)); + + if(!pAuthMark) + rSet.DisableItem( FN_INSERT_AUTH_ENTRY_DLG ); + else + rSet.Put(SfxBoolItem(FN_INSERT_AUTH_ENTRY_DLG, TRUE)); + + } + else //if( SFX_ITEM_UNKNOWN != rSet.GetItemState( FN_EDIT_IDX_ENTRY_DLG )) + { + + BOOL bEnableEdit = TRUE; + BOOL bInReadonly = rSh.HasReadonlySel(); + if( rSh.HasSelection() || bInReadonly) + bEnableEdit = FALSE; + else + { + SwTOXMarks aArr; + rSh.GetCurTOXMarks( aArr ); + if( !aArr.Count()) + bEnableEdit = FALSE; + } + + if(!bEnableEdit) + rSet.DisableItem( FN_EDIT_IDX_ENTRY_DLG ); + + if(bInReadonly) + { + rSet.DisableItem(FN_INSERT_IDX_ENTRY_DLG); + rSet.DisableItem( FN_INSERT_MULTI_TOX ); + } + else + rSet.Put(SfxBoolItem(FN_INSERT_IDX_ENTRY_DLG, + 0 != pIdxMrk)); + + + SwField* pField = rSh.GetCurFld(); + + if(bInReadonly) + rSet.DisableItem(FN_INSERT_AUTH_ENTRY_DLG); + else + rSet.Put(SfxBoolItem(FN_INSERT_AUTH_ENTRY_DLG, 0 != pAuthMark)); + + if( bInReadonly || !pField || + pField->GetTyp()->Which() != RES_AUTHORITY) + rSet.DisableItem(FN_EDIT_AUTH_ENTRY_DLG); + rSet.DisableItem(FN_REMOVE_CUR_TOX); + } +} + +// ----------------------------------------------------------------------- +/*------------------------------------------------------------------------ + + $Log: not supported by cvs2svn $ + Revision 1.42 2000/09/18 16:06:06 willem.vandorp + OpenOffice header added. + + Revision 1.41 2000/09/08 08:12:52 os + Change: Set/Toggle/Has/Knows/Show/GetChildWindow + + Revision 1.40 2000/05/26 07:21:33 os + old SW Basic API Slots removed + + Revision 1.39 2000/02/11 14:57:51 hr + #70473# changes for unicode ( patched by automated patchtool ) + + Revision 1.38 2000/01/17 13:33:00 os + #70703# apply to all similar texts: search options case sensitive and word only + + Revision 1.37 1999/12/10 15:17:04 os + #70711# readonly check for index entries now in GetIdxState + + Revision 1.36 1999/10/15 11:44:08 os + new: FN_REMOVE_TOX + + Revision 1.35 1999/10/06 12:15:01 os + edit tox entry dialogs now modal + + Revision 1.34 1999/09/15 13:57:53 os + dialog for authorities + + Revision 1.33 1999/09/08 12:43:18 os + GetIdxState corrected + + Revision 1.32 1999/09/07 13:55:52 os + Insert/EditIndexEntry as FloatingWindow + + Revision 1.31 1999/08/25 13:27:20 OS + extended indexes: remove old code + + + Rev 1.30 25 Aug 1999 15:27:20 OS + extended indexes: remove old code + + Rev 1.29 23 Aug 1999 09:51:52 OS + extended indexes: InsertTOXMark simplified + + Rev 1.28 17 Aug 1999 13:59:02 OS + extended indexes: get/set section attributes + + Rev 1.27 30 Jul 1999 13:14:36 OS + indexes: check readonly in status method + + Rev 1.26 07 Jul 1999 08:13:46 OS + extended indexes: SwTOXMgr interface changed + + Rev 1.25 02 Jul 1999 11:07:50 OS + extended indexes: smaller interface SwTOXMgr + + Rev 1.24 21 Jun 1999 10:00:52 OS + extended indexes + + Rev 1.23 29 Mar 1999 14:37:24 OS + #63929# Range fuer ItemSet festlegen + + Rev 1.22 29 Mar 1999 12:19:30 OS + #63929# neuer Verzeichnisdialog vollstaendig + + Rev 1.21 26 Mar 1999 11:38:26 OS + #63929# Neuer Verzeichnisdialog + + Rev 1.20 20 Jan 1999 11:35:58 OS + #60881# Verzeichniseintraege mehrfach einf?gen + + Rev 1.19 24 Nov 1997 09:47:10 MA + includes + + Rev 1.18 03 Nov 1997 13:55:44 MA + precomp entfernt + + Rev 1.17 05 Sep 1997 13:36:00 OS + pBase initialisieren, Rahmenslektion schliesst TextShell aus + + Rev 1.16 28 Aug 1997 19:48:02 JP + GetIdxState: optimiert, im Verzeichnis InsertEntry abklemmen + + Rev 1.15 23 Jul 1997 21:28:56 HJS + includes + + Rev 1.14 07 Jul 1997 09:39:34 OS + fuer Userverzeichnisse aus Vorlagen muss immer ein Strin uebergeben werden + + Rev 1.13 03 Jul 1997 09:16:42 JP + FN_INSERT_CNTNTIDX_ENTRY: Level auf 1 defaulten + + Rev 1.12 16 Jun 1997 12:02:26 OS + Verzeichnisfunktionen und -dialoge ohne Record-Flag + + Rev 1.11 07 Apr 1997 17:44:46 MH + chg: header + + Rev 1.10 27 Jan 1997 16:30:36 OS + HtmlMode entfernt + + Rev 1.9 11 Dec 1996 10:50:56 MA + Warnings + + Rev 1.8 23 Nov 1996 13:24:46 OS + im HtmlMode Verzeichnis einfuegen disabled + + Rev 1.7 24 Oct 1996 20:59:38 JP + State: bei Selektion darf kein VerzeichnisEintrag bearbeitet werden + + Rev 1.6 09 Sep 1996 21:16:28 MH + Umstellungen wg. internal Compiler Errors + + Rev 1.5 28 Aug 1996 15:54:52 OS + includes + + Rev 1.4 07 Jun 1996 09:12:44 OS + CreateForm fuer Inhaltsverzeichnis abgesichert Bug #28429# + + Rev 1.3 03 Jun 1996 10:18:06 OS + vohandene Verzeichnisse beim Einfuegen updaten (Basic) Bug #28233# + + Rev 1.2 22 Mar 1996 15:29:32 TRI + sfxiiter.hxx included + + Rev 1.1 30 Nov 1995 15:09:58 OM + Segs + + Rev 1.0 30 Nov 1995 14:26:00 OM + Initial revision. + +------------------------------------------------------------------------*/ + diff --git a/sw/source/ui/shells/textsh.cxx b/sw/source/ui/shells/textsh.cxx new file mode 100644 index 0000000000..ad6904956d --- /dev/null +++ b/sw/source/ui/shells/textsh.cxx @@ -0,0 +1,1043 @@ +/************************************************************************* + * + * $RCSfile: textsh.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:47 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +#ifdef PRECOMPILED +#include "ui_pch.hxx" +#endif + +#pragma hdrstop + +#define _SW_FRMVALID_HXX +#ifndef _HINTIDS_HXX +#include <hintids.hxx> +#endif +#ifndef _UIPARAM_HXX +#include <uiparam.hxx> +#endif + + +#ifndef __RSC //autogen +#include <tools/errinf.hxx> +#endif +#ifndef _SVDVIEW_HXX //autogen +#include <svx/svdview.hxx> +#endif +#ifndef _OFF_APP_HXX //autogen +#include <offmgr/app.hxx> +#endif +#ifndef _PLUGIN_HXX //autogen wg. SvPlugInObject +#include <so3/plugin.hxx> +#endif +#ifndef _SFXPTITEM_HXX //autogen +#include <svtools/ptitem.hxx> +#endif +#ifndef _SFXSTRITEM_HXX //autogen +#include <svtools/stritem.hxx> +#endif +#ifndef _SFXMSG_HXX //autogen +#include <sfx2/msg.hxx> +#endif +#ifndef _MSGBOX_HXX //autogen +#include <vcl/msgbox.hxx> +#endif +#ifndef _SFX_FCONTNR_HXX //autogen +#include <sfx2/fcontnr.hxx> +#endif +#ifndef _SVX_HLNKITEM_HXX //autogen +#include <svx/hlnkitem.hxx> +#endif +#ifndef _SBASLTID_HRC //autogen +#include <offmgr/sbasltid.hrc> +#endif +#ifndef _SVX_SRCHITEM_HXX //autogen +#include <svx/srchitem.hxx> +#endif +#ifndef _SVX_CHARMAP_HXX //autogen +#include <svx/charmap.hxx> +#endif +#ifndef _SFXDISPATCH_HXX //autogen +#include <sfx2/dispatch.hxx> +#endif +#ifndef _SFX_DOCFILT_HACK_HXX //autogen +#include <sfx2/docfilt.hxx> +#endif +#ifndef _SFXDOCFILE_HXX //autogen +#include <sfx2/docfile.hxx> +#endif +#ifndef SVTOOLS_URIHELPER_HXX +#include <svtools/urihelper.hxx> +#endif +#ifndef __SBX_SBXVARIABLE_HXX //autogen +#include <svtools/sbxvar.hxx> +#endif +#ifndef _SFX_WHITER_HXX //autogen +#include <svtools/whiter.hxx> +#endif +#ifndef _SFXREQUEST_HXX //autogen +#include <sfx2/request.hxx> +#endif +#ifndef _SVX_OPAQITEM_HXX //autogen +#include <svx/opaqitem.hxx> +#endif +#ifndef _SVX_FONTITEM_HXX //autogen +#include <svx/fontitem.hxx> +#endif +#ifndef _SVX_ADJITEM_HXX //autogen +#include <svx/adjitem.hxx> +#endif +#ifndef _SVX_BOXITEM_HXX //autogen +#include <svx/boxitem.hxx> +#endif +#ifndef _SVX_SIZEITEM_HXX //autogen +#include <svx/sizeitem.hxx> +#endif +#ifndef _MySVXACORR_HXX +#include <svx/svxacorr.hxx> +#endif +#ifndef _FILTER_HXX //autogen +#include <svtools/filter.hxx> +#endif +#ifndef SMDLL_HXX +#include <starmath/smdll0.hxx> +#endif +#ifndef _SCHDLL0_HXX +#include <sch/schdll0.hxx> +#endif +#ifndef _SCH_DLL_HXX +#include <sch/schdll.hxx> +#endif +#ifndef _SCH_MEMCHRT_HXX +#include <sch/memchrt.hxx> +#endif +#ifndef _SIMDLL_HXX +#include <sim2/simdll0.hxx> +#endif +#ifndef _SVX_HTMLMODE_HXX +#include <svx/htmlmode.hxx> +#endif +#ifndef _SVX_PFILEDLG_HXX //autogen wg. SvxPluginFileDlg +#include <svx/pfiledlg.hxx> +#endif +#ifndef _OFA_HTMLCFG_HXX //autogen +#include <offmgr/htmlcfg.hxx> +#endif +#ifndef _OFAACCFG_HXX //autogen +#include <offmgr/ofaaccfg.hxx> +#endif + +#ifndef _SWWDOCSH_HXX //autogen +#include <wdocsh.hxx> +#endif +#ifndef _FMTINFMT_HXX //autogen +#include <fmtinfmt.hxx> +#endif +#ifndef _FMTCLDS_HXX //autogen +#include <fmtclds.hxx> +#endif +#ifndef _FMTSRND_HXX //autogen +#include <fmtsrnd.hxx> +#endif +#ifndef _FMTFSIZE_HXX //autogen +#include <fmtfsize.hxx> +#endif +#ifndef _SWMODULE_HXX +#include <swmodule.hxx> +#endif +#ifndef _WRTSH_HXX +#include <wrtsh.hxx> +#endif +#ifndef _VIEW_HXX +#include <view.hxx> +#endif +#ifndef _DOCSH_HXX +#include <docsh.hxx> +#endif +#ifndef _UITOOL_HXX +#include <uitool.hxx> +#endif +#ifndef _CMDID_H +#include <cmdid.h> +#endif +#ifndef _GLOBALS_HRC +#include <globals.hrc> +#endif +#ifndef _FRMMGR_HXX +#include <frmmgr.hxx> +#endif +#ifndef _TEXTSH_HXX +#include <textsh.hxx> +#endif +#ifndef _INSTABLE_HXX +#include <instable.hxx> +#endif +#ifndef _FRMFMT_HXX +#include <frmfmt.hxx> +#endif +#ifndef _TABLEMGR_HXX +#include <tablemgr.hxx> +#endif +#ifndef _SWUNDO_HXX +#include <swundo.hxx> // fuer Undo-IDs +#endif +#ifndef _SHELLIO_HXX +#include <shellio.hxx> +#endif +#ifndef _FRMDLG_HXX +#include <frmdlg.hxx> +#endif +#ifndef _USRPREF_HXX +#include <usrpref.hxx> +#endif +#ifndef _SWTABLE_HXX +#include <swtable.hxx> +#endif +#ifndef _TBLAFMT_HXX +#include <tblafmt.hxx> +#endif +#ifndef _INSRULE_HXX +#include <insrule.hxx> +#endif +#ifndef _CAPTION_HXX +#include <caption.hxx> +#endif +#ifndef _IDXMRK_HXX +#include <idxmrk.hxx> +#endif +#ifndef _POOLFMT_HXX +#include <poolfmt.hxx> +#endif + +#ifndef _SHELLS_HRC +#include <shells.hrc> +#endif +#ifndef _POPUP_HRC +#include <popup.hrc> +#endif +#ifndef _SWERROR_H +#include <swerror.h> +#endif +#ifndef _MODOPT_HXX //autogen +#include <modcfg.hxx> +#endif +#ifndef _COLUMN_HXX +#include <column.hxx> +#endif + +#define SwTextShell +#define Paragraph +#define HyphenZone +#define TextFont +#define DropCap +#ifndef _ITEMDEF_HXX +#include <itemdef.hxx> +#endif +#ifndef _SWSLOTS_HXX +#include <swslots.hxx> +#endif + +#define C2S(cChar) UniString::CreateFromAscii(cChar) + +/*-------------------------------------------------------------------- + Beschreibung: + --------------------------------------------------------------------*/ + +SFX_IMPL_INTERFACE(SwTextShell, SwBaseShell, SW_RES(STR_SHELLNAME_TEXT)) +{ + SFX_POPUPMENU_REGISTRATION(SW_RES(MN_TEXT_POPUPMENU)); + SFX_OBJECTBAR_REGISTRATION(SFX_OBJECTBAR_OBJECT, SW_RES(RID_TEXT_TOOLBOX)); + SFX_OBJECTMENU_REGISTRATION(SID_OBJECTMENU0, SW_RES(MN_OBJECTMENU_TEXT)); + SFX_CHILDWINDOW_REGISTRATION(FN_EDIT_FORMULA); + SFX_CHILDWINDOW_REGISTRATION(SID_INSERT_DIAGRAM); + SFX_CHILDWINDOW_REGISTRATION(FN_INSERT_FIELD); + SFX_CHILDWINDOW_REGISTRATION(FN_INSERT_IDX_ENTRY_DLG); + SFX_CHILDWINDOW_REGISTRATION(FN_INSERT_AUTH_ENTRY_DLG); +} + + + +TYPEINIT1(SwTextShell,SwBaseShell) + + + +void SwTextShell::ExecInsert(SfxRequest &rReq) +{ + SwWrtShell &rSh = GetShell(); + + ASSERT( !rSh.IsObjSelected() && !rSh.IsFrmSelected(), + "Falsche Shell auf dem Dispatcher" ); + + const SfxItemSet *pArgs = rReq.GetArgs(); + const SfxPoolItem* pItem = 0; + USHORT nSlot = rReq.GetSlot(); + if(pArgs) + pArgs->GetItemState(nSlot, FALSE, &pItem ); + + switch( nSlot ) + { + case FN_INSERT_SOFT_HYPHEN: + if( CHAR_SOFTHYPHEN != rSh.SwCrsrShell::GetChar( TRUE, 0 ) && + CHAR_SOFTHYPHEN != rSh.SwCrsrShell::GetChar( TRUE, -1 )) + rSh.Insert( String( CHAR_SOFTHYPHEN ) ); + break; + + case FN_INSERT_HARDHYPHEN: + case FN_INSERT_HARD_SPACE: + { + sal_Unicode cIns = FN_INSERT_HARD_SPACE == nSlot ? CHAR_HARDBLANK + : CHAR_HARDHYPHEN; + + SvxAutoCorrect* pACorr = OFF_APP()->GetAutoCorrConfig()->GetAutoCorrect(); + if( pACorr && pACorr->IsAutoCorrFlag( CptlSttSntnc | CptlSttWrd | + ChgFractionSymbol | ChgOrdinalNumber | + ChgToEnEmDash | SetINetAttr | Autocorrect )) + rSh.AutoCorrect( *pACorr, cIns ); + else + rSh.Insert( String( cIns ) ); + } + break; + + case FN_INSERT_BREAK: + rSh.SplitNode(); + break; + case FN_INSERT_PAGEBREAK: + rSh.InsertPageBreak(); + break; + case FN_INSERT_LINEBREAK: + rSh.InsertLineBreak(); + break; + case FN_INSERT_COLUMN_BREAK: + rSh.InsertColumnBreak(); + break; + case SID_HYPERLINK_SETLINK: + if (pItem) + InsertHyperlink(*((const SvxHyperlinkItem *)pItem)); + break; + case SID_INSERT_SOUND: + case SID_INSERT_VIDEO: + { + SvxPluginFileDlg aDlg( &GetView().GetViewFrame()->GetWindow(), nSlot ); + + if ( RET_OK == aDlg.Execute() ) + { + // URL ermitteln + String aStrURL( aDlg.GetPath() ); + aStrURL = URIHelper::SmartRelToAbs( aStrURL ); + + INetURLObject* pURL = new INetURLObject(); + pURL->SetSmartProtocol( INET_PROT_FILE ); + + if ( pURL->SetURL( aStrURL, INetURLObject::WAS_ENCODED ) ) + { + SvFactory * pFactory = SvFactory::GetDefaultPlugInFactory(); + SvStorageRef aStor = new SvStorage( aEmptyStr, STREAM_STD_READWRITE ); + SvPlugInObjectRef xObj = &pFactory->CreateAndInit( *pFactory, aStor ); + xObj->SetPlugInMode( (USHORT)PLUGIN_EMBEDED ); + xObj->SetURL( *pURL ); + SvPlugInObject* pObj = &xObj; + SvInPlaceObjectRef *pxIns = new SvInPlaceObjectRef(pObj); + rSh.Insert( pxIns, 0, TRUE, nSlot); + } + } + } + break; + case SID_INSERT_OBJECT: + case SID_INSERT_PLUGIN: + case SID_INSERT_APPLET: + case SID_INSERT_FLOATINGFRAME: + rSh.Insert( (SvInPlaceObjectRef*)0, 0, TRUE, nSlot); + break; + + case SID_INSERT_DIAGRAM: + { + if ( !SFX_APP()->HasFeature( SFX_FEATURE_SCHART ) ) + break; + if(!rReq.IsAPI()) + { + SfxViewFrame* pVFrame = GetView().GetViewFrame(); + pVFrame->ToggleChildWindow( SID_INSERT_DIAGRAM ); + } + else + { + const SwFrmFmt* pTFmt = rSh.GetTableFmt(); + if( pTFmt && !rSh.IsTblComplexForChart() ) + { + SchMemChart* pData = 0; + rSh.UpdateChartData( pTFmt->GetName(), pData ); + + SwTableFUNC( &rSh, FALSE ).InsertChart( *pData ); + rSh.LaunchOLEObj(); + + delete pData; + } + else + { + rSh.Insert( 0, SCH_MOD()->pSchChartDocShellFactory ); + } + SvInPlaceObjectRef xOLE = rSh.GetOLEObj(); + if(pItem && xOLE.Is()) + { + Size aSize(((SvxSizeItem*)pItem)->GetSize()); + aSize = OutputDevice::LogicToLogic + ( aSize, MapMode( MAP_TWIP ), MapMode( MAP_100TH_MM ) ); + + if(aSize.Width() > MINLAY&& aSize.Height()> MINLAY) + { + Rectangle aRect = xOLE->GetVisArea(); + aRect.SetSize(aSize); + xOLE->SetVisArea( aRect ); + } + } + } + } + break; + + case FN_INSERT_SIM: + { + rSh.Insert( 0, SIM_MOD()->pSimDrawDocShellFactory ); + } + break; + + case FN_INSERT_SMA: + { + rSh.Insert( 0, SM_MOD()->pSmDocShellFactory ); + } + break; + + case FN_INSERT_TABLE: + if( !rSh.GetTableFmt() && !(rSh.GetFrmType(0,TRUE) & FRMTYPE_FOOTNOTE)) + { + SwView &rView = GetView(); // Da GetView() nach Shellwechsel nicht mehr geht + BOOL bHTMLMode = 0 != (::GetHtmlMode(rView.GetDocShell())&HTMLMODE_ON); + BOOL bCallEndUndo = FALSE; + + if( !pArgs && rSh.IsSelection() && !rSh.IsInClickToEdit() ) + { + const SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig(); + USHORT nInsTblFlags = pModOpt->GetInsTblFlags(bHTMLMode); + + rSh.StartUndo(UNDO_INSTABLE); + bCallEndUndo = TRUE; + + BOOL bInserted = rSh.TextToTable('\t', HORI_FULL, nInsTblFlags); + rSh.EnterStdMode(); + if (bInserted) + rView.AutoCaption(TABLE_CAP); + } + else + { + USHORT nCols = 0; + USHORT nRows = 0; + USHORT nInsTblFlags = ALL_TBL_INS_ATTR; + String aTableName; + SwTableAutoFmt* pTAFmt = 0; + + if( pArgs && pArgs->Count() >= 2 ) + { + nCols = ((SfxUInt16Item &)pArgs->Get(SID_ATTR_TABLE_COLUMN)).GetValue(); + nRows = ((SfxUInt16Item &)pArgs->Get(SID_ATTR_TABLE_ROW)).GetValue(); + + const SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig(); + nInsTblFlags = pModOpt->GetInsTblFlags(bHTMLMode); + } + + if( !nCols || !nRows ) + { + SwInsTableDlg *pDlg = new SwInsTableDlg(rView); + if( RET_OK == pDlg->Execute() ) + { + pDlg->GetValues( aTableName, nRows, nCols, nInsTblFlags, pTAFmt ); + } + delete pDlg; + } + + if( nCols && nRows ) + { + rSh.StartUndo(UNDO_INSTABLE); + bCallEndUndo = TRUE; + + rSh.StartAllAction(); + if( rSh.HasSelection() ) + rSh.DelRight(); + + rSh.InsertTable( nRows, nCols, HORI_FULL, nInsTblFlags, pTAFmt ); + rSh.MoveTable( fnTablePrev, fnTableStart ); + + if( aTableName.Len() && !rSh.GetTblStyle( aTableName ) ) + rSh.GetTableFmt()->SetName( aTableName ); + + rSh.EndAllAction(); + rView.AutoCaption(TABLE_CAP); + } + delete pTAFmt; + } + if( bCallEndUndo ) + rSh.EndUndo(UNDO_INSTABLE); // wegen moegl. Shellwechsel + } + break; + + case FN_INSERT_FRAME_INTERACT_NOCOL: + case FN_INSERT_FRAME_INTERACT: + { + USHORT nCols = 1; + if(FN_INSERT_FRAME_INTERACT_NOCOL != nSlot && + pArgs &&pArgs->GetItemState(SID_ATTR_COLUMNS, FALSE, &pItem) == SFX_ITEM_SET) + nCols = ((SfxUInt16Item *)pItem)->GetValue(); + GetView().InsFrmMode(nCols); + } + break; + case FN_INSERT_FRAME: + { + const int nSel = rSh.GetSelectionType(); + + BOOL bSingleCol = FALSE; + if( 0!= PTR_CAST(SwWebDocShell, GetView().GetDocShell()) ) + { + OfaHtmlOptions* pHtmlOpt = OFF_APP()->GetHtmlOptions(); + USHORT nExport = pHtmlOpt->GetExportMode(); + if( HTML_CFG_MSIE == nExport || + HTML_CFG_HTML32 == nExport || + HTML_CFG_MSIE_40 == nExport || + HTML_CFG_HTML32 == nExport ) + { + bSingleCol = TRUE; + } + + } + // Rahmen neu anlegen + SwFlyFrmAttrMgr aMgr( TRUE, GetShellPtr(), FRMMGR_TYPE_TEXT ); + static USHORT __READONLY_DATA aFrmAttrRange[] = + { + RES_FRMATR_BEGIN, RES_FRMATR_END-1, + SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER, + FN_GET_PRINT_AREA, FN_GET_PRINT_AREA, + SID_ATTR_PAGE_SIZE, SID_ATTR_PAGE_SIZE, + FN_SET_FRM_NAME, FN_SET_FRM_NAME, + SID_HTML_MODE, SID_HTML_MODE, + 0 + }; + + SfxItemSet aSet(GetPool(), aFrmAttrRange ); + aSet.Put(SfxUInt16Item(SID_HTML_MODE, ::GetHtmlMode(GetView().GetDocShell()))); + const SwRect &rPg = GetShell().GetAnyCurRect(RECT_PAGE); + SwFmtFrmSize aFrmSize(ATT_VAR_SIZE, rPg.Width(), rPg.Height()); + aFrmSize.SetWhich(GetPool().GetWhich(SID_ATTR_PAGE_SIZE)); + aSet.Put(aFrmSize); + + const SwRect &rPr = GetShell().GetAnyCurRect(RECT_PAGE_PRT); + SwFmtFrmSize aPrtSize(ATT_VAR_SIZE, rPr.Width(), rPr.Height()); + aPrtSize.SetWhich(GetPool().GetWhich(FN_GET_PRINT_AREA)); + aSet.Put(aPrtSize); + + aSet.Put(aMgr.GetAttrSet()); + aSet.SetParent( aMgr.GetAttrSet().GetParent() ); + + // Minimalgroesse in Spalten l”schen + SvxBoxInfoItem aBoxInfo((SvxBoxInfoItem &)aSet.Get(SID_ATTR_BORDER_INNER)); + aBoxInfo.SetMinDist(FALSE); + aSet.Put(aBoxInfo); + + SwFrmDlg* pDlg = new SwFrmDlg(GetView().GetViewFrame(), &GetView().GetViewFrame()->GetWindow(), aSet, TRUE); + + if(pDlg->Execute() && pDlg->GetOutputItemSet()) + { + GetShell().StartAllAction(); + GetShell().StartUndo(UNDO_INSERT); + + const SfxItemSet* pOutSet = pDlg->GetOutputItemSet(); + aMgr.SetAttrSet(*pOutSet); + + // beim ClickToEditFeld erst die Selektion loeschen + if( GetShell().IsInClickToEdit() ) + GetShell().DelRight(); + + aMgr.InsertFlyFrm(); + + + GetView().AutoCaption(FRAME_CAP); + GetShell().EndUndo(UNDO_INSERT); + GetShell().EndAllAction(); + } + + DELETEZ(pDlg); + break; + } + case FN_INSERT_HRULER: + { + String sPath; + BOOL bSimpleLine = FALSE; + BOOL bRet = FALSE; + Window* pParent = GetView().GetWindow(); + SwInsertGrfRulerDlg* pDlg = new SwInsertGrfRulerDlg( + pParent , + GetView().GetDocShell()); + // MessageBox fuer fehlende Grafiken + if(!pDlg->HasImages()) + InfoBox( pParent, SW_RES(MSG_NO_RULER)).Execute(); + if(RET_OK == pDlg->Execute()) + { + sPath = pDlg->GetGraphicName(); + bSimpleLine = pDlg->IsSimpleLine(); + } + delete pDlg; + rSh.StartAllAction(); + rSh.StartUndo(UIUNDO_INSERT_RULER); + if(bSimpleLine) + { + if(!(rSh.IsSttOfPara() && rSh.IsEndOfPara())) // kein leerer Absatz? + rSh.SplitNode( FALSE, FALSE ); // dann Platz schaffen + rSh.SplitNode( FALSE, FALSE ); + rSh.Left(); + rSh.SetTxtFmtColl( rSh.GetTxtCollFromPool( RES_POOLCOLL_HTML_HR )); + rSh.Right(); + bRet = TRUE; + } + else if(sPath.Len()) + { + if (!pFrmMgr) + pFrmMgr = new SwFlyFrmAttrMgr( TRUE, &rSh, FRMMGR_TYPE_GRF ); + // am FrmMgr muessen die richtigen Parameter eingestellt werden + + pFrmMgr->SetAnchor(FLY_IN_CNTNT); + + rSh.SplitNode( FALSE, FALSE ); + rSh.SplitNode( FALSE, FALSE ); + rSh.Left(); + rSh.SetAttr(SvxAdjustItem(SVX_ADJUST_CENTER,RES_PARATR_ADJUST )); + if(GRFILTER_OK == InsertGraphic(sPath, aEmptyStr, TRUE, 0, 0 )) + bRet = TRUE; + rSh.EnterStdMode(); + rSh.Right(); + DELETEZ(pFrmMgr); + } + rSh.EndAllAction(); + rSh.EndUndo(UIUNDO_INSERT_RULER); + rReq.SetReturnValue(SfxBoolItem(nSlot, bRet)); + } + break; + case FN_FORMAT_COLUMN : + { + SwColumnDlg* pColDlg = new SwColumnDlg(GetView().GetWindow(), rSh); + pColDlg->Execute(); + delete pColDlg; + } + break; + + case FN_SECTION_APPENDNODE: + rReq.SetReturnValue( SfxBoolItem( nSlot, rSh.AppendNodeInSection() )); + break; + + default: + ASSERT( !this, "falscher Dispatcher" ); + return; + } +} + + + +void SwTextShell::StateInsert( SfxItemSet &rSet ) +{ + USHORT nHtmlMode = ::GetHtmlMode(GetView().GetDocShell()); + SfxWhichIter aIter( rSet ); + SwWrtShell &rSh = GetShell(); + USHORT nWhich = aIter.FirstWhich(); + while ( nWhich ) + { + switch ( nWhich ) + { + case SID_INSERT_SOUND: + case SID_INSERT_VIDEO: + if ( GetShell().IsSelFrmMode() || + !SvxPluginFileDlg::IsAvailable( nWhich ) || + SFX_CREATE_MODE_EMBEDDED == GetView().GetDocShell()->GetCreateMode() ) + { + rSet.DisableItem( nWhich ); + } + break; + + case SID_INSERT_DIAGRAM: + if( !SFX_APP()->HasFeature( SFX_FEATURE_SCHART ) ) + { + rSet.DisableItem( nWhich ); + break; + } + + case FN_INSERT_SIM: + if( FN_INSERT_SIM == nWhich && + !SFX_APP()->HasFeature( SFX_FEATURE_SIMAGE ) ) + { + rSet.DisableItem( nWhich ); + break; + } + + case FN_INSERT_SMA: + if( FN_INSERT_SMA == nWhich && + !SFX_APP()->HasFeature( SFX_FEATURE_SMATH ) ) + { + rSet.DisableItem( nWhich ); + break; + } + + case SID_INSERT_FLOATINGFRAME: + case SID_INSERT_OBJECT: + case SID_INSERT_PLUGIN: + case SID_INSERT_APPLET: + { + SfxObjectCreateMode eMode = + GetView().GetDocShell()->GetCreateMode(); + + if( +#ifndef SOLAR_JAVA + nWhich == SID_INSERT_APPLET || +#endif + eMode == SFX_CREATE_MODE_EMBEDDED || + (nWhich == SID_INSERT_DIAGRAM && rSh.IsCrsrInTbl() && + rSh.IsTblComplexForChart() && + !GetView().GetViewFrame()->GetChildWindow( + SID_INSERT_DIAGRAM)) ) + rSet.DisableItem( nWhich ); + else if( GetShell().IsSelFrmMode()) + rSet.DisableItem( nWhich ); + else if(SID_INSERT_FLOATINGFRAME == nWhich && nHtmlMode&HTMLMODE_ON) + { + OfaHtmlOptions* pHtmlOpt = OFF_APP()->GetHtmlOptions(); + USHORT nExport = pHtmlOpt->GetExportMode(); + if(HTML_CFG_MSIE_40 != nExport && HTML_CFG_WRITER != nExport ) + rSet.DisableItem(nWhich); + } + } + break; + case FN_INSERT_FRAME_INTERACT_NOCOL : + case FN_INSERT_FRAME_INTERACT: + { + if ( GetShell().IsSelFrmMode() || + (0 != (nHtmlMode & HTMLMODE_ON) && 0 == (nHtmlMode & HTMLMODE_SOME_ABS_POS))) + rSet.DisableItem(nWhich); + } + break; + case SID_HYPERLINK_GETLINK: + { + SfxItemSet aSet(GetPool(), RES_TXTATR_INETFMT, RES_TXTATR_INETFMT); + rSh.GetAttr( aSet ); + + SvxHyperlinkItem aHLinkItem; + const SfxPoolItem* pItem; + if(SFX_ITEM_SET == aSet.GetItemState(RES_TXTATR_INETFMT, FALSE, &pItem)) + { + const SwFmtINetFmt* pINetFmt = (const SwFmtINetFmt*)pItem; + aHLinkItem.SetURL(pINetFmt->GetValue()); + aHLinkItem.SetTargetFrame(pINetFmt->GetTargetFrame()); + aHLinkItem.SetIntName(pINetFmt->GetName()); + const SvxMacro *pMacro = pINetFmt->GetMacro( SFX_EVENT_MOUSEOVER_OBJECT ); + if( pMacro ) + aHLinkItem.SetMacro(HYPERDLG_EVENT_MOUSEOVER_OBJECT, *pMacro); + + pMacro = pINetFmt->GetMacro( SFX_EVENT_MOUSECLICK_OBJECT ); + if( pMacro ) + aHLinkItem.SetMacro(HYPERDLG_EVENT_MOUSECLICK_OBJECT, *pMacro); + + pMacro = pINetFmt->GetMacro( SFX_EVENT_MOUSEOUT_OBJECT ); + if( pMacro ) + aHLinkItem.SetMacro(HYPERDLG_EVENT_MOUSEOUT_OBJECT, *pMacro); + + // Text des Links besorgen + rSh.StartAction(); + rSh.CreateCrsr(); + rSh.SwCrsrShell::SelectTxtAttr(RES_TXTATR_INETFMT,TRUE); + String sLinkName = rSh.GetSelTxt(); + aHLinkItem.SetName(sLinkName); + aHLinkItem.SetInsertMode(HLINK_FIELD); + rSh.DestroyCrsr(); + rSh.EndAction(); + } + else + { + String sReturn = rSh.GetSelTxt(); + sReturn.Erase(255); + sReturn.EraseTrailingChars(); + aHLinkItem.SetName(sReturn); + } + + aHLinkItem.SetInsertMode((SvxLinkInsertMode)(aHLinkItem.GetInsertMode() | + ((nHtmlMode & HTMLMODE_ON) != 0 ? HLINK_HTMLMODE : 0))); + aHLinkItem.SetMacroEvents ( HYPERDLG_EVENT_MOUSEOVER_OBJECT| + HYPERDLG_EVENT_MOUSECLICK_OBJECT | HYPERDLG_EVENT_MOUSEOUT_OBJECT ); + + rSet.Put(aHLinkItem); + } + break; + + case FN_INSERT_FRAME: + if(rSh.IsSelFrmMode()) + { + const int nSel = rSh.GetSelectionType(); + if( (SwWrtShell::SEL_GRF | SwWrtShell::SEL_OLE ) & nSel ) + rSet.DisableItem(nWhich); + } + break; + case FN_INSERT_HRULER : + if(rSh.IsReadOnlyAvailable() && rSh.HasReadonlySel() ) + rSet.DisableItem(nWhich); + break; + + case FN_SECTION_APPENDNODE: + if( !rSh.CanInsertNodeAtEndOfSection() ) + rSet.DisableItem(nWhich); + break; + } + nWhich = aIter.NextWhich(); + } +} + +/*-------------------------------------------------------------------- + Beschreibung: + --------------------------------------------------------------------*/ + +void SwTextShell::ExecDelete(SfxRequest &rReq) +{ + SwWrtShell &rSh = GetShell(); + switch( rReq.GetSlot() ) + { + case FN_DELETE_SENT: + if( rSh.IsTableMode() ) + { + rSh.DeleteRow(); + rSh.EnterStdMode(); + } + else + rSh.DelToEndOfSentence(); + break; + case FN_DELETE_BACK_SENT: + rSh.DelToStartOfSentence(); + break; + case FN_DELETE_WORD: + rSh.DelNxtWord(); + break; + case FN_DELETE_BACK_WORD: + rSh.DelPrvWord(); + break; + case FN_DELETE_LINE: + rSh.DelToEndOfLine(); + break; + case FN_DELETE_BACK_LINE: + rSh.DelToStartOfLine(); + break; + case FN_DELETE_PARA: + rSh.DelToEndOfPara(); + break; + case FN_DELETE_BACK_PARA: + rSh.DelToStartOfPara(); + break; + case FN_DELETE_WHOLE_LINE: + rSh.DelLine(); + break; + default: + ASSERT(!this, "falscher Dispatcher"); + return; + } +} + +/*-------------------------------------------------------------------- + Beschreibung: + --------------------------------------------------------------------*/ + + + +SwTextShell::SwTextShell(SwView &rView) : + SwBaseShell(rView), pPostItFldMgr( 0 ), pInsGrfSetPtr( 0 ) +{ + SetName(String::CreateFromAscii("Text")); + SetHelpId(SW_TEXTSHELL); +} + +/*-------------------------------------------------------------------- + Beschreibung: + --------------------------------------------------------------------*/ + +SwTextShell::~SwTextShell() +{ +} + +/*-------------------------------------------------------------------- + Beschreibung: + --------------------------------------------------------------------*/ + +void SwTextShell::InsertSymbol(const String& rChars, const String& rFontName) +{ + SwWrtShell &rSh = GetShell(); + String aChars( rChars ); + + SfxItemSet aSet( GetPool(), RES_CHRATR_FONT, RES_CHRATR_FONT ); + rSh.GetAttr( aSet ); + SvxFontItem aFont( (SvxFontItem &) aSet.Get( RES_CHRATR_FONT )); + Font aNewFont(rFontName, Size(1,1)); // Size nur wg. CTOR + + if( !rChars.Len() ) + { + // Eingestellten Font als Default + SvxCharacterMap* pDlg = new SvxCharacterMap(&GetView().GetViewFrame()->GetWindow(), FALSE); + + Font aDlgFont( pDlg->GetCharFont() ); + SwViewOption aOpt(*GetShell().GetViewOptions()); + String sSymbolFont = aOpt.GetSymbolFont(); + if(!rFontName.Len() && sSymbolFont.Len()) + aDlgFont.SetName(sSymbolFont); + else + aDlgFont.SetName( aFont.GetFamilyName() ); + + pDlg->SetCharFont( aDlgFont ); + + if( RET_OK == pDlg->Execute() ) + { + aChars = pDlg->GetCharacters(); + aNewFont = pDlg->GetCharFont(); + aOpt.SetSymbolFont(aNewFont.GetName()); + SW_MOD()->ApplyUsrPref(aOpt, &GetView()); + } + delete pDlg; + } + + if( aChars.Len() ) + { + rSh.StartAllAction(); + + // Selektierten Inhalt loeschen + rSh.StartUndo( UNDO_INSERT ); + if ( rSh.HasSelection() ) + { + rSh.DelRight(); + aSet.ClearItem(); + rSh.GetAttr( aSet ); + aFont = (SvxFontItem &) aSet.Get( RES_CHRATR_FONT ); + } + + // Zeichen einfuegen + rSh.Insert( aChars ); + + // Muss der Font geaendert werden + if( aNewFont.GetName() != aFont.GetFamilyName() ) + { + SvxFontItem aNewFontItem( aFont ); + aNewFontItem.GetFamilyName() = aNewFont.GetName(); + aNewFontItem.GetFamily() = aNewFont.GetFamily(); + aNewFontItem.GetPitch() = aNewFont.GetPitch(); + aNewFontItem.GetCharSet() = aNewFont.GetCharSet(); + aSet.Put(aNewFontItem); + + rSh.SetMark(); + rSh.ExtendSelection( FALSE, aChars.Len() ); + rSh.SetAttr( aSet, SETATTR_DONTEXPAND | SETATTR_NOFORMATATTR ); + if( !rSh.IsCrsrPtAtEnd() ) + rSh.SwapPam(); + rSh.ClearMark(); + rSh.UpdateAttr(); + } + + rSh.EndAllAction(); + rSh.EndUndo( UNDO_INSERT ); + } +} + + +/*------------------------------------------------------------------------ + + $Log: not supported by cvs2svn $ + Revision 1.356 2000/09/18 16:06:06 willem.vandorp + OpenOffice header added. + + Revision 1.355 2000/09/08 08:12:52 os + Change: Set/Toggle/Has/Knows/Show/GetChildWindow + + Revision 1.354 2000/08/17 11:40:16 jp + remove the SW graphicmanager + + Revision 1.353 2000/08/07 20:40:21 jp + ExectInsert: don't insert a softhyphen behind/befor another sofhyphen + + Revision 1.352 2000/08/04 10:54:23 jp + Soft-/HardHyphens & HardBlanks changed from attribute to unicode character; remove unused methods + + Revision 1.351 2000/07/26 16:27:20 jp + Bug #77158#: remove the unused code + + Revision 1.350 2000/07/07 13:24:57 jp + must changes VCL + + Revision 1.349 2000/06/27 17:43:21 jp + Bug #76332#: internal SplitNode don't insert a new node before a table + + Revision 1.348 2000/06/26 13:17:56 os + INetURLObject::SmartRelToAbs removed + + Revision 1.347 2000/06/20 14:49:23 os + #70060# less occurences of columns in HTML + + Revision 1.346 2000/05/26 07:21:33 os + old SW Basic API Slots removed + + Revision 1.345 2000/05/10 11:53:02 os + Basic API removed + + Revision 1.344 2000/05/09 14:41:35 os + BASIC interface partially removed + +------------------------------------------------------------------------*/ + + diff --git a/sw/source/ui/shells/textsh1.cxx b/sw/source/ui/shells/textsh1.cxx new file mode 100644 index 0000000000..34a429abbc --- /dev/null +++ b/sw/source/ui/shells/textsh1.cxx @@ -0,0 +1,1154 @@ +/************************************************************************* + * + * $RCSfile: textsh1.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:47 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +#ifdef PRECOMPILED +#include "ui_pch.hxx" +#endif + +#pragma hdrstop + +#ifndef _HINTIDS_HXX +#include <hintids.hxx> +#endif +#ifndef _CMDID_H +#include <cmdid.h> +#endif +#ifndef _HELPID_H +#include <helpid.h> +#endif + +#ifndef _SFXSTRITEM_HXX +#include <svtools/stritem.hxx> +#endif +#ifndef _SVX_HTMLMODE_HXX //autogen +#include <svx/htmlmode.hxx> +#endif +#ifndef _SFX_WHITER_HXX //autogen +#include <svtools/whiter.hxx> +#endif +#ifndef _SFX_SAVEOPT_HXX //autogen +#include <sfx2/saveopt.hxx> +#endif +#ifndef _SFX_BINDINGS_HXX //autogen +#include <sfx2/bindings.hxx> +#endif +#ifndef _SFXDISPATCH_HXX //autogen +#include <sfx2/dispatch.hxx> +#endif +#ifndef _SFX_OBJITEM_HXX //autogen +#include <sfx2/objitem.hxx> +#endif +#ifndef _OFF_APP_HXX //autogen +#include <offmgr/app.hxx> +#endif +#ifndef _OFAACCFG_HXX //autogen +#include <offmgr/ofaaccfg.hxx> +#endif +#ifndef _MSGBOX_HXX //autogen +#include <vcl/msgbox.hxx> +#endif +#ifndef _SFXREQUEST_HXX //autogen +#include <sfx2/request.hxx> +#endif +#ifndef _SFXENUMITEM_HXX //autogen +#include <svtools/eitem.hxx> +#endif +#ifndef _SFXMACITEM_HXX +#include <svtools/macitem.hxx> +#endif +#ifndef _SVX_LRSPITEM_HXX //autogen +#include <svx/lrspitem.hxx> +#endif +#ifndef _SVX_ULSPITEM_HXX //autogen +#include <svx/ulspitem.hxx> +#endif +#ifndef _SVX_COLRITEM_HXX //autogen +#include <svx/colritem.hxx> +#endif +#ifndef _SVX_TSTPITEM_HXX //autogen +#include <svx/tstpitem.hxx> +#endif +#ifndef _SVX_BRSHITEM_HXX //autogen +#include <svx/brshitem.hxx> +#endif +#ifndef _MySVXACORR_HXX //autogen +#include <svx/svxacorr.hxx> +#endif + + +#ifndef _FMTINFMT_HXX //autogen +#include <fmtinfmt.hxx> +#endif +#ifndef _SWWAIT_HXX +#include <swwait.hxx> +#endif +#ifndef _WRTSH_HXX +#include <wrtsh.hxx> +#endif +#ifndef _WVIEW_HXX +#include <wview.hxx> +#endif +#ifndef _SWMODULE_HXX +#include <swmodule.hxx> +#endif +#ifndef _VIEWOPT_HXX +#include <viewopt.hxx> +#endif +#ifndef _UITOOL_HXX +#include <uitool.hxx> +#endif +#ifndef _UIPARAM_HXX +#include <uiparam.hxx> +#endif +#ifndef _SWEVENT_HXX +#include <swevent.hxx> +#endif +#ifndef _TEXTSH_HXX +#include <textsh.hxx> +#endif +#ifndef _BOOKMARK_HXX +#include <bookmark.hxx> +#endif +#ifndef _BOOKMRK_HXX +#include <bookmrk.hxx> +#endif +#ifndef _BREAK_HXX +#include <break.hxx> +#endif +#ifndef _DATAEX_HXX +#include <dataex.hxx> +#endif +#ifndef _DOCSTAT_HXX +#include <docstat.hxx> +#endif +#ifndef _INSFNOTE_HXX +#include <insfnote.hxx> +#endif +#ifndef _OUTLINE_HXX +#include <outline.hxx> +#endif +#ifndef _SRTDLG_HXX +#include <srtdlg.hxx> +#endif +#ifndef _TABLEMGR_HXX +#include <tablemgr.hxx> +#endif +#ifndef _SWUNDO_HXX +#include <swundo.hxx> // fuer Undo-IDs +#endif +#ifndef _AUTOFDLG_HXX +#include <autofdlg.hxx> +#endif +#ifndef _REFFLD_HXX +#include <reffld.hxx> +#endif +#ifndef _DOCSH_HXX +#include <docsh.hxx> +#endif +#ifndef _MDIEXP_HXX +#include <mdiexp.hxx> +#endif +#ifndef _INPUTWIN_HXX +#include <inputwin.hxx> +#endif +#ifndef _PARDLG_HXX +#include <pardlg.hxx> +#endif +#ifndef _CHRDLG_HXX +#include <chrdlg.hxx> +#endif +#ifndef _DOCFNOTE_HXX +#include <docfnote.hxx> +#endif +#ifndef _FRMATR_HXX +#include <frmatr.hxx> +#endif +#ifndef _FMTCOL_HXX +#include <fmtcol.hxx> +#endif +#ifndef _CELLATR_HXX +#include <cellatr.hxx> +#endif +#ifndef _EDTWIN_HXX +#include <edtwin.hxx> +#endif +#ifndef _REDLNDLG_HXX +#include <redlndlg.hxx> +#endif +#ifndef _REDLENUM_HXX +#include <redlenum.hxx> +#endif + +#ifndef _GLOBALS_HRC +#include <globals.hrc> +#endif +#ifndef _SHELLS_HRC +#include <shells.hrc> +#endif +#ifndef _APP_HRC +#include <app.hrc> +#endif +#ifndef _WEB_HRC +#include <web.hrc> +#endif + +/*-------------------------------------------------------------------- + Beschreibung: + --------------------------------------------------------------------*/ + +short lcl_AskRedlineMode(Window *pWin) +{ + MessBox aQBox( pWin, 0, + String( SW_RES( STR_REDLINE_TITLE ) ), + String( SW_RES( STR_REDLINE_MSG ) ) ); + aQBox.SetImage( QueryBox::GetStandardImage() ); + USHORT nBtnFlags = BUTTONDIALOG_DEFBUTTON | + BUTTONDIALOG_OKBUTTON | + BUTTONDIALOG_FOCUSBUTTON; + + aQBox.AddButton(String(SW_RES(STR_REDLINE_ACCEPT_ALL)), RET_OK, nBtnFlags); + 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 ); + aQBox.AddButton(String(SW_RES(STR_REDLINE_EDIT)), 2, 0); + aQBox.GetPushButton( 2 )->SetHelpId(HID_AUTOFORMAT_EDIT_CHG); + aQBox.SetButtonHelpText( RET_OK, aEmptyStr ); + + return aQBox.Execute(); +} + +/*-------------------------------------------------------------------- + Beschreibung: + --------------------------------------------------------------------*/ + +void SwTextShell::Execute(SfxRequest &rReq) +{ + const SfxItemSet *pArgs = rReq.GetArgs(); + SwWrtShell& rWrtSh = GetShell(); + const SfxPoolItem* pItem = 0; + USHORT nSlot = rReq.GetSlot(); + if(pArgs) + pArgs->GetItemState(GetPool().GetWhich(nSlot), FALSE, &pItem); + switch( nSlot ) + { + case FN_INSERT_SYMBOL: + InsertSymbol(aEmptyStr,aEmptyStr); + break; + case FN_INSERT_FOOTNOTE: + case FN_INSERT_ENDNOTE: + rWrtSh.InsertFootnote(aEmptyStr, nSlot == FN_INSERT_ENDNOTE); + break; + case FN_INSERT_FOOTNOTE_DLG: + { + SwInsFootNoteDlg *pDlg = new SwInsFootNoteDlg( + GetView().GetWindow(), rWrtSh, FALSE); + pDlg->SetHelpId(nSlot); + pDlg->Execute(); + delete pDlg; + } + break; + case FN_FORMAT_FOOTNOTE_DLG: + { + SwFootNoteOptionDlg *pDlg = new SwFootNoteOptionDlg(GetView().GetWindow(), rWrtSh); + pDlg->Execute(); + delete pDlg; + break; + } + case SID_INSERT_GRAPHIC: + if (!pItem) + { + rReq.SetReturnValue(SfxBoolItem(nSlot, InsertGraphicDlg())); + } + else + { + String rName = aEmptyStr; + BOOL bLink = FALSE; + + rName = ((const SfxStringItem *)pItem)->GetValue(); + + String rFilter = aEmptyStr; + if ( SFX_ITEM_SET == + pArgs->GetItemState(FN_PARAM_FILTER, TRUE, &pItem) ) + rFilter = ((const SfxStringItem *)pItem)->GetValue(); + + if ( SFX_ITEM_SET == + pArgs->GetItemState(FN_PARAM_1, TRUE, &pItem) ) + bLink = ((const SfxBoolItem *)pItem)->GetValue(); + + if ( !rName.Len() ) + rReq.SetReturnValue(SfxBoolItem(nSlot, InsertGraphicDlg())); + else + rReq.SetReturnValue(SfxBoolItem(nSlot, InsertGraphic( rName, rFilter, bLink ))); + } + break; + case SID_INSERTDOC: + if (!pItem) + rReq.SetReturnValue(SfxBoolItem(nSlot, GetView().InsertDoc(nSlot, aEmptyStr, aEmptyStr) != -1)); + else + { + String aFile = aEmptyStr; + String aFilter = aEmptyStr; + aFile = ((const SfxStringItem *)pItem)->GetValue(); + if(SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_1, TRUE, &pItem )) + aFilter = ((const SfxStringItem *)pItem)->GetValue(); + + rReq.SetReturnValue(SfxBoolItem(nSlot, GetView().InsertDoc( nSlot, aFile, aFilter ) != -1)); + } + break; + case FN_FORMAT_RESET: + rWrtSh.ResetAttr(); + break; + case FN_INSERT_BREAK_DLG: + { + SwBreakDlg *pDlg = new SwBreakDlg(GetView().GetWindow(), rWrtSh); + pDlg->Execute(); + delete pDlg; + } + break; + case FN_INSERT_BOOKMARK: + { + SwInsertBookmarkDlg *pDlg = new SwInsertBookmarkDlg( + GetView().GetWindow(), rWrtSh ); + pDlg->Execute(); + delete pDlg; + } + break; + case FN_AUTOFORMAT_REDLINE_APPLY: + { + SvxSwAutoFmtFlags aFlags(OFF_APP()->GetAutoCorrect()->GetSwFlags()); + // das muss fuer die Nachbearbeitung immer FALSE sein + aFlags.bAFmtByInput = FALSE; + aFlags.bWithRedlining = TRUE; + rWrtSh.AutoFormat( &aFlags ); + aFlags.bWithRedlining = FALSE; + + SfxViewFrame* pVFrame = GetView().GetViewFrame(); + if (pVFrame->HasChildWindow(FN_REDLINE_ACCEPT)) + pVFrame->ToggleChildWindow(FN_REDLINE_ACCEPT); + + SwModalRedlineAcceptDlg aDlg(&GetView().GetEditWin()); + + switch (lcl_AskRedlineMode(&GetView().GetEditWin())) + { + case RET_OK: + aDlg.AcceptAll(TRUE); + break; + + case RET_CANCEL: + aDlg.AcceptAll(FALSE); + break; + + case 2: + aDlg.Execute(); + break; + } + } + break; + + case FN_AUTOFORMAT_APPLY: + { + SvxSwAutoFmtFlags aFlags(OFF_APP()->GetAutoCorrect()->GetSwFlags()); + // das muss fuer die Nachbearbeitung immer FALSE sein + aFlags.bAFmtByInput = FALSE; + rWrtSh.AutoFormat( &aFlags ); + } + break; + case FN_AUTOFORMAT_AUTO: + { + OfaAutoCorrCfg* pACfg = OFF_APP()->GetAutoCorrConfig(); + BOOL bSet = pItem ? ((const SfxBoolItem*)pItem)->GetValue() + : !pACfg->IsAutoFmtByInput(); + if( bSet != pACfg->IsAutoFmtByInput() ) + pACfg->SetAutoFmtByInput( bSet ); + } + break; + case FN_AUTO_CORRECT: + { + // erstmal auf Blank defaulten + sal_Unicode cChar = ' '; + rWrtSh.AutoCorrect( *OFF_APP()->GetAutoCorrect(), cChar ); + } + break; + + case FN_SORTING_DLG: + { + SwSortDlg *pDlg = new SwSortDlg(GetView().GetWindow(), rWrtSh ); + pDlg->Execute(); + delete pDlg; + } + break; + case FN_NUMBERING_OUTLINE_DLG: + { + SfxItemSet aTmp(GetPool(), FN_PARAM_1, FN_PARAM_1); + SwOutlineTabDialog* pDlg = new SwOutlineTabDialog(GetView().GetWindow(), &aTmp, rWrtSh); + pDlg->Execute(); + delete pDlg; + } + break; + case FN_CALCULATE: + { + SwDataExchangeRef aRef( new SwDataExchange( rWrtSh ) ); + aRef->CalculateAndCopy(); + } + break; + case FN_GOTO_REFERENCE: + { + SwField *pFld = rWrtSh.GetCurFld(); + if(pFld && pFld->GetTypeId() == TYP_GETREFFLD) + { + rWrtSh.StartAllAction(); + rWrtSh.SwCrsrShell::GotoRefMark( ((SwGetRefField*)pFld)->GetSetRefName(), + ((SwGetRefField*)pFld)->GetSubType(), + ((SwGetRefField*)pFld)->GetSeqNo() ); + rWrtSh.EndAllAction(); + } + } + break; + case FN_EDIT_FORMULA: + { + rWrtSh.EndAllTblBoxEdit(); + SfxViewFrame* pVFrame = GetView().GetViewFrame(); + const USHORT nId = SwInputChild::GetChildWindowId(); + pVFrame->ToggleChildWindow( nId ); + if( !pVFrame->HasChildWindow( nId ) ) + pVFrame->GetBindings().InvalidateAll( TRUE ); + } + + break; + case FN_TABLE_UNSET_READ_ONLY: + { + rWrtSh.UnProtectTbls(); + } + break; + case FN_EDIT_HYPERLINK: + GetView().GetViewFrame()->ToggleChildWindow(SID_HYPERLINK_DIALOG); + break; + case FN_INSERT_HYPERLINK: + case SID_CHAR_DLG: + { + SwView* pView = GetActiveView(); + if(pView) + { + FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebView, pView)); + SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, eMetric)); + SfxItemSet aCoreSet( GetPool(), + RES_CHRATR_BEGIN, RES_CHRATR_END-1, + RES_TXTATR_INETFMT, RES_TXTATR_INETFMT, + RES_BACKGROUND, RES_BACKGROUND, + FN_PARAM_SELECTION, FN_PARAM_SELECTION, + SID_HTML_MODE, SID_HTML_MODE, + 0 ); + rWrtSh.GetAttr( aCoreSet ); + BOOL bSel = rWrtSh.HasSelection(); + BOOL bSelectionPutted = FALSE; + if(bSel || rWrtSh.IsInWord()) + { + if(!bSel) + { + rWrtSh.StartAction(); + rWrtSh.Push(); + if(!rWrtSh.SelectTxtAttr( RES_TXTATR_INETFMT )) + rWrtSh.SelWrd(); + } + aCoreSet.Put(SfxStringItem(FN_PARAM_SELECTION, rWrtSh.GetSelTxt())); + bSelectionPutted = TRUE; + if(!bSel) + { + rWrtSh.Pop(FALSE); + rWrtSh.EndAction(); + } + } + + // Das CHRATR_BACKGROUND-Attribut wird fuer den Dialog in + // ein RES_BACKGROUND verwandelt und wieder zurueck ... + const SfxPoolItem *pTmpBrush; + if( SFX_ITEM_SET == aCoreSet.GetItemState( RES_CHRATR_BACKGROUND, + TRUE, &pTmpBrush ) ) + { + SvxBrushItem aTmpBrush( *((SvxBrushItem*)pTmpBrush) ); + aTmpBrush.SetWhich( RES_BACKGROUND ); + aCoreSet.Put( aTmpBrush ); + } + + aCoreSet.Put(SfxUInt16Item(SID_HTML_MODE, + ::GetHtmlMode(GetView().GetDocShell()))); + SwCharDlg* pDlg = new SwCharDlg(GetView().GetWindow(), GetView(), aCoreSet); + if(FN_INSERT_HYPERLINK == nSlot) + pDlg->SetCurPageId(TP_CHAR_URL); + if (RET_OK == pDlg->Execute()) + { + SfxItemSet aTmpSet( *pDlg->GetOutputItemSet() ); + if( SFX_ITEM_SET == aTmpSet.GetItemState( RES_BACKGROUND, + FALSE, &pTmpBrush ) ) + { + SvxBrushItem aTmpBrush( *((SvxBrushItem*)pTmpBrush) ); + aTmpBrush.SetWhich( RES_CHRATR_BACKGROUND ); + aTmpSet.Put( aTmpBrush ); + } + aTmpSet.ClearItem( RES_BACKGROUND ); + + const SfxPoolItem* pItem; + BOOL bInsert = FALSE; + + // aus ungeklaerter Ursache ist das alte Item wieder im Set + if(!bSelectionPutted && SFX_ITEM_SET == aTmpSet.GetItemState(FN_PARAM_SELECTION, FALSE, &pItem)) + { + String sInsert = ((const SfxStringItem*)pItem)->GetValue(); + bInsert = sInsert.Len() != 0; + if(bInsert) + { + rWrtSh.StartAction(); + rWrtSh.Insert( sInsert ); + rWrtSh.SetMark(); + rWrtSh.ExtendSelection(FALSE, sInsert.Len()); + } + } + SwTxtFmtColl* pColl = rWrtSh.GetCurTxtFmtColl(); + if(bSel && + rWrtSh.IsSelFullPara() && + pColl && pColl->IsAutoUpdateFmt()) + { + rWrtSh.AutoUpdatePara(pColl, aTmpSet); + } + else + rWrtSh.SetAttr( aTmpSet ); + if(bInsert) + { + rWrtSh.SwapPam(); + rWrtSh.ClearMark(); + rWrtSh.DontExpandFmt(); + rWrtSh.EndAction(); + } + } + delete pDlg; + } + } + break; + case SID_PARA_DLG: + { + //Damit aus dem Basic keine Dialoge fuer Hintergrund-Views aufgerufen werden: + SwView* pView = GetActiveView(); + if(pView) + { + FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebView, pView)); + SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, eMetric)); + SfxItemSet aCoreSet( GetPool(), + RES_PARATR_BEGIN, RES_PARATR_END - 1, + RES_FRMATR_BEGIN, RES_FRMATR_END - 1, + SID_ATTR_TABSTOP_POS, SID_ATTR_TABSTOP_POS, + SID_ATTR_TABSTOP_DEFAULTS, SID_ATTR_TABSTOP_DEFAULTS, + SID_ATTR_TABSTOP_OFFSET, SID_ATTR_TABSTOP_OFFSET, + SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER, + SID_ATTR_PARA_MODEL, SID_ATTR_PARA_KEEP, + SID_ATTR_PARA_PAGENUM, SID_ATTR_PARA_PAGENUM, + SID_HTML_MODE, SID_HTML_MODE, + FN_PARAM_1, FN_PARAM_1, + FN_NUMBER_NEWSTART, FN_NUMBER_NEWSTART_AT, + 0); + rWrtSh.GetAttr( aCoreSet ); + aCoreSet.Put(SfxUInt16Item(SID_HTML_MODE, + ::GetHtmlMode(GetView().GetDocShell()))); + + // Tabulatoren, DefaultTabs ins ItemSet Stecken + const SvxTabStopItem& rDefTabs = (const SvxTabStopItem&) + GetPool().GetDefaultItem(RES_PARATR_TABSTOP); + + USHORT nDefDist = ::GetTabDist( rDefTabs ); + SfxUInt16Item aDefDistItem( SID_ATTR_TABSTOP_DEFAULTS, nDefDist ); + aCoreSet.Put( aDefDistItem ); + + // Aktueller Tab + SfxUInt16Item aTabPos( SID_ATTR_TABSTOP_POS, 0 ); + aCoreSet.Put( aTabPos ); + + // linker Rand als Offset + const long nOff = ((SvxLRSpaceItem&)aCoreSet.Get( RES_LR_SPACE )). + GetTxtLeft(); + SfxInt32Item aOff( SID_ATTR_TABSTOP_OFFSET, nOff ); + aCoreSet.Put( aOff ); + + + // BoxInfo setzen + ::PrepareBoxInfo( aCoreSet, rWrtSh ); + + //aktuelles Seitenformat + ::SwToSfxPageDescAttr( aCoreSet ); + + UINT16 nDefPage = 0; + if( pItem ) + nDefPage = ((SfxUInt16Item *)pItem)->GetValue(); + + // Numerierungseigenschaften + if(rWrtSh.GetCurNumRule()) + { + aCoreSet.Put(SfxBoolItem(FN_NUMBER_NEWSTART, + USHRT_MAX != rWrtSh.IsNodeNumStart())); + aCoreSet.Put(SfxUInt16Item(FN_NUMBER_NEWSTART_AT, + rWrtSh.IsNodeNumStart())); + } + SwParaDlg *pDlg = new SwParaDlg( GetView().GetWindow(), + GetView(), aCoreSet, DLG_STD, + NULL, FALSE, nDefPage ); + + if ( pDlg->Execute() == RET_OK ) + { + // Defaults evtl umsetzen + SfxItemSet* pSet = (SfxItemSet*)pDlg->GetOutputItemSet(); + USHORT nNewDist; + if( SFX_ITEM_SET == pSet->GetItemState( SID_ATTR_TABSTOP_DEFAULTS, + FALSE, &pItem ) && + nDefDist != (nNewDist = ((SfxUInt16Item*)pItem)->GetValue()) ) + { + SvxTabStopItem aDefTabs( 0, 0 ); + MakeDefTabs( nNewDist, aDefTabs ); + rWrtSh.SetDefault( aDefTabs ); + pSet->ClearItem( SID_ATTR_TABSTOP_DEFAULTS ); + } + + ::SfxToSwPageDescAttr( rWrtSh, *pSet ); + + if( pSet->Count() ) + { + rWrtSh.StartAction(); + rWrtSh.StartUndo( UNDO_START ); + if ( SFX_ITEM_SET == pSet->GetItemState(FN_PARAM_1,FALSE,&pItem) ) + { + if ( ((SfxStringItem*)pItem)->GetValue().Len() ) + rWrtSh.ReplaceDropTxt(((SfxStringItem*)pItem)->GetValue()); + } + rWrtSh.SetAttr( *pSet ); + rWrtSh.EndUndo( UNDO_END ); + rWrtSh.EndAction(); + SwTxtFmtColl* pColl = rWrtSh.GetCurTxtFmtColl(); + if(pColl && pColl->IsAutoUpdateFmt()) + { + rWrtSh.AutoUpdatePara(pColl, *pSet); + } + } + if(SFX_ITEM_SET == pSet->GetItemState(FN_NUMBER_NEWSTART)) + { + BOOL bStart = ((SfxBoolItem&)pSet->Get(FN_NUMBER_NEWSTART_AT)).GetValue(); + // das zweite Item muss immer drin sein! + USHORT nNumStart = ((SfxUInt16Item&)pSet->Get(FN_NUMBER_NEWSTART_AT)).GetValue(); + if(!bStart) + nNumStart = USHRT_MAX; + rWrtSh.SetNodeNumStart(nNumStart); + } + } + delete pDlg; + } + } + break; + case FN_SELECT_PARA: + { + if(!rWrtSh.IsSttOfPara()) + rWrtSh.SttPara(FALSE); + else + rWrtSh.EnterStdMode(); + rWrtSh.EndPara(TRUE); + } + break; + + case SID_DEC_INDENT: + case SID_INC_INDENT: + rWrtSh.MoveLeftMargin( SID_INC_INDENT == nSlot, + rReq.GetModifier() != KEY_MOD1 ); + break; + case FN_DEC_INDENT_OFFSET: + case FN_INC_INDENT_OFFSET: + rWrtSh.MoveLeftMargin( FN_INC_INDENT_OFFSET == nSlot, + rReq.GetModifier() == KEY_MOD1 ); + break; + + case SID_ATTR_CHAR_COLOR2: + { + if(pItem) + { + Color aSet = ((const SvxColorItem*)pItem)->GetValue(); + SwView& rView = GetView(); + SwEditWin& rEditWin = rView.GetEditWin(); + rEditWin.SetTextColor(aSet); + SwApplyTemplate* pApply = rEditWin.GetApplyTemplate(); + SvxColorItem aItem(aSet, RES_CHRATR_COLOR); + + // besteht eine Selektion, wird sie gleich gefaerbt + if(!pApply && rWrtSh.HasSelection()) + { + SvxColorItem aItem(aSet, RES_CHRATR_COLOR); + rWrtSh.SetAttr(aItem); + } + else if(!pApply || pApply->nColor != SID_ATTR_CHAR_COLOR_EXT) + { + rView.GetViewFrame()->GetDispatcher()->Execute(SID_ATTR_CHAR_COLOR_EXT); + } + +/* OS 22.02.97 18:40 Das alte Verhalten ist unerwuenscht + SwEditWin& rEdtWin = GetView().GetEditWin(); + + SwApplyTemplate* pApply = rEdtWin.GetApplyTemplate(); + SvxColorItem aItem(aSet, RES_CHRATR_COLOR); + + if(!pApply || pApply->nColor != SID_ATTR_CHAR_COLOR_EXT) + { + GetShell().SetAttr(aItem); + } +*/ + } + } + break; + case SID_ATTR_CHAR_COLOR_BACKGROUND: + { + SwView& rView = GetView(); + SwEditWin& rEdtWin = rView.GetEditWin(); + SwApplyTemplate* pApply = rEdtWin.GetApplyTemplate(); + rEdtWin.SetTextBackColorTransparent(0 == pItem); + Color aSet; + if(pItem) + { + aSet = ((const SvxColorItem*)pItem)->GetValue(); + rEdtWin.SetTextBackColor(aSet); + } + if(!pApply && (rWrtSh.HasSelection() || rReq.IsAPI())) + { + SvxBrushItem aBrushItem(RES_CHRATR_BACKGROUND); + if(pItem) + aBrushItem.SetColor(aSet); + else + aBrushItem.SetColor(Color(COL_TRANSPARENT)); + rWrtSh.SetAttr( aBrushItem ); + } + else if(!pApply || pApply->nColor != SID_ATTR_CHAR_COLOR_BACKGROUND_EXT) + { + rView.GetViewFrame()->GetDispatcher()->Execute(SID_ATTR_CHAR_COLOR_BACKGROUND_EXT); + } +/* OS 22.02.97 18:40 Das alte Verhalten ist unerwuenscht + if(!pApply || pApply->nColor != SID_ATTR_CHAR_COLOR_BACKGROUND_EXT) + { + Brush aBrush(pItem ? BRUSH_SOLID : BRUSH_NULL); + if(pItem) + aBrush.SetColor( aSet ); + GetShell().SetAttr( SvxBrushItem(aBrush, RES_CHRATR_BACKGROUND) ); + } +*/ + } + break; + case SID_ATTR_CHAR_COLOR_BACKGROUND_EXT: + case SID_ATTR_CHAR_COLOR_EXT: + { + SwEditWin& rEdtWin = GetView().GetEditWin(); + SwApplyTemplate* pApply = rEdtWin.GetApplyTemplate(); + SwApplyTemplate aTempl; + BOOL bSelection = rWrtSh.HasSelection(); + if(bSelection) + { + + if(nSlot == SID_ATTR_CHAR_COLOR_BACKGROUND_EXT) + { + rWrtSh.SetAttr( SvxBrushItem( + rEdtWin.GetTextBackColor(), RES_CHRATR_BACKGROUND) ); + } + else + rWrtSh.SetAttr( SvxColorItem( rEdtWin.GetTextColor(), + RES_CHRATR_COLOR) ); + } + else + { + if(!pApply || pApply->nColor != nSlot) + aTempl.nColor = nSlot; + rEdtWin.SetApplyTemplate(aTempl); + } + } + break; + + case FN_NUM_BULLET_MOVEDOWN: + if (!rWrtSh.IsAddMode()) + rWrtSh.MoveParagraph(1); + break; + + case FN_NUM_BULLET_MOVEUP: + if (!rWrtSh.IsAddMode()) + rWrtSh.MoveParagraph(-1); + break; + + case SID_HYPERLINK_DIALOG: + { + SfxRequest aReq(SID_HYPERLINK_DIALOG, SFX_CALLMODE_SLOT, SFX_APP()->GetPool()); + GetView().GetViewFrame()->ExecuteSlot( aReq); + } + break; + + default: + ASSERT(!this, falscher Dispatcher); + return; + } +} + +/*-------------------------------------------------------------------- + Beschreibung: + --------------------------------------------------------------------*/ + + +void SwTextShell::GetState( SfxItemSet &rSet ) +{ + SwWrtShell &rSh = GetShell(); + SfxWhichIter aIter( rSet ); + USHORT nWhich = aIter.FirstWhich(); + while ( nWhich ) + { + switch ( nWhich ) + { + case FN_NUM_NUMBERING_ON: + case FN_NUM_BULLET_ON: + if ( rSh.IsTableMode() ) + rSet.DisableItem( nWhich ); + break; + + case FN_NUMBER_BULLETS: + if ( rSh.IsTableMode() ) + rSet.DisableItem(nWhich); + break; + + case FN_EDIT_FORMULA: + case FN_INSERT_SYMBOL: + { + const int nType = rSh.GetSelectionType(); + if (!(nType & SwWrtShell::SEL_TXT) && + !(nType & SwWrtShell::SEL_TBL) && + !(nType & SwWrtShell::SEL_NUM)) + rSet.DisableItem(nWhich); + } + break; + + case FN_INSERT_ENDNOTE: + case FN_INSERT_FOOTNOTE: + case FN_INSERT_FOOTNOTE_DLG: + { + const USHORT nNoType = FRMTYPE_FLY_ANY | FRMTYPE_HEADER | + FRMTYPE_FOOTER | FRMTYPE_FOOTNOTE; + if ( (rSh.GetFrmType(0,TRUE) & nNoType) ) + rSet.DisableItem(nWhich); + } + break; + case FN_INSERT_TABLE: + if ( rSh.GetTableFmt() || + (rSh.GetFrmType(0,TRUE) & FRMTYPE_FOOTNOTE) ) + rSet.DisableItem( nWhich ); + break; + + case FN_CALCULATE: + if ( !rSh.IsSelection() ) + rSet.DisableItem(nWhich); + break; + case FN_GOTO_REFERENCE: + { + SwField *pFld = rSh.GetCurFld(); + if ( !pFld || (pFld && pFld->GetTypeId() != TYP_GETREFFLD) ) + rSet.DisableItem(nWhich); + } + break; + case FN_AUTOFORMAT_AUTO: + { + rSet.Put( SfxBoolItem( nWhich, OFF_APP()-> + GetAutoCorrConfig()->IsAutoFmtByInput() )); + } + break; + case FN_GLOSSARY_DLG: + { + rSet.Put(SfxBoolItem(nWhich), TRUE); + } + break; + + case SID_DEC_INDENT: + case SID_INC_INDENT: + { + USHORT nHtmlMode = ::GetHtmlMode(GetView().GetDocShell()); + nHtmlMode &= HTMLMODE_ON|HTMLMODE_SOME_STYLES; + if( (nHtmlMode == HTMLMODE_ON) || !rSh.IsMoveLeftMargin( + SID_INC_INDENT == nWhich, TRUE )) + rSet.DisableItem( nWhich ); + } + break; + + case FN_DEC_INDENT_OFFSET: + case FN_INC_INDENT_OFFSET: + { + USHORT nHtmlMode = ::GetHtmlMode(GetView().GetDocShell()); + nHtmlMode &= HTMLMODE_ON|HTMLMODE_SOME_STYLES; + if( (nHtmlMode == HTMLMODE_ON) || + !rSh.IsMoveLeftMargin( FN_INC_INDENT_OFFSET == nWhich, + FALSE )) + rSet.DisableItem( nWhich ); + } + break; + + case SID_ATTR_CHAR_COLOR2: + { + rSet.Put(SvxColorItem(GetView().GetEditWin().GetTextColor(), SID_ATTR_CHAR_COLOR2)); + } + break; + case SID_ATTR_CHAR_COLOR_BACKGROUND: + { + if(GetView().GetEditWin().IsTextBackColorTransparent()) + rSet.Put(SvxColorItem(Color(COL_LIGHTGRAY), SID_ATTR_CHAR_COLOR_BACKGROUND)); + else + rSet.Put(SvxColorItem(GetView().GetEditWin().GetTextBackColor(), SID_ATTR_CHAR_COLOR_BACKGROUND)); + } + break; + case SID_ATTR_CHAR_COLOR_BACKGROUND_EXT: + case SID_ATTR_CHAR_COLOR_EXT: + { + SwEditWin& rEdtWin = GetView().GetEditWin(); + SwApplyTemplate* pApply = rEdtWin.GetApplyTemplate(); + rSet.Put(SfxBoolItem(nWhich, pApply && pApply->nColor == nWhich)); + } + break; + case FN_INSERT_BOOKMARK: + if( rSh.IsTableMode() ) + rSet.DisableItem( nWhich ); + break; + + case FN_INSERT_PAGEHEADER: + case FN_INSERT_PAGEFOOTER: + { +#ifndef CHECK_MENU + rSet.Put( SfxObjectItem( nWhich, GetView().GetDocShell() )); +#else + // Seitenvorlagen besorgen + BOOL bFound = FALSE; + USHORT n, nCnt = rSh.GetPageDescCnt(); + for( n = 0; n < nCnt; ++n ) + { + const SwPageDesc& rDesc = rSh.GetPageDesc( n ); + if( FN_INSERT_PAGEHEADER == nWhich + ? !rDesc.GetMaster().GetHeader().IsActive() + : !rDesc.GetMaster().GetFooter().IsActive() ) + { + bFound = TRUE; + break; + } + } + + if( bFound ) + rSet.Put( SfxObjectItem( nWhich, GetView().GetDocShell() )); + else + rSet.DisableItem( nWhich ); +#endif + } + break; + case FN_SORTING_DLG: + if(!rSh.HasSelection()) + rSet.DisableItem( nWhich ); + break; + case SID_HYPERLINK_DIALOG: + if(!GetView().GetViewFrame()->HasChildWindow(SID_HYPERLINK_DIALOG) && rSh.HasReadonlySel()) + rSet.DisableItem(SID_HYPERLINK_DIALOG); + break; + case FN_EDIT_HYPERLINK: + { + SfxItemSet aSet(GetPool(), + RES_TXTATR_INETFMT, + RES_TXTATR_INETFMT); + rSh.GetAttr(aSet); + if(SFX_ITEM_SET > aSet.GetItemState( RES_TXTATR_INETFMT, TRUE ) || rSh.HasReadonlySel()) + { + rSet.DisableItem(FN_EDIT_HYPERLINK); + } + } + break; + } + nWhich = aIter.NextWhich(); + } +} + + +/*------------------------------------------------------------------------ + + $Log: not supported by cvs2svn $ + Revision 1.171 2000/09/18 16:06:06 willem.vandorp + OpenOffice header added. + + Revision 1.170 2000/09/12 14:11:19 os + SfxApplication::ChildWindowExecute removed + + Revision 1.169 2000/09/11 06:52:45 os + Get/Set/Has/ToggleChildWindow SfxApplication -> SfxViewFrame + + Revision 1.168 2000/09/08 08:12:52 os + Change: Set/Toggle/Has/Knows/Show/GetChildWindow + + Revision 1.167 2000/09/07 15:59:30 os + change: SFX_DISPATCHER/SFX_BINDINGS removed + + Revision 1.166 2000/08/31 11:32:07 jp + add missing include + + Revision 1.165 2000/05/26 07:21:33 os + old SW Basic API Slots removed + + Revision 1.164 2000/05/10 11:53:02 os + Basic API removed + + Revision 1.163 2000/04/18 14:58:24 os + UNICODE + + Revision 1.162 2000/04/04 15:11:48 os + #74685# hyperlink button only disabled in readonly sections + + Revision 1.161 2000/03/03 15:17:03 os + StarView remainders removed + + Revision 1.160 2000/02/11 14:57:58 hr + #70473# changes for unicode ( patched by automated patchtool ) + + Revision 1.159 2000/01/12 16:43:04 os + #71278# edit hyperlink: use the new dialog + + Revision 1.158 2000/01/03 08:38:28 os + #71278# edit hyperlink slot + + Revision 1.157 1999/07/08 13:58:46 MA + Use internal object to toggle wait cursor + + + Rev 1.156 08 Jul 1999 15:58:46 MA + Use internal object to toggle wait cursor + + Rev 1.155 15 Apr 1999 14:02:44 OS + #64801# keine Endnoten in Rahmen + + Rev 1.154 23 Mar 1999 18:28:12 JP + Bug #63449#: vorm Formeledit alle Zellveraenderungen pruefen + + Rev 1.153 18 Mar 1999 14:41:18 OS + #61169# #61489# Masseinheiten fuer Text u. HTML am Module setzen, nicht an der App + + Rev 1.152 05 Feb 1999 17:05:48 OS + #61547# InsertEndnoteDirect + + Rev 1.151 15 Jan 1999 15:45:30 JP + Bug #60203#: MoveLeftMargin - optional um Betrag verschieben + + Rev 1.150 13 Jan 1999 14:54:02 TJ + include + + Rev 1.149 13 Jan 1999 08:14:18 OS + #60380# HelpIds fuer AutoFormat - QueryBox + + Rev 1.148 27 Nov 1998 14:55:38 AMA + Fix #59951#59825#: Unterscheiden zwischen Rahmen-,Seiten- und Bereichsspalten + + Rev 1.147 06 Nov 1998 16:34:50 OS + #58450# Fussnoten auch im HTML + + Rev 1.146 21 Oct 1998 10:56:54 OM + #57586# Redlining nach Autoformat + + Rev 1.145 20 Oct 1998 17:52:46 OM + #57586# Redlining nach Autoformat + + Rev 1.144 20 Oct 1998 11:39:34 OM + #57586# Redlining nach Autoformat + + Rev 1.143 30 Sep 1998 14:05:26 OS + #52654# C40_Insert + + Rev 1.142 30 Sep 1998 10:28:56 OS + #52654# Sortable und SortDescriptor eingebaut, auf- und absteigend fuer jeden Schluessel + + Rev 1.141 08 Sep 1998 17:03:02 OS + #56134# Metric fuer Text und HTML getrennt + + Rev 1.140 09 Jul 1998 14:04:12 OS + Kapitelnumerierung jetzt TabDialog + + Rev 1.139 26 May 1998 15:34:00 JP + neu: Kopf-/Fusszeilen per Menu ein-/ausschalten + + Rev 1.138 13 May 1998 14:58:10 OM + Autokorrektur/Autoformat umgestaltet und zusammengefasst + + Rev 1.137 08 May 1998 17:02:48 OM + AutoFormat-Optionen an Ofa und Svx verschoben + + Rev 1.136 07 May 1998 12:58:40 OM + AutoFormat-Optionen Umstellung + + Rev 1.135 12 Mar 1998 13:08:00 OS + Numerierungsbutton nicht mehr gecheckt und nicht disabled + + Rev 1.134 04 Mar 1998 14:16:26 OM + Dokument Merge/Compare + + Rev 1.133 05 Feb 1998 14:46:26 OS + Numerierungsstart nur bei gesetzer Numerierung putten + + Rev 1.132 02 Feb 1998 09:12:52 OS + neue Num-Tabpage + + Rev 1.131 12 Dec 1997 13:57:36 OS + neuer Bookmark-Typ + + Rev 1.130 03 Dec 1997 17:02:34 OS + Numerierungsumbau + +------------------------------------------------------------------------*/ + + diff --git a/sw/source/ui/shells/textsh2.cxx b/sw/source/ui/shells/textsh2.cxx new file mode 100644 index 0000000000..4502f4f952 --- /dev/null +++ b/sw/source/ui/shells/textsh2.cxx @@ -0,0 +1,777 @@ +/************************************************************************* + * + * $RCSfile: textsh2.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:47 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +#ifdef PRECOMPILED +#include "ui_pch.hxx" +#endif + +#pragma hdrstop + +#if STLPORT_VERSION>=321 +#include <cstdarg> +#endif + +#include <svtools/svmedit.hxx> +#ifndef _SBASLTID_HRC //autogen +#include <offmgr/sbasltid.hrc> +#endif +#ifndef _SFXENUMITEM_HXX //autogen +#include <svtools/eitem.hxx> +#endif +#ifndef _SFX_WHITER_HXX //autogen +#include <svtools/whiter.hxx> +#endif +#ifndef _SFXEVENT_HXX //autogen +#include <sfx2/event.hxx> +#endif +#ifndef _SFXDISPATCH_HXX //autogen +#include <sfx2/dispatch.hxx> +#endif +#ifndef _SFXVIEWFRM_HXX //autogen +#include <sfx2/viewfrm.hxx> +#endif +#ifndef _MSGBOX_HXX //autogen +#include <vcl/msgbox.hxx> +#endif +#ifndef _SFXSTRITEM_HXX //autogen +#include <svtools/stritem.hxx> +#endif +#ifndef _OFF_APP_HXX //autogen +#include <offmgr/app.hxx> +#endif +#ifdef REPLACE_OFADBMGR +#ifndef _SFXITEMSET_HXX +#include <svtools/itemset.hxx> +#endif +#ifndef _SFXREQUEST_HXX +#include <sfx2/request.hxx> +#endif +#ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_ +#include <com/sun/star/lang/XMultiServiceFactory.hpp> +#endif +#ifndef _COM_SUN_STAR_CONTAINER_XNAMEACCESS_HPP_ +#include <com/sun/star/container/XNameAccess.hpp> +#endif +#ifndef _COM_SUN_STAR_SDBC_XDATASOURCE_HPP_ +#include <com/sun/star/sdbc/XDataSource.hpp> +#endif +#ifndef _COM_SUN_STAR_SDBCX_XTABLESSUPPLIER_HPP_ +#include <com/sun/star/sdbcx/XTablesSupplier.hpp> +#endif +#ifndef _COM_SUN_STAR_SDBCX_XCOLUMNSSUPPLIER_HPP_ +#include <com/sun/star/sdbcx/XColumnsSupplier.hpp> +#endif +#ifndef _COM_SUN_STAR_SDB_XQUERIESSUPPLIER_HPP_ +#include <com/sun/star/sdb/XQueriesSupplier.hpp> +#endif +#ifndef _COM_SUN_STAR_SDB_XDATABASEACCESS_HPP_ +#include <com/sun/star/sdb/XDatabaseAccess.hpp> +#endif +#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_ +#include <com/sun/star/beans/XPropertySet.hpp> +#endif +#ifndef _UNOTOOLS_PROCESSFACTORY_HXX_ +#include <unotools/processfactory.hxx> +#endif + +#else + +#endif //REPLACE_OFADBMGR + +#include "dbmgr.hxx" + + +#include "view.hxx" +#include "wrtsh.hxx" +#include "swtypes.hxx" +#include "cmdid.h" +#include "swevent.hxx" +#include "shells.hrc" +#include "mailmrge.hxx" +#include "textsh.hxx" +#include "dbinsdlg.hxx" + +#ifdef REPLACE_OFADBMGR +using namespace rtl; +using namespace com::sun::star; +using namespace com::sun::star::uno; +using namespace com::sun::star::container; +using namespace com::sun::star::lang; +using namespace com::sun::star::sdb; +using namespace com::sun::star::sdbc; +using namespace com::sun::star::sdbcx; +using namespace com::sun::star::beans; + +#define C2U(cChar) rtl::OUString::createFromAscii(cChar) +#endif +#define C2S(cChar) UniString::CreateFromAscii(cChar) +#define DB_DD_DELIM 0x0b + +#ifdef DEBUG +// the addressbook doesn't support the new api yet (593) +#ifdef REPLACE_OFADBMGR +void lcl_ReplaceDataSource(String& sDBName, String& sTblName, String& sStatmnt) +{ + Reference<XNameAccess> xDBContext; + Reference< XMultiServiceFactory > xMgr( ::utl::getProcessServiceFactory() ); + if( xMgr.is() ) + { + Reference<XInterface> xInstance = xMgr->createInstance( C2U( "com.sun.star.sdb.DatabaseContext" )); + xDBContext = Reference<XNameAccess>(xInstance, UNO_QUERY) ; + } + DBG_ASSERT(xDBContext.is(), "com.sun.star.sdb.DataBaseContext: service not available") + if(!xDBContext.is()) + return; + Sequence<OUString> aDBNames = xDBContext->getElementNames(); + const OUString* pDBNames = aDBNames.getConstArray(); + long nCount = aDBNames.getLength(); + DBG_ASSERT(nCount, "no data source available") + if(!nCount) + return; + sDBName = pDBNames[0]; + + Any aDBSource = xDBContext->getByName(sDBName); + Reference<XDataSource>* pxSource = (Reference<XDataSource>*)aDBSource.getValue(); + + Reference<sdbc::XConnection> xConnection; + try + { + OUString sDummy; + xConnection = (*pxSource)->getConnection(sDummy, sDummy); + } + catch(...) {} + DBG_ASSERT(xConnection.is(), "no connection found") + if (xConnection.is()) + { + Reference<XTablesSupplier> xTSupplier = Reference<XTablesSupplier>(xConnection, UNO_QUERY); + DBG_ASSERT(xTSupplier.is(), "no tables found") + if(xTSupplier.is()) + { + Reference<XNameAccess> xTbls = xTSupplier->getTables(); + Sequence<OUString> aTblNames = xTbls->getElementNames(); + long nCount = aTblNames.getLength(); + DBG_ASSERT(nCount, "no table found") + const OUString* pTblNames = aTblNames.getConstArray(); + sTblName = pTblNames[2]; + sStatmnt = String::CreateFromAscii("select * from "); + String sQuote = xConnection->getMetaData()->getIdentifierQuoteString(); + sStatmnt += sQuote; + sStatmnt += sTblName; + sStatmnt += sQuote; + } + } +} +#endif // REPLACE_OFADBMGR +#endif // DEBUG + +inline void AddSelList( List& rLst, long nRow ) +{ + rLst.Insert( (void*)nRow , LIST_APPEND ); +} + +void lcl_QRY_UPDATE( const SfxItemSet *pArgs, SwNewDBMgr *pNewDBMgr, + SwWrtShell &rSh, USHORT nSlot ) +{ + DBG_ASSERT( pArgs, "arguments expected" ); + if (pArgs) + { + SbaSelectionListRef pSelectionList; + + const SfxStringItem &rDBNameItem = (const SfxStringItem&) pArgs->Get(SID_ATTR_SBA_DATABASE); + const SfxStringItem &rTableNameItem = (const SfxStringItem&) pArgs->Get(SID_ATTR_SBA_DBOBJ_NAME); + const SfxStringItem &rStatementItem = (const SfxStringItem&) pArgs->Get(SID_ATTR_SBA_STATEMENT); + DBG_ASSERT( rStatementItem.ISA(SfxStringItem), "invalid argument type" ); + + const SbaSelectionItem &rSelectionItem = (const SbaSelectionItem&) pArgs->Get(SID_ATTR_SBA_SELECTION); + pSelectionList = rSelectionItem.GetSelectionList(); + + + String sDBName(rDBNameItem.GetValue()); + String sTableName(rTableNameItem.GetValue()); + String sStatement(rStatementItem.GetValue()); + +#ifdef DEBUG +// the addressbook doesn't support the new api yet (593) +#ifdef REPLACE_OFADBMGR + lcl_ReplaceDataSource(sDBName, sTableName, sStatement); +#endif +#endif // DEBUG + +#ifdef REPLACE_OFADBMGR +#else + if(sTableName.Len()) + { + sDBName += DB_DELIM; + sDBName += rTableNameItem.GetValue(); + } +#endif + pNewDBMgr->SetMergeType( DBMGR_MERGE ); +#ifdef REPLACE_OFADBMGR + pNewDBMgr->Merge(DBMGR_MERGE, &rSh, + sStatement, pSelectionList, sDBName, sTableName); +#else + pNewDBMgr->Merge(DBMGR_MERGE, &rSh, + sStatement, pSelectionList, sDBName); +#endif + } +} + +/* --------------------------------------------------------------------------- + + ---------------------------------------------------------------------------*/ +void SwBaseShell::ExecDB(SfxRequest &rReq) +{ + const SfxItemSet *pArgs = rReq.GetArgs(); + SwNewDBMgr* pNewDBMgr = GetShell().GetNewDBMgr(); + USHORT nSlot = rReq.GetSlot(); + + switch (nSlot) + { + case SID_SBA_BRW_MERGE: + { + String sDBName; + String sTableName; + String sStatement; + SbaSelectionListRef xSelectionList; + if (pArgs) + { + const SfxStringItem &rDBNameItem = (const SfxStringItem&) pArgs->Get(SID_ATTR_SBA_DATABASE); + sDBName = rDBNameItem.GetValue(); + const SfxStringItem &rTableNameItem = (const SfxStringItem&) pArgs->Get(SID_ATTR_SBA_DBOBJ_NAME); + sTableName = rTableNameItem.GetValue(); + sStatement = ((const SfxStringItem&) pArgs->Get(SID_ATTR_SBA_STATEMENT)).GetValue(); + const SbaSelectionItem &rSelectionItem = (const SbaSelectionItem&) pArgs->Get(SID_ATTR_SBA_SELECTION); + xSelectionList = rSelectionItem.GetSelectionList(); + } +#ifdef REPLACE_OFADBMGR +#ifdef DEBUG + { + sDBName = C2S("Nordwind"); + sTableName = C2S("Artikel"); + sStatement = C2S("select * from Artikel"); + } +#endif //DEBUG +#endif //REPLACE_OFADBMGR +#ifdef REPLACE_OFADBMGR +#else + else + break; +#endif + if ( !xSelectionList.Is() ) + xSelectionList = new SbaSelectionList; + +#ifdef REPLACE_OFADBMGR +#else + if (sTableName.Len()) + { + sDBName += DB_DELIM; + sDBName += sTableName; + } +#endif + + SwMailMergeDlg* pDlg = new SwMailMergeDlg( + NULL, GetShellPtr(), + sDBName, +#ifdef REPLACE_OFADBMGR + sTableName, +#endif + sStatement, xSelectionList ); + + if (pDlg->Execute() == RET_OK) + { + pNewDBMgr->SetMergeType( pDlg->GetMergeType() ); + + OFF_APP()->NotifyEvent(SfxEventHint(SW_EVENT_MAIL_MERGE, GetView().GetViewFrame()->GetObjectShell())); + +#ifdef REPLACE_OFADBMGR + pNewDBMgr->Merge(pNewDBMgr->GetMergeType(), + GetShellPtr(), sStatement, + xSelectionList, + sDBName, + sTableName); +#else + pNewDBMgr->Merge(pNewDBMgr->GetMergeType(), + GetShellPtr(), sStatement, + xSelectionList, sDBName); +#endif + delete(pDlg); + } + } + break; + + case SID_SBA_BRW_UPDATE: + lcl_QRY_UPDATE( pArgs, pNewDBMgr, GetShell(), nSlot ); + break; + + case SID_SBA_BRW_INSERT: + DBG_ASSERT( pArgs, "arguments expected" ); + if( pArgs ) + { + String sDBName = ((SfxStringItem&)pArgs->Get( + SID_ATTR_SBA_DATABASE)).GetValue(); + String sTblName = ((SfxStringItem&)pArgs->Get( + SID_ATTR_SBA_DBOBJ_NAME)).GetValue(); + String sStatmnt = ((SfxStringItem&)pArgs->Get( + SID_ATTR_SBA_STATEMENT)).GetValue(); + SbaSelectionListRef xSelectionList( ((SbaSelectionItem&) + pArgs->Get(SID_ATTR_SBA_SELECTION)).GetSelectionList()); + +#ifdef DEBUG +// the addressbook doesn't support the new api yet (593) +#ifdef REPLACE_OFADBMGR + lcl_ReplaceDataSource(sDBName, sTblName, sStatmnt); +#endif +#endif // DEBUG + + String* pDataStr = new String( sDBName ); + ((((((*pDataStr) += char(DB_DD_DELIM) ) + += sTblName ) += char(DB_DD_DELIM) ) + += '0' ) += char(DB_DD_DELIM) ) // Flag fuer Tabelle oder Query - unused! + += sStatmnt; + + if( xSelectionList.Is() ) + for( ULONG n = 0, nEnd = xSelectionList->Count(); + n < nEnd; ++n ) + ((*pDataStr) += char(DB_DD_DELIM) ) + += String::CreateFromInt32( + (long)xSelectionList->GetObject( n )); + + SwBaseShell::InsertDBTextHdl( this, pDataStr ); + // der String wird im InsertDBTextHdl geloescht !! + } + break; + default: + ASSERT(!this, falscher Dispatcher); + return; + } +} + + + +void SwTextShell::ExecDB(SfxRequest &rReq) +{ + const SfxItemSet *pArgs = rReq.GetArgs(); + SwNewDBMgr* pNewDBMgr = GetShell().GetNewDBMgr(); + USHORT nSlot = rReq.GetSlot(); + + switch (nSlot) + { + case FN_QRY_INSERT: + { + String* pNew = new String( ((const SfxStringItem&)pArgs-> + Get(nSlot)).GetValue() ); + Application::PostUserEvent( STATIC_LINK( this, SwBaseShell, + InsertDBTextHdl ), pNew ); + // der String wird im InsertDBTextHdl geloescht !! + } + break; + + case FN_QRY_MERGE_FIELD: + { + String sSbaData = ((const SfxStringItem&)pArgs->Get(nSlot)).GetValue(); + String sDBName = sSbaData.GetToken(0, DB_DD_DELIM); +#ifdef REPLACE_OFADBMGR + String sTableName(sSbaData.GetToken(1, DB_DD_DELIM)); +#else + sDBName += DB_DELIM; + sDBName += sSbaData.GetToken(1, DB_DD_DELIM); +#endif + BOOL bTable = sSbaData.GetToken(2, DB_DD_DELIM) == C2S("1"); + String sStatement = sSbaData.GetToken(3, DB_DD_DELIM); + + SbaSelectionListRef pSelectionList; + pSelectionList.Clear(); + pSelectionList = new SbaSelectionList; + USHORT nCount = sSbaData.GetTokenCount(DB_DD_DELIM); + + for( USHORT i = 4; i < nCount; i++ ) + AddSelList( *pSelectionList, + sSbaData.GetToken( i, DB_DD_DELIM).ToInt32() ); + + pNewDBMgr->SetMergeType( DBMGR_MERGE ); +#ifdef REPLACE_OFADBMGR + pNewDBMgr->Merge(DBMGR_MERGE, + GetShellPtr(), sStatement, + pSelectionList, sDBName, sTableName); +#else + pNewDBMgr->Merge(DBMGR_MERGE, + GetShellPtr(), sStatement, + pSelectionList, sDBName); +#endif + } + break; + + case FN_QRY_INSERT_FIELD: + { + String sSbaData = ((const SfxStringItem&)pArgs->Get(FN_QRY_INSERT_FIELD)).GetValue(); + + String sDBName = sSbaData.GetToken(0, DB_DD_DELIM); + sDBName += DB_DELIM; + sDBName += sSbaData.GetToken(1, DB_DD_DELIM); + sDBName += DB_DELIM; + BOOL bTable = sSbaData.GetToken(2, DB_DD_DELIM) == C2S("1"); + sDBName += sSbaData.GetToken(3, DB_DD_DELIM); // Column name + + InsertDBFld(sDBName); + } + break; + + default: + ASSERT(!this, falscher Dispatcher); + return; + } +} + +/*-------------------------------------------------------------------- + Beschreibung: + --------------------------------------------------------------------*/ + + + +IMPL_STATIC_LINK( SwBaseShell, InsertDBTextHdl, String*, pString ) +{ + if( pString ) + { + +#ifdef REPLACE_OFADBMGR + USHORT nTokenPos = 0; + String sSourceName( pString->GetToken( 0, DB_DD_DELIM, nTokenPos )); + String sTblQryName( pString->GetToken( 0, DB_DD_DELIM, nTokenPos )); + String sStatmnt( pString->GetToken( 1, DB_DD_DELIM, nTokenPos )); + + Reference<XDataSource> xSource; + Reference< sdbc::XConnection> xConnection = SwNewDBMgr::GetConnection(sSourceName, xSource); + Reference< XColumnsSupplier> xColSupp; + if(xConnection.is()) + xColSupp = SwNewDBMgr::GetColumnSupplier(xConnection, + sTblQryName, + SW_DB_SELECT_UNKNOWN); + + if( xColSupp.is() ) + { + SwInsDBData aDBData; + aDBData.sDataBaseName = sSourceName; + aDBData.sDataTableName = sTblQryName; + aDBData.sStatement = sStatmnt; + SwInsertDBColAutoPilot *pDlg = new SwInsertDBColAutoPilot( + pThis->GetView(), + xSource, + xColSupp, + aDBData ); + if( RET_OK == pDlg->Execute() ) + { + SbaSelectionList aSelectionList; + while( nTokenPos < pString->Len() ) + AddSelList( aSelectionList, + pString->GetToken( 0, DB_DD_DELIM, nTokenPos ).ToInt32() ); + pDlg->DataToDoc( &aSelectionList , xSource, xConnection); + } +// else +// rSh.ChgDBName( sOldDBName ); + delete pDlg; + } +// else +// rSh.ChgDBName( sOldDBName ); +#else + USHORT nTokenPos = 0; + String sDBName( pString->GetToken( 0, DB_DD_DELIM, nTokenPos )); + ( sDBName += DB_DELIM ) += + pString->GetToken( 0, DB_DD_DELIM, nTokenPos ); + String sStatmnt( pString->GetToken( 1, DB_DD_DELIM, nTokenPos )); + + SbaSelectionList aSelectionList; + while( nTokenPos < pString->Len() ) + AddSelList( aSelectionList, + pString->GetToken( 0, DB_DD_DELIM, nTokenPos ).ToInt32() ); + + SwWrtShell& rSh = pThis->GetShell(); + SwNewDBMgr* pNewDBMgr = rSh.GetNewDBMgr(); + String sOldDBName( rSh.GetDBName() ); + ( sDBName += ';' ) += sStatmnt; + rSh.ChgDBName( sDBName ); + + if( pNewDBMgr->OpenDB( DBMGR_STD, rSh.GetDBDesc() ) ) + { + pNewDBMgr->ChangeStatement( DBMGR_STD, sStatmnt ); + + SwInsertDBColAutoPilot *pDlg = new SwInsertDBColAutoPilot( + pThis->GetView() ); + if( pDlg->HasValidDB() && RET_OK == pDlg->Execute() ) + { + // dann jetzt ueber den DBManager die Selektierten + // Daten ins Dokument einfuegen. + pDlg->DataToDoc( &aSelectionList ); + } + else + rSh.ChgDBName( sOldDBName ); + delete pDlg; + pNewDBMgr->CloseAll(); + } + else + rSh.ChgDBName( sOldDBName ); +#endif + } + + delete pString; + return 0; +} + +/*------------------------------------------------------------------------ + + $Log: not supported by cvs2svn $ + Revision 1.115 2000/09/18 16:06:06 willem.vandorp + OpenOffice header added. + + Revision 1.114 2000/07/18 12:50:09 os + replace ofadbmgr + + Revision 1.113 2000/07/07 15:25:43 os + replace ofadbmgr + + Revision 1.112 2000/07/06 07:59:11 os + replace ofadbmgr + + Revision 1.111 2000/07/05 08:22:09 os + Replace ofadbmgr + + Revision 1.110 2000/06/07 13:18:20 os + using UCB + + Revision 1.109 2000/05/26 07:21:33 os + old SW Basic API Slots removed + + Revision 1.108 2000/05/23 19:29:09 jp + Bugfixes for Unicode + + Revision 1.107 2000/05/10 11:53:02 os + Basic API removed + + Revision 1.106 2000/04/18 14:58:24 os + UNICODE + + Revision 1.105 2000/02/11 14:58:04 hr + #70473# changes for unicode ( patched by automated patchtool ) + + Revision 1.104 2000/01/06 07:32:58 os + #71436# mail merge dialog: execute via status method disposed + + Revision 1.103 1999/11/11 15:00:55 hr + #65293#: STLPORT 3.2.1 + + Revision 1.102 1999/09/29 07:00:54 mh + chg: header + + Revision 1.101 1999/03/01 15:22:38 MA + #62490# Altlast entfernt (Drucken und Briefumschlaege/Etiketten und Datenbank) + + + Rev 1.100 01 Mar 1999 16:22:38 MA + #62490# Altlast entfernt (Drucken und Briefumschlaege/Etiketten und Datenbank) + + Rev 1.99 26 Feb 1999 16:08:42 MA + #62490# Rest vom Drucken Etiketten entfernt + + Rev 1.98 12 Oct 1998 10:16:12 OM + #57790# Dialog nicht mehr AppModal + + Rev 1.97 28 May 1998 17:09:54 JP + Auch beim Droppen von Datensaetzen als Text den neuen DBInsertDialog starten + + Rev 1.96 20 May 1998 21:32:32 JP + InsertDBCols als Text: rufe den neuen Autopiloten + + Rev 1.95 09 Dec 1997 12:31:08 OM + #45200# Serienbrief: Speichern-Monitor + + Rev 1.94 02 Dec 1997 19:38:24 MA + #45900#, SelectionList muss fuer Dialog existieren + + Rev 1.93 24 Nov 1997 09:46:52 MA + includes + + Rev 1.92 18 Nov 1997 14:45:22 OM + Sba-Umstellung 372 + + Rev 1.91 03 Nov 1997 13:55:42 MA + precomp entfernt + + Rev 1.90 08 Sep 1997 11:12:38 OM + #43152# SingleJob-Parameter fuer DataUpdatePrint + + Rev 1.89 02 Sep 1997 14:58:36 OM + Neue Parameter fuer DataUpdatePrint + + Rev 1.88 02 Sep 1997 09:58:00 OM + SDB-Headeranpassung + + Rev 1.87 01 Sep 1997 13:23:56 OS + DLL-Umstellung + + Rev 1.86 06 Aug 1997 14:37:02 TRI + VCL: includes + + Rev 1.85 11 Jul 1997 14:46:36 OM + #41525# Nur durch SQL-Statement eingeschraenkte Datensaetze verwenden + + Rev 1.84 09 Jun 1997 17:23:16 OM + Serienbriefe als Dateien speichern + + Rev 1.83 29 Apr 1997 16:19:48 OM + Druckdialog bei Aufruf aus Basic unterdruecken + + Rev 1.82 07 Apr 1997 17:45:56 MH + chg: header + + Rev 1.81 09 Mar 1997 15:51:36 OM + Basic abgesichert + + Rev 1.80 24 Feb 1997 16:54:02 OS + Item mit Tabellenname auswerten + + Rev 1.79 13 Feb 1997 22:59:16 MA + Datenbankfunktionalitaet wieder hergestellt + + Rev 1.78 12 Feb 1997 16:57:48 OM + Datenbankslots ueber Baseshell rufen + + Rev 1.77 12 Feb 1997 10:40:46 OM + Endlosschleife behoben + + Rev 1.76 12 Feb 1997 09:22:44 OM + DD-Trenner korrigiert + + Rev 1.75 09 Feb 1997 15:09:34 OM + Anderer Trenner bei DB Drag u. Drop + + Rev 1.74 07 Feb 1997 17:20:36 OM + Datenbankumstellung Drag u. Drop + + Rev 1.73 16 Dec 1996 10:59:02 OM + Drucken aus DB-Browser angefangen + + Rev 1.72 11 Dec 1996 10:50:56 MA + Warnings + + Rev 1.71 01 Dec 1996 19:30:28 sdo + GCC-Parser + + Rev 1.70 12 Nov 1996 16:50:58 MA + richtige Versionen gemerged + + Rev 1.68 08 Nov 1996 17:40:14 OM + DB-Mode fuer Serienbriefe und Etiketten zum Teil wiederbelebt + + Rev 1.67 24 Oct 1996 13:36:40 JP + String Umstellung: [] -> GetChar() + + Rev 1.66 25 Sep 1996 14:12:10 OM + Neue Datenbanktrenner + + Rev 1.65 19 Sep 1996 14:32:52 OM + Datenbank Basicanbindung + + Rev 1.64 18 Sep 1996 10:44:58 OM + Serienbriefe wieder angebunden + + Rev 1.63 13 Sep 1996 15:47:16 OM + Serienbrief + + Rev 1.62 06 Sep 1996 12:31:42 OM + Statusmethode fuer DB-Slot + + Rev 1.61 28 Aug 1996 15:54:58 OS + includes + + Rev 1.60 23 Aug 1996 15:51:56 OM + Datenbank: Drag&Drop + + Rev 1.59 23 Aug 1996 14:48:00 OM + Datenbank: Drag&Drop + + Rev 1.58 21 Aug 1996 14:51:52 OM + Datenbank Drag&Drop + + Rev 1.57 07 Aug 1996 16:24:24 OM + Datenbankumstellung + + Rev 1.56 19 Jul 1996 16:10:14 OM + SBA-Umstellung + + Rev 1.55 17 Jul 1996 13:47:40 OM + Datenbankumstellung 327 + + Rev 1.54 02 Jul 1996 16:36:20 OM + #28615# Makroausfuehrung auch bei Serienbriefdruck + + Rev 1.53 04 Jun 1996 14:11:22 OM + Serienbrief Mailing + + Rev 1.52 06 May 1996 17:39:34 OM + Mehrere Datenbanken pro Dokument + + Rev 1.51 30 Apr 1996 09:24:34 OM + Mehrere Datenbanken pro Dok + +------------------------------------------------------------------------*/ + + + + diff --git a/sw/source/ui/shells/txtattr.cxx b/sw/source/ui/shells/txtattr.cxx new file mode 100644 index 0000000000..347bc802a1 --- /dev/null +++ b/sw/source/ui/shells/txtattr.cxx @@ -0,0 +1,875 @@ +/************************************************************************* + * + * $RCSfile: txtattr.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:47 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +#ifdef PRECOMPILED +#include "ui_pch.hxx" +#endif + +#pragma hdrstop + +#include "hintids.hxx" + +#ifndef _MSGBOX_HXX //autogen +#include <vcl/msgbox.hxx> +#endif +#ifndef _SFX_WHITER_HXX //autogen +#include <svtools/whiter.hxx> +#endif +#ifndef _SFXSTRITEM_HXX +#include <svtools/stritem.hxx> +#endif +#ifndef _SFX_BINDINGS_HXX //autogen +#include <sfx2/bindings.hxx> +#endif +#ifndef _SFXREQUEST_HXX //autogen +#include <sfx2/request.hxx> +#endif +#ifndef _SVX_FHGTITEM_HXX //autogen +#include <svx/fhgtitem.hxx> +#endif +#ifndef _SVX_ADJITEM_HXX //autogen +#include <svx/adjitem.hxx> +#endif +#ifndef _SVX_LSPCITEM_HXX //autogen +#include <svx/lspcitem.hxx> +#endif +#ifndef _SVX_UDLNITEM_HXX //autogen +#include <svx/udlnitem.hxx> +#endif +#ifndef _SVX_ESCPITEM_HXX //autogen +#include <svx/escpitem.hxx> +#endif +#ifndef _SVX_HTMLMODE_HXX //autogen +#include <svx/htmlmode.hxx> +#endif + + +#ifndef _FMTINFMT_HXX //autogen +#include <fmtinfmt.hxx> +#endif +#include "cmdid.h" +#include "docsh.hxx" +#include "wrtsh.hxx" +#include "view.hxx" +#include "viewopt.hxx" +#include "uitool.hxx" +#include "uiitems.hxx" +#include "textsh.hxx" +#include "drpcps.hxx" +#include "num.hxx" +#include "swundo.hxx" +#include "fmtcol.hxx" + +#include "globals.h" +#include "shells.hrc" + +const SwTwips lFontInc = 2 * 20; // ==> PointToTwips(2) +const SwTwips lFontMaxSz = 72 * 20; // ==> PointToTwips(72) + + + + + +void SwTextShell::ExecCharAttr(SfxRequest &rReq) +{ + SwWrtShell &rSh = GetShell(); + const SfxItemSet *pArgs = rReq.GetArgs(); + int eState = STATE_TOGGLE; + USHORT nWhich = rReq.GetSlot(); + + if(pArgs ) + { + const SfxPoolItem* pItem; + pArgs->GetItemState(nWhich, FALSE, &pItem); + eState = ((const SfxBoolItem &) pArgs-> + Get( nWhich )).GetValue() ? STATE_ON : STATE_OFF; + } + + + SfxItemSet aSet( GetPool(), RES_CHRATR_BEGIN, RES_CHRATR_END-1 ); + if (STATE_TOGGLE == eState) + rSh.GetAttr( aSet ); + + switch ( nWhich ) + { + case FN_SET_SUB_SCRIPT: + case FN_SET_SUPER_SCRIPT: + { + SvxEscapement eEscape; + switch (eState) + { + case STATE_TOGGLE: + { + short nTmpEsc = ((const SvxEscapementItem&) + aSet.Get( RES_CHRATR_ESCAPEMENT )).GetEsc(); + 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 ) + eEscape = SVX_ESCAPEMENT_OFF; + + SfxBindings& rBind = GetView().GetViewFrame()->GetBindings(); + if( nWhich == FN_SET_SUB_SCRIPT ) + rBind.SetState( SfxBoolItem( FN_SET_SUPER_SCRIPT, + FALSE ) ); + else + rBind.SetState( SfxBoolItem( FN_SET_SUB_SCRIPT, + FALSE ) ); + + } + break; + case STATE_ON: + eEscape = nWhich == FN_SET_SUPER_SCRIPT ? + SVX_ESCAPEMENT_SUPERSCRIPT: + SVX_ESCAPEMENT_SUBSCRIPT; + break; + case STATE_OFF: + eEscape = SVX_ESCAPEMENT_OFF; + break; + } + SvxEscapementItem aEscape( eEscape ); + if(eEscape == SVX_ESCAPEMENT_SUPERSCRIPT) + aEscape.GetEsc() = DFLT_ESC_AUTO_SUPER; + else if(eEscape == SVX_ESCAPEMENT_SUBSCRIPT) + aEscape.GetEsc() = DFLT_ESC_AUTO_SUB; + if(eState != STATE_OFF ) + { + if(eEscape == FN_SET_SUPER_SCRIPT) + aEscape.GetEsc() *= -1; + } + rSh.SetAttr( aEscape ); + } + break; + + case FN_UPDATE_STYLE_BY_EXAMPLE: + rSh.QuickUpdateStyle(); + break; + case FN_UNDERLINE_DOUBLE: + { + FontUnderline eUnderline = ((const SvxUnderlineItem&) + aSet.Get(RES_CHRATR_UNDERLINE)).GetUnderline(); + switch( eState ) + { + case STATE_TOGGLE: + eUnderline = eUnderline == UNDERLINE_DOUBLE ? + UNDERLINE_NONE : + UNDERLINE_DOUBLE; + break; + case STATE_ON: + eUnderline = UNDERLINE_DOUBLE; + break; + case STATE_OFF: + eUnderline = UNDERLINE_NONE; + break; + } + rSh.SetAttr(SvxUnderlineItem(eUnderline)); + } + break; + default: + ASSERT(FALSE, falscher Dispatcher); + return; + } +} + + + +void SwTextShell::ExecCharButtonAttr(SfxRequest &rReq) +{ + const SfxItemSet *pArgs = rReq.GetArgs(); + if (pArgs) + { + SwWrtShell& rWrtSh = GetShell(); + SwTxtFmtColl* pColl = rWrtSh.GetCurTxtFmtColl(); + if(rWrtSh.HasSelection() && + rWrtSh.IsSelFullPara() && + pColl && pColl->IsAutoUpdateFmt()) + { + rWrtSh.AutoUpdatePara(pColl, *pArgs); + } + else + rWrtSh.SetAttr(*pArgs); + + } +} + + + +void SwTextShell::ExecCharAttrArgs(SfxRequest &rReq) +{ + int nSlot = rReq.GetSlot(); + const SfxItemSet* pArgs = rReq.GetArgs(); + BOOL bArgs = pArgs != 0 && pArgs->Count() > 0; + int bGrow = FALSE; + SwWrtShell& rWrtSh = GetShell(); + SwTxtFmtColl* pColl = 0; + // nur gesetzt, wenn gesamter Absatz selektiert ist und AutoUpdateFmt gesetzt ist + if(rWrtSh.HasSelection() && + rWrtSh.IsSelFullPara()) + { + pColl = rWrtSh.GetCurTxtFmtColl(); + if(pColl && !pColl->IsAutoUpdateFmt()) + pColl = 0; + } + USHORT nWhich = GetPool().GetWhich(nSlot); + switch ( nSlot ) + { + case FN_TXTATR_INET: + // Sonderbehandlung der PoolId des SwFmtInetFmt + if(bArgs) + { + const SfxPoolItem& rItem = pArgs->Get(nWhich ); + + SwFmtINetFmt aINetFmt((const SwFmtINetFmt&)rItem); + if( USHRT_MAX == aINetFmt.GetVisitedFmtId() ) + { + aINetFmt.SetVisitedFmtId( + rWrtSh.GetPoolId( aINetFmt.GetVisitedFmt(), GET_POOLID_CHRFMT)); + } + if( USHRT_MAX == aINetFmt.GetINetFmtId() ) + { + aINetFmt.SetINetFmtId( + rWrtSh.GetPoolId( aINetFmt.GetINetFmt(), GET_POOLID_CHRFMT)); + } + + + if ( pColl ) + pColl->SetAttr( aINetFmt ); + else rWrtSh.SetAttr( aINetFmt ); + } + break; + case SID_ATTR_CHAR_WORDLINEMODE: + case SID_ATTR_CHAR_CASEMAP: + case SID_ATTR_CHAR_LANGUAGE: + case SID_ATTR_CHAR_KERNING: + if( bArgs ) + { + const SfxPoolItem& rItem = pArgs->Get(nWhich ); + if ( pColl ) pColl->SetAttr( rItem ); + else rWrtSh.SetAttr( rItem ); + } + break; + case FN_GROW_FONT_SIZE: + bGrow = TRUE; + // kein break !! + case FN_SHRINK_FONT_SIZE: + { + SfxItemSet aSet( GetPool(), RES_CHRATR_FONTSIZE, RES_CHRATR_FONTSIZE); + rWrtSh.GetAttr( aSet ); + SvxFontHeightItem aSize( (const SvxFontHeightItem&) + aSet.Get(RES_CHRATR_FONTSIZE) ); + + SwTwips lSize = (SwTwips) aSize.GetHeight(); + + if (bGrow) + { + if( lSize == lFontMaxSz ) + break; // das wars, hoeher gehts nicht + if( ( lSize += lFontInc ) > lFontMaxSz ) + lSize = lFontMaxSz; + } + else + { + if( 4 == lSize ) + break; + if( ( lSize -= lFontInc ) < 4 ) + lSize = 4; + } + aSize.SetHeight( lSize ); + aSet.Put( aSize ); + if (pColl) pColl->SetAttr(aSet); + else rWrtSh.SetAttr( aSet ); + } + break; + default: + ASSERT(FALSE, falscher Dispatcher); + return; + } +} + + + +#ifdef CFRONT + +void lcl_SetAdjust(SvxAdjust eAdjst, SfxItemSet& rSet) +{ + rSet.Put(SvxAdjustItem(eAdjst,RES_PARATR_ADJUST )); +} + + + +void lcl_SetLineSpace(BYTE ePropL,SfxItemSet& rSet) +{ + SvxLineSpacingItem aLineSpacing(ePropL, RES_PARATR_LINESPACING ); + aLineSpacing.GetLineSpaceRule() = SVX_LINE_SPACE_AUTO; + if( 100 == ePropL ) + aLineSpacing.GetInterLineSpaceRule() = SVX_INTER_LINE_SPACE_OFF; + else + aLineSpacing.SetPropLineSpace(ePropL); + rSet.Put( aLineSpacing ); +} + + + +void SwTextShell::ExecParaAttr(SfxRequest &rReq) +{ + // gleiche beide Attribute holen, ist nicht teuerer !! + SfxItemSet aSet( GetPool(), RES_PARATR_LINESPACING, RES_PARATR_ADJUST ); + + switch (rReq.GetSlot()) + { + case FN_SET_LEFT_PARA: lcl_SetAdjust(ADJLEFT,aSet); break; + case FN_SET_RIGHT_PARA: lcl_SetAdjust(ADJRIGHT,aSet); break; + case FN_SET_CENTER_PARA: lcl_SetAdjust(ADJCENTER,aSet); break; + case SID_ATTR_PARA_ADJUST_BLOCK:lcl_SetAdjust(ADJBLOCK,aSet); break; + + case FN_SET_LINE_SPACE_1: lcl_SetLineSpace(100,aSet); break; + case FN_SET_LINE_SPACE_15: lcl_SetLineSpace(150,aSet); break; + case FN_SET_LINE_SPACE_2: lcl_SetLineSpace(200,aSet); break; + + default: + DBG_ERROR("SwTextShell::ExecParaAttr falscher Dispatcher"); + return; + } + SwWrtShell& rWrtSh = GetShell(); + SwTxtFmtColl* pColl = rWrtSh.GetCurTxtFmtColl(); + if(pColl && pColl->IsAutoUpdateFmt()) + { + rWrtSh.AutoUpdatePara(pColl, *pSet); + } + else + rWrtSh.SetAttr( aSet ); +} + +#else + + + +void SwTextShell::ExecParaAttr(SfxRequest &rReq) +{ + SvxAdjust eAdjst; + BYTE ePropL; + const SfxItemSet* pArgs = rReq.GetArgs(); + + // gleich beide Attribute holen, ist nicht teuerer !! + SfxItemSet aSet( GetPool(), RES_PARATR_LINESPACING, RES_PARATR_ADJUST ); + + USHORT nSlot = rReq.GetSlot(); + switch (nSlot) + { + case SID_ATTR_PARA_ADJUST: + if(pArgs && SFX_ITEM_SET == pArgs->GetItemState( RES_PARATR_ADJUST) ) + { + eAdjst = ((const SvxAdjustItem&)pArgs->Get( + RES_PARATR_ADJUST)).GetAdjust(); + goto SET_ADJUST; + } + break; + case SID_ATTR_PARA_ADJUST_LEFT: eAdjst = SVX_ADJUST_LEFT; goto SET_ADJUST; + case SID_ATTR_PARA_ADJUST_RIGHT: eAdjst = SVX_ADJUST_RIGHT; goto SET_ADJUST; + case SID_ATTR_PARA_ADJUST_CENTER: eAdjst = SVX_ADJUST_CENTER; goto SET_ADJUST; + case SID_ATTR_PARA_ADJUST_BLOCK: eAdjst = SVX_ADJUST_BLOCK; goto SET_ADJUST; +SET_ADJUST: + { + aSet.Put(SvxAdjustItem(eAdjst,RES_PARATR_ADJUST )); + } + break; + + case SID_ATTR_PARA_LINESPACE: + if(pArgs && SFX_ITEM_SET == pArgs->GetItemState( GetPool().GetWhich(nSlot) )) + { + SvxLineSpacingItem aLineSpace = (const SvxLineSpacingItem&)pArgs->Get( + GetPool().GetWhich(nSlot)); + aSet.Put( aLineSpace ); + } + break; + case SID_ATTR_PARA_LINESPACE_10: ePropL = 100; goto SET_LINESPACE; + case SID_ATTR_PARA_LINESPACE_15: ePropL = 150; goto SET_LINESPACE; + case SID_ATTR_PARA_LINESPACE_20: ePropL = 200; goto SET_LINESPACE; + +SET_LINESPACE: + { + + SvxLineSpacingItem aLineSpacing(ePropL, RES_PARATR_LINESPACING ); + aLineSpacing.GetLineSpaceRule() = SVX_LINE_SPACE_AUTO; + if( 100 == ePropL ) + aLineSpacing.GetInterLineSpaceRule() = SVX_INTER_LINE_SPACE_OFF; + else + aLineSpacing.SetPropLineSpace(ePropL); + aSet.Put( aLineSpacing ); + } + break; + + default: + ASSERT(FALSE, falscher Dispatcher); + return; + } + SwWrtShell& rWrtSh = GetShell(); + SwTxtFmtColl* pColl = rWrtSh.GetCurTxtFmtColl(); + if(pColl && pColl->IsAutoUpdateFmt()) + { + rWrtSh.AutoUpdatePara(pColl, aSet); + } + else + rWrtSh.SetAttr( aSet ); +} + +#endif + + + +void SwTextShell::ExecParaAttrArgs(SfxRequest &rReq) +{ + SwWrtShell &rSh = GetShell(); + const SfxItemSet *pArgs = rReq.GetArgs(); + const SfxPoolItem *pItem = 0; + + USHORT nSlot = rReq.GetSlot(); + if(pArgs) + pArgs->GetItemState(GetPool().GetWhich(nSlot), FALSE, &pItem); + switch ( nSlot ) + { + case FN_FORMAT_DROPCAPS: + { + if(pItem) + rSh.SetAttr(*pItem); + else + { + SfxItemSet aSet(GetPool(), RES_PARATR_DROP, RES_PARATR_DROP, + HINT_END, HINT_END); + rSh.GetAttr(aSet); + SwDropCapsDlg *pDlg = new SwDropCapsDlg(GetView().GetWindow(), aSet); + if (pDlg->Execute() == RET_OK) + { + rSh.StartAction(); + rSh.StartUndo( UNDO_START ); + if ( SFX_ITEM_SET == aSet.GetItemState(HINT_END,FALSE,&pItem) ) + { + if ( ((SfxStringItem*)pItem)->GetValue().Len() ) + rSh.ReplaceDropTxt(((SfxStringItem*)pItem)->GetValue()); + } + rSh.SetAttr(*pDlg->GetOutputItemSet()); + rSh.StartUndo( UNDO_END ); + rSh.EndAction(); + } + delete pDlg; + } + } + break; + case SID_ATTR_PARA_PAGEBREAK: + if(pItem) + { + rSh.SetAttr( *pItem ); + } + break; + case SID_ATTR_PARA_MODEL: + { + if(pItem) + { + SfxItemSet aCoreSet( GetPool(), + RES_PAGEDESC, RES_PAGEDESC, + SID_ATTR_PARA_MODEL, SID_ATTR_PARA_MODEL, 0); + aCoreSet.Put(*pItem); + SfxToSwPageDescAttr( rSh, aCoreSet); + rSh.SetAttr(aCoreSet); + } + } + break; + default: + ASSERT(FALSE, falscher Dispatcher); + return; + } +} + + + +void SwTextShell::GetAttrState(SfxItemSet &rSet) +{ + SwWrtShell &rSh = GetShell(); + SfxItemPool& rPool = GetPool(); + SfxItemSet aCoreSet(rPool, aTxtFmtCollSetRange); + rSh.GetAttr(aCoreSet); // *alle* Textattribute von der Core erfragen + + SfxWhichIter aIter(rSet); + register USHORT nSlot = aIter.FirstWhich(); + register int bFlag; + SfxBoolItem aFlagItem; + const SfxPoolItem* pItem = 0; + int eAdjust = -1; // Illegaler Wert, um DONTCARE zu erkennen + SfxItemState eState = aCoreSet.GetItemState(RES_PARATR_ADJUST, FALSE, &pItem); + + if( SFX_ITEM_DEFAULT == eState ) + pItem = &rPool.GetDefaultItem(RES_PARATR_ADJUST); + if( SFX_ITEM_DEFAULT <= eState ) + eAdjust = (int)(( SvxAdjustItem* ) pItem)->GetAdjust(); + + short nEsc = 0; + eState = aCoreSet.GetItemState(RES_CHRATR_ESCAPEMENT, FALSE, &pItem); + if( SFX_ITEM_DEFAULT == eState ) + pItem = &rPool.GetDefaultItem(RES_CHRATR_ESCAPEMENT); + if( eState >= SFX_ITEM_DEFAULT ) + nEsc = ((SvxEscapementItem* )pItem)->GetEsc(); + + USHORT nLineSpace = 0; + eState = aCoreSet.GetItemState(RES_PARATR_LINESPACING, FALSE, &pItem); + if( SFX_ITEM_DEFAULT == eState ) + pItem = &rPool.GetDefaultItem(RES_PARATR_LINESPACING); + if( SFX_ITEM_DEFAULT <= eState && + ((SvxLineSpacingItem* )pItem)->GetLineSpaceRule() == SVX_LINE_SPACE_AUTO ) + { + if(SVX_INTER_LINE_SPACE_OFF == + ((SvxLineSpacingItem* )pItem)->GetInterLineSpaceRule()) + nLineSpace = 100; + else + nLineSpace = ((SvxLineSpacingItem* )pItem)->GetPropLineSpace(); + } + + while (nSlot) + { + switch(nSlot) + { + case FN_SET_SUPER_SCRIPT: + bFlag = 0 < nEsc; + break; + case FN_SET_SUB_SCRIPT: + bFlag = 0 > nEsc; + break; + case SID_ATTR_PARA_ADJUST_LEFT: + if (eAdjust == -1) + { + rSet.InvalidateItem( nSlot ); + nSlot = 0; + } + else + bFlag = SVX_ADJUST_LEFT == eAdjust; + break; + case SID_ATTR_PARA_ADJUST_RIGHT: + if (eAdjust == -1) + { + rSet.InvalidateItem( nSlot ); + nSlot = 0; + } + else + bFlag = SVX_ADJUST_RIGHT == eAdjust; + break; + case SID_ATTR_PARA_ADJUST_CENTER: + if (eAdjust == -1) + { + rSet.InvalidateItem( nSlot ); + nSlot = 0; + } + else + bFlag = SVX_ADJUST_CENTER == eAdjust; + break; + case SID_ATTR_PARA_ADJUST_BLOCK: + { + if (eAdjust == -1) + { + rSet.InvalidateItem( nSlot ); + nSlot = 0; + } + else + { + bFlag = SVX_ADJUST_BLOCK == eAdjust; + USHORT nHtmlMode = GetHtmlMode(rSh.GetView().GetDocShell()); + if((nHtmlMode & HTMLMODE_ON) && !(nHtmlMode & (HTMLMODE_FULL_STYLES|HTMLMODE_FIRSTLINE) )) + { + rSet.DisableItem( nSlot ); + nSlot = 0; + } + } + } + break; + case SID_ATTR_PARA_LINESPACE_10: + bFlag = nLineSpace == 100; + break; + case SID_ATTR_PARA_LINESPACE_15: + bFlag = nLineSpace == 150; + break; + case SID_ATTR_PARA_LINESPACE_20: + bFlag = nLineSpace == 200; + break; + case FN_GROW_FONT_SIZE: + case FN_SHRINK_FONT_SIZE: + { + SfxItemState eState = aCoreSet.GetItemState( RES_CHRATR_FONTSIZE ); + if( eState == SFX_ITEM_DONTCARE ) + rSet.DisableItem( nSlot ); + nSlot = 0; + } + break; + case FN_UNDERLINE_DOUBLE: + { + eState = aCoreSet.GetItemState(RES_CHRATR_UNDERLINE); + if( eState >= SFX_ITEM_DEFAULT ) + { + FontUnderline eUnderline = ((const SvxUnderlineItem&) + aCoreSet.Get(RES_CHRATR_UNDERLINE)).GetUnderline(); + rSet.Put(SfxBoolItem(nSlot, eUnderline == UNDERLINE_DOUBLE)); + } + else + rSet.InvalidateItem(nSlot); + nSlot = 0; + } + break; + case SID_ATTR_PARA_ADJUST: + if (eAdjust == -1) + rSet.InvalidateItem( nSlot ); + else + rSet.Put(SvxAdjustItem((SvxAdjust)eAdjust, SID_ATTR_PARA_ADJUST )); + nSlot = 0; + break; + case SID_ATTR_CHAR_CASEMAP: + case SID_ATTR_CHAR_LANGUAGE: + case SID_ATTR_CHAR_KERNING: + case SID_ATTR_PARA_HYPHENZONE: + case SID_ATTR_PARA_KEEP: + case SID_ATTR_PARA_WIDOWS: + case SID_ATTR_PARA_ORPHANS: + case RES_PARATR_DROP: + { +#ifdef DEBUG + const SfxPoolItem& rItem = aCoreSet.Get(GetPool().GetWhich(nSlot), TRUE); + rSet.Put(rItem); +#else + rSet.Put(aCoreSet.Get( GetPool().GetWhich(nSlot), TRUE)); +#endif + nSlot = 0; + } + break; + case SID_ATTR_PARA_MODEL: + { + SfxItemSet aTemp(GetPool(), + RES_PAGEDESC,RES_PAGEDESC, + SID_ATTR_PARA_MODEL,SID_ATTR_PARA_MODEL, + 0L); + aTemp.Put(aCoreSet); + ::SwToSfxPageDescAttr(aTemp); + rSet.Put(aTemp.Get(SID_ATTR_PARA_MODEL)); + nSlot = 0; + } + break; + case RES_TXTATR_INETFMT: + { + SfxItemSet aSet(GetPool(), RES_TXTATR_INETFMT, RES_TXTATR_INETFMT); + rSh.GetAttr(aSet); +#ifdef DEBUG + const SfxPoolItem& rItem = aSet.Get(RES_TXTATR_INETFMT, TRUE); + rSet.Put(rItem); +#else + rSet.Put(aSet.Get( RES_TXTATR_INETFMT, TRUE)); +#endif + nSlot = 0; + } + break; + default: + // Nichts tun + nSlot = 0; + break; + + } + if( nSlot ) + { + aFlagItem.SetWhich( nSlot ); + aFlagItem.SetValue( bFlag ); + rSet.Put( aFlagItem ); + } + nSlot = aIter.NextWhich(); + } + + rSet.Put(aCoreSet,FALSE); +} +/*------------------------------------------------------------------------ + + $Log: not supported by cvs2svn $ + Revision 1.122 2000/09/18 16:06:07 willem.vandorp + OpenOffice header added. + + Revision 1.121 2000/09/07 15:59:30 os + change: SFX_DISPATCHER/SFX_BINDINGS removed + + Revision 1.120 2000/08/31 11:32:12 jp + add missing include + + Revision 1.119 2000/05/26 07:21:33 os + old SW Basic API Slots removed + + Revision 1.118 2000/05/10 11:53:02 os + Basic API removed + + Revision 1.117 2000/02/11 14:58:08 hr + #70473# changes for unicode ( patched by automated patchtool ) + + Revision 1.116 1999/01/04 13:29:16 OS + #60575# Shrink/GrowFontSize: keinen falschen Status liefern + + + Rev 1.115 04 Jan 1999 14:29:16 OS + #60575# Shrink/GrowFontSize: keinen falschen Status liefern + + Rev 1.114 29 Nov 1997 15:54:02 MA + includes + + Rev 1.113 24 Nov 1997 09:47:40 MA + includes + + Rev 1.112 03 Nov 1997 13:55:52 MA + precomp entfernt + + Rev 1.111 22 Oct 1997 12:31:56 OS + StateMethod fuer SID_ATTR_PARA_MODEL #44910# + + Rev 1.110 04 Sep 1997 17:12:04 MA + includes + + Rev 1.109 15 Aug 1997 11:48:40 OS + chartar/frmatr/txtatr aufgeteilt + + Rev 1.108 11 Aug 1997 10:06:46 OS + paraitem/frmitems/textitem aufgeteilt + + Rev 1.107 25 Jun 1997 13:49:50 OS + Ids des SwFmtINetFmt korrigieren #40977# + + Rev 1.106 17 Jun 1997 16:11:58 MA + DrawTxtShell nicht von BaseShell ableiten + Opts + + Rev 1.105 28 May 1997 15:06:32 OM + #40067# DontCare-State fuer Absatzausrichtung beruecksichtigen + + Rev 1.104 24 Mar 1997 15:51:22 OS + Blocksatzerweiterung fuer Html + + Rev 1.103 10 Mar 1997 12:01:20 NF + OS2-Anpassung ... + + Rev 1.102 07 Mar 1997 08:09:38 OS + AutoUpdate fuer Vorlagen: harte Attribute loeschen + + Rev 1.101 06 Mar 1997 16:46:30 OS + AutoUpdate fuer Absatz- und Rahmenvorlagen + + Rev 1.100 05 Mar 1997 21:00:24 HJS + muss 357 + + Rev 1.99 19 Feb 1997 19:10:14 MA + fix: DropCap, Text per Item + + Rev 1.98 27 Jan 1997 16:30:38 OS + HtmlMode entfernt + + Rev 1.97 16 Dec 1996 19:10:38 HJS + includes + + Rev 1.96 14 Dec 1996 14:48:46 OS + kein Blocksatz im HTML-Mode + + Rev 1.95 22 Nov 1996 16:24:46 NF + zwei identische case-bl”cke in einer switch-anweisung -> doppelten entfernt.. + + Rev 1.94 22 Nov 1996 14:53:34 OS + FN_SET_JUSTIFY_PARA -> SID_ATTR_PARA_ADJUST_BLOCK + + Rev 1.93 14 Nov 1996 19:17:56 OS + Umstellung SlotIds + + Rev 1.92 24 Sep 1996 06:58:14 OS + Hoch-/Tiefstellung auf automatisch + + Rev 1.91 09 Sep 1996 15:11:10 OS + SID_APPLY_TEMPLATE mit WrtShell + + Rev 1.90 28 Aug 1996 15:55:16 OS + includes + + Rev 1.89 15 Aug 1996 18:17:16 OS + URL als Attribut - auch fuer die API + + Rev 1.88 26 Jun 1996 15:20:54 OS + Aufruf von Dispatcher.Execute an 324 angepasst + + Rev 1.87 25 Jun 1996 19:52:10 HJS + includes + + Rev 1.86 22 Mar 1996 15:34:38 TRI + sfxiiter.hxx included + + Rev 1.85 21 Mar 1996 11:58:26 MA + Umstellung SV311 + + Rev 1.84 20 Feb 1996 17:02:56 JP + Umbau SfxItemPool -> SwAttrPool + + Rev 1.83 15 Feb 1996 18:04:58 OS + UnderlineDouble und Sub/Superscript arbeiten mit BoolItems + + Rev 1.82 19 Jan 1996 14:39:54 OS + Cast fuer SvxLanguageItem nicht noetig + + Rev 1.81 20 Dec 1995 15:50:26 OS + Status fuer Dropcaps gerichtet + + Rev 1.80 14 Dec 1995 17:25:52 OS + Standard-Adjust auf LEFT + +------------------------------------------------------------------------*/ + + diff --git a/sw/source/ui/shells/txtcrsr.cxx b/sw/source/ui/shells/txtcrsr.cxx new file mode 100644 index 0000000000..da286b7b86 --- /dev/null +++ b/sw/source/ui/shells/txtcrsr.cxx @@ -0,0 +1,412 @@ +/************************************************************************* + * + * $RCSfile: txtcrsr.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:47 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +#ifdef PRECOMPILED +#include "ui_pch.hxx" +#endif + +#pragma hdrstop + +#ifndef _SFXREQUEST_HXX //autogen +#include <sfx2/request.hxx> +#endif +#ifndef _SFXENUMITEM_HXX //autogen +#include <svtools/eitem.hxx> +#endif +#ifndef __SBX_SBXVARIABLE_HXX //autogen +#include <svtools/sbxvar.hxx> +#endif +#ifndef _ARGS_HXX //autogen +#include <svtools/args.hxx> +#endif + + +#include "view.hxx" +#include "cmdid.h" +#include "wrtsh.hxx" +#include "globals.hrc" +#include "textsh.hxx" +#include "num.hxx" +#include "bookmrk.hxx" +#include "edtwin.hxx" +#include "globals.h" + + + + + +void SwTextShell::ExecBasicMove(SfxRequest &rReq) +{ + SwWrtShell &rSh = GetShell(); + GetView().GetEditWin().FlushInBuffer( &rSh ); + + USHORT nSlot = rReq.GetSlot(); + switch(nSlot) + { + case FN_CHAR_LEFT_SEL: + case FN_CHAR_LEFT: rSh.Left ( FN_CHAR_LEFT_SEL == nSlot, 1 ); break; + case FN_CHAR_RIGHT_SEL: + case FN_CHAR_RIGHT: rSh.Right( FN_CHAR_RIGHT_SEL == nSlot, 1 ); break; + case FN_LINE_UP_SEL: + case FN_LINE_UP: rSh.Up ( FN_LINE_UP_SEL == nSlot, 1 ); break; + case FN_LINE_DOWN_SEL: + case FN_LINE_DOWN: rSh.Down ( FN_LINE_DOWN_SEL == nSlot, 1 ); break; + default: ASSERT(FALSE, falscher Dispatcher); return; + } +} + +void SwTextShell::ExecMove(SfxRequest &rReq) +{ + SwWrtShell &rSh = GetShell(); + GetView().GetEditWin().FlushInBuffer( &rSh ); + + USHORT nSlot = rReq.GetSlot(); + BOOL bRet = FALSE; + switch ( nSlot ) + { + case FN_START_OF_LINE_SEL: + case FN_START_OF_LINE: bRet = rSh.LeftMargin ( FN_START_OF_LINE_SEL == nSlot ); + break; + + case FN_END_OF_LINE_SEL: + case FN_END_OF_LINE: bRet = rSh.RightMargin( FN_END_OF_LINE_SEL == nSlot ); + break; + + case FN_START_OF_DOCUMENT_SEL: + case FN_START_OF_DOCUMENT: bRet = rSh.SttDoc ( FN_START_OF_DOCUMENT_SEL == nSlot); + break; + + case FN_END_OF_DOCUMENT_SEL: + case FN_END_OF_DOCUMENT: bRet = rSh.EndDoc( FN_END_OF_DOCUMENT_SEL == nSlot ); + break; + + case FN_SELECT_WORD: rSh.SelNearestWrd(); break; + + case SID_SELECTALL: rSh.SelAll(); break; + default: ASSERT(FALSE, falscher Dispatcher); return; + } +} + +void SwTextShell::ExecMovePage(SfxRequest &rReq) +{ + SwWrtShell &rSh = GetShell(); + GetView().GetEditWin().FlushInBuffer( &rSh ); + + USHORT nSlot = rReq.GetSlot(); + switch( nSlot ) + { + case FN_START_OF_NEXT_PAGE_SEL : + case FN_START_OF_NEXT_PAGE: rSh.SttNxtPg( FN_START_OF_NEXT_PAGE_SEL == nSlot ); break; + + case FN_END_OF_NEXT_PAGE_SEL: + case FN_END_OF_NEXT_PAGE: rSh.EndNxtPg( FN_END_OF_NEXT_PAGE_SEL == nSlot ); break; + + case FN_START_OF_PREV_PAGE_SEL: + case FN_START_OF_PREV_PAGE: rSh.SttPrvPg( FN_START_OF_PREV_PAGE_SEL == nSlot ); break; + + case FN_END_OF_PREV_PAGE_SEL: + case FN_END_OF_PREV_PAGE: rSh.EndPrvPg( FN_END_OF_PREV_PAGE_SEL == nSlot ); break; + + case FN_START_OF_PAGE_SEL: + case FN_START_OF_PAGE: rSh.SttPg ( FN_START_OF_PAGE_SEL == nSlot ); break; + + case FN_END_OF_PAGE_SEL: + case FN_END_OF_PAGE: rSh.EndPg ( FN_END_OF_PAGE_SEL == nSlot ); break; + default: ASSERT(FALSE, falscher Dispatcher); return; + } +} + + +void SwTextShell::ExecMoveCol(SfxRequest &rReq) +{ + SwWrtShell &rSh = GetShell(); + switch ( rReq.GetSlot() ) + { + case FN_START_OF_COLUMN: rSh.StartOfColumn ( FALSE ); break; + case FN_END_OF_COLUMN: rSh.EndOfColumn ( FALSE ); break; + case FN_START_OF_NEXT_COLUMN: rSh.StartOfNextColumn( FALSE ) ; break; + case FN_END_OF_NEXT_COLUMN: rSh.EndOfNextColumn ( FALSE ); break; + case FN_START_OF_PREV_COLUMN: rSh.StartOfPrevColumn( FALSE ); break; + case FN_END_OF_PREV_COLUMN: rSh.EndOfPrevColumn ( FALSE ); break; + default: ASSERT(FALSE, falscher Dispatcher); return; + } +} + +void SwTextShell::ExecMoveLingu(SfxRequest &rReq) +{ + SwWrtShell &rSh = GetShell(); + GetView().GetEditWin().FlushInBuffer( GetShellPtr() ); + + USHORT nSlot = rReq.GetSlot(); + BOOL bRet = FALSE; + switch ( nSlot ) + { + case FN_NEXT_WORD_SEL: + case FN_NEXT_WORD: bRet = rSh.NxtWrd( FN_NEXT_WORD_SEL == nSlot ); + break; + + case FN_START_OF_PARA_SEL: + case FN_START_OF_PARA: bRet = rSh.SttPara( FN_START_OF_PARA_SEL == nSlot ); + break; + + case FN_END_OF_PARA_SEL: + case FN_END_OF_PARA: bRet = rSh.EndPara( FN_END_OF_PARA_SEL == nSlot ); + break; + + case FN_PREV_WORD_SEL: + case FN_PREV_WORD: bRet = rSh.PrvWrd( FN_PREV_WORD_SEL == nSlot ); + break; + + case FN_NEXT_SENT_SEL: + case FN_NEXT_SENT: bRet = rSh.FwdSentence( FN_NEXT_SENT_SEL == nSlot ); + break; + + case FN_PREV_SENT_SEL: + case FN_PREV_SENT: bRet = rSh.BwdSentence( FN_PREV_SENT_SEL == nSlot ); + break; + + case FN_NEXT_PARA: bRet = rSh.FwdPara ( FALSE ); + break; + + case FN_PREV_PARA: bRet = rSh.BwdPara ( FALSE ); + break; + default: ASSERT(FALSE, falscher Dispatcher); return; + } +} + +void SwTextShell::ExecMoveMisc(SfxRequest &rReq) +{ + SwWrtShell &rSh = GetShell(); + USHORT nSlot = rReq.GetSlot(); + BOOL bSetRetVal = TRUE, bRet = TRUE; + switch ( nSlot ) + { + case FN_CNTNT_TO_NEXT_FRAME: + bRet = rSh.GotoFlyTxt(); + break; + case FN_NEXT_FOOTNOTE: + rSh.MoveCrsr(); + bRet = rSh.GotoNextFtnAnchor(); + break; + case FN_PREV_FOOTNOTE: + rSh.MoveCrsr(); + bRet = rSh.GotoPrevFtnAnchor(); + break; + case FN_TO_HEADER: + rSh.MoveCrsr(); + if ( FRMTYPE_HEADER & rSh.GetFrmType(0,FALSE) ) + rSh.SttPg(); + else + rSh.GotoHeaderTxt(); + bSetRetVal = FALSE; + break; + case FN_TO_FOOTER: + rSh.MoveCrsr(); + if ( FRMTYPE_FOOTER & rSh.GetFrmType(0,FALSE) ) + rSh.EndPg(); + else + rSh.GotoFooterTxt(); + bSetRetVal = FALSE; + break; + case FN_FOOTNOTE_TO_ANCHOR: + rSh.MoveCrsr(); + if ( FRMTYPE_FOOTNOTE & rSh.GetFrmType(0,FALSE) ) + rSh.GotoFtnAnchor(); + else + rSh.GotoFtnTxt(); + bSetRetVal = FALSE; + break; + case FN_PREV_TABLE: + bRet = rSh.MoveTable( fnTablePrev, fnTableStart); + break; + case FN_NEXT_TABLE: + bRet = rSh.MoveTable(fnTableNext, fnTableStart); + break; + case FN_GOTO_NEXT_REGION : + bRet = rSh.MoveRegion(fnRegionNext, fnRegionStart); + break; + case FN_GOTO_PREV_REGION : + bRet = rSh.MoveRegion(fnRegionPrev, fnRegionStart); + break; + + case FN_NEXT_TOXMARK: + bRet = rSh.GotoNxtPrvTOXMark( TRUE ); + break; + case FN_PREV_TOXMARK: + bRet = rSh.GotoNxtPrvTOXMark( FALSE ); + break; + case FN_NEXT_TBLFML: + bRet = rSh.GotoNxtPrvTblFormula( TRUE, FALSE ); + break; + case FN_PREV_TBLFML: + bRet = rSh.GotoNxtPrvTblFormula( FALSE, FALSE ); + break; + case FN_NEXT_TBLFML_ERR: + bRet = rSh.GotoNxtPrvTblFormula( TRUE, TRUE ); + break; + case FN_PREV_TBLFML_ERR: + bRet = rSh.GotoNxtPrvTblFormula( FALSE, TRUE ); + break; + + default: + ASSERT(FALSE, falscher Dispatcher); + return; + } + + if( bSetRetVal ) + rReq.SetReturnValue(SfxBoolItem( nSlot, bRet )); + +} + +/*------------------------------------------------------------------------ + + $Log: not supported by cvs2svn $ + Revision 1.47 2000/09/18 16:06:07 willem.vandorp + OpenOffice header added. + + Revision 1.46 2000/05/26 07:21:33 os + old SW Basic API Slots removed + + Revision 1.45 2000/05/09 14:41:35 os + BASIC interface partially removed + + Revision 1.44 1999/04/26 11:06:12 KZ + #include <svtools/args.hxx> eingefuegt + + + Rev 1.43 26 Apr 1999 13:06:12 KZ + #include <svtools/args.hxx> eingefuegt + + Rev 1.42 14 Jan 1999 15:50:26 JP + Bug #60794#: Fehlererkennung beim Tabellenrechnen und anspringen von Formeln + + Rev 1.41 27 Nov 1998 14:56:08 AMA + Fix #59951#59825#: Unterscheiden zwischen Rahmen-,Seiten- und Bereichsspalten + + Rev 1.40 17 Aug 1998 16:09:12 OS + GPF nach Shellwechsel waehrend Recording #55041# + + Rev 1.39 12 Feb 1998 20:12:44 JP + Left-/RightMargin: zus. Flag fuer BasicCall + + Rev 1.38 24 Nov 1997 09:47:54 MA + includes + + Rev 1.37 03 Nov 1997 13:55:54 MA + precomp entfernt + + Rev 1.36 04 Sep 1997 17:12:04 MA + includes + + Rev 1.35 07 Apr 1997 17:48:12 MH + chg: header + + Rev 1.34 06 Mar 1997 12:28:12 JP + Left/Right/Up/Down: bei API-Calls in ReadOnly Docs normale verhalten + + Rev 1.33 23 Feb 1997 22:27:04 OS + diverse Move-Slots mit BOOL - return + + Rev 1.32 20 Feb 1997 17:17:38 OS + JumpToPrev/NextRegion + + Rev 1.31 07 Feb 1997 14:06:06 OS + GoLeft/Right/Up/Down ueber for-Schleife aufrufen #35596# + + Rev 1.30 29 Aug 1996 11:40:04 OS + Next/PrevFootnote liefern BOOL + + Rev 1.29 28 Aug 1996 15:54:56 OS + includes + + Rev 1.28 13 Feb 1996 09:51:28 OS + JumpToPrev/NextTable/Frame erhalten return type BOOL + + Rev 1.27 24 Jan 1996 15:18:36 OS + Selection-Param ist Bool und nicht Int16, Bug #23549# + + Rev 1.26 24 Nov 1995 16:59:36 OM + PCH->PRECOMPILED + + Rev 1.25 23 Nov 1995 19:52:02 OS + +FN_SELECT_ALL fuer PM2, +Next/PrevPara + + Rev 1.24 10 Nov 1995 15:29:44 OS + GotoVariable/Region an die Baseshell + + Rev 1.23 09 Nov 1995 17:59:54 OS + neue Slots fuer Grosskunden + + Rev 1.22 23 Oct 1995 17:33:36 OS + *_SEL auf * umgeappt + + Rev 1.21 22 Sep 1995 16:58:18 OS + Schoenheitskorrektur: GetArgs() fuellt immer pArgs! + + Rev 1.20 18 Sep 1995 14:04:38 OS + geht wieder mit PCH + + Rev 1.19 04 Sep 1995 14:13:08 HJS + add: #include <sbx.hxx> + +------------------------------------------------------------------------*/ + + diff --git a/sw/source/ui/shells/txtnum.cxx b/sw/source/ui/shells/txtnum.cxx new file mode 100644 index 0000000000..28aba4fc11 --- /dev/null +++ b/sw/source/ui/shells/txtnum.cxx @@ -0,0 +1,439 @@ +/************************************************************************* + * + * $RCSfile: txtnum.cxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: hr $ $Date: 2000-09-18 17:14:47 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +#ifdef PRECOMPILED +#include "ui_pch.hxx" +#endif + +#pragma hdrstop + +#include <hintids.hxx> +#ifndef _MSGBOX_HXX //autogen +#include <vcl/msgbox.hxx> +#endif +#ifndef _SFXREQUEST_HXX //autogen +#include <sfx2/request.hxx> +#endif +#ifndef _SFXENUMITEM_HXX //autogen +#include <svtools/eitem.hxx> +#endif +#ifndef _SFXSTRITEM_HXX //autogen +#include <svtools/stritem.hxx> +#endif +#ifndef _SVX_NUMITEM_HXX //autogen +#include <svx/numitem.hxx> +#endif +#ifndef _SVX_BRSHITEM_HXX //autogen wg. SvxBrushItem +#include <svx/brshitem.hxx> +#endif + +#include "cmdid.h" +#include "wrtsh.hxx" +#include "view.hxx" +#include "viewopt.hxx" +#include "wdocsh.hxx" +#include "textsh.hxx" +#include "uiitems.hxx" +#include "num.hxx" + +void SwTextShell::ExecEnterNum(SfxRequest &rReq) +{ + //wg. Aufzeichnung schon vor dem evtl. Shellwechsel + switch(rReq.GetSlot()) + { + case FN_NUM_NUMBERING_ON: + { + if(!GetShell().GetCurNumRule()) + GetShell().NumOn(); + else + GetShell().DelNumRules(); + } + break; + case FN_NUMBER_BULLETS: + { + // per default TRUE, damit die Schleife im Dialog richtig arbeitet! + BOOL bHasChild = TRUE; + SfxItemSet aSet(GetPool(), + SID_HTML_MODE, SID_HTML_MODE, + SID_ATTR_NUMBERING_RULE, SID_PARAM_CUR_NUM_LEVEL, + 0 ); + SwDocShell* pDocSh = GetView().GetDocShell(); + BOOL bHtml = 0 != PTR_CAST(SwWebDocShell, pDocSh); + const SwNumRule* pCurRule = GetShell().GetCurNumRule(); + if( pCurRule ) + { + SvxNumRule aRule = pCurRule->MakeSvxNumRule(); + + //convert type of linked bitmaps from SVX_NUM_BITMAP to (SVX_NUM_BITMAP|LINK_TOKEN) + for(USHORT i = 0; i < aRule.GetLevelCount(); i++) + { + SvxNumberFormat aFmt(aRule.GetLevel(i)); + if(SVX_NUM_BITMAP == aFmt.GetNumType()) + { + const SvxBrushItem* pBrush = aFmt.GetBrush(); + const String* pLinkStr; + if(pBrush && + 0 != (pLinkStr = pBrush->GetGraphicLink()) && + pLinkStr->Len()) + aFmt.SetNumType(SvxExtNumType(SVX_NUM_BITMAP|LINK_TOKEN)); + aRule.SetLevel(i, aFmt, aRule.Get(i) != 0); + } + } + if(bHtml) + aRule.SetFeatureFlag(NUM_ENABLE_EMBEDDED_BMP, FALSE); + + aSet.Put(SvxNumBulletItem(aRule)); + USHORT nLevel = GetShell().GetNumLevel( &bHasChild ) & ~NO_NUMLEVEL; + if( nLevel < MAXLEVEL ) + { + nLevel = 1<<nLevel; + aSet.Put( SfxUInt16Item( SID_PARAM_CUR_NUM_LEVEL, nLevel )); + } + } + else + { + SwNumRule aRule( GetShell().GetUniqueNumRuleName() ); + SvxNumRule aSvxRule = aRule.MakeSvxNumRule(); + if(bHtml) + { + for( BYTE n = 1; n < MAXLEVEL; ++n ) + { + SvxNumberFormat aFmt( aSvxRule.GetLevel( n ) ); + // 1/2" fuer HTML + aFmt.SetLSpace(720); + aFmt.SetAbsLSpace(n * 720); + aSvxRule.SetLevel( n, aFmt, FALSE ); + } + aSvxRule.SetFeatureFlag(NUM_ENABLE_EMBEDDED_BMP, FALSE); + } + aSet.Put(SvxNumBulletItem(aSvxRule)); + } + + aSet.Put( SfxBoolItem( SID_PARAM_CHILD_LEVELS, bHasChild )); + aSet.Put( SfxBoolItem( SID_PARAM_NUM_PRESET,FALSE )); + + // vor dem Dialog wird der HtmlMode an der DocShell versenkt + pDocSh->PutItem(SfxUInt16Item(SID_HTML_MODE, ::GetHtmlMode(pDocSh))); + + SwSvxNumBulletTabDialog* pDlg = new SwSvxNumBulletTabDialog( + GetView().GetWindow(), &aSet, GetShell() ); + + USHORT nRet = pDlg->Execute(); + if(RET_OK == nRet ) + { + const SfxPoolItem* pItem; + if( SFX_ITEM_SET == pDlg->GetOutputItemSet()->GetItemState( + SID_ATTR_NUMBERING_RULE, FALSE, &pItem )) + { + SvxNumRule* pSetRule = ((SvxNumBulletItem*)pItem)->GetNumRule(); + pSetRule->UnLinkGraphics(); + SwNumRule aSetRule( pCurRule + ? pCurRule->GetName() + : GetShell().GetUniqueNumRuleName()); + aSetRule.SetSvxRule( *pSetRule, GetShell().GetDoc()); + aSetRule.SetAutoRule( TRUE ); + GetShell().SetCurNumRule( aSetRule ); + } + // wenn der Dialog mit OK verlassen wurde, aber nichts ausgewaehlt + // wurde dann muss die Numerierung zumindest eingeschaltet werden, + // wenn sie das noch nicht ist + else if( !pCurRule && + SFX_ITEM_SET == aSet.GetItemState( + SID_ATTR_NUMBERING_RULE, FALSE, &pItem )) + { + SvxNumRule* pSetRule = ((SvxNumBulletItem*)pItem)->GetNumRule(); + SwNumRule aSetRule(GetShell().GetUniqueNumRuleName()); + aSetRule.SetSvxRule(*pSetRule, GetShell().GetDoc()); + aSetRule.SetAutoRule( TRUE ); + GetShell().SetCurNumRule( aSetRule ); + } + } + else if(RET_USER == nRet) + GetShell().DelNumRules(); + + delete pDlg; +/* +#else + SfxItemSet aSet(GetPool(), + SID_HTML_MODE, SID_HTML_MODE, + FN_PARAM_ACT_NUMBER, FN_PARAM_ACT_NUMBER, + FN_PARAM_CHILD_LEVELS, FN_PARAM_CHILD_LEVELS, + FN_PARAM_NUM_PRESET, FN_PARAM_NUM_PRESET, + FN_PARAM_ACT_NUMLEVEL, FN_PARAM_ACT_NUMLEVEL, + 0 ); + + // per default TRUE, damit die Schleife im num.cxx richtig arbeitet! + BOOL bHasChild = TRUE; + const SwNumRule* pCurRule = GetShell().GetCurNumRule(); + if( pCurRule ) + { + aSet.Put( SwUINumRuleItem( *pCurRule )); + USHORT nLevel = GetShell().GetNumLevel( &bHasChild ) & ~NO_NUMLEVEL; + if( nLevel < MAXLEVEL ) + { + nLevel = 1<<nLevel; + aSet.Put( SfxUInt16Item( FN_PARAM_ACT_NUMLEVEL, nLevel )); + } + } + else + { + SwNumRule aRule( GetShell().GetUniqueNumRuleName() ); + SwDocShell* pDocSh = GetView().GetDocShell(); + BOOL bHtml = 0 != PTR_CAST(SwWebDocShell, pDocSh); + for( BYTE n = 0; n < MAXLEVEL; ++n ) + { + SwNumFmt aFmt( aRule.Get( n ) ); + if(bHtml && n) + { + // 1/2" fuer HTML + aFmt.SetLSpace(720); + aFmt.SetAbsLSpace(n * 720); + } + aRule.Set( n, aFmt ); + } + aSet.Put( SwUINumRuleItem( aRule )); + } + + aSet.Put( SfxBoolItem( FN_PARAM_CHILD_LEVELS, bHasChild )); + aSet.Put( SfxBoolItem( FN_PARAM_NUM_PRESET,FALSE )); + + SwNumBulletTabDialog* pDlg = new SwNumBulletTabDialog( + GetView().GetWindow(), &aSet, GetShell() ); + + if(RET_OK == pDlg->Execute() ) + { + const SfxPoolItem* pItem; + if( SFX_ITEM_SET == pDlg->GetOutputItemSet()->GetItemState( + FN_PARAM_ACT_NUMBER, FALSE, &pItem )) + { + SwNumRule* pSetRule = ((SwUINumRuleItem*)pItem)->GetNumRule(); + pSetRule->SetAutoRule( TRUE ); + GetShell().SetCurNumRule( *pSetRule ); + } + else + GetShell().DelNumRules(); + } + + delete pDlg; +#endif +*/ + } + break; + case FN_NUM_BULLET_ON: + { + if ( !GetShell().GetCurNumRule() ) + GetShell().BulletOn(); + else + GetShell().DelNumRules(); + + } + break; + default: + ASSERT(FALSE, falscher Dispatcher); + return; + } +} + +/*------------------------------------------------------------------------ + + $Log: not supported by cvs2svn $ + Revision 1.45 2000/09/18 16:06:07 willem.vandorp + OpenOffice header added. + + Revision 1.44 2000/05/30 12:35:15 os + #74997# fill SvxNumRule with invalid levels + + Revision 1.43 2000/05/26 07:21:33 os + old SW Basic API Slots removed + + Revision 1.42 2000/02/11 14:58:14 hr + #70473# changes for unicode ( patched by automated patchtool ) + + Revision 1.41 1999/08/19 14:25:46 OS + #67374# embedded graphics in numberings + + + Rev 1.40 19 Aug 1999 16:25:46 OS + #67374# embedded graphics in numberings + + Rev 1.39 04 Jun 1999 13:50:58 OS + #64956# keine vollst. Numerierungen im HTML + + Rev 1.38 15 Mar 1999 23:28:54 JP + Task #63049#: Numerierung mit rel. Einzuegen + + Rev 1.37 06 Jan 1999 15:53:08 OS + #58263# Numerierung bei OK ohne Aenderungen mindestens einschalten + + Rev 1.36 02 Dec 1998 09:38:54 OS + #58263# Entfernen-Button fuer Numerierungen + + Rev 1.35 17 Nov 1998 10:59:00 OS + #58263# Numerierungs-Tabseiten aus dem Svx + + Rev 1.34 10 Nov 1998 15:24:38 OS + #59238# neue Defaults fuer HTML-Numerierung + + Rev 1.33 06 Nov 1998 14:42:12 OS + #57903# NumOff kann weg + + Rev 1.32 03 Nov 1998 07:26:16 OS + #58263# Numerierungsdialog in den Svx + + Rev 1.31 17 Aug 1998 16:09:10 OS + GPF nach Shellwechsel waehrend Recording #55041# + + Rev 1.30 18 May 1998 12:13:46 OS + Multiselektion im Numerierungsdialog + + Rev 1.29 24 Mar 1998 13:46:44 JP + SwUINumRule: CTORen mit Name oder NumRule, nicht mehr mit NumRulePointer + + Rev 1.28 12 Mar 1998 13:08:08 OS + Numerierungsbutton nicht mehr gecheckt und nicht disabled + + Rev 1.27 18 Feb 1998 19:58:44 JP + wenn ueber den Dialog kommt, ist es immer eine AutoRule + + Rev 1.26 08 Dec 1997 16:08:06 OS + benannte Numerierungen entfernt + + Rev 1.25 03 Dec 1997 17:31:38 OS + Numerierung und Bullets ueber Button nur noch einschalten + + Rev 1.24 24 Nov 1997 09:47:56 MA + includes + + Rev 1.23 17 Nov 1997 10:21:08 JP + Umstellung Numerierung + + Rev 1.22 03 Nov 1997 13:55:44 MA + precomp entfernt + + Rev 1.21 06 Aug 1997 11:07:54 MH + chg: header + + Rev 1.20 26 Jun 1997 16:15:46 OS + Numerierung per Controller anwenden + + Rev 1.19 05 Jun 1997 13:11:52 OS + Num./Aufzaehlungsbuttons koennen Numerierung auch ausschalten + + Rev 1.18 30 May 1997 13:52:04 OS + Preset fuer Numerierungsdialog + + Rev 1.17 07 Apr 1997 17:48:34 MH + chg: header + + Rev 1.16 22 Feb 1997 20:52:26 OS + ohne Numerierung muss bHasChild auf TRUE gesetzt werden, sonst kommt der Dialog durcheinander + + Rev 1.15 20 Feb 1997 17:19:04 OS + Numerierung: Flag fuer benutzte Ebenen auswerten + + Rev 1.14 18 Feb 1997 08:54:12 OS + Numerierungsdialog: auch den Return-Wert des ModalDialogs auswerten + + Rev 1.13 11 Feb 1997 11:53:32 OS + ItemSet vor dem Dialog fuellen + + Rev 1.12 08 Feb 1997 18:00:34 OS + NumRule loeschen, wenn kein Item kommt, aber RET_OK + + Rev 1.11 08 Feb 1997 16:01:54 OS + Online-Layout->Print-Layout + + Rev 1.10 10 Oct 1996 13:18:26 OS + ItemState immer pruefen + + Rev 1.9 28 Aug 1996 15:55:18 OS + includes + + Rev 1.8 24 Nov 1995 16:59:32 OM + PCH->PRECOMPILED + + Rev 1.7 28 Aug 1995 19:11:16 MA + Renovierung: IDL, Shells, Textshell-Doktrin aufgegeben + + Rev 1.6 24 Aug 1995 14:33:38 MA + swstddlg -> svxstandarddialog + + Rev 1.5 17 Feb 1995 14:20:56 MS + Umstellung SwView + + Rev 1.4 18 Jan 1995 13:47:58 MS + Precomp Hd + + Rev 1.3 18 Jan 1995 13:43:26 MS + Precomp Hd + + Rev 1.2 25 Oct 1994 18:46:30 ER + add: PCH + + Rev 1.1 06 Oct 1994 10:52:12 VB + Segmentierung + + Rev 1.0 15 Sep 1994 15:54:16 VB + Initial revision. + +------------------------------------------------------------------------*/ + + |