Files
libreoffice/sw/source/uibase/wrtsh/select.cxx

979 lines
25 KiB
C++
Raw Normal View History

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
re-base on ALv2 code. Includes: Patches contributed by Oliver-Rainer Wittmann sw34bf06: #i117783# - Writer's implementation of XPagePrintable - apply print settings to new printing routines http://svn.apache.org/viewvc?view=revision&revision=1172115 sw34bf06: #o12311627# use <rtl_random> methods to create unique ids for list styles and list ids http://svn.apache.org/viewvc?view=revision&revision=1172112 sw34bf06 #i114725#,#i115828# - method <SwDoc::ClearDoc()> - clear list structures completely http://svn.apache.org/viewvc?view=revision&revision=1172122 i#118572 - remove ui string and help content regarding usage of Java Mail in Writer's Mail Merge as Java Mail is not used. http://svn.apache.org/viewvc?view=revision&revision=1197035 Patches contributed by Mathias Bauer cws mba34issues01: #i117718#: provide filter name in case storage of medium does not allow to detect one http://svn.apache.org/viewvc?view=revision&revision=1172350 cws mba34issues01: #i117721#: directly provide parameters retrieved from SfxMedium http://svn.apache.org/viewvc?view=revision&revision=1172353 gnumake4 work variously http://svn.apache.org/viewvc?view=revision&revision=1394707 http://svn.apache.org/viewvc?view=revision&revision=1394326 http://svn.apache.org/viewvc?view=revision&revision=1396797 http://svn.apache.org/viewvc?view=revision&revision=1397315 cws mba34issues01: #i117723#: convert assertion into trace http://svn.apache.org/viewvc?view=revision&revision=1172355 cws mba34issues01: #i117699#: keep layout alive until swdoc dies http://svn.apache.org/viewvc?view=revision&revision=1172362 cws mba34issues01: #i117943#: missing color attributes in RTF clipboard http://svn.apache.org/viewvc?view=revision&revision=1172363 Patch contributed by Henning Brinkmann imported patch i#103878 http://svn.apache.org/viewvc?view=revision&revision=1172109 Patches contributed by Michael Stahl sw34bf06: #i117955#: WW8 export: disable storing of section breaks in endnotes http://svn.apache.org/viewvc?view=revision&revision=1172119 Patch contributed by imacat Fixed the Asian language work count. http://svn.apache.org/viewvc?view=revision&revision=1241345 Patch contributed by Pedro Giffuni i#20878 - Add comment with BZ issue for reference. http://svn.apache.org/viewvc?view=revision&revision=1244517 Patch contributed by Andre Fischer Do not add targets for junit tests when junit is disabled. http://svn.apache.org/viewvc?view=revision&revision=1241508 add writerperfect dependency.
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 .
*/
2000-09-18 16:15:01 +00:00
#include <limits.h>
#include <hintids.hxx>
#include <sfx2/bindings.hxx>
#include <svl/eitem.hxx>
#include <svl/macitem.hxx>
#include <unotools/charclass.hxx>
#include <editeng/scripttypeitem.hxx>
2000-09-18 16:15:01 +00:00
#include <cmdid.h>
#include <view.hxx>
#include <basesh.hxx>
#include <wrtsh.hxx>
#include <frmatr.hxx>
#include <initui.hxx>
#include <mdiexp.hxx>
#include <fmtcol.hxx>
#include <frmfmt.hxx>
#include <swundo.hxx>
2000-09-18 16:15:01 +00:00
#include <swevent.hxx>
#include <swdtflvr.hxx>
#include <crsskip.hxx>
#include <doc.hxx>
#include <wordcountdialog.hxx>
#include <boost/scoped_ptr.hpp>
2000-09-18 16:15:01 +00:00
namespace com { namespace sun { namespace star { namespace util {
struct SearchOptions;
} } } }
using namespace ::com::sun::star::util;
2000-09-18 16:15:01 +00:00
static long nStartDragX = 0, nStartDragY = 0;
static bool bStartDrag = false;
2000-09-18 16:15:01 +00:00
void SwWrtShell::Invalidate()
{
Many spelling fixes: directories r* - z*. Attempt to clean up most but certainly not all the spelling mistakes that found home in OpenOffice through decades. We could probably blame the international nature of the code but it is somewhat shameful that this wasn't done before. (cherry picked from commit 28206a7cb43aff5adb10f8235ad1680c3941ee3e) Conflicts: include/osl/file.hxx include/osl/pipe_decl.hxx include/osl/socket.h include/osl/socket_decl.hxx include/sal/main.h include/svx/dbaexchange.hxx include/svx/dlgctrl.hxx include/svx/msdffdef.hxx include/svx/sdr/contact/objectcontactofpageview.hxx include/svx/svdpntv.hxx include/ucbhelper/content.hxx include/ucbhelper/interceptedinteraction.hxx include/ucbhelper/resultsethelper.hxx include/unotools/sharedunocomponent.hxx include/unotools/viewoptions.hxx include/vcl/pdfwriter.hxx include/xmloff/txtparae.hxx include/xmloff/uniref.hxx rhino/rhino1_7R3.patch rsc/inc/rscrsc.hxx sal/inc/osl/conditn.h sal/inc/osl/security.h sal/inc/osl/semaphor.h sal/inc/osl/semaphor.hxx sal/inc/rtl/string.hxx sal/inc/rtl/tres.h sal/inc/systools/win32/StrConvert.h sal/osl/os2/file_path_helper.h sal/osl/os2/file_path_helper.hxx sal/osl/os2/file_url.cxx sal/osl/os2/file_url.h sal/osl/os2/makefile.mk sal/osl/os2/pipe.cxx sal/osl/os2/process.c sal/osl/os2/profile.c sal/osl/os2/socket.c sal/osl/os2/system.h sal/osl/unx/asm/interlck_sparc.s sal/osl/unx/file_url.cxx sal/osl/unx/signal.c sal/osl/unx/system.h sal/osl/w32/MAKEFILE.MK sal/osl/w32/interlck.c sal/osl/w32/module.cxx sal/osl/w32/security.c sal/qa/buildall.pl sal/qa/osl/file/osl_File.cxx sal/qa/osl/module/osl_Module_Const.h sal/qa/osl/mutex/osl_Mutex.cxx sal/qa/osl/pipe/osl_Pipe.cxx sal/qa/osl/process/osl_Thread.cxx sal/qa/osl/socket/osl_StreamSocket.cxx sal/qa/osl/socket/sockethelper.cxx sal/qa/rtl_strings/rtl_OUString.cxx sal/rtl/source/unload.cxx sal/systools/win32/kill/kill.cxx sal/systools/win32/uwinapi/MoveFileExA.cpp sal/test/bootstrap.pl sal/typesconfig/typesconfig.c sal/workben/tgetpwnam.cxx sax/inc/sax/parser/saxparser.hxx sc/addin/datefunc/dfa.cl sc/addin/datefunc/dfa.src sc/addin/rot13/rot13.cl sc/addin/rot13/rot13.src sc/inc/attarray.hxx sc/inc/chgtrack.hxx sc/inc/column.hxx sc/inc/compressedarray.hxx sc/inc/document.hxx sc/inc/table.hxx sc/source/core/data/column.cxx sc/source/core/data/dptablecache.cxx sc/source/core/data/dptabres.cxx sc/source/core/data/dptabsrc.cxx sc/source/core/data/global.cxx sc/source/core/tool/chgtrack.cxx sc/source/core/tool/compiler.cxx sc/source/filter/excel/xestyle.cxx sc/source/filter/excel/xichart.cxx sc/source/filter/inc/fapihelper.hxx sc/source/filter/inc/xistyle.hxx sc/source/filter/xml/xmlsubti.cxx sc/source/ui/Accessibility/AccessibleCell.cxx sc/source/ui/Accessibility/AccessibleContextBase.cxx sc/source/ui/Accessibility/AccessibleDataPilotControl.cxx sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx sc/source/ui/Accessibility/AccessibleEditObject.cxx sc/source/ui/Accessibility/AccessiblePreviewCell.cxx sc/source/ui/app/inputwin.cxx sc/source/ui/docshell/docfunc.cxx sc/source/ui/drawfunc/fupoor.cxx sc/source/ui/miscdlgs/linkarea.cxx sc/source/ui/unoobj/chart2uno.cxx sc/source/ui/unoobj/nameuno.cxx sc/source/ui/vba/vbacharacters.hxx sc/source/ui/vba/vbarange.cxx sc/source/ui/vba/vbawindow.cxx scaddins/source/analysis/analysishelper.cxx scaddins/source/analysis/analysishelper.hxx scaddins/source/datefunc/datefunc.cxx scripting/examples/python/Capitalise.py scripting/source/pyprov/officehelper.py sd/source/filter/eppt/eppt.cxx sd/source/filter/eppt/epptso.cxx sd/source/ui/dlg/prltempl.cxx sd/source/ui/dlg/tpoption.cxx sd/source/ui/func/fuediglu.cxx sd/source/ui/func/fupoor.cxx sd/source/ui/func/fusel.cxx sd/source/ui/func/smarttag.cxx sd/source/ui/inc/OutlinerIteratorImpl.hxx sd/source/ui/inc/SlideViewShell.hxx sd/source/ui/inc/fuediglu.hxx sd/source/ui/inc/fusel.hxx sd/source/ui/slideshow/slideshowimpl.cxx sd/source/ui/slidesorter/cache/SlsQueueProcessorThread.hxx sd/source/ui/slidesorter/controller/SlsHideSlideFunction.cxx sd/source/ui/slidesorter/controller/SlsSelectionCommand.hxx sd/source/ui/slidesorter/inc/controller/SlsAnimationFunction.hxx sd/source/ui/slidesorter/view/SlsButtonBar.cxx sd/source/ui/view/Outliner.cxx sd/source/ui/view/drviewsh.cxx sd/source/ui/view/frmview.cxx sdext/source/presenter/PresenterFrameworkObserver.hxx sdext/source/presenter/PresenterSlideShowView.cxx setup_native/scripts/deregister_extensions setup_native/scripts/register_extensions setup_native/source/opensolaris/bundledextensions/README setup_native/source/opensolaris/bundledextensions/svc-ooo_bundled_extensions setup_native/source/win32/customactions/patch/swappatchfiles.cxx setup_native/source/win32/customactions/reg4msdoc/registrar.cxx setup_native/source/win32/customactions/reg4msdoc/userregistrar.cxx sfx2/inc/sfx2/sfxbasemodel.hxx sfx2/qa/complex/sfx2/DocumentProperties.java sfx2/source/appl/appopen.cxx sfx2/source/appl/appquit.cxx sfx2/source/appl/appserv.cxx sfx2/source/bastyp/sfxhtml.cxx sfx2/source/dialog/dockwin.cxx sfx2/source/doc/docfile.cxx sfx2/source/doc/docvor.cxx sfx2/source/doc/graphhelp.cxx sfx2/source/doc/objcont.cxx sfx2/source/doc/objserv.cxx sfx2/source/doc/objstor.cxx sfx2/source/doc/objuno.cxx sfx2/source/doc/objxtor.cxx sfx2/source/doc/printhelper.cxx sfx2/source/doc/sfxbasemodel.cxx sfx2/source/notify/eventsupplier.cxx sfx2/source/view/frmload.cxx sfx2/source/view/sfxbasecontroller.cxx shell/qa/zip/ziptest.cxx shell/source/backends/wininetbe/wininetbackend.cxx shell/source/win32/shlxthandler/util/utilities.cxx solenv/bin/build.pl solenv/bin/build_release.pl solenv/bin/cws.pl solenv/bin/download_external_dependencies.pl solenv/bin/make_download.pl solenv/bin/make_installer.pl solenv/bin/modules/Cws.pm solenv/bin/modules/ExtensionsLst.pm solenv/bin/modules/installer/control.pm solenv/bin/modules/installer/downloadsigner.pm solenv/bin/modules/installer/javainstaller.pm solenv/bin/modules/installer/packagepool.pm solenv/bin/modules/installer/patch/InstallationSet.pm solenv/bin/modules/installer/scriptitems.pm solenv/bin/modules/installer/windows/feature.pm solenv/bin/modules/installer/windows/msiglobal.pm solenv/bin/modules/installer/windows/sign.pm solenv/bin/modules/installer/worker.pm solenv/bin/modules/installer/xpdinstaller.pm solenv/bin/modules/osarch.pm solenv/bin/modules/packager/work.pm solenv/bin/modules/pre2par/parameter.pm solenv/bin/patch_tool.pl solenv/bin/transform_description.pl solenv/doc/gbuild/doxygen.cfg solenv/gbuild/LinkTarget.mk solenv/gbuild/gbuild.mk solenv/inc/os2gcci.mk solenv/inc/settings.mk solenv/inc/startup/Readme solenv/inc/target.mk solenv/inc/tg_compv.mk solenv/inc/tg_javav.mk solenv/inc/unitools.mk solenv/inc/unxbsdi.mk solenv/inc/unxbsdi2.mk solenv/inc/unxbsds.mk solenv/inc/unxfbsd.mk solenv/inc/unxlng.mk sot/source/sdstor/stg.cxx sot/source/sdstor/stgelem.cxx sot/source/sdstor/ucbstorage.cxx starmath/inc/toolbox.hxx starmath/source/mathmlexport.cxx starmath/source/node.cxx starmath/source/toolbox.cxx starmath/source/view.cxx stoc/source/bootstrap/bootstrap.xml stoc/source/corereflection/criface.cxx stoc/source/invocation/invocation.cxx stoc/source/security/access_controller.cxx stoc/source/servicemanager/servicemanager.cxx stoc/source/tdmanager/tdmgr.cxx stoc/test/javavm/testjavavm.cxx stoc/test/testconv.cxx stoc/test/testcorefl.cxx stoc/test/testintrosp.cxx svl/inc/svl/inettype.hxx svl/inc/svl/urihelper.hxx svl/qa/complex/ConfigItems/helper/HistoryOptTest.cxx svl/qa/complex/ConfigItems/helper/HistoryOptTest.hxx svl/source/config/itemholder2.hxx svl/source/items/itemset.cxx svl/source/numbers/zforlist.cxx svl/source/numbers/zformat.cxx svl/source/numbers/zforscan.cxx svtools/bmpmaker/bmp.cxx svtools/inc/svtools/helpagentwindow.hxx svtools/inc/svtools/menuoptions.hxx svtools/inc/svtools/miscopt.hxx svtools/inc/svtools/optionsdrawinglayer.hxx svtools/inc/svtools/stringtransfer.hxx svtools/inc/svtools/svlbitm.hxx svtools/inc/svtools/svtdata.hxx svtools/inc/svtools/valueset.hxx svtools/source/brwbox/editbrowsebox.cxx svtools/source/config/itemholder2.hxx svtools/source/contnr/contentenumeration.hxx svx/inc/svx/fmsrcimp.hxx svx/inc/svx/svdobj.hxx svx/inc/svx/xtable.hxx svx/source/accessibility/DGColorNameLookUp.cxx svx/source/accessibility/svxrectctaccessiblecontext.cxx svx/source/dialog/pfiledlg.cxx svx/source/fmcomp/fmgridcl.cxx svx/source/fmcomp/fmgridif.cxx svx/source/fmcomp/gridctrl.cxx svx/source/form/filtnav.cxx svx/source/form/fmPropBrw.cxx svx/source/form/fmshimp.cxx svx/source/form/fmsrcimp.cxx svx/source/gallery2/galtheme.cxx svx/source/inc/docrecovery.hxx svx/source/sdr/event/eventhandler.cxx svx/source/svdraw/svdedtv2.cxx svx/source/svdraw/svdedxv.cxx svx/source/svdraw/svdhdl.cxx svx/source/svdraw/svdobj.cxx svx/source/svdraw/svdograf.cxx svx/source/svdraw/svdoole2.cxx svx/source/svdraw/svdotxtr.cxx svx/source/svdraw/svdundo.cxx svx/source/svdraw/svdxcgv.cxx svx/source/unodialogs/textconversiondlgs/chinese_translationdialog.cxx sw/inc/SwNumberTree.hxx sw/inc/ndnotxt.hxx sw/source/core/access/acccell.cxx sw/source/core/access/acccell.hxx sw/source/core/access/accframebase.cxx sw/source/core/access/accframebase.hxx sw/source/core/access/accmap.cxx sw/source/core/access/accpage.cxx sw/source/core/access/accpage.hxx sw/source/core/access/accpara.cxx sw/source/core/access/accpara.hxx sw/source/core/bastyp/swrect.cxx sw/source/core/crsr/findtxt.cxx sw/source/core/doc/docdde.cxx sw/source/core/doc/notxtfrm.cxx sw/source/core/docnode/section.cxx sw/source/core/draw/dcontact.cxx sw/source/core/edit/edlingu.cxx sw/source/core/inc/anchoredobjectposition.hxx sw/source/core/layout/paintfrm.cxx sw/source/core/layout/tabfrm.cxx sw/source/core/layout/trvlfrm.cxx sw/source/core/ole/ndole.cxx sw/source/core/text/atrstck.cxx sw/source/core/text/inftxt.cxx sw/source/core/text/itratr.cxx sw/source/core/text/itrform2.cxx sw/source/core/text/itrform2.hxx sw/source/core/text/porfld.cxx sw/source/core/text/txtfly.cxx sw/source/core/txtnode/thints.cxx sw/source/core/txtnode/txtedt.cxx sw/source/core/uibase/dochdl/swdtflvr.cxx sw/source/core/uibase/docvw/PostItMgr.cxx sw/source/core/uibase/docvw/SidebarWin.cxx sw/source/core/uibase/docvw/edtwin.cxx sw/source/core/uibase/envelp/labimg.cxx sw/source/core/uibase/uiview/pview.cxx sw/source/core/uibase/uno/unomailmerge.cxx sw/source/core/undo/unattr.cxx sw/source/core/undo/untbl.cxx sw/source/core/unocore/unochart.cxx sw/source/core/view/vdraw.cxx sw/source/core/view/vnew.cxx sw/source/filter/basflt/fltini.cxx sw/source/filter/html/wrthtml.cxx sw/source/filter/inc/wwstyles.hxx sw/source/filter/rtf/rtffly.cxx sw/source/filter/rtf/swparrtf.cxx sw/source/filter/ww8/docxattributeoutput.cxx sw/source/filter/ww8/dump/msvbasic.cxx sw/source/filter/ww8/dump/ww8scan.cxx sw/source/filter/ww8/dump/ww8scan.hxx sw/source/filter/ww8/dump/ww8struc.hxx sw/source/filter/ww8/wrtww8.cxx sw/source/filter/ww8/ww8graf.cxx sw/source/filter/ww8/ww8par.cxx sw/source/filter/ww8/ww8par2.cxx sw/source/filter/ww8/ww8par2.hxx sw/source/filter/ww8/ww8par3.cxx sw/source/filter/ww8/ww8par6.cxx sw/source/filter/ww8/ww8scan.cxx sw/source/filter/ww8/ww8scan.hxx sw/source/ui/dbui/dbinsdlg.cxx sw/source/ui/inc/tablemgr.hxx sw/source/ui/inc/uitool.hxx sw/source/ui/lingu/olmenu.cxx sw/source/ui/uiview/viewport.cxx sysui/desktop/productversion.mk sysui/desktop/slackware/makefile.mk testgraphical/source/CallExternals.pm testgraphical/source/fill_documents_loop.pl testgraphical/ui/java/ConvwatchGUIProject/src/IniFile.java toolkit/doc/layout/notes.txt toolkit/doc/layout/oldnotes.txt toolkit/source/awt/vclxtabcontrol.cxx toolkit/src2xml/source/srcparser.py toolkit/workben/layout/editor.cxx tools/inc/tools/simplerm.hxx tools/inc/tools/solar.h tools/source/communi/geninfo.cxx tools/source/fsys/dirent.cxx tools/source/fsys/filecopy.cxx tools/source/fsys/os2.cxx tools/source/inet/inetmime.cxx tools/source/rc/resmgr.cxx ucb/source/core/ucbcmds.cxx ucb/source/ucp/file/filglob.cxx ucb/source/ucp/odma/odma_content.cxx ucb/source/ucp/tdoc/ucptdoc.xml ucb/source/ucp/webdav/makefile.mk ucbhelper/inc/ucbhelper/simplecertificatevalidationrequest.hxx ucbhelper/source/client/content.cxx ucbhelper/source/client/interceptedinteraction.cxx udkapi/com/sun/star/beans/XPropertiesChangeListener.idl udkapi/com/sun/star/io/ObjectOutputStream.idl udkapi/com/sun/star/io/XMarkableStream.idl udkapi/com/sun/star/io/XTextOutputStream.idl udkapi/com/sun/star/reflection/CoreReflection.idl udkapi/com/sun/star/reflection/XTypeDescriptionEnumerationAccess.idl udkapi/com/sun/star/test/XSimpleTest.idl unodevtools/source/skeletonmaker/skeletoncommon.cxx unodevtools/source/skeletonmaker/skeletoncommon.hxx unotools/inc/unotools/cacheoptions.hxx unotools/inc/unotools/cmdoptions.hxx unotools/inc/unotools/dynamicmenuoptions.hxx unotools/inc/unotools/extendedsecurityoptions.hxx unotools/inc/unotools/fontoptions.hxx unotools/inc/unotools/historyoptions.hxx unotools/inc/unotools/idhelper.hxx unotools/inc/unotools/internaloptions.hxx unotools/inc/unotools/localisationoptions.hxx unotools/inc/unotools/moduleoptions.hxx unotools/inc/unotools/printwarningoptions.hxx unotools/inc/unotools/securityoptions.hxx unotools/inc/unotools/startoptions.hxx unotools/inc/unotools/workingsetoptions.hxx unotools/source/config/cmdoptions.cxx unotools/source/config/compatibility.cxx unotools/source/config/configitem.cxx unotools/source/config/configmgr.cxx unotools/source/config/dynamicmenuoptions.cxx unotools/source/config/fontcfg.cxx unotools/source/config/itemholder1.hxx unotools/source/config/moduleoptions.cxx unotools/source/config/pathoptions.cxx unotools/source/config/viewoptions.cxx unotools/source/misc/sharedunocomponent.cxx uui/source/fltdlg.cxx uui/source/iahndl-filter.cxx vbahelper/inc/vbahelper/collectionbase.hxx vbahelper/source/msforms/vbacontrol.cxx vbahelper/source/vbahelper/collectionbase.cxx vcl/aqua/source/gdi/atsfonts.cxx vcl/inc/aqua/salmathutils.hxx vcl/inc/graphite_cache.hxx vcl/inc/jobset.h vcl/inc/os2/salgdi.h vcl/inc/osx/saldata.hxx vcl/inc/salgdi.hxx vcl/inc/salwtype.hxx vcl/inc/unx/wmadaptor.hxx vcl/inc/vcl/print.hxx vcl/inc/vcl/strhelper.hxx vcl/os2/source/app/salinst.cxx vcl/os2/source/app/saltimer.cxx vcl/os2/source/gdi/salgdi2.cxx vcl/osx/salframeview.mm vcl/osx/salprn.cxx vcl/qa/cppunit/dndtest.cxx vcl/source/app/dbggui.cxx vcl/source/control/ilstbox.cxx vcl/source/gdi/cvtsvm.cxx vcl/source/gdi/gdimtf.cxx vcl/source/gdi/outdev4.cxx vcl/source/gdi/outdev6.cxx vcl/source/gdi/pdfwriter_impl.cxx vcl/source/gdi/pdfwriter_impl2.cxx vcl/source/gdi/print.cxx vcl/source/gdi/print2.cxx vcl/source/glyphs/gcach_layout.cxx vcl/source/glyphs/glyphcache.cxx vcl/source/glyphs/graphite_layout.cxx vcl/source/window/printdlg.cxx vcl/source/window/tabdlg.cxx vcl/source/window/window.cxx vcl/source/window/winproc.cxx vcl/unx/generic/app/saldisp.cxx vcl/unx/generic/dtrans/X11_selection.hxx vcl/unx/gtk/app/gtkdata.cxx vcl/win/source/gdi/salgdi2.cxx vcl/win/source/gdi/salgdi3.cxx vcl/win/source/window/salframe.cxx vos/inc/vos/pipe.hxx vos/inc/vos/process.hxx vos/inc/vos/signal.hxx vos/inc/vos/socket.hxx vos/inc/vos/thread.hxx vos/source/pipe.cxx vos/source/socket.cxx wizards/com/sun/star/wizards/agenda/AgendaTemplate.java wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.java wizards/com/sun/star/wizards/agenda/TopicsControl.java wizards/com/sun/star/wizards/web/FTPDialog.java wizards/com/sun/star/wizards/web/ImageListDialog.java wizards/com/sun/star/wizards/web/Process.java wizards/com/sun/star/wizards/web/ProcessStatusRenderer.java wizards/com/sun/star/wizards/web/TOCPreview.java wizards/com/sun/star/wizards/web/WWD_Startup.java wizards/com/sun/star/wizards/web/data/TypeDetection.java wizards/com/sun/star/wizards/web/export/ImpressHTMLExporter.java writerfilter/inc/doctok/WW8Document.hxx writerfilter/source/dmapper/DomainMapper.cxx writerfilter/source/dmapper/NumberingManager.cxx writerfilter/source/dmapper/PropertyMap.cxx writerfilter/source/dmapper/StyleSheetTable.cxx writerfilter/source/doctok/WW8StructBase.hxx writerfilter/source/doctok/resources.xmi writerfilter/source/ooxml/README.efforts xmerge/source/activesync/XMergeFilter.cpp xmerge/source/minicalc/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/SxcDocumentDeserializerImpl.java xmerge/source/palmtests/qa/comparator/pdbcomparison.java xmerge/source/palmtests/qa/test_spec/convertor_test_spec.html xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/DefinedName.java xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Workbook.java xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Worksheet.java xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/SymbolLookup.java xmerge/source/pocketword/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/DocumentDescriptor.java xmerge/workben/jstyle.pl xmlhelp/source/cxxhelp/provider/databases.hxx xmlhelp/source/cxxhelp/provider/provider.cxx xmlhelp/source/treeview/tvread.cxx xmloff/inc/txtfldi.hxx xmloff/inc/xmloff/xmlmultiimagehelper.hxx xmloff/inc/xmloff/xmluconv.hxx xmloff/source/core/xmlexp.cxx xmloff/source/draw/shapeexport2.cxx xmloff/source/draw/shapeexport3.cxx xmloff/source/meta/xmlversion.cxx xmloff/source/style/impastp4.cxx xmloff/source/style/xmlaustp.cxx xmloff/source/text/XMLSectionExport.cxx xmloff/source/text/txtflde.cxx xmloff/source/text/txtimp.cxx xmloff/source/text/txtparae.cxx xmloff/source/text/txtparai.cxx xmloff/source/text/txtvfldi.cxx xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx Change-Id: Ie072e7c3a60c5dae16a67ac36d1f372c5065c99c
2014-04-29 19:25:03 +00:00
// to avoid making the slot volatile, invalidate it every time if something could have been changed
// this is still much cheaper than asking for the state every 200 ms (and avoid background processing)
GetView().GetViewFrame()->GetBindings().Invalidate( FN_STAT_SELMODE );
SwWordCountWrapper *pWrdCnt = static_cast<SwWordCountWrapper*>(GetView().GetViewFrame()->GetChildWindow(SwWordCountWrapper::GetChildWindowId()));
if (pWrdCnt)
pWrdCnt->UpdateCounts();
}
bool SwWrtShell::SelNearestWrd()
2000-09-18 16:15:01 +00:00
{
SwMvContext aMvContext(this);
2000-09-18 16:15:01 +00:00
if( !IsInWrd() && !IsEndWrd() && !IsSttWrd() )
PrvWrd();
if( IsEndWrd() )
Left(CRSR_SKIP_CELLS, false, 1, false );
2000-09-18 16:15:01 +00:00
return SelWrd();
}
bool SwWrtShell::SelWrd(const Point *pPt, bool )
2000-09-18 16:15:01 +00:00
{
bool bRet;
2000-09-18 16:15:01 +00:00
{
SwMvContext aMvContext(this);
2000-09-18 16:15:01 +00:00
SttSelect();
bRet = SwCrsrShell::SelectWord( pPt );
}
EndSelect();
if( bRet )
{
m_bSelWrd = true;
2000-09-18 16:15:01 +00:00
if(pPt)
m_aStart = *pPt;
2000-09-18 16:15:01 +00:00
}
return bRet;
}
void SwWrtShell::SelSentence(const Point *pPt, bool )
2000-09-18 16:15:01 +00:00
{
{
SwMvContext aMvContext(this);
2000-09-18 16:15:01 +00:00
ClearMark();
SwCrsrShell::GoStartSentence();
2000-09-18 16:15:01 +00:00
SttSelect();
SwCrsrShell::GoEndSentence();
2000-09-18 16:15:01 +00:00
}
EndSelect();
if(pPt)
m_aStart = *pPt;
m_bSelLn = true;
m_bSelWrd = false; // disable SelWord, otherwise no SelLine goes on
2000-09-18 16:15:01 +00:00
}
void SwWrtShell::SelPara(const Point *pPt, bool )
2000-09-18 16:15:01 +00:00
{
{
SwMvContext aMvContext(this);
2000-09-18 16:15:01 +00:00
ClearMark();
SwCrsrShell::MovePara( fnParaCurr, fnParaStart );
2000-09-18 16:15:01 +00:00
SttSelect();
SwCrsrShell::MovePara( fnParaCurr, fnParaEnd );
2000-09-18 16:15:01 +00:00
}
EndSelect();
if(pPt)
m_aStart = *pPt;
m_bSelLn = false;
m_bSelWrd = false; // disable SelWord, otherwise no SelLine goes on
2000-09-18 16:15:01 +00:00
}
long SwWrtShell::SelAll()
{
const bool bLockedView = IsViewLocked();
LockView( true );
2000-09-18 16:15:01 +00:00
{
if(m_bBlockMode)
CWS-TOOLING: integrate CWS bjm02 2009-08-12 Bjoern Michaelsen #i101879# moved officeversion from envelope body to requestbody 2009-08-11 Bjoern Michaelsen #i103732# reverting changeset f3f527950572 2009-08-10 Bjoern Michaelsen cws bjm02: merging local minibranches 2009-08-10 Bjoern Michaelsen #i104128# remove additional duplication in svx headers, remove license header merge conflicts in svx headers 2009-08-10 Bjoern Michaelsen #i100484# fixed buildbreaker on win32 2009-08-10 Bjoern Michaelsen #i104128# remove duplication in svx headers 2009-08-04 Bjoern Michaelsen #i103913# fixed bookmark updating when moving numbered para 2009-08-03 Bjoern Michaelsen #i101879# include officeversion/productname in soaprequest 2009-07-31 Bjoern Michaelsen #i84926# Selecting all in blockmode automatically falls back to std mode 2009-07-31 Bjoern Michaelsen #i100484# operation on 'pCmpLine' may be undefined, thanks cmc 2009-07-29 Bjoern Michaelsen #i103059# fixing crash on empty enumeration 2009-07-29 Bjoern Michaelsen #i98659# fixing typo in usagetracking option tabpage 2009-07-29 Bjoern Michaelsen #i103732# not triggering loading of oooimprovement dll if usage tracking is disabled 2009-07-29 Bjoern Michaelsen #i103036# stlunosequence can be use simple array-pointers as iterators, fixing used type in xmloff 2009-07-29 Bjoern Michaelsen #i103036# stlunosequence can be use simple array-pointers as iterators 2009-07-29 Bjoern Michaelsen #i103182# completely removing unused functions in extensions/oooimprovement 2009-07-28 Bjoern Michaelsen cws bjm02: merged changes from master up to milestone DEV300_m53 2009-06-29 Bjoern Michaelsen #i103182# commenting out getFailedAttempts(..) for future use 2009-06-29 Bjoern Michaelsen #i103183# removed unused function sw::mark::CrossRefBookmark::IsLegalName(..) 2009-06-29 Bjoern Michaelsen #i103182# removing unused functions in extensions/oooimprovement 2009-06-24 Bjoern Michaelsen #i103059# not using enumeration for getByName/getByIndex 2009-06-24 Bjoern Michaelsen #i103059# not using enumeration for hasByName/GetCount/hasElements for performance reasons 2009-06-24 Bjoern Michaelsen #i103036# stlunosequence can be use simple array-pointers as iterators 2009-08-27 releng CWS-TOOLING: integrate CWS hr65 2009-08-26 Jens-Heiner Rechtien #i104521#: implement 'setcurrent'; document --hg option to 'create' 2009-08-26 Jens-Heiner Rechtien #i104521#: SOAP method setSCMName() doesn't return a value 2009-08-26 Jens-Heiner Rechtien #i104521#: implement [set|get]_scm() 2009-08-26 Jens-Heiner Rechtien #i104521#: implement --hg switch to 'cws create' 2009-08-27 vg CWS-TOOLING: integrate CWS hr64_DEV300 2009-07-21 13:24:57 +0200 hr r274189 : #i99576#: re-enable optimization for tabcont.cxx 2009-07-21 13:17:18 +0200 hr r274188 : #i99592: disable -xspace optimization for Solaris x86 and SunStudio 12, due to some mis-optimzation in sc and elsewhere. SunStudio 12 update 1 is OK, but needs a few unrelated changes which will be implemented in DEV300 code line 2009-08-27 releng CWS-TOOLING: integrate CWS sw32bf02 2009-08-25 15:52:04 +0200 hde r275366 : reactived testcases hit by issue 102752 2009-08-21 13:52:17 +0200 od r275245 : #i102921# delete files whose deletion has been forgotten in cws impress172 2009-08-21 11:20:47 +0200 od r275225 : CWS-TOOLING: rebase CWS sw32bf02 to trunk@275001 (milestone: DEV300:m55) 2009-08-20 16:21:30 +0200 od r275191 : #i92511# method <lcl_MoveAllLowerObjs(..)> - invalidation of cache for object rectangle inclusive spaces is needed. 2009-08-20 15:50:40 +0200 od r275188 : #i96726# method <SwPagePreView::DocSzChgd(..)> - trigger recalculation of page preview layout even if the count of pages is not changing 2009-08-20 12:37:32 +0200 od r275172 : #i100466# correction for showing and hiding redlines 2009-08-18 13:25:18 +0200 od r275100 : #i103817# method <XMLTextImportHelper::SetStyleAndAttrs(..) - assure that a heading applies the outline style, if no other list style is applied. 2009-08-18 13:21:38 +0200 od r275098 : #i103817# allow the outline style - list style for outline numbering - to be set directly at the paragraph 2009-08-17 14:13:02 +0200 od r275052 : #i103684# add missing documentation for new optional OutlineLevel attribute introduced in OOo 3.1 2009-08-17 14:00:25 +0200 od r275049 : #i100481# method <XMLTextFrameContext_Impl::CreateChildContext(..)># - correct condition for handling embedded documents and embedded math objects 2009-08-12 14:11:34 +0200 od r274891 : #i97379# assure that columns are not applied to fly frames, which represent graphics or embedded objects 2009-08-12 12:51:43 +0200 od r274889 : #i101870# method <SwTxtNode::_MakeNewTxtNode(..)> - perform action on different paragraph styles before applying new paragraph style 2009-08-12 12:24:44 +0200 od r274888 : #i101092# method <ViewShell::Paint(..)> - encapsulate paint of document background and document into pre and post drawing layer paint calls 2009-08-12 11:38:48 +0200 od r274886 : #i98766# minor adjustment in order to be warning free under Mac port builds 2009-08-12 11:33:54 +0200 od r274885 : #i99267# method <SwTabFrm::MakeAll()> - reset <bSplit> after forward move to assure that follows can be joined, if further space is available. 2009-08-12 11:11:49 +0200 od r274882 : #i98766# method <ViewShell::SmoothScroll(..) - disable smooth scroll for Mac port builds 2009-08-10 12:17:58 +0200 od r274801 : CWS-TOOLING: rebase CWS sw32bf02 to trunk@274622 (milestone: DEV300:m54) 2009-07-21 16:56:45 +0200 od r274206 : #i103685# method <SwTxtFormatter::NewTabPortion(..)> - adjust condition to apply automatic tab stop at left margin correctly in case that tab stops are not relative to indent 2009-07-10 11:53:53 +0200 od r273883 : #i102752 method <SwDrawContact::Modify(..)> - assure that a ShapePropertyChangeNotifier exists 2009-07-07 12:01:58 +0200 mst r273788 : #i103304# apply patch by dtardon to fix bogus conditional 2009-07-07 09:01:13 +0200 od r273767 : CWS-TOOLING: rebase CWS sw32bf02 to trunk@273468 (milestone: DEV300:m51) 2009-08-27 vg CWS-TOOLING: integrate CWS native264_DEV300 2009-08-13 11:58:58 +0200 is r274928 : #i104200# update to jre6u16 2009-08-27 vg CWS-TOOLING: integrate CWS automationdev300m54tables 2009-08-14 13:01:05 +0200 wg r274976 : i104224 2009-08-14 13:00:28 +0200 wg r274975 : i104224 2009-08-14 12:12:34 +0200 wg r274974 : i104222 2009-08-13 14:28:13 +0200 wg r274944 : i104205 2009-08-13 14:27:40 +0200 wg r274943 : i104205 2009-08-13 14:26:36 +0200 wg r274942 : i104205
2009-08-27 15:54:55 +00:00
LeaveBlockMode();
SwMvContext aMvContext(this);
bool bMoveTable = false;
boost::scoped_ptr<SwPosition> pStartPos;
boost::scoped_ptr<SwPosition> pEndPos;
CWS-TOOLING: integrate CWS sw31bf02 2009-01-26 08:39:59 +0100 fme r266900 : #i93190# placeholder field should be checked in IsEqualsFlags as well 2009-01-21 17:32:32 +0100 ama r266695 : CWS-TOOLING: rebase CWS sw31bf02 to trunk@266428 (milestone: DEV300:m39) 2009-01-19 09:26:02 +0100 ama r266475 : Fix #i96109#: Bracket mismatch 2009-01-19 09:08:47 +0100 ama r266473 : Fix #i96391#: Wrong default parameter 2009-01-19 09:07:13 +0100 ama r266472 : Fix #i96112#: Bracket mismatch 2009-01-19 08:51:42 +0100 ama r266471 : Fix #i96113#: Bracket mismatch 2009-01-16 15:07:01 +0100 ama r266421 : Fix #i93105#: export 0x14 2009-01-16 09:07:02 +0100 ama r266400 : Fix #i96111#: Wrong condition 2009-01-16 08:49:47 +0100 ama r266399 : Fix #i99110#: Wrong condition 2009-01-12 15:54:46 +0100 ama r266164 : Fix #i17949#: Ctrl+A if document starts with a section 2009-01-09 15:39:44 +0100 ama r266091 : Fix #i93144#: Crash during update of TOC 2009-01-09 14:40:20 +0100 ama r266086 : Fix #i90072#: Shorten undo strings 2008-12-10 16:34:57 +0100 fme r265203 : #i73332# Crash with section endnotes 2008-12-10 15:04:29 +0100 fme r265194 : #i93190# Omit painting of placeholder fields during pdf export 2008-12-09 16:46:54 +0100 fme r265115 : #i96167# haggi - reset view options before disposing view 2008-12-09 16:17:13 +0100 fme r265114 : #i96167# Added missing word coun invalidation on splitting node in second half 2008-12-09 15:49:19 +0100 fme r265108 : #i91740# Write actual text only for hyphen portions 2008-12-09 14:52:13 +0100 fme r265090 : #91483# Disable some Insert menu entries in case cursor is located in hidden text
2009-02-13 11:19:56 +00:00
SwShellCrsr* pTmpCrsr = 0;
// Query these early, before we move the cursor.
bool bHasWholeTabSelection = HasWholeTabSelection();
bool bIsCursorInTable = IsCrsrInTable();
if (!bHasWholeTabSelection)
2000-09-18 16:15:01 +00:00
{
if ( IsSelection() && IsCrsrPtAtEnd() )
SwapPam();
CWS-TOOLING: integrate CWS sw31bf02 2009-01-26 08:39:59 +0100 fme r266900 : #i93190# placeholder field should be checked in IsEqualsFlags as well 2009-01-21 17:32:32 +0100 ama r266695 : CWS-TOOLING: rebase CWS sw31bf02 to trunk@266428 (milestone: DEV300:m39) 2009-01-19 09:26:02 +0100 ama r266475 : Fix #i96109#: Bracket mismatch 2009-01-19 09:08:47 +0100 ama r266473 : Fix #i96391#: Wrong default parameter 2009-01-19 09:07:13 +0100 ama r266472 : Fix #i96112#: Bracket mismatch 2009-01-19 08:51:42 +0100 ama r266471 : Fix #i96113#: Bracket mismatch 2009-01-16 15:07:01 +0100 ama r266421 : Fix #i93105#: export 0x14 2009-01-16 09:07:02 +0100 ama r266400 : Fix #i96111#: Wrong condition 2009-01-16 08:49:47 +0100 ama r266399 : Fix #i99110#: Wrong condition 2009-01-12 15:54:46 +0100 ama r266164 : Fix #i17949#: Ctrl+A if document starts with a section 2009-01-09 15:39:44 +0100 ama r266091 : Fix #i93144#: Crash during update of TOC 2009-01-09 14:40:20 +0100 ama r266086 : Fix #i90072#: Shorten undo strings 2008-12-10 16:34:57 +0100 fme r265203 : #i73332# Crash with section endnotes 2008-12-10 15:04:29 +0100 fme r265194 : #i93190# Omit painting of placeholder fields during pdf export 2008-12-09 16:46:54 +0100 fme r265115 : #i96167# haggi - reset view options before disposing view 2008-12-09 16:17:13 +0100 fme r265114 : #i96167# Added missing word coun invalidation on splitting node in second half 2008-12-09 15:49:19 +0100 fme r265108 : #i91740# Write actual text only for hyphen portions 2008-12-09 14:52:13 +0100 fme r265090 : #91483# Disable some Insert menu entries in case cursor is located in hidden text
2009-02-13 11:19:56 +00:00
pTmpCrsr = getShellCrsr( false );
if( pTmpCrsr )
{
pStartPos.reset(new SwPosition( *pTmpCrsr->GetPoint() ));
pEndPos.reset(new SwPosition( *pTmpCrsr->GetMark() ));
CWS-TOOLING: integrate CWS sw31bf02 2009-01-26 08:39:59 +0100 fme r266900 : #i93190# placeholder field should be checked in IsEqualsFlags as well 2009-01-21 17:32:32 +0100 ama r266695 : CWS-TOOLING: rebase CWS sw31bf02 to trunk@266428 (milestone: DEV300:m39) 2009-01-19 09:26:02 +0100 ama r266475 : Fix #i96109#: Bracket mismatch 2009-01-19 09:08:47 +0100 ama r266473 : Fix #i96391#: Wrong default parameter 2009-01-19 09:07:13 +0100 ama r266472 : Fix #i96112#: Bracket mismatch 2009-01-19 08:51:42 +0100 ama r266471 : Fix #i96113#: Bracket mismatch 2009-01-16 15:07:01 +0100 ama r266421 : Fix #i93105#: export 0x14 2009-01-16 09:07:02 +0100 ama r266400 : Fix #i96111#: Wrong condition 2009-01-16 08:49:47 +0100 ama r266399 : Fix #i99110#: Wrong condition 2009-01-12 15:54:46 +0100 ama r266164 : Fix #i17949#: Ctrl+A if document starts with a section 2009-01-09 15:39:44 +0100 ama r266091 : Fix #i93144#: Crash during update of TOC 2009-01-09 14:40:20 +0100 ama r266086 : Fix #i90072#: Shorten undo strings 2008-12-10 16:34:57 +0100 fme r265203 : #i73332# Crash with section endnotes 2008-12-10 15:04:29 +0100 fme r265194 : #i93190# Omit painting of placeholder fields during pdf export 2008-12-09 16:46:54 +0100 fme r265115 : #i96167# haggi - reset view options before disposing view 2008-12-09 16:17:13 +0100 fme r265114 : #i96167# Added missing word coun invalidation on splitting node in second half 2008-12-09 15:49:19 +0100 fme r265108 : #i91740# Write actual text only for hyphen portions 2008-12-09 14:52:13 +0100 fme r265090 : #91483# Disable some Insert menu entries in case cursor is located in hidden text
2009-02-13 11:19:56 +00:00
}
2000-09-18 16:15:01 +00:00
Push();
bool bIsFullSel = !MoveSection( fnSectionCurr, fnSectionStart);
2000-09-18 16:15:01 +00:00
SwapPam();
bIsFullSel &= !MoveSection( fnSectionCurr, fnSectionEnd);
Pop(false);
GoStart(true, &bMoveTable, false, !bIsFullSel);
2000-09-18 16:15:01 +00:00
}
else
{
EnterStdMode();
SttEndDoc(true);
2000-09-18 16:15:01 +00:00
}
SttSelect();
GoEnd(true, &bMoveTable);
bool bNeedsExtendedSelectAll = StartsWithTable();
// If the cursor was in a table, then we only need the extended select
// all if the whole table is already selected, to still allow selecting
// only a single cell or a single table before selecting the whole
// document.
if (bNeedsExtendedSelectAll && bIsCursorInTable)
bNeedsExtendedSelectAll = bHasWholeTabSelection;
if (bNeedsExtendedSelectAll)
{
// Disable table cursor to make sure getShellCrsr() returns m_pCurCrsr, not m_pTableCrsr.
if (IsTableMode())
TableCrsrToCursor();
// Do the extended select all on m_pCurCrsr.
ExtendedSelectAll(/*bFootnotes =*/ false);
}
SwDoc *pDoc = GetDoc();
if ( pDoc )
{
pDoc->SetPrepareSelAll();
}
CWS-TOOLING: integrate CWS sw31bf02 2009-01-26 08:39:59 +0100 fme r266900 : #i93190# placeholder field should be checked in IsEqualsFlags as well 2009-01-21 17:32:32 +0100 ama r266695 : CWS-TOOLING: rebase CWS sw31bf02 to trunk@266428 (milestone: DEV300:m39) 2009-01-19 09:26:02 +0100 ama r266475 : Fix #i96109#: Bracket mismatch 2009-01-19 09:08:47 +0100 ama r266473 : Fix #i96391#: Wrong default parameter 2009-01-19 09:07:13 +0100 ama r266472 : Fix #i96112#: Bracket mismatch 2009-01-19 08:51:42 +0100 ama r266471 : Fix #i96113#: Bracket mismatch 2009-01-16 15:07:01 +0100 ama r266421 : Fix #i93105#: export 0x14 2009-01-16 09:07:02 +0100 ama r266400 : Fix #i96111#: Wrong condition 2009-01-16 08:49:47 +0100 ama r266399 : Fix #i99110#: Wrong condition 2009-01-12 15:54:46 +0100 ama r266164 : Fix #i17949#: Ctrl+A if document starts with a section 2009-01-09 15:39:44 +0100 ama r266091 : Fix #i93144#: Crash during update of TOC 2009-01-09 14:40:20 +0100 ama r266086 : Fix #i90072#: Shorten undo strings 2008-12-10 16:34:57 +0100 fme r265203 : #i73332# Crash with section endnotes 2008-12-10 15:04:29 +0100 fme r265194 : #i93190# Omit painting of placeholder fields during pdf export 2008-12-09 16:46:54 +0100 fme r265115 : #i96167# haggi - reset view options before disposing view 2008-12-09 16:17:13 +0100 fme r265114 : #i96167# Added missing word coun invalidation on splitting node in second half 2008-12-09 15:49:19 +0100 fme r265108 : #i91740# Write actual text only for hyphen portions 2008-12-09 14:52:13 +0100 fme r265090 : #91483# Disable some Insert menu entries in case cursor is located in hidden text
2009-02-13 11:19:56 +00:00
if( pStartPos )
{
pTmpCrsr = getShellCrsr( false );
if( pTmpCrsr )
{
// Some special handling for sections (e.g. TOC) at the beginning of the document body
// to avoid the selection of the first section
// if the last selection was behind the first section or
// if the last selection was already the first section
// In this both cases we select to the end of document
if( ( *pTmpCrsr->GetPoint() < *pEndPos ||
CWS-TOOLING: integrate CWS sw31bf02 2009-01-26 08:39:59 +0100 fme r266900 : #i93190# placeholder field should be checked in IsEqualsFlags as well 2009-01-21 17:32:32 +0100 ama r266695 : CWS-TOOLING: rebase CWS sw31bf02 to trunk@266428 (milestone: DEV300:m39) 2009-01-19 09:26:02 +0100 ama r266475 : Fix #i96109#: Bracket mismatch 2009-01-19 09:08:47 +0100 ama r266473 : Fix #i96391#: Wrong default parameter 2009-01-19 09:07:13 +0100 ama r266472 : Fix #i96112#: Bracket mismatch 2009-01-19 08:51:42 +0100 ama r266471 : Fix #i96113#: Bracket mismatch 2009-01-16 15:07:01 +0100 ama r266421 : Fix #i93105#: export 0x14 2009-01-16 09:07:02 +0100 ama r266400 : Fix #i96111#: Wrong condition 2009-01-16 08:49:47 +0100 ama r266399 : Fix #i99110#: Wrong condition 2009-01-12 15:54:46 +0100 ama r266164 : Fix #i17949#: Ctrl+A if document starts with a section 2009-01-09 15:39:44 +0100 ama r266091 : Fix #i93144#: Crash during update of TOC 2009-01-09 14:40:20 +0100 ama r266086 : Fix #i90072#: Shorten undo strings 2008-12-10 16:34:57 +0100 fme r265203 : #i73332# Crash with section endnotes 2008-12-10 15:04:29 +0100 fme r265194 : #i93190# Omit painting of placeholder fields during pdf export 2008-12-09 16:46:54 +0100 fme r265115 : #i96167# haggi - reset view options before disposing view 2008-12-09 16:17:13 +0100 fme r265114 : #i96167# Added missing word coun invalidation on splitting node in second half 2008-12-09 15:49:19 +0100 fme r265108 : #i91740# Write actual text only for hyphen portions 2008-12-09 14:52:13 +0100 fme r265090 : #91483# Disable some Insert menu entries in case cursor is located in hidden text
2009-02-13 11:19:56 +00:00
( *pStartPos == *pTmpCrsr->GetMark() &&
*pEndPos == *pTmpCrsr->GetPoint() ) ) && !bNeedsExtendedSelectAll)
SwCrsrShell::SttEndDoc(false);
CWS-TOOLING: integrate CWS sw31bf02 2009-01-26 08:39:59 +0100 fme r266900 : #i93190# placeholder field should be checked in IsEqualsFlags as well 2009-01-21 17:32:32 +0100 ama r266695 : CWS-TOOLING: rebase CWS sw31bf02 to trunk@266428 (milestone: DEV300:m39) 2009-01-19 09:26:02 +0100 ama r266475 : Fix #i96109#: Bracket mismatch 2009-01-19 09:08:47 +0100 ama r266473 : Fix #i96391#: Wrong default parameter 2009-01-19 09:07:13 +0100 ama r266472 : Fix #i96112#: Bracket mismatch 2009-01-19 08:51:42 +0100 ama r266471 : Fix #i96113#: Bracket mismatch 2009-01-16 15:07:01 +0100 ama r266421 : Fix #i93105#: export 0x14 2009-01-16 09:07:02 +0100 ama r266400 : Fix #i96111#: Wrong condition 2009-01-16 08:49:47 +0100 ama r266399 : Fix #i99110#: Wrong condition 2009-01-12 15:54:46 +0100 ama r266164 : Fix #i17949#: Ctrl+A if document starts with a section 2009-01-09 15:39:44 +0100 ama r266091 : Fix #i93144#: Crash during update of TOC 2009-01-09 14:40:20 +0100 ama r266086 : Fix #i90072#: Shorten undo strings 2008-12-10 16:34:57 +0100 fme r265203 : #i73332# Crash with section endnotes 2008-12-10 15:04:29 +0100 fme r265194 : #i93190# Omit painting of placeholder fields during pdf export 2008-12-09 16:46:54 +0100 fme r265115 : #i96167# haggi - reset view options before disposing view 2008-12-09 16:17:13 +0100 fme r265114 : #i96167# Added missing word coun invalidation on splitting node in second half 2008-12-09 15:49:19 +0100 fme r265108 : #i91740# Write actual text only for hyphen portions 2008-12-09 14:52:13 +0100 fme r265090 : #91483# Disable some Insert menu entries in case cursor is located in hidden text
2009-02-13 11:19:56 +00:00
}
}
2000-09-18 16:15:01 +00:00
}
EndSelect();
LockView( bLockedView );
2000-09-18 16:15:01 +00:00
return 1;
}
// Description: Text search
2000-09-18 16:15:01 +00:00
sal_uLong SwWrtShell::SearchPattern( const SearchOptions& rSearchOpt, bool bSearchInNotes,
2000-09-18 16:15:01 +00:00
SwDocPositions eStt, SwDocPositions eEnd,
FindRanges eFlags, bool bReplace )
2000-09-18 16:15:01 +00:00
{
// no enhancement of existing selections
2000-09-18 16:15:01 +00:00
if(!(eFlags & FND_IN_SEL))
ClearMark();
bool bCancel = false;
sal_uLong nRet = Find( rSearchOpt, bSearchInNotes, eStt, eEnd, bCancel, eFlags, bReplace );
if(bCancel)
{
Undo(1);
nRet = ULONG_MAX;
}
return nRet;
2000-09-18 16:15:01 +00:00
}
// Description: search for templates
2000-09-18 16:15:01 +00:00
sal_uLong SwWrtShell::SearchTempl( const OUString &rTempl,
2000-09-18 16:15:01 +00:00
SwDocPositions eStt, SwDocPositions eEnd,
FindRanges eFlags, const OUString* pReplTempl )
2000-09-18 16:15:01 +00:00
{
// no enhancement of existing selections
2000-09-18 16:15:01 +00:00
if(!(eFlags & FND_IN_SEL))
ClearMark();
SwTextFormatColl *pColl = GetParaStyle(rTempl, SwWrtShell::GETSTYLE_CREATESOME);
SwTextFormatColl *pReplaceColl = 0;
2000-09-18 16:15:01 +00:00
if( pReplTempl )
pReplaceColl = GetParaStyle(*pReplTempl, SwWrtShell::GETSTYLE_CREATESOME );
bool bCancel = false;
sal_uLong nRet = Find(pColl? *pColl: GetDfltTextFormatColl(),
eStt,eEnd, bCancel, eFlags, pReplaceColl);
if(bCancel)
{
Undo(1);
nRet = ULONG_MAX;
}
return nRet;
2000-09-18 16:15:01 +00:00
}
// search for attributes
2000-09-18 16:15:01 +00:00
sal_uLong SwWrtShell::SearchAttr( const SfxItemSet& rFindSet, bool bNoColls,
SwDocPositions eStart, SwDocPositions eEnd,
FindRanges eFlags, const SearchOptions* pSearchOpt,
2000-09-18 16:15:01 +00:00
const SfxItemSet* pReplaceSet )
{
// no enhancement of existing selections
2000-09-18 16:15:01 +00:00
if (!(eFlags & FND_IN_SEL))
ClearMark();
// Searching
bool bCancel = false;
sal_uLong nRet = Find( rFindSet, bNoColls, eStart, eEnd, bCancel, eFlags, pSearchOpt, pReplaceSet);
if(bCancel)
{
Undo(1);
nRet = ULONG_MAX;
}
return nRet;
2000-09-18 16:15:01 +00:00
}
// Selection modes
2000-09-18 16:15:01 +00:00
void SwWrtShell::PushMode()
{
m_pModeStack = new ModeStack( m_pModeStack, m_bIns, m_bExtMode, m_bAddMode, m_bBlockMode );
2000-09-18 16:15:01 +00:00
}
void SwWrtShell::PopMode()
{
if ( 0 == m_pModeStack )
2000-09-18 16:15:01 +00:00
return;
if ( m_bExtMode && !m_pModeStack->bExt )
2000-09-18 16:15:01 +00:00
LeaveExtMode();
if ( m_bAddMode && !m_pModeStack->bAdd )
2000-09-18 16:15:01 +00:00
LeaveAddMode();
if ( m_bBlockMode && !m_pModeStack->bBlock )
LeaveBlockMode();
m_bIns = m_pModeStack->bIns;
2000-09-18 16:15:01 +00:00
ModeStack *pTmp = m_pModeStack->pNext;
delete m_pModeStack;
m_pModeStack = pTmp;
2000-09-18 16:15:01 +00:00
}
// Two methodes for setting cursors: the first maps at the
// eponymous methodes in the CursorShell, the second removes
// all selections at first.
2000-09-18 16:15:01 +00:00
long SwWrtShell::SetCrsr(const Point *pPt, bool bTextOnly)
2000-09-18 16:15:01 +00:00
{
// Remove a possibly present selection at the position
// of the mouseclick
2000-09-18 16:15:01 +00:00
if(!IsInSelect() && ChgCurrPam(*pPt)) {
ClearMark();
}
2000-09-18 16:15:01 +00:00
return SwCrsrShell::SetCrsr(*pPt, bTextOnly);
}
long SwWrtShell::SetCrsrKillSel(const Point *pPt, bool bTextOnly )
2000-09-18 16:15:01 +00:00
{
SwActContext aActContext(this);
ResetSelect(pPt,false);
2000-09-18 16:15:01 +00:00
return SwCrsrShell::SetCrsr(*pPt, bTextOnly);
}
void SwWrtShell::UnSelectFrm()
{
// Remove Frame selection with guaranteed invalid position
2000-09-18 16:15:01 +00:00
Point aPt(LONG_MIN, LONG_MIN);
SelectObj(aPt, 0);
SwTransferable::ClearSelection( *this );
2000-09-18 16:15:01 +00:00
}
// Remove of all selections
2000-09-18 16:15:01 +00:00
long SwWrtShell::ResetSelect(const Point *,bool)
2000-09-18 16:15:01 +00:00
{
if(IsSelFrmMode())
{
UnSelectFrm();
LeaveSelFrmMode();
}
else
{
// SwActContext opens an Action -
// to avoid problems in the basic process with the
// shell switching, GetChgLnk().Call() may be called
// after EndAction().
2000-09-18 16:15:01 +00:00
{
SwActContext aActContext(this);
m_bSelWrd = m_bSelLn = false;
2000-09-18 16:15:01 +00:00
KillPams();
ClearMark();
m_fnKillSel = &SwWrtShell::Ignore;
m_fnSetCrsr = &SwWrtShell::SetCrsr;
2000-09-18 16:15:01 +00:00
}
// After canceling of all selections an update of Attr-Controls
// could be necessary.
2000-09-18 16:15:01 +00:00
GetChgLnk().Call(this);
}
Invalidate();
SwTransferable::ClearSelection( *this );
2000-09-18 16:15:01 +00:00
return 1;
}
// Do nothing
2000-09-18 16:15:01 +00:00
long SwWrtShell::Ignore(const Point *, bool ) {
2000-09-18 16:15:01 +00:00
return 1;
}
// Begin of a selection process.
2000-09-18 16:15:01 +00:00
void SwWrtShell::SttSelect()
{
if(m_bInSelect)
2000-09-18 16:15:01 +00:00
return;
if(!HasMark())
SetMark();
if( m_bBlockMode )
{
SwShellCrsr* pTmp = getShellCrsr( true );
if( !pTmp->HasMark() )
pTmp->SetMark();
}
m_fnKillSel = &SwWrtShell::Ignore;
m_fnSetCrsr = &SwWrtShell::SetCrsr;
m_bInSelect = true;
Invalidate();
SwTransferable::CreateSelection( *this );
2000-09-18 16:15:01 +00:00
}
// End of a selection process.
2000-09-18 16:15:01 +00:00
void SwWrtShell::EndSelect()
{
if(m_bInSelect && !m_bExtMode)
{
m_bInSelect = false;
if (m_bAddMode)
{
AddLeaveSelect(0, false);
}
else
{
SttLeaveSelect(0, false);
m_fnSetCrsr = &SwWrtShell::SetCrsrKillSel;
m_fnKillSel = &SwWrtShell::ResetSelect;
}
2000-09-18 16:15:01 +00:00
}
SwWordCountWrapper *pWrdCnt = static_cast<SwWordCountWrapper*>(GetView().GetViewFrame()->GetChildWindow(SwWordCountWrapper::GetChildWindowId()));
if (pWrdCnt)
pWrdCnt->UpdateCounts();
2000-09-18 16:15:01 +00:00
}
long SwWrtShell::ExtSelWrd(const Point *pPt, bool )
2000-09-18 16:15:01 +00:00
{
SwMvContext aMvContext(this);
2000-09-18 16:15:01 +00:00
if( IsTableMode() )
return 1;
// Bug 66823: actual crsr has in additional mode no selection?
// Then destroy the actual an go to prev, this will be expand
if( !HasMark() && GoPrevCrsr() )
{
bool bHasMark = HasMark(); // thats wrong!
2000-09-18 16:15:01 +00:00
GoNextCrsr();
if( bHasMark )
{
DestroyCrsr();
GoPrevCrsr();
}
}
// check the direction of the selection with the new point
bool bRet = false, bMoveCrsr = true, bToTop = false;
SwCrsrShell::SelectWord( &m_aStart ); // select the startword
2000-09-18 16:15:01 +00:00
SwCrsrShell::Push(); // save the cursor
SwCrsrShell::SetCrsr( *pPt ); // and check the direction
switch( SwCrsrShell::CompareCursor( StackMkCurrPt ))
{
case -1: bToTop = false; break;
case 1: bToTop = true; break;
default: bMoveCrsr = false; break;
2000-09-18 16:15:01 +00:00
}
SwCrsrShell::Pop( false ); // retore the saved cursor
2000-09-18 16:15:01 +00:00
if( bMoveCrsr )
{
// select to Top but cursor select to Bottom? or
// select to Bottom but cursor select to Top? --> swap the cursor
if( bToTop )
SwapPam();
SwCrsrShell::Push(); // save cur cursor
if( SwCrsrShell::SelectWord( pPt )) // select the current word
{
if( bToTop )
SwapPam();
Combine();
bRet = true;
2000-09-18 16:15:01 +00:00
}
else
{
SwCrsrShell::Pop( false );
2000-09-18 16:15:01 +00:00
if( bToTop )
SwapPam();
}
}
else
bRet = true;
return bRet ? 1 : 0;
2000-09-18 16:15:01 +00:00
}
long SwWrtShell::ExtSelLn(const Point *pPt, bool )
2000-09-18 16:15:01 +00:00
{
SwMvContext aMvContext(this);
2000-09-18 16:15:01 +00:00
SwCrsrShell::SetCrsr(*pPt);
if( IsTableMode() )
return 1;
// Bug 66823: actual crsr has in additional mode no selection?
// Then destroy the actual an go to prev, this will be expand
if( !HasMark() && GoPrevCrsr() )
{
bool bHasMark = HasMark(); // thats wrong!
2000-09-18 16:15:01 +00:00
GoNextCrsr();
if( bHasMark )
{
DestroyCrsr();
GoPrevCrsr();
}
}
// if applicable fit the selection to the "Mark"
bool bToTop = !IsCrsrPtAtEnd();
2000-09-18 16:15:01 +00:00
SwapPam();
// The "Mark" has to be at the end or the beginning of the line.
if( bToTop ? !IsEndSentence() : !IsStartSentence() )
2000-09-18 16:15:01 +00:00
{
if( bToTop )
{
if( !IsEndPara() )
SwCrsrShell::Right(1,CRSR_SKIP_CHARS);
SwCrsrShell::GoEndSentence();
2000-09-18 16:15:01 +00:00
}
else
SwCrsrShell::GoStartSentence();
2000-09-18 16:15:01 +00:00
}
SwapPam();
return (bToTop ? SwCrsrShell::GoStartSentence() : SwCrsrShell::GoEndSentence()) ? 1 : 0;
2000-09-18 16:15:01 +00:00
}
// Back into the standard mode: no mode, no selections.
2000-09-18 16:15:01 +00:00
void SwWrtShell::EnterStdMode()
{
if(m_bAddMode)
2000-09-18 16:15:01 +00:00
LeaveAddMode();
if(m_bBlockMode)
LeaveBlockMode();
m_bBlockMode = false;
m_bExtMode = false;
m_bInSelect = false;
if(IsSelFrmMode())
{
UnSelectFrm();
LeaveSelFrmMode();
}
else
{
// SwActContext opens and action which has to be
// closed prior to the call of
// GetChgLnk().Call()
{
SwActContext aActContext(this);
m_bSelWrd = m_bSelLn = false;
if( !IsRetainSelection() )
KillPams();
ClearMark();
m_fnSetCrsr = &SwWrtShell::SetCrsrKillSel;
m_fnKillSel = &SwWrtShell::ResetSelect;
}
}
Invalidate();
SwTransferable::ClearSelection( *this );
2000-09-18 16:15:01 +00:00
}
// Extended Mode
2000-09-18 16:15:01 +00:00
void SwWrtShell::EnterExtMode()
{
if(m_bBlockMode)
{
LeaveBlockMode();
KillPams();
ClearMark();
}
m_bExtMode = true;
m_bAddMode = false;
m_bBlockMode = false;
2000-09-18 16:15:01 +00:00
SttSelect();
}
void SwWrtShell::LeaveExtMode()
{
m_bExtMode = false;
2000-09-18 16:15:01 +00:00
EndSelect();
}
// End of a selection; if the selection is empty,
// ClearMark().
2000-09-18 16:15:01 +00:00
long SwWrtShell::SttLeaveSelect(const Point *, bool )
2000-09-18 16:15:01 +00:00
{
if(SwCrsrShell::HasSelection() && !IsSelTableCells() && m_bClearMark) {
2000-09-18 16:15:01 +00:00
return 0;
}
ClearMark();
return 1;
}
// Leaving of the selection mode in additional mode
2000-09-18 16:15:01 +00:00
long SwWrtShell::AddLeaveSelect(const Point *, bool )
2000-09-18 16:15:01 +00:00
{
if(IsTableMode()) LeaveAddMode();
else if(SwCrsrShell::HasSelection())
CreateCrsr();
return 1;
}
// Additional Mode
2000-09-18 16:15:01 +00:00
void SwWrtShell::EnterAddMode()
{
if(IsTableMode()) return;
if(m_bBlockMode)
LeaveBlockMode();
m_fnKillSel = &SwWrtShell::Ignore;
m_fnSetCrsr = &SwWrtShell::SetCrsr;
m_bAddMode = true;
m_bBlockMode = false;
m_bExtMode = false;
2000-09-18 16:15:01 +00:00
if(SwCrsrShell::HasSelection())
CreateCrsr();
Invalidate();
2000-09-18 16:15:01 +00:00
}
void SwWrtShell::LeaveAddMode()
{
m_fnKillSel = &SwWrtShell::ResetSelect;
m_fnSetCrsr = &SwWrtShell::SetCrsrKillSel;
m_bAddMode = false;
Invalidate();
2000-09-18 16:15:01 +00:00
}
// Block Mode
void SwWrtShell::EnterBlockMode()
{
m_bBlockMode = false;
EnterStdMode();
m_bBlockMode = true;
CrsrToBlockCrsr();
Invalidate();
}
void SwWrtShell::LeaveBlockMode()
{
m_bBlockMode = false;
BlockCrsrToCrsr();
EndSelect();
Invalidate();
}
// Insert mode
2000-09-18 16:15:01 +00:00
void SwWrtShell::SetInsMode( bool bOn )
2000-09-18 16:15:01 +00:00
{
m_bIns = bOn;
SwCrsrShell::SetOverwriteCrsr( !m_bIns );
const SfxBoolItem aTmp( SID_ATTR_INSERT, m_bIns );
2000-09-18 16:15:01 +00:00
GetView().GetViewFrame()->GetBindings().SetState( aTmp );
2000-11-28 17:49:16 +00:00
StartAction();
EndAction();
Invalidate();
2000-09-18 16:15:01 +00:00
}
CWS-TOOLING: integrate CWS os132 2009-07-21 15:24:18 +0200 os r274201 : #i103696# SwXTextPortion/SwXParagraph excluded 2009-07-15 13:19:17 +0200 os r274007 : #i103564# typo 2009-07-15 13:09:30 +0200 os r274005 : #i103564# SwFrames::hasElements 2009-07-15 13:02:16 +0200 os r274003 : #i103564# SwXBookmark::getPropertySetInfo fixed 2009-06-26 10:11:00 +0200 os r273395 : CWS-TOOLING: rebase CWS os132 to trunk@272827 (milestone: DEV300:m50) 2009-06-23 08:52:24 +0200 os r273256 : #i102764# patch: attribute ListBoxes correctly handled in ::Reset() 2009-06-23 08:51:31 +0200 os r273255 : #i102764# ResetColor() added to remove background color 2009-06-22 14:57:38 +0200 os r273233 : #i102619# prevent access to already destroyed shell 2009-06-18 13:26:51 +0200 os r273112 : #i99508# ::insertTextContent: re-route to ::attach() 2009-06-18 10:59:53 +0200 os r273107 : #i85405# patch to enable 'Print grid' CheckBox correctly 2009-06-18 10:54:02 +0200 os r273106 : #i85133# dispose connection in GetColumnFmt to prevent connection locking 2009-06-18 10:24:31 +0200 os r273104 : #99535# ExportGraphic changed 2009-06-18 10:24:03 +0200 os r273103 : #99535# ExportGraphic changed 2009-06-18 10:23:11 +0200 os r273102 : #i102841# redlining mode switches to insert mode (cmc) 2009-06-17 14:05:42 +0200 os r273070 : #i102111# do not save already saved HTML documents before switching to source veiw 2009-06-17 13:18:20 +0200 os r273063 : #i101825# set rembered start position at the real start not at the initial start 2009-06-17 08:24:10 +0200 os r273048 : #99535# no dierect access to the file picker interface 2009-06-16 15:00:12 +0200 os r273020 : #i99937# notification of user options changes re-introduced 2009-06-15 14:36:03 +0200 os r272987 : #i98032# unreplaced text in protected areas must not be attributed either 2009-06-15 14:20:26 +0200 os r272985 : #i98032# replace list has to be initialised 2009-06-04 13:29:02 +0200 os r272624 : #i97810# set focus into column page 2009-06-04 11:01:14 +0200 os r272617 : #i98164# dialog resize to ease localisation 2009-06-04 10:59:44 +0200 os r272616 : #i98164# dialog resize to ease localisation 2009-05-28 16:05:03 +0200 os r272413 : #i98172# ConvertFieldsToText: take care of tabs with attributes 2009-05-28 11:12:45 +0200 os r272385 : #i59361# dialog controls resized 2009-05-28 11:03:14 +0200 os r272383 : #i59174# dialog controls moved
2009-08-06 12:44:16 +00:00
//Overwrite mode is incompatible with red-lining
void SwWrtShell::SetRedlineModeAndCheckInsMode( sal_uInt16 eMode )
CWS-TOOLING: integrate CWS os132 2009-07-21 15:24:18 +0200 os r274201 : #i103696# SwXTextPortion/SwXParagraph excluded 2009-07-15 13:19:17 +0200 os r274007 : #i103564# typo 2009-07-15 13:09:30 +0200 os r274005 : #i103564# SwFrames::hasElements 2009-07-15 13:02:16 +0200 os r274003 : #i103564# SwXBookmark::getPropertySetInfo fixed 2009-06-26 10:11:00 +0200 os r273395 : CWS-TOOLING: rebase CWS os132 to trunk@272827 (milestone: DEV300:m50) 2009-06-23 08:52:24 +0200 os r273256 : #i102764# patch: attribute ListBoxes correctly handled in ::Reset() 2009-06-23 08:51:31 +0200 os r273255 : #i102764# ResetColor() added to remove background color 2009-06-22 14:57:38 +0200 os r273233 : #i102619# prevent access to already destroyed shell 2009-06-18 13:26:51 +0200 os r273112 : #i99508# ::insertTextContent: re-route to ::attach() 2009-06-18 10:59:53 +0200 os r273107 : #i85405# patch to enable 'Print grid' CheckBox correctly 2009-06-18 10:54:02 +0200 os r273106 : #i85133# dispose connection in GetColumnFmt to prevent connection locking 2009-06-18 10:24:31 +0200 os r273104 : #99535# ExportGraphic changed 2009-06-18 10:24:03 +0200 os r273103 : #99535# ExportGraphic changed 2009-06-18 10:23:11 +0200 os r273102 : #i102841# redlining mode switches to insert mode (cmc) 2009-06-17 14:05:42 +0200 os r273070 : #i102111# do not save already saved HTML documents before switching to source veiw 2009-06-17 13:18:20 +0200 os r273063 : #i101825# set rembered start position at the real start not at the initial start 2009-06-17 08:24:10 +0200 os r273048 : #99535# no dierect access to the file picker interface 2009-06-16 15:00:12 +0200 os r273020 : #i99937# notification of user options changes re-introduced 2009-06-15 14:36:03 +0200 os r272987 : #i98032# unreplaced text in protected areas must not be attributed either 2009-06-15 14:20:26 +0200 os r272985 : #i98032# replace list has to be initialised 2009-06-04 13:29:02 +0200 os r272624 : #i97810# set focus into column page 2009-06-04 11:01:14 +0200 os r272617 : #i98164# dialog resize to ease localisation 2009-06-04 10:59:44 +0200 os r272616 : #i98164# dialog resize to ease localisation 2009-05-28 16:05:03 +0200 os r272413 : #i98172# ConvertFieldsToText: take care of tabs with attributes 2009-05-28 11:12:45 +0200 os r272385 : #i59361# dialog controls resized 2009-05-28 11:03:14 +0200 os r272383 : #i59174# dialog controls moved
2009-08-06 12:44:16 +00:00
{
SetRedlineMode( eMode );
if (IsRedlineOn())
SetInsMode( true );
}
2000-09-18 16:15:01 +00:00
// Edit frame
2000-09-18 16:15:01 +00:00
long SwWrtShell::BeginFrmDrag(const Point *pPt, bool bIsShift)
2000-09-18 16:15:01 +00:00
{
m_fnDrag = &SwFEShell::Drag;
2000-09-18 16:15:01 +00:00
if(bStartDrag)
{
Point aTmp( nStartDragX, nStartDragY );
SwFEShell::BeginDrag( &aTmp, bIsShift );
2000-09-18 16:15:01 +00:00
}
else
SwFEShell::BeginDrag( pPt, bIsShift );
2000-09-18 16:15:01 +00:00
return 1;
}
void SwWrtShell::EnterSelFrmMode(const Point *pPos)
{
if(pPos)
{
nStartDragX = pPos->X();
nStartDragY = pPos->Y();
bStartDrag = true;
2000-09-18 16:15:01 +00:00
}
m_bLayoutMode = true;
2000-09-18 16:15:01 +00:00
HideCrsr();
// equal call of BeginDrag in the SwFEShell
m_fnDrag = &SwWrtShell::BeginFrmDrag;
m_fnEndDrag = &SwWrtShell::UpdateLayoutFrm;
2000-09-18 16:15:01 +00:00
SwBaseShell::SetFrmMode( FLY_DRAG_START, this );
Invalidate();
2000-09-18 16:15:01 +00:00
}
void SwWrtShell::LeaveSelFrmMode()
{
m_fnDrag = &SwWrtShell::BeginDrag;
m_fnEndDrag = &SwWrtShell::DefaultEndDrag;
m_bLayoutMode = false;
bStartDrag = false;
2000-09-18 16:15:01 +00:00
Edit();
SwBaseShell::SetFrmMode( FLY_DRAG_END, this );
Invalidate();
2000-09-18 16:15:01 +00:00
}
// Description: execute framebound macro
2000-09-18 16:15:01 +00:00
IMPL_LINK( SwWrtShell, ExecFlyMac, void *, pFlyFormat )
2000-09-18 16:15:01 +00:00
{
const SwFrameFormat *pFormat = pFlyFormat ? static_cast<SwFrameFormat*>(pFlyFormat) : GetFlyFrameFormat();
OSL_ENSURE(pFormat, "no frame format");
const SvxMacroItem &rFormatMac = pFormat->GetMacro();
2000-09-18 16:15:01 +00:00
if(rFormatMac.HasMacro(SW_EVENT_OBJECT_SELECT))
2000-09-18 16:15:01 +00:00
{
const SvxMacro &rMac = rFormatMac.GetMacro(SW_EVENT_OBJECT_SELECT);
2000-09-18 16:15:01 +00:00
if( IsFrmSelected() )
m_bLayoutMode = true;
2000-09-18 16:15:01 +00:00
CallChgLnk();
ExecMacro( rMac );
}
return 0;
}
long SwWrtShell::UpdateLayoutFrm(const Point *pPt, bool )
2000-09-18 16:15:01 +00:00
{
// still a dummy
SwFEShell::EndDrag( pPt, false );
m_fnDrag = &SwWrtShell::BeginFrmDrag;
2000-09-18 16:15:01 +00:00
return 1;
}
// Handler for toggling the modes. Returns back the old mode.
2000-09-18 16:15:01 +00:00
bool SwWrtShell::ToggleAddMode()
2000-09-18 16:15:01 +00:00
{
m_bAddMode ? LeaveAddMode(): EnterAddMode();
Invalidate();
return !m_bAddMode;
2000-09-18 16:15:01 +00:00
}
bool SwWrtShell::ToggleBlockMode()
{
m_bBlockMode ? LeaveBlockMode(): EnterBlockMode();
Invalidate();
return !m_bBlockMode;
}
bool SwWrtShell::ToggleExtMode()
2000-09-18 16:15:01 +00:00
{
m_bExtMode ? LeaveExtMode() : EnterExtMode();
Invalidate();
return !m_bExtMode;
2000-09-18 16:15:01 +00:00
}
// Dragging in standard mode (Selecting of content)
2000-09-18 16:15:01 +00:00
long SwWrtShell::BeginDrag(const Point * /*pPt*/, bool )
2000-09-18 16:15:01 +00:00
{
if(m_bSelWrd)
2000-09-18 16:15:01 +00:00
{
m_bInSelect = true;
2000-09-18 16:15:01 +00:00
if( !IsCrsrPtAtEnd() )
SwapPam();
m_fnDrag = &SwWrtShell::ExtSelWrd;
m_fnSetCrsr = &SwWrtShell::Ignore;
2000-09-18 16:15:01 +00:00
}
else if(m_bSelLn)
2000-09-18 16:15:01 +00:00
{
m_bInSelect = true;
m_fnDrag = &SwWrtShell::ExtSelLn;
m_fnSetCrsr = &SwWrtShell::Ignore;
2000-09-18 16:15:01 +00:00
}
else
{
m_fnDrag = &SwWrtShell::DefaultDrag;
2000-09-18 16:15:01 +00:00
SttSelect();
}
return 1;
}
long SwWrtShell::DefaultDrag(const Point *, bool )
2000-09-18 16:15:01 +00:00
{
if( IsSelTableCells() )
m_aSelTableLink.Call(this);
2000-09-18 16:15:01 +00:00
return 1;
}
long SwWrtShell::DefaultEndDrag(const Point * /*pPt*/, bool )
2000-09-18 16:15:01 +00:00
{
m_fnDrag = &SwWrtShell::BeginDrag;
2000-09-18 16:15:01 +00:00
if( IsExtSel() )
LeaveExtSel();
if( IsSelTableCells() )
m_aSelTableLink.Call(this);
2000-09-18 16:15:01 +00:00
EndSelect();
return 1;
}
// #i32329# Enhanced table selection
bool SwWrtShell::SelectTableRowCol( const Point& rPt, const Point* pEnd, bool bRowDrag )
{
SwMvContext aMvContext(this);
SttSelect();
if(SelTableRowCol( rPt, pEnd, bRowDrag ))
{
m_fnSetCrsr = &SwWrtShell::SetCrsrKillSel;
m_fnKillSel = &SwWrtShell::ResetSelect;
return true;
}
return false;
}
// Description: Selection of a table line or column
2000-09-18 16:15:01 +00:00
bool SwWrtShell::SelectTableRow()
2000-09-18 16:15:01 +00:00
{
if ( SelTableRow() )
2000-09-18 16:15:01 +00:00
{
m_fnSetCrsr = &SwWrtShell::SetCrsrKillSel;
m_fnKillSel = &SwWrtShell::ResetSelect;
return true;
2000-09-18 16:15:01 +00:00
}
return false;
2000-09-18 16:15:01 +00:00
}
bool SwWrtShell::SelectTableCol()
2000-09-18 16:15:01 +00:00
{
if ( SelTableCol() )
2000-09-18 16:15:01 +00:00
{
m_fnSetCrsr = &SwWrtShell::SetCrsrKillSel;
m_fnKillSel = &SwWrtShell::ResetSelect;
return true;
2000-09-18 16:15:01 +00:00
}
return false;
2000-09-18 16:15:01 +00:00
}
bool SwWrtShell::SelectTableCell()
{
if ( SelTableBox() )
{
m_fnSetCrsr = &SwWrtShell::SetCrsrKillSel;
m_fnKillSel = &SwWrtShell::ResetSelect;
return true;
}
return false;
}
2000-09-18 16:15:01 +00:00
// Description: Check if a word selection is present.
// According to the rules for intelligent cut / paste
// surrounding spaces are cut out.
// Return: Delivers the type of the word selection.
2000-09-18 16:15:01 +00:00
int SwWrtShell::IntelligentCut(int nSelection, bool bCut)
2000-09-18 16:15:01 +00:00
{
// On multiple selection no intelligent drag and drop
// there are multiple cursors, since a second was placed
2014-04-10 10:46:50 +02:00
// already at the target position.
if( IsAddMode() || !(nSelection & nsSelectionType::SEL_TXT) )
return NO_WORD;
2000-09-18 16:15:01 +00:00
OUString sText;
CharClass& rCC = GetAppCharClass();
// If the first character is no word character,
// no word selected.
sal_Unicode cPrev = GetChar(false);
sal_Unicode cNext = GetChar(true, -1);
if( !cPrev || !cNext ||
!rCC.isLetterNumeric( ( sText = OUString(cPrev) ), 0 ) ||
!rCC.isLetterNumeric( ( sText = OUString(cNext) ), 0 ) )
2000-09-18 16:15:01 +00:00
return NO_WORD;
cPrev = GetChar(false, -1);
cNext = GetChar(true);
2000-09-18 16:15:01 +00:00
int cWord = NO_WORD;
// is a word seleced?
2000-09-18 16:15:01 +00:00
if(!cWord && cPrev && cNext &&
CH_TXTATR_BREAKWORD != cPrev && CH_TXTATR_INWORD != cPrev &&
CH_TXTATR_BREAKWORD != cNext && CH_TXTATR_INWORD != cNext &&
!rCC.isLetterNumeric( ( sText = OUString(cPrev) ), 0 ) &&
!rCC.isLetterNumeric( ( sText = OUString(cNext) ), 0 ) )
2000-09-18 16:15:01 +00:00
cWord = WORD_NO_SPACE;
if(cWord == WORD_NO_SPACE && ' ' == cPrev )
2000-09-18 16:15:01 +00:00
{
cWord = WORD_SPACE_BEFORE;
// delete the space before
2000-09-18 16:15:01 +00:00
if(bCut)
{
Push();
if(IsCrsrPtAtEnd())
SwapPam();
ClearMark();
SetMark();
SwCrsrShell::Left(1,CRSR_SKIP_CHARS);
2000-09-18 16:15:01 +00:00
SwFEShell::Delete();
Pop( false );
2000-09-18 16:15:01 +00:00
}
}
else if(cWord == WORD_NO_SPACE && cNext == ' ')
{
cWord = WORD_SPACE_AFTER;
// delete the space behind
2000-09-18 16:15:01 +00:00
if(bCut) {
Push();
if(!IsCrsrPtAtEnd()) SwapPam();
ClearMark();
SetMark();
SwCrsrShell::Right(1,CRSR_SKIP_CHARS);
2000-09-18 16:15:01 +00:00
SwFEShell::Delete();
Pop( false );
2000-09-18 16:15:01 +00:00
}
}
return cWord;
}
// jump to the next / previous hyperlink - inside text and also
// on graphics
bool SwWrtShell::SelectNextPrevHyperlink( bool bNext )
{
StartAction();
bool bRet = SwCrsrShell::SelectNxtPrvHyperlink( bNext );
if( !bRet )
{
// will we have this feature?
EnterStdMode();
if( bNext )
SttEndDoc(true);
else
SttEndDoc(false);
bRet = SwCrsrShell::SelectNxtPrvHyperlink( bNext );
}
EndAction();
bool bCreateXSelection = false;
const bool bFrmSelected = IsFrmSelected() || IsObjSelected();
if( IsSelection() )
{
if ( bFrmSelected )
UnSelectFrm();
// Set the function pointer for the canceling of the selection
// set at cursor
m_fnKillSel = &SwWrtShell::ResetSelect;
m_fnSetCrsr = &SwWrtShell::SetCrsrKillSel;
bCreateXSelection = true;
}
else if( bFrmSelected )
{
EnterSelFrmMode();
bCreateXSelection = true;
}
else if( (CNT_GRF | CNT_OLE ) & GetCntType() )
{
SelectObj( GetCharRect().Pos() );
EnterSelFrmMode();
bCreateXSelection = true;
}
if( bCreateXSelection )
SwTransferable::CreateSelection( *this );
return bRet;
}
// For the preservation of the selection the cursor will be moved left
// after SetMark(), so that the cursor is not moved by inserting text.
// Because a present selection at the CORE page is cleared at the
// current cursor position, the cursor will be pushed on the stack.
// After moving, they will again resummarized.
2000-09-18 16:15:01 +00:00
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */