2010-10-14 08:30:41 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2011-03-31 10:05:04 +02:00
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* This file incorporates work covered by the following license notice:
|
|
|
|
*
|
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
|
|
* with this work for additional information regarding copyright
|
|
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
|
|
* License, Version 2.0 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
|
|
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
|
|
*/
|
2006-09-16 22:18:02 +00:00
|
|
|
|
2009-11-25 16:52:25 +00:00
|
|
|
|
2010-01-06 12:22:41 +01:00
|
|
|
#include <com/sun/star/i18n/WordType.hpp>
|
2003-04-04 15:39:39 +00:00
|
|
|
#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
|
2009-11-25 16:52:25 +00:00
|
|
|
|
2003-04-04 15:39:39 +00:00
|
|
|
#include <comphelper/processfactory.hxx>
|
2000-09-18 16:15:01 +00:00
|
|
|
#include <hintids.hxx>
|
|
|
|
#include <cmdid.h>
|
|
|
|
#include <helpid.h>
|
|
|
|
|
2012-11-19 15:49:09 +01:00
|
|
|
#include <i18npool/languagetag.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>
|
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/colritem.hxx>
|
|
|
|
#include <editeng/tstpitem.hxx>
|
2013-02-12 13:41:53 -05:00
|
|
|
#include <editeng/brushitem.hxx>
|
2010-01-08 18:32:51 +01:00
|
|
|
#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>
|
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 <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>
|
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-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>
|
2010-07-10 18:21:24 +02:00
|
|
|
#include <sfx2/objface.hxx>
|
2008-06-16 07:23:44 +00:00
|
|
|
#include <langhelper.hxx>
|
2011-10-07 16:55:03 +02:00
|
|
|
#include <uiitems.hxx>
|
2011-11-01 22:47:33 -06:00
|
|
|
#include <wordcountdialog.hxx>
|
2007-11-23 15:27:22 +00:00
|
|
|
|
2007-06-27 12:26:08 +00:00
|
|
|
using namespace ::com::sun::star;
|
|
|
|
|
2013-02-18 22:04:45 +09:00
|
|
|
void sw_CharDialog( SwWrtShell &rWrtSh, bool bUseDialog, sal_uInt16 nSlot,const SfxItemSet *pArgs, SfxRequest *pReq )
|
2007-11-23 15:27:22 +00:00
|
|
|
{
|
|
|
|
FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebView, &rWrtSh.GetView()));
|
2011-01-17 15:06:54 +01:00
|
|
|
SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)));
|
2007-11-23 15:27:22 +00:00
|
|
|
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 );
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_Bool bSel = rWrtSh.HasSelection();
|
|
|
|
sal_Bool bSelectionPut = sal_False;
|
2007-11-23 15:27:22 +00:00
|
|
|
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()));
|
2011-01-17 15:06:54 +01:00
|
|
|
bSelectionPut = sal_True;
|
2007-11-23 15:27:22 +00:00
|
|
|
if(!bSel)
|
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
rWrtSh.Pop(sal_False);
|
2007-11-23 15:27:22 +00:00
|
|
|
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;
|
2011-01-17 15:06:54 +01:00
|
|
|
if( SFX_ITEM_SET == aCoreSet.GetItemState( RES_CHRATR_BACKGROUND, sal_True, &pTmpBrush ) )
|
2007-11-23 15:27:22 +00:00
|
|
|
{
|
|
|
|
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();
|
2010-10-24 23:48:32 +02:00
|
|
|
OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
|
2007-11-23 15:27:22 +00:00
|
|
|
|
2013-01-18 20:22:27 +00:00
|
|
|
pDlg = pFact->CreateSwCharDlg(rWrtSh.GetView().GetWindow(), rWrtSh.GetView(), aCoreSet);
|
2010-10-24 23:48:32 +02:00
|
|
|
OSL_ENSURE(pDlg, "Dialogdiet fail!");
|
2007-11-23 15:27:22 +00:00
|
|
|
if( FN_INSERT_HYPERLINK == nSlot )
|
2013-01-18 20:22:27 +00:00
|
|
|
pDlg->SetCurPageId("hyperlink");
|
2007-11-23 15:27:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
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 );
|
2011-01-17 15:06:54 +01:00
|
|
|
if( SFX_ITEM_SET == aTmpSet.GetItemState( RES_BACKGROUND, sal_False, &pTmpBrush ) )
|
2007-11-23 15:27:22 +00:00
|
|
|
{
|
|
|
|
SvxBrushItem aTmpBrush( *((SvxBrushItem*)pTmpBrush) );
|
|
|
|
aTmpBrush.SetWhich( RES_CHRATR_BACKGROUND );
|
|
|
|
aTmpSet.Put( aTmpBrush );
|
|
|
|
}
|
|
|
|
|
|
|
|
aTmpSet.ClearItem( RES_BACKGROUND );
|
|
|
|
|
|
|
|
const SfxPoolItem* pSelectionItem;
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_Bool bInsert = sal_False;
|
2007-11-23 15:27:22 +00:00
|
|
|
xub_StrLen nInsert = 0;
|
|
|
|
|
|
|
|
// aus ungeklaerter Ursache ist das alte Item wieder im Set
|
2011-01-17 15:06:54 +01:00
|
|
|
if( !bSelectionPut && SFX_ITEM_SET == aTmpSet.GetItemState(FN_PARAM_SELECTION, sal_False, &pSelectionItem) )
|
2007-11-23 15:27:22 +00:00
|
|
|
{
|
|
|
|
String sInsert = ((const SfxStringItem*)pSelectionItem)->GetValue();
|
|
|
|
bInsert = sInsert.Len() != 0;
|
|
|
|
if(bInsert)
|
|
|
|
{
|
|
|
|
nInsert = sInsert.Len();
|
|
|
|
rWrtSh.StartAction();
|
|
|
|
rWrtSh.Insert( sInsert );
|
|
|
|
rWrtSh.SetMark();
|
2011-01-17 15:06:54 +01:00
|
|
|
rWrtSh.ExtendSelection(sal_False, sInsert.Len());
|
2007-11-23 15:27:22 +00:00
|
|
|
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) );
|
2011-01-17 15:06:54 +01:00
|
|
|
aReq1.AppendItem( SfxBoolItem(FN_PARAM_MOVE_SELECTION, sal_True) );
|
2007-11-23 15:27:22 +00:00
|
|
|
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) );
|
2011-01-17 15:06:54 +01:00
|
|
|
aReq1.AppendItem( SfxBoolItem(FN_PARAM_MOVE_SELECTION, sal_False) );
|
2007-11-23 15:27:22 +00:00
|
|
|
aReq1.Done();
|
|
|
|
rWrtSh.SwapPam();
|
|
|
|
rWrtSh.ClearMark();
|
|
|
|
rWrtSh.DontExpandFmt();
|
|
|
|
rWrtSh.EndAction();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
delete pDlg;
|
|
|
|
}
|
|
|
|
|
2012-10-12 16:49:40 +02:00
|
|
|
static short lcl_AskRedlineMode(Window *pWin)
|
2008-06-16 07:23:44 +00:00
|
|
|
{
|
|
|
|
MessBox aQBox( pWin, 0,
|
|
|
|
String( SW_RES( STR_REDLINE_TITLE ) ),
|
|
|
|
String( SW_RES( STR_REDLINE_MSG ) ) );
|
|
|
|
aQBox.SetImage( QueryBox::GetStandardImage() );
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt16 nBtnFlags = BUTTONDIALOG_DEFBUTTON |
|
2008-06-16 07:23:44 +00:00
|
|
|
BUTTONDIALOG_OKBUTTON |
|
|
|
|
BUTTONDIALOG_FOCUSBUTTON;
|
|
|
|
|
|
|
|
aQBox.AddButton(String(SW_RES(STR_REDLINE_ACCEPT_ALL)), RET_OK, nBtnFlags);
|
|
|
|
aQBox.GetPushButton( RET_OK )->SetHelpId(HID_AUTOFORMAT_ACCEPT);
|
|
|
|
aQBox.AddButton(String(SW_RES(STR_REDLINE_REJECT_ALL)), RET_CANCEL, BUTTONDIALOG_CANCELBUTTON);
|
|
|
|
aQBox.GetPushButton( RET_CANCEL )->SetHelpId(HID_AUTOFORMAT_REJECT );
|
|
|
|
aQBox.AddButton(String(SW_RES(STR_REDLINE_EDIT)), 2, 0);
|
|
|
|
aQBox.GetPushButton( 2 )->SetHelpId(HID_AUTOFORMAT_EDIT_CHG);
|
|
|
|
aQBox.SetButtonHelpText( RET_OK, aEmptyStr );
|
|
|
|
|
|
|
|
return aQBox.Execute();
|
|
|
|
}
|
2000-09-18 16:15:01 +00:00
|
|
|
|
|
|
|
void SwTextShell::Execute(SfxRequest &rReq)
|
|
|
|
{
|
2013-02-18 22:04:45 +09:00
|
|
|
bool bUseDialog = true;
|
2000-09-18 16:15:01 +00:00
|
|
|
const SfxItemSet *pArgs = rReq.GetArgs();
|
|
|
|
SwWrtShell& rWrtSh = GetShell();
|
|
|
|
const SfxPoolItem* pItem = 0;
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt16 nSlot = rReq.GetSlot();
|
2000-09-18 16:15:01 +00:00
|
|
|
if(pArgs)
|
2011-01-17 15:06:54 +01:00
|
|
|
pArgs->GetItemState(GetPool().GetWhich(nSlot), sal_False, &pItem);
|
2000-09-18 16:15:01 +00:00
|
|
|
switch( nSlot )
|
|
|
|
{
|
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
|
2011-01-17 15:06:54 +01:00
|
|
|
rWrtSh.LockView( sal_True );
|
2007-11-23 15:27:22 +00:00
|
|
|
// save selection for later restoration
|
|
|
|
rWrtSh.Push();
|
|
|
|
|
|
|
|
// setting the new language...
|
|
|
|
if (aNewLangTxt.Len() > 0)
|
|
|
|
{
|
2012-07-02 16:02:38 +01:00
|
|
|
const rtl::OUString aSelectionLangPrefix("Current_");
|
|
|
|
const rtl::OUString aParagraphLangPrefix("Paragraph_");
|
|
|
|
const rtl::OUString aDocumentLangPrefix("Default_");
|
|
|
|
const String aStrNone( rtl::OUString("LANGUAGE_NONE") );
|
|
|
|
const String aStrResetLangs( rtl::OUString("RESET_LANGUAGES") );
|
2007-11-23 15:27:22 +00:00
|
|
|
|
|
|
|
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
|
2012-07-02 16:02:38 +01:00
|
|
|
aNewLangTxt = aNewLangTxt.Erase( nPos, aSelectionLangPrefix.getLength() );
|
2007-11-23 15:27:22 +00:00
|
|
|
bForSelection = true;
|
|
|
|
}
|
|
|
|
else if (STRING_NOTFOUND != (nPos = aNewLangTxt.Search( aParagraphLangPrefix , 0 )))
|
|
|
|
{
|
|
|
|
// ... for the current paragraph language
|
2012-07-02 16:02:38 +01:00
|
|
|
aNewLangTxt = aNewLangTxt.Erase( nPos, aParagraphLangPrefix.getLength() );
|
2007-11-23 15:27:22 +00:00
|
|
|
bForSelection = true;
|
|
|
|
bForParagraph = true;
|
|
|
|
}
|
|
|
|
else if (STRING_NOTFOUND != (nPos = aNewLangTxt.Search( aDocumentLangPrefix , 0 )))
|
|
|
|
{
|
|
|
|
// ... as default document language
|
2012-07-02 16:02:38 +01:00
|
|
|
aNewLangTxt = aNewLangTxt.Erase( nPos, aDocumentLangPrefix.getLength() );
|
2007-11-23 15:27:22 +00:00
|
|
|
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();
|
|
|
|
}
|
2009-10-19 08:12:25 +00:00
|
|
|
if (aNewLangTxt == aStrNone)
|
2008-06-16 07:23:44 +00:00
|
|
|
SwLangHelper::SetLanguage_None( rWrtSh, bForSelection, aCoreSet );
|
2009-10-19 08:12:25 +00:00
|
|
|
else if (aNewLangTxt == aStrResetLangs)
|
|
|
|
SwLangHelper::ResetLanguages( rWrtSh, bForSelection );
|
|
|
|
else
|
|
|
|
SwLangHelper::SetLanguage( rWrtSh, aNewLangTxt, bForSelection, aCoreSet );
|
2007-11-23 15:27:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// restore selection...
|
2011-01-17 15:06:54 +01:00
|
|
|
rWrtSh.Pop( sal_False );
|
2007-11-23 15:27:22 +00:00
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
rWrtSh.LockView( sal_False );
|
2007-11-23 15:27:22 +00:00
|
|
|
rWrtSh.EndAction();
|
|
|
|
}
|
|
|
|
|
|
|
|
// invalidate slot to get the new language displayed
|
|
|
|
pViewFrame->GetBindings().Invalidate( nSlot );
|
|
|
|
|
|
|
|
rReq.Done();
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2009-11-25 16:52:25 +00:00
|
|
|
case SID_THES:
|
|
|
|
{
|
|
|
|
// replace word/selection with text from selected sub menu entry
|
|
|
|
String aReplaceText;
|
|
|
|
SFX_REQUEST_ARG( rReq, pItem2, SfxStringItem, SID_THES , sal_False );
|
|
|
|
if (pItem2)
|
|
|
|
aReplaceText = pItem2->GetValue();
|
|
|
|
if (aReplaceText.Len() > 0)
|
|
|
|
{
|
2010-01-12 14:07:54 +01:00
|
|
|
SwView &rView2 = rWrtSh.GetView();
|
2010-01-06 12:22:41 +01:00
|
|
|
const bool bSelection = rWrtSh.HasSelection();
|
2010-01-12 14:07:54 +01:00
|
|
|
const String aLookUpText = rView2.GetThesaurusLookUpText( bSelection );
|
|
|
|
rView2.InsertThesaurusSynonym( aReplaceText, aLookUpText, bSelection );
|
2009-11-25 16:52:25 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
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, pNameItem, SfxStringItem, nSlot , sal_False );
|
|
|
|
if ( pNameItem )
|
|
|
|
aStr = pNameItem->GetValue();
|
2013-02-22 11:49:40 +00:00
|
|
|
bool bFont = pFont && !pFont->GetValue().isEmpty();
|
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
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
rWrtSh.Left( CRSR_SKIP_CHARS, sal_True, 1, sal_False );
|
2002-07-01 08:09:41 +00:00
|
|
|
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 );
|
2007-09-27 11:30:56 +00:00
|
|
|
rWrtSh.SetAttr( aSet, nsSetAttrMode::SETATTR_DONTEXPAND );
|
2011-01-17 15:06:54 +01:00
|
|
|
rWrtSh.ResetSelect(0, sal_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();
|
2010-10-24 23:48:32 +02:00
|
|
|
OSL_ENSURE(pFact, "Dialogdiet fail!");
|
2012-12-03 15:36:09 +00:00
|
|
|
AbstractInsFootNoteDlg* pDlg = pFact->CreateInsFootNoteDlg(
|
|
|
|
GetView().GetWindow(), rWrtSh, sal_False);
|
2010-10-24 23:48:32 +02:00
|
|
|
OSL_ENSURE(pDlg, "Dialogdiet fail!");
|
2010-07-10 18:21:24 +02:00
|
|
|
pDlg->SetHelpId(GetStaticInterface()->GetSlot(nSlot)->GetCommand());
|
2002-07-01 08:09:41 +00:00
|
|
|
if ( pDlg->Execute() == RET_OK )
|
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt16 nId = pDlg->IsEndNote() ? FN_INSERT_ENDNOTE : FN_INSERT_FOOTNOTE;
|
2002-07-01 08:09:41 +00:00
|
|
|
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
|
|
|
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();
|
2010-10-24 23:48:32 +02:00
|
|
|
OSL_ENSURE(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 );
|
2010-10-24 23:48:32 +02:00
|
|
|
OSL_ENSURE(pDlg, "Dialogdiet fail!");
|
2000-09-18 16:15:01 +00:00
|
|
|
pDlg->Execute();
|
|
|
|
delete pDlg;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
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)
|
2011-06-10 15:46:15 +01:00
|
|
|
std::set<sal_uInt16> aAttribs;
|
2008-02-05 11:25:09 +00:00
|
|
|
|
2011-03-14 16:51:14 +00:00
|
|
|
sal_uInt16 aResetableSetRange[] = {
|
2008-02-05 11:25:09 +00:00
|
|
|
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,
|
2009-10-14 17:33:11 +00:00
|
|
|
RES_TXTATR_UNKNOWN_CONTAINER, RES_TXTATR_UNKNOWN_CONTAINER,
|
2008-02-05 11:25:09 +00:00
|
|
|
RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1,
|
|
|
|
0
|
|
|
|
};
|
2011-03-14 16:51:14 +00:00
|
|
|
sal_uInt16 *pUShorts = aResetableSetRange;
|
2007-11-23 15:27:22 +00:00
|
|
|
while (*pUShorts)
|
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt16 nL = pUShorts[1] - pUShorts[0] + 1;
|
|
|
|
sal_uInt16 nE = pUShorts[0];
|
|
|
|
for (sal_uInt16 i = 0; i < nL; ++i)
|
2011-06-10 15:46:15 +01:00
|
|
|
aAttribs.insert( aAttribs.end(), nE++ );
|
2007-11-23 15:27:22 +00:00
|
|
|
pUShorts += 2;
|
|
|
|
}
|
|
|
|
|
2011-06-10 15:46:15 +01:00
|
|
|
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:
|
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt16 nKind=0, nPageNumber=0;
|
2002-07-01 08:09:41 +00:00
|
|
|
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();
|
2010-10-24 23:48:32 +02:00
|
|
|
OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
|
2004-05-10 15:36:49 +00:00
|
|
|
|
2012-10-02 13:17:28 +01:00
|
|
|
AbstractSwBreakDlg* pDlg = pFact->CreateSwBreakDlg(GetView().GetWindow(), rWrtSh);
|
2010-10-24 23:48:32 +02:00
|
|
|
OSL_ENSURE(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();
|
2010-10-24 23:48:32 +02:00
|
|
|
OSL_ENSURE(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 );
|
2010-10-24 23:48:32 +02:00
|
|
|
OSL_ENSURE(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:
|
|
|
|
{
|
2011-05-20 09:06:56 +01:00
|
|
|
SvxSwAutoFmtFlags aFlags(SvxAutoCorrCfg::Get().GetAutoCorrect()->GetSwFlags());
|
2011-01-17 15:06:54 +01:00
|
|
|
// das muss fuer die Nachbearbeitung immer sal_False sein
|
|
|
|
aFlags.bAFmtByInput = sal_False;
|
|
|
|
aFlags.bWithRedlining = sal_True;
|
2000-09-18 16:15:01 +00:00
|
|
|
rWrtSh.AutoFormat( &aFlags );
|
2011-01-17 15:06:54 +01:00
|
|
|
aFlags.bWithRedlining = sal_False;
|
2000-09-18 16:15:01 +00:00
|
|
|
|
|
|
|
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();
|
2010-10-24 23:48:32 +02:00
|
|
|
OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
|
2004-05-10 15:36:49 +00:00
|
|
|
|
2013-02-21 17:17:52 +00:00
|
|
|
AbstractSwModalRedlineAcceptDlg* pDlg = pFact->CreateSwModalRedlineAcceptDlg(&GetView().GetEditWin());
|
2010-10-24 23:48:32 +02:00
|
|
|
OSL_ENSURE(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
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
pDlg->AcceptAll(sal_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:
|
2011-01-17 15:06:54 +01:00
|
|
|
pDlg->AcceptAll(sal_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:
|
|
|
|
{
|
2011-05-20 09:06:56 +01:00
|
|
|
SvxSwAutoFmtFlags aFlags(SvxAutoCorrCfg::Get().GetAutoCorrect()->GetSwFlags());
|
2011-01-17 15:06:54 +01:00
|
|
|
// das muss fuer die Nachbearbeitung immer sal_False sein
|
|
|
|
aFlags.bAFmtByInput = sal_False;
|
2000-09-18 16:15:01 +00:00
|
|
|
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:
|
|
|
|
{
|
2011-05-20 09:06:56 +01:00
|
|
|
SvxAutoCorrCfg& rACfg = SvxAutoCorrCfg::Get();
|
|
|
|
sal_Bool bSet = pItem ? ((const SfxBoolItem*)pItem)->GetValue() : !rACfg.IsAutoFmtByInput();
|
|
|
|
if( bSet != rACfg.IsAutoFmtByInput() )
|
2001-08-01 09:35:32 +00:00
|
|
|
{
|
2011-05-20 09:06:56 +01:00
|
|
|
rACfg.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 = ' ';
|
2011-05-20 09:06:56 +01: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();
|
2010-10-24 23:48:32 +02:00
|
|
|
OSL_ENSURE(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 );
|
2010-10-24 23:48:32 +02:00
|
|
|
OSL_ENSURE(pDlg, "Dialogdiet fail!");
|
2000-09-18 16:15:01 +00:00
|
|
|
pDlg->Execute();
|
|
|
|
delete pDlg;
|
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();
|
2010-10-24 23:48:32 +02:00
|
|
|
OSL_ENSURE(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);
|
2010-10-24 23:48:32 +02:00
|
|
|
OSL_ENSURE(pDlg, "Dialogdiet fail!");
|
2000-09-18 16:15:01 +00:00
|
|
|
pDlg->Execute();
|
|
|
|
delete pDlg;
|
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:
|
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
const sal_uInt16 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 );
|
2011-01-17 15:06:54 +01:00
|
|
|
pVFrame->GetBindings().InvalidateAll( sal_True );
|
2002-08-15 06:53:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
String sFormula(((const SfxStringItem*)pItem)->GetValue());
|
|
|
|
SwFldMgr aFldMgr;
|
|
|
|
rWrtSh.StartAllAction();
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_Bool bDelSel;
|
2002-08-15 06:53:06 +00:00
|
|
|
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();
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_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 ) )
|
2011-01-17 15:06:54 +01:00
|
|
|
pVFrame->GetBindings().InvalidateAll( sal_True );
|
2002-08-15 06:53:06 +00:00
|
|
|
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:
|
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_Bool bSel = rWrtSh.HasSelection();
|
2008-12-09 07:49:49 +00:00
|
|
|
if(!bSel)
|
|
|
|
{
|
|
|
|
rWrtSh.StartAction();
|
|
|
|
rWrtSh.Push();
|
|
|
|
if(!rWrtSh.SelectTxtAttr( RES_TXTATR_INETFMT ))
|
|
|
|
rWrtSh.SelWrd();
|
|
|
|
}
|
|
|
|
//now remove the attribute
|
2011-06-10 15:46:15 +01:00
|
|
|
std::set<sal_uInt16> aAttribs;
|
|
|
|
aAttribs.insert( RES_TXTATR_INETFMT );
|
|
|
|
rWrtSh.ResetAttr( aAttribs );
|
2008-12-09 07:49:49 +00:00
|
|
|
if(!bSel)
|
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
rWrtSh.Pop(sal_False);
|
2008-12-09 07:49:49 +00:00
|
|
|
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
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt16 nWhich = GetPool().GetWhich( nSlot );
|
2002-06-27 07:47:17 +00:00
|
|
|
if ( pArgs && pArgs->GetItemState( nWhich ) == SFX_ITEM_SET )
|
2013-02-18 22:04:45 +09:00
|
|
|
bUseDialog = false;
|
2002-06-27 07:47:17 +00:00
|
|
|
// intentionally no break
|
|
|
|
}
|
2000-09-18 16:15:01 +00:00
|
|
|
case SID_CHAR_DLG:
|
|
|
|
{
|
2012-10-12 16:49:40 +02:00
|
|
|
sw_CharDialog( rWrtSh, bUseDialog, nSlot, pArgs, &rReq );
|
2007-11-23 15:27:22 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
case SID_CHAR_DLG_FOR_PARAGRAPH:
|
|
|
|
{
|
|
|
|
rWrtSh.Push(); //save current cursor
|
2008-06-16 07:23:44 +00:00
|
|
|
SwLangHelper::SelectCurrentPara( rWrtSh );
|
2012-10-12 16:49:40 +02:00
|
|
|
sw_CharDialog( rWrtSh, bUseDialog, nSlot, pArgs, &rReq );
|
2011-01-17 15:06:54 +01:00
|
|
|
rWrtSh.Pop( sal_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
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt16 nWhich = GetPool().GetWhich( nSlot );
|
2002-06-14 10:45:00 +00:00
|
|
|
if ( pArgs && pArgs->GetItemState( nWhich ) == SFX_ITEM_SET )
|
2013-02-18 22:04:45 +09:00
|
|
|
bUseDialog = false;
|
2002-06-10 16:09:01 +00:00
|
|
|
// intentionally no break
|
|
|
|
|
|
|
|
}
|
2000-09-18 16:15:01 +00:00
|
|
|
case SID_PARA_DLG:
|
|
|
|
{
|
2011-10-07 16:55:03 +02:00
|
|
|
SwPaM* pPaM = NULL;
|
|
|
|
|
|
|
|
if ( pArgs )
|
|
|
|
{
|
|
|
|
const SfxPoolItem* pPaMItem = 0;
|
|
|
|
pArgs->GetItemState( GetPool().GetWhich( FN_PARAM_PAM ), sal_False, &pPaMItem );
|
|
|
|
if ( pPaMItem )
|
|
|
|
pPaM = static_cast< const SwPaMItem* >( pPaMItem )->GetValue( );
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( !pPaM )
|
|
|
|
pPaM = rWrtSh.GetCrsr();
|
|
|
|
|
|
|
|
bool bUseCurCrsr = true;
|
|
|
|
|
2002-07-04 13:55:54 +00:00
|
|
|
FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebView, &GetView()));
|
2011-01-17 15:06:54 +01:00
|
|
|
SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)));
|
2010-09-13 14:37:51 +02:00
|
|
|
|
2011-03-14 16:51:14 +00:00
|
|
|
sal_Bool bApplyCharUnit = ::HasCharUnit(0 != PTR_CAST(SwWebView, &GetView()));
|
2010-09-13 14:37:51 +02:00
|
|
|
SW_MOD()->PutItem(SfxBoolItem(SID_ATTR_APPLYCHARUNIT, bApplyCharUnit));
|
|
|
|
|
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
|
|
|
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
|
|
|
// get also the list level indent values merged as LR-SPACE item, if needed.
|
2011-10-07 16:55:03 +02:00
|
|
|
rWrtSh.GetPaMAttr( pPaM, 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);
|
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt16 nDefDist = ::GetTabDist( rDefTabs );
|
2002-07-04 13:55:54 +00:00
|
|
|
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 );
|
|
|
|
|
2011-10-07 16:55:03 +02:00
|
|
|
// Setting the BoxInfo if based on the current cursor
|
|
|
|
if ( bUseCurCrsr )
|
|
|
|
::PrepareBoxInfo( aCoreSet, rWrtSh );
|
2002-07-04 13:55:54 +00:00
|
|
|
|
|
|
|
//aktuelles Seitenformat
|
|
|
|
::SwToSfxPageDescAttr( aCoreSet );
|
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt16 nDefPage = 0;
|
2002-07-04 13:55:54 +00:00
|
|
|
if( pItem )
|
|
|
|
nDefPage = ((SfxUInt16Item *)pItem)->GetValue();
|
|
|
|
|
|
|
|
// Numerierungseigenschaften
|
2011-10-07 16:55:03 +02:00
|
|
|
if( rWrtSh.GetDoc()->GetCurrNumRule( *pPaM->GetPoint() ) )
|
2002-07-04 13:55:54 +00:00
|
|
|
{
|
2011-10-07 16:55:03 +02:00
|
|
|
SfxBoolItem aStart( FN_NUMBER_NEWSTART, rWrtSh.IsNumRuleStart( pPaM ) );
|
2002-11-06 09:17:22 +00:00
|
|
|
aCoreSet.Put(aStart);
|
2008-06-13 10:19:00 +00:00
|
|
|
SfxUInt16Item aStartAt( FN_NUMBER_NEWSTART_AT,
|
2011-10-07 16:55:03 +02:00
|
|
|
rWrtSh.GetNodeNumStart( pPaM ) );
|
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();
|
2010-10-24 23:48:32 +02:00
|
|
|
OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
|
2004-05-10 15:36:49 +00:00
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
pDlg = pFact->CreateSwParaDlg( GetView().GetWindow(),GetView(), aCoreSet,DLG_STD, DLG_PARA,NULL, sal_False, nDefPage );
|
2010-10-24 23:48:32 +02:00
|
|
|
OSL_ENSURE(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();
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt16 nNewDist;
|
|
|
|
if( SFX_ITEM_SET == pSet->GetItemState( SID_ATTR_TABSTOP_DEFAULTS, sal_False, &pItem ) &&
|
2002-07-04 13:55:54 +00:00
|
|
|
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 );
|
|
|
|
}
|
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
if ( SFX_ITEM_SET == pSet->GetItemState(FN_PARAM_1,sal_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
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
if( SFX_ITEM_SET == pSet->GetItemState( RES_PARATR_DROP, sal_False, &pItem ))
|
2002-07-04 13:55:54 +00:00
|
|
|
{
|
|
|
|
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 );
|
2011-04-16 22:42:13 -03:00
|
|
|
// #i56253#
|
2007-01-23 07:33:52 +00:00
|
|
|
// 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();
|
2011-01-17 15:06:54 +01:00
|
|
|
if ( SFX_ITEM_SET == pSet->GetItemState(FN_DROP_TEXT, sal_False, &pItem) )
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2013-02-22 11:49:40 +00:00
|
|
|
if ( !((SfxStringItem*)pItem)->GetValue().isEmpty() )
|
2011-10-07 16:55:03 +02:00
|
|
|
rWrtSh.ReplaceDropTxt(((SfxStringItem*)pItem)->GetValue(), pPaM);
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
2011-10-07 16:55:03 +02:00
|
|
|
rWrtSh.SetAttr( *pSet, 0, pPaM );
|
2002-07-04 13:55:54 +00:00
|
|
|
rWrtSh.EndAction();
|
2011-10-07 16:55:03 +02:00
|
|
|
SwTxtFmtColl* pColl = rWrtSh.GetPaMTxtFmtColl( pPaM );
|
2002-07-04 13:55:54 +00:00
|
|
|
if(pColl && pColl->IsAutoUpdateFmt())
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2011-10-07 16:55:03 +02:00
|
|
|
rWrtSh.AutoUpdatePara(pColl, *pSet, pPaM);
|
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) )
|
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
//SetNumRuleStart(sal_True) restarts the numbering at the value
|
2002-11-06 09:17:22 +00:00
|
|
|
//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
|
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_Bool bStart = ((SfxBoolItem&)pSet->Get(FN_NUMBER_NEWSTART)).GetValue();
|
2011-04-16 16:19:09 -03:00
|
|
|
//
|
2007-07-03 13:18:26 +00:00
|
|
|
// 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.
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt16 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
|
|
|
}
|
2011-10-07 16:55:03 +02:00
|
|
|
rWrtSh.SetNumRuleStart(bStart, pPaM);
|
2002-11-06 09:17:22 +00:00
|
|
|
rWrtSh.SetNodeNumStart(nNumStart);
|
2002-07-04 13:55:54 +00:00
|
|
|
}
|
|
|
|
else if( SFX_ITEM_SET == pSet->GetItemState(FN_NUMBER_NEWSTART_AT) )
|
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt16 nNumStart = ((SfxUInt16Item&)pSet->Get(FN_NUMBER_NEWSTART_AT)).GetValue();
|
2002-07-04 13:55:54 +00:00
|
|
|
rWrtSh.SetNodeNumStart(nNumStart);
|
2011-10-07 16:55:03 +02:00
|
|
|
rWrtSh.SetNumRuleStart(sal_False, pPaM);
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
2011-04-16 22:42:13 -03:00
|
|
|
// #i56253#
|
2007-01-23 07:33:52 +00:00
|
|
|
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
|
|
|
String sContinuedListId;
|
|
|
|
const SwNumRule* pRule =
|
2009-09-08 13:44:38 +00:00
|
|
|
rWrtSh.SearchNumRule( false, true, false, -1, sContinuedListId );
|
2011-04-16 22:42:13 -03:00
|
|
|
// #i86492#
|
2009-09-08 13:44:38 +00:00
|
|
|
// 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
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
2000-09-18 16:15:01 +00:00
|
|
|
case FN_SELECT_PARA:
|
|
|
|
{
|
|
|
|
if(!rWrtSh.IsSttOfPara())
|
2011-01-17 15:06:54 +01:00
|
|
|
rWrtSh.SttPara(sal_False);
|
2000-09-18 16:15:01 +00:00
|
|
|
else
|
|
|
|
rWrtSh.EnterStdMode();
|
2011-01-17 15:06:54 +01:00
|
|
|
rWrtSh.EndPara(sal_True);
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
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();
|
|
|
|
|
2010-11-24 14:50:34 +01:00
|
|
|
// If there is a selection, then set the color on it
|
|
|
|
// otherwise, it'll be the color for the next text to be typed
|
|
|
|
if(!pApply || pApply->nColor != SID_ATTR_CHAR_COLOR_EXT)
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2007-09-27 11:30:56 +00:00
|
|
|
rWrtSh.SetAttr(SvxColorItem (aSet, RES_CHRATR_COLOR));
|
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
|
|
|
}
|
|
|
|
}
|
|
|
|
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();
|
2012-04-08 23:39:12 -05:00
|
|
|
rEdtWin.SetTextBackColor(aSet); //select last color
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
2012-04-08 23:39:12 -05:00
|
|
|
else
|
|
|
|
rEdtWin.SetTextBackColor(Color(COL_TRANSPARENT)); //if last was "no fill"
|
2000-09-18 16:15:01 +00:00
|
|
|
if(!pApply && (rWrtSh.HasSelection() || rReq.IsAPI()))
|
|
|
|
{
|
|
|
|
SvxBrushItem aBrushItem(RES_CHRATR_BACKGROUND);
|
|
|
|
if(pItem)
|
2012-04-08 23:39:12 -05:00
|
|
|
aBrushItem.SetColor(aSet); //set the selected color
|
2000-09-18 16:15:01 +00:00
|
|
|
else
|
2012-04-08 23:39:12 -05:00
|
|
|
aBrushItem.SetColor(Color(COL_TRANSPARENT));//set "no fill" color
|
2000-09-18 16:15:01 +00:00
|
|
|
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
|
|
|
}
|
|
|
|
break;
|
|
|
|
case SID_ATTR_CHAR_COLOR_BACKGROUND_EXT:
|
|
|
|
case SID_ATTR_CHAR_COLOR_EXT:
|
|
|
|
{
|
|
|
|
SwEditWin& rEdtWin = GetView().GetEditWin();
|
|
|
|
SwApplyTemplate* pApply = rEdtWin.GetApplyTemplate();
|
|
|
|
SwApplyTemplate aTempl;
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_Bool bSelection = rWrtSh.HasSelection();
|
2000-09-18 16:15:01 +00:00
|
|
|
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();
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_Bool bOn = sal_True;
|
|
|
|
if( SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_1, sal_False, &pItem))
|
2002-07-05 08:57:47 +00:00
|
|
|
bOn = ((const SfxBoolItem*)pItem)->GetValue();
|
2011-09-13 11:32:11 +02:00
|
|
|
rWrtSh.ChangeHeaderOrFooter(sStyleName, FN_INSERT_PAGEHEADER == nSlot, bOn, !rReq.IsAPI());
|
2002-07-05 08:57:47 +00:00
|
|
|
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();
|
2011-01-17 15:06:54 +01:00
|
|
|
if( pArgs && SFX_ITEM_SET == pArgs->GetItemState(nSlot, sal_False, &pItem))
|
2007-11-22 14:41:15 +00:00
|
|
|
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);
|
2011-01-17 15:06:54 +01:00
|
|
|
if(SFX_ITEM_SET <= aSet.GetItemState( RES_TXTATR_INETFMT, sal_True ))
|
2002-11-27 07:58:58 +00:00
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
const SwFmtINetFmt& rINetFmt = dynamic_cast<const SwFmtINetFmt&>( aSet.Get(RES_TXTATR_INETFMT, sal_True) );
|
2008-12-09 07:49:49 +00:00
|
|
|
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
|
|
|
|
{
|
2010-10-27 11:38:46 +01:00
|
|
|
uno::Reference < ui::dialogs::XExecutableDialog > xDialog(::comphelper::getProcessServiceFactory()->createInstance(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.ui.XSLTFilterDialog"))), uno::UNO_QUERY);
|
2003-04-04 15:39:39 +00:00
|
|
|
if( xDialog.is() )
|
|
|
|
{
|
|
|
|
xDialog->execute();
|
|
|
|
}
|
|
|
|
}
|
2011-11-22 09:06:06 +00:00
|
|
|
catch (const 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:
|
|
|
|
{
|
2011-11-01 22:47:33 -06:00
|
|
|
SfxViewFrame* pVFrame = GetView().GetViewFrame();
|
|
|
|
if (pVFrame != NULL)
|
2004-04-27 12:44:46 +00:00
|
|
|
{
|
2011-11-01 22:47:33 -06:00
|
|
|
pVFrame->ToggleChildWindow(FN_WORDCOUNT_DIALOG);
|
|
|
|
Invalidate(rReq.GetSlot());
|
2004-05-13 11:31:01 +00:00
|
|
|
|
2011-11-01 22:47:33 -06:00
|
|
|
SwWordCountWrapper *pWrdCnt = (SwWordCountWrapper*)pVFrame->GetChildWindow(SwWordCountWrapper::GetChildWindowId());
|
|
|
|
if (pWrdCnt)
|
|
|
|
pWrdCnt->UpdateCounts();
|
|
|
|
}
|
2004-04-27 12:44:46 +00:00
|
|
|
}
|
|
|
|
break;
|
2000-09-18 16:15:01 +00:00
|
|
|
default:
|
2010-10-24 23:48:32 +02:00
|
|
|
OSL_ENSURE(!this, "wrong dispatcher");
|
2000-09-18 16:15:01 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void SwTextShell::GetState( SfxItemSet &rSet )
|
|
|
|
{
|
|
|
|
SwWrtShell &rSh = GetShell();
|
|
|
|
SfxWhichIter aIter( rSet );
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt16 nWhich = aIter.FirstWhich();
|
2000-09-18 16:15:01 +00:00
|
|
|
while ( nWhich )
|
|
|
|
{
|
|
|
|
switch ( nWhich )
|
|
|
|
{
|
2007-11-23 15:27:22 +00:00
|
|
|
case SID_LANGUAGE_STATUS:
|
|
|
|
{
|
|
|
|
// the value of used script types
|
2013-02-20 00:18:07 +01:00
|
|
|
String aScriptTypesInUse( OUString::number( rSh.GetScriptType() ) );
|
2007-11-23 15:27:22 +00:00
|
|
|
|
|
|
|
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
|
2012-07-02 16:02:38 +01:00
|
|
|
String aCurrentLang = rtl::OUString("*");
|
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;
|
|
|
|
|
2009-11-25 16:52:25 +00:00
|
|
|
case SID_THES:
|
|
|
|
{
|
2010-01-06 12:22:41 +01:00
|
|
|
// is there a valid selection to get text from?
|
2009-11-25 16:52:25 +00:00
|
|
|
String aText;
|
2013-02-18 22:04:45 +09:00
|
|
|
bool bValid = !rSh.HasSelection() ||
|
2010-01-06 12:22:41 +01:00
|
|
|
(rSh.IsSelOnePara() && !rSh.IsMultiSelection());
|
|
|
|
// prevent context menu from showing when cursor is not in or at the end of a word
|
|
|
|
// (GetCurWord will return the next word if there is none at the current position...)
|
|
|
|
const sal_Int16 nWordType = ::i18n::WordType::DICTIONARY_WORD;
|
|
|
|
bool bWord = rSh.IsInWord( nWordType ) || rSh.IsStartWord( nWordType ) || rSh.IsEndWord( nWordType );
|
2009-11-25 16:52:25 +00:00
|
|
|
if (bValid && bWord)
|
2010-01-06 12:22:41 +01:00
|
|
|
aText = rSh.HasSelection()? rSh.GetSelTxt() : rSh.GetCurWord();
|
2009-11-25 16:52:25 +00:00
|
|
|
|
|
|
|
LanguageType nLang = rSh.GetCurLang();
|
2012-11-24 18:54:09 +01:00
|
|
|
LanguageTag aLanguageTag( nLang);
|
|
|
|
lang::Locale aLocale( aLanguageTag.getLocale());
|
|
|
|
String aLangText( aLanguageTag.getBcp47() );
|
2009-11-25 16:52:25 +00:00
|
|
|
|
2010-01-06 12:22:41 +01:00
|
|
|
// set word and locale to look up as status value
|
|
|
|
String aStatusVal( aText );
|
|
|
|
aStatusVal.AppendAscii( "#" );
|
|
|
|
aStatusVal += aLangText;
|
|
|
|
|
|
|
|
rSet.Put( SfxStringItem( SID_THES, aStatusVal ) );
|
2009-11-25 16:52:25 +00:00
|
|
|
|
|
|
|
// disable "Thesaurus" context menu entry if there is nothing to look up
|
|
|
|
uno::Reference< linguistic2::XThesaurus > xThes( ::GetThesaurus() );
|
|
|
|
if (aText.Len() == 0 ||
|
|
|
|
!xThes.is() || nLang == LANGUAGE_NONE || !xThes->hasLocale( aLocale ))
|
|
|
|
rSet.DisableItem( SID_THES );
|
|
|
|
}
|
|
|
|
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:
|
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
const sal_uInt16 nNoType = FRMTYPE_FLY_ANY | FRMTYPE_HEADER |
|
2000-09-18 16:15:01 +00:00
|
|
|
FRMTYPE_FOOTER | FRMTYPE_FOOTNOTE;
|
2011-01-17 15:06:54 +01:00
|
|
|
if ( (rSh.GetFrmType(0,sal_True) & nNoType) )
|
2000-09-18 16:15:01 +00:00
|
|
|
rSet.DisableItem(nWhich);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case FN_INSERT_TABLE:
|
|
|
|
if ( rSh.GetTableFmt() ||
|
2011-01-17 15:06:54 +01:00
|
|
|
(rSh.GetFrmType(0,sal_True) & FRMTYPE_FOOTNOTE) )
|
2000-09-18 16:15:01 +00:00
|
|
|
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:
|
|
|
|
{
|
2011-05-20 09:06:56 +01:00
|
|
|
rSet.Put( SfxBoolItem( nWhich, SvxAutoCorrCfg::Get().IsAutoFmtByInput() ));
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case SID_DEC_INDENT:
|
|
|
|
case SID_INC_INDENT:
|
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt16 nHtmlMode = ::GetHtmlMode(GetView().GetDocShell());
|
2000-09-18 16:15:01 +00:00
|
|
|
nHtmlMode &= HTMLMODE_ON|HTMLMODE_SOME_STYLES;
|
|
|
|
if( (nHtmlMode == HTMLMODE_ON) || !rSh.IsMoveLeftMargin(
|
2012-10-25 17:01:26 +09:00
|
|
|
SID_INC_INDENT == nWhich, true ))
|
2000-09-18 16:15:01 +00:00
|
|
|
rSet.DisableItem( nWhich );
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case FN_DEC_INDENT_OFFSET:
|
|
|
|
case FN_INC_INDENT_OFFSET:
|
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt16 nHtmlMode = ::GetHtmlMode(GetView().GetDocShell());
|
2000-09-18 16:15:01 +00:00
|
|
|
nHtmlMode &= HTMLMODE_ON|HTMLMODE_SOME_STYLES;
|
|
|
|
if( (nHtmlMode == HTMLMODE_ON) ||
|
|
|
|
!rSh.IsMoveLeftMargin( FN_INC_INDENT_OFFSET == nWhich,
|
2012-10-25 17:01:26 +09:00
|
|
|
false ))
|
2000-09-18 16:15:01 +00:00
|
|
|
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:
|
|
|
|
{
|
2004-02-25 14:57:43 +00:00
|
|
|
rSet.Put( SfxObjectShellItem( nWhich, GetView().GetDocShell() ));
|
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:
|
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_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);
|
2011-01-17 15:06:54 +01:00
|
|
|
if(SFX_ITEM_SET > aSet.GetItemState( RES_TXTATR_INETFMT, sal_True ) || rSh.HasReadonlySel())
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2008-12-09 07:49:49 +00:00
|
|
|
rSet.DisableItem(nWhich);
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
2010-09-13 17:26:19 +02:00
|
|
|
case FN_REMOVE_HYPERLINK:
|
|
|
|
{
|
|
|
|
SfxItemSet aSet(GetPool(),
|
|
|
|
RES_TXTATR_INETFMT,
|
|
|
|
RES_TXTATR_INETFMT);
|
|
|
|
rSh.GetCurAttr(aSet);
|
|
|
|
|
|
|
|
// If a hyperlink is selected, either alone or along with other text...
|
2011-03-14 16:51:14 +00:00
|
|
|
if( ((SFX_ITEM_DONTCARE & aSet.GetItemState( RES_TXTATR_INETFMT, sal_True )) == 0) || rSh.HasReadonlySel())
|
2010-09-13 17:26:19 +02:00
|
|
|
{
|
|
|
|
rSet.DisableItem(nWhich);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
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);
|
2011-01-17 15:06:54 +01:00
|
|
|
if(SFX_ITEM_SET > aSet.GetItemState( RES_TXTATR_INETFMT, sal_False ))
|
2002-11-27 07:58:58 +00:00
|
|
|
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();
|
2012-11-27 14:39:05 +01:00
|
|
|
const lang::Locale aLocale( SW_BREAKITER()->GetLocale( GetAppLanguageTag() ) );
|
2007-06-27 12:26:08 +00:00
|
|
|
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:
|
|
|
|
{
|
|
|
|
{
|
2011-04-16 22:42:13 -03:00
|
|
|
// #i86492#
|
2009-09-08 13:44:38 +00:00
|
|
|
// 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();
|
|
|
|
}
|
|
|
|
}
|
2010-10-12 21:30:25 +01:00
|
|
|
|
2010-10-14 08:30:41 +02:00
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|