2000-09-18 16:15:01 +00:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
2008-04-10 20:29:54 +00:00
|
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
2000-09-18 16:15:01 +00:00
|
|
|
*
|
2010-02-12 15:01:35 +01:00
|
|
|
* Copyright 2000, 2010 Oracle and/or its affiliates.
|
2000-09-18 16:15:01 +00:00
|
|
|
*
|
2008-04-10 20:29:54 +00:00
|
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
2000-09-18 16:15:01 +00:00
|
|
|
*
|
2008-04-10 20:29:54 +00:00
|
|
|
* This file is part of OpenOffice.org.
|
2000-09-18 16:15:01 +00:00
|
|
|
*
|
2008-04-10 20:29:54 +00:00
|
|
|
* OpenOffice.org is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Lesser General Public License version 3
|
|
|
|
* only, as published by the Free Software Foundation.
|
2000-09-18 16:15:01 +00:00
|
|
|
*
|
2008-04-10 20:29:54 +00:00
|
|
|
* OpenOffice.org is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU Lesser General Public License version 3 for more details
|
|
|
|
* (a copy is included in the LICENSE file that accompanied this code).
|
2000-09-18 16:15:01 +00:00
|
|
|
*
|
2008-04-10 20:29:54 +00:00
|
|
|
* You should have received a copy of the GNU Lesser General Public License
|
|
|
|
* version 3 along with OpenOffice.org. If not, see
|
|
|
|
* <http://www.openoffice.org/license.html>
|
|
|
|
* for a copy of the LGPLv3 License.
|
2000-09-18 16:15:01 +00:00
|
|
|
*
|
|
|
|
************************************************************************/
|
2006-09-16 22:18:02 +00:00
|
|
|
|
|
|
|
// MARKER(update_precomp.py): autogen include statement, do not remove
|
|
|
|
#include "precompiled_sw.hxx"
|
2003-04-04 15:39:39 +00:00
|
|
|
#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
|
|
|
|
#include <comphelper/processfactory.hxx>
|
2007-05-10 15:24:35 +00:00
|
|
|
#include <svx/dialogs.hrc>
|
2000-09-18 16:15:01 +00:00
|
|
|
#include <hintids.hxx>
|
|
|
|
#include <cmdid.h>
|
|
|
|
#include <helpid.h>
|
|
|
|
|
2007-11-23 15:27:22 +00:00
|
|
|
#include <i18npool/mslangid.hxx>
|
2009-10-16 00:05:16 +02:00
|
|
|
#include <svl/languageoptions.hxx>
|
2010-01-08 18:32:51 +01:00
|
|
|
#include <editeng/langitem.hxx>
|
2007-11-23 15:27:22 +00:00
|
|
|
#include <svtools/langtab.hxx>
|
2009-10-16 00:05:16 +02:00
|
|
|
#include <svl/slstitm.hxx>
|
2007-11-23 15:27:22 +00:00
|
|
|
#include <string.h>
|
2009-10-16 00:05:16 +02:00
|
|
|
#include <svl/stritem.hxx>
|
2000-09-18 16:15:01 +00:00
|
|
|
#include <svx/htmlmode.hxx>
|
2009-10-16 00:05:16 +02:00
|
|
|
#include <svl/whiter.hxx>
|
2000-09-18 16:15:01 +00:00
|
|
|
#include <sfx2/bindings.hxx>
|
|
|
|
#include <sfx2/dispatch.hxx>
|
|
|
|
#include <sfx2/objitem.hxx>
|
|
|
|
#include <vcl/msgbox.hxx>
|
2008-12-09 07:49:49 +00:00
|
|
|
#include <vcl/unohelp2.hxx>
|
2000-09-18 16:15:01 +00:00
|
|
|
#include <sfx2/request.hxx>
|
2009-10-16 00:05:16 +02:00
|
|
|
#include <svl/eitem.hxx>
|
|
|
|
#include <svl/macitem.hxx>
|
2010-01-08 18:32:51 +01:00
|
|
|
#include <editeng/lrspitem.hxx>
|
|
|
|
#include <editeng/ulspitem.hxx>
|
|
|
|
#include <editeng/colritem.hxx>
|
|
|
|
#include <editeng/tstpitem.hxx>
|
|
|
|
#include <editeng/brshitem.hxx>
|
|
|
|
#include <editeng/svxacorr.hxx>
|
2009-10-16 00:05:16 +02:00
|
|
|
#include <svl/cjkoptions.hxx>
|
|
|
|
#include <svl/ctloptions.hxx>
|
2008-01-10 11:33:10 +00:00
|
|
|
#include <IDocumentSettingAccess.hxx>
|
2002-07-04 13:55:54 +00:00
|
|
|
#include <charfmt.hxx>
|
2010-01-08 18:32:51 +01:00
|
|
|
#include <editeng/fontitem.hxx>
|
2007-06-27 12:26:08 +00:00
|
|
|
#include <svx/SmartTagItem.hxx>
|
2002-07-05 08:57:47 +00:00
|
|
|
#include <svx/dialmgr.hxx>
|
2000-09-18 16:15:01 +00:00
|
|
|
#include <fmtinfmt.hxx>
|
|
|
|
#include <swwait.hxx>
|
|
|
|
#include <wrtsh.hxx>
|
|
|
|
#include <wview.hxx>
|
|
|
|
#include <swmodule.hxx>
|
|
|
|
#include <viewopt.hxx>
|
|
|
|
#include <uitool.hxx>
|
|
|
|
#include <swevent.hxx>
|
2002-07-05 08:57:47 +00:00
|
|
|
#include <fmthdft.hxx>
|
|
|
|
#include <pagedesc.hxx>
|
2000-09-18 16:15:01 +00:00
|
|
|
#include <textsh.hxx>
|
CWS-TOOLING: integrate CWS swrefactormarks2
2009-04-09 12:51:41 +0200 b_michaelsen r270689 : #i94949# cleaned up assertions after rebasing
2009-04-08 17:37:08 +0200 b_michaelsen r270658 : fixing sw/source/ui/utlui/makefile.mk
2009-04-07 17:56:54 +0200 b_michaelsen r270606 : added bookctrl.cxx to EXCEPTIONFILES, because this is needed for stl on unxsols4
2009-04-07 17:05:20 +0200 b_michaelsen r270603 : added crbm.cxx to EXCEPTIONFILES, because this is needed for stl on unxsols4
2009-04-02 23:44:38 +0200 b_michaelsen r270436 : CWS-TOOLING: rebase CWS swrefactormarks2 to trunk@270033 (milestone: DEV300:m45)
2009-02-27 16:25:31 +0100 b_michaelsen r268606 : #i94949# fixed Windows buildbreaker
2009-02-25 18:01:13 +0100 b_michaelsen r268464 : #i94949# Bookmarktest document filter roundtrips
2009-02-24 18:23:55 +0100 b_michaelsen r268404 : #i94949# Bookmark unittests
2009-02-23 19:47:44 +0100 b_michaelsen r268370 : #i94949# added unittest for bookmarks
2009-02-23 12:22:07 +0100 b_michaelsen r268348 : #i94949# fixing CheckCrossReferences testcase
2009-02-20 18:12:50 +0100 b_michaelsen r268335 : #i94949# fixing SwXTextRange
2009-02-18 18:32:57 +0100 b_michaelsen r268252 : #i94949# deregistering DdeBookmarks on delete
2009-02-18 18:29:08 +0100 b_michaelsen r268251 : fixing dbgoutsw.cxx for debug builds
2009-02-16 18:42:43 +0100 b_michaelsen r267834 : CWS-TOOLING: rebase CWS swrefactormarks2 to trunk@267171 (milestone: DEV300:m41)
2009-02-12 15:32:02 +0100 b_michaelsen r267667 : #i94949 fixed crossrefbookmark naming
2009-02-11 18:30:08 +0100 b_michaelsen r267624 : #94949# fixing bookmark navigation
2009-02-11 13:55:26 +0100 b_michaelsen r267599 : #i94949# fixed bookmark naming
2009-02-10 17:53:05 +0100 b_michaelsen r267571 : #i94949# renamed HasOtherMarkPos to IsExpanded
2009-02-10 17:23:01 +0100 b_michaelsen r267564 : #i94949# renamed ::sw::bookmark namespace to more fitting ::sw::mark
2009-02-10 16:16:32 +0100 b_michaelsen r267553 : #i94949# creating only CrossRefBookmark per Txtnode
2009-02-10 12:14:05 +0100 b_michaelsen r267547 : #i94949# fixed bookmark count in navigator
2009-02-09 19:12:18 +0100 b_michaelsen r267532 : #i94949# lcl_CopyBookmarks(..) - handle marks on boundaries correctly
2009-02-09 17:32:45 +0100 b_michaelsen r267524 : #i94949# setting the refobject of the DdeBookmark in Sin SwServerObject::SetDdeBookmark(..)
2009-02-09 17:22:15 +0100 b_michaelsen r267523 : #i94949# trying to harden SwServerObject
2009-02-09 16:47:32 +0100 b_michaelsen r267521 : #i94949# lcl_CopyBookmarks(..): try to get the source mark name, if possible
2009-02-09 16:05:42 +0100 b_michaelsen r267519 : #i94949# clearing the OtherMarkPos if PaM has no mark in repositionMark(..), swapping inverted bookmarks without hissing an assertion
2009-02-09 15:55:38 +0100 b_michaelsen r267518 : #i94949# checking for out-of-bounds in SwView::ExecuteStatusLine(..)
2009-02-09 15:23:47 +0100 b_michaelsen r267517 : #i94949# using an UNO_BOOKMARK in ui/dbui/dbinsdlg.cxx
2009-02-09 14:14:47 +0100 b_michaelsen r267514 : #i94949# IDocumentMarkAccess::GetType(..) asserts on unknown type
2009-02-09 14:04:25 +0100 b_michaelsen r267513 : #i94949# using rtl strings instead of tools-strings in CrossRefBookmarks
2009-02-09 13:55:01 +0100 b_michaelsen r267510 : #i94949# using empty string for UnoMark construction
2009-02-09 13:46:46 +0100 b_michaelsen r267509 : #i94949# removed superfluous #includes, removed superfluous member DdeBookmark::bGenerateName, initialized DdeBookmark::m_aRefObj removed superfluous local _FindItem::ClearObj
2009-02-06 14:38:37 +0100 b_michaelsen r267462 : #i94949# fixing FN_STAT_BOOKMARK dispatches
2009-02-05 18:05:07 +0100 b_michaelsen r267436 : #i94949# removing superfluous #includes
2009-02-04 15:51:31 +0100 b_michaelsen r267391 : fixing resync merge error
2009-02-02 19:39:55 +0100 b_michaelsen r267294 : #i94949# bookmark performance
2009-01-30 19:30:51 +0100 b_michaelsen r267229 : #i94949# throwing IllegalArgumentException, if appropriate
2009-01-30 19:29:56 +0100 b_michaelsen r267228 : #i94949# refactored lcl_FillBookmarkArray, comments, constness
2009-01-30 19:23:49 +0100 b_michaelsen r267227 : #i94949# refactored lcl_FillBookmarkArray, comments, constness
2009-01-30 19:16:06 +0100 b_michaelsen r267226 : #i94949# refactored lcl_FillBookmarkArray
2009-01-30 17:59:27 +0100 b_michaelsen r267222 : #i94949# removed superficial #include
2009-01-30 17:50:02 +0100 b_michaelsen r267220 : #i94949# SwXTextRange remembers its UNO bookmark
2009-01-29 20:19:58 +0100 b_michaelsen r267168 : #i94949# implemented IDocumentMarkAccess::findBookmark
2009-01-29 17:22:17 +0100 b_michaelsen r267162 : #i94949# implemented renameMark in Markmanager
2009-01-29 14:17:10 +0100 b_michaelsen r267134 : #i94949# cleanup in SwXBookmark, whitespace
2009-01-29 13:21:54 +0100 b_michaelsen r267125 : #i94949# cleanup in SwXBookmark, whitespace
2009-01-29 13:06:10 +0100 b_michaelsen r267120 : #i94949# cleanup in SwXBookmark, whitespace
2009-01-29 13:00:09 +0100 b_michaelsen r267118 : #i94949# cleanup in SwXBookmark, whitespace
2009-01-29 10:35:10 +0100 b_michaelsen r267101 : #i94949# renamed SetCrsrToBkmk to SetCrsrToMark, moving to start/end of doc if no more bookmarks can be found
2009-01-28 17:05:36 +0100 b_michaelsen r267070 : #i94949# fixed order in aProvNamesId in unocoll.cxx
2009-01-28 15:46:13 +0100 b_michaelsen r267063 : #i94949# documentation
2009-01-28 15:36:59 +0100 b_michaelsen r267062 : #i94949# removing superficial #include
2009-01-28 15:30:36 +0100 b_michaelsen r267061 : #i94949# basic code conventions
2009-01-28 11:14:30 +0100 b_michaelsen r267039 : #i94949# comparing to the actual name of the new mark
2009-01-26 15:22:25 +0100 b_michaelsen r266927 : #i94949# performance fixes
2009-01-14 21:16:56 +0100 b_michaelsen r266332 : #i94949# fixing linux x86-64 compiler warnings
2009-01-14 19:52:06 +0100 b_michaelsen r266331 : #i94949# fixing some compiler warnings
2008-12-15 13:04:49 +0100 b_michaelsen r265474 : #i94949# fixed microsoft compiler warnings
2008-12-12 18:26:02 +0100 b_michaelsen r265434 : #i94949# fixed pro platform buildbreakers
2008-12-11 17:51:24 +0100 b_michaelsen r265342 : CWS-TOOLING: rebase CWS swrefactormarks2 to trunk@264807 (milestone: DEV300:m37)
2008-12-09 18:30:59 +0100 b_michaelsen r265134 : #i94949# fixed IDocumentMarkAccess::GetType for new mark inheritance tree
2008-12-09 16:56:26 +0100 b_michaelsen r265118 : #i94949# fixed deleteMark optimization
2008-12-09 14:55:58 +0100 b_michaelsen r265092 : #i94949# DdeLink and DdeBookmark
2008-12-05 18:28:05 +0100 b_michaelsen r264914 : #i94949# fixed InitDoc in bookmarks
2008-12-02 02:23:51 +0100 b_michaelsen r264649 : #i94949# removed obsolete naming proposal code in SwXTextRange, fixed navigator reminders to forget the oldest reminder when the pool is empty
2008-12-02 02:05:19 +0100 b_michaelsen r264648 : #i94949# using bisect search for delete
2008-12-02 01:58:16 +0100 b_michaelsen r264647 : #i94949# using bisect search for delete
2008-12-02 01:37:33 +0100 b_michaelsen r264646 : #i94949# using bisect search for delete
2008-12-02 01:03:29 +0100 b_michaelsen r264645 : #i94949# fixed deleteMark crash
2008-12-01 20:55:00 +0100 b_michaelsen r264638 : #i94949# removed crossrefs from ui enumerations
2008-12-01 15:48:12 +0100 b_michaelsen r264613 : #i94949# removed superfluous local functions
2008-12-01 15:01:19 +0100 b_michaelsen r264608 : #i94949# optimized insertion of new marks
2008-12-01 14:33:21 +0100 b_michaelsen r264603 : #i94949# simplified code finding Fieldmark for a position
2008-12-01 14:05:55 +0100 b_michaelsen r264598 : #i94949# fixed reverse travelling through marks, removed obsolete getUniqueMarkName()
2008-11-27 18:48:15 +0100 b_michaelsen r264515 : #i94949# fixed _SaveCntntIdx and friends
2008-11-27 15:59:49 +0100 b_michaelsen r264500 : #i94949# fix Mark position only in ctor
2008-11-27 15:52:28 +0100 b_michaelsen r264497 : #i94949# fixed Bug in SwXBookmark, was using pDoc too early
2008-11-26 14:54:22 +0100 b_michaelsen r264396 : #i94949# fixed documentation, simplified navigator reminder code
2008-11-24 20:45:51 +0100 b_michaelsen r264266 : #i94949# removed last obsolete getUniqueMarkName calls
2008-11-24 20:21:35 +0100 b_michaelsen r264265 : #i94949# fixed typo in IDocumentMarkAccess, removed obsolete getUniqueMarkName calls
2008-11-24 18:34:32 +0100 b_michaelsen r264264 : #i94949# repositioning of Marks, removed possibility to delete marks by name in the core, refactoring of navigator reminder generation
2008-11-21 14:08:49 +0100 b_michaelsen r264137 : #i94949# simplified makeMark
2008-11-21 12:07:09 +0100 b_michaelsen r264120 : #i94949# moved ShortName and KeyCode from IMark to IBookmark
2008-11-19 12:50:49 +0100 b_michaelsen r263981 : #i94949# starting refactoring of bookmark naming
2008-11-19 11:31:08 +0100 b_michaelsen r263972 : #i94949# getting rid of obsolete dynamic casts
2008-11-18 19:06:09 +0100 b_michaelsen r263795 : #i94949# getting rid of index based mark access, IDocumentMarkAccess already provides iterators
2008-11-18 17:50:18 +0100 b_michaelsen r263792 : #i94949# getting rid of index based mark access, IDocumentMarkAccess already provides iterators
2008-11-18 16:48:20 +0100 b_michaelsen r263783 : #i94949# removed methods from crsrsh which are already available directly via IDocumentMarkAccess
2008-11-18 11:31:35 +0100 b_michaelsen r263753 : #i94949# cleaning up mark code in crsrsh
2008-11-17 10:15:25 +0100 b_michaelsen r263705 : #i94949# removed possible integer overflow
2008-11-14 18:48:45 +0100 b_michaelsen r263695 : #i94949# management of mark names in MarkManager
2008-11-14 18:23:40 +0100 b_michaelsen r263693 : #i94949# using polymorphism to do mark-specific setup in SwDoc
2008-11-14 16:27:09 +0100 b_michaelsen r263684 : #i94949# got rid of makeCrossRefBookmark
2008-11-14 13:03:32 +0100 b_michaelsen r263674 : #i94949# refactored Correction methods
2008-11-13 12:27:55 +0100 b_michaelsen r263631 : #i94949# got rid of old-style tools assertions in new code
2008-11-12 16:58:16 +0100 b_michaelsen r263608 : #i94949# added assertion for unique names
2008-11-12 16:55:18 +0100 b_michaelsen r263607 : #i94949# maked XFormField deprecated
2008-11-12 13:04:29 +0100 b_michaelsen r263587 : #i94949# replaced IDocumentMarkAccess::GetType with simple dynamic_cast where possible
2008-11-11 18:45:53 +0100 b_michaelsen r263572 : #i94949# cleaned up SwHstryBookmark
2008-11-11 13:48:18 +0100 b_michaelsen r263557 : #i94949# removed dynamic_casts to SwModify by inheriting IMark from it
2008-11-11 11:26:28 +0100 b_michaelsen r263548 : #i94949# fixed SwXBookmark
2008-11-10 17:01:19 +0100 b_michaelsen r263529 : #i94949# fixed DdeBookmarks in clipboard
2008-11-10 16:44:52 +0100 b_michaelsen r263527 : #i94949# formatting
2008-11-10 16:29:16 +0100 b_michaelsen r263526 : #i94949# fixing unoobj.cxx
2008-11-10 16:23:50 +0100 b_michaelsen r263525 : #i94949# cleaning up crossrefbookmark.cxx/.hxx
2008-11-10 16:02:08 +0100 b_michaelsen r263524 : #i94949# Pdf Export should only generate 'real' bookmarks
2008-11-10 15:33:58 +0100 b_michaelsen r263521 : #i94949# removed const_casts
2008-11-10 15:12:06 +0100 b_michaelsen r263520 : #i94949# moved _DelBookmarks into MarksManager
2008-11-07 18:48:38 +0100 b_michaelsen r263480 : #i94949# using iterator interface
2008-11-07 18:41:46 +0100 b_michaelsen r263478 : #i94949# using iterator interface
2008-11-07 18:07:41 +0100 b_michaelsen r263477 : #i94949# using iterator interface
2008-11-07 17:54:41 +0100 b_michaelsen r263476 : #i94949# using iterator interface
2008-11-07 17:44:41 +0100 b_michaelsen r263475 : #i94949# moved correction methods into MarkManager
2008-11-06 18:47:28 +0100 b_michaelsen r263404 : #i94949# getting rid of superfluous const_casts
2008-11-06 17:58:01 +0100 b_michaelsen r263403 : #i94949# no more setting of mark positions outside of the core
2008-11-06 17:08:37 +0100 b_michaelsen r263401 : #i94949# removed setters from IMark
2008-11-06 13:55:25 +0100 b_michaelsen r263383 : #i94949 SwDoc does not implement IDocumentMarkAccess anymore
2008-11-04 18:17:03 +0100 b_michaelsen r263333 : #i94949# began removing IDocumentMarkAccess from SwDoc
2008-11-04 16:48:34 +0100 b_michaelsen r263330 : removing dead code (SwBitArray) found by mst
2008-11-04 16:29:32 +0100 b_michaelsen r263329 : removing dead code (SwBitArray) found by mst
2008-11-04 14:57:48 +0100 b_michaelsen r263326 : removing dead code (SwBitArray) found by mst
2008-11-04 14:50:18 +0100 b_michaelsen r263325 : #i94949# stricter typing in IDocumentMarkAccess
2008-10-24 15:16:27 +0200 b_michaelsen r262647 : #i94949# renamed ::sw::bookmark::SimpleMark to NavigatorReminder to fit the IDocumentMarkAccess enum
2008-10-24 15:10:10 +0200 b_michaelsen r262646 : #i94949# only 'real' bookmark implement IBookmark, Marks also get removed from m_vFieldmarks on delete/clear
2008-10-24 13:06:23 +0200 b_michaelsen r262636 : #i94949# Fieldmark tabnavigation
2008-10-23 12:16:36 +0200 b_michaelsen r262619 : #i94949# Fieldmark classes and filters
2008-10-22 13:17:18 +0200 b_michaelsen r262597 : #i94949# writer import fixes
2008-10-21 11:30:38 +0200 b_michaelsen r262565 : #i94949# renamed methods containing Bookmark in the generic IMark interface
2008-10-20 14:09:02 +0200 b_michaelsen r262318 : #i94949# fixed SwDoc::CorrRel
2008-10-16 22:45:13 +0200 b_michaelsen r262273 : #i94949 simplified Before/After methods
2008-10-16 21:40:57 +0200 b_michaelsen r262271 : #i94949 renamed SimpleMark to NavigatorReminder
2008-10-16 21:15:23 +0200 b_michaelsen r262270 : #i94949 using shared_ptr only in MarkManager
2008-10-16 17:46:37 +0200 b_michaelsen r262269 : #i94949# getFieldmarkBefore and getFieldmarkAfter
2008-10-16 17:12:13 +0200 b_michaelsen r262265 : #i94949# cleanup in crbm.cxx
2008-10-16 12:49:01 +0200 b_michaelsen r262257 : #i94949# fixed usage of invalid iterator, fixed invalid cast
2008-10-15 15:34:20 +0200 b_michaelsen r262239 : #i94949# added moved files
2008-10-15 15:26:45 +0200 b_michaelsen r262237 : #i94949# initial reimplementation of Bookmarks
2009-04-21 15:40:02 +00:00
|
|
|
#include <IMark.hxx>
|
2001-02-02 16:46:27 +00:00
|
|
|
#include <swdtflvr.hxx>
|
2000-09-18 16:15:01 +00:00
|
|
|
#include <docstat.hxx>
|
|
|
|
#include <outline.hxx>
|
|
|
|
#include <tablemgr.hxx>
|
|
|
|
#include <swundo.hxx> // fuer Undo-IDs
|
|
|
|
#include <reffld.hxx>
|
|
|
|
#include <docsh.hxx>
|
|
|
|
#include <mdiexp.hxx>
|
|
|
|
#include <inputwin.hxx>
|
|
|
|
#include <pardlg.hxx>
|
|
|
|
#include <frmatr.hxx>
|
|
|
|
#include <fmtcol.hxx>
|
|
|
|
#include <cellatr.hxx>
|
|
|
|
#include <edtwin.hxx>
|
|
|
|
#include <redlndlg.hxx>
|
2002-08-15 06:53:06 +00:00
|
|
|
#include "fldmgr.hxx"
|
2000-09-18 16:15:01 +00:00
|
|
|
|
|
|
|
#include <globals.hrc>
|
|
|
|
#include <shells.hrc>
|
|
|
|
#include <app.hrc>
|
|
|
|
#include <web.hrc>
|
2002-07-04 13:55:54 +00:00
|
|
|
#include "paratr.hxx"
|
2002-07-01 08:09:41 +00:00
|
|
|
#include <crsskip.hxx>
|
2004-04-27 12:44:46 +00:00
|
|
|
#include <docstat.hxx>
|
2006-05-02 14:23:30 +00:00
|
|
|
#include <vcl/svapp.hxx>
|
|
|
|
#include <sfx2/app.hxx>
|
2007-06-27 12:26:08 +00:00
|
|
|
#include <breakit.hxx>
|
|
|
|
|
|
|
|
#include <SwSmartTagMgr.hxx>
|
|
|
|
|
2010-01-08 18:32:51 +01:00
|
|
|
#include <editeng/acorrcfg.hxx>
|
2007-09-27 11:30:56 +00:00
|
|
|
#include "swabstdlg.hxx"
|
|
|
|
#include "misc.hrc"
|
|
|
|
#include "chrdlg.hrc"
|
2006-08-14 16:55:24 +00:00
|
|
|
#include <IDocumentStatistics.hxx>
|
|
|
|
|
2007-11-23 15:27:22 +00:00
|
|
|
#include <sfx2/sfxdlg.hxx>
|
2009-10-16 00:05:16 +02:00
|
|
|
#include <svl/languageoptions.hxx>
|
2009-10-06 07:38:24 +02:00
|
|
|
#include <unotools/lingucfg.hxx>
|
2007-11-23 15:27:22 +00:00
|
|
|
#include <com/sun/star/beans/XPropertySet.hpp>
|
|
|
|
#include <com/sun/star/util/XChangesBatch.hpp>
|
|
|
|
#include <com/sun/star/uno/Any.hxx>
|
2010-01-08 18:32:51 +01:00
|
|
|
#include <editeng/unolingu.hxx>
|
2009-10-16 00:05:16 +02:00
|
|
|
#include <unotools/syslocaleoptions.hxx>
|
2007-11-23 15:27:22 +00:00
|
|
|
#include <doc.hxx>
|
|
|
|
#include <view.hxx>
|
|
|
|
#include <ndtxt.hxx>
|
|
|
|
#include <pam.hxx>
|
|
|
|
|
2008-06-16 07:23:44 +00:00
|
|
|
#include <langhelper.hxx>
|
2007-11-23 15:27:22 +00:00
|
|
|
|
2007-06-27 12:26:08 +00:00
|
|
|
using namespace ::com::sun::star;
|
|
|
|
|
2007-11-23 15:27:22 +00:00
|
|
|
|
2008-06-16 07:23:44 +00:00
|
|
|
void lcl_CharDialog( SwWrtShell &rWrtSh, BOOL bUseDialog, USHORT nSlot,const SfxItemSet *pArgs, SfxRequest *pReq )
|
2007-11-23 15:27:22 +00:00
|
|
|
{
|
|
|
|
FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebView, &rWrtSh.GetView()));
|
|
|
|
SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< UINT16 >(eMetric)));
|
|
|
|
SfxItemSet aCoreSet( rWrtSh.GetView().GetPool(),
|
|
|
|
RES_CHRATR_BEGIN, RES_CHRATR_END-1,
|
|
|
|
RES_TXTATR_INETFMT, RES_TXTATR_INETFMT,
|
|
|
|
RES_BACKGROUND, RES_BACKGROUND,
|
|
|
|
FN_PARAM_SELECTION, FN_PARAM_SELECTION,
|
|
|
|
SID_HTML_MODE, SID_HTML_MODE,
|
|
|
|
SID_ATTR_CHAR_WIDTH_FIT_TO_LINE, SID_ATTR_CHAR_WIDTH_FIT_TO_LINE,
|
|
|
|
0 );
|
2008-03-05 16:26:34 +00:00
|
|
|
rWrtSh.GetCurAttr( aCoreSet );
|
2007-11-23 15:27:22 +00:00
|
|
|
BOOL bSel = rWrtSh.HasSelection();
|
|
|
|
BOOL bSelectionPut = FALSE;
|
|
|
|
if(bSel || rWrtSh.IsInWord())
|
|
|
|
{
|
|
|
|
if(!bSel)
|
|
|
|
{
|
|
|
|
rWrtSh.StartAction();
|
|
|
|
rWrtSh.Push();
|
|
|
|
if(!rWrtSh.SelectTxtAttr( RES_TXTATR_INETFMT ))
|
|
|
|
rWrtSh.SelWrd();
|
|
|
|
}
|
|
|
|
aCoreSet.Put(SfxStringItem(FN_PARAM_SELECTION, rWrtSh.GetSelTxt()));
|
|
|
|
bSelectionPut = TRUE;
|
|
|
|
if(!bSel)
|
|
|
|
{
|
|
|
|
rWrtSh.Pop(FALSE);
|
|
|
|
rWrtSh.EndAction();
|
|
|
|
}
|
|
|
|
}
|
2008-06-16 07:23:44 +00:00
|
|
|
aCoreSet.Put( SfxUInt16Item( SID_ATTR_CHAR_WIDTH_FIT_TO_LINE,
|
2007-11-23 15:27:22 +00:00
|
|
|
rWrtSh.GetScalingOfSelectedText() ) );
|
|
|
|
// Das CHRATR_BACKGROUND-Attribut wird fuer den Dialog in
|
|
|
|
// ein RES_BACKGROUND verwandelt und wieder zurueck ...
|
|
|
|
const SfxPoolItem *pTmpBrush;
|
|
|
|
if( SFX_ITEM_SET == aCoreSet.GetItemState( RES_CHRATR_BACKGROUND, TRUE, &pTmpBrush ) )
|
|
|
|
{
|
|
|
|
SvxBrushItem aTmpBrush( *((SvxBrushItem*)pTmpBrush) );
|
|
|
|
aTmpBrush.SetWhich( RES_BACKGROUND );
|
|
|
|
aCoreSet.Put( aTmpBrush );
|
|
|
|
}
|
|
|
|
|
|
|
|
aCoreSet.Put(SfxUInt16Item(SID_HTML_MODE, ::GetHtmlMode(rWrtSh.GetView().GetDocShell())));
|
|
|
|
SfxAbstractTabDialog* pDlg = NULL;
|
|
|
|
if ( bUseDialog && GetActiveView() )
|
|
|
|
{
|
|
|
|
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
|
|
|
|
DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
|
|
|
|
|
|
|
|
pDlg = pFact->CreateSwCharDlg( rWrtSh.GetView().GetWindow(), rWrtSh.GetView(), aCoreSet, DLG_CHAR );
|
|
|
|
DBG_ASSERT(pDlg, "Dialogdiet fail!");
|
|
|
|
if( FN_INSERT_HYPERLINK == nSlot )
|
|
|
|
pDlg->SetCurPageId(TP_CHAR_URL);
|
|
|
|
}
|
|
|
|
|
|
|
|
const SfxItemSet* pSet = NULL;
|
|
|
|
if ( !bUseDialog )
|
|
|
|
pSet = pArgs;
|
|
|
|
else if ( NULL != pDlg && pDlg->Execute() == RET_OK ) /* #110771# pDlg can be NULL */
|
|
|
|
{
|
|
|
|
pSet = pDlg->GetOutputItemSet();
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( pSet)
|
|
|
|
{
|
|
|
|
SfxItemSet aTmpSet( *pSet );
|
|
|
|
if( SFX_ITEM_SET == aTmpSet.GetItemState( RES_BACKGROUND, FALSE, &pTmpBrush ) )
|
|
|
|
{
|
|
|
|
SvxBrushItem aTmpBrush( *((SvxBrushItem*)pTmpBrush) );
|
|
|
|
aTmpBrush.SetWhich( RES_CHRATR_BACKGROUND );
|
|
|
|
aTmpSet.Put( aTmpBrush );
|
|
|
|
}
|
|
|
|
|
|
|
|
aTmpSet.ClearItem( RES_BACKGROUND );
|
|
|
|
|
|
|
|
const SfxPoolItem* pSelectionItem;
|
|
|
|
BOOL bInsert = FALSE;
|
|
|
|
xub_StrLen nInsert = 0;
|
|
|
|
|
|
|
|
// aus ungeklaerter Ursache ist das alte Item wieder im Set
|
|
|
|
if( !bSelectionPut && SFX_ITEM_SET == aTmpSet.GetItemState(FN_PARAM_SELECTION, FALSE, &pSelectionItem) )
|
|
|
|
{
|
|
|
|
String sInsert = ((const SfxStringItem*)pSelectionItem)->GetValue();
|
|
|
|
bInsert = sInsert.Len() != 0;
|
|
|
|
if(bInsert)
|
|
|
|
{
|
|
|
|
nInsert = sInsert.Len();
|
|
|
|
rWrtSh.StartAction();
|
|
|
|
rWrtSh.Insert( sInsert );
|
|
|
|
rWrtSh.SetMark();
|
|
|
|
rWrtSh.ExtendSelection(FALSE, sInsert.Len());
|
|
|
|
SfxRequest aReq( rWrtSh.GetView().GetViewFrame(), FN_INSERT_STRING );
|
|
|
|
aReq.AppendItem( SfxStringItem( FN_INSERT_STRING, sInsert ) );
|
|
|
|
aReq.Done();
|
|
|
|
SfxRequest aReq1( rWrtSh.GetView().GetViewFrame(), FN_CHAR_LEFT );
|
|
|
|
aReq1.AppendItem( SfxInt16Item(FN_PARAM_MOVE_COUNT, nInsert) );
|
|
|
|
aReq1.AppendItem( SfxBoolItem(FN_PARAM_MOVE_SELECTION, TRUE) );
|
|
|
|
aReq1.Done();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
aTmpSet.ClearItem(FN_PARAM_SELECTION);
|
|
|
|
|
|
|
|
SwTxtFmtColl* pColl = rWrtSh.GetCurTxtFmtColl();
|
|
|
|
if(bSel && rWrtSh.IsSelFullPara() && pColl && pColl->IsAutoUpdateFmt())
|
|
|
|
{
|
|
|
|
rWrtSh.AutoUpdatePara(pColl, aTmpSet);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
rWrtSh.SetAttr( aTmpSet );
|
|
|
|
if (pReq)
|
|
|
|
pReq->Done(aTmpSet);
|
|
|
|
if(bInsert)
|
|
|
|
{
|
|
|
|
SfxRequest aReq1( rWrtSh.GetView().GetViewFrame(), FN_CHAR_RIGHT );
|
|
|
|
aReq1.AppendItem( SfxInt16Item(FN_PARAM_MOVE_COUNT, nInsert) );
|
|
|
|
aReq1.AppendItem( SfxBoolItem(FN_PARAM_MOVE_SELECTION, FALSE) );
|
|
|
|
aReq1.Done();
|
|
|
|
rWrtSh.SwapPam();
|
|
|
|
rWrtSh.ClearMark();
|
|
|
|
rWrtSh.DontExpandFmt();
|
|
|
|
rWrtSh.EndAction();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
delete pDlg;
|
|
|
|
}
|
|
|
|
|
2008-06-16 07:23:44 +00:00
|
|
|
/*--------------------------------------------------------------------
|
|
|
|
Beschreibung:
|
|
|
|
--------------------------------------------------------------------*/
|
|
|
|
|
|
|
|
short lcl_AskRedlineMode(Window *pWin)
|
|
|
|
{
|
|
|
|
MessBox aQBox( pWin, 0,
|
|
|
|
String( SW_RES( STR_REDLINE_TITLE ) ),
|
|
|
|
String( SW_RES( STR_REDLINE_MSG ) ) );
|
|
|
|
aQBox.SetImage( QueryBox::GetStandardImage() );
|
|
|
|
USHORT nBtnFlags = BUTTONDIALOG_DEFBUTTON |
|
|
|
|
BUTTONDIALOG_OKBUTTON |
|
|
|
|
BUTTONDIALOG_FOCUSBUTTON;
|
|
|
|
|
|
|
|
aQBox.AddButton(String(SW_RES(STR_REDLINE_ACCEPT_ALL)), RET_OK, nBtnFlags);
|
2010-06-04 13:46:22 +02:00
|
|
|
// FIXME: HELPID
|
|
|
|
aQBox.GetPushButton( RET_OK )->SetHelpId(""/*HID_AUTOFORMAT_ACCEPT*/);
|
2008-06-16 07:23:44 +00:00
|
|
|
aQBox.AddButton(String(SW_RES(STR_REDLINE_REJECT_ALL)), RET_CANCEL, BUTTONDIALOG_CANCELBUTTON);
|
2010-06-04 13:46:22 +02:00
|
|
|
// FIXME: HELPID
|
|
|
|
aQBox.GetPushButton( RET_CANCEL )->SetHelpId(""/*HID_AUTOFORMAT_REJECT*/ );
|
2008-06-16 07:23:44 +00:00
|
|
|
aQBox.AddButton(String(SW_RES(STR_REDLINE_EDIT)), 2, 0);
|
2010-06-04 13:46:22 +02:00
|
|
|
// FIXME: HELPID
|
|
|
|
aQBox.GetPushButton( 2 )->SetHelpId(""/*HID_AUTOFORMAT_EDIT_CHG*/);
|
2008-06-16 07:23:44 +00:00
|
|
|
aQBox.SetButtonHelpText( RET_OK, aEmptyStr );
|
|
|
|
|
|
|
|
return aQBox.Execute();
|
|
|
|
}
|
2000-09-18 16:15:01 +00:00
|
|
|
|
|
|
|
void SwTextShell::Execute(SfxRequest &rReq)
|
|
|
|
{
|
2002-06-10 16:09:01 +00:00
|
|
|
BOOL bUseDialog = TRUE;
|
2000-09-18 16:15:01 +00:00
|
|
|
const SfxItemSet *pArgs = rReq.GetArgs();
|
|
|
|
SwWrtShell& rWrtSh = GetShell();
|
|
|
|
const SfxPoolItem* pItem = 0;
|
|
|
|
USHORT nSlot = rReq.GetSlot();
|
|
|
|
if(pArgs)
|
|
|
|
pArgs->GetItemState(GetPool().GetWhich(nSlot), FALSE, &pItem);
|
|
|
|
switch( nSlot )
|
|
|
|
{
|
2007-11-23 15:27:22 +00:00
|
|
|
case SID_LANGUAGE_STATUS:
|
|
|
|
{
|
|
|
|
// get the language
|
|
|
|
String aNewLangTxt;
|
|
|
|
SFX_REQUEST_ARG( rReq, pItem2, SfxStringItem, SID_LANGUAGE_STATUS , sal_False );
|
|
|
|
if (pItem2)
|
|
|
|
aNewLangTxt = pItem2->GetValue();
|
|
|
|
|
|
|
|
//!! Remember the view frame right now...
|
|
|
|
//!! (call to GetView().GetViewFrame() will break if the
|
|
|
|
//!! SwTextShell got destroyed meanwhile.)
|
|
|
|
SfxViewFrame *pViewFrame = GetView().GetViewFrame();
|
|
|
|
|
|
|
|
if (aNewLangTxt.EqualsAscii( "*" ))
|
|
|
|
{
|
|
|
|
// open the dialog "Tools/Options/Language Settings - Language"
|
|
|
|
// to set the documents default language
|
|
|
|
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
|
|
|
|
if (pFact)
|
|
|
|
{
|
|
|
|
VclAbstractDialog* pDlg = pFact->CreateVclDialog( GetView().GetWindow(), SID_LANGUAGE_OPTIONS );
|
|
|
|
pDlg->Execute();
|
|
|
|
delete pDlg;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
//!! We have to use StartAction / EndAction bracketing in
|
|
|
|
//!! order to prevent possible destruction of the SwTextShell
|
|
|
|
//!! due to the selection changes coming below.
|
|
|
|
rWrtSh.StartAction();
|
|
|
|
// prevent view from jumping because of (temporary) selection changes
|
|
|
|
rWrtSh.LockView( TRUE );
|
|
|
|
// save selection for later restoration
|
|
|
|
rWrtSh.Push();
|
|
|
|
|
|
|
|
// setting the new language...
|
|
|
|
if (aNewLangTxt.Len() > 0)
|
|
|
|
{
|
|
|
|
const String aSelectionLangPrefix( String::CreateFromAscii("Current_") );
|
|
|
|
const String aParagraphLangPrefix( String::CreateFromAscii("Paragraph_") );
|
|
|
|
const String aDocumentLangPrefix( String::CreateFromAscii("Default_") );
|
|
|
|
const String aStrNone( String::CreateFromAscii("LANGUAGE_NONE") );
|
|
|
|
|
|
|
|
SfxItemSet aCoreSet( GetPool(),
|
|
|
|
RES_CHRATR_LANGUAGE, RES_CHRATR_LANGUAGE,
|
|
|
|
RES_CHRATR_CJK_LANGUAGE, RES_CHRATR_CJK_LANGUAGE,
|
|
|
|
RES_CHRATR_CTL_LANGUAGE, RES_CHRATR_CTL_LANGUAGE,
|
|
|
|
0 );
|
|
|
|
|
|
|
|
xub_StrLen nPos = 0;
|
|
|
|
bool bForSelection = true;
|
|
|
|
bool bForParagraph = false;
|
|
|
|
if (STRING_NOTFOUND != (nPos = aNewLangTxt.Search( aSelectionLangPrefix, 0 )))
|
|
|
|
{
|
|
|
|
// ... for the current selection
|
|
|
|
aNewLangTxt = aNewLangTxt.Erase( nPos, aSelectionLangPrefix.Len() );
|
|
|
|
bForSelection = true;
|
|
|
|
}
|
|
|
|
else if (STRING_NOTFOUND != (nPos = aNewLangTxt.Search( aParagraphLangPrefix , 0 )))
|
|
|
|
{
|
|
|
|
// ... for the current paragraph language
|
|
|
|
aNewLangTxt = aNewLangTxt.Erase( nPos, aParagraphLangPrefix.Len() );
|
|
|
|
bForSelection = true;
|
|
|
|
bForParagraph = true;
|
|
|
|
}
|
|
|
|
else if (STRING_NOTFOUND != (nPos = aNewLangTxt.Search( aDocumentLangPrefix , 0 )))
|
|
|
|
{
|
|
|
|
// ... as default document language
|
|
|
|
aNewLangTxt = aNewLangTxt.Erase( nPos, aDocumentLangPrefix.Len() );
|
|
|
|
bForSelection = false;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (bForParagraph)
|
2008-06-16 07:23:44 +00:00
|
|
|
SwLangHelper::SelectCurrentPara( rWrtSh );
|
2008-07-01 13:38:10 +00:00
|
|
|
|
2007-11-23 15:27:22 +00:00
|
|
|
if (!bForSelection) // document language to be changed...
|
2008-06-06 07:47:41 +00:00
|
|
|
{
|
2007-11-23 15:27:22 +00:00
|
|
|
rWrtSh.SelAll();
|
2008-06-06 07:47:41 +00:00
|
|
|
rWrtSh.ExtendedSelectAll();
|
|
|
|
}
|
2007-11-23 15:27:22 +00:00
|
|
|
if (aNewLangTxt != aStrNone)
|
2008-06-16 07:23:44 +00:00
|
|
|
SwLangHelper::SetLanguage( rWrtSh, aNewLangTxt, bForSelection, aCoreSet );
|
2007-11-23 15:27:22 +00:00
|
|
|
else
|
2008-06-16 07:23:44 +00:00
|
|
|
SwLangHelper::SetLanguage_None( rWrtSh, bForSelection, aCoreSet );
|
2007-11-23 15:27:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// restore selection...
|
|
|
|
rWrtSh.Pop( FALSE );
|
|
|
|
|
|
|
|
rWrtSh.LockView( FALSE );
|
|
|
|
rWrtSh.EndAction();
|
|
|
|
}
|
|
|
|
|
|
|
|
// invalidate slot to get the new language displayed
|
|
|
|
pViewFrame->GetBindings().Invalidate( nSlot );
|
|
|
|
|
|
|
|
rReq.Done();
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2009-05-06 10:59:57 +00:00
|
|
|
case SID_CHARMAP:
|
2002-06-14 06:57:24 +00:00
|
|
|
{
|
2002-07-01 08:09:41 +00:00
|
|
|
InsertSymbol( rReq );
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case FN_INSERT_FOOTNOTE:
|
|
|
|
case FN_INSERT_ENDNOTE:
|
|
|
|
{
|
|
|
|
String aStr;
|
|
|
|
SFX_REQUEST_ARG( rReq, pFont, SfxStringItem, FN_PARAM_1 , sal_False );
|
2007-09-27 11:30:56 +00:00
|
|
|
// SFX_REQUEST_ARG( rReq, pCharset, SfxInt16Item, FN_PARAM_2 , sal_False );
|
|
|
|
SFX_REQUEST_ARG( rReq, pNameItem, SfxStringItem, nSlot , sal_False );
|
|
|
|
if ( pNameItem )
|
|
|
|
aStr = pNameItem->GetValue();
|
2002-07-05 11:17:02 +00:00
|
|
|
BOOL bFont = pFont && pFont->GetValue().Len();
|
2007-09-27 11:30:56 +00:00
|
|
|
rWrtSh.StartUndo( UNDO_UI_INSERT_FOOTNOTE );
|
2002-07-05 11:17:02 +00:00
|
|
|
rWrtSh.InsertFootnote( aStr, nSlot == FN_INSERT_ENDNOTE, !bFont );
|
|
|
|
if ( bFont )
|
2002-06-14 06:57:24 +00:00
|
|
|
{
|
2002-07-01 08:09:41 +00:00
|
|
|
rWrtSh.Left( CRSR_SKIP_CHARS, TRUE, 1, FALSE );
|
|
|
|
SfxItemSet aSet( rWrtSh.GetAttrPool(), RES_CHRATR_FONT, RES_CHRATR_FONT );
|
2008-03-05 16:26:34 +00:00
|
|
|
rWrtSh.GetCurAttr( aSet );
|
2002-07-01 08:09:41 +00:00
|
|
|
SvxFontItem &rFont = (SvxFontItem &) aSet.Get( RES_CHRATR_FONT );
|
|
|
|
SvxFontItem aFont( rFont.GetFamily(), pFont->GetValue(),
|
2007-05-10 15:24:35 +00:00
|
|
|
rFont.GetStyleName(), rFont.GetPitch(), RTL_TEXTENCODING_DONTKNOW, RES_CHRATR_FONT );
|
2002-07-01 08:09:41 +00:00
|
|
|
//pCharset ? (CharSet) pCharset->GetValue() : RTL_TEXTENCODING_DONTKNOW );
|
2007-09-27 11:30:56 +00:00
|
|
|
rWrtSh.SetAttr( aSet, nsSetAttrMode::SETATTR_DONTEXPAND );
|
2002-07-01 08:09:41 +00:00
|
|
|
rWrtSh.ResetSelect(0, FALSE);
|
2002-07-05 11:17:02 +00:00
|
|
|
rWrtSh.EndSelect();
|
2002-07-01 08:09:41 +00:00
|
|
|
rWrtSh.GotoFtnTxt();
|
2002-06-14 06:57:24 +00:00
|
|
|
}
|
2007-09-27 11:30:56 +00:00
|
|
|
rWrtSh.EndUndo( UNDO_UI_INSERT_FOOTNOTE );
|
2002-07-01 08:09:41 +00:00
|
|
|
rReq.Done();
|
2002-06-14 06:57:24 +00:00
|
|
|
}
|
2000-09-18 16:15:01 +00:00
|
|
|
break;
|
|
|
|
case FN_INSERT_FOOTNOTE_DLG:
|
|
|
|
{
|
2004-05-10 15:36:49 +00:00
|
|
|
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
|
2007-09-27 11:30:56 +00:00
|
|
|
DBG_ASSERT(pFact, "Dialogdiet fail!");
|
2007-04-26 08:18:08 +00:00
|
|
|
AbstractInsFootNoteDlg* pDlg = pFact->CreateInsFootNoteDlg( DLG_INS_FOOTNOTE,
|
2004-05-10 15:36:49 +00:00
|
|
|
GetView().GetWindow(), rWrtSh, FALSE );
|
2007-09-27 11:30:56 +00:00
|
|
|
DBG_ASSERT(pDlg, "Dialogdiet fail!");
|
2000-09-18 16:15:01 +00:00
|
|
|
pDlg->SetHelpId(nSlot);
|
2002-07-01 08:09:41 +00:00
|
|
|
if ( pDlg->Execute() == RET_OK )
|
|
|
|
{
|
|
|
|
USHORT nId = pDlg->IsEndNote() ? FN_INSERT_ENDNOTE : FN_INSERT_FOOTNOTE;
|
|
|
|
SfxRequest aReq( GetView().GetViewFrame(), nId );
|
2002-07-08 07:16:40 +00:00
|
|
|
if ( pDlg->GetStr().Len() )
|
|
|
|
aReq.AppendItem( SfxStringItem( nId, pDlg->GetStr() ) );
|
|
|
|
if ( pDlg->GetFontName().Len() )
|
|
|
|
aReq.AppendItem( SfxStringItem( FN_PARAM_1, pDlg->GetFontName() ) );
|
2002-07-01 08:09:41 +00:00
|
|
|
//aReq.AppendItem( SfxStringItem( FN_PARAM_2, pDlg->GetCharSet() ) );
|
|
|
|
ExecuteSlot( aReq );
|
|
|
|
}
|
|
|
|
|
|
|
|
rReq.Ignore();
|
2000-09-18 16:15:01 +00:00
|
|
|
delete pDlg;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case FN_FORMAT_FOOTNOTE_DLG:
|
|
|
|
{
|
2007-09-27 11:30:56 +00:00
|
|
|
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
|
|
|
|
DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
|
2004-05-10 15:36:49 +00:00
|
|
|
|
2007-04-26 08:18:08 +00:00
|
|
|
VclAbstractDialog* pDlg = pFact->CreateSwFootNoteOptionDlg( GetView().GetWindow(), rWrtSh, DLG_DOC_FOOTNOTE );
|
2007-09-27 11:30:56 +00:00
|
|
|
DBG_ASSERT(pDlg, "Dialogdiet fail!");
|
2000-09-18 16:15:01 +00:00
|
|
|
pDlg->Execute();
|
|
|
|
delete pDlg;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case SID_INSERTDOC:
|
2006-11-22 09:27:53 +00:00
|
|
|
{
|
|
|
|
GetView().ExecuteInsertDoc( rReq, pItem );
|
2000-09-18 16:15:01 +00:00
|
|
|
break;
|
2006-11-22 09:27:53 +00:00
|
|
|
}
|
2000-09-18 16:15:01 +00:00
|
|
|
case FN_FORMAT_RESET:
|
2007-11-23 15:27:22 +00:00
|
|
|
{
|
|
|
|
// #i78856, reset all attributes but not the language attributes
|
|
|
|
// (for this build an array of all relevant attributes and
|
|
|
|
// remove the languages from that)
|
|
|
|
SvUShortsSort aAttribs;
|
2008-02-05 11:25:09 +00:00
|
|
|
|
|
|
|
USHORT __FAR_DATA aResetableSetRange[] = {
|
|
|
|
RES_FRMATR_BEGIN, RES_FRMATR_END-1,
|
|
|
|
RES_CHRATR_BEGIN, RES_CHRATR_LANGUAGE - 1,
|
|
|
|
RES_CHRATR_LANGUAGE + 1, RES_CHRATR_CJK_LANGUAGE - 1,
|
|
|
|
RES_CHRATR_CJK_LANGUAGE + 1, RES_CHRATR_CTL_LANGUAGE - 1,
|
|
|
|
RES_CHRATR_CTL_LANGUAGE + 1, RES_CHRATR_END-1,
|
|
|
|
RES_PARATR_BEGIN, RES_PARATR_END-1,
|
|
|
|
RES_TXTATR_INETFMT, RES_TXTATR_INETFMT,
|
2009-10-14 17:33:11 +00:00
|
|
|
RES_TXTATR_CHARFMT, RES_TXTATR_CHARFMT,
|
|
|
|
RES_TXTATR_CJK_RUBY, RES_TXTATR_CJK_RUBY,
|
|
|
|
RES_TXTATR_UNKNOWN_CONTAINER, RES_TXTATR_UNKNOWN_CONTAINER,
|
2008-02-05 11:25:09 +00:00
|
|
|
RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1,
|
|
|
|
0
|
|
|
|
};
|
|
|
|
USHORT __FAR_DATA *pUShorts = aResetableSetRange;
|
2007-11-23 15:27:22 +00:00
|
|
|
while (*pUShorts)
|
|
|
|
{
|
|
|
|
USHORT nL = pUShorts[1] - pUShorts[0] + 1;
|
|
|
|
USHORT nE = pUShorts[0];
|
|
|
|
for (USHORT i = 0; i < nL; ++i)
|
|
|
|
aAttribs.Insert( nE++ );
|
|
|
|
pUShorts += 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
rWrtSh.ResetAttr( &aAttribs );
|
2004-03-08 15:18:50 +00:00
|
|
|
rReq.Done();
|
2000-09-18 16:15:01 +00:00
|
|
|
break;
|
2007-11-23 15:27:22 +00:00
|
|
|
}
|
2000-09-18 16:15:01 +00:00
|
|
|
case FN_INSERT_BREAK_DLG:
|
|
|
|
{
|
2002-07-01 08:09:41 +00:00
|
|
|
USHORT nKind=0, nPageNumber=0;
|
|
|
|
String aTemplateName;
|
|
|
|
if ( pItem )
|
|
|
|
{
|
|
|
|
nKind = ((SfxInt16Item*)pItem)->GetValue();
|
|
|
|
SFX_REQUEST_ARG( rReq, pTemplate, SfxStringItem, FN_PARAM_1 , sal_False );
|
|
|
|
SFX_REQUEST_ARG( rReq, pNumber, SfxUInt16Item, FN_PARAM_2 , sal_False );
|
|
|
|
if ( pTemplate )
|
|
|
|
aTemplateName = pTemplate->GetValue();
|
|
|
|
if ( pNumber )
|
|
|
|
nPageNumber = pNumber->GetValue();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2007-09-27 11:30:56 +00:00
|
|
|
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
|
|
|
|
DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
|
2004-05-10 15:36:49 +00:00
|
|
|
|
2007-04-26 08:18:08 +00:00
|
|
|
AbstractSwBreakDlg* pDlg = pFact->CreateSwBreakDlg( GetView().GetWindow(), rWrtSh, DLG_BREAK );
|
2007-09-27 11:30:56 +00:00
|
|
|
DBG_ASSERT(pDlg, "Dialogdiet fail!");
|
2002-07-01 08:09:41 +00:00
|
|
|
if ( pDlg->Execute() == RET_OK )
|
|
|
|
{
|
|
|
|
nKind = pDlg->GetKind();
|
|
|
|
aTemplateName = pDlg->GetTemplateName();
|
|
|
|
nPageNumber = pDlg->GetPageNumber();
|
|
|
|
rReq.AppendItem( SfxInt16Item( FN_INSERT_BREAK_DLG, nKind ) );
|
|
|
|
rReq.AppendItem( SfxUInt16Item( FN_PARAM_2, nPageNumber ) );
|
|
|
|
rReq.AppendItem( SfxStringItem( FN_PARAM_1, aTemplateName ) );
|
|
|
|
rReq.Done();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
rReq.Ignore();
|
|
|
|
delete pDlg;
|
|
|
|
}
|
|
|
|
|
|
|
|
switch ( nKind )
|
|
|
|
{
|
|
|
|
case 1 :
|
|
|
|
rWrtSh.InsertLineBreak(); break;
|
|
|
|
case 2 :
|
|
|
|
rWrtSh.InsertColumnBreak(); break;
|
|
|
|
case 3 :
|
|
|
|
{
|
|
|
|
rWrtSh.StartAllAction();
|
|
|
|
if( aTemplateName.Len() )
|
|
|
|
rWrtSh.InsertPageBreak( &aTemplateName, nPageNumber );
|
|
|
|
else
|
|
|
|
rWrtSh.InsertPageBreak();
|
|
|
|
rWrtSh.EndAllAction();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2000-09-18 16:15:01 +00:00
|
|
|
break;
|
2002-07-01 08:09:41 +00:00
|
|
|
}
|
2000-09-18 16:15:01 +00:00
|
|
|
case FN_INSERT_BOOKMARK:
|
|
|
|
{
|
2002-07-01 08:09:41 +00:00
|
|
|
if ( pItem )
|
|
|
|
{
|
CWS-TOOLING: integrate CWS swrefactormarks2
2009-04-09 12:51:41 +0200 b_michaelsen r270689 : #i94949# cleaned up assertions after rebasing
2009-04-08 17:37:08 +0200 b_michaelsen r270658 : fixing sw/source/ui/utlui/makefile.mk
2009-04-07 17:56:54 +0200 b_michaelsen r270606 : added bookctrl.cxx to EXCEPTIONFILES, because this is needed for stl on unxsols4
2009-04-07 17:05:20 +0200 b_michaelsen r270603 : added crbm.cxx to EXCEPTIONFILES, because this is needed for stl on unxsols4
2009-04-02 23:44:38 +0200 b_michaelsen r270436 : CWS-TOOLING: rebase CWS swrefactormarks2 to trunk@270033 (milestone: DEV300:m45)
2009-02-27 16:25:31 +0100 b_michaelsen r268606 : #i94949# fixed Windows buildbreaker
2009-02-25 18:01:13 +0100 b_michaelsen r268464 : #i94949# Bookmarktest document filter roundtrips
2009-02-24 18:23:55 +0100 b_michaelsen r268404 : #i94949# Bookmark unittests
2009-02-23 19:47:44 +0100 b_michaelsen r268370 : #i94949# added unittest for bookmarks
2009-02-23 12:22:07 +0100 b_michaelsen r268348 : #i94949# fixing CheckCrossReferences testcase
2009-02-20 18:12:50 +0100 b_michaelsen r268335 : #i94949# fixing SwXTextRange
2009-02-18 18:32:57 +0100 b_michaelsen r268252 : #i94949# deregistering DdeBookmarks on delete
2009-02-18 18:29:08 +0100 b_michaelsen r268251 : fixing dbgoutsw.cxx for debug builds
2009-02-16 18:42:43 +0100 b_michaelsen r267834 : CWS-TOOLING: rebase CWS swrefactormarks2 to trunk@267171 (milestone: DEV300:m41)
2009-02-12 15:32:02 +0100 b_michaelsen r267667 : #i94949 fixed crossrefbookmark naming
2009-02-11 18:30:08 +0100 b_michaelsen r267624 : #94949# fixing bookmark navigation
2009-02-11 13:55:26 +0100 b_michaelsen r267599 : #i94949# fixed bookmark naming
2009-02-10 17:53:05 +0100 b_michaelsen r267571 : #i94949# renamed HasOtherMarkPos to IsExpanded
2009-02-10 17:23:01 +0100 b_michaelsen r267564 : #i94949# renamed ::sw::bookmark namespace to more fitting ::sw::mark
2009-02-10 16:16:32 +0100 b_michaelsen r267553 : #i94949# creating only CrossRefBookmark per Txtnode
2009-02-10 12:14:05 +0100 b_michaelsen r267547 : #i94949# fixed bookmark count in navigator
2009-02-09 19:12:18 +0100 b_michaelsen r267532 : #i94949# lcl_CopyBookmarks(..) - handle marks on boundaries correctly
2009-02-09 17:32:45 +0100 b_michaelsen r267524 : #i94949# setting the refobject of the DdeBookmark in Sin SwServerObject::SetDdeBookmark(..)
2009-02-09 17:22:15 +0100 b_michaelsen r267523 : #i94949# trying to harden SwServerObject
2009-02-09 16:47:32 +0100 b_michaelsen r267521 : #i94949# lcl_CopyBookmarks(..): try to get the source mark name, if possible
2009-02-09 16:05:42 +0100 b_michaelsen r267519 : #i94949# clearing the OtherMarkPos if PaM has no mark in repositionMark(..), swapping inverted bookmarks without hissing an assertion
2009-02-09 15:55:38 +0100 b_michaelsen r267518 : #i94949# checking for out-of-bounds in SwView::ExecuteStatusLine(..)
2009-02-09 15:23:47 +0100 b_michaelsen r267517 : #i94949# using an UNO_BOOKMARK in ui/dbui/dbinsdlg.cxx
2009-02-09 14:14:47 +0100 b_michaelsen r267514 : #i94949# IDocumentMarkAccess::GetType(..) asserts on unknown type
2009-02-09 14:04:25 +0100 b_michaelsen r267513 : #i94949# using rtl strings instead of tools-strings in CrossRefBookmarks
2009-02-09 13:55:01 +0100 b_michaelsen r267510 : #i94949# using empty string for UnoMark construction
2009-02-09 13:46:46 +0100 b_michaelsen r267509 : #i94949# removed superfluous #includes, removed superfluous member DdeBookmark::bGenerateName, initialized DdeBookmark::m_aRefObj removed superfluous local _FindItem::ClearObj
2009-02-06 14:38:37 +0100 b_michaelsen r267462 : #i94949# fixing FN_STAT_BOOKMARK dispatches
2009-02-05 18:05:07 +0100 b_michaelsen r267436 : #i94949# removing superfluous #includes
2009-02-04 15:51:31 +0100 b_michaelsen r267391 : fixing resync merge error
2009-02-02 19:39:55 +0100 b_michaelsen r267294 : #i94949# bookmark performance
2009-01-30 19:30:51 +0100 b_michaelsen r267229 : #i94949# throwing IllegalArgumentException, if appropriate
2009-01-30 19:29:56 +0100 b_michaelsen r267228 : #i94949# refactored lcl_FillBookmarkArray, comments, constness
2009-01-30 19:23:49 +0100 b_michaelsen r267227 : #i94949# refactored lcl_FillBookmarkArray, comments, constness
2009-01-30 19:16:06 +0100 b_michaelsen r267226 : #i94949# refactored lcl_FillBookmarkArray
2009-01-30 17:59:27 +0100 b_michaelsen r267222 : #i94949# removed superficial #include
2009-01-30 17:50:02 +0100 b_michaelsen r267220 : #i94949# SwXTextRange remembers its UNO bookmark
2009-01-29 20:19:58 +0100 b_michaelsen r267168 : #i94949# implemented IDocumentMarkAccess::findBookmark
2009-01-29 17:22:17 +0100 b_michaelsen r267162 : #i94949# implemented renameMark in Markmanager
2009-01-29 14:17:10 +0100 b_michaelsen r267134 : #i94949# cleanup in SwXBookmark, whitespace
2009-01-29 13:21:54 +0100 b_michaelsen r267125 : #i94949# cleanup in SwXBookmark, whitespace
2009-01-29 13:06:10 +0100 b_michaelsen r267120 : #i94949# cleanup in SwXBookmark, whitespace
2009-01-29 13:00:09 +0100 b_michaelsen r267118 : #i94949# cleanup in SwXBookmark, whitespace
2009-01-29 10:35:10 +0100 b_michaelsen r267101 : #i94949# renamed SetCrsrToBkmk to SetCrsrToMark, moving to start/end of doc if no more bookmarks can be found
2009-01-28 17:05:36 +0100 b_michaelsen r267070 : #i94949# fixed order in aProvNamesId in unocoll.cxx
2009-01-28 15:46:13 +0100 b_michaelsen r267063 : #i94949# documentation
2009-01-28 15:36:59 +0100 b_michaelsen r267062 : #i94949# removing superficial #include
2009-01-28 15:30:36 +0100 b_michaelsen r267061 : #i94949# basic code conventions
2009-01-28 11:14:30 +0100 b_michaelsen r267039 : #i94949# comparing to the actual name of the new mark
2009-01-26 15:22:25 +0100 b_michaelsen r266927 : #i94949# performance fixes
2009-01-14 21:16:56 +0100 b_michaelsen r266332 : #i94949# fixing linux x86-64 compiler warnings
2009-01-14 19:52:06 +0100 b_michaelsen r266331 : #i94949# fixing some compiler warnings
2008-12-15 13:04:49 +0100 b_michaelsen r265474 : #i94949# fixed microsoft compiler warnings
2008-12-12 18:26:02 +0100 b_michaelsen r265434 : #i94949# fixed pro platform buildbreakers
2008-12-11 17:51:24 +0100 b_michaelsen r265342 : CWS-TOOLING: rebase CWS swrefactormarks2 to trunk@264807 (milestone: DEV300:m37)
2008-12-09 18:30:59 +0100 b_michaelsen r265134 : #i94949# fixed IDocumentMarkAccess::GetType for new mark inheritance tree
2008-12-09 16:56:26 +0100 b_michaelsen r265118 : #i94949# fixed deleteMark optimization
2008-12-09 14:55:58 +0100 b_michaelsen r265092 : #i94949# DdeLink and DdeBookmark
2008-12-05 18:28:05 +0100 b_michaelsen r264914 : #i94949# fixed InitDoc in bookmarks
2008-12-02 02:23:51 +0100 b_michaelsen r264649 : #i94949# removed obsolete naming proposal code in SwXTextRange, fixed navigator reminders to forget the oldest reminder when the pool is empty
2008-12-02 02:05:19 +0100 b_michaelsen r264648 : #i94949# using bisect search for delete
2008-12-02 01:58:16 +0100 b_michaelsen r264647 : #i94949# using bisect search for delete
2008-12-02 01:37:33 +0100 b_michaelsen r264646 : #i94949# using bisect search for delete
2008-12-02 01:03:29 +0100 b_michaelsen r264645 : #i94949# fixed deleteMark crash
2008-12-01 20:55:00 +0100 b_michaelsen r264638 : #i94949# removed crossrefs from ui enumerations
2008-12-01 15:48:12 +0100 b_michaelsen r264613 : #i94949# removed superfluous local functions
2008-12-01 15:01:19 +0100 b_michaelsen r264608 : #i94949# optimized insertion of new marks
2008-12-01 14:33:21 +0100 b_michaelsen r264603 : #i94949# simplified code finding Fieldmark for a position
2008-12-01 14:05:55 +0100 b_michaelsen r264598 : #i94949# fixed reverse travelling through marks, removed obsolete getUniqueMarkName()
2008-11-27 18:48:15 +0100 b_michaelsen r264515 : #i94949# fixed _SaveCntntIdx and friends
2008-11-27 15:59:49 +0100 b_michaelsen r264500 : #i94949# fix Mark position only in ctor
2008-11-27 15:52:28 +0100 b_michaelsen r264497 : #i94949# fixed Bug in SwXBookmark, was using pDoc too early
2008-11-26 14:54:22 +0100 b_michaelsen r264396 : #i94949# fixed documentation, simplified navigator reminder code
2008-11-24 20:45:51 +0100 b_michaelsen r264266 : #i94949# removed last obsolete getUniqueMarkName calls
2008-11-24 20:21:35 +0100 b_michaelsen r264265 : #i94949# fixed typo in IDocumentMarkAccess, removed obsolete getUniqueMarkName calls
2008-11-24 18:34:32 +0100 b_michaelsen r264264 : #i94949# repositioning of Marks, removed possibility to delete marks by name in the core, refactoring of navigator reminder generation
2008-11-21 14:08:49 +0100 b_michaelsen r264137 : #i94949# simplified makeMark
2008-11-21 12:07:09 +0100 b_michaelsen r264120 : #i94949# moved ShortName and KeyCode from IMark to IBookmark
2008-11-19 12:50:49 +0100 b_michaelsen r263981 : #i94949# starting refactoring of bookmark naming
2008-11-19 11:31:08 +0100 b_michaelsen r263972 : #i94949# getting rid of obsolete dynamic casts
2008-11-18 19:06:09 +0100 b_michaelsen r263795 : #i94949# getting rid of index based mark access, IDocumentMarkAccess already provides iterators
2008-11-18 17:50:18 +0100 b_michaelsen r263792 : #i94949# getting rid of index based mark access, IDocumentMarkAccess already provides iterators
2008-11-18 16:48:20 +0100 b_michaelsen r263783 : #i94949# removed methods from crsrsh which are already available directly via IDocumentMarkAccess
2008-11-18 11:31:35 +0100 b_michaelsen r263753 : #i94949# cleaning up mark code in crsrsh
2008-11-17 10:15:25 +0100 b_michaelsen r263705 : #i94949# removed possible integer overflow
2008-11-14 18:48:45 +0100 b_michaelsen r263695 : #i94949# management of mark names in MarkManager
2008-11-14 18:23:40 +0100 b_michaelsen r263693 : #i94949# using polymorphism to do mark-specific setup in SwDoc
2008-11-14 16:27:09 +0100 b_michaelsen r263684 : #i94949# got rid of makeCrossRefBookmark
2008-11-14 13:03:32 +0100 b_michaelsen r263674 : #i94949# refactored Correction methods
2008-11-13 12:27:55 +0100 b_michaelsen r263631 : #i94949# got rid of old-style tools assertions in new code
2008-11-12 16:58:16 +0100 b_michaelsen r263608 : #i94949# added assertion for unique names
2008-11-12 16:55:18 +0100 b_michaelsen r263607 : #i94949# maked XFormField deprecated
2008-11-12 13:04:29 +0100 b_michaelsen r263587 : #i94949# replaced IDocumentMarkAccess::GetType with simple dynamic_cast where possible
2008-11-11 18:45:53 +0100 b_michaelsen r263572 : #i94949# cleaned up SwHstryBookmark
2008-11-11 13:48:18 +0100 b_michaelsen r263557 : #i94949# removed dynamic_casts to SwModify by inheriting IMark from it
2008-11-11 11:26:28 +0100 b_michaelsen r263548 : #i94949# fixed SwXBookmark
2008-11-10 17:01:19 +0100 b_michaelsen r263529 : #i94949# fixed DdeBookmarks in clipboard
2008-11-10 16:44:52 +0100 b_michaelsen r263527 : #i94949# formatting
2008-11-10 16:29:16 +0100 b_michaelsen r263526 : #i94949# fixing unoobj.cxx
2008-11-10 16:23:50 +0100 b_michaelsen r263525 : #i94949# cleaning up crossrefbookmark.cxx/.hxx
2008-11-10 16:02:08 +0100 b_michaelsen r263524 : #i94949# Pdf Export should only generate 'real' bookmarks
2008-11-10 15:33:58 +0100 b_michaelsen r263521 : #i94949# removed const_casts
2008-11-10 15:12:06 +0100 b_michaelsen r263520 : #i94949# moved _DelBookmarks into MarksManager
2008-11-07 18:48:38 +0100 b_michaelsen r263480 : #i94949# using iterator interface
2008-11-07 18:41:46 +0100 b_michaelsen r263478 : #i94949# using iterator interface
2008-11-07 18:07:41 +0100 b_michaelsen r263477 : #i94949# using iterator interface
2008-11-07 17:54:41 +0100 b_michaelsen r263476 : #i94949# using iterator interface
2008-11-07 17:44:41 +0100 b_michaelsen r263475 : #i94949# moved correction methods into MarkManager
2008-11-06 18:47:28 +0100 b_michaelsen r263404 : #i94949# getting rid of superfluous const_casts
2008-11-06 17:58:01 +0100 b_michaelsen r263403 : #i94949# no more setting of mark positions outside of the core
2008-11-06 17:08:37 +0100 b_michaelsen r263401 : #i94949# removed setters from IMark
2008-11-06 13:55:25 +0100 b_michaelsen r263383 : #i94949 SwDoc does not implement IDocumentMarkAccess anymore
2008-11-04 18:17:03 +0100 b_michaelsen r263333 : #i94949# began removing IDocumentMarkAccess from SwDoc
2008-11-04 16:48:34 +0100 b_michaelsen r263330 : removing dead code (SwBitArray) found by mst
2008-11-04 16:29:32 +0100 b_michaelsen r263329 : removing dead code (SwBitArray) found by mst
2008-11-04 14:57:48 +0100 b_michaelsen r263326 : removing dead code (SwBitArray) found by mst
2008-11-04 14:50:18 +0100 b_michaelsen r263325 : #i94949# stricter typing in IDocumentMarkAccess
2008-10-24 15:16:27 +0200 b_michaelsen r262647 : #i94949# renamed ::sw::bookmark::SimpleMark to NavigatorReminder to fit the IDocumentMarkAccess enum
2008-10-24 15:10:10 +0200 b_michaelsen r262646 : #i94949# only 'real' bookmark implement IBookmark, Marks also get removed from m_vFieldmarks on delete/clear
2008-10-24 13:06:23 +0200 b_michaelsen r262636 : #i94949# Fieldmark tabnavigation
2008-10-23 12:16:36 +0200 b_michaelsen r262619 : #i94949# Fieldmark classes and filters
2008-10-22 13:17:18 +0200 b_michaelsen r262597 : #i94949# writer import fixes
2008-10-21 11:30:38 +0200 b_michaelsen r262565 : #i94949# renamed methods containing Bookmark in the generic IMark interface
2008-10-20 14:09:02 +0200 b_michaelsen r262318 : #i94949# fixed SwDoc::CorrRel
2008-10-16 22:45:13 +0200 b_michaelsen r262273 : #i94949 simplified Before/After methods
2008-10-16 21:40:57 +0200 b_michaelsen r262271 : #i94949 renamed SimpleMark to NavigatorReminder
2008-10-16 21:15:23 +0200 b_michaelsen r262270 : #i94949 using shared_ptr only in MarkManager
2008-10-16 17:46:37 +0200 b_michaelsen r262269 : #i94949# getFieldmarkBefore and getFieldmarkAfter
2008-10-16 17:12:13 +0200 b_michaelsen r262265 : #i94949# cleanup in crbm.cxx
2008-10-16 12:49:01 +0200 b_michaelsen r262257 : #i94949# fixed usage of invalid iterator, fixed invalid cast
2008-10-15 15:34:20 +0200 b_michaelsen r262239 : #i94949# added moved files
2008-10-15 15:26:45 +0200 b_michaelsen r262237 : #i94949# initial reimplementation of Bookmarks
2009-04-21 15:40:02 +00:00
|
|
|
::rtl::OUString sName = ((SfxStringItem*)pItem)->GetValue();
|
2002-08-07 12:19:40 +00:00
|
|
|
rWrtSh.SetBookmark( KeyCode(), sName, aEmptyStr );
|
2002-07-01 08:09:41 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2007-09-27 11:30:56 +00:00
|
|
|
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
|
|
|
|
DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
|
2004-05-10 15:36:49 +00:00
|
|
|
|
2007-04-26 08:18:08 +00:00
|
|
|
VclAbstractDialog* pDlg = pFact->CreateSwInsertBookmarkDlg( GetView().GetWindow(), rWrtSh, rReq, DLG_INSERT_BOOKMARK );
|
2007-09-27 11:30:56 +00:00
|
|
|
DBG_ASSERT(pDlg, "Dialogdiet fail!");
|
2002-07-01 08:09:41 +00:00
|
|
|
pDlg->Execute();
|
|
|
|
delete pDlg;
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case FN_DELETE_BOOKMARK:
|
|
|
|
{
|
|
|
|
if ( pItem )
|
CWS-TOOLING: integrate CWS swrefactormarks2
2009-04-09 12:51:41 +0200 b_michaelsen r270689 : #i94949# cleaned up assertions after rebasing
2009-04-08 17:37:08 +0200 b_michaelsen r270658 : fixing sw/source/ui/utlui/makefile.mk
2009-04-07 17:56:54 +0200 b_michaelsen r270606 : added bookctrl.cxx to EXCEPTIONFILES, because this is needed for stl on unxsols4
2009-04-07 17:05:20 +0200 b_michaelsen r270603 : added crbm.cxx to EXCEPTIONFILES, because this is needed for stl on unxsols4
2009-04-02 23:44:38 +0200 b_michaelsen r270436 : CWS-TOOLING: rebase CWS swrefactormarks2 to trunk@270033 (milestone: DEV300:m45)
2009-02-27 16:25:31 +0100 b_michaelsen r268606 : #i94949# fixed Windows buildbreaker
2009-02-25 18:01:13 +0100 b_michaelsen r268464 : #i94949# Bookmarktest document filter roundtrips
2009-02-24 18:23:55 +0100 b_michaelsen r268404 : #i94949# Bookmark unittests
2009-02-23 19:47:44 +0100 b_michaelsen r268370 : #i94949# added unittest for bookmarks
2009-02-23 12:22:07 +0100 b_michaelsen r268348 : #i94949# fixing CheckCrossReferences testcase
2009-02-20 18:12:50 +0100 b_michaelsen r268335 : #i94949# fixing SwXTextRange
2009-02-18 18:32:57 +0100 b_michaelsen r268252 : #i94949# deregistering DdeBookmarks on delete
2009-02-18 18:29:08 +0100 b_michaelsen r268251 : fixing dbgoutsw.cxx for debug builds
2009-02-16 18:42:43 +0100 b_michaelsen r267834 : CWS-TOOLING: rebase CWS swrefactormarks2 to trunk@267171 (milestone: DEV300:m41)
2009-02-12 15:32:02 +0100 b_michaelsen r267667 : #i94949 fixed crossrefbookmark naming
2009-02-11 18:30:08 +0100 b_michaelsen r267624 : #94949# fixing bookmark navigation
2009-02-11 13:55:26 +0100 b_michaelsen r267599 : #i94949# fixed bookmark naming
2009-02-10 17:53:05 +0100 b_michaelsen r267571 : #i94949# renamed HasOtherMarkPos to IsExpanded
2009-02-10 17:23:01 +0100 b_michaelsen r267564 : #i94949# renamed ::sw::bookmark namespace to more fitting ::sw::mark
2009-02-10 16:16:32 +0100 b_michaelsen r267553 : #i94949# creating only CrossRefBookmark per Txtnode
2009-02-10 12:14:05 +0100 b_michaelsen r267547 : #i94949# fixed bookmark count in navigator
2009-02-09 19:12:18 +0100 b_michaelsen r267532 : #i94949# lcl_CopyBookmarks(..) - handle marks on boundaries correctly
2009-02-09 17:32:45 +0100 b_michaelsen r267524 : #i94949# setting the refobject of the DdeBookmark in Sin SwServerObject::SetDdeBookmark(..)
2009-02-09 17:22:15 +0100 b_michaelsen r267523 : #i94949# trying to harden SwServerObject
2009-02-09 16:47:32 +0100 b_michaelsen r267521 : #i94949# lcl_CopyBookmarks(..): try to get the source mark name, if possible
2009-02-09 16:05:42 +0100 b_michaelsen r267519 : #i94949# clearing the OtherMarkPos if PaM has no mark in repositionMark(..), swapping inverted bookmarks without hissing an assertion
2009-02-09 15:55:38 +0100 b_michaelsen r267518 : #i94949# checking for out-of-bounds in SwView::ExecuteStatusLine(..)
2009-02-09 15:23:47 +0100 b_michaelsen r267517 : #i94949# using an UNO_BOOKMARK in ui/dbui/dbinsdlg.cxx
2009-02-09 14:14:47 +0100 b_michaelsen r267514 : #i94949# IDocumentMarkAccess::GetType(..) asserts on unknown type
2009-02-09 14:04:25 +0100 b_michaelsen r267513 : #i94949# using rtl strings instead of tools-strings in CrossRefBookmarks
2009-02-09 13:55:01 +0100 b_michaelsen r267510 : #i94949# using empty string for UnoMark construction
2009-02-09 13:46:46 +0100 b_michaelsen r267509 : #i94949# removed superfluous #includes, removed superfluous member DdeBookmark::bGenerateName, initialized DdeBookmark::m_aRefObj removed superfluous local _FindItem::ClearObj
2009-02-06 14:38:37 +0100 b_michaelsen r267462 : #i94949# fixing FN_STAT_BOOKMARK dispatches
2009-02-05 18:05:07 +0100 b_michaelsen r267436 : #i94949# removing superfluous #includes
2009-02-04 15:51:31 +0100 b_michaelsen r267391 : fixing resync merge error
2009-02-02 19:39:55 +0100 b_michaelsen r267294 : #i94949# bookmark performance
2009-01-30 19:30:51 +0100 b_michaelsen r267229 : #i94949# throwing IllegalArgumentException, if appropriate
2009-01-30 19:29:56 +0100 b_michaelsen r267228 : #i94949# refactored lcl_FillBookmarkArray, comments, constness
2009-01-30 19:23:49 +0100 b_michaelsen r267227 : #i94949# refactored lcl_FillBookmarkArray, comments, constness
2009-01-30 19:16:06 +0100 b_michaelsen r267226 : #i94949# refactored lcl_FillBookmarkArray
2009-01-30 17:59:27 +0100 b_michaelsen r267222 : #i94949# removed superficial #include
2009-01-30 17:50:02 +0100 b_michaelsen r267220 : #i94949# SwXTextRange remembers its UNO bookmark
2009-01-29 20:19:58 +0100 b_michaelsen r267168 : #i94949# implemented IDocumentMarkAccess::findBookmark
2009-01-29 17:22:17 +0100 b_michaelsen r267162 : #i94949# implemented renameMark in Markmanager
2009-01-29 14:17:10 +0100 b_michaelsen r267134 : #i94949# cleanup in SwXBookmark, whitespace
2009-01-29 13:21:54 +0100 b_michaelsen r267125 : #i94949# cleanup in SwXBookmark, whitespace
2009-01-29 13:06:10 +0100 b_michaelsen r267120 : #i94949# cleanup in SwXBookmark, whitespace
2009-01-29 13:00:09 +0100 b_michaelsen r267118 : #i94949# cleanup in SwXBookmark, whitespace
2009-01-29 10:35:10 +0100 b_michaelsen r267101 : #i94949# renamed SetCrsrToBkmk to SetCrsrToMark, moving to start/end of doc if no more bookmarks can be found
2009-01-28 17:05:36 +0100 b_michaelsen r267070 : #i94949# fixed order in aProvNamesId in unocoll.cxx
2009-01-28 15:46:13 +0100 b_michaelsen r267063 : #i94949# documentation
2009-01-28 15:36:59 +0100 b_michaelsen r267062 : #i94949# removing superficial #include
2009-01-28 15:30:36 +0100 b_michaelsen r267061 : #i94949# basic code conventions
2009-01-28 11:14:30 +0100 b_michaelsen r267039 : #i94949# comparing to the actual name of the new mark
2009-01-26 15:22:25 +0100 b_michaelsen r266927 : #i94949# performance fixes
2009-01-14 21:16:56 +0100 b_michaelsen r266332 : #i94949# fixing linux x86-64 compiler warnings
2009-01-14 19:52:06 +0100 b_michaelsen r266331 : #i94949# fixing some compiler warnings
2008-12-15 13:04:49 +0100 b_michaelsen r265474 : #i94949# fixed microsoft compiler warnings
2008-12-12 18:26:02 +0100 b_michaelsen r265434 : #i94949# fixed pro platform buildbreakers
2008-12-11 17:51:24 +0100 b_michaelsen r265342 : CWS-TOOLING: rebase CWS swrefactormarks2 to trunk@264807 (milestone: DEV300:m37)
2008-12-09 18:30:59 +0100 b_michaelsen r265134 : #i94949# fixed IDocumentMarkAccess::GetType for new mark inheritance tree
2008-12-09 16:56:26 +0100 b_michaelsen r265118 : #i94949# fixed deleteMark optimization
2008-12-09 14:55:58 +0100 b_michaelsen r265092 : #i94949# DdeLink and DdeBookmark
2008-12-05 18:28:05 +0100 b_michaelsen r264914 : #i94949# fixed InitDoc in bookmarks
2008-12-02 02:23:51 +0100 b_michaelsen r264649 : #i94949# removed obsolete naming proposal code in SwXTextRange, fixed navigator reminders to forget the oldest reminder when the pool is empty
2008-12-02 02:05:19 +0100 b_michaelsen r264648 : #i94949# using bisect search for delete
2008-12-02 01:58:16 +0100 b_michaelsen r264647 : #i94949# using bisect search for delete
2008-12-02 01:37:33 +0100 b_michaelsen r264646 : #i94949# using bisect search for delete
2008-12-02 01:03:29 +0100 b_michaelsen r264645 : #i94949# fixed deleteMark crash
2008-12-01 20:55:00 +0100 b_michaelsen r264638 : #i94949# removed crossrefs from ui enumerations
2008-12-01 15:48:12 +0100 b_michaelsen r264613 : #i94949# removed superfluous local functions
2008-12-01 15:01:19 +0100 b_michaelsen r264608 : #i94949# optimized insertion of new marks
2008-12-01 14:33:21 +0100 b_michaelsen r264603 : #i94949# simplified code finding Fieldmark for a position
2008-12-01 14:05:55 +0100 b_michaelsen r264598 : #i94949# fixed reverse travelling through marks, removed obsolete getUniqueMarkName()
2008-11-27 18:48:15 +0100 b_michaelsen r264515 : #i94949# fixed _SaveCntntIdx and friends
2008-11-27 15:59:49 +0100 b_michaelsen r264500 : #i94949# fix Mark position only in ctor
2008-11-27 15:52:28 +0100 b_michaelsen r264497 : #i94949# fixed Bug in SwXBookmark, was using pDoc too early
2008-11-26 14:54:22 +0100 b_michaelsen r264396 : #i94949# fixed documentation, simplified navigator reminder code
2008-11-24 20:45:51 +0100 b_michaelsen r264266 : #i94949# removed last obsolete getUniqueMarkName calls
2008-11-24 20:21:35 +0100 b_michaelsen r264265 : #i94949# fixed typo in IDocumentMarkAccess, removed obsolete getUniqueMarkName calls
2008-11-24 18:34:32 +0100 b_michaelsen r264264 : #i94949# repositioning of Marks, removed possibility to delete marks by name in the core, refactoring of navigator reminder generation
2008-11-21 14:08:49 +0100 b_michaelsen r264137 : #i94949# simplified makeMark
2008-11-21 12:07:09 +0100 b_michaelsen r264120 : #i94949# moved ShortName and KeyCode from IMark to IBookmark
2008-11-19 12:50:49 +0100 b_michaelsen r263981 : #i94949# starting refactoring of bookmark naming
2008-11-19 11:31:08 +0100 b_michaelsen r263972 : #i94949# getting rid of obsolete dynamic casts
2008-11-18 19:06:09 +0100 b_michaelsen r263795 : #i94949# getting rid of index based mark access, IDocumentMarkAccess already provides iterators
2008-11-18 17:50:18 +0100 b_michaelsen r263792 : #i94949# getting rid of index based mark access, IDocumentMarkAccess already provides iterators
2008-11-18 16:48:20 +0100 b_michaelsen r263783 : #i94949# removed methods from crsrsh which are already available directly via IDocumentMarkAccess
2008-11-18 11:31:35 +0100 b_michaelsen r263753 : #i94949# cleaning up mark code in crsrsh
2008-11-17 10:15:25 +0100 b_michaelsen r263705 : #i94949# removed possible integer overflow
2008-11-14 18:48:45 +0100 b_michaelsen r263695 : #i94949# management of mark names in MarkManager
2008-11-14 18:23:40 +0100 b_michaelsen r263693 : #i94949# using polymorphism to do mark-specific setup in SwDoc
2008-11-14 16:27:09 +0100 b_michaelsen r263684 : #i94949# got rid of makeCrossRefBookmark
2008-11-14 13:03:32 +0100 b_michaelsen r263674 : #i94949# refactored Correction methods
2008-11-13 12:27:55 +0100 b_michaelsen r263631 : #i94949# got rid of old-style tools assertions in new code
2008-11-12 16:58:16 +0100 b_michaelsen r263608 : #i94949# added assertion for unique names
2008-11-12 16:55:18 +0100 b_michaelsen r263607 : #i94949# maked XFormField deprecated
2008-11-12 13:04:29 +0100 b_michaelsen r263587 : #i94949# replaced IDocumentMarkAccess::GetType with simple dynamic_cast where possible
2008-11-11 18:45:53 +0100 b_michaelsen r263572 : #i94949# cleaned up SwHstryBookmark
2008-11-11 13:48:18 +0100 b_michaelsen r263557 : #i94949# removed dynamic_casts to SwModify by inheriting IMark from it
2008-11-11 11:26:28 +0100 b_michaelsen r263548 : #i94949# fixed SwXBookmark
2008-11-10 17:01:19 +0100 b_michaelsen r263529 : #i94949# fixed DdeBookmarks in clipboard
2008-11-10 16:44:52 +0100 b_michaelsen r263527 : #i94949# formatting
2008-11-10 16:29:16 +0100 b_michaelsen r263526 : #i94949# fixing unoobj.cxx
2008-11-10 16:23:50 +0100 b_michaelsen r263525 : #i94949# cleaning up crossrefbookmark.cxx/.hxx
2008-11-10 16:02:08 +0100 b_michaelsen r263524 : #i94949# Pdf Export should only generate 'real' bookmarks
2008-11-10 15:33:58 +0100 b_michaelsen r263521 : #i94949# removed const_casts
2008-11-10 15:12:06 +0100 b_michaelsen r263520 : #i94949# moved _DelBookmarks into MarksManager
2008-11-07 18:48:38 +0100 b_michaelsen r263480 : #i94949# using iterator interface
2008-11-07 18:41:46 +0100 b_michaelsen r263478 : #i94949# using iterator interface
2008-11-07 18:07:41 +0100 b_michaelsen r263477 : #i94949# using iterator interface
2008-11-07 17:54:41 +0100 b_michaelsen r263476 : #i94949# using iterator interface
2008-11-07 17:44:41 +0100 b_michaelsen r263475 : #i94949# moved correction methods into MarkManager
2008-11-06 18:47:28 +0100 b_michaelsen r263404 : #i94949# getting rid of superfluous const_casts
2008-11-06 17:58:01 +0100 b_michaelsen r263403 : #i94949# no more setting of mark positions outside of the core
2008-11-06 17:08:37 +0100 b_michaelsen r263401 : #i94949# removed setters from IMark
2008-11-06 13:55:25 +0100 b_michaelsen r263383 : #i94949 SwDoc does not implement IDocumentMarkAccess anymore
2008-11-04 18:17:03 +0100 b_michaelsen r263333 : #i94949# began removing IDocumentMarkAccess from SwDoc
2008-11-04 16:48:34 +0100 b_michaelsen r263330 : removing dead code (SwBitArray) found by mst
2008-11-04 16:29:32 +0100 b_michaelsen r263329 : removing dead code (SwBitArray) found by mst
2008-11-04 14:57:48 +0100 b_michaelsen r263326 : removing dead code (SwBitArray) found by mst
2008-11-04 14:50:18 +0100 b_michaelsen r263325 : #i94949# stricter typing in IDocumentMarkAccess
2008-10-24 15:16:27 +0200 b_michaelsen r262647 : #i94949# renamed ::sw::bookmark::SimpleMark to NavigatorReminder to fit the IDocumentMarkAccess enum
2008-10-24 15:10:10 +0200 b_michaelsen r262646 : #i94949# only 'real' bookmark implement IBookmark, Marks also get removed from m_vFieldmarks on delete/clear
2008-10-24 13:06:23 +0200 b_michaelsen r262636 : #i94949# Fieldmark tabnavigation
2008-10-23 12:16:36 +0200 b_michaelsen r262619 : #i94949# Fieldmark classes and filters
2008-10-22 13:17:18 +0200 b_michaelsen r262597 : #i94949# writer import fixes
2008-10-21 11:30:38 +0200 b_michaelsen r262565 : #i94949# renamed methods containing Bookmark in the generic IMark interface
2008-10-20 14:09:02 +0200 b_michaelsen r262318 : #i94949# fixed SwDoc::CorrRel
2008-10-16 22:45:13 +0200 b_michaelsen r262273 : #i94949 simplified Before/After methods
2008-10-16 21:40:57 +0200 b_michaelsen r262271 : #i94949 renamed SimpleMark to NavigatorReminder
2008-10-16 21:15:23 +0200 b_michaelsen r262270 : #i94949 using shared_ptr only in MarkManager
2008-10-16 17:46:37 +0200 b_michaelsen r262269 : #i94949# getFieldmarkBefore and getFieldmarkAfter
2008-10-16 17:12:13 +0200 b_michaelsen r262265 : #i94949# cleanup in crbm.cxx
2008-10-16 12:49:01 +0200 b_michaelsen r262257 : #i94949# fixed usage of invalid iterator, fixed invalid cast
2008-10-15 15:34:20 +0200 b_michaelsen r262239 : #i94949# added moved files
2008-10-15 15:26:45 +0200 b_michaelsen r262237 : #i94949# initial reimplementation of Bookmarks
2009-04-21 15:40:02 +00:00
|
|
|
{
|
|
|
|
IDocumentMarkAccess* const pMarkAccess = rWrtSh.getIDocumentMarkAccess();
|
|
|
|
pMarkAccess->deleteMark( pMarkAccess->findMark(((SfxStringItem*)pItem)->GetValue()) );
|
|
|
|
}
|
2002-07-01 08:09:41 +00:00
|
|
|
break;
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
case FN_AUTOFORMAT_REDLINE_APPLY:
|
|
|
|
{
|
2004-02-03 15:55:25 +00:00
|
|
|
SvxSwAutoFmtFlags aFlags(SvxAutoCorrCfg::Get()->GetAutoCorrect()->GetSwFlags());
|
2000-09-18 16:15:01 +00:00
|
|
|
// das muss fuer die Nachbearbeitung immer FALSE sein
|
|
|
|
aFlags.bAFmtByInput = FALSE;
|
|
|
|
aFlags.bWithRedlining = TRUE;
|
|
|
|
rWrtSh.AutoFormat( &aFlags );
|
|
|
|
aFlags.bWithRedlining = FALSE;
|
|
|
|
|
|
|
|
SfxViewFrame* pVFrame = GetView().GetViewFrame();
|
|
|
|
if (pVFrame->HasChildWindow(FN_REDLINE_ACCEPT))
|
|
|
|
pVFrame->ToggleChildWindow(FN_REDLINE_ACCEPT);
|
|
|
|
|
2007-09-27 11:30:56 +00:00
|
|
|
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
|
|
|
|
DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
|
2004-05-10 15:36:49 +00:00
|
|
|
|
2007-04-26 08:18:08 +00:00
|
|
|
AbstractSwModalRedlineAcceptDlg* pDlg = pFact->CreateSwModalRedlineAcceptDlg( &GetView().GetEditWin(), DLG_MOD_REDLINE_ACCEPT );
|
2007-09-27 11:30:56 +00:00
|
|
|
DBG_ASSERT(pDlg, "Dialogdiet fail!");
|
2000-09-18 16:15:01 +00:00
|
|
|
|
|
|
|
switch (lcl_AskRedlineMode(&GetView().GetEditWin()))
|
|
|
|
{
|
|
|
|
case RET_OK:
|
2002-06-27 07:47:17 +00:00
|
|
|
{
|
2007-09-27 11:30:56 +00:00
|
|
|
pDlg->AcceptAll(TRUE);
|
2002-06-27 07:47:17 +00:00
|
|
|
SfxRequest aReq( pVFrame, FN_AUTOFORMAT_APPLY );
|
|
|
|
aReq.Done();
|
|
|
|
rReq.Ignore();
|
2000-09-18 16:15:01 +00:00
|
|
|
break;
|
2002-06-27 07:47:17 +00:00
|
|
|
}
|
2000-09-18 16:15:01 +00:00
|
|
|
|
|
|
|
case RET_CANCEL:
|
2007-09-27 11:30:56 +00:00
|
|
|
pDlg->AcceptAll(FALSE);
|
2002-06-27 07:47:17 +00:00
|
|
|
rReq.Ignore();
|
2000-09-18 16:15:01 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case 2:
|
2007-09-27 11:30:56 +00:00
|
|
|
pDlg->Execute();
|
2002-06-27 07:47:17 +00:00
|
|
|
rReq.Done();
|
2000-09-18 16:15:01 +00:00
|
|
|
break;
|
|
|
|
}
|
2007-09-27 11:30:56 +00:00
|
|
|
delete pDlg;
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case FN_AUTOFORMAT_APPLY:
|
|
|
|
{
|
2004-02-03 15:55:25 +00:00
|
|
|
SvxSwAutoFmtFlags aFlags(SvxAutoCorrCfg::Get()->GetAutoCorrect()->GetSwFlags());
|
2000-09-18 16:15:01 +00:00
|
|
|
// das muss fuer die Nachbearbeitung immer FALSE sein
|
|
|
|
aFlags.bAFmtByInput = FALSE;
|
|
|
|
rWrtSh.AutoFormat( &aFlags );
|
2002-06-27 07:47:17 +00:00
|
|
|
rReq.Done();
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
case FN_AUTOFORMAT_AUTO:
|
|
|
|
{
|
2004-02-03 15:55:25 +00:00
|
|
|
SvxAutoCorrCfg* pACfg = SvxAutoCorrCfg::Get();
|
2002-06-27 07:47:17 +00:00
|
|
|
BOOL bSet = pItem ? ((const SfxBoolItem*)pItem)->GetValue() : !pACfg->IsAutoFmtByInput();
|
2000-09-18 16:15:01 +00:00
|
|
|
if( bSet != pACfg->IsAutoFmtByInput() )
|
2001-08-01 09:35:32 +00:00
|
|
|
{
|
2000-09-18 16:15:01 +00:00
|
|
|
pACfg->SetAutoFmtByInput( bSet );
|
2001-08-01 09:35:32 +00:00
|
|
|
GetView().GetViewFrame()->GetBindings().Invalidate( nSlot );
|
2002-06-27 07:47:17 +00:00
|
|
|
if ( !pItem )
|
|
|
|
rReq.AppendItem( SfxBoolItem( GetPool().GetWhich(nSlot), bSet ) );
|
|
|
|
rReq.Done();
|
2001-08-01 09:35:32 +00:00
|
|
|
}
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
case FN_AUTO_CORRECT:
|
|
|
|
{
|
|
|
|
// erstmal auf Blank defaulten
|
|
|
|
sal_Unicode cChar = ' ';
|
2004-02-03 15:55:25 +00:00
|
|
|
rWrtSh.AutoCorrect( *SvxAutoCorrCfg::Get()->GetAutoCorrect(), cChar );
|
2004-03-08 15:18:50 +00:00
|
|
|
rReq.Done();
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
break;
|
2004-08-02 12:10:44 +00:00
|
|
|
case FN_TABLE_SORT_DIALOG:
|
2000-09-18 16:15:01 +00:00
|
|
|
case FN_SORTING_DLG:
|
|
|
|
{
|
2007-09-27 11:30:56 +00:00
|
|
|
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
|
|
|
|
DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
|
2004-05-10 15:36:49 +00:00
|
|
|
|
2007-04-26 08:18:08 +00:00
|
|
|
VclAbstractDialog* pDlg = pFact->CreateVclAbstractDialog( GetView().GetWindow(), rWrtSh, DLG_SORTING );
|
2007-09-27 11:30:56 +00:00
|
|
|
DBG_ASSERT(pDlg, "Dialogdiet fail!");
|
2000-09-18 16:15:01 +00:00
|
|
|
pDlg->Execute();
|
|
|
|
delete pDlg;
|
2004-03-08 15:18:50 +00:00
|
|
|
rReq.Done();
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
case FN_NUMBERING_OUTLINE_DLG:
|
|
|
|
{
|
|
|
|
SfxItemSet aTmp(GetPool(), FN_PARAM_1, FN_PARAM_1);
|
2004-05-10 15:36:49 +00:00
|
|
|
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
|
2007-09-27 11:30:56 +00:00
|
|
|
DBG_ASSERT(pFact, "Dialogdiet fail!");
|
2007-04-26 08:18:08 +00:00
|
|
|
SfxAbstractTabDialog* pDlg = pFact->CreateSwTabDialog( DLG_TAB_OUTLINE,
|
2004-05-10 15:36:49 +00:00
|
|
|
GetView().GetWindow(), &aTmp, rWrtSh);
|
2007-09-27 11:30:56 +00:00
|
|
|
DBG_ASSERT(pDlg, "Dialogdiet fail!");
|
2000-09-18 16:15:01 +00:00
|
|
|
pDlg->Execute();
|
|
|
|
delete pDlg;
|
2004-03-08 15:18:50 +00:00
|
|
|
rReq.Done();
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
case FN_CALCULATE:
|
2001-02-02 16:46:27 +00:00
|
|
|
{
|
|
|
|
SwTransferable* pTransfer = new SwTransferable( rWrtSh );
|
2007-09-27 11:30:56 +00:00
|
|
|
/*??*/ uno::Reference<
|
|
|
|
datatransfer::XTransferable > xRef(
|
2001-02-02 16:46:27 +00:00
|
|
|
pTransfer );
|
|
|
|
pTransfer->CalculateAndCopy();
|
2004-03-08 15:18:50 +00:00
|
|
|
rReq.Done();
|
2001-02-02 16:46:27 +00:00
|
|
|
}
|
2000-09-18 16:15:01 +00:00
|
|
|
break;
|
|
|
|
case FN_GOTO_REFERENCE:
|
|
|
|
{
|
|
|
|
SwField *pFld = rWrtSh.GetCurFld();
|
|
|
|
if(pFld && pFld->GetTypeId() == TYP_GETREFFLD)
|
|
|
|
{
|
|
|
|
rWrtSh.StartAllAction();
|
|
|
|
rWrtSh.SwCrsrShell::GotoRefMark( ((SwGetRefField*)pFld)->GetSetRefName(),
|
|
|
|
((SwGetRefField*)pFld)->GetSubType(),
|
|
|
|
((SwGetRefField*)pFld)->GetSeqNo() );
|
|
|
|
rWrtSh.EndAllAction();
|
2004-03-08 15:18:50 +00:00
|
|
|
rReq.Done();
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case FN_EDIT_FORMULA:
|
|
|
|
{
|
|
|
|
const USHORT nId = SwInputChild::GetChildWindowId();
|
2002-08-15 06:53:06 +00:00
|
|
|
SfxViewFrame* pVFrame = GetView().GetViewFrame();
|
|
|
|
if(pItem)
|
|
|
|
{
|
|
|
|
//if the ChildWindow is active it has to be removed
|
|
|
|
if( pVFrame->HasChildWindow( nId ) )
|
|
|
|
{
|
|
|
|
pVFrame->ToggleChildWindow( nId );
|
|
|
|
pVFrame->GetBindings().InvalidateAll( TRUE );
|
|
|
|
}
|
|
|
|
|
|
|
|
String sFormula(((const SfxStringItem*)pItem)->GetValue());
|
|
|
|
SwFldMgr aFldMgr;
|
|
|
|
rWrtSh.StartAllAction();
|
|
|
|
BOOL bDelSel;
|
|
|
|
if( 0 != (bDelSel = rWrtSh.HasSelection()) )
|
|
|
|
{
|
|
|
|
rWrtSh.StartUndo( UNDO_START );
|
|
|
|
rWrtSh.DelRight();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
rWrtSh.EnterStdMode();
|
|
|
|
}
|
|
|
|
|
|
|
|
if( !bDelSel && aFldMgr.GetCurFld() && TYP_FORMELFLD == aFldMgr.GetCurTypeId() )
|
|
|
|
aFldMgr.UpdateCurFld( aFldMgr.GetCurFld()->GetFormat(), aEmptyStr, sFormula );
|
|
|
|
else if( sFormula.Len() )
|
|
|
|
{
|
|
|
|
if( rWrtSh.IsCrsrInTbl() )
|
|
|
|
{
|
|
|
|
SfxItemSet aSet( rWrtSh.GetAttrPool(), RES_BOXATR_FORMULA, RES_BOXATR_FORMULA );
|
|
|
|
aSet.Put( SwTblBoxFormula( sFormula ));
|
|
|
|
rWrtSh.SetTblBoxFormulaAttrs( aSet );
|
|
|
|
rWrtSh.UpdateTable();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
SvNumberFormatter* pFormatter = rWrtSh.GetNumberFormatter();
|
|
|
|
ULONG nSysNumFmt = pFormatter->GetFormatIndex( NF_NUMBER_STANDARD, LANGUAGE_SYSTEM);
|
2007-09-27 11:30:56 +00:00
|
|
|
SwInsertFld_Data aData(TYP_FORMELFLD, nsSwGetSetExpType::GSE_FORMULA, aEmptyStr, sFormula, nSysNumFmt);
|
2002-08-15 06:53:06 +00:00
|
|
|
aFldMgr.InsertFld(aData);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if( bDelSel )
|
|
|
|
rWrtSh.EndUndo( UNDO_END );
|
|
|
|
rWrtSh.EndAllAction();
|
|
|
|
rReq.Done();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
rWrtSh.EndAllTblBoxEdit();
|
|
|
|
pVFrame->ToggleChildWindow( nId );
|
|
|
|
if( !pVFrame->HasChildWindow( nId ) )
|
|
|
|
pVFrame->GetBindings().InvalidateAll( TRUE );
|
|
|
|
rReq.Ignore();
|
|
|
|
}
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
case FN_TABLE_UNSET_READ_ONLY:
|
|
|
|
{
|
|
|
|
rWrtSh.UnProtectTbls();
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case FN_EDIT_HYPERLINK:
|
|
|
|
GetView().GetViewFrame()->ToggleChildWindow(SID_HYPERLINK_DIALOG);
|
|
|
|
break;
|
2008-12-09 07:49:49 +00:00
|
|
|
case FN_REMOVE_HYPERLINK:
|
|
|
|
{
|
|
|
|
BOOL bSel = rWrtSh.HasSelection();
|
|
|
|
if(!bSel)
|
|
|
|
{
|
|
|
|
rWrtSh.StartAction();
|
|
|
|
rWrtSh.Push();
|
|
|
|
if(!rWrtSh.SelectTxtAttr( RES_TXTATR_INETFMT ))
|
|
|
|
rWrtSh.SelWrd();
|
|
|
|
}
|
|
|
|
//now remove the attribute
|
|
|
|
SvUShortsSort aAttribs;
|
|
|
|
aAttribs.Insert( RES_TXTATR_INETFMT );
|
|
|
|
rWrtSh.ResetAttr( &aAttribs );
|
|
|
|
if(!bSel)
|
|
|
|
{
|
|
|
|
rWrtSh.Pop(FALSE);
|
|
|
|
rWrtSh.EndAction();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
2002-06-27 07:47:17 +00:00
|
|
|
case SID_ATTR_BRUSH_CHAR :
|
|
|
|
case SID_ATTR_CHAR_SCALEWIDTH :
|
|
|
|
case SID_ATTR_CHAR_ROTATED :
|
|
|
|
case FN_TXTATR_INET :
|
2002-07-08 07:16:40 +00:00
|
|
|
case FN_INSERT_HYPERLINK:
|
2002-06-27 07:47:17 +00:00
|
|
|
{
|
|
|
|
USHORT nWhich = GetPool().GetWhich( nSlot );
|
|
|
|
if ( pArgs && pArgs->GetItemState( nWhich ) == SFX_ITEM_SET )
|
|
|
|
bUseDialog = FALSE;
|
|
|
|
// intentionally no break
|
|
|
|
}
|
2000-09-18 16:15:01 +00:00
|
|
|
case SID_CHAR_DLG:
|
|
|
|
{
|
2007-11-23 15:27:22 +00:00
|
|
|
lcl_CharDialog( rWrtSh, bUseDialog, nSlot, pArgs, &rReq );
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case SID_CHAR_DLG_FOR_PARAGRAPH:
|
|
|
|
{
|
|
|
|
rWrtSh.Push(); //save current cursor
|
2008-06-16 07:23:44 +00:00
|
|
|
SwLangHelper::SelectCurrentPara( rWrtSh );
|
2007-11-23 15:27:22 +00:00
|
|
|
lcl_CharDialog( rWrtSh, bUseDialog, nSlot, pArgs, &rReq );
|
|
|
|
rWrtSh.Pop( FALSE ); //restore old cursor
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
break;
|
2002-06-14 06:57:24 +00:00
|
|
|
case SID_ATTR_LRSPACE :
|
|
|
|
case SID_ATTR_ULSPACE :
|
2002-06-27 07:47:17 +00:00
|
|
|
case SID_ATTR_BRUSH :
|
|
|
|
case SID_PARA_VERTALIGN :
|
2002-06-10 16:09:01 +00:00
|
|
|
case SID_ATTR_PARA_NUMRULE :
|
2002-06-14 06:57:24 +00:00
|
|
|
case SID_ATTR_PARA_REGISTER :
|
|
|
|
case SID_ATTR_PARA_PAGENUM :
|
2002-06-10 16:09:01 +00:00
|
|
|
case FN_FORMAT_LINENUMBER :
|
|
|
|
case FN_NUMBER_NEWSTART :
|
|
|
|
case FN_NUMBER_NEWSTART_AT :
|
2002-06-19 16:28:49 +00:00
|
|
|
case FN_FORMAT_DROPCAPS :
|
2002-07-04 13:55:54 +00:00
|
|
|
case FN_DROP_TEXT:
|
2002-06-10 16:09:01 +00:00
|
|
|
{
|
|
|
|
USHORT nWhich = GetPool().GetWhich( nSlot );
|
2002-06-14 10:45:00 +00:00
|
|
|
if ( pArgs && pArgs->GetItemState( nWhich ) == SFX_ITEM_SET )
|
2002-06-10 16:09:01 +00:00
|
|
|
bUseDialog = FALSE;
|
|
|
|
// intentionally no break
|
|
|
|
|
|
|
|
}
|
2000-09-18 16:15:01 +00:00
|
|
|
case SID_PARA_DLG:
|
|
|
|
{
|
2002-07-04 13:55:54 +00:00
|
|
|
FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebView, &GetView()));
|
2007-09-27 11:30:56 +00:00
|
|
|
SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< UINT16 >(eMetric)));
|
2002-07-04 13:55:54 +00:00
|
|
|
SfxItemSet aCoreSet( GetPool(),
|
|
|
|
RES_PARATR_BEGIN, RES_PARATR_END - 1,
|
2008-06-13 10:19:00 +00:00
|
|
|
// --> OD 2008-02-25 #refactorlists#
|
|
|
|
RES_PARATR_LIST_BEGIN, RES_PARATR_LIST_END - 1,
|
|
|
|
// <--
|
2002-07-04 13:55:54 +00:00
|
|
|
RES_FRMATR_BEGIN, RES_FRMATR_END - 1,
|
|
|
|
SID_ATTR_TABSTOP_POS, SID_ATTR_TABSTOP_POS,
|
|
|
|
SID_ATTR_TABSTOP_DEFAULTS, SID_ATTR_TABSTOP_DEFAULTS,
|
|
|
|
SID_ATTR_TABSTOP_OFFSET, SID_ATTR_TABSTOP_OFFSET,
|
|
|
|
SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER,
|
|
|
|
SID_ATTR_PARA_MODEL, SID_ATTR_PARA_KEEP,
|
|
|
|
SID_ATTR_PARA_PAGENUM, SID_ATTR_PARA_PAGENUM,
|
|
|
|
SID_HTML_MODE, SID_HTML_MODE,
|
|
|
|
FN_PARAM_1, FN_PARAM_1,
|
|
|
|
FN_NUMBER_NEWSTART, FN_NUMBER_NEWSTART_AT,
|
|
|
|
FN_DROP_TEXT, FN_DROP_CHAR_STYLE_NAME,
|
|
|
|
0);
|
2008-03-05 16:26:34 +00:00
|
|
|
// --> OD 2008-01-16 #newlistlevelattrs#
|
|
|
|
// get also the list level indent values merged as LR-SPACE item, if needed.
|
|
|
|
rWrtSh.GetCurAttr( aCoreSet, true );
|
|
|
|
// <--
|
2002-07-04 13:55:54 +00:00
|
|
|
aCoreSet.Put(SfxUInt16Item(SID_HTML_MODE,
|
|
|
|
::GetHtmlMode(GetView().GetDocShell())));
|
|
|
|
|
|
|
|
// Tabulatoren, DefaultTabs ins ItemSet Stecken
|
|
|
|
const SvxTabStopItem& rDefTabs = (const SvxTabStopItem&)
|
|
|
|
GetPool().GetDefaultItem(RES_PARATR_TABSTOP);
|
|
|
|
|
|
|
|
USHORT nDefDist = ::GetTabDist( rDefTabs );
|
|
|
|
SfxUInt16Item aDefDistItem( SID_ATTR_TABSTOP_DEFAULTS, nDefDist );
|
|
|
|
aCoreSet.Put( aDefDistItem );
|
|
|
|
|
|
|
|
// Aktueller Tab
|
|
|
|
SfxUInt16Item aTabPos( SID_ATTR_TABSTOP_POS, 0 );
|
|
|
|
aCoreSet.Put( aTabPos );
|
|
|
|
|
|
|
|
// linker Rand als Offset
|
2008-01-10 11:33:10 +00:00
|
|
|
//#i24363# tab stops relative to indent
|
|
|
|
const long nOff = rWrtSh.getIDocumentSettingAccess()->get(IDocumentSettingAccess::TABS_RELATIVE_TO_INDENT) ?
|
|
|
|
((SvxLRSpaceItem&)aCoreSet.Get( RES_LR_SPACE )).GetTxtLeft() : 0;
|
2002-07-04 13:55:54 +00:00
|
|
|
SfxInt32Item aOff( SID_ATTR_TABSTOP_OFFSET, nOff );
|
|
|
|
aCoreSet.Put( aOff );
|
|
|
|
|
|
|
|
// BoxInfo setzen
|
|
|
|
::PrepareBoxInfo( aCoreSet, rWrtSh );
|
|
|
|
|
|
|
|
//aktuelles Seitenformat
|
|
|
|
::SwToSfxPageDescAttr( aCoreSet );
|
|
|
|
|
|
|
|
UINT16 nDefPage = 0;
|
|
|
|
if( pItem )
|
|
|
|
nDefPage = ((SfxUInt16Item *)pItem)->GetValue();
|
|
|
|
|
|
|
|
// Numerierungseigenschaften
|
|
|
|
if(rWrtSh.GetCurNumRule())
|
|
|
|
{
|
2008-06-13 10:19:00 +00:00
|
|
|
SfxBoolItem aStart( FN_NUMBER_NEWSTART, rWrtSh.IsNumRuleStart() );
|
2002-11-06 09:17:22 +00:00
|
|
|
aCoreSet.Put(aStart);
|
2008-06-13 10:19:00 +00:00
|
|
|
// --> OD 2008-02-29 #refactorlists#
|
|
|
|
// SfxUInt16Item aStartAt(FN_NUMBER_NEWSTART_AT,
|
|
|
|
// rWrtSh.IsNodeNumStart());
|
|
|
|
SfxUInt16Item aStartAt( FN_NUMBER_NEWSTART_AT,
|
|
|
|
rWrtSh.GetNodeNumStart() );
|
|
|
|
// <--
|
2002-11-06 09:17:22 +00:00
|
|
|
aCoreSet.Put(aStartAt);
|
2002-07-04 13:55:54 +00:00
|
|
|
}
|
2007-09-27 11:30:56 +00:00
|
|
|
SfxAbstractTabDialog* pDlg = NULL;
|
2002-07-04 13:55:54 +00:00
|
|
|
|
2004-05-10 15:36:49 +00:00
|
|
|
if ( bUseDialog && GetActiveView() )
|
|
|
|
{
|
2007-09-27 11:30:56 +00:00
|
|
|
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
|
|
|
|
DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
|
2004-05-10 15:36:49 +00:00
|
|
|
|
2007-04-26 08:18:08 +00:00
|
|
|
pDlg = pFact->CreateSwParaDlg( GetView().GetWindow(),GetView(), aCoreSet,DLG_STD, DLG_PARA,NULL, FALSE, nDefPage );
|
2007-09-27 11:30:56 +00:00
|
|
|
DBG_ASSERT(pDlg, "Dialogdiet fail!");
|
2004-05-10 15:36:49 +00:00
|
|
|
}
|
2002-07-04 13:55:54 +00:00
|
|
|
SfxItemSet* pSet = NULL;
|
|
|
|
if ( !bUseDialog )
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2002-07-04 13:55:54 +00:00
|
|
|
pSet = (SfxItemSet*) pArgs;
|
|
|
|
|
|
|
|
}
|
2007-11-01 09:57:25 +00:00
|
|
|
else if ( NULL != pDlg && pDlg->Execute() == RET_OK )
|
2002-07-04 13:55:54 +00:00
|
|
|
{
|
|
|
|
// Defaults evtl umsetzen
|
|
|
|
pSet = (SfxItemSet*)pDlg->GetOutputItemSet();
|
|
|
|
USHORT nNewDist;
|
|
|
|
if( SFX_ITEM_SET == pSet->GetItemState( SID_ATTR_TABSTOP_DEFAULTS, FALSE, &pItem ) &&
|
|
|
|
nDefDist != (nNewDist = ((SfxUInt16Item*)pItem)->GetValue()) )
|
|
|
|
{
|
2007-05-10 15:24:35 +00:00
|
|
|
SvxTabStopItem aDefTabs( 0, 0, SVX_TAB_ADJUST_DEFAULT, RES_PARATR_TABSTOP );
|
2002-07-04 13:55:54 +00:00
|
|
|
MakeDefTabs( nNewDist, aDefTabs );
|
|
|
|
rWrtSh.SetDefault( aDefTabs );
|
|
|
|
pSet->ClearItem( SID_ATTR_TABSTOP_DEFAULTS );
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( SFX_ITEM_SET == pSet->GetItemState(FN_PARAM_1,FALSE,&pItem) )
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2002-07-04 13:55:54 +00:00
|
|
|
pSet->Put(SfxStringItem(FN_DROP_TEXT, ((const SfxStringItem*)pItem)->GetValue()));
|
|
|
|
pSet->ClearItem(FN_PARAM_1);
|
|
|
|
}
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2002-07-04 13:55:54 +00:00
|
|
|
if( SFX_ITEM_SET == pSet->GetItemState( RES_PARATR_DROP, FALSE, &pItem ))
|
|
|
|
{
|
|
|
|
String sCharStyleName;
|
|
|
|
if(((const SwFmtDrop*)pItem)->GetCharFmt())
|
|
|
|
sCharStyleName = ((const SwFmtDrop*)pItem)->GetCharFmt()->GetName();
|
|
|
|
pSet->Put(SfxStringItem(FN_DROP_CHAR_STYLE_NAME, sCharStyleName));
|
2002-06-10 16:09:01 +00:00
|
|
|
}
|
2002-07-04 13:55:54 +00:00
|
|
|
}
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2002-07-04 13:55:54 +00:00
|
|
|
if ( pSet )
|
|
|
|
{
|
|
|
|
rReq.Done( *pSet );
|
|
|
|
::SfxToSwPageDescAttr( rWrtSh, *pSet );
|
2007-01-23 07:33:52 +00:00
|
|
|
// --> OD 2006-12-06 #i56253#
|
|
|
|
// enclose all undos.
|
|
|
|
// Thus, check conditions, if actions will be performed.
|
|
|
|
const bool bUndoNeeded( pSet->Count() ||
|
|
|
|
SFX_ITEM_SET == pSet->GetItemState(FN_NUMBER_NEWSTART) ||
|
|
|
|
SFX_ITEM_SET == pSet->GetItemState(FN_NUMBER_NEWSTART_AT) );
|
|
|
|
if ( bUndoNeeded )
|
|
|
|
{
|
|
|
|
rWrtSh.StartUndo( UNDO_INSATTR );
|
|
|
|
}
|
|
|
|
// <--
|
2002-07-04 13:55:54 +00:00
|
|
|
if( pSet->Count() )
|
2002-06-10 16:09:01 +00:00
|
|
|
{
|
2002-07-04 13:55:54 +00:00
|
|
|
rWrtSh.StartAction();
|
2007-01-23 07:33:52 +00:00
|
|
|
// rWrtSh.StartUndo( UNDO_START );
|
2002-07-04 13:55:54 +00:00
|
|
|
if ( SFX_ITEM_SET == pSet->GetItemState(FN_DROP_TEXT, FALSE, &pItem) )
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2002-07-04 13:55:54 +00:00
|
|
|
if ( ((SfxStringItem*)pItem)->GetValue().Len() )
|
|
|
|
rWrtSh.ReplaceDropTxt(((SfxStringItem*)pItem)->GetValue());
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
2002-07-04 13:55:54 +00:00
|
|
|
rWrtSh.SetAttr( *pSet );
|
2007-01-23 07:33:52 +00:00
|
|
|
// rWrtSh.EndUndo( UNDO_END );
|
2002-07-04 13:55:54 +00:00
|
|
|
rWrtSh.EndAction();
|
|
|
|
SwTxtFmtColl* pColl = rWrtSh.GetCurTxtFmtColl();
|
|
|
|
if(pColl && pColl->IsAutoUpdateFmt())
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2002-07-04 13:55:54 +00:00
|
|
|
rWrtSh.AutoUpdatePara(pColl, *pSet);
|
2002-06-10 16:09:01 +00:00
|
|
|
}
|
2002-07-04 13:55:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if( SFX_ITEM_SET == pSet->GetItemState(FN_NUMBER_NEWSTART) )
|
|
|
|
{
|
2002-11-06 09:17:22 +00:00
|
|
|
//SetNumRuleStart(TRUE) restarts the numbering at the value
|
|
|
|
//that is defined at the starting point of the numbering level
|
|
|
|
//otherwise the SetNodeNumStart() value determines the start
|
|
|
|
//if it's set to something different than USHRT_MAX
|
|
|
|
|
2002-07-04 13:55:54 +00:00
|
|
|
BOOL bStart = ((SfxBoolItem&)pSet->Get(FN_NUMBER_NEWSTART)).GetValue();
|
2007-07-03 13:18:26 +00:00
|
|
|
// --> OD 2007-06-11 #b6560525#
|
|
|
|
// Default value for restart value has to be USHRT_MAX
|
|
|
|
// in order to indicate that the restart value of the list
|
|
|
|
// style has to be used on restart.
|
|
|
|
USHORT nNumStart = USHRT_MAX;
|
|
|
|
// <--
|
2002-07-04 13:55:54 +00:00
|
|
|
if( SFX_ITEM_SET == pSet->GetItemState(FN_NUMBER_NEWSTART_AT) )
|
2002-06-10 16:09:01 +00:00
|
|
|
{
|
2002-11-06 09:17:22 +00:00
|
|
|
nNumStart = ((SfxUInt16Item&)pSet->Get(FN_NUMBER_NEWSTART_AT)).GetValue();
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
2002-11-06 09:17:22 +00:00
|
|
|
rWrtSh.SetNumRuleStart(bStart);
|
|
|
|
rWrtSh.SetNodeNumStart(nNumStart);
|
2002-07-04 13:55:54 +00:00
|
|
|
}
|
|
|
|
else if( SFX_ITEM_SET == pSet->GetItemState(FN_NUMBER_NEWSTART_AT) )
|
|
|
|
{
|
|
|
|
USHORT nNumStart = ((SfxUInt16Item&)pSet->Get(FN_NUMBER_NEWSTART_AT)).GetValue();
|
|
|
|
rWrtSh.SetNodeNumStart(nNumStart);
|
2002-11-06 09:17:22 +00:00
|
|
|
rWrtSh.SetNumRuleStart(FALSE);
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
2007-01-23 07:33:52 +00:00
|
|
|
// --> OD 2006-12-06 #i56253#
|
|
|
|
if ( bUndoNeeded )
|
|
|
|
{
|
|
|
|
rWrtSh.EndUndo( UNDO_INSATTR );
|
|
|
|
}
|
|
|
|
// <--
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
2002-07-04 13:55:54 +00:00
|
|
|
|
|
|
|
delete pDlg;
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
break;
|
2006-01-06 12:05:17 +00:00
|
|
|
case FN_NUM_CONTINUE:
|
|
|
|
{
|
2008-06-13 10:19:00 +00:00
|
|
|
// --> OD 2008-03-18 #refactorlists#
|
|
|
|
String sContinuedListId;
|
|
|
|
const SwNumRule* pRule =
|
2009-09-08 13:44:38 +00:00
|
|
|
rWrtSh.SearchNumRule( false, true, false, -1, sContinuedListId );
|
|
|
|
// --> OD 2009-08-26 #i86492#
|
|
|
|
// Search also for bullet list
|
|
|
|
if ( !pRule )
|
|
|
|
{
|
|
|
|
pRule = rWrtSh.SearchNumRule( false, false, false, -1, sContinuedListId );
|
|
|
|
}
|
|
|
|
// <--
|
2008-06-13 10:19:00 +00:00
|
|
|
if ( pRule )
|
2006-01-06 12:05:17 +00:00
|
|
|
{
|
2008-06-13 10:19:00 +00:00
|
|
|
rWrtSh.SetCurNumRule( *pRule, false, sContinuedListId );
|
2006-01-06 12:05:17 +00:00
|
|
|
}
|
2008-06-13 10:19:00 +00:00
|
|
|
// <--
|
2006-01-06 12:05:17 +00:00
|
|
|
}
|
|
|
|
break;
|
2000-09-18 16:15:01 +00:00
|
|
|
case FN_SELECT_PARA:
|
|
|
|
{
|
|
|
|
if(!rWrtSh.IsSttOfPara())
|
|
|
|
rWrtSh.SttPara(FALSE);
|
|
|
|
else
|
|
|
|
rWrtSh.EnterStdMode();
|
|
|
|
rWrtSh.EndPara(TRUE);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case SID_DEC_INDENT:
|
|
|
|
case SID_INC_INDENT:
|
|
|
|
rWrtSh.MoveLeftMargin( SID_INC_INDENT == nSlot,
|
|
|
|
rReq.GetModifier() != KEY_MOD1 );
|
2004-03-08 15:18:50 +00:00
|
|
|
rReq.Done();
|
2000-09-18 16:15:01 +00:00
|
|
|
break;
|
|
|
|
case FN_DEC_INDENT_OFFSET:
|
|
|
|
case FN_INC_INDENT_OFFSET:
|
|
|
|
rWrtSh.MoveLeftMargin( FN_INC_INDENT_OFFSET == nSlot,
|
|
|
|
rReq.GetModifier() == KEY_MOD1 );
|
2004-03-08 15:18:50 +00:00
|
|
|
rReq.Done();
|
2000-09-18 16:15:01 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case SID_ATTR_CHAR_COLOR2:
|
|
|
|
{
|
|
|
|
if(pItem)
|
|
|
|
{
|
|
|
|
Color aSet = ((const SvxColorItem*)pItem)->GetValue();
|
2007-09-27 11:30:56 +00:00
|
|
|
SwEditWin& rEditWin = GetView().GetEditWin();
|
2000-09-18 16:15:01 +00:00
|
|
|
rEditWin.SetTextColor(aSet);
|
|
|
|
SwApplyTemplate* pApply = rEditWin.GetApplyTemplate();
|
|
|
|
SvxColorItem aItem(aSet, RES_CHRATR_COLOR);
|
|
|
|
|
|
|
|
// besteht eine Selektion, wird sie gleich gefaerbt
|
|
|
|
if(!pApply && rWrtSh.HasSelection())
|
|
|
|
{
|
2007-09-27 11:30:56 +00:00
|
|
|
rWrtSh.SetAttr(SvxColorItem (aSet, RES_CHRATR_COLOR));
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
else if(!pApply || pApply->nColor != SID_ATTR_CHAR_COLOR_EXT)
|
|
|
|
{
|
2007-09-27 11:30:56 +00:00
|
|
|
GetView().GetViewFrame()->GetDispatcher()->Execute(SID_ATTR_CHAR_COLOR_EXT);
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
|
2002-07-19 10:16:36 +00:00
|
|
|
rReq.Done();
|
2000-09-18 16:15:01 +00:00
|
|
|
/* OS 22.02.97 18:40 Das alte Verhalten ist unerwuenscht
|
|
|
|
SwEditWin& rEdtWin = GetView().GetEditWin();
|
|
|
|
|
|
|
|
SwApplyTemplate* pApply = rEdtWin.GetApplyTemplate();
|
|
|
|
SvxColorItem aItem(aSet, RES_CHRATR_COLOR);
|
|
|
|
|
|
|
|
if(!pApply || pApply->nColor != SID_ATTR_CHAR_COLOR_EXT)
|
|
|
|
{
|
|
|
|
GetShell().SetAttr(aItem);
|
|
|
|
}
|
|
|
|
*/
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case SID_ATTR_CHAR_COLOR_BACKGROUND:
|
|
|
|
{
|
2007-09-27 11:30:56 +00:00
|
|
|
SwEditWin& rEdtWin = GetView().GetEditWin();
|
2000-09-18 16:15:01 +00:00
|
|
|
SwApplyTemplate* pApply = rEdtWin.GetApplyTemplate();
|
|
|
|
rEdtWin.SetTextBackColorTransparent(0 == pItem);
|
|
|
|
Color aSet;
|
|
|
|
if(pItem)
|
|
|
|
{
|
|
|
|
aSet = ((const SvxColorItem*)pItem)->GetValue();
|
|
|
|
rEdtWin.SetTextBackColor(aSet);
|
|
|
|
}
|
|
|
|
if(!pApply && (rWrtSh.HasSelection() || rReq.IsAPI()))
|
|
|
|
{
|
|
|
|
SvxBrushItem aBrushItem(RES_CHRATR_BACKGROUND);
|
|
|
|
if(pItem)
|
|
|
|
aBrushItem.SetColor(aSet);
|
|
|
|
else
|
|
|
|
aBrushItem.SetColor(Color(COL_TRANSPARENT));
|
|
|
|
rWrtSh.SetAttr( aBrushItem );
|
|
|
|
}
|
|
|
|
else if(!pApply || pApply->nColor != SID_ATTR_CHAR_COLOR_BACKGROUND_EXT)
|
|
|
|
{
|
2007-09-27 11:30:56 +00:00
|
|
|
GetView().GetViewFrame()->GetDispatcher()->Execute(SID_ATTR_CHAR_COLOR_BACKGROUND_EXT);
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
2002-07-19 10:16:36 +00:00
|
|
|
|
|
|
|
rReq.Done();
|
|
|
|
|
2000-09-18 16:15:01 +00:00
|
|
|
/* OS 22.02.97 18:40 Das alte Verhalten ist unerwuenscht
|
|
|
|
if(!pApply || pApply->nColor != SID_ATTR_CHAR_COLOR_BACKGROUND_EXT)
|
|
|
|
{
|
|
|
|
Brush aBrush(pItem ? BRUSH_SOLID : BRUSH_NULL);
|
|
|
|
if(pItem)
|
|
|
|
aBrush.SetColor( aSet );
|
|
|
|
GetShell().SetAttr( SvxBrushItem(aBrush, RES_CHRATR_BACKGROUND) );
|
|
|
|
}
|
|
|
|
*/
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case SID_ATTR_CHAR_COLOR_BACKGROUND_EXT:
|
|
|
|
case SID_ATTR_CHAR_COLOR_EXT:
|
|
|
|
{
|
|
|
|
SwEditWin& rEdtWin = GetView().GetEditWin();
|
|
|
|
SwApplyTemplate* pApply = rEdtWin.GetApplyTemplate();
|
|
|
|
SwApplyTemplate aTempl;
|
|
|
|
BOOL bSelection = rWrtSh.HasSelection();
|
|
|
|
if(bSelection)
|
|
|
|
{
|
|
|
|
|
|
|
|
if(nSlot == SID_ATTR_CHAR_COLOR_BACKGROUND_EXT)
|
|
|
|
{
|
|
|
|
rWrtSh.SetAttr( SvxBrushItem(
|
|
|
|
rEdtWin.GetTextBackColor(), RES_CHRATR_BACKGROUND) );
|
|
|
|
}
|
|
|
|
else
|
|
|
|
rWrtSh.SetAttr( SvxColorItem( rEdtWin.GetTextColor(),
|
|
|
|
RES_CHRATR_COLOR) );
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if(!pApply || pApply->nColor != nSlot)
|
|
|
|
aTempl.nColor = nSlot;
|
|
|
|
rEdtWin.SetApplyTemplate(aTempl);
|
|
|
|
}
|
2004-03-08 15:18:50 +00:00
|
|
|
|
|
|
|
rReq.Done();
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case FN_NUM_BULLET_MOVEDOWN:
|
|
|
|
if (!rWrtSh.IsAddMode())
|
|
|
|
rWrtSh.MoveParagraph(1);
|
2004-03-08 15:18:50 +00:00
|
|
|
rReq.Done();
|
2000-09-18 16:15:01 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case FN_NUM_BULLET_MOVEUP:
|
|
|
|
if (!rWrtSh.IsAddMode())
|
|
|
|
rWrtSh.MoveParagraph(-1);
|
2004-03-08 15:18:50 +00:00
|
|
|
rReq.Done();
|
2000-09-18 16:15:01 +00:00
|
|
|
break;
|
2001-01-10 15:14:47 +00:00
|
|
|
case SID_RUBY_DIALOG:
|
2000-09-18 16:15:01 +00:00
|
|
|
case SID_HYPERLINK_DIALOG:
|
|
|
|
{
|
2001-01-10 15:14:47 +00:00
|
|
|
SfxRequest aReq(nSlot, SFX_CALLMODE_SLOT, SFX_APP()->GetPool());
|
2000-09-18 16:15:01 +00:00
|
|
|
GetView().GetViewFrame()->ExecuteSlot( aReq);
|
2002-07-01 08:09:41 +00:00
|
|
|
rReq.Ignore();
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
break;
|
2002-07-05 08:57:47 +00:00
|
|
|
case FN_INSERT_PAGEHEADER:
|
|
|
|
case FN_INSERT_PAGEFOOTER:
|
2005-10-19 07:31:49 +00:00
|
|
|
if(pArgs && pArgs->Count())
|
2002-07-05 08:57:47 +00:00
|
|
|
{
|
2005-10-19 07:31:49 +00:00
|
|
|
String sStyleName;
|
|
|
|
if(pItem)
|
|
|
|
sStyleName = ((const SfxStringItem*)pItem)->GetValue();
|
2002-07-05 08:57:47 +00:00
|
|
|
BOOL bOn = TRUE;
|
|
|
|
if( SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_1, FALSE, &pItem))
|
|
|
|
bOn = ((const SfxBoolItem*)pItem)->GetValue();
|
|
|
|
ChangeHeaderOrFooter(sStyleName, FN_INSERT_PAGEHEADER == nSlot, bOn, !rReq.IsAPI());
|
|
|
|
rReq.Done();
|
|
|
|
}
|
|
|
|
break;
|
2002-08-01 13:13:38 +00:00
|
|
|
case FN_READONLY_SELECTION_MODE :
|
|
|
|
if(GetView().GetDocShell()->IsReadOnly())
|
|
|
|
{
|
|
|
|
rWrtSh.SetReadonlySelectionOption(
|
|
|
|
!rWrtSh.GetViewOptions()->IsSelectionInReadonly());
|
|
|
|
rWrtSh.ShowCrsr();
|
|
|
|
}
|
|
|
|
break;
|
2007-11-22 14:41:15 +00:00
|
|
|
case FN_SELECTION_MODE_DEFAULT:
|
|
|
|
case FN_SELECTION_MODE_BLOCK :
|
|
|
|
{
|
|
|
|
bool bSetBlockMode = !rWrtSh.IsBlockMode();
|
|
|
|
if( pArgs && SFX_ITEM_SET == pArgs->GetItemState(nSlot, FALSE, &pItem))
|
|
|
|
bSetBlockMode = ((const SfxBoolItem*)pItem)->GetValue();
|
|
|
|
if( ( nSlot == FN_SELECTION_MODE_DEFAULT ) ^ bSetBlockMode )
|
|
|
|
rWrtSh.EnterBlockMode();
|
|
|
|
else
|
|
|
|
rWrtSh.EnterStdMode();
|
|
|
|
SfxBindings &rBnd = GetView().GetViewFrame()->GetBindings();
|
|
|
|
rBnd.Invalidate(FN_STAT_SELMODE);
|
|
|
|
rBnd.Update(FN_STAT_SELMODE);
|
|
|
|
}
|
|
|
|
break;
|
2002-11-27 07:58:58 +00:00
|
|
|
case SID_OPEN_HYPERLINK:
|
2008-12-09 07:49:49 +00:00
|
|
|
case FN_COPY_HYPERLINK_LOCATION:
|
2002-11-27 07:58:58 +00:00
|
|
|
{
|
|
|
|
SfxItemSet aSet(GetPool(),
|
|
|
|
RES_TXTATR_INETFMT,
|
|
|
|
RES_TXTATR_INETFMT);
|
2008-03-05 16:26:34 +00:00
|
|
|
rWrtSh.GetCurAttr(aSet);
|
2002-11-27 07:58:58 +00:00
|
|
|
if(SFX_ITEM_SET <= aSet.GetItemState( RES_TXTATR_INETFMT, TRUE ))
|
|
|
|
{
|
2008-12-09 07:49:49 +00:00
|
|
|
const SwFmtINetFmt& rINetFmt = dynamic_cast<const SwFmtINetFmt&>( aSet.Get(RES_TXTATR_INETFMT, TRUE) );
|
|
|
|
if( nSlot == FN_COPY_HYPERLINK_LOCATION )
|
|
|
|
{
|
|
|
|
::uno::Reference< datatransfer::clipboard::XClipboard > xClipboard = GetView().GetEditWin().GetClipboard();
|
|
|
|
vcl::unohelper::TextDataObject::CopyStringTo(
|
|
|
|
rINetFmt.GetValue(),
|
|
|
|
xClipboard );
|
|
|
|
}
|
|
|
|
else
|
|
|
|
rWrtSh.ClickToINetAttr(rINetFmt, URLLOAD_NOFILTER);
|
2002-11-27 07:58:58 +00:00
|
|
|
}
|
|
|
|
}
|
2003-04-04 15:39:39 +00:00
|
|
|
break;
|
|
|
|
case SID_OPEN_XML_FILTERSETTINGS:
|
|
|
|
{
|
|
|
|
try
|
|
|
|
{
|
2007-09-27 11:30:56 +00:00
|
|
|
uno::Reference < ui::dialogs::XExecutableDialog > xDialog(::comphelper::getProcessServiceFactory()->createInstance(rtl::OUString::createFromAscii("com.sun.star.comp.ui.XSLTFilterDialog")), uno::UNO_QUERY);
|
2003-04-04 15:39:39 +00:00
|
|
|
if( xDialog.is() )
|
|
|
|
{
|
|
|
|
xDialog->execute();
|
|
|
|
}
|
|
|
|
}
|
2007-09-27 11:30:56 +00:00
|
|
|
catch( uno::Exception& )
|
2003-04-04 15:39:39 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
rReq.Ignore ();
|
|
|
|
}
|
2002-11-27 07:58:58 +00:00
|
|
|
break;
|
2004-09-20 14:11:32 +00:00
|
|
|
case FN_FORMAT_APPLY_HEAD1:
|
|
|
|
{
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case FN_FORMAT_APPLY_HEAD2:
|
|
|
|
{
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case FN_FORMAT_APPLY_HEAD3:
|
|
|
|
{
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case FN_FORMAT_APPLY_DEFAULT:
|
|
|
|
{
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case FN_FORMAT_APPLY_TEXTBODY:
|
|
|
|
{
|
|
|
|
}
|
|
|
|
break;
|
2004-04-27 12:44:46 +00:00
|
|
|
case FN_WORDCOUNT_DIALOG:
|
|
|
|
{
|
|
|
|
SwWrtShell &rSh = GetShell();
|
|
|
|
SwDocStat aCurr;
|
2006-08-14 16:55:24 +00:00
|
|
|
SwDocStat aDocStat( rSh.getIDocumentStatistics()->GetDocStat() );
|
2004-04-27 12:44:46 +00:00
|
|
|
{
|
|
|
|
SwWait aWait( *GetView().GetDocShell(), TRUE );
|
|
|
|
rSh.StartAction();
|
|
|
|
rSh.CountWords( aCurr );
|
|
|
|
rSh.UpdateDocStat( aDocStat );
|
|
|
|
rSh.EndAction();
|
|
|
|
}
|
2004-05-13 11:31:01 +00:00
|
|
|
|
|
|
|
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
|
|
|
|
DBG_ASSERT(pFact, "Dialogdiet fail!");
|
|
|
|
AbstractSwWordCountDialog* pDialog = pFact->CreateSwWordCountDialog( GetView().GetWindow() );
|
2004-04-27 12:44:46 +00:00
|
|
|
pDialog->SetValues(aCurr, aDocStat );
|
|
|
|
pDialog->Execute();
|
|
|
|
delete pDialog;
|
|
|
|
}
|
|
|
|
break;
|
2000-09-18 16:15:01 +00:00
|
|
|
default:
|
|
|
|
ASSERT(!this, falscher Dispatcher);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2007-11-23 15:27:22 +00:00
|
|
|
|
2000-09-18 16:15:01 +00:00
|
|
|
/*--------------------------------------------------------------------
|
|
|
|
Beschreibung:
|
|
|
|
--------------------------------------------------------------------*/
|
|
|
|
|
|
|
|
|
|
|
|
void SwTextShell::GetState( SfxItemSet &rSet )
|
|
|
|
{
|
|
|
|
SwWrtShell &rSh = GetShell();
|
|
|
|
SfxWhichIter aIter( rSet );
|
|
|
|
USHORT nWhich = aIter.FirstWhich();
|
|
|
|
while ( nWhich )
|
|
|
|
{
|
|
|
|
switch ( nWhich )
|
|
|
|
{
|
2007-11-23 15:27:22 +00:00
|
|
|
case SID_LANGUAGE_STATUS:
|
|
|
|
{
|
|
|
|
// the value of used script types
|
|
|
|
String aScriptTypesInUse( String::CreateFromInt32( rSh.GetScriptType() ) );
|
|
|
|
|
|
|
|
SvtLanguageTable aLangTable;
|
|
|
|
|
|
|
|
// get keyboard language
|
|
|
|
String aKeyboardLang;
|
|
|
|
LanguageType nLang = LANGUAGE_DONTKNOW;
|
|
|
|
SwEditWin& rEditWin = GetView().GetEditWin();
|
|
|
|
nLang = rEditWin.GetInputLanguage();
|
|
|
|
if (nLang != LANGUAGE_DONTKNOW && nLang != LANGUAGE_SYSTEM)
|
|
|
|
aKeyboardLang = aLangTable.GetString( nLang );
|
|
|
|
|
|
|
|
// get the language that is in use
|
|
|
|
const String aMultipleLanguages = String::CreateFromAscii("*");
|
|
|
|
String aCurrentLang = aMultipleLanguages;
|
2008-06-16 07:23:44 +00:00
|
|
|
nLang = SwLangHelper::GetCurrentLanguage( rSh );
|
2007-11-23 15:27:22 +00:00
|
|
|
if (nLang != LANGUAGE_DONTKNOW)
|
|
|
|
aCurrentLang = aLangTable.GetString( nLang );
|
|
|
|
|
|
|
|
// build sequence for status value
|
|
|
|
uno::Sequence< ::rtl::OUString > aSeq( 4 );
|
|
|
|
aSeq[0] = aCurrentLang;
|
|
|
|
aSeq[1] = aScriptTypesInUse;
|
|
|
|
aSeq[2] = aKeyboardLang;
|
2008-06-16 07:23:44 +00:00
|
|
|
aSeq[3] = SwLangHelper::GetTextForLanguageGuessing( rSh );
|
2007-11-23 15:27:22 +00:00
|
|
|
|
|
|
|
// set sequence as status value
|
|
|
|
SfxStringListItem aItem( SID_LANGUAGE_STATUS );
|
|
|
|
aItem.SetStringList( aSeq );
|
|
|
|
rSet.Put( aItem, SID_LANGUAGE_STATUS );
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2002-06-14 10:45:00 +00:00
|
|
|
case FN_NUMBER_NEWSTART :
|
2006-01-06 12:05:17 +00:00
|
|
|
if(!rSh.GetCurNumRule())
|
|
|
|
rSet.DisableItem(nWhich);
|
|
|
|
else
|
|
|
|
rSet.Put(SfxBoolItem(FN_NUMBER_NEWSTART,
|
|
|
|
rSh.IsNumRuleStart()));
|
2002-06-14 10:45:00 +00:00
|
|
|
break;
|
2000-09-18 16:15:01 +00:00
|
|
|
case FN_EDIT_FORMULA:
|
2009-05-06 10:59:57 +00:00
|
|
|
case SID_CHARMAP:
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
|
|
|
const int nType = rSh.GetSelectionType();
|
2007-09-27 11:30:56 +00:00
|
|
|
if (!(nType & nsSelectionType::SEL_TXT) &&
|
|
|
|
!(nType & nsSelectionType::SEL_TBL) &&
|
|
|
|
!(nType & nsSelectionType::SEL_NUM))
|
2000-09-18 16:15:01 +00:00
|
|
|
rSet.DisableItem(nWhich);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case FN_INSERT_ENDNOTE:
|
|
|
|
case FN_INSERT_FOOTNOTE:
|
|
|
|
case FN_INSERT_FOOTNOTE_DLG:
|
|
|
|
{
|
|
|
|
const USHORT nNoType = FRMTYPE_FLY_ANY | FRMTYPE_HEADER |
|
|
|
|
FRMTYPE_FOOTER | FRMTYPE_FOOTNOTE;
|
|
|
|
if ( (rSh.GetFrmType(0,TRUE) & nNoType) )
|
|
|
|
rSet.DisableItem(nWhich);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case FN_INSERT_TABLE:
|
|
|
|
if ( rSh.GetTableFmt() ||
|
|
|
|
(rSh.GetFrmType(0,TRUE) & FRMTYPE_FOOTNOTE) )
|
|
|
|
rSet.DisableItem( nWhich );
|
|
|
|
break;
|
|
|
|
|
|
|
|
case FN_CALCULATE:
|
|
|
|
if ( !rSh.IsSelection() )
|
|
|
|
rSet.DisableItem(nWhich);
|
|
|
|
break;
|
|
|
|
case FN_GOTO_REFERENCE:
|
|
|
|
{
|
|
|
|
SwField *pFld = rSh.GetCurFld();
|
|
|
|
if ( !pFld || (pFld && pFld->GetTypeId() != TYP_GETREFFLD) )
|
|
|
|
rSet.DisableItem(nWhich);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case FN_AUTOFORMAT_AUTO:
|
|
|
|
{
|
2004-02-03 15:55:25 +00:00
|
|
|
rSet.Put( SfxBoolItem( nWhich, SvxAutoCorrCfg::Get()->IsAutoFmtByInput() ));
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
case FN_GLOSSARY_DLG:
|
|
|
|
{
|
|
|
|
rSet.Put(SfxBoolItem(nWhich), TRUE);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case SID_DEC_INDENT:
|
|
|
|
case SID_INC_INDENT:
|
|
|
|
{
|
|
|
|
USHORT nHtmlMode = ::GetHtmlMode(GetView().GetDocShell());
|
|
|
|
nHtmlMode &= HTMLMODE_ON|HTMLMODE_SOME_STYLES;
|
|
|
|
if( (nHtmlMode == HTMLMODE_ON) || !rSh.IsMoveLeftMargin(
|
|
|
|
SID_INC_INDENT == nWhich, TRUE ))
|
|
|
|
rSet.DisableItem( nWhich );
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case FN_DEC_INDENT_OFFSET:
|
|
|
|
case FN_INC_INDENT_OFFSET:
|
|
|
|
{
|
|
|
|
USHORT nHtmlMode = ::GetHtmlMode(GetView().GetDocShell());
|
|
|
|
nHtmlMode &= HTMLMODE_ON|HTMLMODE_SOME_STYLES;
|
|
|
|
if( (nHtmlMode == HTMLMODE_ON) ||
|
|
|
|
!rSh.IsMoveLeftMargin( FN_INC_INDENT_OFFSET == nWhich,
|
|
|
|
FALSE ))
|
|
|
|
rSet.DisableItem( nWhich );
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case SID_ATTR_CHAR_COLOR2:
|
|
|
|
{
|
|
|
|
rSet.Put(SvxColorItem(GetView().GetEditWin().GetTextColor(), SID_ATTR_CHAR_COLOR2));
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case SID_ATTR_CHAR_COLOR_BACKGROUND:
|
|
|
|
{
|
2002-09-03 07:08:38 +00:00
|
|
|
if(GetView().GetEditWin().IsTextBackColorTransparent())
|
|
|
|
rSet.Put(SvxColorItem(Color(COL_TRANSPARENT), SID_ATTR_CHAR_COLOR_BACKGROUND));
|
|
|
|
else
|
2000-09-18 16:15:01 +00:00
|
|
|
rSet.Put(SvxColorItem(GetView().GetEditWin().GetTextBackColor(), SID_ATTR_CHAR_COLOR_BACKGROUND));
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case SID_ATTR_CHAR_COLOR_BACKGROUND_EXT:
|
|
|
|
case SID_ATTR_CHAR_COLOR_EXT:
|
|
|
|
{
|
|
|
|
SwEditWin& rEdtWin = GetView().GetEditWin();
|
|
|
|
SwApplyTemplate* pApply = rEdtWin.GetApplyTemplate();
|
|
|
|
rSet.Put(SfxBoolItem(nWhich, pApply && pApply->nColor == nWhich));
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case FN_INSERT_BOOKMARK:
|
|
|
|
if( rSh.IsTableMode() )
|
|
|
|
rSet.DisableItem( nWhich );
|
|
|
|
break;
|
|
|
|
|
|
|
|
case FN_INSERT_PAGEHEADER:
|
|
|
|
case FN_INSERT_PAGEFOOTER:
|
|
|
|
{
|
|
|
|
#ifndef CHECK_MENU
|
2004-02-25 14:57:43 +00:00
|
|
|
rSet.Put( SfxObjectShellItem( nWhich, GetView().GetDocShell() ));
|
2000-09-18 16:15:01 +00:00
|
|
|
#else
|
|
|
|
// Seitenvorlagen besorgen
|
|
|
|
BOOL bFound = FALSE;
|
|
|
|
USHORT n, nCnt = rSh.GetPageDescCnt();
|
|
|
|
for( n = 0; n < nCnt; ++n )
|
|
|
|
{
|
|
|
|
const SwPageDesc& rDesc = rSh.GetPageDesc( n );
|
|
|
|
if( FN_INSERT_PAGEHEADER == nWhich
|
|
|
|
? !rDesc.GetMaster().GetHeader().IsActive()
|
|
|
|
: !rDesc.GetMaster().GetFooter().IsActive() )
|
|
|
|
{
|
|
|
|
bFound = TRUE;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if( bFound )
|
2004-02-25 14:57:43 +00:00
|
|
|
rSet.Put( SfxObjectShellItem( nWhich, GetView().GetDocShell() ));
|
2000-09-18 16:15:01 +00:00
|
|
|
else
|
|
|
|
rSet.DisableItem( nWhich );
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
break;
|
2004-08-02 12:10:44 +00:00
|
|
|
case FN_TABLE_SORT_DIALOG:
|
2000-09-18 16:15:01 +00:00
|
|
|
case FN_SORTING_DLG:
|
2004-08-02 12:10:44 +00:00
|
|
|
if(!rSh.HasSelection() ||
|
|
|
|
(FN_TABLE_SORT_DIALOG == nWhich && !rSh.GetTableFmt()))
|
2000-09-18 16:15:01 +00:00
|
|
|
rSet.DisableItem( nWhich );
|
|
|
|
break;
|
2001-01-10 15:14:47 +00:00
|
|
|
case SID_RUBY_DIALOG:
|
2001-04-18 08:08:49 +00:00
|
|
|
{
|
|
|
|
SvtCJKOptions aCJKOptions;
|
|
|
|
if(!aCJKOptions.IsRubyEnabled())
|
|
|
|
{
|
2004-11-17 12:16:42 +00:00
|
|
|
GetView().GetViewFrame()->GetBindings().SetVisibleState( nWhich, sal_False );
|
2001-04-18 08:08:49 +00:00
|
|
|
rSet.DisableItem(nWhich);
|
|
|
|
}
|
2004-11-17 12:16:42 +00:00
|
|
|
else
|
|
|
|
GetView().GetViewFrame()->GetBindings().SetVisibleState( nWhich, sal_True );
|
|
|
|
break;
|
2001-04-18 08:08:49 +00:00
|
|
|
}
|
|
|
|
//no break!
|
2000-09-18 16:15:01 +00:00
|
|
|
case SID_HYPERLINK_DIALOG:
|
2001-11-15 12:17:56 +00:00
|
|
|
if( GetView().GetDocShell()->IsReadOnly() ||
|
|
|
|
(!GetView().GetViewFrame()->HasChildWindow(nWhich) &&
|
|
|
|
rSh.HasReadonlySel()) )
|
2001-01-10 15:14:47 +00:00
|
|
|
rSet.DisableItem(nWhich);
|
|
|
|
else
|
2001-11-15 12:17:56 +00:00
|
|
|
rSet.Put(SfxBoolItem( nWhich, 0 != GetView().
|
|
|
|
GetViewFrame()->GetChildWindow( nWhich ) ));
|
|
|
|
break;
|
2000-09-18 16:15:01 +00:00
|
|
|
case FN_EDIT_HYPERLINK:
|
2008-12-09 07:49:49 +00:00
|
|
|
case FN_REMOVE_HYPERLINK:
|
|
|
|
case FN_COPY_HYPERLINK_LOCATION:
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
|
|
|
SfxItemSet aSet(GetPool(),
|
|
|
|
RES_TXTATR_INETFMT,
|
|
|
|
RES_TXTATR_INETFMT);
|
2008-03-05 16:26:34 +00:00
|
|
|
rSh.GetCurAttr(aSet);
|
2000-09-18 16:15:01 +00:00
|
|
|
if(SFX_ITEM_SET > aSet.GetItemState( RES_TXTATR_INETFMT, TRUE ) || rSh.HasReadonlySel())
|
|
|
|
{
|
2008-12-09 07:49:49 +00:00
|
|
|
rSet.DisableItem(nWhich);
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
2001-04-18 08:08:49 +00:00
|
|
|
case SID_TRANSLITERATE_HALFWIDTH:
|
|
|
|
case SID_TRANSLITERATE_FULLWIDTH:
|
|
|
|
case SID_TRANSLITERATE_HIRAGANA:
|
|
|
|
case SID_TRANSLITERATE_KATAGANA:
|
|
|
|
{
|
|
|
|
SvtCJKOptions aCJKOptions;
|
|
|
|
if(!aCJKOptions.IsChangeCaseMapEnabled())
|
2004-11-17 12:16:42 +00:00
|
|
|
{
|
|
|
|
GetView().GetViewFrame()->GetBindings().SetVisibleState( nWhich, sal_False );
|
2001-04-18 08:08:49 +00:00
|
|
|
rSet.DisableItem(nWhich);
|
2004-11-17 12:16:42 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
GetView().GetViewFrame()->GetBindings().SetVisibleState( nWhich, sal_True );
|
2001-04-18 08:08:49 +00:00
|
|
|
}
|
|
|
|
break;
|
2002-08-01 13:13:38 +00:00
|
|
|
case FN_READONLY_SELECTION_MODE :
|
|
|
|
if(!GetView().GetDocShell()->IsReadOnly())
|
|
|
|
rSet.DisableItem( nWhich );
|
|
|
|
else
|
|
|
|
{
|
|
|
|
rSet.Put(SfxBoolItem(nWhich, rSh.GetViewOptions()->IsSelectionInReadonly()));
|
|
|
|
}
|
|
|
|
break;
|
2007-11-22 14:41:15 +00:00
|
|
|
case FN_SELECTION_MODE_DEFAULT:
|
|
|
|
case FN_SELECTION_MODE_BLOCK :
|
|
|
|
rSet.Put(SfxBoolItem(nWhich, (nWhich == FN_SELECTION_MODE_DEFAULT) != rSh.IsBlockMode()));
|
|
|
|
break;
|
2002-11-27 07:58:58 +00:00
|
|
|
case SID_OPEN_HYPERLINK:
|
|
|
|
{
|
|
|
|
SfxItemSet aSet(GetPool(),
|
|
|
|
RES_TXTATR_INETFMT,
|
|
|
|
RES_TXTATR_INETFMT);
|
2008-03-05 16:26:34 +00:00
|
|
|
rSh.GetCurAttr(aSet);
|
2002-11-27 07:58:58 +00:00
|
|
|
if(SFX_ITEM_SET > aSet.GetItemState( RES_TXTATR_INETFMT, FALSE ))
|
|
|
|
rSet.DisableItem(nWhich);
|
|
|
|
}
|
|
|
|
break;
|
2007-06-27 12:26:08 +00:00
|
|
|
case SID_OPEN_SMARTTAGMENU:
|
|
|
|
{
|
|
|
|
uno::Sequence< rtl::OUString > aSmartTagTypes;
|
|
|
|
uno::Sequence< uno::Reference< container::XStringKeyMap > > aStringKeyMaps;
|
|
|
|
uno::Reference<text::XTextRange> xRange;
|
|
|
|
|
|
|
|
rSh.GetSmartTagTerm( aSmartTagTypes, aStringKeyMaps, xRange );
|
|
|
|
|
|
|
|
if ( xRange.is() && aSmartTagTypes.getLength() )
|
|
|
|
{
|
|
|
|
uno::Sequence < uno::Sequence< uno::Reference< smarttags::XSmartTagAction > > > aActionComponentsSequence;
|
|
|
|
uno::Sequence < uno::Sequence< sal_Int32 > > aActionIndicesSequence;
|
|
|
|
|
|
|
|
const SmartTagMgr& rSmartTagMgr = SwSmartTagMgr::Get();
|
|
|
|
rSmartTagMgr.GetActionSequences( aSmartTagTypes,
|
|
|
|
aActionComponentsSequence,
|
|
|
|
aActionIndicesSequence );
|
|
|
|
|
2007-09-27 11:30:56 +00:00
|
|
|
uno::Reference <frame::XController> xController = GetView().GetController();
|
2007-06-27 12:26:08 +00:00
|
|
|
const lang::Locale aLocale( SW_BREAKITER()->GetLocale( (LanguageType)GetAppLanguage() ) );
|
|
|
|
const rtl::OUString aApplicationName( rSmartTagMgr.GetApplicationName() );
|
|
|
|
const rtl::OUString aRangeText = xRange->getString();
|
|
|
|
|
|
|
|
const SvxSmartTagItem aItem( nWhich,
|
|
|
|
aActionComponentsSequence,
|
|
|
|
aActionIndicesSequence,
|
|
|
|
aStringKeyMaps,
|
|
|
|
xRange,
|
|
|
|
xController,
|
|
|
|
aLocale,
|
|
|
|
aApplicationName,
|
|
|
|
aRangeText );
|
|
|
|
|
|
|
|
rSet.Put( aItem );
|
|
|
|
}
|
|
|
|
else
|
|
|
|
rSet.DisableItem(nWhich);
|
|
|
|
}
|
|
|
|
break;
|
2006-01-06 12:05:17 +00:00
|
|
|
case FN_NUM_CONTINUE:
|
|
|
|
{
|
2009-09-08 13:44:38 +00:00
|
|
|
// --> OD 2009-08-26 #i86492#
|
|
|
|
// Allow continuation of previous list, even if at current cursor
|
|
|
|
// a list is active.
|
|
|
|
// if ( rSh.GetCurNumRule() )
|
|
|
|
// rSet.DisableItem(nWhich);
|
|
|
|
// else
|
|
|
|
// <--
|
2006-01-06 12:05:17 +00:00
|
|
|
{
|
2009-09-08 13:44:38 +00:00
|
|
|
// --> OD 2009-08-26 #i86492#
|
|
|
|
// Search also for bullet list
|
2008-06-13 10:19:00 +00:00
|
|
|
String aDummy;
|
|
|
|
const SwNumRule* pRule =
|
2009-09-08 13:44:38 +00:00
|
|
|
rSh.SearchNumRule( false, true, false, -1, aDummy );
|
|
|
|
if ( !pRule )
|
|
|
|
{
|
|
|
|
pRule = rSh.SearchNumRule( false, false, false, -1, aDummy );
|
|
|
|
}
|
2008-06-13 10:19:00 +00:00
|
|
|
// <--
|
|
|
|
if ( !pRule )
|
2006-01-06 12:05:17 +00:00
|
|
|
rSet.DisableItem(nWhich);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
2005-11-16 08:53:03 +00:00
|
|
|
case SID_INSERT_RLM :
|
|
|
|
case SID_INSERT_LRM :
|
|
|
|
case SID_INSERT_ZWNBSP :
|
|
|
|
case SID_INSERT_ZWSP:
|
|
|
|
{
|
|
|
|
SvtCTLOptions aCTLOptions;
|
|
|
|
sal_Bool bEnabled = aCTLOptions.IsCTLFontEnabled();
|
|
|
|
GetView().GetViewFrame()->GetBindings().SetVisibleState( nWhich, bEnabled );
|
|
|
|
if(!bEnabled)
|
|
|
|
rSet.DisableItem(nWhich);
|
|
|
|
}
|
|
|
|
break;
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
nWhich = aIter.NextWhich();
|
|
|
|
}
|
|
|
|
}
|
2002-07-05 08:57:47 +00:00
|
|
|
/* -----------------------------2002/07/05 10:31------------------------------
|
|
|
|
Switch on/off header of footer of a page style - if an empty name is
|
|
|
|
given all styles are changed
|
|
|
|
---------------------------------------------------------------------------*/
|
|
|
|
void SwTextShell::ChangeHeaderOrFooter(
|
|
|
|
const String& rStyleName, BOOL bHeader, BOOL bOn, BOOL bShowWarning)
|
|
|
|
{
|
|
|
|
SwWrtShell& rSh = GetShell();
|
|
|
|
rSh.StartAllAction();
|
2004-05-18 13:12:47 +00:00
|
|
|
rSh.StartUndo( UNDO_HEADER_FOOTER ); // #i7983#
|
2002-07-05 08:57:47 +00:00
|
|
|
BOOL bExecute = TRUE;
|
|
|
|
BOOL bCrsrSet = FALSE;
|
|
|
|
for( USHORT nFrom = 0, nTo = rSh.GetPageDescCnt();
|
|
|
|
nFrom < nTo; ++nFrom )
|
|
|
|
{
|
|
|
|
int bChgd = FALSE;
|
|
|
|
SwPageDesc aDesc( rSh.GetPageDesc( nFrom ));
|
|
|
|
String sTmp(aDesc.GetName());
|
|
|
|
if( !rStyleName.Len() || rStyleName == sTmp )
|
|
|
|
{
|
|
|
|
if( bShowWarning && !bOn && GetActiveView() && GetActiveView() == &GetView() &&
|
|
|
|
(bHeader && aDesc.GetMaster().GetHeader().IsActive() ||
|
|
|
|
!bHeader && aDesc.GetMaster().GetFooter().IsActive()))
|
|
|
|
{
|
|
|
|
bShowWarning = FALSE;
|
|
|
|
//Actions have to be closed while the dialog is showing
|
|
|
|
rSh.EndAllAction();
|
|
|
|
|
|
|
|
Window* pParent = &GetView().GetViewFrame()->GetWindow();
|
|
|
|
BOOL bRet = RET_YES == QueryBox( pParent, ResId( RID_SVXQBX_DELETE_HEADFOOT,
|
|
|
|
DIALOG_MGR() ) ).Execute();
|
|
|
|
bExecute = bRet;
|
|
|
|
rSh.StartAllAction();
|
|
|
|
}
|
|
|
|
if( bExecute )
|
|
|
|
{
|
|
|
|
bChgd = TRUE;
|
|
|
|
SwFrmFmt &rMaster = aDesc.GetMaster();
|
|
|
|
if(bHeader)
|
2008-06-13 10:19:00 +00:00
|
|
|
rMaster.SetFmtAttr( SwFmtHeader( bOn ));
|
2002-07-05 08:57:47 +00:00
|
|
|
else
|
2008-06-13 10:19:00 +00:00
|
|
|
rMaster.SetFmtAttr( SwFmtFooter( bOn ));
|
2002-07-05 08:57:47 +00:00
|
|
|
if( bOn )
|
|
|
|
{
|
2007-05-10 15:24:35 +00:00
|
|
|
SvxULSpaceItem aUL(bHeader ? 0 : MM50, bHeader ? MM50 : 0, RES_UL_SPACE );
|
2002-07-05 08:57:47 +00:00
|
|
|
SwFrmFmt* pFmt = bHeader ?
|
|
|
|
(SwFrmFmt*)rMaster.GetHeader().GetHeaderFmt() :
|
|
|
|
(SwFrmFmt*)rMaster.GetFooter().GetFooterFmt();
|
2008-06-13 10:19:00 +00:00
|
|
|
pFmt->SetFmtAttr( aUL );
|
2002-07-05 08:57:47 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
if( bChgd )
|
|
|
|
{
|
|
|
|
rSh.ChgPageDesc( nFrom, aDesc );
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2002-07-05 08:57:47 +00:00
|
|
|
if( !bCrsrSet && bOn )
|
|
|
|
bCrsrSet = rSh.SetCrsrInHdFt(
|
|
|
|
!rStyleName.Len() ? USHRT_MAX : nFrom,
|
|
|
|
bHeader );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2004-05-18 13:12:47 +00:00
|
|
|
rSh.EndUndo( UNDO_HEADER_FOOTER ); // #i7983#
|
2002-07-05 08:57:47 +00:00
|
|
|
rSh.EndAllAction();
|
|
|
|
}
|
2000-09-18 16:15:01 +00:00
|
|
|
|