2010-10-14 08:30:41 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2011-03-31 10:05:04 +02:00
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* This file incorporates work covered by the following license notice:
|
|
|
|
*
|
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
|
|
* with this work for additional information regarding copyright
|
|
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
|
|
* License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 .
|
|
|
|
*/
|
2006-09-16 22:12:52 +00:00
|
|
|
|
2010-12-15 09:13:50 +01:00
|
|
|
|
2000-09-18 16:15:01 +00:00
|
|
|
#include <sot/factory.hxx>
|
|
|
|
#include <hintids.hxx>
|
2009-10-16 00:05:16 +02:00
|
|
|
#include <svl/urihelper.hxx>
|
|
|
|
#include <svl/languageoptions.hxx>
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2001-03-30 13:49:11 +00:00
|
|
|
#include <svx/svxids.hrc>
|
2010-01-13 22:25:07 +01:00
|
|
|
#include <sfx2/linkmgr.hxx>
|
2000-09-18 16:15:01 +00:00
|
|
|
#include <svx/htmlmode.hxx>
|
|
|
|
#include <svx/imapdlg.hxx>
|
|
|
|
#include <sfx2/dispatch.hxx>
|
2005-01-11 11:43:03 +00:00
|
|
|
#include <sfx2/docfile.hxx>
|
2004-08-12 09:15:00 +00:00
|
|
|
#include <sfx2/viewfrm.hxx>
|
2000-09-18 16:15:01 +00:00
|
|
|
#include <sfx2/request.hxx>
|
2009-10-16 00:05:16 +02:00
|
|
|
#include <svl/whiter.hxx>
|
|
|
|
#include <svl/visitem.hxx>
|
2000-09-18 16:15:01 +00:00
|
|
|
#include <sfx2/objitem.hxx>
|
2013-01-02 22:07:41 +01:00
|
|
|
#include <vcl/graphicfilter.hxx>
|
2000-09-18 16:15:01 +00:00
|
|
|
#include <svx/gallery.hxx>
|
2010-01-08 18:32:51 +01:00
|
|
|
#include <editeng/langitem.hxx>
|
2001-03-30 13:49:11 +00:00
|
|
|
#include <svx/clipfmtitem.hxx>
|
2000-09-18 16:15:01 +00:00
|
|
|
#include <svx/contdlg.hxx>
|
|
|
|
#include <vcl/graph.hxx>
|
2009-10-16 00:05:16 +02:00
|
|
|
#include <svl/slstitm.hxx>
|
2000-09-18 16:15:01 +00:00
|
|
|
#include <vcl/msgbox.hxx>
|
2009-10-16 00:05:16 +02:00
|
|
|
#include <svl/ptitem.hxx>
|
|
|
|
#include <svl/itemiter.hxx>
|
|
|
|
#include <svl/stritem.hxx>
|
2010-01-08 18:32:51 +01:00
|
|
|
#include <editeng/colritem.hxx>
|
|
|
|
#include <editeng/shaditem.hxx>
|
|
|
|
#include <editeng/boxitem.hxx>
|
2009-12-10 23:06:35 +01:00
|
|
|
#include <svl/srchitem.hxx>
|
2010-01-08 18:32:51 +01:00
|
|
|
#include <editeng/ulspitem.hxx>
|
|
|
|
#include <editeng/lrspitem.hxx>
|
2013-02-12 13:41:53 -05:00
|
|
|
#include <editeng/brushitem.hxx>
|
2010-01-08 18:32:51 +01:00
|
|
|
#include <editeng/opaqitem.hxx>
|
|
|
|
#include <editeng/sizeitem.hxx>
|
2007-09-27 11:26:21 +00:00
|
|
|
#include <svx/flagsdef.hxx>
|
2010-01-08 18:32:51 +01:00
|
|
|
#include <editeng/scripttypeitem.hxx>
|
2004-10-04 18:29:20 +00:00
|
|
|
#include <sfx2/objface.hxx>
|
2000-09-18 16:15:01 +00:00
|
|
|
#include <fmturl.hxx>
|
|
|
|
#include <fmthdft.hxx>
|
|
|
|
#include <fmtclds.hxx>
|
|
|
|
#include <docsh.hxx>
|
|
|
|
#include <wrtsh.hxx>
|
|
|
|
#include <view.hxx>
|
|
|
|
#include <swmodule.hxx>
|
|
|
|
#include <swundo.hxx>
|
|
|
|
#include <fldbas.hxx>
|
|
|
|
#include <uitool.hxx>
|
|
|
|
#include <basesh.hxx>
|
|
|
|
#include <viewopt.hxx>
|
2005-11-16 08:52:17 +00:00
|
|
|
#include <fontcfg.hxx>
|
2000-09-18 16:15:01 +00:00
|
|
|
#include <docstat.hxx>
|
|
|
|
#include <usrfld.hxx>
|
|
|
|
#include <expfld.hxx>
|
|
|
|
#include <fldmgr.hxx>
|
|
|
|
#include <frmmgr.hxx>
|
|
|
|
#include <tablemgr.hxx>
|
|
|
|
#include <mdiexp.hxx>
|
2001-02-02 16:46:27 +00:00
|
|
|
#include <swdtflvr.hxx>
|
2000-09-18 16:15:01 +00:00
|
|
|
#include <pagedesc.hxx>
|
|
|
|
#include <convert.hxx>
|
|
|
|
#include <fmtcol.hxx>
|
|
|
|
#include <edtwin.hxx>
|
|
|
|
#include <tblafmt.hxx>
|
|
|
|
#include <caption.hxx>
|
|
|
|
#include <swwait.hxx>
|
|
|
|
#include <cmdid.h>
|
|
|
|
#include <globals.hrc>
|
|
|
|
#include <shells.hrc>
|
|
|
|
#include <statstr.hrc>
|
|
|
|
#include <globals.h>
|
2001-06-26 10:42:49 +00:00
|
|
|
#include <unotxdoc.hxx>
|
2002-02-01 11:51:13 +00:00
|
|
|
#include <crsskip.hxx>
|
2003-04-17 15:11:30 +00:00
|
|
|
#include <fmtinfmt.hxx>
|
2004-11-16 09:27:07 +00:00
|
|
|
#include <doc.hxx>
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2007-09-27 11:26:21 +00:00
|
|
|
#include "swabstdlg.hxx"
|
|
|
|
#include "dialog.hrc"
|
|
|
|
#include "fldui.hrc"
|
|
|
|
#include "table.hrc"
|
2004-06-01 07:05:01 +00:00
|
|
|
#include <modcfg.hxx>
|
|
|
|
#include <instable.hxx>
|
2004-11-16 09:27:07 +00:00
|
|
|
#include <svx/fmshell.hxx> // for FN_XFORMS_DESIGN_MODE
|
2004-09-08 14:04:12 +00:00
|
|
|
#include <SwRewriter.hxx>
|
|
|
|
#include <comcore.hrc>
|
2004-06-01 07:05:01 +00:00
|
|
|
|
2007-09-27 11:26:21 +00:00
|
|
|
#include <unomid.h>
|
|
|
|
|
|
|
|
FlyMode SwBaseShell::eFrameMode = FLY_DRAG_END;
|
|
|
|
|
2000-09-18 16:15:01 +00:00
|
|
|
//Fuer die Erkennung der Id, die variable von Gallery mit SID_GALLERY_BG_BRUSH
|
|
|
|
//ankommt.
|
2011-01-17 15:06:54 +01:00
|
|
|
static sal_uInt8 nParagraphPos;
|
|
|
|
static sal_uInt8 nGraphicPos;
|
|
|
|
static sal_uInt8 nOlePos;
|
|
|
|
static sal_uInt8 nFramePos;
|
|
|
|
static sal_uInt8 nTablePos;
|
|
|
|
static sal_uInt8 nTableRowPos;
|
|
|
|
static sal_uInt8 nTableCellPos;
|
|
|
|
static sal_uInt8 nPagePos;
|
|
|
|
static sal_uInt8 nHeaderPos;
|
|
|
|
static sal_uInt8 nFooterPos;
|
2000-09-18 16:15:01 +00:00
|
|
|
|
|
|
|
#define SwBaseShell
|
|
|
|
#define Shadow
|
CWS-TOOLING: integrate CWS odfmetadata2
2009-06-22 11:48:36 +0200 mst r273206 : - connectivity/source/drivers/mozab/mozillasrc/MNSInclude.hxx:
+ add "include ustrbuf.hxx" to work around warning caused by
solaris <sys/kstat.h> declaring a global "long l ;"
2009-06-19 14:25:25 +0200 mst r273159 : - scp2/source/ooo/file_library_ooo.scp:
+ fix MinGW build
2009-06-08 12:52:33 +0200 mst r272727 : - redland/raptor-1.4.18.patch.mingw, redland/raptor/makefile.mk:
+ disable parsers that do not build on MinGW (thanks for patch by tono)
2009-05-15 17:31:07 +0200 mst r271957 : fix typos
2009-05-15 17:28:57 +0200 mst r271956 : #i101965#
- offapi/com/sun/star/text/TextPortion:
+ add missing properties:
SoftPageBreak, DocumentIndexMark, ReferenceMark, Footnote, TextField
+ fix read-only status of properties: Bookmark, IsStart, IsCollapsed
- offapi/type_reference/{typelibrary_history.txt,types.rdb}:
+ update reference types.rdb
2009-05-07 14:41:38 +0200 mst r271669 : - sw/inc/{fmtftn.hxx,unocoll.hxx,doc.hxx,editsh.hxx,ftninfo.hxx},
sw/source/core/layout/{flowfrm.cxx,ftnfrm.cxx},
sw/source/core/doc/docftn.cxx, sw/source/core/edit/edattr.cxx,
sw/source/core/txtnode/atrftn.cxx, sw/source/core/unocore/unocoll.cxx,
sw/source/ui/fldui/fldref.cxx:
+ fix warning ... the hard way
+ also fix signature of SwDoc::SetCurFtn
2009-05-05 19:52:55 +0200 mst r271556 : - sw/inc/undobj.hxx:
+ make some members const
2009-05-05 19:34:40 +0200 mst r271555 : - sw/inc/rolbck.hxx, sw/source/core/undo/rolbck.cxx:
+ make some members const
2009-05-05 19:13:14 +0200 mst r271553 : - sw/inc/{undobj.hxx,rolbck.hxx},
sw/source/core/undo/{unbkmk.cxx,rolbck.cxx}:
+ fix rebase merge error
+ rename SwHstryBookmark to SwHistoryBookmark
+ clean up SwUndoBookmark
2009-05-05 19:05:53 +0200 mst r271552 : - sw/source/core/unocore/unoportenum.cxx:
+ fix annoying assertion
2009-05-05 15:34:48 +0200 mst r271522 : CWS-TOOLING: rebase CWS odfmetadata2 to trunk@271427 (milestone: DEV300:m47)
2009-05-04 12:37:01 +0200 mst r271444 : trivial
2009-04-22 13:30:37 +0200 mst r271102 : - sfx2/inc/sfx2/dinfdlg.hxx:
+ trivial change
2009-04-21 16:46:58 +0200 mst r271043 : - sw/inc/hintids.hxx:
+ introduce some predicates for the various hints, and use them
2009-04-21 16:19:03 +0200 mst r271041 : - sw/inc/undobj.hxx,
sw/source/core/doc/{docfly.cxx,docfmt.cxx,docftn.cxx,doctxm.cxx},
sw/source/core/undo/{unattr.cxx,unins.cxx}:
+ clean up unattr.cxx:
remove/fix casts, prefix members, use auto_ptr, etc.
2009-04-21 15:34:23 +0200 mst r271039 : - sw/inc/{rolbck.hxx,undobj.hxx},
sw/source/core/doc/docfmt.cxx,
sw/source/core/txtnode/{thints.cxx,txtedt.cxx},
sw/source/core/undo/{rolbck.cxx,undel.cxx,undobj.cxx,unins.cxx,unmove.cxx,
unovwr.cxx,unsect.cxx,unspnd.cxx,untbl.cxx,untblk.cxx,unattr.cxx}:
+ clean up SwHistory, SwRegHistory and SwHistoryHint etc.:
remove/fix casts, prefix members, remove wrong const annotations,
use auto_ptr, remove unused members, etc.
2009-04-20 19:17:36 +0200 mst r271013 : - sw/inc/ndhints.hxx,
sw/source/core/text/{itrtxt.cxx,txtftn.cxx,itratr.cxx,porfly.cxx,
txtfrm.cxx,txtdrop.cxx,frmform.cxx},
sw/source/core/txtnode/{ndtxt.cxx,ndhints.cxx,thints.cxx,txtedt.cxx},
sw/source/core/edit/acorrect.cxx,
sw/source/core/doc/{docedt.cxx,docfmt.cxx},
sw/source/filter/html/swhtml.cxx:
+ clean up SwHintsArray and its subclasses: remove/fix casts, prefix members
2009-04-20 18:42:07 +0200 mst r271007 : - sw/source/core/text/txtio.cxx, sw/source/core/edit/edattr.cxx,
sw/source/core/undo/rolbck.cxx:
+ remove JP_NEWCORE dead code
2009-04-20 18:38:09 +0200 mst r271006 : - sw/source/core/unocore/unochart.cxx:
+ silence unxlngi warning (debug=t)
2009-04-20 16:36:13 +0200 mst r270991 : - sfx2/inc/sfx2/dinfdlg.hxx, sfx2/source/dialog/dinfdlg.cxx,
sfx2/source/doc/objserv.cxx, sw/source/ui/fldui/flddinf.hxx:
+ trivial cleanups
2009-04-20 15:28:52 +0200 mst r270990 : - sfx2/inc/sfx2/dinfdlg.hxx, sfx2/source/dialog/dinfdlg.cxx,
sfx2/source/doc/objserv.cxx:
+ fix bug: replaying a macro with a DocumentInfoItem removes all
user-defined properties
2009-03-10 15:08:20 +0100 mst r269273 : - sfx2/source/doc/Metadatable.cxx:
+ add missing SolarMutex guards
2009-03-10 14:46:29 +0100 mst r269272 : - unoxml/source/rdf/librdf_repository.cxx:
+ never free rdf_world because that would call libxm2 xmlCleanupParser
(and, to add insult to injury, other libxml2 functions later...)
2009-03-06 19:02:44 +0100 mst r269041 : argh! undo...
2009-03-06 19:00:58 +0100 mst r269040 : fix #i99931#
- sw/source/ui/uno/unomod.cxx:
+ SwXViewSettings::_getSingleValue returns uninitialized memory
for the ZoomType property if the value is PAGE_WIDTH_EXACT
2009-03-06 18:59:28 +0100 mst r269039 : - sw/inc/ndtxt.hxx, sw/source/core/txtnode/ndtxt.cxx,
sw/source/core/unocore/unoportenum.cxx:
+ fix some more wntmsci12 warnings...
2009-03-06 18:56:46 +0100 mst r269038 : - sd/source/ui/slidesorter/model/SlsPageEnumerationProvider.cxx:
+ work around spurious warning on unxsoli4 debug=t
2009-03-05 14:02:01 +0100 mst r268902 : - sw/inc/txatbase.hxx:
+ back to c-style casts, they also compile on wntmsci12...
2009-03-05 10:23:25 +0100 mst r268882 : - comphelper/inc/comphelper/processfactory.hxx,
comphelper/source/processfactory/processfactory.cxx:
+ revert change of return type of comphelper_getProcessComponentContext
to Reference: does not build on wntmsci12
2009-03-04 19:08:09 +0100 mst r268861 : - sw/source/core/txtnode/{atrtox.cxx,ndtxt.cxx}:
+ fix initialization
2009-03-04 14:37:30 +0100 mst r268831 : - solenv/inc/target.mk:
+ fix CLASSPATH so complex tests run (fix by sb)
2009-03-04 14:36:30 +0100 mst r268830 : - sw/inc/unoobj.hxx,
sw/source/core/unocore/{unoparagraph.cxx,unoobj.cxx,unoobj2.cxx}:
+ SwXParaFrameEnumeration constructor now takes SwPaM, not SwUnoCrsr
+ move SwParaSelection into unoparagraph.cxx, as it is only used there
+ bugfix: replace SwUnoCrsrs on stack with SwCursors
2009-03-04 14:34:46 +0100 mst r268829 : - sw/inc/pam.hxx, sw/source/core/crsr/pam.cxx,
sw/source/core/edit/eddel.cxx, sw/source/core/doc/docredln.cxx,
sw/source/core/undo/{untbl.cxx,undel.cxx}, sw/source/filter/rtf/swparrtf.cxx:
+ clean up SwPaM: prefix members
+ new constructor SwPosition(SwCntntNode&, xub_StrLen)
+ fix several broken SwPosition and SwPaM constructors
+ SwPam::DeleteMark now actually resets the unused position to default
2009-03-02 12:07:09 +0100 mst r268646 : - sw/inc/fmtcol.hxx:
+ fix annoying warning (gcc 4)
2009-03-02 12:06:27 +0100 mst r268645 : - odk/util/check.pl, odk/examples/DevelopersGuide/Text/TextDocuments.java:
+ rename module from FieldMaster to fieldmaster
2009-02-27 19:49:56 +0100 mst r268614 : - sfx2/inc/sfx2/Metadatable.hxx, sfx2/prj/d.lst,
sfx2/source/doc/{Metadatable.cxx,makefile.mk},
sw/inc/{SwMetadatable.hxx,unoobj.hxx,undobj.hxx,ndtxt.hxx},
sw/source/core/doc/{SwMetadatable.cxx,makefile.mk,docnew.cxx},
sw/source/core/undo/{untbl.cxx,unins.cxx},
sw/source/core/unocore/unoparagraph.cxx, sw/source/ui/app/docsh.cxx:
+ move Metadatable implementation from sw to sfx2
2009-02-27 17:58:55 +0100 mst r268608 : - sw/inc/{SwMetadatable.hxx,undobj.hxx}, sw/source/core/doc/SwMetadatable.cxx,
sw/source/core/undo/{untbl.cxx,unins.cxx,undel.cxx}:
+ CreateUndo now returns an opaque MetadatableUndo object
2009-02-27 13:15:44 +0100 mst r268587 : - sw/inc/ndtxt.hxx, sw/source/core/doc/docfmt.cxx,
sw/source/core/text/{itratr.cxx,porlay.cxx},
sw/source/core/txtnode/{txtedt.cxx,ndtxt.cxx,thints.cxx}:
+ clean up SwTxtNode: fix casts, prefix members
+ factor out inline function SwTxtNode::TryDeleteSwpHints()
2009-02-27 13:14:30 +0100 mst r268586 : - svx/inc/svx/emphitem.hxx:
+ fix borken header guard
2009-02-27 13:13:56 +0100 mst r268585 : - sfx2/source/bastyp/progress.cxx:
+ fix use of compiler specific macro
2009-02-27 11:00:32 +0100 mst r268564 : - sw/inc/{txatbase.hxx,txtatr.hxx,txtinet.hxx,txtfld.hxx,txtftn.hxx,
txtflcnt.hxx,txttxmrk.hxx,txtrfmrk.hxx},
sw/source/core/txtnode/{atrtox.cxx,atrref.cxx,atrflyin.cxx,atrftn.cxx,
txtatr2.cxx,txatbase.cxx,atrfld.cxx,txtedt.cxx},
sw/source/core/text/atrstck.cxx, sw/source/core/access/acchyperlink.cxx,
sw/source/core/doc/visiturl.cxx, sw/source/ui/wrtsh/wrtsh2.cxx:
+ clean up SwTxtAttr and its subclasses: remove/fix casts, prefix members
+ SwTxtINetFmt: remove unused member bColor
- sw/source/core/text/txtfld.cxx:
+ move SwTxtFld methods to atrfld.cxx
2009-02-27 10:58:44 +0100 mst r268563 : - sfx2/inc/sfx2/sfxbasemodel.hxx:
+ don't privately inherit BaseMutex, ScModelObj wants to access it
2009-02-27 10:58:02 +0100 mst r268562 : - xmloff/source/core/{RDFaExportHelper.cxx,RDFaImportHelper.cxx}:
+ arrrgh!!! someone thought it would be a good idea to have 2 different
versions of boost in external! and they're NOT compatible!!!
insert an ugly fragile hack that maybe works with both...
2009-02-26 17:42:26 +0100 mst r268544 : - comphelper/inc/comphelper/storagehelper.hxx.
sfx2/source/doc/DocumentMetadataAccess.cxx:
+ someone made IsValidZipEntryFileName a static method and didn't tell me
2009-02-26 15:52:56 +0100 mst r268529 : redland: split up patches
2009-02-26 13:17:56 +0100 mst r268509 : migration of cws odfmetadata2 from CVS (resync to m42): module sw
#i95863#
- sw/inc/segdefs{,_}.hxx:
+ remove obsolete files
- sw/source/ui/inc/itemdef.hxx:
+ remove itemdef.hxx
- sw/source/ui/app/[apphdl.cxx,docsh.cxx}, sw/source/ui/misc/glshell.cxx,
sw/source/ui/shells/*.cxx, sw/source/ui/uiview/*.cxx, sw/source/ui/web/*.cxx:
+ use sfx2/msg.hxx instead of itemdef.hxx
- sw/source/core/edit/eddel.cxx:
+ @ JP: SwEditShell::Replace:
you're right, deleting the text to be replaced first, and then inserting
a space, and then replacing that space is unnecessary.
whew, i'm so happy that we finally answered that question after 11 years.
- sw/inc/edimp.hxx:
+ remove FOREACHCURSOR_START, FOREACHCURSOR_END
- sw/inc/{swcrsr.hxx,unocrsr.hxx,viscrs.hxx},
sw/source/core/crsr/{crsrsh.cxx,swcrsr.cxx,trvlreg.cxx,trvltbl.cxx,
unocrsr.cxx,viscrs.cxx},
sw/source/core/doc/{docbm.cxx,doccorr.cxx},
sw/source/core/docnode/{ndtbl.cxx,ndtbl1.cxx},
sw/source/core/edit/editsh.cxx,
sw/source/core/frmedt/{fefly1.cxx,fetab.cxx,tblsel.cxx},
sw/source/core/layout/trvlfrm.cxx,
sw/source/core/unocore/{unochart.cxx,unoobj2.cxx,unoparagraph.cxx,
unoportenum.cxx,unotbl.cxx},
sw/source/core/view/vprint.cxx:
+ remove the hideous virtual operator SwFooCursor*
+ make SwCursor::IsReadOnlyAvailable() virtual
+ make SwUnoCrsr::Clone() virtual
+ refactor SwCursor methods IsSelOver(), LeftRight(), UpDown(), GotoTable():
replace dynamic_cast<...>(this) with new virtual methods
2009-02-26 13:14:58 +0100 mst r268508 : migration of cws odfmetadata2 from CVS (resync to m42): module sw
- sw/source/filter/xml/swxml.cxx:
+ XMLReader::Read: load RDF metadata of the ODF document
- sw/source/filter/xml/wrtxml.cxx:
+ SwXMLWriter::_Write: write RDF metadata of the ODF document if ODF >= 1.2
#i90620#: import xml:id in text tables (does not actually work yet)
- sw/source/filter/xml/xmltbli{.hxx,.cxx}:
+ SwXMLTableCellAttrTokens,aTableCellAttrTokenMap: add XML_TOK_TABLE_XMLID
+ SwXMLTableCellContext_Impl::SwXMLTableCellContext_Impl: attribute xml:id
+ SwXMLTableCellContext_Impl::CreateChildContext: attribute xml:id
+ SwXMLTableColContext_Impl::SwXMLTableColContext_Impl: attribute xml:id
+ SwXMLTableContext::SwXMLTableContext: attribute xml:id
fix #i98530#
- sw/inc/unoport.hxx, sw/source/core/unocore/unoport.cxx:
+ SwXTextPortion: make constructor params const&
- sw/source/core/unocore/unoportenum.cxx:
+ refactor to remove some code duplication
+ fix bug: paragraph w/out hints: bookmark before frame gets lost
#i97274# handle invalid tables
- sw/source/core/layout/tabfrm.cxx, sw/source/filter/xml/xmltbli.cxx:
+ SwXMLTableContext::MakeTable():
check that the table actually contains cells,
and abort (removing the inserted table nodes) if not
2009-02-26 13:11:48 +0100 mst r268507 : migration of cws odfmetadata2 from CVS (resync to m42): module sw
refactor SwXTextRange and SwXParagraph
- sw/inc/unoobj.hxx, sw/source/core/unocore/unoobj2.cxx:
+ remove 3 constructors of SwXTextRange
+ new method SwXTextRange::CreateParentXText
+ refactor SwXTextRange::CreateTextRangeFromPosition and
SwXTextRange::getText
- sw/inc/unoobj.hxx, sw/source/core/unocore/unoparagraph.cxx:
+ SwXParagraph no longer uses a cursor; it registers directly at SwTxtNode
+ replace SwXParagraph::GetCrsr with SwXParagraph::GetTxtNode
- sw/source/core/unocore/unotext.cxx, sw/source/ui/uno/unotxvw.cxx:
+ adapt to new SwXParagraph
#i90620#
- sw/inc/SwMetadatable.hxx,
sw/source/core/doc/SwMetadatable.cxx:
+ new files: base classes sw::Metadatable and sw::MetadatableMixin;
also, 2 implementations of IXmlIdRegistry:
sw::XmlIdRegistryDocument and sw::XmlIdRegistryClipboard
+ setMetadataReference: handle empty stream name as auto-detect
- sw/source/core/doc/makefile.mk:
+ add SwMetadatable
add a XmlIdRegistry to SwDoc
- sw/inc/doc.hxx:
+ SwDoc: add member m_pXmlIdRegistry, method GetXmlIdRegistry()
- sw/source/core/doc/docnew.cxx:
+ initialize XmlIdRegistry in SwDoc::GetXmlIdRegistry, not in constructor,
because the constructor is not told whether the SwDoc is a clipboard
- sw/inc/docsh.hxx, sw/source/ui/app/docsh.cxx:
+ SwDocShell: override GetXmlIdRegistry()
#i91563#: make the SwTxtNode metadatable
- sw/inc/ndtxt.hxx
+ SwTxtNode inherits sw::Metadatable
- sw/inc/unoobj.hxx, sw/source/core/unocore/unoparagraph.cxx:
+ SwXParagraph inherits sw::MetadatableMixin
#i91563#: handle SwTxtNode's metadata for delete
- sw/source/core/txtnode/ndtxt.cxx:
+ SwTxtNode::SplitCntntNode: handle XmlId
+ SwTxtNode::JoinNext: merge XmlIds
- sw/source/core/doc/docedt.cxx:
+ lcl_GetJoinFlags: document postcondition
+ SwDoc::Delete: remove XmlId only if SwTxtNode _becomes_ empty
#i91563#: handle SwTxtNode's metadata for delete with undo
- sw/inc/undobj.hxx
+ SwUndoDelete: new members m_pMetadataUndoStart, m_pMetadataUndoEnd
- sw/source/core/undo/undel.cxx:
+ SwUndoDelete::SaveCntnt: save XmlIds for start and end SwTxtNode
+ SwUndoDelete::SaveCntnt: remove XmlId only if SwTxtNode _becomes_ empty
+ SwUndoDelete::Undo: restore saved XmlIds for start and end SwTxtNode
- sw/source/core/docnode/ndcopy.cxx:
+ SwTxtNode::MakeCopy: register copy at XmlIdRegistry
#i91563#: handle SwTxtNode's metadata for find/replace with undo
- sw/source/core/undo/unins.cxx:
+ _UnReplaceData: rename members: add prefix m_
+ _UnReplaceData: new members m_pMetadataUndoStart, m_pMetadataUndoEnd
+ _UnReplaceData::_UnReplaceData: save XmlIds for start and end SwTxtNode
+ _UnReplaceData::Undo: restore saved XmlIds for start and end SwTxtNode
#i91563#: handle SwTxtNode's metadata for table-to-text with undo
- sw/source/core/undo/untbl.cxx:
+ SwTblToTxtSave: rename members: add prefix m_
+ SwTblToTxtSave: new members m_pMetadataUndoStart, m_pMetadataUndoEnd
+ SwTblToTxtSave::SwTblToTxtSave: save XmlIds for start and end SwTxtNode
+ SwTblToTxtSave::SwTblToTxtSave, SwNodes::UndoTableToText:
always store the index of the first SwTxtNode in the cell, instead of
the index of the first SwTxtNode in case of the first cell in a row,
and the cell start node in other cases
+ SwNodes::UndoTableToText: restore saved XmlIds for start and end SwTxtNode
- sw/source/core/docnode/ndtbl.cxx:
+ lcl_DelBox: simplify for refactored start index handling in SwTblToTxtSave
2009-02-26 13:02:28 +0100 mst r268505 : migration of cws odfmetadata2 from CVS (resync to m42): module sd
- sd/source/ui/table/tableobjectbar.cxx,sd/source/ui/view/*.cxx:
+ remove invocations of SFX_DECL_TYPE
- sd/source/ui/slideshow/SlideShowRestarter.cxx,
sd/source/ui/toolpanel/LayoutMenu.cxx,
sd/source/ui/unoidl/DrawController.cxx,
sd/source/ui/view/{ViewShellBase.cxx,ViewTabBar.cxx,frmview.cxx}:
+ fix abuses of comphelper_getProcessComponentContext (missing release)
2009-02-26 13:01:24 +0100 mst r268504 : migration of cws odfmetadata2 from CVS (resync to m42): module starmath
- starmath/source/document.cxx:
+ don't touch SfxObjectShell's privates
2009-02-26 13:00:37 +0100 mst r268503 : migration of cws odfmetadata2 from CVS (resync to m42): module sfx2
#i90620#
- sfx2/inc/sfx2/XmlIdRegistry.hxx:
+ new file: interfaces sfx2::IXmlIdRegistry and sfx2::IXmlIdRegistrySupplier
and a couple of utility functions
- sfx2/inc/sfx2/DocumentMetadataAccess.hxx,
sfx2/source/doc/DocumentMetadataAccess.cxx:
+ new class sfx2::DocumentMetadataAccess, implements XDocumentMetadataAccess
+ the URI of the DocumentMetadataAccess is now the URI from which the
document was loaded; for a new document, use a vnd.sun.star.tdoc URI
+ add new function sfx2::createBaseURI()
+ prevent using reserved file names
+ try not to recurse into embedded subdocuments
- sfx2/source/doc/makefile.mk:
+ add DocumentMetadataAccess
- sfx2/util/makefile.mk:
+ link libsfx2 against libxml2 (needed for xmlValidateNCName)
- sfx2/source/doc/makefile.mk:
+ add LIBXML_CFLAGS to CFLAGS
- sfx2/prj/build.lst:
+ add dependence on libxml2
- sfx2/prj/d.lst:
+ add XmlIdRegistry.hxx, DocumentMetadataAccess.hxx
- sfx2/inc/sfx2/objsh.hxx, sfx2/source/doc/objxtor.cxx:
+ make SfxObjectShell's members private
+ new method SfxObjectShell::GetAutoStyleFilterIndex
+ SfxObjectShell inherits sfx2::IXmlIdRegistrySupplier
- sfx2/source/dialog/templdlg.cxx, sfx2/source/doc/sfxbasemodel.cxx:
+ don't touch SfxObjectShell's privates
- sfx2/inc/sfx2/sfxbasemodel.hxx, sfx2/source/doc/sfxbasemodel.cxx:
+ SfxBaseModel inherits BaseMutex instead of IMPL_SfxBaseModel_MutexContainer
+ SfxBaseModel implements additional interface XDocumentMetadataAccess
+ IMPL_SfxBaseModel_DataContainer has new member:
a sfx2::DocumentMetadataAccess
+ implementation of XDocumentMetadataAccess forwards to
the sfx2::DocumentMetadataAccess member
- sfx2/qa/complex/DocumentMetadataAccessTest.java,
sfx2/qa/complex/{tests.sce,makefile.mk},
sfx2/qa/complex/testdocuments/TESTRDFA.odt:
+ add complex test: DocumentMetadataAccessTest
+ add RDFa test document
#i95863#
- sfx2/inc/sfx2/dinfdlg.hxx, sfx2/source/dialog/dinfdlg.cxx:
+ refactor SfxDocumentItem so it no longer requires a XDocumentInfo
+ move struct CustomProperty to implementation file
+ remove class SfxDocumentUserPage
+ QueryValue,PutValue: remove MID_DOCINFO_FIELD*
- sfx2/source/doc/objserv.cxx:
+ adapt to SfxDocumentItem change
- sfx2/inc/sfx2/sfx.hrc, sfx2/sdi/sfxslots.sdi, sfx2/inc/sfx2/msg.hxx:
+ remove MID_DOCINFO_FIELD*
+ put all invocations of SFX_DECL_TYPE in msg.hxx, and undef SFX_DECL_TYPE
- sfx2/source/doc/objxtor.cxx:
+ fix abuses of comphelper_getProcessComponentContext (missing release)
- sfx2/source/doc/docfile.cxx:
+ SfxMedium::SfxMedium: don't dereference NULL, throw exception instead
- sfx2/source/doc/objstor.cxx:
+ SfxObjectShell::DoLoad: fix bug: DocumentBaseURI is not initialized
2009-02-26 12:58:07 +0100 mst r268502 : migration of cws odfmetadata2 from CVS (resync to m42): module xmloff
#i90620#: implement RDFa import (interface change)
- xmloff/inc/xmloff/xmlimp.hxx. xmloff/source/core/xmlimp.cxx:
+ make SvXMLImport::GetAbsoluteReference() const
+ add SvXMLImport::GetComponentContext()
+ SvXMLImport::_InitCtor(): add RDFa namespace
+ add SvXMLImport::AddRDFa()
+ SvXMLImport::endDocument() inserts RDFa into document repository
- xmloff/inc/xmloff/xmltoken.hxx, xmloff/source/core/xmltoken.cxx:
+ new tokens for RDFa: XML_ABOUT, XML_DATATYPE
- xmloff/inc/RDFaImportHelper.hxx, xmloff/source/core/RDFaImportHelper.cxx:
+ new class RDFaImportHelper
+ adapt the code to the bleak reality of broken C++ implementations
+ handle empty xhtml:about attributes properly, which are actually
valid relative URIs
+ work around broken SvXMLImport::GetAbsoluteReference
- xmloff/source/core/makefile.mk:
+ add RDFaImportHelper.cxx
#i90620#: implement RDFa export
- xmloff/inc/xmloff/xmlexp.hxx, xmloff/source/core/xmlexp.cxx:
+ add SvXMLExport::EnsureNamespace(), and a stack of namespace maps
+ add SvXMLExport::GetComponentContext()
+ add SvXMLExport::AddAttributesRDFa()
- xmloff/inc/RDFaExportHelper.hxx, xmloff/source/core/RDFaExportHelper.cxx:
+ new class RDFaExportHelper
+ don't use std::map::data_type, which is actually called
std::map::mapped_type by libstdc++
- xmloff/source/core/makefile.mk:
+ add RDFaExportHelper.cxx
#i91563#
- xmloff/inc/xmloff/txtimp.hxx, xmloff/source/text/txtimp.cxx:
+ XMLTextPAttrTokens: add RDFa tokens
- xmloff/source/text/txtparai{.hxx,.cxx}:
+ import RDFa for text:p
- xmloff/source/text/txtparae.cxx:
+ export RDFa for text:p
interface change: use XHTML namespace instead of RDFA
- xmloff/inc/xmlnmspe.hxx, xmloff/inc/xmloff/xmltoken.hxx,
xmloff/source/core/{xmltoken.cxx,xmlimp.cxx,xmlexp.cxx,RDFaExportHelper.cxx},
xmloff/source/text/txtimp.cxx:
+ use XHTML namespace instead of RDFA
#i91565#, #i91566#: (preliminary) import for text:meta, text:meta-field
- xmloff/source/text/txtparai.cxx:
+ new class XMLMetaImportContextBase with subclasses to import
text:meta and text:meta-field
- xmloff/source/text/XMLTextMarkImportContext.cxx:
+ change XMLTextMarkImportContext::CreateAndInsertMark to handle marks
with no name (text:meta)
#i91565#, #i91566#: (preliminary) export for text:meta, text:meta-field
- xmloff/inc/txtflde.hxx, xmloff/source/text/txtflde.cxx:
+ add FIELD_ID_META to FieldIdEnum
+ new method XMLTextFieldExport::ExportMetaField()
+ change XMLTextFieldExport::ExportField{,AutoStyle,Helper}
to take additional parameter for progress bar
- xmloff/inc/xmloff/txtparae.hxx, xmloff/source/text/txtparae.cxx:
+ make XMLTextParagraphExport::exportTextRangeEnumeration() public
+ new method XMLTextParagraphExport::exportMeta()
#i90620#
- xmloff/inc/xmloff/xmlimp.hxx, xmloff/source/core/xmlimp.cxx,
xmloff/inc/xmloff/xmlexp.hxx, xmloff/source/core/xmlexp.cxx:
+ rename SvXML{Im,Ex}port::GetStreamPath() to GetStreamName()
+ fix xml:id {im,ex}port for embedded documents and non-packages
+ adapt to API change: XMetadatable
#i90620# GRDDL
- xmloff/inc/xmlnmspe.hxx, xmloff/inc/xmloff/xmltoken.hxx,
xmloff/source/core/{xmltoken.cxx,xmlexp.cxx}:
+ add GRDDL namespace
+ add token XML_TRANSFORMATION
+ add grddl:transformation attribute to root elements for meta.xml,
content.xml and styles.xml
2009-02-26 12:54:40 +0100 mst r268501 : migration of cws odfmetadata2 from CVS (resync to m42): module unoxml
#i90620#
- unoxml/source/rdf/librdf_repository.cxx:
+ librdf_Repository::importGraph: allocate buffer sized length of stream
+ switch from one librdf_world per repository to a single static world
because redland has global variables with a brain-damaged life-cycle...
+ exportGraph: use new raptor 1.4.18 feature to disable writing
an xml:base attribute in RDF/XML files
- unoxml/source/rdf/librdf_repository.cxx:
unoxml/qa/complex/RDFRepositoryTest.java:
+ adapt to predicate is URI change
+ adapt to RDFa API change
+ adapt to API change: RDFa has multiple predicates...
+ adapt to API change: XMetadatable derives from XURI
+ allow xhtml:datatype without xhtml:content
+ adapt to API change: attribute MetadataReference is StringPair
- unoxml/source/rdf/CURI.cxx:
+ add some more URI constants
2009-02-26 12:53:32 +0100 mst r268500 : migration of cws odfmetadata2 from CVS (resync to m42): module package
- package/inc/ImplValidCharacters.hxx:
+ remove (moved to comphelper)
2009-02-26 12:52:49 +0100 mst r268499 : migration of cws odfmetadata2 from CVS (resync to m42): module comphelper
- comphelper/inc/comphelper/processfactory.hxx,
comphelper/source/processfactory/processfactory.cxx:
+ add getProcessComponentContext()
+ change return type of comphelper_getProcessComponentContext to Reference
- comphelper/inc/comphelper/stl_types.hxx:
+ add OUStringBufferAppender
+ add algorithm intersperse
- comphelper/source/misc/string.cxx:
+ rewrite convertCommaSeparated with intersperse and OUStringBufferAppender
- comphelper/inc/comphelper/stlunosequence.hxx:
+ fix bug: begin() on empty sequence != end()
2009-02-26 12:50:47 +0100 mst r268498 : migration of cws odfmetadata2 from CVS (resync to m42): module offapi
#i96209#
- offapi/com/sun/star/text/fieldmaster/*.idl:
+ rename module from FieldMaster to fieldmaster
- offapi/type_reference/{typelibrary_history.txt,types.rdb}:
+ update reference types.rdb
#i90620#
- offapi/com/sun/star/rdf/{XMetadatable.idl,XDocumentMetadataAccess.idl}:
+ API change: XMetadatable derives from XURI
+ API change: replace XmlId (string) with MetadataReference (StringPair)
- offapi/com/sun/star/rdf/{Statement.idl,XDocumentRepository.idl,
XNamedGraph.idl,XRepository.idl}:
+ the predicate of a statement is a URI, not a Resource
- offapi/com/sun/star/rdf/XDocumentMetadataAccess.idl:
+ rename: s/Package/Document/
+ remove uuid
+ remove everything related to mapping
+ graph names are now generated from base URI and file names
+ load methods: improve error handling with XInteractionHandler
- offapi/com/sun/star/rdf/XDocumentRepository.idl:
+ change: RDFa permits using multiple predicates in one attribute
+ setStatementRDFa: subject is now XResource, object is now XMetadatable
- offapi/com/sun/star/rdf/URIs.idl:
+ add some more URI constants
- offapi/com/sun/star/rdf:
+ fix @since tags and replace <method> with <member>
2009-02-26 12:47:24 +0100 mst r268497 : migration of cws odfmetadata2 from CVS (resync to m42): module redland
fix #i93768#
- redland/raptor-1.4.17.patch, redland/raptor/makefile.mk:
+ disable GRDDL parser to prevent call to libxslt
xsltSetDefaultSecurityPrefs, which breaks xmlhelp
- redland/raptor/makefile.mk, redland/raptor-1.4.17.patch,
redland/raptor-1.4.18.patch:
+ upgrade raptor to 1.4.18
+ deactivate serializer for RSS/Atom (does not build)
- redland/rasqal/makefile.mk, redland/rasqal-0.9.15.patch,
redland/rasqal-0.9.16.patch,
+ upgrade rasqal to 0.9.16
- redland/redland/makefile.mk, redland/redland-1.0.7.patch,
redland/redland-1.0.8.patch:
+ upgrade redland to 1.0.8
- redland/redlandversion.mk:
+ the librasqal SONAME has changed
2009-07-02 09:05:03 +00:00
|
|
|
#include <sfx2/msg.hxx>
|
2000-09-18 16:15:01 +00:00
|
|
|
#include "swslots.hxx"
|
|
|
|
|
|
|
|
#define SWCONTOURDLG(rView) ( (SvxContourDlg*) ( rView.GetViewFrame()->GetChildWindow( \
|
|
|
|
SvxContourDlgChildWindow::GetChildWindowId() )-> \
|
|
|
|
GetWindow() ) )
|
|
|
|
|
|
|
|
#define SWIMAPDLG(rView) ( (SvxIMapDlg*) ( rView.GetViewFrame()->GetChildWindow( \
|
|
|
|
SvxIMapDlgChildWindow::GetChildWindowId() )-> \
|
|
|
|
GetWindow() ) )
|
|
|
|
|
2001-06-26 10:42:49 +00:00
|
|
|
|
2007-09-27 11:26:21 +00:00
|
|
|
using namespace ::com::sun::star;
|
2001-06-26 10:42:49 +00:00
|
|
|
using namespace ::com::sun::star::uno;
|
|
|
|
using namespace ::com::sun::star::frame;
|
|
|
|
using namespace ::com::sun::star::lang;
|
|
|
|
|
2000-09-18 16:15:01 +00:00
|
|
|
SFX_IMPL_INTERFACE(SwBaseShell, SfxShell, SW_RES(0))
|
|
|
|
{
|
|
|
|
SFX_CHILDWINDOW_REGISTRATION(SvxIMapDlgChildWindow::GetChildWindowId());
|
|
|
|
SFX_CHILDWINDOW_REGISTRATION(SvxContourDlgChildWindow::GetChildWindowId());
|
|
|
|
}
|
|
|
|
|
|
|
|
TYPEINIT1(SwBaseShell,SfxShell)
|
|
|
|
|
|
|
|
/*--------------------------------------------------------------------
|
|
|
|
Beschreibung: statics
|
|
|
|
--------------------------------------------------------------------*/
|
2012-10-12 16:49:40 +02:00
|
|
|
static void lcl_UpdateIMapDlg( SwWrtShell& rSh )
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2001-07-04 17:12:13 +00:00
|
|
|
Graphic aGrf( rSh.GetIMapGraphic() );
|
2007-09-27 11:26:21 +00:00
|
|
|
GraphicType nGrfType = aGrf.GetType();
|
2001-07-04 17:12:13 +00:00
|
|
|
void* pEditObj = GRAPHIC_NONE != nGrfType && GRAPHIC_DEFAULT != nGrfType
|
|
|
|
? rSh.GetIMapInventor() : 0;
|
2000-09-18 16:15:01 +00:00
|
|
|
TargetList* pList = new TargetList;
|
2009-12-15 23:31:21 +01:00
|
|
|
rSh.GetView().GetViewFrame()->GetTopFrame().GetTargetList(*pList);
|
2000-09-18 16:15:01 +00:00
|
|
|
|
|
|
|
SfxItemSet aSet( rSh.GetAttrPool(), RES_URL, RES_URL );
|
|
|
|
rSh.GetFlyFrmAttr( aSet );
|
|
|
|
const SwFmtURL &rURL = (SwFmtURL&)aSet.Get( RES_URL );
|
|
|
|
SvxIMapDlgChildWindow::UpdateIMapDlg(
|
2001-07-04 17:12:13 +00:00
|
|
|
aGrf, rURL.GetMap(), pList, pEditObj );
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2011-01-01 10:56:18 -08:00
|
|
|
for ( size_t i = 0, n = pList->size(); i < n; ++i )
|
|
|
|
delete pList->at( i );
|
2000-09-18 16:15:01 +00:00
|
|
|
delete pList;
|
|
|
|
}
|
|
|
|
|
2013-02-13 00:02:30 +09:00
|
|
|
static bool lcl_UpdateContourDlg( SwWrtShell &rSh, int nSel )
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
|
|
|
Graphic aGraf( rSh.GetIMapGraphic() );
|
2007-09-27 11:26:21 +00:00
|
|
|
GraphicType nGrfType = aGraf.GetType();
|
2013-02-13 00:02:30 +09:00
|
|
|
bool bRet = GRAPHIC_NONE != nGrfType && GRAPHIC_DEFAULT != nGrfType;
|
2000-09-18 16:15:01 +00:00
|
|
|
if( bRet )
|
|
|
|
{
|
|
|
|
String aGrfName;
|
2007-09-27 11:26:21 +00:00
|
|
|
if ( nSel & nsSelectionType::SEL_GRF )
|
2000-09-18 16:15:01 +00:00
|
|
|
rSh.GetGrfNms( &aGrfName, 0 );
|
|
|
|
|
|
|
|
SvxContourDlg *pDlg = SWCONTOURDLG(rSh.GetView());
|
|
|
|
pDlg->Update( aGraf, aGrfName.Len() > 0,
|
|
|
|
rSh.GetGraphicPolygon(), rSh.GetIMapInventor() );
|
|
|
|
}
|
|
|
|
return bRet;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*--------------------------------------------------------------------
|
|
|
|
Beschreibung: loeschen
|
|
|
|
--------------------------------------------------------------------*/
|
|
|
|
void SwBaseShell::ExecDelete(SfxRequest &rReq)
|
|
|
|
{
|
|
|
|
SwWrtShell &rSh = GetShell();
|
2006-08-01 11:48:31 +00:00
|
|
|
SwEditWin& rTmpEditWin = GetView().GetEditWin();
|
2000-09-18 16:15:01 +00:00
|
|
|
switch(rReq.GetSlot())
|
|
|
|
{
|
|
|
|
case SID_DELETE:
|
2007-09-27 11:26:21 +00:00
|
|
|
rSh.DelRight();
|
2000-09-18 16:15:01 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case FN_BACKSPACE:
|
|
|
|
|
|
|
|
if( rSh.IsNoNum() )
|
|
|
|
{
|
|
|
|
rSh.SttCrsrMove();
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_Bool bLeft = rSh.Left( CRSR_SKIP_CHARS, sal_True, 1, sal_False );
|
2000-09-18 16:15:01 +00:00
|
|
|
if( bLeft )
|
|
|
|
{
|
2005-11-08 16:32:41 +00:00
|
|
|
rSh.DelLeft();
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
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:
|
2011-03-12 11:51:35 +01:00
|
|
|
OSL_FAIL("wrong Dispatcher");
|
2000-09-18 16:15:01 +00:00
|
|
|
return;
|
|
|
|
}
|
2002-12-12 15:37:20 +00:00
|
|
|
rReq.Done();
|
2006-07-26 11:18:28 +00:00
|
|
|
|
|
|
|
//#i42732# - notify the edit window that from now on we do not use the input language
|
2006-08-01 11:48:31 +00:00
|
|
|
rTmpEditWin.SetUseInputLanguage( sal_False );
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void SwBaseShell::ExecClpbrd(SfxRequest &rReq)
|
|
|
|
{
|
|
|
|
//Achtung: Suizid gefaehrdet! Nach Paste, Paste special kann der die
|
|
|
|
//Shell zerstoert sein.
|
|
|
|
|
|
|
|
|
|
|
|
SwWrtShell &rSh = GetShell();
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt16 nId = rReq.GetSlot();
|
2013-02-13 00:02:30 +09:00
|
|
|
bool bIgnore = false;
|
2000-09-18 16:15:01 +00:00
|
|
|
switch( nId )
|
|
|
|
{
|
|
|
|
case SID_CUT:
|
|
|
|
case SID_COPY:
|
2004-06-17 15:06:21 +00:00
|
|
|
rView.GetEditWin().FlushInBuffer();
|
2000-09-18 16:15:01 +00:00
|
|
|
if ( rSh.HasSelection() )
|
|
|
|
{
|
2001-02-02 16:46:27 +00:00
|
|
|
SwTransferable* pTransfer = new SwTransferable( rSh );
|
2009-09-18 10:15:03 +00:00
|
|
|
/*??*/ uno::Reference< datatransfer::XTransferable > xRef( pTransfer );
|
2001-02-02 16:46:27 +00:00
|
|
|
|
2009-09-18 10:15:03 +00:00
|
|
|
if ( nId == SID_CUT && !rSh.IsSelObjProtected(FLYPROTECT_CONTENT|FLYPROTECT_PARENT) )
|
2001-02-02 16:46:27 +00:00
|
|
|
pTransfer->Cut();
|
2000-09-18 16:15:01 +00:00
|
|
|
else
|
2003-03-27 14:45:43 +00:00
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
const sal_Bool bLockedView = rSh.IsViewLocked();
|
|
|
|
rSh.LockView( sal_True ); //lock visible section
|
2001-02-02 16:46:27 +00:00
|
|
|
pTransfer->Copy();
|
2003-03-27 14:45:43 +00:00
|
|
|
rSh.LockView( bLockedView );
|
|
|
|
}
|
2000-09-18 16:15:01 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
|
|
|
|
case SID_PASTE:
|
|
|
|
{
|
2001-02-02 16:46:27 +00:00
|
|
|
TransferableDataHelper aDataHelper(
|
2001-05-22 15:29:19 +00:00
|
|
|
TransferableDataHelper::CreateFromSystemClipboard(
|
|
|
|
&rSh.GetView().GetEditWin() ) );
|
2001-02-02 16:46:27 +00:00
|
|
|
|
2001-09-07 10:26:22 +00:00
|
|
|
if( aDataHelper.GetXTransferable().is() &&
|
2001-02-02 16:46:27 +00:00
|
|
|
SwTransferable::IsPaste( rSh, aDataHelper ))
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
|
|
|
// temp. Variablen, da die Shell nach dem Paste schon
|
|
|
|
// zerstoert sein kann
|
|
|
|
SwView* pView = &rView;
|
2001-02-02 16:46:27 +00:00
|
|
|
SwTransferable::Paste( rSh, aDataHelper );
|
|
|
|
if( rSh.IsFrmSelected() || rSh.IsObjSelected() )
|
2000-09-18 16:15:01 +00:00
|
|
|
rSh.EnterSelFrmMode();
|
2001-02-02 16:46:27 +00:00
|
|
|
pView->AttrChangedNotify( &rSh );
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
break;
|
2001-03-30 13:49:11 +00:00
|
|
|
|
|
|
|
case SID_CLIPBOARD_FORMAT_ITEMS:
|
|
|
|
{
|
|
|
|
const SfxItemSet* pArgs = rReq.GetArgs();
|
|
|
|
const SfxPoolItem* pFmt;
|
2011-01-17 15:06:54 +01:00
|
|
|
if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( nId, sal_False, &pFmt ) )
|
2001-03-30 13:49:11 +00:00
|
|
|
{
|
|
|
|
TransferableDataHelper aDataHelper(
|
2001-05-22 15:29:19 +00:00
|
|
|
TransferableDataHelper::CreateFromSystemClipboard(
|
|
|
|
&rSh.GetView().GetEditWin()) );
|
2001-09-07 10:26:22 +00:00
|
|
|
if( aDataHelper.GetXTransferable().is()
|
2001-03-30 13:49:11 +00:00
|
|
|
/*&& SwTransferable::IsPaste( rSh, aDataHelper )*/ )
|
|
|
|
{
|
|
|
|
// temp. Variablen, da die Shell nach dem Paste schon
|
|
|
|
// zerstoert sein kann
|
|
|
|
SwView* pView = &rView;
|
|
|
|
|
|
|
|
SwTransferable::PasteFormat( rSh, aDataHelper,
|
|
|
|
((SfxUInt32Item*)pFmt)->GetValue() );
|
|
|
|
|
2003-04-17 14:40:30 +00:00
|
|
|
//Done() has to be called before the shell has been removed
|
|
|
|
rReq.Done();
|
2013-02-13 00:02:30 +09:00
|
|
|
bIgnore = true;
|
2001-03-30 13:49:11 +00:00
|
|
|
if( rSh.IsFrmSelected() || rSh.IsObjSelected())
|
|
|
|
rSh.EnterSelFrmMode();
|
|
|
|
pView->AttrChangedNotify( &rSh );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2009-07-16 15:07:54 +00:00
|
|
|
case SID_PASTE_UNFORMATTED:
|
|
|
|
{
|
|
|
|
TransferableDataHelper aDataHelper(
|
|
|
|
TransferableDataHelper::CreateFromSystemClipboard(
|
|
|
|
&rSh.GetView().GetEditWin()) );
|
|
|
|
if( aDataHelper.GetXTransferable().is() &&
|
|
|
|
SwTransferable::IsPaste( rSh, aDataHelper ))
|
|
|
|
{
|
|
|
|
// temp. Variablen, da die Shell nach dem Paste schon
|
|
|
|
// zerstoert sein kann
|
|
|
|
SwView* pView = &rView;
|
|
|
|
rReq.Ignore();
|
2013-02-13 00:02:30 +09:00
|
|
|
bIgnore = true;
|
2009-07-16 15:07:54 +00:00
|
|
|
int nRet = SwTransferable::PasteUnformatted( rSh, aDataHelper );
|
2011-12-20 22:43:22 +00:00
|
|
|
if(nRet)
|
2009-07-16 15:07:54 +00:00
|
|
|
{
|
|
|
|
SfxViewFrame* pViewFrame = pView->GetViewFrame();
|
|
|
|
uno::Reference< frame::XDispatchRecorder > xRecorder =
|
|
|
|
pViewFrame->GetBindings().GetRecorder();
|
|
|
|
if(xRecorder.is()) {
|
|
|
|
SfxRequest aReq( pViewFrame, SID_CLIPBOARD_FORMAT_ITEMS );
|
|
|
|
aReq.AppendItem( SfxUInt32Item( SID_CLIPBOARD_FORMAT_ITEMS, SOT_FORMAT_STRING ) );
|
|
|
|
aReq.Done();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (rSh.IsFrmSelected() || rSh.IsObjSelected())
|
|
|
|
rSh.EnterSelFrmMode();
|
|
|
|
pView->AttrChangedNotify( &rSh );
|
|
|
|
}
|
|
|
|
else
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2009-09-18 10:15:03 +00:00
|
|
|
case SID_PASTE_SPECIAL:
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2001-02-02 16:46:27 +00:00
|
|
|
TransferableDataHelper aDataHelper(
|
2001-05-22 15:29:19 +00:00
|
|
|
TransferableDataHelper::CreateFromSystemClipboard(
|
|
|
|
&rSh.GetView().GetEditWin()) );
|
2001-09-07 10:26:22 +00:00
|
|
|
if( aDataHelper.GetXTransferable().is() &&
|
2001-02-02 16:46:27 +00:00
|
|
|
SwTransferable::IsPaste( rSh, aDataHelper ))
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
|
|
|
// temp. Variablen, da die Shell nach dem Paste schon
|
|
|
|
// zerstoert sein kann
|
|
|
|
SwView* pView = &rView;
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uLong nFormatId = 0;
|
2003-04-24 08:54:40 +00:00
|
|
|
rReq.Ignore();
|
2013-02-13 00:02:30 +09:00
|
|
|
bIgnore = true;
|
2002-07-01 12:04:47 +00:00
|
|
|
int nRet = SwTransferable::PasteSpecial( rSh, aDataHelper, nFormatId );
|
2011-12-20 22:43:22 +00:00
|
|
|
if(nRet)
|
2002-06-27 07:47:17 +00:00
|
|
|
{
|
2005-02-22 09:04:08 +00:00
|
|
|
SfxViewFrame* pViewFrame = pView->GetViewFrame();
|
2007-09-27 11:26:21 +00:00
|
|
|
uno::Reference< frame::XDispatchRecorder > xRecorder =
|
2005-01-18 13:30:21 +00:00
|
|
|
pViewFrame->GetBindings().GetRecorder();
|
|
|
|
if(xRecorder.is()) {
|
2005-02-22 09:04:08 +00:00
|
|
|
SfxRequest aReq( pViewFrame, SID_CLIPBOARD_FORMAT_ITEMS );
|
2005-01-18 13:30:21 +00:00
|
|
|
aReq.AppendItem( SfxUInt32Item( SID_CLIPBOARD_FORMAT_ITEMS, nFormatId ) );
|
|
|
|
aReq.Done();
|
|
|
|
}
|
2002-06-27 07:47:17 +00:00
|
|
|
}
|
2001-02-02 16:46:27 +00:00
|
|
|
|
2000-09-18 16:15:01 +00:00
|
|
|
if (rSh.IsFrmSelected() || rSh.IsObjSelected())
|
|
|
|
rSh.EnterSelFrmMode();
|
2001-02-02 16:46:27 +00:00
|
|
|
pView->AttrChangedNotify( &rSh );
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
default:
|
2011-03-12 11:51:35 +01:00
|
|
|
OSL_FAIL("wrong Dispatcher");
|
2000-09-18 16:15:01 +00:00
|
|
|
return;
|
|
|
|
}
|
2003-04-17 14:40:30 +00:00
|
|
|
if(!bIgnore)
|
|
|
|
rReq.Done();
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*--------------------------------------------------------------------
|
|
|
|
Beschreibung: ClipBoard-Status
|
|
|
|
--------------------------------------------------------------------*/
|
|
|
|
void SwBaseShell::StateClpbrd(SfxItemSet &rSet)
|
|
|
|
{
|
|
|
|
SwWrtShell &rSh = GetShell();
|
|
|
|
SfxWhichIter aIter(rSet);
|
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
const sal_Bool bCopy = rSh.HasSelection();
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt16 nWhich = aIter.FirstWhich();
|
2000-09-18 16:15:01 +00:00
|
|
|
|
|
|
|
while(nWhich)
|
|
|
|
{
|
|
|
|
switch(nWhich)
|
|
|
|
{
|
2001-04-30 15:00:13 +00:00
|
|
|
case SID_CUT:
|
2007-09-27 11:26:21 +00:00
|
|
|
if( 0 != rSh.IsSelObjProtected(FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) )
|
2001-04-30 15:00:13 +00:00
|
|
|
{
|
|
|
|
rSet.DisableItem( nWhich );
|
2000-09-18 16:15:01 +00:00
|
|
|
break;
|
2001-04-30 15:00:13 +00:00
|
|
|
}
|
|
|
|
case SID_COPY:
|
|
|
|
if( !bCopy )
|
|
|
|
rSet.DisableItem( nWhich );
|
|
|
|
break;
|
2001-02-02 16:46:27 +00:00
|
|
|
|
2001-04-30 15:00:13 +00:00
|
|
|
case SID_PASTE:
|
|
|
|
if( !GetView().IsPasteAllowed() )
|
|
|
|
rSet.DisableItem( SID_PASTE );
|
|
|
|
break;
|
2001-03-30 13:49:11 +00:00
|
|
|
|
2009-09-18 10:15:03 +00:00
|
|
|
case SID_PASTE_SPECIAL:
|
2001-04-30 15:00:13 +00:00
|
|
|
if( !GetView().IsPasteSpecialAllowed() )
|
2009-07-16 15:07:54 +00:00
|
|
|
{
|
2009-09-18 10:15:03 +00:00
|
|
|
rSet.DisableItem( SID_PASTE_SPECIAL );
|
2009-07-16 15:07:54 +00:00
|
|
|
rSet.DisableItem( SID_PASTE_UNFORMATTED );
|
|
|
|
}
|
2001-04-30 15:00:13 +00:00
|
|
|
break;
|
2001-02-02 16:46:27 +00:00
|
|
|
|
2001-04-30 15:00:13 +00:00
|
|
|
case SID_CLIPBOARD_FORMAT_ITEMS:
|
|
|
|
{
|
|
|
|
TransferableDataHelper aDataHelper(
|
2001-05-22 15:29:19 +00:00
|
|
|
TransferableDataHelper::CreateFromSystemClipboard(
|
|
|
|
&rSh.GetView().GetEditWin()) );
|
2001-04-30 15:00:13 +00:00
|
|
|
|
|
|
|
SvxClipboardFmtItem aFmtItem( nWhich );
|
|
|
|
SwTransferable::FillClipFmtItem( rSh, aDataHelper, aFmtItem );
|
|
|
|
rSet.Put( aFmtItem );
|
|
|
|
}
|
|
|
|
break;
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
nWhich = aIter.NextWhich();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*--------------------------------------------------------------------
|
|
|
|
Beschreibung: Undo ausfuehren
|
|
|
|
--------------------------------------------------------------------*/
|
|
|
|
void SwBaseShell::ExecUndo(SfxRequest &rReq)
|
|
|
|
{
|
|
|
|
SwWrtShell &rSh = GetShell();
|
2001-04-09 06:27:03 +00:00
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt16 nId = rReq.GetSlot(), nCnt = 1;
|
2001-04-09 06:27:03 +00:00
|
|
|
const SfxItemSet* pArgs = rReq.GetArgs();
|
|
|
|
const SfxPoolItem* pItem;
|
2011-01-17 15:06:54 +01:00
|
|
|
if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( nId, sal_False, &pItem ))
|
2001-04-09 06:27:03 +00:00
|
|
|
nCnt = ((SfxUInt16Item*)pItem)->GetValue();
|
|
|
|
|
2009-12-01 08:03:58 +00:00
|
|
|
// #i106349#: save pointer: undo/redo may delete the shell, i.e., this!
|
|
|
|
SfxViewFrame *const pViewFrame( GetView().GetViewFrame() );
|
|
|
|
|
2001-04-09 06:27:03 +00:00
|
|
|
switch( nId )
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
|
|
|
case SID_UNDO:
|
2008-08-18 09:50:19 +00:00
|
|
|
rSh.LockPaint();
|
2001-04-09 06:27:03 +00:00
|
|
|
rSh.Do( SwWrtShell::UNDO, nCnt );
|
2008-08-18 09:50:19 +00:00
|
|
|
rSh.UnlockPaint();
|
2000-09-18 16:15:01 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case SID_REDO:
|
2008-08-18 09:50:19 +00:00
|
|
|
rSh.LockPaint();
|
2001-04-09 06:27:03 +00:00
|
|
|
rSh.Do( SwWrtShell::REDO, nCnt );
|
2008-08-18 09:50:19 +00:00
|
|
|
rSh.UnlockPaint();
|
2000-09-18 16:15:01 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case SID_REPEAT:
|
|
|
|
rSh.Do( SwWrtShell::REPEAT );
|
|
|
|
break;
|
|
|
|
default:
|
2011-03-12 11:51:35 +01:00
|
|
|
OSL_FAIL("wrong Dispatcher");
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
2009-09-18 10:15:03 +00:00
|
|
|
|
2009-12-01 08:03:58 +00:00
|
|
|
if (pViewFrame) { pViewFrame->GetBindings().InvalidateAll(sal_False); }
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*--------------------------------------------------------------------
|
|
|
|
Beschreibung: Zustand Undo
|
|
|
|
--------------------------------------------------------------------*/
|
|
|
|
void SwBaseShell::StateUndo(SfxItemSet &rSet)
|
|
|
|
{
|
|
|
|
SwWrtShell &rSh = GetShell();
|
|
|
|
SfxWhichIter aIter(rSet);
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt16 nWhich = aIter.FirstWhich();
|
2000-09-18 16:15:01 +00:00
|
|
|
while(nWhich)
|
|
|
|
{
|
|
|
|
switch(nWhich)
|
|
|
|
{
|
|
|
|
case SID_UNDO:
|
|
|
|
{
|
2010-12-15 09:14:08 +01:00
|
|
|
if (rSh.GetLastUndoInfo(0, 0))
|
2010-11-25 14:31:10 +01:00
|
|
|
{
|
2001-04-09 06:27:03 +00:00
|
|
|
rSet.Put( SfxStringItem(nWhich,
|
2000-09-18 16:15:01 +00:00
|
|
|
rSh.GetDoString(SwWrtShell::UNDO)));
|
2010-11-25 14:31:10 +01:00
|
|
|
}
|
2000-09-18 16:15:01 +00:00
|
|
|
else
|
|
|
|
rSet.DisableItem(nWhich);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case SID_REDO:
|
|
|
|
{
|
2010-12-15 09:14:07 +01:00
|
|
|
if (rSh.GetFirstRedoInfo(0))
|
2010-11-25 14:31:10 +01:00
|
|
|
{
|
2000-09-18 16:15:01 +00:00
|
|
|
rSet.Put(SfxStringItem(nWhich,
|
|
|
|
rSh.GetDoString(SwWrtShell::REDO)));
|
2010-11-25 14:31:10 +01:00
|
|
|
}
|
2000-09-18 16:15:01 +00:00
|
|
|
else
|
|
|
|
rSet.DisableItem(nWhich);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case SID_REPEAT:
|
|
|
|
{ // Repeat nur moeglich wenn kein REDO moeglich - UI-Restriktion
|
2010-12-15 09:14:07 +01:00
|
|
|
if ((!rSh.GetFirstRedoInfo(0)) &&
|
2000-09-18 16:15:01 +00:00
|
|
|
!rSh.IsSelFrmMode() &&
|
2010-12-15 09:14:02 +01:00
|
|
|
(UNDO_EMPTY != rSh.GetRepeatInfo(0)))
|
2010-11-25 14:31:10 +01:00
|
|
|
{
|
2000-09-18 16:15:01 +00:00
|
|
|
rSet.Put(SfxStringItem(nWhich, rSh.GetRepeatString()));
|
2010-11-25 14:31:10 +01:00
|
|
|
}
|
2000-09-18 16:15:01 +00:00
|
|
|
else
|
|
|
|
rSet.DisableItem(nWhich);
|
|
|
|
break;
|
|
|
|
}
|
2001-04-09 06:27:03 +00:00
|
|
|
|
|
|
|
case SID_GETUNDOSTRINGS:
|
2010-12-15 09:14:08 +01:00
|
|
|
if (rSh.GetLastUndoInfo(0, 0))
|
2001-04-09 06:27:03 +00:00
|
|
|
{
|
|
|
|
SfxStringListItem aStrLst( nWhich );
|
|
|
|
rSh.GetDoStrings( SwWrtShell::UNDO, aStrLst );
|
|
|
|
rSet.Put( aStrLst );
|
|
|
|
}
|
|
|
|
else
|
|
|
|
rSet.DisableItem( nWhich );
|
|
|
|
break;
|
|
|
|
|
|
|
|
case SID_GETREDOSTRINGS:
|
2010-12-15 09:14:07 +01:00
|
|
|
if (rSh.GetFirstRedoInfo(0))
|
2001-04-09 06:27:03 +00:00
|
|
|
{
|
|
|
|
SfxStringListItem aStrLst( nWhich );
|
|
|
|
rSh.GetDoStrings( SwWrtShell::REDO, aStrLst );
|
|
|
|
rSet.Put( aStrLst );
|
|
|
|
}
|
|
|
|
else
|
|
|
|
rSet.DisableItem( nWhich );
|
|
|
|
break;
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
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();
|
2013-02-13 00:02:30 +09:00
|
|
|
bool bMore = false;
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt16 nSlot = rReq.GetSlot();
|
2000-09-18 16:15:01 +00:00
|
|
|
switch(nSlot)
|
|
|
|
{
|
|
|
|
case FN_REPAGINATE:
|
2001-06-26 10:42:49 +00:00
|
|
|
{
|
2003-06-12 06:42:06 +00:00
|
|
|
Reference < XModel > xModel = GetView().GetDocShell()->GetModel();
|
2001-06-26 10:42:49 +00:00
|
|
|
Reference < XUnoTunnel > xDocTunnel ( xModel, UNO_QUERY );
|
|
|
|
SwXTextDocument *pDoc = reinterpret_cast < SwXTextDocument * > ( xDocTunnel->getSomething ( SwXTextDocument::getUnoTunnelId() ) );
|
2013-02-02 22:31:48 +01:00
|
|
|
pDoc->NotifyRefreshListeners();
|
2001-06-26 10:42:49 +00:00
|
|
|
rSh.CalcLayout();
|
|
|
|
}
|
2000-09-18 16:15:01 +00:00
|
|
|
break;
|
|
|
|
case FN_UPDATE_FIELDS:
|
|
|
|
{
|
2011-08-23 16:25:52 +01:00
|
|
|
rSh.UpdateDocStat();
|
2000-09-18 16:15:01 +00:00
|
|
|
rSh.EndAllTblBoxEdit();
|
2011-01-17 15:06:54 +01:00
|
|
|
rSh.ViewShell::UpdateFlds(sal_True);
|
2000-09-18 16:15:01 +00:00
|
|
|
|
|
|
|
if( rSh.IsCrsrInTbl() )
|
|
|
|
{
|
|
|
|
if( !rSh.IsTblComplexForChart() )
|
2011-01-17 15:06:54 +01:00
|
|
|
SwTableFUNC( &rSh, sal_False).UpdateChart();
|
2000-09-18 16:15:01 +00:00
|
|
|
rSh.ClearTblBoxCntnt();
|
|
|
|
rSh.SaveTblBoxCntnt();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case FN_UPDATE_CHARTS:
|
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
SwWait aWait( *rView.GetDocShell(), sal_True );
|
2000-09-18 16:15:01 +00:00
|
|
|
rSh.UpdateAllCharts();
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case FN_UPDATE_ALL:
|
|
|
|
{
|
2007-09-27 11:26:21 +00:00
|
|
|
SwView& rTempView = GetView();
|
2000-09-18 16:15:01 +00:00
|
|
|
rSh.EnterStdMode();
|
2012-06-12 15:41:27 +02:00
|
|
|
if( !rSh.GetLinkManager().GetLinks().empty() )
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
|
|
|
rSh.StartAllAction();
|
2012-10-30 11:27:06 +09:00
|
|
|
rSh.GetLinkManager().UpdateAllLinks( false, true, true );
|
2000-09-18 16:15:01 +00:00
|
|
|
rSh.EndAllAction();
|
|
|
|
}
|
2007-09-27 11:26:21 +00:00
|
|
|
SfxDispatcher &rDis = *rTempView.GetViewFrame()->GetDispatcher();
|
2000-09-18 16:15:01 +00:00
|
|
|
rDis.Execute( FN_UPDATE_FIELDS );
|
|
|
|
rDis.Execute( FN_UPDATE_TOX );
|
|
|
|
rDis.Execute( FN_UPDATE_CHARTS );
|
|
|
|
rSh.CalcLayout();
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case FN_UPDATE_INPUTFIELDS:
|
2011-01-17 15:06:54 +01:00
|
|
|
rSh.UpdateInputFlds(NULL, sal_False);
|
2000-09-18 16:15:01 +00:00
|
|
|
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())
|
|
|
|
{
|
2012-09-02 16:05:21 +04:00
|
|
|
SwMvContext aMvContext(&rSh);
|
2000-09-18 16:15:01 +00:00
|
|
|
if (rSh.IsCrsrPtAtEnd())
|
|
|
|
rSh.SwapPam();
|
|
|
|
rSh.ClearMark();
|
|
|
|
rSh.EndSelect();
|
|
|
|
}
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_Bool bRet = rSh.MoveFldType(pFldType, nSlot == FN_GOTO_NEXT_MARK);
|
2010-02-04 12:32:20 +01:00
|
|
|
SwField* pCurField = bRet ? rSh.GetCurFld() : 0;
|
|
|
|
if (pCurField)
|
|
|
|
rSh.ClickToField(*pCurField);
|
2000-09-18 16:15:01 +00:00
|
|
|
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 ?
|
2011-01-17 15:06:54 +01:00
|
|
|
rSh.SttEndDoc(sal_True) :
|
|
|
|
rSh.SttEndDoc(sal_False);
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
case FN_GOTO_PREV_OBJ:
|
|
|
|
case FN_GOTO_NEXT_OBJ:
|
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_Bool bSuccess = rSh.GotoObj(
|
|
|
|
nSlot == FN_GOTO_NEXT_OBJ ? sal_True : sal_False);
|
2000-09-18 16:15:01 +00:00
|
|
|
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();
|
2011-01-17 15:06:54 +01:00
|
|
|
if(SFX_ITEM_SET == pArgs->GetItemState( nSlot, sal_True, &pItem))
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2002-04-29 10:26:26 +00:00
|
|
|
GalleryExplorer* pGal = 0;
|
2007-09-27 11:26:21 +00:00
|
|
|
if ( (!rSh.IsSelFrmMode() || nSelType & nsSelectionType::SEL_GRF) &&
|
2002-04-29 10:26:26 +00:00
|
|
|
0!= (pGal = SVX_GALLERY())&&
|
|
|
|
0 != (SGA_FORMAT_GRAPHIC & ((SfxUInt32Item*)pItem)->GetValue()))
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
SwWait aWait( *rView.GetDocShell(), sal_True );
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2002-04-29 10:26:26 +00:00
|
|
|
String aGrfName, aFltName;
|
|
|
|
const Graphic aGrf( pGal->GetGraphic() );
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2002-04-29 10:26:26 +00:00
|
|
|
if( pGal->IsLinkage() )
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2002-04-29 10:26:26 +00:00
|
|
|
// Verknuepft
|
2005-01-11 11:43:03 +00:00
|
|
|
aGrfName = pGal->GetURL().GetMainURL(INetURLObject::NO_DECODE);
|
2002-04-29 10:26:26 +00:00
|
|
|
aFltName = pGal->GetFilterName();
|
|
|
|
}
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2007-09-27 11:26:21 +00:00
|
|
|
if ( nSelType & nsSelectionType::SEL_GRF )
|
2002-04-29 10:26:26 +00:00
|
|
|
rSh.ReRead( aGrfName, aFltName, &aGrf );
|
|
|
|
else
|
|
|
|
rSh.Insert( aGrfName, aFltName, aGrf );
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2002-04-29 10:26:26 +00:00
|
|
|
GetView().GetEditWin().GrabFocus();
|
|
|
|
}
|
|
|
|
else if(!rSh.IsSelFrmMode() && SGA_FORMAT_SOUND & ((SfxUInt32Item*)pItem)->GetValue())
|
|
|
|
{
|
2004-08-12 09:15:00 +00:00
|
|
|
const SfxStringItem aMediaURLItem( SID_INSERT_AVMEDIA, pGal->GetURL().GetMainURL( INetURLObject::NO_DECODE ) );
|
|
|
|
GetView().GetViewFrame()->GetDispatcher()->Execute( SID_INSERT_AVMEDIA, SFX_CALLMODE_SYNCHRON, &aMediaURLItem, 0L );
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case FN_PAGE_STYLE_SET_COLS:
|
|
|
|
{
|
|
|
|
if (pArgs)
|
|
|
|
{
|
|
|
|
// aktuellen PageDescriptor ermitteln und damit den Set fuellen
|
2011-01-17 15:06:54 +01:00
|
|
|
const sal_uInt16 nCurIdx = rSh.GetCurPageDesc();
|
2000-09-18 16:15:01 +00:00
|
|
|
SwPageDesc aPageDesc(rSh.GetPageDesc(nCurIdx));
|
|
|
|
|
|
|
|
SwFrmFmt &rFmt = aPageDesc.GetMaster();
|
|
|
|
|
|
|
|
SwFmtCol aFmtCol = rFmt.GetCol();
|
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt16 nCount;
|
2000-09-18 16:15:01 +00:00
|
|
|
if(SFX_ITEM_SET == pArgs->GetItemState(nSlot))
|
|
|
|
nCount = ((SfxUInt16Item &)pArgs->Get(nSlot)).GetValue();
|
|
|
|
else
|
|
|
|
nCount = ((SfxUInt16Item &)pArgs->Get(SID_ATTR_COLUMNS)).GetValue();
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt16 nGutterWidth = DEF_GUTTER_WIDTH;
|
2000-09-18 16:15:01 +00:00
|
|
|
|
|
|
|
aFmtCol.Init(nCount ? nCount : 1, nGutterWidth, USHRT_MAX);
|
|
|
|
aFmtCol.SetWishWidth(USHRT_MAX);
|
|
|
|
aFmtCol.SetGutterWidth(nGutterWidth, USHRT_MAX);
|
|
|
|
|
2008-06-13 10:17:37 +00:00
|
|
|
rFmt.SetFmtAttr(aFmtCol);
|
2000-09-18 16:15:01 +00:00
|
|
|
|
|
|
|
rSh.ChgPageDesc(nCurIdx, aPageDesc);
|
|
|
|
}
|
|
|
|
else
|
2011-01-17 15:06:54 +01:00
|
|
|
GetView().GetViewFrame()->GetDispatcher()->Execute(FN_FORMAT_PAGE_COLUMN_DLG, sal_False);
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
break;
|
2004-08-02 12:07:30 +00:00
|
|
|
case FN_CONVERT_TABLE_TO_TEXT:
|
|
|
|
case FN_CONVERT_TEXT_TO_TABLE:
|
2000-09-18 16:15:01 +00:00
|
|
|
case FN_CONVERT_TEXT_TABLE:
|
|
|
|
{
|
2002-08-09 14:12:53 +00:00
|
|
|
sal_Unicode cDelim = 0;
|
2005-10-19 07:31:36 +00:00
|
|
|
bool bToTable = false;
|
|
|
|
if( nSlot == FN_CONVERT_TEXT_TO_TABLE ||
|
|
|
|
( nSlot == FN_CONVERT_TEXT_TABLE && 0 == rSh.GetTableFmt() ))
|
|
|
|
bToTable = true;
|
2004-05-03 12:54:25 +00:00
|
|
|
SwInsertTableOptions aInsTblOpts( tabopts::ALL_TBL_INS_ATTR, 1 );
|
2012-05-15 00:25:35 +02:00
|
|
|
SwTableAutoFmt const* pTAFmt = 0;
|
2005-01-07 08:46:10 +00:00
|
|
|
SwTableAutoFmtTbl* pAutoFmtTbl = 0;
|
|
|
|
bool bDeleteFormat = true;
|
2011-01-17 15:06:54 +01:00
|
|
|
if(pArgs && SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_1, sal_True, &pItem))
|
2005-01-07 08:46:10 +00:00
|
|
|
{
|
|
|
|
aInsTblOpts.mnInsMode = 0;
|
|
|
|
//Delimiter
|
|
|
|
String sDelim = static_cast< const SfxStringItem* >(pItem)->GetValue();
|
|
|
|
if(sDelim.Len())
|
|
|
|
cDelim = sDelim.GetChar(0);
|
|
|
|
//AutoFormat
|
2011-01-17 15:06:54 +01:00
|
|
|
if(SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_2, sal_True, &pItem))
|
2005-01-07 08:46:10 +00:00
|
|
|
{
|
|
|
|
String sAutoFmt = static_cast< const SfxStringItem* >(pItem)->GetValue();
|
2004-05-10 15:34:49 +00:00
|
|
|
|
2005-01-07 08:46:10 +00:00
|
|
|
pAutoFmtTbl = new SwTableAutoFmtTbl;
|
|
|
|
pAutoFmtTbl->Load();
|
|
|
|
|
2012-05-09 14:24:47 +02:00
|
|
|
for( sal_uInt16 i = 0, nCount = pAutoFmtTbl->size(); i < nCount; i++ )
|
2005-01-07 08:46:10 +00:00
|
|
|
{
|
2012-05-15 00:25:35 +02:00
|
|
|
SwTableAutoFmt const*const pFmt = &(*pAutoFmtTbl)[ i ];
|
2005-01-07 08:46:10 +00:00
|
|
|
if( pFmt->GetName() == sAutoFmt )
|
|
|
|
{
|
|
|
|
pTAFmt = pFmt;
|
|
|
|
bDeleteFormat = false;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//WithHeader
|
2011-01-17 15:06:54 +01:00
|
|
|
if(SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_3, sal_True, &pItem) &&
|
2005-01-07 08:46:10 +00:00
|
|
|
static_cast< const SfxBoolItem* >(pItem)->GetValue())
|
|
|
|
aInsTblOpts.mnInsMode |= tabopts::HEADLINE;
|
|
|
|
// RepeatHeaderLines
|
2011-01-17 15:06:54 +01:00
|
|
|
if(SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_4, sal_True, &pItem))
|
2005-01-07 08:46:10 +00:00
|
|
|
aInsTblOpts.mnRowsToRepeat =
|
2011-01-17 15:06:54 +01:00
|
|
|
(sal_uInt16)static_cast< const SfxInt16Item* >(pItem)->GetValue();
|
2005-01-07 08:46:10 +00:00
|
|
|
//WithBorder
|
2011-01-17 15:06:54 +01:00
|
|
|
if(SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_5, sal_True, &pItem) &&
|
2005-01-07 08:46:10 +00:00
|
|
|
static_cast< const SfxBoolItem* >(pItem)->GetValue())
|
|
|
|
aInsTblOpts.mnInsMode |= tabopts::DEFAULT_BORDER;
|
|
|
|
//DontSplitTable
|
2011-01-17 15:06:54 +01:00
|
|
|
if(SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_6, sal_True, &pItem) &&
|
2005-01-07 08:46:10 +00:00
|
|
|
!static_cast< const SfxBoolItem* >(pItem)->GetValue() )
|
|
|
|
aInsTblOpts.mnInsMode |= tabopts::SPLIT_LAYOUT;
|
|
|
|
}
|
|
|
|
else
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2007-09-27 11:26:21 +00:00
|
|
|
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
|
2010-10-24 23:48:32 +02:00
|
|
|
OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
|
2005-01-07 08:46:10 +00:00
|
|
|
|
2012-09-17 15:14:55 +01:00
|
|
|
AbstractSwConvertTableDlg* pDlg = pFact->CreateSwConvertTableDlg(GetView(), bToTable);
|
2010-10-24 23:48:32 +02:00
|
|
|
OSL_ENSURE(pDlg, "Dialogdiet fail!");
|
2005-01-07 08:46:10 +00:00
|
|
|
if( RET_OK == pDlg->Execute() )
|
|
|
|
{
|
|
|
|
pDlg->GetValues( cDelim, aInsTblOpts, pTAFmt );
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2005-01-07 08:46:10 +00:00
|
|
|
}
|
|
|
|
delete pDlg;
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if( cDelim )
|
|
|
|
{
|
|
|
|
//Shellwechsel!
|
|
|
|
SwView& rSaveView = rView;
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_Bool bInserted = sal_False;
|
2005-01-07 08:46:10 +00:00
|
|
|
//recording:
|
|
|
|
|
|
|
|
SfxViewFrame* pViewFrame = GetView().GetViewFrame();
|
|
|
|
if( SfxRequest::HasMacroRecorder(pViewFrame) )
|
|
|
|
{
|
|
|
|
SfxRequest aReq( pViewFrame, nSlot);
|
2012-07-04 23:58:05 +01:00
|
|
|
aReq.AppendItem( SfxStringItem( FN_PARAM_1, rtl::OUString(cDelim) ));
|
2005-10-19 07:31:36 +00:00
|
|
|
if(bToTable)
|
2005-01-07 08:46:10 +00:00
|
|
|
{
|
|
|
|
if(pTAFmt)
|
|
|
|
aReq.AppendItem( SfxStringItem( FN_PARAM_2, pTAFmt->GetName()));
|
|
|
|
aReq.AppendItem( SfxBoolItem ( FN_PARAM_3, 0 != (aInsTblOpts.mnInsMode & tabopts::HEADLINE)));
|
|
|
|
aReq.AppendItem( SfxInt16Item( FN_PARAM_4, (short)aInsTblOpts.mnRowsToRepeat ));
|
|
|
|
aReq.AppendItem( SfxBoolItem ( FN_PARAM_5, 0 != (aInsTblOpts.mnInsMode & tabopts::DEFAULT_BORDER) ));
|
|
|
|
aReq.AppendItem( SfxBoolItem ( FN_PARAM_6, !(aInsTblOpts.mnInsMode & tabopts::SPLIT_LAYOUT)));
|
|
|
|
}
|
|
|
|
aReq.Done();
|
|
|
|
}
|
|
|
|
|
2005-10-19 07:31:36 +00:00
|
|
|
if( !bToTable )
|
2000-09-18 16:15:01 +00:00
|
|
|
rSh.TableToText( cDelim );
|
|
|
|
else
|
2005-01-07 08:46:10 +00:00
|
|
|
{
|
2007-09-27 11:26:21 +00:00
|
|
|
bInserted = rSh.TextToTable( aInsTblOpts, cDelim, text::HoriOrientation::FULL, pTAFmt );
|
2005-01-07 08:46:10 +00:00
|
|
|
}
|
2000-09-18 16:15:01 +00:00
|
|
|
rSh.EnterStdMode();
|
|
|
|
|
|
|
|
if( bInserted )
|
|
|
|
rSaveView.AutoCaption( TABLE_CAP );
|
|
|
|
}
|
2005-01-07 08:46:10 +00:00
|
|
|
if(bDeleteFormat)
|
|
|
|
delete pTAFmt;
|
|
|
|
delete pAutoFmtTbl;
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
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();
|
2007-09-27 11:26:21 +00:00
|
|
|
if ( SHELL_MODE_DRAW != eMode &&
|
|
|
|
SHELL_MODE_DRAW_CTRL != eMode &&
|
|
|
|
SHELL_MODE_DRAW_FORM != eMode &&
|
|
|
|
SHELL_MODE_DRAWTEXT != eMode &&
|
|
|
|
SHELL_MODE_BEZIER != eMode )
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2003-04-01 14:41:52 +00:00
|
|
|
// oj #107754#
|
|
|
|
if ( SID_STYLE_WATERCAN == nSlot )
|
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
const sal_Bool bLockedView = rSh.IsViewLocked();
|
|
|
|
rSh.LockView( sal_True ); //lock visible section
|
2003-04-01 14:41:52 +00:00
|
|
|
|
|
|
|
GetView().GetDocShell()->ExecStyleSheet(rReq);
|
|
|
|
|
|
|
|
rSh.LockView( bLockedView );
|
|
|
|
}
|
|
|
|
else
|
2000-09-18 16:15:01 +00:00
|
|
|
// wird von der DocShell aufgezeichnet
|
2003-04-01 14:41:52 +00:00
|
|
|
GetView().GetDocShell()->ExecStyleSheet(rReq);
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case FN_ESCAPE:
|
|
|
|
GetView().ExecuteSlot(rReq);
|
|
|
|
break;
|
|
|
|
case SID_IMAP:
|
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt16 nId = SvxIMapDlgChildWindow::GetChildWindowId();
|
2000-09-18 16:15:01 +00:00
|
|
|
|
|
|
|
SfxViewFrame* pVFrame = GetView().GetViewFrame();
|
|
|
|
pVFrame->ToggleChildWindow( nId );
|
|
|
|
pVFrame->GetBindings().Invalidate( SID_IMAP );
|
|
|
|
|
|
|
|
if ( pVFrame->HasChildWindow( nId ) && rSh.IsFrmSelected() )
|
2001-07-04 17:12:13 +00:00
|
|
|
lcl_UpdateIMapDlg( rSh );
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
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:
|
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt16 nId = SvxContourDlgChildWindow::GetChildWindowId();
|
2000-09-18 16:15:01 +00:00
|
|
|
|
|
|
|
SfxViewFrame* pVFrame = GetView().GetViewFrame();
|
|
|
|
pVFrame->ToggleChildWindow( nId );
|
|
|
|
pVFrame->GetBindings().Invalidate( SID_CONTOUR_DLG );
|
|
|
|
|
|
|
|
int nSel = rSh.GetSelectionType();
|
|
|
|
if ( pVFrame->HasChildWindow( nId ) &&
|
2007-09-27 11:26:21 +00:00
|
|
|
(nSel & (nsSelectionType::SEL_GRF|nsSelectionType::SEL_OLE)) )
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
|
|
|
lcl_UpdateContourDlg( rSh, nSel );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case SID_CONTOUR_EXEC:
|
|
|
|
{
|
|
|
|
SvxContourDlg *pDlg = SWCONTOURDLG(GetView());
|
|
|
|
|
|
|
|
// Kontrolle, ob Zuweisung ueberhaupt sinnvoll/erlaubt
|
|
|
|
int nSel = rSh.GetSelectionType();
|
2007-09-27 11:26:21 +00:00
|
|
|
if ( nSel & (nsSelectionType::SEL_GRF|nsSelectionType::SEL_OLE) )
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
|
|
|
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() )
|
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
aSur.SetContour( sal_True );
|
2000-09-18 16:15:01 +00:00
|
|
|
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;
|
2011-11-08 15:02:34 +07:00
|
|
|
case FN_TOOL_ANCHOR:
|
2000-09-18 16:15:01 +00:00
|
|
|
break;
|
2011-11-08 15:02:34 +07:00
|
|
|
case FN_TOOL_ANCHOR_PAGE:
|
|
|
|
case FN_TOOL_ANCHOR_PARAGRAPH:
|
|
|
|
case FN_TOOL_ANCHOR_CHAR:
|
|
|
|
case FN_TOOL_ANCHOR_AT_CHAR:
|
|
|
|
case FN_TOOL_ANCHOR_FRAME:
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2011-11-08 15:02:34 +07:00
|
|
|
RndStdIds eSet = nSlot == FN_TOOL_ANCHOR_PAGE
|
2010-01-05 16:37:41 +01:00
|
|
|
? FLY_AT_PAGE
|
2011-11-08 15:02:34 +07:00
|
|
|
: nSlot == FN_TOOL_ANCHOR_PARAGRAPH
|
2010-01-05 16:37:41 +01:00
|
|
|
? FLY_AT_PARA
|
2011-11-08 15:02:34 +07:00
|
|
|
: nSlot == FN_TOOL_ANCHOR_FRAME
|
2000-09-18 16:15:01 +00:00
|
|
|
? FLY_AT_FLY
|
2011-11-08 15:02:34 +07:00
|
|
|
: nSlot == FN_TOOL_ANCHOR_CHAR
|
2010-01-05 16:37:41 +01:00
|
|
|
? FLY_AS_CHAR
|
|
|
|
: FLY_AT_CHAR;
|
2000-09-18 16:15:01 +00:00
|
|
|
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);
|
|
|
|
}
|
|
|
|
|
2010-11-05 09:14:59 +01:00
|
|
|
// if new anchor is 'as char' and it is a Math object and the usual
|
2010-11-05 09:15:46 +01:00
|
|
|
// pre-conditions are met then align the formula to the baseline of the text
|
2010-11-05 09:14:59 +01:00
|
|
|
const uno::Reference < embed::XEmbeddedObject > xObj( rSh.GetOleRef() );
|
|
|
|
const bool bDoMathBaselineAlignment = xObj.is() && SotExchange::IsMath( xObj->getClassID() )
|
|
|
|
&& FLY_AS_CHAR == eSet && rSh.GetDoc()->get( IDocumentSettingAccess::MATH_BASELINE_ALIGNMENT );
|
|
|
|
if (bDoMathBaselineAlignment)
|
|
|
|
rSh.AlignFormulaToBaseline( xObj );
|
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt16 nHtmlMode = ::GetHtmlMode(GetView().GetDocShell());
|
2000-09-18 16:15:01 +00:00
|
|
|
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);
|
2007-09-27 11:26:21 +00:00
|
|
|
sal_Int16 eVOrient = rVert.GetVertOrient();
|
|
|
|
sal_Int16 eHOrient = rHori.GetHoriOrient();
|
2000-09-18 16:15:01 +00:00
|
|
|
SwSurround eSurround = rSurround.GetSurround();
|
|
|
|
|
|
|
|
switch( eSet )
|
|
|
|
{
|
|
|
|
case FLY_AT_FLY:
|
2010-01-05 16:37:41 +01:00
|
|
|
case FLY_AT_PAGE:
|
2000-09-18 16:15:01 +00:00
|
|
|
|
|
|
|
//Durchlauf, links oder von links, oben, von oben
|
|
|
|
if(eSurround != SURROUND_THROUGHT)
|
|
|
|
aSet.Put(SwFmtSurround(SURROUND_THROUGHT));
|
|
|
|
|
2007-09-27 11:26:21 +00:00
|
|
|
if( eVOrient != text::VertOrientation::TOP && eVOrient != text::VertOrientation::NONE)
|
|
|
|
aSet.Put(SwFmtVertOrient(0, text::VertOrientation::TOP));
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2007-09-27 11:26:21 +00:00
|
|
|
if(eHOrient != text::HoriOrientation::NONE || eHOrient != text::HoriOrientation::LEFT)
|
|
|
|
aSet.Put(SwFmtHoriOrient(0, text::HoriOrientation::LEFT));
|
2000-09-18 16:15:01 +00:00
|
|
|
break;
|
|
|
|
|
2010-01-05 16:37:41 +01:00
|
|
|
case FLY_AT_PARA:
|
2000-09-18 16:15:01 +00:00
|
|
|
//links, von links, rechts, oben, kein Uml, li+re Umlauf,
|
|
|
|
if(eSurround != SURROUND_LEFT || eSurround != SURROUND_RIGHT)
|
|
|
|
aSet.Put(SwFmtSurround(SURROUND_LEFT));
|
|
|
|
|
2007-09-27 11:26:21 +00:00
|
|
|
if( eVOrient != text::VertOrientation::TOP)
|
|
|
|
aSet.Put(SwFmtVertOrient(0, text::VertOrientation::TOP));
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2007-09-27 11:26:21 +00:00
|
|
|
if(eHOrient != text::HoriOrientation::NONE || eHOrient != text::HoriOrientation::LEFT || eHOrient != text::HoriOrientation::RIGHT)
|
|
|
|
aSet.Put(SwFmtHoriOrient(0, text::HoriOrientation::LEFT));
|
2000-09-18 16:15:01 +00:00
|
|
|
break;
|
|
|
|
|
2010-01-05 16:37:41 +01:00
|
|
|
case FLY_AT_CHAR:
|
2000-09-18 16:15:01 +00:00
|
|
|
//links, von links, rechts, oben, Durchlauf
|
|
|
|
if(eSurround != SURROUND_THROUGHT)
|
|
|
|
aSet.Put(SwFmtSurround(SURROUND_THROUGHT));
|
|
|
|
|
2007-09-27 11:26:21 +00:00
|
|
|
if( eVOrient != text::VertOrientation::TOP)
|
|
|
|
aSet.Put(SwFmtVertOrient(0, text::VertOrientation::TOP));
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2007-09-27 11:26:21 +00:00
|
|
|
if(eHOrient != text::HoriOrientation::NONE || eHOrient != text::HoriOrientation::LEFT || eHOrient != text::HoriOrientation::RIGHT)
|
|
|
|
aSet.Put(SwFmtHoriOrient(0, text::HoriOrientation::LEFT));
|
2000-09-18 16:15:01 +00:00
|
|
|
break;
|
2007-09-27 11:26:21 +00:00
|
|
|
|
|
|
|
default:
|
|
|
|
;
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if( aSet.Count() )
|
|
|
|
rSh.SetFlyFrmAttr( aSet );
|
|
|
|
}
|
|
|
|
rSh.EndUndo();
|
|
|
|
|
2011-11-08 15:02:34 +07:00
|
|
|
GetView().GetViewFrame()->GetBindings().Invalidate( FN_TOOL_ANCHOR );
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
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:
|
|
|
|
{
|
2012-06-12 15:41:27 +02:00
|
|
|
if( !rSh.GetLinkManager().GetLinks().empty() )
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
|
|
|
rSh.EnterStdMode();
|
|
|
|
rSh.StartAllAction();
|
2012-10-30 11:27:06 +09:00
|
|
|
rSh.GetLinkManager().UpdateAllLinks( false, false, false );
|
2000-09-18 16:15:01 +00:00
|
|
|
rSh.EndAllAction();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2004-11-16 09:27:07 +00:00
|
|
|
case FN_XFORMS_DESIGN_MODE:
|
|
|
|
if( pArgs != NULL
|
2011-01-17 15:06:54 +01:00
|
|
|
&& pArgs->GetItemState( nSlot, sal_True, &pItem ) == SFX_ITEM_SET
|
2004-11-16 09:27:07 +00:00
|
|
|
&& pItem != NULL
|
|
|
|
&& pItem->ISA( SfxBoolItem ) )
|
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_Bool bDesignMode =
|
2004-11-16 09:27:07 +00:00
|
|
|
static_cast<const SfxBoolItem*>( pItem )->GetValue();
|
|
|
|
|
|
|
|
// set form design mode
|
2010-10-24 23:48:32 +02:00
|
|
|
OSL_ENSURE( GetView().GetFormShell() != NULL, "form shell?" );
|
2004-11-16 09:27:07 +00:00
|
|
|
SfxRequest aReq( GetView().GetViewFrame(), SID_FM_DESIGN_MODE );
|
|
|
|
aReq.AppendItem( SfxBoolItem( SID_FM_DESIGN_MODE, bDesignMode ) );
|
|
|
|
GetView().GetFormShell()->Execute( aReq );
|
|
|
|
aReq.Done();
|
|
|
|
|
|
|
|
// also set suitable view options
|
|
|
|
SwViewOption aViewOption = *rSh.GetViewOptions();
|
|
|
|
aViewOption.SetFormView( ! bDesignMode );
|
|
|
|
rSh.ApplyViewOptions( aViewOption );
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2000-09-18 16:15:01 +00:00
|
|
|
default:
|
2013-02-13 00:02:30 +09:00
|
|
|
bMore = true;
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
if(bMore && pArgs)
|
|
|
|
{
|
|
|
|
pItem = 0;
|
2011-01-17 15:06:54 +01:00
|
|
|
pArgs->GetItemState(GetPool().GetWhich(nSlot), sal_False, &pItem);
|
2000-09-18 16:15:01 +00:00
|
|
|
if(pItem)
|
|
|
|
switch(nSlot)
|
|
|
|
{
|
2002-06-27 07:47:17 +00:00
|
|
|
case SID_ATTR_BRUSH:
|
2000-09-18 16:15:01 +00:00
|
|
|
case SID_ATTR_BORDER_SHADOW:
|
|
|
|
case RES_SHADOW:
|
|
|
|
{
|
|
|
|
rSh.StartAllAction();
|
|
|
|
SfxItemSet aSet( rSh.GetAttrPool(),
|
2002-06-27 07:47:17 +00:00
|
|
|
RES_SHADOW, RES_SHADOW,
|
|
|
|
RES_BACKGROUND, RES_BACKGROUND, 0 );
|
2000-09-18 16:15:01 +00:00
|
|
|
|
|
|
|
aSet.Put(*pItem);
|
|
|
|
// Tabellenzelle(n) selektiert?
|
|
|
|
if ( rSh.IsTableMode() )
|
|
|
|
{
|
|
|
|
SwFrmFmt *pFmt = rSh.GetTableFmt();
|
2008-06-13 10:17:37 +00:00
|
|
|
pFmt->SetFmtAttr( *pItem );
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
else if ( rSh.IsFrmSelected() )
|
|
|
|
{
|
|
|
|
// Umrandungsattribute ueber Frame-Manager setzen
|
2011-01-17 15:06:54 +01:00
|
|
|
SwFlyFrmAttrMgr aMgr( sal_False, &rSh, FRMMGR_TYPE_NONE );
|
2000-09-18 16:15:01 +00:00
|
|
|
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:
|
|
|
|
{
|
2011-03-12 11:51:35 +01:00
|
|
|
OSL_FAIL("not implemented");
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
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
|
2011-01-17 15:06:54 +01:00
|
|
|
SwFlyFrmAttrMgr aMgr( sal_False, &rSh, FRMMGR_TYPE_NONE );
|
2000-09-18 16:15:01 +00:00
|
|
|
aMgr.SetAttrSet(*pArgs);
|
|
|
|
aMgr.UpdateFlyFrm();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
// Umrandungsattribute ganz normal ueber Shell setzen
|
|
|
|
rSh.SetAttr( *pItem );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
default:
|
2011-03-12 11:51:35 +01:00
|
|
|
OSL_FAIL("wrong Dispatcher");
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-01-17 21:50:08 +01:00
|
|
|
/* --------------------------------------------------
|
2000-09-18 16:15:01 +00:00
|
|
|
* Hier wird der State fuer SID_IMAP / SID_CONTOUR behandelt,
|
|
|
|
* wenn die Grafik ausgeswappt ist
|
|
|
|
* --------------------------------------------------*/
|
2012-03-01 18:00:32 +01:00
|
|
|
IMPL_LINK_NOARG(SwBaseShell, GraphicArrivedHdl)
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt16 nGrfType;
|
2000-09-18 16:15:01 +00:00
|
|
|
SwWrtShell &rSh = GetShell();
|
|
|
|
if( CNT_GRF == rSh.SwEditShell::GetCntType() &&
|
2000-12-22 11:07:52 +00:00
|
|
|
GRAPHIC_NONE != ( nGrfType = rSh.GetGraphicType() ) &&
|
2011-06-13 10:55:23 +01:00
|
|
|
!aGrfUpdateSlots.empty() )
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2013-02-13 00:02:30 +09:00
|
|
|
bool bProtect = 0 != rSh.IsSelObjProtected(FLYPROTECT_CONTENT|FLYPROTECT_PARENT);
|
2000-09-18 16:15:01 +00:00
|
|
|
SfxViewFrame* pVFrame = GetView().GetViewFrame();
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt16 nSlot;
|
2011-06-13 10:55:23 +01:00
|
|
|
std::set<sal_uInt16>::iterator it;
|
|
|
|
for( it = aGrfUpdateSlots.begin(); it != aGrfUpdateSlots.end(); ++it )
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_Bool bSetState = sal_False;
|
|
|
|
sal_Bool bState = sal_False;
|
2011-06-13 10:55:23 +01:00
|
|
|
switch( nSlot = *it )
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2000-12-22 11:07:52 +00:00
|
|
|
case SID_IMAP:
|
|
|
|
case SID_IMAP_EXEC:
|
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt16 nId = SvxIMapDlgChildWindow::GetChildWindowId();
|
2000-12-22 11:07:52 +00:00
|
|
|
SvxIMapDlg *pDlg = pVFrame->HasChildWindow( nId ) ?
|
|
|
|
(SvxIMapDlg*) ( pVFrame->GetChildWindow( nId )
|
|
|
|
->GetWindow()) : 0;
|
|
|
|
|
|
|
|
if( pDlg && ( SID_IMAP_EXEC == nSlot ||
|
|
|
|
( SID_IMAP == nSlot && !bProtect)) &&
|
2001-07-04 17:12:13 +00:00
|
|
|
pDlg->GetEditingObject() != rSh.GetIMapInventor())
|
2000-12-22 11:07:52 +00:00
|
|
|
lcl_UpdateIMapDlg( rSh );
|
|
|
|
|
|
|
|
if( !bProtect && SID_IMAP == nSlot )
|
2011-01-17 15:06:54 +01:00
|
|
|
bSetState = sal_True, bState = 0 != pDlg;
|
2000-12-22 11:07:52 +00:00
|
|
|
}
|
|
|
|
break;
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2000-12-22 11:07:52 +00:00
|
|
|
case SID_CONTOUR_DLG:
|
|
|
|
if( !bProtect )
|
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt16 nId = SvxContourDlgChildWindow::GetChildWindowId();
|
2000-12-22 11:07:52 +00:00
|
|
|
SvxIMapDlg *pDlg = pVFrame->HasChildWindow( nId ) ?
|
|
|
|
(SvxIMapDlg*) ( pVFrame->GetChildWindow( nId )
|
|
|
|
->GetWindow()) : 0;
|
|
|
|
if( pDlg && pDlg->GetEditingObject() !=
|
|
|
|
rSh.GetIMapInventor() )
|
2007-09-27 11:26:21 +00:00
|
|
|
lcl_UpdateContourDlg( rSh, nsSelectionType::SEL_GRF );
|
2000-12-22 11:07:52 +00:00
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
bSetState = sal_True;
|
2000-12-22 11:07:52 +00:00
|
|
|
bState = 0 != pDlg;
|
|
|
|
}
|
|
|
|
break;
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2000-12-22 11:07:52 +00:00
|
|
|
case FN_FRAME_WRAP_CONTOUR:
|
|
|
|
if( !bProtect )
|
|
|
|
{
|
|
|
|
SfxItemSet aSet(GetPool(), RES_SURROUND, RES_SURROUND);
|
|
|
|
rSh.GetFlyFrmAttr(aSet);
|
|
|
|
const SwFmtSurround& rWrap = (const SwFmtSurround&)aSet.Get(RES_SURROUND);
|
2011-01-17 15:06:54 +01:00
|
|
|
bSetState = sal_True;
|
2000-12-22 11:07:52 +00:00
|
|
|
bState = rWrap.IsContour();
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case SID_GRFFILTER:
|
|
|
|
case SID_GRFFILTER_INVERT:
|
|
|
|
case SID_GRFFILTER_SMOOTH:
|
|
|
|
case SID_GRFFILTER_SHARPEN:
|
|
|
|
case SID_GRFFILTER_REMOVENOISE:
|
|
|
|
case SID_GRFFILTER_SOBEL:
|
|
|
|
case SID_GRFFILTER_MOSAIC:
|
|
|
|
case SID_GRFFILTER_EMBOSS:
|
|
|
|
case SID_GRFFILTER_POSTER:
|
|
|
|
case SID_GRFFILTER_POPART:
|
|
|
|
case SID_GRFFILTER_SEPIA:
|
|
|
|
case SID_GRFFILTER_SOLARIZE:
|
|
|
|
bSetState = bState = GRAPHIC_BITMAP == nGrfType;
|
|
|
|
break;
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
|
2000-12-22 11:07:52 +00:00
|
|
|
if( bSetState )
|
|
|
|
{
|
|
|
|
SfxBoolItem aBool( nSlot, bState );
|
2000-09-18 16:15:01 +00:00
|
|
|
if( pGetStateSet )
|
|
|
|
pGetStateSet->Put( aBool );
|
|
|
|
else
|
|
|
|
pVFrame->GetBindings().SetState( aBool );
|
|
|
|
}
|
|
|
|
}
|
2011-06-13 10:55:23 +01:00
|
|
|
aGrfUpdateSlots.clear();
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
void SwBaseShell::GetState( SfxItemSet &rSet )
|
|
|
|
{
|
|
|
|
SwWrtShell &rSh = GetShell();
|
|
|
|
SfxViewFrame* pVFrame = GetView().GetViewFrame();
|
|
|
|
SfxWhichIter aIter( rSet );
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt16 nWhich = aIter.FirstWhich();
|
2000-09-18 16:15:01 +00:00
|
|
|
pGetStateSet = &rSet;
|
|
|
|
while ( nWhich )
|
|
|
|
{
|
|
|
|
switch ( nWhich )
|
|
|
|
{
|
|
|
|
case SID_GALLERY_FORMATS:
|
|
|
|
if ( rSh.IsObjSelected() ||
|
|
|
|
(rSh.IsSelFrmMode() &&
|
2007-09-27 11:26:21 +00:00
|
|
|
!(rSh.GetSelectionType() & nsSelectionType::SEL_GRF)) )
|
2000-09-18 16:15:01 +00:00
|
|
|
rSet.DisableItem( nWhich );
|
|
|
|
break;
|
|
|
|
case SID_GALLERY_ENABLE_ADDCOPY:
|
2003-04-17 15:11:30 +00:00
|
|
|
// #108230# allow copy from gallery in Writer AND Writer/Web!
|
2011-01-17 15:06:54 +01:00
|
|
|
rSet.Put( SfxBoolItem( SID_GALLERY_ENABLE_ADDCOPY, sal_True ) );
|
2000-09-18 16:15:01 +00:00
|
|
|
break;
|
|
|
|
case FN_EDIT_REGION:
|
|
|
|
if( !rSh.IsAnySectionInDoc() )
|
|
|
|
rSet.DisableItem(nWhich);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case FN_INSERT_REGION:
|
|
|
|
if( rSh.IsSelFrmMode() ||
|
|
|
|
!rSh.IsInsRegionAvailable() )
|
|
|
|
rSet.DisableItem( nWhich );
|
|
|
|
break;
|
2004-08-02 12:07:30 +00:00
|
|
|
case FN_CONVERT_TABLE_TO_TEXT:
|
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt16 eFrmType = rSh.GetFrmType(0,sal_True);
|
2004-08-02 12:07:30 +00:00
|
|
|
if( (eFrmType & FRMTYPE_FOOTNOTE) ||
|
|
|
|
!rSh.GetTableFmt() )
|
|
|
|
rSet.DisableItem( nWhich );
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case FN_CONVERT_TEXT_TO_TABLE:
|
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt16 eFrmType = rSh.GetFrmType(0,sal_True);
|
2004-08-02 12:07:30 +00:00
|
|
|
if( (eFrmType & FRMTYPE_FOOTNOTE) ||
|
|
|
|
!rSh.IsTextToTableAvailable() )
|
|
|
|
rSet.DisableItem( nWhich );
|
|
|
|
}
|
|
|
|
break;
|
2000-09-18 16:15:01 +00:00
|
|
|
case FN_CONVERT_TEXT_TABLE:
|
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt16 eFrmType = rSh.GetFrmType(0,sal_True);
|
2000-09-18 16:15:01 +00:00
|
|
|
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();
|
2011-01-17 15:06:54 +01:00
|
|
|
aSet.Put(pFmt->GetFmtAttr( nWhich, sal_True ));
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
else if( rSh.IsFrmSelected() )
|
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
SwFlyFrmAttrMgr aMgr( sal_False, &rSh, FRMMGR_TYPE_NONE );
|
2000-09-18 16:15:01 +00:00
|
|
|
aSet.Put( aMgr.GetAttrSet() );
|
|
|
|
}
|
|
|
|
else
|
2008-03-05 16:25:11 +00:00
|
|
|
rSh.GetCurAttr( aSet );
|
2000-09-18 16:15:01 +00:00
|
|
|
|
|
|
|
const SvxShadowItem& rShItem = (const SvxShadowItem&)aSet.Get(nWhich);
|
|
|
|
rSet.Put(rShItem);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case SID_IMAP:
|
|
|
|
{
|
2011-04-16 22:42:13 -03:00
|
|
|
// #i59688#
|
2006-12-01 13:28:21 +00:00
|
|
|
// improve efficiency:
|
|
|
|
// If selected object is protected, item has to disabled.
|
2013-02-13 00:02:30 +09:00
|
|
|
const bool bProtect = 0 != rSh.IsSelObjProtected(FLYPROTECT_CONTENT|FLYPROTECT_PARENT);
|
2006-12-01 13:28:21 +00:00
|
|
|
if ( bProtect )
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2006-12-01 13:28:21 +00:00
|
|
|
rSet.DisableItem( nWhich );
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
const sal_uInt16 nId = SvxIMapDlgChildWindow::GetChildWindowId();
|
|
|
|
const sal_Bool bHas = pVFrame->HasChildWindow( nId );
|
|
|
|
const sal_Bool bFrmSel = rSh.IsFrmSelected();
|
2013-02-13 00:02:30 +09:00
|
|
|
const bool bIsGraphicSelection =
|
2007-09-27 11:26:21 +00:00
|
|
|
rSh.GetSelectionType() == nsSelectionType::SEL_GRF;
|
2006-12-01 13:28:21 +00:00
|
|
|
|
2011-04-16 22:42:13 -03:00
|
|
|
// #i59688#
|
2006-12-01 13:28:21 +00:00
|
|
|
// avoid unnecessary loading of selected graphic.
|
|
|
|
// The graphic is only needed, if the dialog is open.
|
|
|
|
//wenn die Grafik ausgeswappt ist, dann muss der
|
|
|
|
//Status asynchron ermittelt werden
|
|
|
|
//bis dahin wird der Slot disabled
|
2011-01-17 15:06:54 +01:00
|
|
|
if ( bHas && bIsGraphicSelection && rSh.IsGrfSwapOut( sal_True ) )
|
2006-12-01 13:28:21 +00:00
|
|
|
{
|
|
|
|
if( AddGrfUpdateSlot( nWhich ))
|
2011-01-17 15:06:54 +01:00
|
|
|
rSh.GetGraphic(sal_False); // start the loading
|
2006-12-01 13:28:21 +00:00
|
|
|
}
|
2000-09-18 16:15:01 +00:00
|
|
|
else
|
|
|
|
{
|
2006-12-01 13:28:21 +00:00
|
|
|
if ( !bHas &&
|
|
|
|
( !bFrmSel ||
|
|
|
|
( bIsGraphicSelection &&
|
|
|
|
rSh.GetGraphicType() == GRAPHIC_NONE ) ) )
|
|
|
|
{
|
|
|
|
rSet.DisableItem( nWhich );
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
SfxBoolItem aBool(nWhich, bHas);
|
|
|
|
if ( bHas && bFrmSel )
|
|
|
|
lcl_UpdateIMapDlg( rSh );
|
|
|
|
rSet.Put(aBool);
|
|
|
|
}
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case SID_IMAP_EXEC:
|
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_Bool bDisable = sal_False;
|
2000-09-18 16:15:01 +00:00
|
|
|
if( !rSh.IsFrmSelected())
|
2011-01-17 15:06:54 +01:00
|
|
|
bDisable = sal_True;
|
|
|
|
sal_uInt16 nId = SvxIMapDlgChildWindow::GetChildWindowId();
|
2000-09-18 16:15:01 +00:00
|
|
|
if(!bDisable && pVFrame->HasChildWindow( nId ))
|
|
|
|
{
|
2007-09-27 11:26:21 +00:00
|
|
|
if(rSh.GetSelectionType() == nsSelectionType::SEL_GRF
|
2011-01-17 15:06:54 +01:00
|
|
|
&& rSh.IsGrfSwapOut(sal_True))
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2000-12-22 11:07:52 +00:00
|
|
|
if( AddGrfUpdateSlot( nWhich ))
|
2011-01-17 15:06:54 +01:00
|
|
|
rSh.GetGraphic(sal_False); // start the loading
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
SvxIMapDlg *pDlg = SWIMAPDLG(GetView());
|
|
|
|
if( pDlg->GetEditingObject() != rSh.GetIMapInventor() )
|
2001-07-04 17:12:13 +00:00
|
|
|
lcl_UpdateIMapDlg( rSh );
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
rSet.Put(SfxBoolItem(nWhich, bDisable));
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case FN_BACKSPACE:
|
|
|
|
case SID_DELETE:
|
2007-09-27 11:26:21 +00:00
|
|
|
if (rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) != 0)
|
2000-09-18 16:15:01 +00:00
|
|
|
rSet.DisableItem( nWhich );
|
|
|
|
break;
|
|
|
|
case SID_CONTOUR_DLG:
|
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_Bool bParentCntProt = 0 != rSh.IsSelObjProtected(FLYPROTECT_CONTENT|FLYPROTECT_PARENT );
|
2000-09-18 16:15:01 +00:00
|
|
|
|
|
|
|
if( bParentCntProt || 0 != (HTMLMODE_ON & ::GetHtmlMode(
|
|
|
|
GetView().GetDocShell() )) )
|
|
|
|
rSet.DisableItem( nWhich );
|
|
|
|
else
|
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt16 nId = SvxContourDlgChildWindow::GetChildWindowId();
|
|
|
|
sal_Bool bHas = GetView().GetViewFrame()->HasChildWindow( nId );
|
2000-09-18 16:15:01 +00:00
|
|
|
int nSel = rSh.GetSelectionType();
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_Bool bOk = 0 != (nSel & (nsSelectionType::SEL_GRF|nsSelectionType::SEL_OLE));
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2013-02-13 00:02:30 +09:00
|
|
|
bool bDisable = false;
|
2000-09-18 16:15:01 +00:00
|
|
|
if( !bHas && !bOk )
|
2013-02-13 00:02:30 +09:00
|
|
|
bDisable = true;
|
2011-04-16 22:42:13 -03:00
|
|
|
// #i59688#
|
2006-12-01 13:28:21 +00:00
|
|
|
// avoid unnecessary loading of selected graphic.
|
|
|
|
// The graphic is only needed, if the dialog is open.
|
2000-09-18 16:15:01 +00:00
|
|
|
// wenn die Grafik ausgeswappt ist, dann muss der Status
|
|
|
|
// asynchron ermittelt werden bis dahin wird der Slot
|
|
|
|
// disabled
|
2007-09-27 11:26:21 +00:00
|
|
|
else if ( bHas && (nSel & nsSelectionType::SEL_GRF) &&
|
2011-01-17 15:06:54 +01:00
|
|
|
rSh.IsGrfSwapOut(sal_True) )
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2000-12-22 11:07:52 +00:00
|
|
|
if( AddGrfUpdateSlot( nWhich ))
|
2011-01-17 15:06:54 +01:00
|
|
|
rSh.GetGraphic(sal_False); // start the loading
|
2011-04-16 22:42:13 -03:00
|
|
|
// #i75481#
|
2013-02-13 00:02:30 +09:00
|
|
|
bDisable = true;
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
else if( bHas && bOk )
|
|
|
|
bDisable = !lcl_UpdateContourDlg( rSh, nSel );
|
|
|
|
else if( bOk )
|
2007-07-26 07:22:26 +00:00
|
|
|
{
|
2011-04-16 22:42:13 -03:00
|
|
|
// #i75481#
|
2007-07-26 07:22:26 +00:00
|
|
|
// apply fix #i59688# only for selected graphics
|
2007-09-27 11:26:21 +00:00
|
|
|
if ( nSel & nsSelectionType::SEL_GRF )
|
2007-07-26 07:22:26 +00:00
|
|
|
bDisable = GRAPHIC_NONE == rSh.GetGraphicType();
|
|
|
|
else
|
|
|
|
bDisable = GRAPHIC_NONE == rSh.GetIMapGraphic().GetType();
|
|
|
|
}
|
2000-09-18 16:15:01 +00:00
|
|
|
|
|
|
|
if( bDisable )
|
|
|
|
rSet.DisableItem( nWhich );
|
|
|
|
else
|
|
|
|
rSet.Put( SfxBoolItem(nWhich, bHas) );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case SID_CONTOUR_EXEC:
|
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_Bool bDisable = sal_False;
|
2000-09-18 16:15:01 +00:00
|
|
|
int nSel = rSh.GetSelectionType();
|
2007-09-27 11:26:21 +00:00
|
|
|
if( !(nSel & (nsSelectionType::SEL_GRF|nsSelectionType::SEL_OLE)) )
|
2011-01-17 15:06:54 +01:00
|
|
|
bDisable = sal_True;
|
|
|
|
sal_uInt16 nId = SvxContourDlgChildWindow::GetChildWindowId();
|
2000-09-18 16:15:01 +00:00
|
|
|
if( !bDisable && GetView().GetViewFrame()->HasChildWindow( nId ))
|
|
|
|
{
|
|
|
|
SvxContourDlg *pDlg = SWCONTOURDLG(GetView());
|
|
|
|
if( pDlg->GetEditingObject() != rSh.GetIMapInventor() )
|
2011-01-17 15:06:54 +01:00
|
|
|
bDisable = sal_True;
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
rSet.Put(SfxBoolItem(nWhich, bDisable));
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2011-11-08 15:02:34 +07:00
|
|
|
case FN_TOOL_ANCHOR:
|
|
|
|
case FN_TOOL_ANCHOR_PAGE:
|
|
|
|
case FN_TOOL_ANCHOR_PARAGRAPH:
|
|
|
|
case FN_TOOL_ANCHOR_CHAR:
|
|
|
|
case FN_TOOL_ANCHOR_AT_CHAR:
|
|
|
|
case FN_TOOL_ANCHOR_FRAME:
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_Bool bObj = 0 != rSh.IsObjSelected();
|
|
|
|
sal_Bool bParentCntProt = rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) != 0;
|
2000-09-18 16:15:01 +00:00
|
|
|
|
|
|
|
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();
|
2011-01-17 15:06:54 +01:00
|
|
|
const sal_Bool bSet =
|
2011-11-08 15:02:34 +07:00
|
|
|
((nWhich == FN_TOOL_ANCHOR_PAGE) &&
|
2010-01-05 16:37:41 +01:00
|
|
|
(eSet == FLY_AT_PAGE))
|
2011-11-08 15:02:34 +07:00
|
|
|
|| ((nWhich == FN_TOOL_ANCHOR_PARAGRAPH) &&
|
2010-01-05 16:37:41 +01:00
|
|
|
(eSet == FLY_AT_PARA))
|
2011-11-08 15:02:34 +07:00
|
|
|
|| ((nWhich == FN_TOOL_ANCHOR_FRAME) &&
|
2010-01-05 16:37:41 +01:00
|
|
|
(eSet == FLY_AT_FLY))
|
2011-11-08 15:02:34 +07:00
|
|
|
|| ((nWhich == FN_TOOL_ANCHOR_AT_CHAR) &&
|
2010-01-05 16:37:41 +01:00
|
|
|
(eSet == FLY_AT_CHAR))
|
2011-11-08 15:02:34 +07:00
|
|
|
|| ((nWhich == FN_TOOL_ANCHOR_CHAR) &&
|
2010-01-05 16:37:41 +01:00
|
|
|
(eSet == FLY_AS_CHAR));
|
2011-11-08 15:02:34 +07:00
|
|
|
if(nWhich != FN_TOOL_ANCHOR)
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2012-08-24 18:53:36 +03:00
|
|
|
if( nWhich == FN_TOOL_ANCHOR_FRAME && !rSh.IsFlyInFly() )
|
2000-09-18 16:15:01 +00:00
|
|
|
rSet.DisableItem(nWhich);
|
|
|
|
else
|
|
|
|
rSet.Put(SfxBoolItem(nWhich, bSet));
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt16 nSlotId = 0;
|
2000-09-18 16:15:01 +00:00
|
|
|
|
|
|
|
switch (eSet)
|
|
|
|
{
|
2010-01-05 16:37:41 +01:00
|
|
|
case FLY_AT_PAGE:
|
2011-11-08 15:02:34 +07:00
|
|
|
nSlotId = FN_TOOL_ANCHOR_PAGE;
|
2000-09-18 16:15:01 +00:00
|
|
|
break;
|
2010-01-05 16:37:41 +01:00
|
|
|
case FLY_AT_PARA:
|
2011-11-08 15:02:34 +07:00
|
|
|
nSlotId = FN_TOOL_ANCHOR_PARAGRAPH;
|
2000-09-18 16:15:01 +00:00
|
|
|
break;
|
2010-01-05 16:37:41 +01:00
|
|
|
case FLY_AS_CHAR:
|
2011-11-08 15:02:34 +07:00
|
|
|
nSlotId = FN_TOOL_ANCHOR_CHAR;
|
2000-09-18 16:15:01 +00:00
|
|
|
break;
|
2010-01-05 16:37:41 +01:00
|
|
|
case FLY_AT_CHAR:
|
2011-11-08 15:02:34 +07:00
|
|
|
nSlotId = FN_TOOL_ANCHOR_AT_CHAR;
|
2000-09-18 16:15:01 +00:00
|
|
|
break;
|
|
|
|
case FLY_AT_FLY:
|
2011-11-08 15:02:34 +07:00
|
|
|
nSlotId = FN_TOOL_ANCHOR_FRAME;
|
2000-09-18 16:15:01 +00:00
|
|
|
break;
|
2007-09-27 11:26:21 +00:00
|
|
|
default:
|
|
|
|
;
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
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:
|
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_Bool bObj = 0 != rSh.IsObjSelected();
|
|
|
|
sal_Bool bParentCntProt = rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) != 0;
|
2000-09-18 16:15:01 +00:00
|
|
|
|
|
|
|
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);
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_Bool bOpaque = rOpaque.GetValue();
|
2000-09-18 16:15:01 +00:00
|
|
|
SwSurround nSurround = rWrap.GetSurround();
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_Bool bSet = sal_False;
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2010-01-05 16:37:41 +01:00
|
|
|
bool bDisable =
|
|
|
|
(nAnchorType == - 1) || (nAnchorType == FLY_AS_CHAR);
|
|
|
|
const bool bHtmlMode =
|
|
|
|
0 != ::GetHtmlMode(GetView().GetDocShell());
|
2000-09-18 16:15:01 +00:00
|
|
|
|
|
|
|
switch( nWhich )
|
|
|
|
{
|
|
|
|
case FN_FRAME_NOWRAP:
|
2001-07-31 05:02:00 +00:00
|
|
|
bDisable |=
|
2010-01-05 16:37:41 +01:00
|
|
|
( (nAnchorType != FLY_AT_PARA)
|
|
|
|
&& (nAnchorType != FLY_AT_CHAR)
|
|
|
|
&& (nAnchorType != FLY_AT_PAGE));
|
2000-09-18 16:15:01 +00:00
|
|
|
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 ||
|
2010-01-05 16:37:41 +01:00
|
|
|
( (nAnchorType != FLY_AT_PARA)
|
|
|
|
&& (nAnchorType != FLY_AT_CHAR)
|
|
|
|
&& (nAnchorType != FLY_AT_PAGE)));
|
2000-09-18 16:15:01 +00:00
|
|
|
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;
|
2002-10-09 10:31:40 +00:00
|
|
|
//no contour available whenn no wrap or wrap through is set
|
|
|
|
bDisable |= (nSurround == SURROUND_NONE || nSurround == SURROUND_THROUGHT);
|
2000-09-18 16:15:01 +00:00
|
|
|
bSet = rWrap.IsContour();
|
|
|
|
if( !bDisable )
|
|
|
|
{
|
|
|
|
int nSel = rSh.GetSelectionType();
|
2007-09-27 11:26:21 +00:00
|
|
|
if( (nSel & nsSelectionType::SEL_GRF) &&
|
2011-01-17 15:06:54 +01:00
|
|
|
rSh.IsGrfSwapOut(sal_True))
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2000-12-22 11:07:52 +00:00
|
|
|
if( AddGrfUpdateSlot( nWhich ))
|
2011-01-17 15:06:54 +01:00
|
|
|
rSh.GetGraphic(sal_False); // start the loading
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
else if( rSh.IsFrmSelected() )
|
2009-07-27 16:24:52 +00:00
|
|
|
{
|
|
|
|
// #i102253# applied patch from OD (see task)
|
|
|
|
bDisable =
|
|
|
|
nSel & nsSelectionType::SEL_FRM ||
|
|
|
|
GRAPHIC_NONE == rSh.GetIMapGraphic().GetType();
|
|
|
|
}
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
2011-01-17 15:06:54 +01:00
|
|
|
bSet = bDisable ? sal_False : rWrap.IsContour();
|
2000-09-18 16:15:01 +00:00
|
|
|
|
|
|
|
break;
|
|
|
|
case FN_WRAP_ANCHOR_ONLY:
|
|
|
|
bDisable |= (bHtmlMode ||
|
2010-01-05 16:37:41 +01:00
|
|
|
(nAnchorType != FLY_AT_PARA));
|
2000-09-18 16:15:01 +00:00
|
|
|
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:
|
2012-06-12 15:41:27 +02:00
|
|
|
if ( rSh.GetLinkManager().GetLinks().empty() )
|
2000-09-18 16:15:01 +00:00
|
|
|
rSet.DisableItem(nWhich);
|
|
|
|
break;
|
2004-11-16 09:27:07 +00:00
|
|
|
case FN_XFORMS_DESIGN_MODE:
|
|
|
|
// enable if in XForms document
|
|
|
|
if( rSh.GetDoc()->isXForms() )
|
|
|
|
{
|
|
|
|
// determine current state from view options
|
|
|
|
sal_Bool bValue = ! rSh.GetViewOptions()->IsFormView();
|
|
|
|
rSet.Put( SfxBoolItem( nWhich, bValue ) );
|
|
|
|
}
|
|
|
|
else
|
2005-02-17 09:38:32 +00:00
|
|
|
rSet.Put( SfxVisibilityItem( nWhich, sal_False ) );
|
2004-11-16 09:27:07 +00:00
|
|
|
break;
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
nWhich = aIter.NextWhich();
|
|
|
|
}
|
|
|
|
pGetStateSet = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*--------------------------------------------------------------------
|
|
|
|
Beschreibung: Slots mit dieser Statusmethode disablen
|
|
|
|
--------------------------------------------------------------------*/
|
|
|
|
void SwBaseShell::StateDisableItems( SfxItemSet &rSet )
|
|
|
|
{
|
|
|
|
SfxWhichIter aIter(rSet);
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt16 nWhich = aIter.FirstWhich();
|
2000-09-18 16:15:01 +00:00
|
|
|
|
|
|
|
while (nWhich)
|
|
|
|
{
|
|
|
|
rSet.DisableItem( nWhich );
|
|
|
|
nWhich = aIter.NextWhich();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*--------------------------------------------------------------------
|
|
|
|
Beschreibung: Slots mit dieser Statusmethode disablen
|
|
|
|
--------------------------------------------------------------------*/
|
|
|
|
void SwBaseShell::StateStyle( SfxItemSet &rSet )
|
|
|
|
{
|
2013-02-13 00:02:30 +09:00
|
|
|
bool bParentCntProt = GetShell().IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) != 0;
|
2000-09-18 16:15:01 +00:00
|
|
|
ShellModes eMode = GetView().GetShellMode();
|
|
|
|
|
|
|
|
if ( bParentCntProt ||
|
2007-09-27 11:26:21 +00:00
|
|
|
SHELL_MODE_DRAW == eMode ||
|
|
|
|
SHELL_MODE_DRAW_CTRL == eMode ||
|
|
|
|
SHELL_MODE_DRAW_FORM == eMode ||
|
|
|
|
SHELL_MODE_DRAWTEXT == eMode ||
|
|
|
|
SHELL_MODE_BEZIER == eMode )
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
|
|
|
SfxWhichIter aIter( rSet );
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt16 nWhich = aIter.FirstWhich();
|
2000-09-18 16:15:01 +00:00
|
|
|
while ( nWhich )
|
|
|
|
{
|
|
|
|
rSet.DisableItem( nWhich );
|
|
|
|
nWhich = aIter.NextWhich();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
GetView().GetDocShell()->StateStyleSheet(rSet, &GetShell());
|
|
|
|
}
|
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
void SwBaseShell::SetWrapMode( sal_uInt16 nSlot )
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
|
|
|
SwWrtShell &rSh = GetShell();
|
2013-02-13 00:02:30 +09:00
|
|
|
bool bObj = 0 != rSh.IsObjSelected();
|
2000-09-18 16:15:01 +00:00
|
|
|
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())
|
2011-01-17 15:06:54 +01:00
|
|
|
aWrap.SetContour(sal_False);
|
2000-09-18 16:15:01 +00:00
|
|
|
break;
|
|
|
|
case FN_FRAME_WRAP_IDEAL:
|
|
|
|
nSurround = SURROUND_IDEAL;
|
|
|
|
break;
|
|
|
|
case FN_WRAP_ANCHOR_ONLY:
|
|
|
|
aWrap.SetAnchorOnly(!aWrap.IsAnchorOnly());
|
2011-04-16 16:19:09 -03:00
|
|
|
//
|
2006-07-10 13:58:41 +00:00
|
|
|
// keep previous wrapping
|
2011-04-16 16:19:09 -03:00
|
|
|
//
|
2006-10-13 11:21:03 +00:00
|
|
|
// switch to wrap SURROUND_PARALLEL, if previous wrap is SURROUND_NONE
|
|
|
|
if ( nOldSurround != SURROUND_NONE )
|
|
|
|
{
|
|
|
|
nSurround = nOldSurround;
|
|
|
|
}
|
2000-09-18 16:15:01 +00:00
|
|
|
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())
|
2011-01-17 15:06:54 +01:00
|
|
|
aWrap.SetContour(sal_False);
|
2000-09-18 16:15:01 +00:00
|
|
|
// 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))
|
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
aWrap.SetContour(sal_True);
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
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
|
|
|
|
--------------------------------------------------------------------*/
|
2007-09-27 11:26:21 +00:00
|
|
|
void SwBaseShell::SetFrmMode(FlyMode eMode, SwWrtShell *pSh )
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2007-09-27 11:26:21 +00:00
|
|
|
eFrameMode = eMode;
|
2000-09-18 16:15:01 +00:00
|
|
|
SfxBindings &rBnd = pSh->GetView().GetViewFrame()->GetBindings();
|
|
|
|
|
2007-09-27 11:26:21 +00:00
|
|
|
if( eMode == FLY_DRAG ||
|
2000-09-18 16:15:01 +00:00
|
|
|
(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 );
|
|
|
|
}
|
2007-09-27 11:26:21 +00:00
|
|
|
else if( eMode == FLY_DRAG_END )
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2011-03-14 16:51:14 +00:00
|
|
|
static sal_uInt16 aInval[] =
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
|
|
|
SID_ATTR_POSITION, SID_ATTR_SIZE, 0
|
|
|
|
};
|
|
|
|
rBnd.Invalidate(aInval);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*--------------------------------------------------------------------
|
|
|
|
Beschreibung: Ctor
|
|
|
|
--------------------------------------------------------------------*/
|
2012-02-21 14:50:04 +00:00
|
|
|
|
2000-09-18 16:15:01 +00:00
|
|
|
SwBaseShell::SwBaseShell(SwView& rVw) :
|
|
|
|
SfxShell( &rVw ),
|
|
|
|
rView(rVw),
|
2000-12-22 11:07:52 +00:00
|
|
|
pGetStateSet(0)
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
|
|
|
SwWrtShell& rWrtSh = rView.GetWrtShell();
|
|
|
|
|
|
|
|
SetPool(&rWrtSh.GetAttrPool());
|
2012-07-02 16:02:38 +01:00
|
|
|
SetName(rtl::OUString("Base"));
|
2000-09-18 16:15:01 +00:00
|
|
|
rWrtSh.SetGrfArrivedLnk( LINK( this, SwBaseShell, GraphicArrivedHdl));
|
|
|
|
}
|
|
|
|
|
|
|
|
SwBaseShell::~SwBaseShell()
|
|
|
|
{
|
|
|
|
if( rView.GetCurShell() == this )
|
|
|
|
rView.ResetSubShell();
|
|
|
|
|
|
|
|
Link aTmp( LINK( this, SwBaseShell, GraphicArrivedHdl));
|
|
|
|
if( aTmp == rView.GetWrtShell().GetGrfArrivedLnk() )
|
|
|
|
rView.GetWrtShell().SetGrfArrivedLnk( Link() );
|
|
|
|
}
|
|
|
|
|
2000-11-23 19:08:52 +00:00
|
|
|
void SwBaseShell::ExecTxtCtrl( SfxRequest& rReq )
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
|
|
|
const SfxItemSet *pArgs = rReq.GetArgs();
|
|
|
|
|
2000-11-13 12:19:55 +00:00
|
|
|
if( pArgs)
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2000-11-13 12:19:55 +00:00
|
|
|
SwWrtShell &rSh = GetShell();
|
2000-11-23 19:08:52 +00:00
|
|
|
SvxScriptSetItem* pSSetItem = 0;
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt16 nSlot = rReq.GetSlot();
|
2002-09-03 10:13:32 +00:00
|
|
|
SfxItemPool& rPool = rSh.GetAttrPool();
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt16 nWhich = rPool.GetWhich( nSlot );
|
|
|
|
sal_uInt16 nScripts = SCRIPTTYPE_LATIN | SCRIPTTYPE_ASIAN | SCRIPTTYPE_COMPLEX;
|
2005-11-16 08:52:17 +00:00
|
|
|
SfxItemSet aHeightSet( GetPool(), RES_CHRATR_FONTSIZE, RES_CHRATR_FONTSIZE,
|
|
|
|
RES_CHRATR_CJK_FONTSIZE, RES_CHRATR_CJK_FONTSIZE,
|
|
|
|
RES_CHRATR_CTL_FONTSIZE, RES_CHRATR_CTL_FONTSIZE,
|
|
|
|
0L);
|
2003-04-17 09:16:18 +00:00
|
|
|
|
2002-09-03 10:13:32 +00:00
|
|
|
switch( nSlot )
|
2000-11-13 12:19:55 +00:00
|
|
|
{
|
2005-11-16 08:52:17 +00:00
|
|
|
case SID_ATTR_CHAR_FONT:
|
|
|
|
{
|
|
|
|
nScripts = rSh.GetScriptType();
|
2006-07-26 11:18:28 +00:00
|
|
|
// #i42732# input language should be preferred over
|
2005-11-16 08:52:17 +00:00
|
|
|
// current cursor position to detect script type
|
|
|
|
if(!rSh.HasSelection())
|
|
|
|
{
|
|
|
|
LanguageType nInputLang = GetView().GetEditWin().GetInputLanguage();
|
|
|
|
if(nInputLang != LANGUAGE_DONTKNOW && nInputLang != LANGUAGE_SYSTEM)
|
|
|
|
nScripts = SvtLanguageOptions::GetScriptTypeOfLanguage( nInputLang );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
case SID_ATTR_CHAR_POSTURE:
|
|
|
|
case SID_ATTR_CHAR_WEIGHT:
|
2000-11-13 12:19:55 +00:00
|
|
|
{
|
2002-09-03 10:13:32 +00:00
|
|
|
pSSetItem = new SvxScriptSetItem( nSlot, rPool );
|
2003-04-17 09:16:18 +00:00
|
|
|
pSSetItem->PutItemForScriptType( nScripts, pArgs->Get( nWhich ));
|
2000-11-23 19:08:52 +00:00
|
|
|
pArgs = &pSSetItem->GetItemSet();
|
2000-11-13 12:19:55 +00:00
|
|
|
}
|
|
|
|
break;
|
2005-11-16 08:52:17 +00:00
|
|
|
case SID_ATTR_CHAR_FONTHEIGHT:
|
|
|
|
{
|
|
|
|
if(rSh.HasSelection())
|
|
|
|
{
|
|
|
|
pSSetItem = new SvxScriptSetItem( nSlot, rPool );
|
|
|
|
pSSetItem->PutItemForScriptType( nScripts, pArgs->Get( nWhich ));
|
|
|
|
pArgs = &pSSetItem->GetItemSet();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
nScripts = rSh.GetScriptType();
|
|
|
|
LanguageType nInputLang = GetView().GetEditWin().GetInputLanguage();
|
|
|
|
if(nInputLang != LANGUAGE_DONTKNOW && nInputLang != LANGUAGE_SYSTEM)
|
|
|
|
nScripts = SvtLanguageOptions::GetScriptTypeOfLanguage( nInputLang );
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt32 nHeight = static_cast< const SvxFontHeightItem& >(pArgs->Get( nWhich )).GetHeight();
|
2005-11-16 08:52:17 +00:00
|
|
|
SwStdFontConfig* pStdFont = SW_MOD()->GetStdFontConfig();
|
|
|
|
|
|
|
|
SfxItemSet aLangSet( GetPool(), RES_CHRATR_LANGUAGE, RES_CHRATR_LANGUAGE,
|
|
|
|
RES_CHRATR_CJK_LANGUAGE, RES_CHRATR_CJK_LANGUAGE,
|
|
|
|
RES_CHRATR_CTL_LANGUAGE, RES_CHRATR_CTL_LANGUAGE,
|
|
|
|
0L);
|
2008-03-05 16:25:11 +00:00
|
|
|
rSh.GetCurAttr( aLangSet );
|
2005-11-16 08:52:17 +00:00
|
|
|
|
|
|
|
sal_Int32 nWesternSize =
|
|
|
|
pStdFont->GetFontHeight(FONT_STANDARD, FONT_GROUP_DEFAULT,
|
|
|
|
static_cast<const SvxLanguageItem&>(aLangSet.Get( RES_CHRATR_LANGUAGE)).GetLanguage());
|
|
|
|
sal_Int32 nCJKSize =
|
|
|
|
pStdFont->GetFontHeight(FONT_STANDARD, FONT_GROUP_CJK,
|
|
|
|
static_cast<const SvxLanguageItem&>(aLangSet.Get( RES_CHRATR_CJK_LANGUAGE)).GetLanguage());
|
|
|
|
sal_Int32 nCTLSize =
|
|
|
|
pStdFont->GetFontHeight(FONT_STANDARD, FONT_GROUP_CTL,
|
|
|
|
static_cast<const SvxLanguageItem&>(aLangSet.Get( RES_CHRATR_CTL_LANGUAGE)).GetLanguage());
|
|
|
|
|
|
|
|
switch(nScripts)
|
|
|
|
{
|
|
|
|
case SCRIPTTYPE_LATIN:
|
|
|
|
nCJKSize = nHeight * nCJKSize / nWesternSize;
|
|
|
|
nCTLSize = nHeight * nCTLSize / nWesternSize;
|
|
|
|
nWesternSize = (sal_Int32) nHeight;
|
|
|
|
break;
|
|
|
|
case SCRIPTTYPE_ASIAN:
|
|
|
|
nCTLSize = nHeight* nCTLSize / nCJKSize;
|
|
|
|
nWesternSize = nHeight * nWesternSize / nCJKSize;
|
|
|
|
nCJKSize = (sal_Int32) nHeight;
|
|
|
|
break;
|
|
|
|
case SCRIPTTYPE_COMPLEX:
|
|
|
|
nCJKSize = nHeight * nCJKSize / nCTLSize;
|
|
|
|
nWesternSize = nHeight * nWesternSize / nCTLSize;
|
|
|
|
nCTLSize = (sal_Int32) nHeight;
|
|
|
|
break;
|
|
|
|
}
|
2011-01-17 15:06:54 +01:00
|
|
|
aHeightSet.Put( SvxFontHeightItem( (sal_uInt32)nWesternSize, 100, RES_CHRATR_FONTSIZE ));
|
|
|
|
aHeightSet.Put( SvxFontHeightItem( (sal_uInt32)nCJKSize, 100, RES_CHRATR_CJK_FONTSIZE ));
|
|
|
|
aHeightSet.Put( SvxFontHeightItem( (sal_uInt32)nCTLSize, 100, RES_CHRATR_CTL_FONTSIZE ));
|
2005-11-16 08:52:17 +00:00
|
|
|
pArgs = &aHeightSet;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
2000-11-13 12:19:55 +00:00
|
|
|
}
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2000-11-13 12:19:55 +00:00
|
|
|
if( pArgs )
|
|
|
|
{
|
CWS-TOOLING: integrate CWS odfmetadata2
2009-06-22 11:48:36 +0200 mst r273206 : - connectivity/source/drivers/mozab/mozillasrc/MNSInclude.hxx:
+ add "include ustrbuf.hxx" to work around warning caused by
solaris <sys/kstat.h> declaring a global "long l ;"
2009-06-19 14:25:25 +0200 mst r273159 : - scp2/source/ooo/file_library_ooo.scp:
+ fix MinGW build
2009-06-08 12:52:33 +0200 mst r272727 : - redland/raptor-1.4.18.patch.mingw, redland/raptor/makefile.mk:
+ disable parsers that do not build on MinGW (thanks for patch by tono)
2009-05-15 17:31:07 +0200 mst r271957 : fix typos
2009-05-15 17:28:57 +0200 mst r271956 : #i101965#
- offapi/com/sun/star/text/TextPortion:
+ add missing properties:
SoftPageBreak, DocumentIndexMark, ReferenceMark, Footnote, TextField
+ fix read-only status of properties: Bookmark, IsStart, IsCollapsed
- offapi/type_reference/{typelibrary_history.txt,types.rdb}:
+ update reference types.rdb
2009-05-07 14:41:38 +0200 mst r271669 : - sw/inc/{fmtftn.hxx,unocoll.hxx,doc.hxx,editsh.hxx,ftninfo.hxx},
sw/source/core/layout/{flowfrm.cxx,ftnfrm.cxx},
sw/source/core/doc/docftn.cxx, sw/source/core/edit/edattr.cxx,
sw/source/core/txtnode/atrftn.cxx, sw/source/core/unocore/unocoll.cxx,
sw/source/ui/fldui/fldref.cxx:
+ fix warning ... the hard way
+ also fix signature of SwDoc::SetCurFtn
2009-05-05 19:52:55 +0200 mst r271556 : - sw/inc/undobj.hxx:
+ make some members const
2009-05-05 19:34:40 +0200 mst r271555 : - sw/inc/rolbck.hxx, sw/source/core/undo/rolbck.cxx:
+ make some members const
2009-05-05 19:13:14 +0200 mst r271553 : - sw/inc/{undobj.hxx,rolbck.hxx},
sw/source/core/undo/{unbkmk.cxx,rolbck.cxx}:
+ fix rebase merge error
+ rename SwHstryBookmark to SwHistoryBookmark
+ clean up SwUndoBookmark
2009-05-05 19:05:53 +0200 mst r271552 : - sw/source/core/unocore/unoportenum.cxx:
+ fix annoying assertion
2009-05-05 15:34:48 +0200 mst r271522 : CWS-TOOLING: rebase CWS odfmetadata2 to trunk@271427 (milestone: DEV300:m47)
2009-05-04 12:37:01 +0200 mst r271444 : trivial
2009-04-22 13:30:37 +0200 mst r271102 : - sfx2/inc/sfx2/dinfdlg.hxx:
+ trivial change
2009-04-21 16:46:58 +0200 mst r271043 : - sw/inc/hintids.hxx:
+ introduce some predicates for the various hints, and use them
2009-04-21 16:19:03 +0200 mst r271041 : - sw/inc/undobj.hxx,
sw/source/core/doc/{docfly.cxx,docfmt.cxx,docftn.cxx,doctxm.cxx},
sw/source/core/undo/{unattr.cxx,unins.cxx}:
+ clean up unattr.cxx:
remove/fix casts, prefix members, use auto_ptr, etc.
2009-04-21 15:34:23 +0200 mst r271039 : - sw/inc/{rolbck.hxx,undobj.hxx},
sw/source/core/doc/docfmt.cxx,
sw/source/core/txtnode/{thints.cxx,txtedt.cxx},
sw/source/core/undo/{rolbck.cxx,undel.cxx,undobj.cxx,unins.cxx,unmove.cxx,
unovwr.cxx,unsect.cxx,unspnd.cxx,untbl.cxx,untblk.cxx,unattr.cxx}:
+ clean up SwHistory, SwRegHistory and SwHistoryHint etc.:
remove/fix casts, prefix members, remove wrong const annotations,
use auto_ptr, remove unused members, etc.
2009-04-20 19:17:36 +0200 mst r271013 : - sw/inc/ndhints.hxx,
sw/source/core/text/{itrtxt.cxx,txtftn.cxx,itratr.cxx,porfly.cxx,
txtfrm.cxx,txtdrop.cxx,frmform.cxx},
sw/source/core/txtnode/{ndtxt.cxx,ndhints.cxx,thints.cxx,txtedt.cxx},
sw/source/core/edit/acorrect.cxx,
sw/source/core/doc/{docedt.cxx,docfmt.cxx},
sw/source/filter/html/swhtml.cxx:
+ clean up SwHintsArray and its subclasses: remove/fix casts, prefix members
2009-04-20 18:42:07 +0200 mst r271007 : - sw/source/core/text/txtio.cxx, sw/source/core/edit/edattr.cxx,
sw/source/core/undo/rolbck.cxx:
+ remove JP_NEWCORE dead code
2009-04-20 18:38:09 +0200 mst r271006 : - sw/source/core/unocore/unochart.cxx:
+ silence unxlngi warning (debug=t)
2009-04-20 16:36:13 +0200 mst r270991 : - sfx2/inc/sfx2/dinfdlg.hxx, sfx2/source/dialog/dinfdlg.cxx,
sfx2/source/doc/objserv.cxx, sw/source/ui/fldui/flddinf.hxx:
+ trivial cleanups
2009-04-20 15:28:52 +0200 mst r270990 : - sfx2/inc/sfx2/dinfdlg.hxx, sfx2/source/dialog/dinfdlg.cxx,
sfx2/source/doc/objserv.cxx:
+ fix bug: replaying a macro with a DocumentInfoItem removes all
user-defined properties
2009-03-10 15:08:20 +0100 mst r269273 : - sfx2/source/doc/Metadatable.cxx:
+ add missing SolarMutex guards
2009-03-10 14:46:29 +0100 mst r269272 : - unoxml/source/rdf/librdf_repository.cxx:
+ never free rdf_world because that would call libxm2 xmlCleanupParser
(and, to add insult to injury, other libxml2 functions later...)
2009-03-06 19:02:44 +0100 mst r269041 : argh! undo...
2009-03-06 19:00:58 +0100 mst r269040 : fix #i99931#
- sw/source/ui/uno/unomod.cxx:
+ SwXViewSettings::_getSingleValue returns uninitialized memory
for the ZoomType property if the value is PAGE_WIDTH_EXACT
2009-03-06 18:59:28 +0100 mst r269039 : - sw/inc/ndtxt.hxx, sw/source/core/txtnode/ndtxt.cxx,
sw/source/core/unocore/unoportenum.cxx:
+ fix some more wntmsci12 warnings...
2009-03-06 18:56:46 +0100 mst r269038 : - sd/source/ui/slidesorter/model/SlsPageEnumerationProvider.cxx:
+ work around spurious warning on unxsoli4 debug=t
2009-03-05 14:02:01 +0100 mst r268902 : - sw/inc/txatbase.hxx:
+ back to c-style casts, they also compile on wntmsci12...
2009-03-05 10:23:25 +0100 mst r268882 : - comphelper/inc/comphelper/processfactory.hxx,
comphelper/source/processfactory/processfactory.cxx:
+ revert change of return type of comphelper_getProcessComponentContext
to Reference: does not build on wntmsci12
2009-03-04 19:08:09 +0100 mst r268861 : - sw/source/core/txtnode/{atrtox.cxx,ndtxt.cxx}:
+ fix initialization
2009-03-04 14:37:30 +0100 mst r268831 : - solenv/inc/target.mk:
+ fix CLASSPATH so complex tests run (fix by sb)
2009-03-04 14:36:30 +0100 mst r268830 : - sw/inc/unoobj.hxx,
sw/source/core/unocore/{unoparagraph.cxx,unoobj.cxx,unoobj2.cxx}:
+ SwXParaFrameEnumeration constructor now takes SwPaM, not SwUnoCrsr
+ move SwParaSelection into unoparagraph.cxx, as it is only used there
+ bugfix: replace SwUnoCrsrs on stack with SwCursors
2009-03-04 14:34:46 +0100 mst r268829 : - sw/inc/pam.hxx, sw/source/core/crsr/pam.cxx,
sw/source/core/edit/eddel.cxx, sw/source/core/doc/docredln.cxx,
sw/source/core/undo/{untbl.cxx,undel.cxx}, sw/source/filter/rtf/swparrtf.cxx:
+ clean up SwPaM: prefix members
+ new constructor SwPosition(SwCntntNode&, xub_StrLen)
+ fix several broken SwPosition and SwPaM constructors
+ SwPam::DeleteMark now actually resets the unused position to default
2009-03-02 12:07:09 +0100 mst r268646 : - sw/inc/fmtcol.hxx:
+ fix annoying warning (gcc 4)
2009-03-02 12:06:27 +0100 mst r268645 : - odk/util/check.pl, odk/examples/DevelopersGuide/Text/TextDocuments.java:
+ rename module from FieldMaster to fieldmaster
2009-02-27 19:49:56 +0100 mst r268614 : - sfx2/inc/sfx2/Metadatable.hxx, sfx2/prj/d.lst,
sfx2/source/doc/{Metadatable.cxx,makefile.mk},
sw/inc/{SwMetadatable.hxx,unoobj.hxx,undobj.hxx,ndtxt.hxx},
sw/source/core/doc/{SwMetadatable.cxx,makefile.mk,docnew.cxx},
sw/source/core/undo/{untbl.cxx,unins.cxx},
sw/source/core/unocore/unoparagraph.cxx, sw/source/ui/app/docsh.cxx:
+ move Metadatable implementation from sw to sfx2
2009-02-27 17:58:55 +0100 mst r268608 : - sw/inc/{SwMetadatable.hxx,undobj.hxx}, sw/source/core/doc/SwMetadatable.cxx,
sw/source/core/undo/{untbl.cxx,unins.cxx,undel.cxx}:
+ CreateUndo now returns an opaque MetadatableUndo object
2009-02-27 13:15:44 +0100 mst r268587 : - sw/inc/ndtxt.hxx, sw/source/core/doc/docfmt.cxx,
sw/source/core/text/{itratr.cxx,porlay.cxx},
sw/source/core/txtnode/{txtedt.cxx,ndtxt.cxx,thints.cxx}:
+ clean up SwTxtNode: fix casts, prefix members
+ factor out inline function SwTxtNode::TryDeleteSwpHints()
2009-02-27 13:14:30 +0100 mst r268586 : - svx/inc/svx/emphitem.hxx:
+ fix borken header guard
2009-02-27 13:13:56 +0100 mst r268585 : - sfx2/source/bastyp/progress.cxx:
+ fix use of compiler specific macro
2009-02-27 11:00:32 +0100 mst r268564 : - sw/inc/{txatbase.hxx,txtatr.hxx,txtinet.hxx,txtfld.hxx,txtftn.hxx,
txtflcnt.hxx,txttxmrk.hxx,txtrfmrk.hxx},
sw/source/core/txtnode/{atrtox.cxx,atrref.cxx,atrflyin.cxx,atrftn.cxx,
txtatr2.cxx,txatbase.cxx,atrfld.cxx,txtedt.cxx},
sw/source/core/text/atrstck.cxx, sw/source/core/access/acchyperlink.cxx,
sw/source/core/doc/visiturl.cxx, sw/source/ui/wrtsh/wrtsh2.cxx:
+ clean up SwTxtAttr and its subclasses: remove/fix casts, prefix members
+ SwTxtINetFmt: remove unused member bColor
- sw/source/core/text/txtfld.cxx:
+ move SwTxtFld methods to atrfld.cxx
2009-02-27 10:58:44 +0100 mst r268563 : - sfx2/inc/sfx2/sfxbasemodel.hxx:
+ don't privately inherit BaseMutex, ScModelObj wants to access it
2009-02-27 10:58:02 +0100 mst r268562 : - xmloff/source/core/{RDFaExportHelper.cxx,RDFaImportHelper.cxx}:
+ arrrgh!!! someone thought it would be a good idea to have 2 different
versions of boost in external! and they're NOT compatible!!!
insert an ugly fragile hack that maybe works with both...
2009-02-26 17:42:26 +0100 mst r268544 : - comphelper/inc/comphelper/storagehelper.hxx.
sfx2/source/doc/DocumentMetadataAccess.cxx:
+ someone made IsValidZipEntryFileName a static method and didn't tell me
2009-02-26 15:52:56 +0100 mst r268529 : redland: split up patches
2009-02-26 13:17:56 +0100 mst r268509 : migration of cws odfmetadata2 from CVS (resync to m42): module sw
#i95863#
- sw/inc/segdefs{,_}.hxx:
+ remove obsolete files
- sw/source/ui/inc/itemdef.hxx:
+ remove itemdef.hxx
- sw/source/ui/app/[apphdl.cxx,docsh.cxx}, sw/source/ui/misc/glshell.cxx,
sw/source/ui/shells/*.cxx, sw/source/ui/uiview/*.cxx, sw/source/ui/web/*.cxx:
+ use sfx2/msg.hxx instead of itemdef.hxx
- sw/source/core/edit/eddel.cxx:
+ @ JP: SwEditShell::Replace:
you're right, deleting the text to be replaced first, and then inserting
a space, and then replacing that space is unnecessary.
whew, i'm so happy that we finally answered that question after 11 years.
- sw/inc/edimp.hxx:
+ remove FOREACHCURSOR_START, FOREACHCURSOR_END
- sw/inc/{swcrsr.hxx,unocrsr.hxx,viscrs.hxx},
sw/source/core/crsr/{crsrsh.cxx,swcrsr.cxx,trvlreg.cxx,trvltbl.cxx,
unocrsr.cxx,viscrs.cxx},
sw/source/core/doc/{docbm.cxx,doccorr.cxx},
sw/source/core/docnode/{ndtbl.cxx,ndtbl1.cxx},
sw/source/core/edit/editsh.cxx,
sw/source/core/frmedt/{fefly1.cxx,fetab.cxx,tblsel.cxx},
sw/source/core/layout/trvlfrm.cxx,
sw/source/core/unocore/{unochart.cxx,unoobj2.cxx,unoparagraph.cxx,
unoportenum.cxx,unotbl.cxx},
sw/source/core/view/vprint.cxx:
+ remove the hideous virtual operator SwFooCursor*
+ make SwCursor::IsReadOnlyAvailable() virtual
+ make SwUnoCrsr::Clone() virtual
+ refactor SwCursor methods IsSelOver(), LeftRight(), UpDown(), GotoTable():
replace dynamic_cast<...>(this) with new virtual methods
2009-02-26 13:14:58 +0100 mst r268508 : migration of cws odfmetadata2 from CVS (resync to m42): module sw
- sw/source/filter/xml/swxml.cxx:
+ XMLReader::Read: load RDF metadata of the ODF document
- sw/source/filter/xml/wrtxml.cxx:
+ SwXMLWriter::_Write: write RDF metadata of the ODF document if ODF >= 1.2
#i90620#: import xml:id in text tables (does not actually work yet)
- sw/source/filter/xml/xmltbli{.hxx,.cxx}:
+ SwXMLTableCellAttrTokens,aTableCellAttrTokenMap: add XML_TOK_TABLE_XMLID
+ SwXMLTableCellContext_Impl::SwXMLTableCellContext_Impl: attribute xml:id
+ SwXMLTableCellContext_Impl::CreateChildContext: attribute xml:id
+ SwXMLTableColContext_Impl::SwXMLTableColContext_Impl: attribute xml:id
+ SwXMLTableContext::SwXMLTableContext: attribute xml:id
fix #i98530#
- sw/inc/unoport.hxx, sw/source/core/unocore/unoport.cxx:
+ SwXTextPortion: make constructor params const&
- sw/source/core/unocore/unoportenum.cxx:
+ refactor to remove some code duplication
+ fix bug: paragraph w/out hints: bookmark before frame gets lost
#i97274# handle invalid tables
- sw/source/core/layout/tabfrm.cxx, sw/source/filter/xml/xmltbli.cxx:
+ SwXMLTableContext::MakeTable():
check that the table actually contains cells,
and abort (removing the inserted table nodes) if not
2009-02-26 13:11:48 +0100 mst r268507 : migration of cws odfmetadata2 from CVS (resync to m42): module sw
refactor SwXTextRange and SwXParagraph
- sw/inc/unoobj.hxx, sw/source/core/unocore/unoobj2.cxx:
+ remove 3 constructors of SwXTextRange
+ new method SwXTextRange::CreateParentXText
+ refactor SwXTextRange::CreateTextRangeFromPosition and
SwXTextRange::getText
- sw/inc/unoobj.hxx, sw/source/core/unocore/unoparagraph.cxx:
+ SwXParagraph no longer uses a cursor; it registers directly at SwTxtNode
+ replace SwXParagraph::GetCrsr with SwXParagraph::GetTxtNode
- sw/source/core/unocore/unotext.cxx, sw/source/ui/uno/unotxvw.cxx:
+ adapt to new SwXParagraph
#i90620#
- sw/inc/SwMetadatable.hxx,
sw/source/core/doc/SwMetadatable.cxx:
+ new files: base classes sw::Metadatable and sw::MetadatableMixin;
also, 2 implementations of IXmlIdRegistry:
sw::XmlIdRegistryDocument and sw::XmlIdRegistryClipboard
+ setMetadataReference: handle empty stream name as auto-detect
- sw/source/core/doc/makefile.mk:
+ add SwMetadatable
add a XmlIdRegistry to SwDoc
- sw/inc/doc.hxx:
+ SwDoc: add member m_pXmlIdRegistry, method GetXmlIdRegistry()
- sw/source/core/doc/docnew.cxx:
+ initialize XmlIdRegistry in SwDoc::GetXmlIdRegistry, not in constructor,
because the constructor is not told whether the SwDoc is a clipboard
- sw/inc/docsh.hxx, sw/source/ui/app/docsh.cxx:
+ SwDocShell: override GetXmlIdRegistry()
#i91563#: make the SwTxtNode metadatable
- sw/inc/ndtxt.hxx
+ SwTxtNode inherits sw::Metadatable
- sw/inc/unoobj.hxx, sw/source/core/unocore/unoparagraph.cxx:
+ SwXParagraph inherits sw::MetadatableMixin
#i91563#: handle SwTxtNode's metadata for delete
- sw/source/core/txtnode/ndtxt.cxx:
+ SwTxtNode::SplitCntntNode: handle XmlId
+ SwTxtNode::JoinNext: merge XmlIds
- sw/source/core/doc/docedt.cxx:
+ lcl_GetJoinFlags: document postcondition
+ SwDoc::Delete: remove XmlId only if SwTxtNode _becomes_ empty
#i91563#: handle SwTxtNode's metadata for delete with undo
- sw/inc/undobj.hxx
+ SwUndoDelete: new members m_pMetadataUndoStart, m_pMetadataUndoEnd
- sw/source/core/undo/undel.cxx:
+ SwUndoDelete::SaveCntnt: save XmlIds for start and end SwTxtNode
+ SwUndoDelete::SaveCntnt: remove XmlId only if SwTxtNode _becomes_ empty
+ SwUndoDelete::Undo: restore saved XmlIds for start and end SwTxtNode
- sw/source/core/docnode/ndcopy.cxx:
+ SwTxtNode::MakeCopy: register copy at XmlIdRegistry
#i91563#: handle SwTxtNode's metadata for find/replace with undo
- sw/source/core/undo/unins.cxx:
+ _UnReplaceData: rename members: add prefix m_
+ _UnReplaceData: new members m_pMetadataUndoStart, m_pMetadataUndoEnd
+ _UnReplaceData::_UnReplaceData: save XmlIds for start and end SwTxtNode
+ _UnReplaceData::Undo: restore saved XmlIds for start and end SwTxtNode
#i91563#: handle SwTxtNode's metadata for table-to-text with undo
- sw/source/core/undo/untbl.cxx:
+ SwTblToTxtSave: rename members: add prefix m_
+ SwTblToTxtSave: new members m_pMetadataUndoStart, m_pMetadataUndoEnd
+ SwTblToTxtSave::SwTblToTxtSave: save XmlIds for start and end SwTxtNode
+ SwTblToTxtSave::SwTblToTxtSave, SwNodes::UndoTableToText:
always store the index of the first SwTxtNode in the cell, instead of
the index of the first SwTxtNode in case of the first cell in a row,
and the cell start node in other cases
+ SwNodes::UndoTableToText: restore saved XmlIds for start and end SwTxtNode
- sw/source/core/docnode/ndtbl.cxx:
+ lcl_DelBox: simplify for refactored start index handling in SwTblToTxtSave
2009-02-26 13:02:28 +0100 mst r268505 : migration of cws odfmetadata2 from CVS (resync to m42): module sd
- sd/source/ui/table/tableobjectbar.cxx,sd/source/ui/view/*.cxx:
+ remove invocations of SFX_DECL_TYPE
- sd/source/ui/slideshow/SlideShowRestarter.cxx,
sd/source/ui/toolpanel/LayoutMenu.cxx,
sd/source/ui/unoidl/DrawController.cxx,
sd/source/ui/view/{ViewShellBase.cxx,ViewTabBar.cxx,frmview.cxx}:
+ fix abuses of comphelper_getProcessComponentContext (missing release)
2009-02-26 13:01:24 +0100 mst r268504 : migration of cws odfmetadata2 from CVS (resync to m42): module starmath
- starmath/source/document.cxx:
+ don't touch SfxObjectShell's privates
2009-02-26 13:00:37 +0100 mst r268503 : migration of cws odfmetadata2 from CVS (resync to m42): module sfx2
#i90620#
- sfx2/inc/sfx2/XmlIdRegistry.hxx:
+ new file: interfaces sfx2::IXmlIdRegistry and sfx2::IXmlIdRegistrySupplier
and a couple of utility functions
- sfx2/inc/sfx2/DocumentMetadataAccess.hxx,
sfx2/source/doc/DocumentMetadataAccess.cxx:
+ new class sfx2::DocumentMetadataAccess, implements XDocumentMetadataAccess
+ the URI of the DocumentMetadataAccess is now the URI from which the
document was loaded; for a new document, use a vnd.sun.star.tdoc URI
+ add new function sfx2::createBaseURI()
+ prevent using reserved file names
+ try not to recurse into embedded subdocuments
- sfx2/source/doc/makefile.mk:
+ add DocumentMetadataAccess
- sfx2/util/makefile.mk:
+ link libsfx2 against libxml2 (needed for xmlValidateNCName)
- sfx2/source/doc/makefile.mk:
+ add LIBXML_CFLAGS to CFLAGS
- sfx2/prj/build.lst:
+ add dependence on libxml2
- sfx2/prj/d.lst:
+ add XmlIdRegistry.hxx, DocumentMetadataAccess.hxx
- sfx2/inc/sfx2/objsh.hxx, sfx2/source/doc/objxtor.cxx:
+ make SfxObjectShell's members private
+ new method SfxObjectShell::GetAutoStyleFilterIndex
+ SfxObjectShell inherits sfx2::IXmlIdRegistrySupplier
- sfx2/source/dialog/templdlg.cxx, sfx2/source/doc/sfxbasemodel.cxx:
+ don't touch SfxObjectShell's privates
- sfx2/inc/sfx2/sfxbasemodel.hxx, sfx2/source/doc/sfxbasemodel.cxx:
+ SfxBaseModel inherits BaseMutex instead of IMPL_SfxBaseModel_MutexContainer
+ SfxBaseModel implements additional interface XDocumentMetadataAccess
+ IMPL_SfxBaseModel_DataContainer has new member:
a sfx2::DocumentMetadataAccess
+ implementation of XDocumentMetadataAccess forwards to
the sfx2::DocumentMetadataAccess member
- sfx2/qa/complex/DocumentMetadataAccessTest.java,
sfx2/qa/complex/{tests.sce,makefile.mk},
sfx2/qa/complex/testdocuments/TESTRDFA.odt:
+ add complex test: DocumentMetadataAccessTest
+ add RDFa test document
#i95863#
- sfx2/inc/sfx2/dinfdlg.hxx, sfx2/source/dialog/dinfdlg.cxx:
+ refactor SfxDocumentItem so it no longer requires a XDocumentInfo
+ move struct CustomProperty to implementation file
+ remove class SfxDocumentUserPage
+ QueryValue,PutValue: remove MID_DOCINFO_FIELD*
- sfx2/source/doc/objserv.cxx:
+ adapt to SfxDocumentItem change
- sfx2/inc/sfx2/sfx.hrc, sfx2/sdi/sfxslots.sdi, sfx2/inc/sfx2/msg.hxx:
+ remove MID_DOCINFO_FIELD*
+ put all invocations of SFX_DECL_TYPE in msg.hxx, and undef SFX_DECL_TYPE
- sfx2/source/doc/objxtor.cxx:
+ fix abuses of comphelper_getProcessComponentContext (missing release)
- sfx2/source/doc/docfile.cxx:
+ SfxMedium::SfxMedium: don't dereference NULL, throw exception instead
- sfx2/source/doc/objstor.cxx:
+ SfxObjectShell::DoLoad: fix bug: DocumentBaseURI is not initialized
2009-02-26 12:58:07 +0100 mst r268502 : migration of cws odfmetadata2 from CVS (resync to m42): module xmloff
#i90620#: implement RDFa import (interface change)
- xmloff/inc/xmloff/xmlimp.hxx. xmloff/source/core/xmlimp.cxx:
+ make SvXMLImport::GetAbsoluteReference() const
+ add SvXMLImport::GetComponentContext()
+ SvXMLImport::_InitCtor(): add RDFa namespace
+ add SvXMLImport::AddRDFa()
+ SvXMLImport::endDocument() inserts RDFa into document repository
- xmloff/inc/xmloff/xmltoken.hxx, xmloff/source/core/xmltoken.cxx:
+ new tokens for RDFa: XML_ABOUT, XML_DATATYPE
- xmloff/inc/RDFaImportHelper.hxx, xmloff/source/core/RDFaImportHelper.cxx:
+ new class RDFaImportHelper
+ adapt the code to the bleak reality of broken C++ implementations
+ handle empty xhtml:about attributes properly, which are actually
valid relative URIs
+ work around broken SvXMLImport::GetAbsoluteReference
- xmloff/source/core/makefile.mk:
+ add RDFaImportHelper.cxx
#i90620#: implement RDFa export
- xmloff/inc/xmloff/xmlexp.hxx, xmloff/source/core/xmlexp.cxx:
+ add SvXMLExport::EnsureNamespace(), and a stack of namespace maps
+ add SvXMLExport::GetComponentContext()
+ add SvXMLExport::AddAttributesRDFa()
- xmloff/inc/RDFaExportHelper.hxx, xmloff/source/core/RDFaExportHelper.cxx:
+ new class RDFaExportHelper
+ don't use std::map::data_type, which is actually called
std::map::mapped_type by libstdc++
- xmloff/source/core/makefile.mk:
+ add RDFaExportHelper.cxx
#i91563#
- xmloff/inc/xmloff/txtimp.hxx, xmloff/source/text/txtimp.cxx:
+ XMLTextPAttrTokens: add RDFa tokens
- xmloff/source/text/txtparai{.hxx,.cxx}:
+ import RDFa for text:p
- xmloff/source/text/txtparae.cxx:
+ export RDFa for text:p
interface change: use XHTML namespace instead of RDFA
- xmloff/inc/xmlnmspe.hxx, xmloff/inc/xmloff/xmltoken.hxx,
xmloff/source/core/{xmltoken.cxx,xmlimp.cxx,xmlexp.cxx,RDFaExportHelper.cxx},
xmloff/source/text/txtimp.cxx:
+ use XHTML namespace instead of RDFA
#i91565#, #i91566#: (preliminary) import for text:meta, text:meta-field
- xmloff/source/text/txtparai.cxx:
+ new class XMLMetaImportContextBase with subclasses to import
text:meta and text:meta-field
- xmloff/source/text/XMLTextMarkImportContext.cxx:
+ change XMLTextMarkImportContext::CreateAndInsertMark to handle marks
with no name (text:meta)
#i91565#, #i91566#: (preliminary) export for text:meta, text:meta-field
- xmloff/inc/txtflde.hxx, xmloff/source/text/txtflde.cxx:
+ add FIELD_ID_META to FieldIdEnum
+ new method XMLTextFieldExport::ExportMetaField()
+ change XMLTextFieldExport::ExportField{,AutoStyle,Helper}
to take additional parameter for progress bar
- xmloff/inc/xmloff/txtparae.hxx, xmloff/source/text/txtparae.cxx:
+ make XMLTextParagraphExport::exportTextRangeEnumeration() public
+ new method XMLTextParagraphExport::exportMeta()
#i90620#
- xmloff/inc/xmloff/xmlimp.hxx, xmloff/source/core/xmlimp.cxx,
xmloff/inc/xmloff/xmlexp.hxx, xmloff/source/core/xmlexp.cxx:
+ rename SvXML{Im,Ex}port::GetStreamPath() to GetStreamName()
+ fix xml:id {im,ex}port for embedded documents and non-packages
+ adapt to API change: XMetadatable
#i90620# GRDDL
- xmloff/inc/xmlnmspe.hxx, xmloff/inc/xmloff/xmltoken.hxx,
xmloff/source/core/{xmltoken.cxx,xmlexp.cxx}:
+ add GRDDL namespace
+ add token XML_TRANSFORMATION
+ add grddl:transformation attribute to root elements for meta.xml,
content.xml and styles.xml
2009-02-26 12:54:40 +0100 mst r268501 : migration of cws odfmetadata2 from CVS (resync to m42): module unoxml
#i90620#
- unoxml/source/rdf/librdf_repository.cxx:
+ librdf_Repository::importGraph: allocate buffer sized length of stream
+ switch from one librdf_world per repository to a single static world
because redland has global variables with a brain-damaged life-cycle...
+ exportGraph: use new raptor 1.4.18 feature to disable writing
an xml:base attribute in RDF/XML files
- unoxml/source/rdf/librdf_repository.cxx:
unoxml/qa/complex/RDFRepositoryTest.java:
+ adapt to predicate is URI change
+ adapt to RDFa API change
+ adapt to API change: RDFa has multiple predicates...
+ adapt to API change: XMetadatable derives from XURI
+ allow xhtml:datatype without xhtml:content
+ adapt to API change: attribute MetadataReference is StringPair
- unoxml/source/rdf/CURI.cxx:
+ add some more URI constants
2009-02-26 12:53:32 +0100 mst r268500 : migration of cws odfmetadata2 from CVS (resync to m42): module package
- package/inc/ImplValidCharacters.hxx:
+ remove (moved to comphelper)
2009-02-26 12:52:49 +0100 mst r268499 : migration of cws odfmetadata2 from CVS (resync to m42): module comphelper
- comphelper/inc/comphelper/processfactory.hxx,
comphelper/source/processfactory/processfactory.cxx:
+ add getProcessComponentContext()
+ change return type of comphelper_getProcessComponentContext to Reference
- comphelper/inc/comphelper/stl_types.hxx:
+ add OUStringBufferAppender
+ add algorithm intersperse
- comphelper/source/misc/string.cxx:
+ rewrite convertCommaSeparated with intersperse and OUStringBufferAppender
- comphelper/inc/comphelper/stlunosequence.hxx:
+ fix bug: begin() on empty sequence != end()
2009-02-26 12:50:47 +0100 mst r268498 : migration of cws odfmetadata2 from CVS (resync to m42): module offapi
#i96209#
- offapi/com/sun/star/text/fieldmaster/*.idl:
+ rename module from FieldMaster to fieldmaster
- offapi/type_reference/{typelibrary_history.txt,types.rdb}:
+ update reference types.rdb
#i90620#
- offapi/com/sun/star/rdf/{XMetadatable.idl,XDocumentMetadataAccess.idl}:
+ API change: XMetadatable derives from XURI
+ API change: replace XmlId (string) with MetadataReference (StringPair)
- offapi/com/sun/star/rdf/{Statement.idl,XDocumentRepository.idl,
XNamedGraph.idl,XRepository.idl}:
+ the predicate of a statement is a URI, not a Resource
- offapi/com/sun/star/rdf/XDocumentMetadataAccess.idl:
+ rename: s/Package/Document/
+ remove uuid
+ remove everything related to mapping
+ graph names are now generated from base URI and file names
+ load methods: improve error handling with XInteractionHandler
- offapi/com/sun/star/rdf/XDocumentRepository.idl:
+ change: RDFa permits using multiple predicates in one attribute
+ setStatementRDFa: subject is now XResource, object is now XMetadatable
- offapi/com/sun/star/rdf/URIs.idl:
+ add some more URI constants
- offapi/com/sun/star/rdf:
+ fix @since tags and replace <method> with <member>
2009-02-26 12:47:24 +0100 mst r268497 : migration of cws odfmetadata2 from CVS (resync to m42): module redland
fix #i93768#
- redland/raptor-1.4.17.patch, redland/raptor/makefile.mk:
+ disable GRDDL parser to prevent call to libxslt
xsltSetDefaultSecurityPrefs, which breaks xmlhelp
- redland/raptor/makefile.mk, redland/raptor-1.4.17.patch,
redland/raptor-1.4.18.patch:
+ upgrade raptor to 1.4.18
+ deactivate serializer for RSS/Atom (does not build)
- redland/rasqal/makefile.mk, redland/rasqal-0.9.15.patch,
redland/rasqal-0.9.16.patch,
+ upgrade rasqal to 0.9.16
- redland/redland/makefile.mk, redland/redland-1.0.7.patch,
redland/redland-1.0.8.patch:
+ upgrade redland to 1.0.8
- redland/redlandversion.mk:
+ the librasqal SONAME has changed
2009-07-02 09:05:03 +00:00
|
|
|
bool bAuto = false;
|
|
|
|
if ( !isCHRATR(nWhich) ||
|
|
|
|
( rSh.HasSelection() && rSh.IsSelFullPara() ) )
|
|
|
|
{
|
|
|
|
SwTxtFmtColl * pColl = rSh.GetCurTxtFmtColl();
|
|
|
|
if ( pColl && pColl->IsAutoUpdateFmt() )
|
|
|
|
{
|
|
|
|
rSh.AutoUpdatePara( pColl, *pArgs );
|
|
|
|
bAuto = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!bAuto)
|
|
|
|
{
|
2000-11-13 12:19:55 +00:00
|
|
|
rSh.SetAttr( *pArgs );
|
CWS-TOOLING: integrate CWS odfmetadata2
2009-06-22 11:48:36 +0200 mst r273206 : - connectivity/source/drivers/mozab/mozillasrc/MNSInclude.hxx:
+ add "include ustrbuf.hxx" to work around warning caused by
solaris <sys/kstat.h> declaring a global "long l ;"
2009-06-19 14:25:25 +0200 mst r273159 : - scp2/source/ooo/file_library_ooo.scp:
+ fix MinGW build
2009-06-08 12:52:33 +0200 mst r272727 : - redland/raptor-1.4.18.patch.mingw, redland/raptor/makefile.mk:
+ disable parsers that do not build on MinGW (thanks for patch by tono)
2009-05-15 17:31:07 +0200 mst r271957 : fix typos
2009-05-15 17:28:57 +0200 mst r271956 : #i101965#
- offapi/com/sun/star/text/TextPortion:
+ add missing properties:
SoftPageBreak, DocumentIndexMark, ReferenceMark, Footnote, TextField
+ fix read-only status of properties: Bookmark, IsStart, IsCollapsed
- offapi/type_reference/{typelibrary_history.txt,types.rdb}:
+ update reference types.rdb
2009-05-07 14:41:38 +0200 mst r271669 : - sw/inc/{fmtftn.hxx,unocoll.hxx,doc.hxx,editsh.hxx,ftninfo.hxx},
sw/source/core/layout/{flowfrm.cxx,ftnfrm.cxx},
sw/source/core/doc/docftn.cxx, sw/source/core/edit/edattr.cxx,
sw/source/core/txtnode/atrftn.cxx, sw/source/core/unocore/unocoll.cxx,
sw/source/ui/fldui/fldref.cxx:
+ fix warning ... the hard way
+ also fix signature of SwDoc::SetCurFtn
2009-05-05 19:52:55 +0200 mst r271556 : - sw/inc/undobj.hxx:
+ make some members const
2009-05-05 19:34:40 +0200 mst r271555 : - sw/inc/rolbck.hxx, sw/source/core/undo/rolbck.cxx:
+ make some members const
2009-05-05 19:13:14 +0200 mst r271553 : - sw/inc/{undobj.hxx,rolbck.hxx},
sw/source/core/undo/{unbkmk.cxx,rolbck.cxx}:
+ fix rebase merge error
+ rename SwHstryBookmark to SwHistoryBookmark
+ clean up SwUndoBookmark
2009-05-05 19:05:53 +0200 mst r271552 : - sw/source/core/unocore/unoportenum.cxx:
+ fix annoying assertion
2009-05-05 15:34:48 +0200 mst r271522 : CWS-TOOLING: rebase CWS odfmetadata2 to trunk@271427 (milestone: DEV300:m47)
2009-05-04 12:37:01 +0200 mst r271444 : trivial
2009-04-22 13:30:37 +0200 mst r271102 : - sfx2/inc/sfx2/dinfdlg.hxx:
+ trivial change
2009-04-21 16:46:58 +0200 mst r271043 : - sw/inc/hintids.hxx:
+ introduce some predicates for the various hints, and use them
2009-04-21 16:19:03 +0200 mst r271041 : - sw/inc/undobj.hxx,
sw/source/core/doc/{docfly.cxx,docfmt.cxx,docftn.cxx,doctxm.cxx},
sw/source/core/undo/{unattr.cxx,unins.cxx}:
+ clean up unattr.cxx:
remove/fix casts, prefix members, use auto_ptr, etc.
2009-04-21 15:34:23 +0200 mst r271039 : - sw/inc/{rolbck.hxx,undobj.hxx},
sw/source/core/doc/docfmt.cxx,
sw/source/core/txtnode/{thints.cxx,txtedt.cxx},
sw/source/core/undo/{rolbck.cxx,undel.cxx,undobj.cxx,unins.cxx,unmove.cxx,
unovwr.cxx,unsect.cxx,unspnd.cxx,untbl.cxx,untblk.cxx,unattr.cxx}:
+ clean up SwHistory, SwRegHistory and SwHistoryHint etc.:
remove/fix casts, prefix members, remove wrong const annotations,
use auto_ptr, remove unused members, etc.
2009-04-20 19:17:36 +0200 mst r271013 : - sw/inc/ndhints.hxx,
sw/source/core/text/{itrtxt.cxx,txtftn.cxx,itratr.cxx,porfly.cxx,
txtfrm.cxx,txtdrop.cxx,frmform.cxx},
sw/source/core/txtnode/{ndtxt.cxx,ndhints.cxx,thints.cxx,txtedt.cxx},
sw/source/core/edit/acorrect.cxx,
sw/source/core/doc/{docedt.cxx,docfmt.cxx},
sw/source/filter/html/swhtml.cxx:
+ clean up SwHintsArray and its subclasses: remove/fix casts, prefix members
2009-04-20 18:42:07 +0200 mst r271007 : - sw/source/core/text/txtio.cxx, sw/source/core/edit/edattr.cxx,
sw/source/core/undo/rolbck.cxx:
+ remove JP_NEWCORE dead code
2009-04-20 18:38:09 +0200 mst r271006 : - sw/source/core/unocore/unochart.cxx:
+ silence unxlngi warning (debug=t)
2009-04-20 16:36:13 +0200 mst r270991 : - sfx2/inc/sfx2/dinfdlg.hxx, sfx2/source/dialog/dinfdlg.cxx,
sfx2/source/doc/objserv.cxx, sw/source/ui/fldui/flddinf.hxx:
+ trivial cleanups
2009-04-20 15:28:52 +0200 mst r270990 : - sfx2/inc/sfx2/dinfdlg.hxx, sfx2/source/dialog/dinfdlg.cxx,
sfx2/source/doc/objserv.cxx:
+ fix bug: replaying a macro with a DocumentInfoItem removes all
user-defined properties
2009-03-10 15:08:20 +0100 mst r269273 : - sfx2/source/doc/Metadatable.cxx:
+ add missing SolarMutex guards
2009-03-10 14:46:29 +0100 mst r269272 : - unoxml/source/rdf/librdf_repository.cxx:
+ never free rdf_world because that would call libxm2 xmlCleanupParser
(and, to add insult to injury, other libxml2 functions later...)
2009-03-06 19:02:44 +0100 mst r269041 : argh! undo...
2009-03-06 19:00:58 +0100 mst r269040 : fix #i99931#
- sw/source/ui/uno/unomod.cxx:
+ SwXViewSettings::_getSingleValue returns uninitialized memory
for the ZoomType property if the value is PAGE_WIDTH_EXACT
2009-03-06 18:59:28 +0100 mst r269039 : - sw/inc/ndtxt.hxx, sw/source/core/txtnode/ndtxt.cxx,
sw/source/core/unocore/unoportenum.cxx:
+ fix some more wntmsci12 warnings...
2009-03-06 18:56:46 +0100 mst r269038 : - sd/source/ui/slidesorter/model/SlsPageEnumerationProvider.cxx:
+ work around spurious warning on unxsoli4 debug=t
2009-03-05 14:02:01 +0100 mst r268902 : - sw/inc/txatbase.hxx:
+ back to c-style casts, they also compile on wntmsci12...
2009-03-05 10:23:25 +0100 mst r268882 : - comphelper/inc/comphelper/processfactory.hxx,
comphelper/source/processfactory/processfactory.cxx:
+ revert change of return type of comphelper_getProcessComponentContext
to Reference: does not build on wntmsci12
2009-03-04 19:08:09 +0100 mst r268861 : - sw/source/core/txtnode/{atrtox.cxx,ndtxt.cxx}:
+ fix initialization
2009-03-04 14:37:30 +0100 mst r268831 : - solenv/inc/target.mk:
+ fix CLASSPATH so complex tests run (fix by sb)
2009-03-04 14:36:30 +0100 mst r268830 : - sw/inc/unoobj.hxx,
sw/source/core/unocore/{unoparagraph.cxx,unoobj.cxx,unoobj2.cxx}:
+ SwXParaFrameEnumeration constructor now takes SwPaM, not SwUnoCrsr
+ move SwParaSelection into unoparagraph.cxx, as it is only used there
+ bugfix: replace SwUnoCrsrs on stack with SwCursors
2009-03-04 14:34:46 +0100 mst r268829 : - sw/inc/pam.hxx, sw/source/core/crsr/pam.cxx,
sw/source/core/edit/eddel.cxx, sw/source/core/doc/docredln.cxx,
sw/source/core/undo/{untbl.cxx,undel.cxx}, sw/source/filter/rtf/swparrtf.cxx:
+ clean up SwPaM: prefix members
+ new constructor SwPosition(SwCntntNode&, xub_StrLen)
+ fix several broken SwPosition and SwPaM constructors
+ SwPam::DeleteMark now actually resets the unused position to default
2009-03-02 12:07:09 +0100 mst r268646 : - sw/inc/fmtcol.hxx:
+ fix annoying warning (gcc 4)
2009-03-02 12:06:27 +0100 mst r268645 : - odk/util/check.pl, odk/examples/DevelopersGuide/Text/TextDocuments.java:
+ rename module from FieldMaster to fieldmaster
2009-02-27 19:49:56 +0100 mst r268614 : - sfx2/inc/sfx2/Metadatable.hxx, sfx2/prj/d.lst,
sfx2/source/doc/{Metadatable.cxx,makefile.mk},
sw/inc/{SwMetadatable.hxx,unoobj.hxx,undobj.hxx,ndtxt.hxx},
sw/source/core/doc/{SwMetadatable.cxx,makefile.mk,docnew.cxx},
sw/source/core/undo/{untbl.cxx,unins.cxx},
sw/source/core/unocore/unoparagraph.cxx, sw/source/ui/app/docsh.cxx:
+ move Metadatable implementation from sw to sfx2
2009-02-27 17:58:55 +0100 mst r268608 : - sw/inc/{SwMetadatable.hxx,undobj.hxx}, sw/source/core/doc/SwMetadatable.cxx,
sw/source/core/undo/{untbl.cxx,unins.cxx,undel.cxx}:
+ CreateUndo now returns an opaque MetadatableUndo object
2009-02-27 13:15:44 +0100 mst r268587 : - sw/inc/ndtxt.hxx, sw/source/core/doc/docfmt.cxx,
sw/source/core/text/{itratr.cxx,porlay.cxx},
sw/source/core/txtnode/{txtedt.cxx,ndtxt.cxx,thints.cxx}:
+ clean up SwTxtNode: fix casts, prefix members
+ factor out inline function SwTxtNode::TryDeleteSwpHints()
2009-02-27 13:14:30 +0100 mst r268586 : - svx/inc/svx/emphitem.hxx:
+ fix borken header guard
2009-02-27 13:13:56 +0100 mst r268585 : - sfx2/source/bastyp/progress.cxx:
+ fix use of compiler specific macro
2009-02-27 11:00:32 +0100 mst r268564 : - sw/inc/{txatbase.hxx,txtatr.hxx,txtinet.hxx,txtfld.hxx,txtftn.hxx,
txtflcnt.hxx,txttxmrk.hxx,txtrfmrk.hxx},
sw/source/core/txtnode/{atrtox.cxx,atrref.cxx,atrflyin.cxx,atrftn.cxx,
txtatr2.cxx,txatbase.cxx,atrfld.cxx,txtedt.cxx},
sw/source/core/text/atrstck.cxx, sw/source/core/access/acchyperlink.cxx,
sw/source/core/doc/visiturl.cxx, sw/source/ui/wrtsh/wrtsh2.cxx:
+ clean up SwTxtAttr and its subclasses: remove/fix casts, prefix members
+ SwTxtINetFmt: remove unused member bColor
- sw/source/core/text/txtfld.cxx:
+ move SwTxtFld methods to atrfld.cxx
2009-02-27 10:58:44 +0100 mst r268563 : - sfx2/inc/sfx2/sfxbasemodel.hxx:
+ don't privately inherit BaseMutex, ScModelObj wants to access it
2009-02-27 10:58:02 +0100 mst r268562 : - xmloff/source/core/{RDFaExportHelper.cxx,RDFaImportHelper.cxx}:
+ arrrgh!!! someone thought it would be a good idea to have 2 different
versions of boost in external! and they're NOT compatible!!!
insert an ugly fragile hack that maybe works with both...
2009-02-26 17:42:26 +0100 mst r268544 : - comphelper/inc/comphelper/storagehelper.hxx.
sfx2/source/doc/DocumentMetadataAccess.cxx:
+ someone made IsValidZipEntryFileName a static method and didn't tell me
2009-02-26 15:52:56 +0100 mst r268529 : redland: split up patches
2009-02-26 13:17:56 +0100 mst r268509 : migration of cws odfmetadata2 from CVS (resync to m42): module sw
#i95863#
- sw/inc/segdefs{,_}.hxx:
+ remove obsolete files
- sw/source/ui/inc/itemdef.hxx:
+ remove itemdef.hxx
- sw/source/ui/app/[apphdl.cxx,docsh.cxx}, sw/source/ui/misc/glshell.cxx,
sw/source/ui/shells/*.cxx, sw/source/ui/uiview/*.cxx, sw/source/ui/web/*.cxx:
+ use sfx2/msg.hxx instead of itemdef.hxx
- sw/source/core/edit/eddel.cxx:
+ @ JP: SwEditShell::Replace:
you're right, deleting the text to be replaced first, and then inserting
a space, and then replacing that space is unnecessary.
whew, i'm so happy that we finally answered that question after 11 years.
- sw/inc/edimp.hxx:
+ remove FOREACHCURSOR_START, FOREACHCURSOR_END
- sw/inc/{swcrsr.hxx,unocrsr.hxx,viscrs.hxx},
sw/source/core/crsr/{crsrsh.cxx,swcrsr.cxx,trvlreg.cxx,trvltbl.cxx,
unocrsr.cxx,viscrs.cxx},
sw/source/core/doc/{docbm.cxx,doccorr.cxx},
sw/source/core/docnode/{ndtbl.cxx,ndtbl1.cxx},
sw/source/core/edit/editsh.cxx,
sw/source/core/frmedt/{fefly1.cxx,fetab.cxx,tblsel.cxx},
sw/source/core/layout/trvlfrm.cxx,
sw/source/core/unocore/{unochart.cxx,unoobj2.cxx,unoparagraph.cxx,
unoportenum.cxx,unotbl.cxx},
sw/source/core/view/vprint.cxx:
+ remove the hideous virtual operator SwFooCursor*
+ make SwCursor::IsReadOnlyAvailable() virtual
+ make SwUnoCrsr::Clone() virtual
+ refactor SwCursor methods IsSelOver(), LeftRight(), UpDown(), GotoTable():
replace dynamic_cast<...>(this) with new virtual methods
2009-02-26 13:14:58 +0100 mst r268508 : migration of cws odfmetadata2 from CVS (resync to m42): module sw
- sw/source/filter/xml/swxml.cxx:
+ XMLReader::Read: load RDF metadata of the ODF document
- sw/source/filter/xml/wrtxml.cxx:
+ SwXMLWriter::_Write: write RDF metadata of the ODF document if ODF >= 1.2
#i90620#: import xml:id in text tables (does not actually work yet)
- sw/source/filter/xml/xmltbli{.hxx,.cxx}:
+ SwXMLTableCellAttrTokens,aTableCellAttrTokenMap: add XML_TOK_TABLE_XMLID
+ SwXMLTableCellContext_Impl::SwXMLTableCellContext_Impl: attribute xml:id
+ SwXMLTableCellContext_Impl::CreateChildContext: attribute xml:id
+ SwXMLTableColContext_Impl::SwXMLTableColContext_Impl: attribute xml:id
+ SwXMLTableContext::SwXMLTableContext: attribute xml:id
fix #i98530#
- sw/inc/unoport.hxx, sw/source/core/unocore/unoport.cxx:
+ SwXTextPortion: make constructor params const&
- sw/source/core/unocore/unoportenum.cxx:
+ refactor to remove some code duplication
+ fix bug: paragraph w/out hints: bookmark before frame gets lost
#i97274# handle invalid tables
- sw/source/core/layout/tabfrm.cxx, sw/source/filter/xml/xmltbli.cxx:
+ SwXMLTableContext::MakeTable():
check that the table actually contains cells,
and abort (removing the inserted table nodes) if not
2009-02-26 13:11:48 +0100 mst r268507 : migration of cws odfmetadata2 from CVS (resync to m42): module sw
refactor SwXTextRange and SwXParagraph
- sw/inc/unoobj.hxx, sw/source/core/unocore/unoobj2.cxx:
+ remove 3 constructors of SwXTextRange
+ new method SwXTextRange::CreateParentXText
+ refactor SwXTextRange::CreateTextRangeFromPosition and
SwXTextRange::getText
- sw/inc/unoobj.hxx, sw/source/core/unocore/unoparagraph.cxx:
+ SwXParagraph no longer uses a cursor; it registers directly at SwTxtNode
+ replace SwXParagraph::GetCrsr with SwXParagraph::GetTxtNode
- sw/source/core/unocore/unotext.cxx, sw/source/ui/uno/unotxvw.cxx:
+ adapt to new SwXParagraph
#i90620#
- sw/inc/SwMetadatable.hxx,
sw/source/core/doc/SwMetadatable.cxx:
+ new files: base classes sw::Metadatable and sw::MetadatableMixin;
also, 2 implementations of IXmlIdRegistry:
sw::XmlIdRegistryDocument and sw::XmlIdRegistryClipboard
+ setMetadataReference: handle empty stream name as auto-detect
- sw/source/core/doc/makefile.mk:
+ add SwMetadatable
add a XmlIdRegistry to SwDoc
- sw/inc/doc.hxx:
+ SwDoc: add member m_pXmlIdRegistry, method GetXmlIdRegistry()
- sw/source/core/doc/docnew.cxx:
+ initialize XmlIdRegistry in SwDoc::GetXmlIdRegistry, not in constructor,
because the constructor is not told whether the SwDoc is a clipboard
- sw/inc/docsh.hxx, sw/source/ui/app/docsh.cxx:
+ SwDocShell: override GetXmlIdRegistry()
#i91563#: make the SwTxtNode metadatable
- sw/inc/ndtxt.hxx
+ SwTxtNode inherits sw::Metadatable
- sw/inc/unoobj.hxx, sw/source/core/unocore/unoparagraph.cxx:
+ SwXParagraph inherits sw::MetadatableMixin
#i91563#: handle SwTxtNode's metadata for delete
- sw/source/core/txtnode/ndtxt.cxx:
+ SwTxtNode::SplitCntntNode: handle XmlId
+ SwTxtNode::JoinNext: merge XmlIds
- sw/source/core/doc/docedt.cxx:
+ lcl_GetJoinFlags: document postcondition
+ SwDoc::Delete: remove XmlId only if SwTxtNode _becomes_ empty
#i91563#: handle SwTxtNode's metadata for delete with undo
- sw/inc/undobj.hxx
+ SwUndoDelete: new members m_pMetadataUndoStart, m_pMetadataUndoEnd
- sw/source/core/undo/undel.cxx:
+ SwUndoDelete::SaveCntnt: save XmlIds for start and end SwTxtNode
+ SwUndoDelete::SaveCntnt: remove XmlId only if SwTxtNode _becomes_ empty
+ SwUndoDelete::Undo: restore saved XmlIds for start and end SwTxtNode
- sw/source/core/docnode/ndcopy.cxx:
+ SwTxtNode::MakeCopy: register copy at XmlIdRegistry
#i91563#: handle SwTxtNode's metadata for find/replace with undo
- sw/source/core/undo/unins.cxx:
+ _UnReplaceData: rename members: add prefix m_
+ _UnReplaceData: new members m_pMetadataUndoStart, m_pMetadataUndoEnd
+ _UnReplaceData::_UnReplaceData: save XmlIds for start and end SwTxtNode
+ _UnReplaceData::Undo: restore saved XmlIds for start and end SwTxtNode
#i91563#: handle SwTxtNode's metadata for table-to-text with undo
- sw/source/core/undo/untbl.cxx:
+ SwTblToTxtSave: rename members: add prefix m_
+ SwTblToTxtSave: new members m_pMetadataUndoStart, m_pMetadataUndoEnd
+ SwTblToTxtSave::SwTblToTxtSave: save XmlIds for start and end SwTxtNode
+ SwTblToTxtSave::SwTblToTxtSave, SwNodes::UndoTableToText:
always store the index of the first SwTxtNode in the cell, instead of
the index of the first SwTxtNode in case of the first cell in a row,
and the cell start node in other cases
+ SwNodes::UndoTableToText: restore saved XmlIds for start and end SwTxtNode
- sw/source/core/docnode/ndtbl.cxx:
+ lcl_DelBox: simplify for refactored start index handling in SwTblToTxtSave
2009-02-26 13:02:28 +0100 mst r268505 : migration of cws odfmetadata2 from CVS (resync to m42): module sd
- sd/source/ui/table/tableobjectbar.cxx,sd/source/ui/view/*.cxx:
+ remove invocations of SFX_DECL_TYPE
- sd/source/ui/slideshow/SlideShowRestarter.cxx,
sd/source/ui/toolpanel/LayoutMenu.cxx,
sd/source/ui/unoidl/DrawController.cxx,
sd/source/ui/view/{ViewShellBase.cxx,ViewTabBar.cxx,frmview.cxx}:
+ fix abuses of comphelper_getProcessComponentContext (missing release)
2009-02-26 13:01:24 +0100 mst r268504 : migration of cws odfmetadata2 from CVS (resync to m42): module starmath
- starmath/source/document.cxx:
+ don't touch SfxObjectShell's privates
2009-02-26 13:00:37 +0100 mst r268503 : migration of cws odfmetadata2 from CVS (resync to m42): module sfx2
#i90620#
- sfx2/inc/sfx2/XmlIdRegistry.hxx:
+ new file: interfaces sfx2::IXmlIdRegistry and sfx2::IXmlIdRegistrySupplier
and a couple of utility functions
- sfx2/inc/sfx2/DocumentMetadataAccess.hxx,
sfx2/source/doc/DocumentMetadataAccess.cxx:
+ new class sfx2::DocumentMetadataAccess, implements XDocumentMetadataAccess
+ the URI of the DocumentMetadataAccess is now the URI from which the
document was loaded; for a new document, use a vnd.sun.star.tdoc URI
+ add new function sfx2::createBaseURI()
+ prevent using reserved file names
+ try not to recurse into embedded subdocuments
- sfx2/source/doc/makefile.mk:
+ add DocumentMetadataAccess
- sfx2/util/makefile.mk:
+ link libsfx2 against libxml2 (needed for xmlValidateNCName)
- sfx2/source/doc/makefile.mk:
+ add LIBXML_CFLAGS to CFLAGS
- sfx2/prj/build.lst:
+ add dependence on libxml2
- sfx2/prj/d.lst:
+ add XmlIdRegistry.hxx, DocumentMetadataAccess.hxx
- sfx2/inc/sfx2/objsh.hxx, sfx2/source/doc/objxtor.cxx:
+ make SfxObjectShell's members private
+ new method SfxObjectShell::GetAutoStyleFilterIndex
+ SfxObjectShell inherits sfx2::IXmlIdRegistrySupplier
- sfx2/source/dialog/templdlg.cxx, sfx2/source/doc/sfxbasemodel.cxx:
+ don't touch SfxObjectShell's privates
- sfx2/inc/sfx2/sfxbasemodel.hxx, sfx2/source/doc/sfxbasemodel.cxx:
+ SfxBaseModel inherits BaseMutex instead of IMPL_SfxBaseModel_MutexContainer
+ SfxBaseModel implements additional interface XDocumentMetadataAccess
+ IMPL_SfxBaseModel_DataContainer has new member:
a sfx2::DocumentMetadataAccess
+ implementation of XDocumentMetadataAccess forwards to
the sfx2::DocumentMetadataAccess member
- sfx2/qa/complex/DocumentMetadataAccessTest.java,
sfx2/qa/complex/{tests.sce,makefile.mk},
sfx2/qa/complex/testdocuments/TESTRDFA.odt:
+ add complex test: DocumentMetadataAccessTest
+ add RDFa test document
#i95863#
- sfx2/inc/sfx2/dinfdlg.hxx, sfx2/source/dialog/dinfdlg.cxx:
+ refactor SfxDocumentItem so it no longer requires a XDocumentInfo
+ move struct CustomProperty to implementation file
+ remove class SfxDocumentUserPage
+ QueryValue,PutValue: remove MID_DOCINFO_FIELD*
- sfx2/source/doc/objserv.cxx:
+ adapt to SfxDocumentItem change
- sfx2/inc/sfx2/sfx.hrc, sfx2/sdi/sfxslots.sdi, sfx2/inc/sfx2/msg.hxx:
+ remove MID_DOCINFO_FIELD*
+ put all invocations of SFX_DECL_TYPE in msg.hxx, and undef SFX_DECL_TYPE
- sfx2/source/doc/objxtor.cxx:
+ fix abuses of comphelper_getProcessComponentContext (missing release)
- sfx2/source/doc/docfile.cxx:
+ SfxMedium::SfxMedium: don't dereference NULL, throw exception instead
- sfx2/source/doc/objstor.cxx:
+ SfxObjectShell::DoLoad: fix bug: DocumentBaseURI is not initialized
2009-02-26 12:58:07 +0100 mst r268502 : migration of cws odfmetadata2 from CVS (resync to m42): module xmloff
#i90620#: implement RDFa import (interface change)
- xmloff/inc/xmloff/xmlimp.hxx. xmloff/source/core/xmlimp.cxx:
+ make SvXMLImport::GetAbsoluteReference() const
+ add SvXMLImport::GetComponentContext()
+ SvXMLImport::_InitCtor(): add RDFa namespace
+ add SvXMLImport::AddRDFa()
+ SvXMLImport::endDocument() inserts RDFa into document repository
- xmloff/inc/xmloff/xmltoken.hxx, xmloff/source/core/xmltoken.cxx:
+ new tokens for RDFa: XML_ABOUT, XML_DATATYPE
- xmloff/inc/RDFaImportHelper.hxx, xmloff/source/core/RDFaImportHelper.cxx:
+ new class RDFaImportHelper
+ adapt the code to the bleak reality of broken C++ implementations
+ handle empty xhtml:about attributes properly, which are actually
valid relative URIs
+ work around broken SvXMLImport::GetAbsoluteReference
- xmloff/source/core/makefile.mk:
+ add RDFaImportHelper.cxx
#i90620#: implement RDFa export
- xmloff/inc/xmloff/xmlexp.hxx, xmloff/source/core/xmlexp.cxx:
+ add SvXMLExport::EnsureNamespace(), and a stack of namespace maps
+ add SvXMLExport::GetComponentContext()
+ add SvXMLExport::AddAttributesRDFa()
- xmloff/inc/RDFaExportHelper.hxx, xmloff/source/core/RDFaExportHelper.cxx:
+ new class RDFaExportHelper
+ don't use std::map::data_type, which is actually called
std::map::mapped_type by libstdc++
- xmloff/source/core/makefile.mk:
+ add RDFaExportHelper.cxx
#i91563#
- xmloff/inc/xmloff/txtimp.hxx, xmloff/source/text/txtimp.cxx:
+ XMLTextPAttrTokens: add RDFa tokens
- xmloff/source/text/txtparai{.hxx,.cxx}:
+ import RDFa for text:p
- xmloff/source/text/txtparae.cxx:
+ export RDFa for text:p
interface change: use XHTML namespace instead of RDFA
- xmloff/inc/xmlnmspe.hxx, xmloff/inc/xmloff/xmltoken.hxx,
xmloff/source/core/{xmltoken.cxx,xmlimp.cxx,xmlexp.cxx,RDFaExportHelper.cxx},
xmloff/source/text/txtimp.cxx:
+ use XHTML namespace instead of RDFA
#i91565#, #i91566#: (preliminary) import for text:meta, text:meta-field
- xmloff/source/text/txtparai.cxx:
+ new class XMLMetaImportContextBase with subclasses to import
text:meta and text:meta-field
- xmloff/source/text/XMLTextMarkImportContext.cxx:
+ change XMLTextMarkImportContext::CreateAndInsertMark to handle marks
with no name (text:meta)
#i91565#, #i91566#: (preliminary) export for text:meta, text:meta-field
- xmloff/inc/txtflde.hxx, xmloff/source/text/txtflde.cxx:
+ add FIELD_ID_META to FieldIdEnum
+ new method XMLTextFieldExport::ExportMetaField()
+ change XMLTextFieldExport::ExportField{,AutoStyle,Helper}
to take additional parameter for progress bar
- xmloff/inc/xmloff/txtparae.hxx, xmloff/source/text/txtparae.cxx:
+ make XMLTextParagraphExport::exportTextRangeEnumeration() public
+ new method XMLTextParagraphExport::exportMeta()
#i90620#
- xmloff/inc/xmloff/xmlimp.hxx, xmloff/source/core/xmlimp.cxx,
xmloff/inc/xmloff/xmlexp.hxx, xmloff/source/core/xmlexp.cxx:
+ rename SvXML{Im,Ex}port::GetStreamPath() to GetStreamName()
+ fix xml:id {im,ex}port for embedded documents and non-packages
+ adapt to API change: XMetadatable
#i90620# GRDDL
- xmloff/inc/xmlnmspe.hxx, xmloff/inc/xmloff/xmltoken.hxx,
xmloff/source/core/{xmltoken.cxx,xmlexp.cxx}:
+ add GRDDL namespace
+ add token XML_TRANSFORMATION
+ add grddl:transformation attribute to root elements for meta.xml,
content.xml and styles.xml
2009-02-26 12:54:40 +0100 mst r268501 : migration of cws odfmetadata2 from CVS (resync to m42): module unoxml
#i90620#
- unoxml/source/rdf/librdf_repository.cxx:
+ librdf_Repository::importGraph: allocate buffer sized length of stream
+ switch from one librdf_world per repository to a single static world
because redland has global variables with a brain-damaged life-cycle...
+ exportGraph: use new raptor 1.4.18 feature to disable writing
an xml:base attribute in RDF/XML files
- unoxml/source/rdf/librdf_repository.cxx:
unoxml/qa/complex/RDFRepositoryTest.java:
+ adapt to predicate is URI change
+ adapt to RDFa API change
+ adapt to API change: RDFa has multiple predicates...
+ adapt to API change: XMetadatable derives from XURI
+ allow xhtml:datatype without xhtml:content
+ adapt to API change: attribute MetadataReference is StringPair
- unoxml/source/rdf/CURI.cxx:
+ add some more URI constants
2009-02-26 12:53:32 +0100 mst r268500 : migration of cws odfmetadata2 from CVS (resync to m42): module package
- package/inc/ImplValidCharacters.hxx:
+ remove (moved to comphelper)
2009-02-26 12:52:49 +0100 mst r268499 : migration of cws odfmetadata2 from CVS (resync to m42): module comphelper
- comphelper/inc/comphelper/processfactory.hxx,
comphelper/source/processfactory/processfactory.cxx:
+ add getProcessComponentContext()
+ change return type of comphelper_getProcessComponentContext to Reference
- comphelper/inc/comphelper/stl_types.hxx:
+ add OUStringBufferAppender
+ add algorithm intersperse
- comphelper/source/misc/string.cxx:
+ rewrite convertCommaSeparated with intersperse and OUStringBufferAppender
- comphelper/inc/comphelper/stlunosequence.hxx:
+ fix bug: begin() on empty sequence != end()
2009-02-26 12:50:47 +0100 mst r268498 : migration of cws odfmetadata2 from CVS (resync to m42): module offapi
#i96209#
- offapi/com/sun/star/text/fieldmaster/*.idl:
+ rename module from FieldMaster to fieldmaster
- offapi/type_reference/{typelibrary_history.txt,types.rdb}:
+ update reference types.rdb
#i90620#
- offapi/com/sun/star/rdf/{XMetadatable.idl,XDocumentMetadataAccess.idl}:
+ API change: XMetadatable derives from XURI
+ API change: replace XmlId (string) with MetadataReference (StringPair)
- offapi/com/sun/star/rdf/{Statement.idl,XDocumentRepository.idl,
XNamedGraph.idl,XRepository.idl}:
+ the predicate of a statement is a URI, not a Resource
- offapi/com/sun/star/rdf/XDocumentMetadataAccess.idl:
+ rename: s/Package/Document/
+ remove uuid
+ remove everything related to mapping
+ graph names are now generated from base URI and file names
+ load methods: improve error handling with XInteractionHandler
- offapi/com/sun/star/rdf/XDocumentRepository.idl:
+ change: RDFa permits using multiple predicates in one attribute
+ setStatementRDFa: subject is now XResource, object is now XMetadatable
- offapi/com/sun/star/rdf/URIs.idl:
+ add some more URI constants
- offapi/com/sun/star/rdf:
+ fix @since tags and replace <method> with <member>
2009-02-26 12:47:24 +0100 mst r268497 : migration of cws odfmetadata2 from CVS (resync to m42): module redland
fix #i93768#
- redland/raptor-1.4.17.patch, redland/raptor/makefile.mk:
+ disable GRDDL parser to prevent call to libxslt
xsltSetDefaultSecurityPrefs, which breaks xmlhelp
- redland/raptor/makefile.mk, redland/raptor-1.4.17.patch,
redland/raptor-1.4.18.patch:
+ upgrade raptor to 1.4.18
+ deactivate serializer for RSS/Atom (does not build)
- redland/rasqal/makefile.mk, redland/rasqal-0.9.15.patch,
redland/rasqal-0.9.16.patch,
+ upgrade rasqal to 0.9.16
- redland/redland/makefile.mk, redland/redland-1.0.7.patch,
redland/redland-1.0.8.patch:
+ upgrade redland to 1.0.8
- redland/redlandversion.mk:
+ the librasqal SONAME has changed
2009-07-02 09:05:03 +00:00
|
|
|
}
|
2000-11-13 12:19:55 +00:00
|
|
|
}
|
2000-11-23 19:08:52 +00:00
|
|
|
delete pSSetItem;
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
2002-05-29 09:38:06 +00:00
|
|
|
else
|
2011-01-17 15:06:54 +01:00
|
|
|
GetView().GetViewFrame()->GetDispatcher()->Execute( SID_CHAR_DLG, sal_False);
|
2002-07-19 10:16:36 +00:00
|
|
|
rReq.Done();
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
|
2000-11-13 12:19:55 +00:00
|
|
|
void SwBaseShell::GetTxtCtrlState( SfxItemSet& rSet )
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2000-11-13 12:19:55 +00:00
|
|
|
SwWrtShell &rSh = GetShell();
|
2008-03-05 16:25:11 +00:00
|
|
|
rSh.GetCurAttr( rSet );
|
2000-11-13 12:19:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void SwBaseShell::GetTxtFontCtrlState( SfxItemSet& rSet )
|
|
|
|
{
|
|
|
|
SwWrtShell &rSh = GetShell();
|
2013-02-13 00:02:30 +09:00
|
|
|
bool bFirst = true;
|
2000-11-23 19:08:52 +00:00
|
|
|
SfxItemSet* pFntCoreSet = 0;
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt16 nScriptType = SCRIPTTYPE_LATIN;
|
2000-11-23 19:08:52 +00:00
|
|
|
SfxWhichIter aIter( rSet );
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt16 nWhich = aIter.FirstWhich();
|
2000-11-23 19:08:52 +00:00
|
|
|
while( nWhich )
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2000-11-23 19:08:52 +00:00
|
|
|
switch( nWhich )
|
2000-11-13 12:19:55 +00:00
|
|
|
{
|
2000-11-23 19:08:52 +00:00
|
|
|
case RES_CHRATR_FONT:
|
|
|
|
case RES_CHRATR_FONTSIZE:
|
|
|
|
case RES_CHRATR_WEIGHT:
|
|
|
|
case RES_CHRATR_POSTURE:
|
2000-11-13 12:19:55 +00:00
|
|
|
{
|
2000-11-23 19:08:52 +00:00
|
|
|
if( !pFntCoreSet )
|
2000-11-13 12:19:55 +00:00
|
|
|
{
|
2000-11-23 19:08:52 +00:00
|
|
|
pFntCoreSet = new SfxItemSet( *rSet.GetPool(),
|
|
|
|
RES_CHRATR_BEGIN, RES_CHRATR_END-1 );
|
2008-03-05 16:25:11 +00:00
|
|
|
rSh.GetCurAttr( *pFntCoreSet );
|
2000-11-23 19:08:52 +00:00
|
|
|
nScriptType = rSh.GetScriptType();
|
2006-07-26 11:18:28 +00:00
|
|
|
// #i42732# input language should be preferred over
|
2005-11-16 08:52:17 +00:00
|
|
|
// current cursor position to detect script type
|
2006-07-26 11:18:28 +00:00
|
|
|
SwEditWin& rEditWin = GetView().GetEditWin();
|
|
|
|
if( rEditWin.IsUseInputLanguage() )
|
2005-11-16 08:52:17 +00:00
|
|
|
{
|
2006-07-26 11:18:28 +00:00
|
|
|
if(!rSh.HasSelection() && (
|
|
|
|
nWhich == RES_CHRATR_FONT ||
|
|
|
|
nWhich == RES_CHRATR_FONTSIZE ))
|
|
|
|
{
|
|
|
|
LanguageType nInputLang = rEditWin.GetInputLanguage();
|
|
|
|
if(nInputLang != LANGUAGE_DONTKNOW && nInputLang != LANGUAGE_SYSTEM)
|
|
|
|
nScriptType = SvtLanguageOptions::GetScriptTypeOfLanguage( nInputLang );
|
|
|
|
}
|
2005-11-16 08:52:17 +00:00
|
|
|
}
|
2000-11-13 12:19:55 +00:00
|
|
|
}
|
2000-11-23 19:08:52 +00:00
|
|
|
SfxItemPool& rPool = *rSet.GetPool();
|
|
|
|
SvxScriptSetItem aSetItem( rPool.GetSlotId( nWhich ), rPool );
|
2011-01-17 15:06:54 +01:00
|
|
|
aSetItem.GetItemSet().Put( *pFntCoreSet, sal_False );
|
2000-11-23 19:08:52 +00:00
|
|
|
const SfxPoolItem* pI = aSetItem.GetItemOfScript( nScriptType );
|
|
|
|
if( pI )
|
|
|
|
rSet.Put( *pI, nWhich );
|
|
|
|
else
|
|
|
|
rSet.InvalidateItem( nWhich );
|
2002-08-28 13:55:08 +00:00
|
|
|
//set input context of the SwEditWin according to the selected font and script type
|
|
|
|
if(RES_CHRATR_FONT == nWhich)
|
|
|
|
{
|
|
|
|
Font aFont;
|
|
|
|
if(pI && pI->ISA(SvxFontItem))
|
|
|
|
{
|
|
|
|
aFont.SetName( ((const SvxFontItem*)pI)->GetFamilyName());
|
|
|
|
aFont.SetStyleName(((const SvxFontItem*)pI)->GetStyleName());
|
|
|
|
aFont.SetFamily(((const SvxFontItem*)pI)->GetFamily());
|
|
|
|
aFont.SetPitch(((const SvxFontItem*)pI)->GetPitch());
|
|
|
|
aFont.SetCharSet(((const SvxFontItem*)pI)->GetCharSet());
|
|
|
|
}
|
|
|
|
|
2012-11-01 08:19:50 +09:00
|
|
|
bool bVertical = rSh.IsInVerticalText();
|
2002-08-28 13:55:08 +00:00
|
|
|
aFont.SetOrientation(bVertical ? 2700 : 0);
|
2012-11-01 08:19:50 +09:00
|
|
|
aFont.SetVertical(bVertical ? sal_True : sal_False);
|
2002-08-28 13:55:08 +00:00
|
|
|
GetView().GetEditWin().SetInputContext( InputContext( aFont, INPUTCONTEXT_TEXT |
|
|
|
|
INPUTCONTEXT_EXTTEXTINPUT ) );
|
|
|
|
}
|
2000-11-23 19:08:52 +00:00
|
|
|
}
|
|
|
|
break;
|
2000-11-13 12:19:55 +00:00
|
|
|
|
2000-11-23 19:08:52 +00:00
|
|
|
default:
|
|
|
|
if( bFirst )
|
|
|
|
{
|
2008-03-05 16:25:11 +00:00
|
|
|
rSh.GetCurAttr( rSet );
|
2013-02-13 00:02:30 +09:00
|
|
|
bFirst = false;
|
2000-11-13 12:19:55 +00:00
|
|
|
}
|
|
|
|
}
|
2000-11-23 19:08:52 +00:00
|
|
|
nWhich = aIter.NextWhich();
|
2000-11-13 12:19:55 +00:00
|
|
|
}
|
2000-11-23 19:08:52 +00:00
|
|
|
delete pFntCoreSet;
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void SwBaseShell::GetBckColState(SfxItemSet &rSet)
|
|
|
|
{
|
|
|
|
SwWrtShell &rSh = GetShell();
|
|
|
|
SfxWhichIter aIter( rSet );
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt16 nWhich = aIter.FirstWhich();
|
2000-09-18 16:15:01 +00:00
|
|
|
int nSelType = rSh.GetSelectionType();
|
|
|
|
|
2007-09-27 11:26:21 +00:00
|
|
|
if( nSelType & nsSelectionType::SEL_OLE )
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
|
|
|
rSet.DisableItem( SID_BACKGROUND_COLOR );
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2007-09-27 11:26:21 +00:00
|
|
|
if ( nSelType & nsSelectionType::SEL_FRM )
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2013-02-13 00:02:30 +09:00
|
|
|
bool bParentCntProt = rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) != 0;
|
2000-09-18 16:15:01 +00:00
|
|
|
if (bParentCntProt)
|
|
|
|
{
|
|
|
|
rSet.DisableItem( SID_BACKGROUND_COLOR );
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2007-05-10 15:22:02 +00:00
|
|
|
SvxBrushItem aBrushItem( RES_BACKGROUND );
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2007-09-27 11:26:21 +00:00
|
|
|
if( nsSelectionType::SEL_TBL_CELLS & nSelType )
|
2000-09-18 16:15:01 +00:00
|
|
|
rSh.GetBoxBackground( aBrushItem );
|
|
|
|
else
|
|
|
|
{
|
|
|
|
SfxItemSet aCoreSet(GetPool(), RES_BACKGROUND, RES_BACKGROUND);
|
2007-09-27 11:26:21 +00:00
|
|
|
if( nSelType & nsSelectionType::SEL_GRF || nsSelectionType::SEL_FRM & nSelType )
|
2000-09-18 16:15:01 +00:00
|
|
|
rSh.GetFlyFrmAttr( aCoreSet );
|
|
|
|
else
|
2008-03-05 16:25:11 +00:00
|
|
|
rSh.GetCurAttr( aCoreSet );
|
2000-09-18 16:15:01 +00:00
|
|
|
aBrushItem = (const SvxBrushItem&)aCoreSet.Get(RES_BACKGROUND);
|
|
|
|
}
|
|
|
|
|
|
|
|
while ( nWhich )
|
|
|
|
{
|
|
|
|
switch(nWhich)
|
|
|
|
{
|
|
|
|
case SID_BACKGROUND_COLOR :
|
|
|
|
{
|
2007-05-10 15:22:02 +00:00
|
|
|
SvxColorItem aColorItem(aBrushItem.GetColor(), SID_BACKGROUND_COLOR);
|
2000-09-18 16:15:01 +00:00
|
|
|
rSet.Put( aColorItem, SID_BACKGROUND_COLOR );
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case SID_ATTR_BRUSH:
|
|
|
|
case RES_BACKGROUND:
|
|
|
|
rSet.Put( aBrushItem, GetPool().GetWhich(nWhich) );
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
nWhich = aIter.NextWhich();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void SwBaseShell::ExecBckCol(SfxRequest& rReq)
|
|
|
|
{
|
|
|
|
SwWrtShell &rSh = GetShell();
|
|
|
|
int nSelType = rSh.GetSelectionType();
|
2007-09-27 11:26:21 +00:00
|
|
|
if ( nSelType & nsSelectionType::SEL_OLE )
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
const SfxItemSet* pArgs = rReq.GetArgs();
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt16 nSlot = rReq.GetSlot();
|
2000-09-18 16:15:01 +00:00
|
|
|
if( !pArgs && nSlot != SID_BACKGROUND_COLOR)
|
|
|
|
return ;
|
|
|
|
|
2007-05-10 15:22:02 +00:00
|
|
|
SvxBrushItem aBrushItem( RES_BACKGROUND );
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2007-09-27 11:26:21 +00:00
|
|
|
if( nsSelectionType::SEL_TBL_CELLS & nSelType )
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
|
|
|
rSh.GetBoxBackground( aBrushItem );
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
SfxItemSet aCoreSet(GetPool(), RES_BACKGROUND, RES_BACKGROUND);
|
2007-09-27 11:26:21 +00:00
|
|
|
if( (nsSelectionType::SEL_FRM & nSelType) || (nsSelectionType::SEL_GRF & nSelType) )
|
2000-09-18 16:15:01 +00:00
|
|
|
rSh.GetFlyFrmAttr( aCoreSet );
|
|
|
|
else
|
2008-03-05 16:25:11 +00:00
|
|
|
rSh.GetCurAttr( aCoreSet );
|
2000-09-18 16:15:01 +00:00
|
|
|
aBrushItem = (const SvxBrushItem&)aCoreSet.Get(RES_BACKGROUND);
|
|
|
|
}
|
|
|
|
|
|
|
|
switch (nSlot)
|
|
|
|
{
|
|
|
|
// RES_BACKGROUND (=SID_ATTR_BRUSH) muss ueber zwei IDs
|
|
|
|
// gesetzt werden:
|
|
|
|
case SID_BACKGROUND_COLOR:
|
|
|
|
{
|
|
|
|
aBrushItem.SetGraphicPos(GPOS_NONE);
|
|
|
|
|
|
|
|
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);
|
|
|
|
}
|
2012-03-06 19:26:34 +04:00
|
|
|
else
|
|
|
|
{
|
|
|
|
aBrushItem.SetColor( COL_TRANSPARENT );
|
|
|
|
rReq.AppendItem( SvxColorItem( Color( COL_TRANSPARENT ), nSlot ) );
|
|
|
|
}
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case SID_ATTR_BRUSH:
|
|
|
|
case RES_BACKGROUND:
|
|
|
|
{
|
|
|
|
const SvxBrushItem& rNewBrushItem = (const SvxBrushItem&)
|
|
|
|
pArgs->Get( GetPool().GetWhich(nSlot) );
|
|
|
|
aBrushItem = rNewBrushItem;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
default:
|
2002-07-19 10:16:36 +00:00
|
|
|
rReq.Ignore();
|
2011-03-12 11:51:35 +01:00
|
|
|
OSL_FAIL("unknown message in ExecuteAttr!" );
|
2000-09-18 16:15:01 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2007-09-27 11:26:21 +00:00
|
|
|
if( nsSelectionType::SEL_TBL_CELLS & nSelType )
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
|
|
|
rSh.SetBoxBackground( aBrushItem );
|
|
|
|
}
|
2007-09-27 11:26:21 +00:00
|
|
|
else if( (nsSelectionType::SEL_FRM & nSelType) ||
|
|
|
|
(nsSelectionType::SEL_GRF & nSelType) )
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
|
|
|
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 );
|
|
|
|
}
|
2002-07-19 10:16:36 +00:00
|
|
|
|
|
|
|
rReq.Done();
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void SwBaseShell::GetBorderState(SfxItemSet &rSet)
|
|
|
|
{
|
|
|
|
SwWrtShell &rSh = GetShell();
|
|
|
|
// Tabellenzelle(n) selektiert?
|
2013-02-13 00:02:30 +09:00
|
|
|
bool bPrepare = true;
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_Bool bTableMode = rSh.IsTableMode();
|
2004-11-09 15:23:42 +00:00
|
|
|
if ( bTableMode )
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
|
|
|
SfxItemSet aCoreSet( GetPool(),
|
|
|
|
RES_BOX, RES_BOX,
|
|
|
|
SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER, 0 );
|
2007-05-10 15:22:02 +00:00
|
|
|
SvxBoxInfoItem aBoxInfo( SID_ATTR_BORDER_INNER );
|
2000-09-18 16:15:01 +00:00
|
|
|
aCoreSet.Put( aBoxInfo );
|
|
|
|
rSh.GetTabBorders( aCoreSet );
|
|
|
|
rSet.Put( aCoreSet );
|
|
|
|
}
|
|
|
|
else if ( rSh.IsFrmSelected() )
|
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
SwFlyFrmAttrMgr aMgr( sal_False, &rSh, FRMMGR_TYPE_NONE );
|
2000-09-18 16:15:01 +00:00
|
|
|
rSet.Put( aMgr.GetAttrSet() );
|
2013-02-13 00:02:30 +09:00
|
|
|
bPrepare = false;
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
// Umrandungsattribute ganz normal ueber Shell holen
|
2008-03-05 16:25:11 +00:00
|
|
|
rSh.GetCurAttr( rSet );
|
2000-09-18 16:15:01 +00:00
|
|
|
if ( bPrepare )
|
|
|
|
::PrepareBoxInfo( rSet, rSh );
|
2004-11-09 15:23:42 +00:00
|
|
|
// switch the border toolbox controller mode
|
|
|
|
rSet.Put( SfxBoolItem( SID_BORDER_REDUCED_MODE, !bTableMode ));
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void SwBaseShell::ExecDlg(SfxRequest &rReq)
|
|
|
|
{
|
|
|
|
SwWrtShell &rSh = GetShell();
|
|
|
|
Window *pMDI = &GetView().GetViewFrame()->GetWindow();
|
|
|
|
//Damit aus dem Basic keine Dialoge fuer Hintergrund-Views aufgerufen werden:
|
2013-02-13 00:02:30 +09:00
|
|
|
bool bBackground = (&GetView() != GetActiveView());
|
2000-09-18 16:15:01 +00:00
|
|
|
const SfxPoolItem* pItem = 0;
|
|
|
|
const SfxItemSet* pArgs = rReq.GetArgs();
|
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt16 nSlot = rReq.GetSlot();
|
2000-09-18 16:15:01 +00:00
|
|
|
const SfxItemSet* pOutSet = 0;
|
2005-03-11 09:50:12 +00:00
|
|
|
bool bDone = false;
|
2000-09-18 16:15:01 +00:00
|
|
|
if(pArgs)
|
2011-01-17 15:06:54 +01:00
|
|
|
pArgs->GetItemState( GetPool().GetWhich(nSlot), sal_False, &pItem );
|
2000-09-18 16:15:01 +00:00
|
|
|
|
|
|
|
switch ( nSlot )
|
|
|
|
{
|
2010-10-18 14:01:21 +01:00
|
|
|
case FN_FORMAT_TITLEPAGE_DLG:
|
|
|
|
{
|
|
|
|
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
|
|
|
|
VclAbstractDialog* pDlg = pFact->CreateTitlePageDlg( pMDI );
|
|
|
|
pDlg->Execute();
|
|
|
|
delete pDlg;
|
|
|
|
}
|
|
|
|
break;
|
2000-09-18 16:15:01 +00:00
|
|
|
case FN_FORMAT_PAGE_COLUMN_DLG:
|
|
|
|
case FN_FORMAT_PAGE_DLG:
|
|
|
|
{
|
|
|
|
if( !bBackground )
|
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
const sal_uInt16 nCurIdx = rSh.GetCurPageDesc();
|
2000-09-18 16:15:01 +00:00
|
|
|
const SwPageDesc& rPageDesc = rSh.GetPageDesc( nCurIdx );
|
|
|
|
//temp. View, weil die Shell nach dem Dialog nicht mehr gueltig sein muss
|
|
|
|
//z.B. Kopfzeile ausschalten
|
2007-09-27 11:26:21 +00:00
|
|
|
SwView& rTempView = GetView();
|
2011-09-08 15:38:50 +02:00
|
|
|
sal_uInt16 nPageId = 0;
|
|
|
|
if ( nSlot == FN_FORMAT_PAGE_COLUMN_DLG )
|
|
|
|
nPageId = TP_COLUMN ;
|
2007-09-27 11:26:21 +00:00
|
|
|
rTempView.GetDocShell()->FormatPage(rPageDesc.GetName(),
|
2011-09-08 15:38:50 +02:00
|
|
|
nPageId, &rSh );
|
2007-09-27 11:26:21 +00:00
|
|
|
rTempView.InvalidateRulerPos();
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case FN_FORMAT_BORDER_DLG:
|
|
|
|
{
|
|
|
|
SfxItemSet aSet( rSh.GetAttrPool(),
|
|
|
|
RES_BOX , RES_SHADOW,
|
|
|
|
SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER,
|
|
|
|
0 );
|
2009-05-06 10:59:57 +00:00
|
|
|
SfxAbstractDialog * pDlg = 0;
|
2000-09-18 16:15:01 +00:00
|
|
|
// Tabellenzelle(n) selektiert?
|
|
|
|
if ( rSh.IsTableMode() )
|
|
|
|
{
|
|
|
|
// Umrandungattribute Get/SetTabBorders() setzen
|
|
|
|
::PrepareBoxInfo( aSet, rSh );
|
|
|
|
rSh.GetTabBorders( aSet );
|
2007-09-27 11:26:21 +00:00
|
|
|
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
|
2010-10-24 23:48:32 +02:00
|
|
|
OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
|
2004-05-10 15:34:49 +00:00
|
|
|
|
2007-04-26 08:15:11 +00:00
|
|
|
pDlg = pFact->CreateSwBorderDlg( pMDI, aSet, SW_BORDER_MODE_TABLE, RC_DLG_SWBORDERDLG );
|
2010-10-24 23:48:32 +02:00
|
|
|
OSL_ENSURE(pDlg, "Dialogdiet fail!");
|
2000-09-18 16:15:01 +00:00
|
|
|
if ( pDlg->Execute() == RET_OK )
|
|
|
|
{
|
|
|
|
rSh.SetTabBorders( *pDlg->GetOutputItemSet() );
|
|
|
|
pOutSet = pDlg->GetOutputItemSet();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if ( rSh.IsFrmSelected() )
|
|
|
|
{
|
|
|
|
// Umrandungsattribute ueber Frame-Manager setzen
|
2011-01-17 15:06:54 +01:00
|
|
|
SwFlyFrmAttrMgr aMgr( sal_False, &rSh, FRMMGR_TYPE_NONE );
|
2000-09-18 16:15:01 +00:00
|
|
|
aSet.Put( aMgr.GetAttrSet() );
|
|
|
|
|
2007-09-27 11:26:21 +00:00
|
|
|
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
|
2010-10-24 23:48:32 +02:00
|
|
|
OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
|
2004-05-10 15:34:49 +00:00
|
|
|
|
2007-04-26 08:15:11 +00:00
|
|
|
pDlg = pFact->CreateSwBorderDlg( pMDI, aSet, SW_BORDER_MODE_FRAME, RC_DLG_SWBORDERDLG );
|
2010-10-24 23:48:32 +02:00
|
|
|
OSL_ENSURE(pDlg, "Dialogdiet fail!");
|
2000-09-18 16:15:01 +00:00
|
|
|
if ( pDlg->Execute() == RET_OK )
|
|
|
|
{
|
|
|
|
aMgr.SetAttrSet( *pDlg->GetOutputItemSet() );
|
|
|
|
aMgr.UpdateFlyFrm();
|
|
|
|
pOutSet = pDlg->GetOutputItemSet();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
// Umrandungsattribute ganz normal ueber Shell setzen
|
2008-03-05 16:25:11 +00:00
|
|
|
rSh.GetCurAttr( aSet );
|
2000-09-18 16:15:01 +00:00
|
|
|
::PrepareBoxInfo( aSet, rSh );
|
|
|
|
|
2007-09-27 11:26:21 +00:00
|
|
|
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
|
2010-10-24 23:48:32 +02:00
|
|
|
OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
|
2004-05-10 15:34:49 +00:00
|
|
|
|
2007-04-26 08:15:11 +00:00
|
|
|
pDlg = pFact->CreateSwBorderDlg( pMDI, aSet, SW_BORDER_MODE_PARA, RC_DLG_SWBORDERDLG );
|
2010-10-24 23:48:32 +02:00
|
|
|
OSL_ENSURE(pDlg, "Dialogdiet fail!");
|
2000-09-18 16:15:01 +00:00
|
|
|
if ( pDlg->Execute() == RET_OK )
|
|
|
|
{
|
|
|
|
rSh.SetAttr( *pDlg->GetOutputItemSet() );
|
|
|
|
pOutSet = pDlg->GetOutputItemSet();
|
|
|
|
}
|
|
|
|
}
|
2005-03-11 09:50:12 +00:00
|
|
|
if(pOutSet)
|
|
|
|
{
|
|
|
|
rReq.Done(*pOutSet);
|
|
|
|
bDone = true;
|
|
|
|
}
|
2000-09-18 16:15:01 +00:00
|
|
|
delete pDlg;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case FN_FORMAT_BACKGROUND_DLG:
|
|
|
|
{
|
|
|
|
SfxItemSet aSet( rSh.GetAttrPool(),
|
|
|
|
RES_BACKGROUND, RES_BACKGROUND );
|
|
|
|
|
2009-05-06 10:59:57 +00:00
|
|
|
SfxAbstractDialog * pDlg = 0;
|
2007-09-27 11:26:21 +00:00
|
|
|
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
|
2010-10-24 23:48:32 +02:00
|
|
|
OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
|
2004-05-10 15:34:49 +00:00
|
|
|
|
2000-09-18 16:15:01 +00:00
|
|
|
|
|
|
|
// Tabellenzelle(n) selektiert?
|
|
|
|
if ( rSh.IsTableMode() )
|
|
|
|
{
|
|
|
|
//Hintergrundattribute der Tabelle holen und in den Set packen
|
|
|
|
SvxBrushItem aBrush(RES_BACKGROUND);
|
|
|
|
rSh.GetBoxBackground( aBrush );
|
2009-05-06 10:59:57 +00:00
|
|
|
pDlg = pFact->CreateSfxDialog( pMDI, aSet,
|
2009-12-15 23:07:57 +01:00
|
|
|
rView.GetViewFrame()->GetFrame().GetFrameInterface(),
|
2009-05-06 10:59:57 +00:00
|
|
|
RC_SWDLG_BACKGROUND );
|
2010-10-24 23:48:32 +02:00
|
|
|
OSL_ENSURE(pDlg, "Dialogdiet fail!");
|
2000-09-18 16:15:01 +00:00
|
|
|
aSet.Put( aBrush );
|
|
|
|
if ( pDlg->Execute() == RET_OK )
|
|
|
|
{
|
|
|
|
|
|
|
|
rSh.SetBoxBackground( (SvxBrushItem&)
|
|
|
|
pDlg->GetOutputItemSet()->Get( RES_BACKGROUND ));
|
|
|
|
pOutSet = pDlg->GetOutputItemSet();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if ( rSh.IsFrmSelected() )
|
|
|
|
{
|
|
|
|
|
|
|
|
rSh.GetFlyFrmAttr( aSet );
|
|
|
|
|
2009-05-06 10:59:57 +00:00
|
|
|
pDlg = pFact->CreateSfxDialog( pMDI, aSet,
|
2009-12-15 23:07:57 +01:00
|
|
|
rView.GetViewFrame()->GetFrame().GetFrameInterface(),
|
2009-05-06 10:59:57 +00:00
|
|
|
RC_SWDLG_BACKGROUND );
|
2010-10-24 23:48:32 +02:00
|
|
|
OSL_ENSURE(pDlg, "Dialogdiet fail!");
|
2000-09-18 16:15:01 +00:00
|
|
|
if ( pDlg->Execute() == RET_OK )
|
|
|
|
{
|
|
|
|
rSh.SetFlyFrmAttr((SfxItemSet &) *pDlg->GetOutputItemSet() );
|
|
|
|
pOutSet = pDlg->GetOutputItemSet();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
// Umrandungsattribute ganz normal ueber Shell setzen
|
2008-03-05 16:25:11 +00:00
|
|
|
rSh.GetCurAttr( aSet );
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2009-05-06 10:59:57 +00:00
|
|
|
pDlg = pFact->CreateSfxDialog( pMDI, aSet,
|
2009-12-15 23:07:57 +01:00
|
|
|
rView.GetViewFrame()->GetFrame().GetFrameInterface(),
|
2009-05-06 10:59:57 +00:00
|
|
|
RC_SWDLG_BACKGROUND );
|
2010-10-24 23:48:32 +02:00
|
|
|
OSL_ENSURE(pDlg, "Dialogdiet fail!");
|
2000-09-18 16:15:01 +00:00
|
|
|
if ( pDlg->Execute() == RET_OK )
|
|
|
|
{
|
|
|
|
rSh.SetAttr( *pDlg->GetOutputItemSet() );
|
|
|
|
pOutSet = pDlg->GetOutputItemSet();
|
|
|
|
}
|
|
|
|
}
|
2005-03-11 09:50:12 +00:00
|
|
|
if(pOutSet)
|
|
|
|
{
|
|
|
|
rReq.Done(*pOutSet);
|
|
|
|
bDone = true;
|
|
|
|
}
|
2000-09-18 16:15:01 +00:00
|
|
|
delete pDlg;
|
|
|
|
|
|
|
|
}
|
|
|
|
break;
|
2011-03-12 11:53:13 +01:00
|
|
|
default:OSL_FAIL("wrong Dispatcher (basesh.cxx)");
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
2005-03-11 09:50:12 +00:00
|
|
|
if(!bDone)
|
2002-05-27 12:02:32 +00:00
|
|
|
rReq.Done();
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
SwWrtShell& SwBaseShell::GetShell()
|
|
|
|
{
|
|
|
|
return rView.GetWrtShell();
|
|
|
|
}
|
|
|
|
|
|
|
|
SwWrtShell* SwBaseShell::GetShellPtr()
|
|
|
|
{
|
|
|
|
return rView.GetWrtShellPtr();
|
|
|
|
}
|
|
|
|
|
2004-06-01 07:05:01 +00:00
|
|
|
void SwBaseShell::InsertTable( SfxRequest& _rRequest )
|
|
|
|
{
|
|
|
|
const SfxItemSet* pArgs = _rRequest.GetArgs();
|
|
|
|
SwWrtShell& rSh = GetShell();
|
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
if ( !( rSh.GetFrmType( 0, sal_True ) & FRMTYPE_FOOTNOTE ) )
|
2004-06-01 07:05:01 +00:00
|
|
|
{
|
2007-09-27 11:26:21 +00:00
|
|
|
SwView &rTempView = GetView(); // Da GetView() nach Shellwechsel nicht mehr geht
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_Bool bHTMLMode = 0 != (::GetHtmlMode(rTempView.GetDocShell())&HTMLMODE_ON);
|
2013-02-13 00:02:30 +09:00
|
|
|
bool bCallEndUndo = false;
|
2004-06-01 07:05:01 +00:00
|
|
|
|
|
|
|
if( !pArgs && rSh.IsSelection() && !rSh.IsInClickToEdit() &&
|
|
|
|
!rSh.IsTableMode() )
|
|
|
|
{
|
|
|
|
const SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig();
|
|
|
|
SwInsertTableOptions aInsTblOpts = pModOpt->GetInsTblFlags(bHTMLMode);
|
|
|
|
|
|
|
|
rSh.StartUndo(UNDO_INSTABLE);
|
2013-02-13 00:02:30 +09:00
|
|
|
bCallEndUndo = true;
|
2004-06-01 07:05:01 +00:00
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_Bool bInserted = rSh.TextToTable( aInsTblOpts, '\t', text::HoriOrientation::FULL );
|
2004-06-01 07:05:01 +00:00
|
|
|
rSh.EnterStdMode();
|
|
|
|
if (bInserted)
|
2007-09-27 11:26:21 +00:00
|
|
|
rTempView.AutoCaption(TABLE_CAP);
|
2004-06-01 07:05:01 +00:00
|
|
|
_rRequest.Done();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt16 nCols = 0;
|
|
|
|
sal_uInt16 nRows = 0;
|
2004-06-01 07:05:01 +00:00
|
|
|
SwInsertTableOptions aInsTblOpts( tabopts::ALL_TBL_INS_ATTR, 1 );
|
|
|
|
String aTableName, aAutoName;
|
|
|
|
SwTableAutoFmt* pTAFmt = 0;
|
|
|
|
|
|
|
|
if( pArgs && pArgs->Count() >= 2 )
|
|
|
|
{
|
|
|
|
SFX_REQUEST_ARG( _rRequest, pName, SfxStringItem, FN_INSERT_TABLE, sal_False );
|
|
|
|
SFX_REQUEST_ARG( _rRequest, pCols, SfxUInt16Item, SID_ATTR_TABLE_COLUMN, sal_False );
|
|
|
|
SFX_REQUEST_ARG( _rRequest, pRows, SfxUInt16Item, SID_ATTR_TABLE_ROW, sal_False );
|
|
|
|
SFX_REQUEST_ARG( _rRequest, pFlags, SfxInt32Item, FN_PARAM_1, sal_False );
|
|
|
|
SFX_REQUEST_ARG( _rRequest, pAuto, SfxStringItem, FN_PARAM_2, sal_False );
|
|
|
|
|
|
|
|
if ( pName )
|
|
|
|
aTableName = pName->GetValue();
|
|
|
|
if ( pCols )
|
|
|
|
nCols = pCols->GetValue();
|
|
|
|
if ( pRows )
|
|
|
|
nRows = pRows->GetValue();
|
|
|
|
if ( pAuto )
|
|
|
|
{
|
|
|
|
aAutoName = pAuto->GetValue();
|
|
|
|
if ( aAutoName.Len() )
|
|
|
|
{
|
|
|
|
SwTableAutoFmtTbl aTableTbl;
|
|
|
|
aTableTbl.Load();
|
2012-05-09 14:24:47 +02:00
|
|
|
for ( sal_uInt16 n=0; n<aTableTbl.size(); n++ )
|
2004-06-01 07:05:01 +00:00
|
|
|
{
|
2012-05-09 14:24:47 +02:00
|
|
|
if ( aTableTbl[n].GetName() == aAutoName )
|
2004-06-01 07:05:01 +00:00
|
|
|
{
|
2012-05-09 14:24:47 +02:00
|
|
|
pTAFmt = new SwTableAutoFmt( aTableTbl[n] );
|
2004-06-01 07:05:01 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( pFlags )
|
2011-01-17 15:06:54 +01:00
|
|
|
aInsTblOpts.mnInsMode = (sal_uInt16) pFlags->GetValue();
|
2004-06-01 07:05:01 +00:00
|
|
|
else
|
|
|
|
{
|
|
|
|
const SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig();
|
|
|
|
aInsTblOpts = pModOpt->GetInsTblFlags(bHTMLMode);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if( !nCols || !nRows )
|
|
|
|
{
|
|
|
|
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
|
2010-10-24 23:48:32 +02:00
|
|
|
OSL_ENSURE(pFact, "Dialogdiet fail!");
|
2012-09-04 16:49:42 +01:00
|
|
|
AbstractInsTableDlg* pDlg = pFact->CreateInsTableDlg(rTempView);
|
2010-10-24 23:48:32 +02:00
|
|
|
OSL_ENSURE(pDlg, "Dialogdiet fail!");
|
2004-06-01 07:05:01 +00:00
|
|
|
if( RET_OK == pDlg->Execute() )
|
|
|
|
{
|
|
|
|
pDlg->GetValues( aTableName, nRows, nCols, aInsTblOpts, aAutoName, pTAFmt );
|
|
|
|
}
|
|
|
|
else
|
|
|
|
_rRequest.Ignore();
|
|
|
|
delete pDlg;
|
|
|
|
}
|
|
|
|
|
|
|
|
if( nCols && nRows )
|
|
|
|
{
|
|
|
|
// record before shell change
|
|
|
|
_rRequest.AppendItem( SfxStringItem( FN_INSERT_TABLE, aTableName ) );
|
|
|
|
if ( aAutoName.Len() )
|
|
|
|
_rRequest.AppendItem( SfxStringItem( FN_PARAM_2, aAutoName ) );
|
|
|
|
_rRequest.AppendItem( SfxUInt16Item( SID_ATTR_TABLE_COLUMN, nCols ) );
|
|
|
|
_rRequest.AppendItem( SfxUInt16Item( SID_ATTR_TABLE_ROW, nRows ) );
|
|
|
|
_rRequest.AppendItem( SfxInt32Item( FN_PARAM_1, (sal_Int32) aInsTblOpts.mnInsMode ) );
|
|
|
|
_rRequest.Done();
|
|
|
|
|
|
|
|
rSh.StartUndo(UNDO_INSTABLE);
|
2013-02-13 00:02:30 +09:00
|
|
|
bCallEndUndo = true;
|
2004-06-01 07:05:01 +00:00
|
|
|
|
|
|
|
rSh.StartAllAction();
|
|
|
|
if( rSh.HasSelection() )
|
|
|
|
rSh.DelRight();
|
|
|
|
|
2007-09-27 11:26:21 +00:00
|
|
|
rSh.InsertTable( aInsTblOpts, nRows, nCols, text::HoriOrientation::FULL, pTAFmt );
|
2004-06-01 07:05:01 +00:00
|
|
|
rSh.MoveTable( fnTablePrev, fnTableStart );
|
|
|
|
|
|
|
|
if( aTableName.Len() && !rSh.GetTblStyle( aTableName ) )
|
|
|
|
rSh.GetTableFmt()->SetName( aTableName );
|
|
|
|
|
|
|
|
rSh.EndAllAction();
|
2007-09-27 11:26:21 +00:00
|
|
|
rTempView.AutoCaption(TABLE_CAP);
|
2004-06-01 07:05:01 +00:00
|
|
|
}
|
|
|
|
delete pTAFmt;
|
|
|
|
}
|
|
|
|
|
|
|
|
if( bCallEndUndo )
|
2004-09-08 14:04:12 +00:00
|
|
|
{
|
|
|
|
SwRewriter aRewriter;
|
|
|
|
|
|
|
|
if (rSh.GetTableFmt())
|
|
|
|
{
|
2012-04-02 09:34:41 +01:00
|
|
|
aRewriter.AddRule(UndoArg1, SW_RESSTR(STR_START_QUOTE));
|
|
|
|
aRewriter.AddRule(UndoArg2, rSh.GetTableFmt()->GetName());
|
|
|
|
aRewriter.AddRule(UndoArg3, SW_RESSTR(STR_END_QUOTE));
|
2004-09-08 14:04:12 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
rSh.EndUndo(UNDO_INSTABLE, &aRewriter); // wegen moegl. Shellwechsel
|
|
|
|
}
|
2004-06-01 07:05:01 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2000-09-18 16:15:01 +00:00
|
|
|
void SwBaseShell::GetGalleryState( SfxItemSet &rSet )
|
|
|
|
{
|
|
|
|
SwWrtShell &rSh = GetShell();
|
|
|
|
SfxWhichIter aIter( rSet );
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt16 nWhich = aIter.FirstWhich();
|
2000-09-18 16:15:01 +00:00
|
|
|
switch ( nWhich )
|
|
|
|
{
|
|
|
|
case SID_GALLERY_BG_BRUSH:
|
|
|
|
{
|
|
|
|
int nSel = rSh.GetSelectionType();
|
|
|
|
SfxStringListItem aLst( nWhich );
|
2011-05-21 18:47:21 -04:30
|
|
|
std::vector<String> &rLst = aLst.GetList();
|
2000-09-18 16:15:01 +00:00
|
|
|
nParagraphPos = nGraphicPos = nOlePos = nFramePos = nTablePos =
|
|
|
|
nTableRowPos = nTableCellPos = nPagePos =
|
|
|
|
nHeaderPos = nFooterPos = 0;
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt8 nPos = 1;
|
2011-05-21 18:47:21 -04:30
|
|
|
rLst.push_back( SW_RESSTR( STR_SWBG_PAGE ) );
|
2000-09-18 16:15:01 +00:00
|
|
|
nPagePos = nPos++;
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt16 nHtmlMode = ::GetHtmlMode(GetView().GetDocShell());
|
2013-02-13 00:02:30 +09:00
|
|
|
bool bHtmlMode = 0 != (nHtmlMode & HTMLMODE_ON);
|
2000-09-18 16:15:01 +00:00
|
|
|
|
|
|
|
if ( (!bHtmlMode || (nHtmlMode & HTMLMODE_FULL_STYLES)) &&
|
2007-09-27 11:26:21 +00:00
|
|
|
(nSel & nsSelectionType::SEL_TXT) )
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2011-05-21 18:47:21 -04:30
|
|
|
rLst.push_back( SW_RESSTR( STR_SWBG_PARAGRAPH ) );
|
2000-09-18 16:15:01 +00:00
|
|
|
nParagraphPos = nPos++;
|
|
|
|
}
|
|
|
|
if ( (!bHtmlMode || (nHtmlMode & HTMLMODE_SOME_STYLES)) &&
|
2007-09-27 11:26:21 +00:00
|
|
|
nSel & (nsSelectionType::SEL_TBL|nsSelectionType::SEL_TBL_CELLS) )
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2011-05-21 18:47:21 -04:30
|
|
|
rLst.push_back( SW_RESSTR( STR_SWBG_TABLE ) );
|
2000-09-18 16:15:01 +00:00
|
|
|
nTablePos = nPos++;
|
|
|
|
|
|
|
|
if(!bHtmlMode)
|
|
|
|
{
|
2011-05-21 18:47:21 -04:30
|
|
|
rLst.push_back( SW_RESSTR( STR_SWBG_TABLE_ROW ) );
|
2000-09-18 16:15:01 +00:00
|
|
|
nTableRowPos = nPos++;
|
|
|
|
}
|
|
|
|
|
2011-05-21 18:47:21 -04:30
|
|
|
rLst.push_back( SW_RESSTR( STR_SWBG_TABLE_CELL) );
|
2000-09-18 16:15:01 +00:00
|
|
|
nTableCellPos = nPos++;
|
|
|
|
}
|
|
|
|
if(!bHtmlMode)
|
|
|
|
{
|
2007-09-27 11:26:21 +00:00
|
|
|
if ( nSel & nsSelectionType::SEL_FRM )
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2011-05-21 18:47:21 -04:30
|
|
|
rLst.push_back( SW_RESSTR( STR_SWBG_FRAME ) );
|
2000-09-18 16:15:01 +00:00
|
|
|
nFramePos = nPos++;
|
|
|
|
}
|
2007-09-27 11:26:21 +00:00
|
|
|
if ( nSel & nsSelectionType::SEL_GRF )
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2011-05-21 18:47:21 -04:30
|
|
|
rLst.push_back( SW_RESSTR( STR_SWBG_GRAPHIC ) );
|
2000-09-18 16:15:01 +00:00
|
|
|
nGraphicPos = nPos++;
|
|
|
|
}
|
2007-09-27 11:26:21 +00:00
|
|
|
if ( nSel & nsSelectionType::SEL_OLE )
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2011-05-21 18:47:21 -04:30
|
|
|
rLst.push_back( SW_RESSTR( STR_SWBG_OLE ) );
|
2000-09-18 16:15:01 +00:00
|
|
|
nOlePos = nPos++;
|
|
|
|
}
|
2011-01-17 15:06:54 +01:00
|
|
|
const sal_uInt16 nType = rSh.GetFrmType(0,sal_True);
|
2000-09-18 16:15:01 +00:00
|
|
|
if ( nType & FRMTYPE_HEADER )
|
|
|
|
{
|
2011-05-21 18:47:21 -04:30
|
|
|
rLst.push_back( SW_RESSTR( STR_SWBG_HEADER ) );
|
2000-09-18 16:15:01 +00:00
|
|
|
nHeaderPos = nPos++;
|
|
|
|
}
|
|
|
|
if ( nType & FRMTYPE_FOOTER )
|
|
|
|
{
|
2011-05-21 18:47:21 -04:30
|
|
|
rLst.push_back( SW_RESSTR( STR_SWBG_FOOTER ) );
|
2000-09-18 16:15:01 +00:00
|
|
|
nFooterPos = nPos;
|
|
|
|
}
|
|
|
|
}
|
2011-05-21 18:47:21 -04:30
|
|
|
if ( rLst.empty() )
|
2000-09-18 16:15:01 +00:00
|
|
|
rSet.DisableItem( nWhich );
|
2011-05-21 18:47:21 -04:30
|
|
|
else
|
|
|
|
rSet.Put( aLst );
|
2000-09-18 16:15:01 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void SwBaseShell::ExecuteGallery(SfxRequest &rReq)
|
|
|
|
{
|
|
|
|
SwWrtShell &rSh = GetShell();
|
|
|
|
rSh.StartAction();
|
|
|
|
const SfxItemSet* pArgs = rReq.GetArgs();
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt16 nSlot = rReq.GetSlot();
|
2000-09-18 16:15:01 +00:00
|
|
|
switch(nSlot)
|
|
|
|
{
|
|
|
|
case SID_GALLERY_BG_BRUSH:
|
|
|
|
{
|
|
|
|
int nSel = rSh.GetSelectionType();
|
2007-09-27 11:26:21 +00:00
|
|
|
if ( nSel & nsSelectionType::SEL_DRW_TXT )
|
2000-09-18 16:15:01 +00:00
|
|
|
break;
|
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt8 nPos = (sal_uInt8)((SfxUInt16Item &)pArgs->Get(SID_GALLERY_BG_POS)).GetValue();
|
2000-09-18 16:15:01 +00:00
|
|
|
++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 )
|
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt16 nDesc = rSh.GetCurPageDesc();
|
2000-09-18 16:15:01 +00:00
|
|
|
SwPageDesc aDesc( rSh.GetPageDesc( nDesc ) );
|
|
|
|
if ( nPos == nPagePos )
|
2008-06-13 10:17:37 +00:00
|
|
|
aDesc.GetMaster().SetFmtAttr( aBrush );
|
2000-09-18 16:15:01 +00:00
|
|
|
else if ( nPos == nHeaderPos )
|
|
|
|
{
|
|
|
|
SwFmtHeader aHead( aDesc.GetMaster().GetHeader() );
|
2008-06-13 10:17:37 +00:00
|
|
|
aHead.GetHeaderFmt()->SetFmtAttr( aBrush );
|
|
|
|
aDesc.GetMaster().SetFmtAttr( aHead );
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
else if ( nPos == nFooterPos )
|
|
|
|
{
|
|
|
|
SwFmtFooter aFoot( aDesc.GetMaster().GetFooter() );
|
2008-06-13 10:17:37 +00:00
|
|
|
aFoot.GetFooterFmt()->SetFmtAttr( aBrush );
|
|
|
|
aDesc.GetMaster().SetFmtAttr( aFoot );
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
rSh.ChgPageDesc( nDesc, aDesc );
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
rSh.EndAction();
|
2002-07-19 10:16:36 +00:00
|
|
|
rReq.Done();
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void SwBaseShell::ExecField( SfxRequest& rReq )
|
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt16 nSlot = rReq.GetSlot();
|
2000-09-18 16:15:01 +00:00
|
|
|
switch( nSlot )
|
|
|
|
{
|
|
|
|
case FN_CHANGE_DBFIELD:
|
|
|
|
{
|
2007-09-27 11:26:21 +00:00
|
|
|
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
|
2010-10-24 23:48:32 +02:00
|
|
|
OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
|
2004-05-10 15:34:49 +00:00
|
|
|
|
2013-01-09 16:06:30 +00:00
|
|
|
VclAbstractDialog* pDlg = pFact->CreateSwChangeDBDlg(GetView());
|
2010-10-24 23:48:32 +02:00
|
|
|
OSL_ENSURE(pDlg, "Dialogdiet fail!");
|
2000-09-18 16:15:01 +00:00
|
|
|
pDlg->Execute();
|
|
|
|
delete pDlg;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
default:
|
2011-03-12 11:51:35 +01:00
|
|
|
OSL_FAIL("wrong dispatcher");
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
}
|
2010-10-14 08:30:41 +02:00
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|