2010-10-14 08:30:41 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2000-09-18 16:15:01 +00:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
2008-04-10 20:59:32 +00:00
|
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
2000-09-18 16:15:01 +00:00
|
|
|
*
|
2010-02-12 15:01:35 +01:00
|
|
|
* Copyright 2000, 2010 Oracle and/or its affiliates.
|
2000-09-18 16:15:01 +00:00
|
|
|
*
|
2008-04-10 20:59:32 +00:00
|
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
2000-09-18 16:15:01 +00:00
|
|
|
*
|
2008-04-10 20:59:32 +00:00
|
|
|
* This file is part of OpenOffice.org.
|
2000-09-18 16:15:01 +00:00
|
|
|
*
|
2008-04-10 20:59:32 +00:00
|
|
|
* OpenOffice.org is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Lesser General Public License version 3
|
|
|
|
* only, as published by the Free Software Foundation.
|
2000-09-18 16:15:01 +00:00
|
|
|
*
|
2008-04-10 20:59:32 +00:00
|
|
|
* OpenOffice.org is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU Lesser General Public License version 3 for more details
|
|
|
|
* (a copy is included in the LICENSE file that accompanied this code).
|
2000-09-18 16:15:01 +00:00
|
|
|
*
|
2008-04-10 20:59:32 +00:00
|
|
|
* You should have received a copy of the GNU Lesser General Public License
|
|
|
|
* version 3 along with OpenOffice.org. If not, see
|
|
|
|
* <http://www.openoffice.org/license.html>
|
|
|
|
* for a copy of the LGPLv3 License.
|
2000-09-18 16:15:01 +00:00
|
|
|
*
|
|
|
|
************************************************************************/
|
2006-09-16 22:31:30 +00:00
|
|
|
|
|
|
|
// MARKER(update_precomp.py): autogen include statement, do not remove
|
|
|
|
#include "precompiled_sw.hxx"
|
2000-09-18 16:15:01 +00:00
|
|
|
|
|
|
|
#include "viscrs.hxx"
|
|
|
|
#include <sfx2/frame.hxx>
|
2002-11-11 13:14:55 +00:00
|
|
|
#include <sfx2/printer.hxx>
|
2000-09-18 16:15:01 +00:00
|
|
|
#include <cmdid.h>
|
|
|
|
#include <hintids.hxx>
|
|
|
|
#include <docsh.hxx>
|
2001-02-02 10:52:17 +00:00
|
|
|
#include <rubylist.hxx>
|
2000-09-18 16:15:01 +00:00
|
|
|
#include <doc.hxx>
|
|
|
|
#include <unotxvw.hxx>
|
2001-07-12 12:10:27 +00:00
|
|
|
#include <unodispatch.hxx>
|
2000-09-18 16:15:01 +00:00
|
|
|
#include <unomap.hxx>
|
2001-02-02 10:52:17 +00:00
|
|
|
#include <unostyle.hxx>
|
|
|
|
#include <unoprnms.hxx>
|
2000-09-18 16:15:01 +00:00
|
|
|
#include <view.hxx>
|
2005-04-04 07:18:51 +00:00
|
|
|
#include <viewopt.hxx>
|
2000-09-18 16:15:01 +00:00
|
|
|
#include <unomod.hxx>
|
|
|
|
#include <unoframe.hxx>
|
|
|
|
#include <unocrsr.hxx>
|
|
|
|
#include <wrtsh.hxx>
|
|
|
|
#include <unotbl.hxx>
|
2007-05-10 08:49:07 +00:00
|
|
|
#include <svx/fmshell.hxx>
|
2000-09-18 16:15:01 +00:00
|
|
|
#include <svx/svdview.hxx>
|
|
|
|
#include <svx/svdpage.hxx>
|
|
|
|
#include <svx/svdouno.hxx>
|
|
|
|
#include <svx/svdogrp.hxx>
|
2010-01-08 18:32:51 +01:00
|
|
|
#include <editeng/pbinitem.hxx>
|
2000-09-18 16:15:01 +00:00
|
|
|
#include <pagedesc.hxx>
|
2010-01-08 18:32:51 +01:00
|
|
|
#include <editeng/lrspitem.hxx>
|
|
|
|
#include <editeng/ulspitem.hxx>
|
2000-09-18 16:15:01 +00:00
|
|
|
#include <sfx2/bindings.hxx>
|
|
|
|
#include <sfx2/request.hxx>
|
|
|
|
#include <frmatr.hxx>
|
2010-10-16 03:22:02 -05:00
|
|
|
#include <osl/mutex.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>
|
2000-09-18 16:15:01 +00:00
|
|
|
#include <unotxdoc.hxx>
|
|
|
|
#include <unodraw.hxx>
|
|
|
|
#include <svx/unoshcol.hxx>
|
|
|
|
#include <svx/unoshape.hxx>
|
|
|
|
#include <svx/svdpagv.hxx>
|
|
|
|
#include <swerror.h>
|
|
|
|
#include <tools/cachestr.hxx>
|
|
|
|
#include <shellio.hxx>
|
|
|
|
#include <ndtxt.hxx>
|
2001-07-20 09:40:14 +00:00
|
|
|
#include <SwStyleNameMapper.hxx>
|
2002-02-01 12:08:24 +00:00
|
|
|
#include <crsskip.hxx>
|
2005-04-04 07:18:51 +00:00
|
|
|
#include <com/sun/star/beans/PropertyAttribute.hpp>
|
2010-01-08 18:32:51 +01:00
|
|
|
#include <editeng/outliner.hxx>
|
|
|
|
#include <editeng/editview.hxx>
|
2010-01-05 16:37:43 +01:00
|
|
|
#include <unobookmark.hxx>
|
2010-01-05 16:37:44 +01:00
|
|
|
#include <unoparagraph.hxx>
|
2010-01-08 17:13:54 +01:00
|
|
|
#include <unocrsrhelper.hxx>
|
2010-01-05 16:37:46 +01:00
|
|
|
#include <unotextrange.hxx>
|
2006-05-08 13:48:31 +00:00
|
|
|
#include <sfx2/docfile.hxx>
|
2010-12-17 09:02:23 +01:00
|
|
|
#include <switerator.hxx>
|
2006-05-08 13:48:31 +00:00
|
|
|
#include "swdtflvr.hxx"
|
2006-11-14 14:21:33 +00:00
|
|
|
#include <vcl/svapp.hxx>
|
2011-06-01 22:40:08 +01:00
|
|
|
#include <comphelper/servicehelper.hxx>
|
2006-11-14 14:21:33 +00:00
|
|
|
|
2000-09-18 16:15:01 +00:00
|
|
|
using namespace ::com::sun::star;
|
|
|
|
using namespace ::com::sun::star::uno;
|
|
|
|
using namespace ::com::sun::star::lang;
|
|
|
|
using namespace ::com::sun::star::beans;
|
|
|
|
using namespace ::com::sun::star::text;
|
2001-02-02 10:52:17 +00:00
|
|
|
using namespace ::com::sun::star::view;
|
2001-07-12 12:10:27 +00:00
|
|
|
using namespace ::com::sun::star::frame;
|
2007-09-27 11:43:56 +00:00
|
|
|
|
|
|
|
using ::com::sun::star::util::URL;
|
2002-02-19 14:55:48 +00:00
|
|
|
using comphelper::HelperBaseNoState;
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2011-03-02 22:32:49 +01:00
|
|
|
using ::rtl::OUString;
|
|
|
|
|
2000-09-18 16:15:01 +00:00
|
|
|
SV_IMPL_PTRARR( SelectionChangeListenerArr, XSelectionChangeListenerPtr );
|
|
|
|
|
|
|
|
SwPaM* lcl_createPamCopy(const SwPaM& rPam)
|
|
|
|
{
|
2010-01-08 17:13:51 +01:00
|
|
|
SwPaM *const pRet = new SwPaM(*rPam.GetPoint());
|
|
|
|
::sw::DeepCopyPaM(rPam, *pRet);
|
2000-09-18 16:15:01 +00:00
|
|
|
return pRet;
|
|
|
|
}
|
2010-10-12 02:05:03 -05:00
|
|
|
|
2000-09-18 16:15:01 +00:00
|
|
|
/******************************************************************
|
|
|
|
* SwXTextView
|
|
|
|
******************************************************************/
|
|
|
|
SwXTextView::SwXTextView(SwView* pSwView) :
|
|
|
|
SfxBaseController(pSwView),
|
2009-06-03 11:26:39 +00:00
|
|
|
m_pView(pSwView),
|
|
|
|
m_pPropSet( aSwMapProvider.GetPropertySet( PROPERTY_MAP_TEXT_VIEW ) ),
|
2000-09-18 16:15:01 +00:00
|
|
|
pxViewSettings(0),
|
|
|
|
pxTextViewCursor(0)
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
SwXTextView::~SwXTextView()
|
2001-03-09 14:00:15 +00:00
|
|
|
{
|
|
|
|
Invalidate();
|
|
|
|
}
|
|
|
|
|
|
|
|
void SwXTextView::Invalidate()
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
|
|
|
if(pxViewSettings)
|
|
|
|
{
|
2002-02-19 14:55:48 +00:00
|
|
|
HelperBaseNoState *pSettings = static_cast < HelperBaseNoState * > ( pxViewSettings->get() );
|
|
|
|
static_cast < SwXViewSettings* > ( pSettings )->Invalidate();
|
2001-03-09 14:00:15 +00:00
|
|
|
DELETEZ(pxViewSettings);
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
if(pxTextViewCursor)
|
|
|
|
{
|
2001-03-07 12:46:48 +00:00
|
|
|
text::XTextViewCursor* pCrsr = pxTextViewCursor->get();
|
2000-09-18 16:15:01 +00:00
|
|
|
((SwXTextViewCursor*)pCrsr)->Invalidate();
|
2001-03-09 14:00:15 +00:00
|
|
|
DELETEZ(pxTextViewCursor);
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
2008-04-24 13:07:19 +00:00
|
|
|
|
2001-03-09 14:00:15 +00:00
|
|
|
m_refCount++; //prevent second d'tor call
|
2008-04-24 13:07:19 +00:00
|
|
|
|
|
|
|
sal_uInt16 nCount = aSelChangedListeners.Count();
|
2001-03-07 12:46:48 +00:00
|
|
|
if(nCount)
|
|
|
|
{
|
2006-06-19 11:44:16 +00:00
|
|
|
uno::Reference< uno::XInterface > xInt = (cppu::OWeakObject*)(SfxBaseController*)this;
|
2001-03-07 12:46:48 +00:00
|
|
|
lang::EventObject aEvent(xInt);
|
|
|
|
for ( sal_uInt16 i = nCount; i--; )
|
|
|
|
{
|
2006-06-19 11:44:16 +00:00
|
|
|
uno::Reference< view::XSelectionChangeListener > *pObj = aSelChangedListeners[i];
|
2001-03-07 12:46:48 +00:00
|
|
|
(*pObj)->disposing(aEvent);
|
|
|
|
}
|
|
|
|
}
|
2008-04-24 13:07:19 +00:00
|
|
|
|
|
|
|
// #i85580: now clean up any possibly remaining entries in the array...
|
|
|
|
// (i.e. listeners that did not call removeSelectionChangeListener in their disposing.)
|
|
|
|
while ((nCount = aSelChangedListeners.Count()) != 0)
|
|
|
|
{
|
|
|
|
removeSelectionChangeListener( *aSelChangedListeners[0] );
|
|
|
|
}
|
|
|
|
|
2001-03-09 14:00:15 +00:00
|
|
|
m_refCount--;
|
2009-06-03 11:26:39 +00:00
|
|
|
m_pView = 0;
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
2001-03-09 14:00:15 +00:00
|
|
|
|
2007-09-27 11:43:56 +00:00
|
|
|
Sequence< uno::Type > SAL_CALL SwXTextView::getTypes( ) throw(uno::RuntimeException)
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
|
|
|
uno::Sequence< uno::Type > aBaseTypes = SfxBaseController::getTypes();
|
|
|
|
|
|
|
|
long nIndex = aBaseTypes.getLength();
|
|
|
|
aBaseTypes.realloc(
|
2006-05-08 13:48:31 +00:00
|
|
|
aBaseTypes.getLength() + 8 );
|
2000-09-18 16:15:01 +00:00
|
|
|
|
|
|
|
uno::Type* pBaseTypes = aBaseTypes.getArray();
|
2006-06-19 11:44:16 +00:00
|
|
|
pBaseTypes[nIndex++] = ::getCppuType((uno::Reference<XSelectionSupplier >*)0);
|
|
|
|
pBaseTypes[nIndex++] = ::getCppuType((uno::Reference<XServiceInfo >*)0);
|
2007-05-10 08:49:07 +00:00
|
|
|
pBaseTypes[nIndex++] = ::getCppuType((uno::Reference<XFormLayerAccess >*)0);
|
2006-06-19 11:44:16 +00:00
|
|
|
pBaseTypes[nIndex++] = ::getCppuType((uno::Reference<XTextViewCursorSupplier>*)0);
|
|
|
|
pBaseTypes[nIndex++] = ::getCppuType((uno::Reference<XViewSettingsSupplier >*)0);
|
|
|
|
pBaseTypes[nIndex++] = ::getCppuType((uno::Reference<XRubySelection >*)0);
|
|
|
|
pBaseTypes[nIndex++] = ::getCppuType((uno::Reference<XPropertySet >*)0);
|
|
|
|
pBaseTypes[nIndex++] = ::getCppuType((uno::Reference<datatransfer::XTransferableSupplier >*)0);
|
2000-09-18 16:15:01 +00:00
|
|
|
return aBaseTypes;
|
|
|
|
}
|
|
|
|
|
2011-06-01 22:40:08 +01:00
|
|
|
namespace
|
|
|
|
{
|
|
|
|
class theSwXTextViewImplementationId : public rtl::Static< UnoTunnelIdInit, theSwXTextViewImplementationId > {};
|
|
|
|
}
|
|
|
|
|
2007-09-27 11:43:56 +00:00
|
|
|
Sequence< sal_Int8 > SAL_CALL SwXTextView::getImplementationId( ) throw(uno::RuntimeException)
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2011-06-01 22:40:08 +01:00
|
|
|
return theSwXTextViewImplementationId::get().getSeq();
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void SAL_CALL SwXTextView::acquire( )throw()
|
|
|
|
{
|
|
|
|
SfxBaseController::acquire();
|
|
|
|
}
|
|
|
|
|
|
|
|
void SAL_CALL SwXTextView::release( )throw()
|
|
|
|
{
|
|
|
|
SfxBaseController::release();
|
|
|
|
}
|
|
|
|
|
|
|
|
uno::Any SAL_CALL SwXTextView::queryInterface( const uno::Type& aType )
|
|
|
|
throw (RuntimeException)
|
|
|
|
{
|
|
|
|
uno::Any aRet;
|
2006-06-19 11:44:16 +00:00
|
|
|
if(aType == ::getCppuType((uno::Reference<view::XSelectionSupplier >*)0))
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2006-06-19 11:44:16 +00:00
|
|
|
uno::Reference<view::XSelectionSupplier> xRet = this;
|
2000-09-18 16:15:01 +00:00
|
|
|
aRet.setValue(&xRet, aType);
|
|
|
|
}
|
2006-06-19 11:44:16 +00:00
|
|
|
else if(aType == ::getCppuType((uno::Reference<lang::XServiceInfo >*)0))
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2006-06-19 11:44:16 +00:00
|
|
|
uno::Reference<lang::XServiceInfo> xRet = this;
|
2000-09-18 16:15:01 +00:00
|
|
|
aRet.setValue(&xRet, aType);
|
|
|
|
}
|
2006-06-19 11:44:16 +00:00
|
|
|
else if(aType == ::getCppuType((uno::Reference<view::XControlAccess >*)0))
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2006-06-19 11:44:16 +00:00
|
|
|
uno::Reference<view::XControlAccess> xRet = this;
|
2000-09-18 16:15:01 +00:00
|
|
|
aRet.setValue(&xRet, aType);
|
|
|
|
}
|
2007-05-10 08:49:07 +00:00
|
|
|
else if(aType == ::getCppuType((uno::Reference<view::XFormLayerAccess >*)0))
|
|
|
|
{
|
|
|
|
uno::Reference<view::XFormLayerAccess> xRet = this;
|
|
|
|
aRet.setValue(&xRet, aType);
|
|
|
|
}
|
2006-06-19 11:44:16 +00:00
|
|
|
else if(aType == ::getCppuType((uno::Reference<text::XTextViewCursorSupplier>*)0))
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2006-06-19 11:44:16 +00:00
|
|
|
uno::Reference<text::XTextViewCursorSupplier> xRet = this;
|
2000-09-18 16:15:01 +00:00
|
|
|
aRet.setValue(&xRet, aType);
|
|
|
|
}
|
2006-06-19 11:44:16 +00:00
|
|
|
else if(aType == ::getCppuType((uno::Reference<view::XViewSettingsSupplier >*)0))
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2006-06-19 11:44:16 +00:00
|
|
|
uno::Reference<view::XViewSettingsSupplier> xRet = this;
|
2000-09-18 16:15:01 +00:00
|
|
|
aRet.setValue(&xRet, aType);
|
|
|
|
}
|
2006-06-19 11:44:16 +00:00
|
|
|
else if(aType == ::getCppuType((uno::Reference<XRubySelection>*)0))
|
2001-02-02 10:52:17 +00:00
|
|
|
{
|
2006-06-19 11:44:16 +00:00
|
|
|
uno::Reference<XRubySelection> xRet = this;
|
2001-02-02 10:52:17 +00:00
|
|
|
aRet.setValue(&xRet, aType);
|
|
|
|
}
|
2006-06-19 11:44:16 +00:00
|
|
|
else if(aType == ::getCppuType((uno::Reference<XPropertySet>*)0))
|
2005-04-04 07:18:51 +00:00
|
|
|
{
|
2006-06-19 11:44:16 +00:00
|
|
|
uno::Reference<XPropertySet> xRet = this;
|
2005-04-04 07:18:51 +00:00
|
|
|
aRet.setValue(&xRet, aType);
|
|
|
|
}
|
2006-06-19 11:44:16 +00:00
|
|
|
else if(aType == ::getCppuType((uno::Reference<datatransfer::XTransferableSupplier >*)0))
|
2006-05-08 13:48:31 +00:00
|
|
|
{
|
2006-06-19 11:44:16 +00:00
|
|
|
uno::Reference<datatransfer::XTransferableSupplier> xRet = this;
|
2006-05-08 13:48:31 +00:00
|
|
|
aRet.setValue(&xRet, aType);
|
|
|
|
}
|
2000-09-18 16:15:01 +00:00
|
|
|
else
|
|
|
|
aRet = SfxBaseController::queryInterface(aType);
|
|
|
|
return aRet;
|
|
|
|
}
|
|
|
|
|
|
|
|
sal_Bool SwXTextView::select(const uno::Any& aInterface) throw( lang::IllegalArgumentException, uno::RuntimeException )
|
|
|
|
{
|
2010-10-13 01:44:10 -05:00
|
|
|
SolarMutexGuard aGuard;
|
2006-06-19 11:44:16 +00:00
|
|
|
uno::Reference< uno::XInterface > xInterface;
|
2001-09-28 05:44:10 +00:00
|
|
|
if(GetView() && (aInterface >>= xInterface))
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
|
|
|
SwWrtShell& rSh = GetView()->GetWrtShell();
|
|
|
|
SwDoc* pDoc = GetView()->GetDocShell()->GetDoc();
|
2006-06-19 11:44:16 +00:00
|
|
|
uno::Reference< lang::XUnoTunnel > xIfcTunnel(xInterface, uno::UNO_QUERY);
|
|
|
|
uno::Reference< text::XTextCursor > xCrsr(xInterface, uno::UNO_QUERY);
|
|
|
|
uno::Reference< container::XIndexAccess > xPosN(xInterface, uno::UNO_QUERY);
|
|
|
|
uno::Reference< text::XTextRange > xPos(xInterface, uno::UNO_QUERY);
|
2007-09-27 11:43:56 +00:00
|
|
|
SwXFrame* pFrame = xIfcTunnel.is() ? reinterpret_cast<SwXFrame*>(
|
|
|
|
xIfcTunnel->getSomething(SwXFrame::getUnoTunnelId())) : 0;
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2007-09-27 11:43:56 +00:00
|
|
|
SwXCell* pCell = xIfcTunnel.is() ? reinterpret_cast<SwXCell*>(
|
|
|
|
xIfcTunnel->getSomething(SwXCell::getUnoTunnelId())) : 0;
|
2002-10-23 11:32:28 +00:00
|
|
|
|
2000-09-18 16:15:01 +00:00
|
|
|
SwPaM * pPam = 0;
|
|
|
|
SwXTextRanges* pPosN = 0;
|
|
|
|
if(xCrsr.is())
|
|
|
|
{
|
|
|
|
//
|
2003-04-01 14:43:48 +00:00
|
|
|
OTextCursorHelper* pCursor =
|
2000-09-18 16:15:01 +00:00
|
|
|
xIfcTunnel.is() ?
|
2007-09-27 11:43:56 +00:00
|
|
|
reinterpret_cast<OTextCursorHelper*>(xIfcTunnel->getSomething(OTextCursorHelper::getUnoTunnelId()))
|
2000-09-18 16:15:01 +00:00
|
|
|
: 0;
|
|
|
|
|
|
|
|
if(pCursor && pCursor->GetDoc() == GetView()->GetDocShell()->GetDoc())
|
2010-01-08 17:13:54 +01:00
|
|
|
{
|
|
|
|
pPam = lcl_createPamCopy(*pCursor->GetPaM());
|
|
|
|
}
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
else if(xPosN.is() &&
|
|
|
|
xIfcTunnel.is() &&
|
2007-09-27 11:43:56 +00:00
|
|
|
0 != (pPosN = reinterpret_cast<SwXTextRanges*>(xIfcTunnel->getSomething(SwXTextRanges::getUnoTunnelId()))))
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
|
|
|
const SwUnoCrsr* pUnoCrsr = pPosN->GetCursor();
|
|
|
|
if(pUnoCrsr)
|
|
|
|
{
|
|
|
|
pPam = lcl_createPamCopy(*pUnoCrsr);
|
|
|
|
}
|
|
|
|
}
|
2002-10-09 13:01:16 +00:00
|
|
|
// prevent misinterpretation of text frames that provide a XTextRange interface, too
|
2002-10-23 11:32:28 +00:00
|
|
|
else if(!pFrame && !pCell && xPos.is())
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
|
|
|
SwUnoInternalPaM aPam(*pDoc);
|
2010-01-08 17:13:53 +01:00
|
|
|
if (::sw::XTextRangeToSwPaM(aPam, xPos))
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
|
|
|
pPam = lcl_createPamCopy(aPam);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(pPam)
|
|
|
|
{
|
|
|
|
rSh.EnterStdMode();
|
|
|
|
rSh.SetSelection(*pPam);
|
2001-09-14 13:47:05 +00:00
|
|
|
while( pPam->GetNext() != pPam )
|
|
|
|
delete pPam->GetNext();
|
2000-09-18 16:15:01 +00:00
|
|
|
delete pPam;
|
|
|
|
return sal_True;
|
|
|
|
}
|
2002-10-09 13:01:16 +00:00
|
|
|
if(pFrame)
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
|
|
|
|
2002-10-09 13:01:16 +00:00
|
|
|
SwFrmFmt* pFrmFmt = pFrame->GetFrmFmt();
|
2000-09-18 16:15:01 +00:00
|
|
|
if(pFrmFmt && pFrmFmt->GetDoc() == pDoc)
|
|
|
|
{
|
|
|
|
sal_Bool bSuccess = rSh.GotoFly( pFrmFmt->GetName(), pFrame->GetFlyCntType());
|
|
|
|
if (bSuccess)
|
|
|
|
{
|
|
|
|
rSh.HideCrsr();
|
|
|
|
rSh.EnterSelFrmMode();
|
|
|
|
}
|
2001-06-05 06:44:35 +00:00
|
|
|
return sal_True;
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2006-06-19 11:44:16 +00:00
|
|
|
uno::Reference< text::XTextTable > xTbl(xInterface, uno::UNO_QUERY);;
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2001-01-24 14:09:29 +00:00
|
|
|
if(xTbl.is() && xIfcTunnel.is())
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2007-09-27 11:43:56 +00:00
|
|
|
SwXTextTable* pTable = reinterpret_cast<SwXTextTable*>(
|
|
|
|
xIfcTunnel->getSomething(SwXTextTable::getUnoTunnelId()));
|
2000-09-18 16:15:01 +00:00
|
|
|
|
|
|
|
SwFrmFmt* pTblFrmFmt = pTable ? ((SwXTextTable*)pTable)->GetFrmFmt() : 0;
|
|
|
|
if(pTblFrmFmt &&pTblFrmFmt->GetDoc() == pDoc)
|
|
|
|
{
|
|
|
|
rSh.EnterStdMode();
|
|
|
|
rSh.GotoTable(pTblFrmFmt->GetName());
|
|
|
|
}
|
|
|
|
return sal_True;
|
|
|
|
}
|
|
|
|
|
2001-06-05 06:44:35 +00:00
|
|
|
if(pCell)
|
|
|
|
{
|
|
|
|
SwFrmFmt* pTblFrmFmt = pCell->GetFrmFmt();
|
|
|
|
if(pTblFrmFmt && pTblFrmFmt->GetDoc() == pDoc)
|
|
|
|
{
|
|
|
|
SwTableBox* pBox = pCell->GetTblBox();
|
|
|
|
SwTable* pTable = SwTable::FindTable( pTblFrmFmt );
|
2001-08-23 14:48:18 +00:00
|
|
|
pBox = pCell->FindBox(pTable, pBox);
|
2001-06-05 06:44:35 +00:00
|
|
|
if(pBox)
|
|
|
|
{
|
|
|
|
const SwStartNode* pSttNd = pBox->GetSttNd();
|
|
|
|
SwPosition aPos(*pSttNd);
|
|
|
|
SwPaM aPam(aPos);
|
|
|
|
aPam.Move(fnMoveForward, fnGoNode);
|
|
|
|
rSh.EnterStdMode();
|
|
|
|
rSh.SetSelection(aPam);
|
|
|
|
return sal_True;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2007-09-27 11:43:56 +00:00
|
|
|
SwXCellRange* pRange = xIfcTunnel.is() ? reinterpret_cast<SwXCellRange*>(
|
|
|
|
xIfcTunnel->getSomething(SwXCellRange::getUnoTunnelId())) : 0;
|
2001-06-05 06:44:35 +00:00
|
|
|
if(pRange)
|
|
|
|
{
|
|
|
|
const SwUnoCrsr* pUnoCrsr = pRange->GetTblCrsr();
|
|
|
|
if(pUnoCrsr)
|
|
|
|
{
|
2003-03-27 14:45:43 +00:00
|
|
|
UnoActionRemoveContext aContext(pDoc);
|
2001-06-05 06:44:35 +00:00
|
|
|
rSh.EnterStdMode();
|
|
|
|
rSh.SetSelection(*pUnoCrsr);
|
|
|
|
return sal_True;
|
|
|
|
}
|
|
|
|
}
|
2006-06-19 11:44:16 +00:00
|
|
|
uno::Reference< text::XTextContent > xBkm(xInterface, uno::UNO_QUERY);;
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2001-01-24 14:09:29 +00:00
|
|
|
if(xBkm.is() && xIfcTunnel.is())
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2010-01-08 17:13:50 +01:00
|
|
|
::sw::mark::IMark const*const pMark(
|
|
|
|
SwXBookmark::GetBookmarkInDoc(pDoc, xIfcTunnel) );
|
|
|
|
if (pMark)
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2010-01-08 17:13:50 +01:00
|
|
|
rSh.EnterStdMode();
|
|
|
|
rSh.GotoMark(pMark);
|
2011-02-18 10:44:14 +01:00
|
|
|
return sal_True;
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
}
|
2001-06-05 06:44:35 +00:00
|
|
|
// IndexMark, Index, TextField, Draw, Section, Footnote, Paragraph
|
2000-09-18 16:15:01 +00:00
|
|
|
//
|
|
|
|
|
2001-06-05 06:44:35 +00:00
|
|
|
// detect controls
|
|
|
|
|
2006-06-19 11:44:16 +00:00
|
|
|
uno::Reference< awt::XControlModel > xCtrlModel(xInterface, UNO_QUERY);
|
2001-06-05 06:44:35 +00:00
|
|
|
if(xCtrlModel.is())
|
|
|
|
{
|
2006-06-19 11:44:16 +00:00
|
|
|
uno::Reference<awt::XControl> XControl;
|
2001-06-05 06:44:35 +00:00
|
|
|
SdrObject* pObj = GetControl(xCtrlModel, XControl);
|
|
|
|
if(pObj)
|
|
|
|
{
|
|
|
|
SdrView* pDrawView = rSh.GetDrawView();
|
2006-11-14 14:21:33 +00:00
|
|
|
SdrPageView* pPV = pDrawView->GetSdrPageView();
|
2001-06-05 06:44:35 +00:00
|
|
|
if ( pPV && pObj->GetPage() == pPV->GetPage() )
|
2002-10-09 11:09:24 +00:00
|
|
|
{
|
2006-11-14 14:21:33 +00:00
|
|
|
pDrawView->SdrEndTextEdit();
|
2002-10-09 11:09:24 +00:00
|
|
|
pDrawView->UnmarkAll();
|
2001-06-05 06:44:35 +00:00
|
|
|
pDrawView->MarkObj( pObj, pPV );
|
2002-10-09 11:09:24 +00:00
|
|
|
}
|
2001-06-05 06:44:35 +00:00
|
|
|
return sal_True;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2006-06-19 11:44:16 +00:00
|
|
|
uno::Reference< drawing::XShapes > xShapeColl( xInterface, uno::UNO_QUERY );
|
|
|
|
uno::Reference< beans::XPropertySet > xTmpProp(xInterface, uno::UNO_QUERY);
|
2001-01-24 14:09:29 +00:00
|
|
|
SwXShape* pSwXShape = 0;
|
|
|
|
if(xIfcTunnel.is())
|
2007-09-27 11:43:56 +00:00
|
|
|
pSwXShape = reinterpret_cast<SwXShape*>(xIfcTunnel->getSomething(SwXShape::getUnoTunnelId()));
|
2000-09-18 16:15:01 +00:00
|
|
|
SvxShape* pSvxShape = 0;
|
|
|
|
if(pSwXShape)
|
|
|
|
{
|
2006-06-19 11:44:16 +00:00
|
|
|
uno::Reference< uno::XAggregation > xAgg = pSwXShape->GetAggregationInterface();
|
2000-09-18 16:15:01 +00:00
|
|
|
if(xAgg.is())
|
|
|
|
{
|
2007-09-27 11:43:56 +00:00
|
|
|
pSvxShape = reinterpret_cast<SvxShape*>(xIfcTunnel->getSomething(SvxShape::getUnoTunnelId()));
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( pSvxShape || xShapeColl.is() ) // Drawing drawing::Layer
|
|
|
|
{
|
|
|
|
SdrView* pDrawView = rSh.GetDrawView();
|
|
|
|
if (pDrawView)
|
|
|
|
{
|
2006-11-14 14:21:33 +00:00
|
|
|
pDrawView->SdrEndTextEdit();
|
2000-09-18 16:15:01 +00:00
|
|
|
pDrawView->UnmarkAll();
|
|
|
|
|
|
|
|
if (pSvxShape) // einzelnes Shape
|
|
|
|
{
|
|
|
|
SdrObject *pObj = pSvxShape->GetSdrObject();
|
|
|
|
if (pObj)
|
|
|
|
{
|
2006-11-14 14:21:33 +00:00
|
|
|
SdrPageView* pPV = pDrawView->GetSdrPageView();
|
2000-09-18 16:15:01 +00:00
|
|
|
if ( pPV && pObj->GetPage() == pPV->GetPage() )
|
|
|
|
{
|
|
|
|
pDrawView->MarkObj( pObj, pPV );
|
2005-10-05 12:25:37 +00:00
|
|
|
return sal_True;
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else // Shape Collection
|
|
|
|
{
|
2005-10-05 12:25:37 +00:00
|
|
|
sal_Bool bSelected = sal_False;
|
2000-09-18 16:15:01 +00:00
|
|
|
SdrPageView* pPV = NULL;
|
|
|
|
long nCount = xShapeColl->getCount();
|
|
|
|
for ( long i = 0; i < nCount; i++ )
|
|
|
|
{
|
2006-06-19 11:44:16 +00:00
|
|
|
uno::Reference< drawing::XShape > xShapeInt;
|
2000-09-18 16:15:01 +00:00
|
|
|
uno::Any aAny = xShapeColl->getByIndex(i);
|
2001-09-28 05:44:10 +00:00
|
|
|
aAny >>= xShapeInt;
|
2000-09-18 16:15:01 +00:00
|
|
|
if (xShapeInt.is())
|
|
|
|
{
|
2006-06-19 11:44:16 +00:00
|
|
|
uno::Reference< lang::XUnoTunnel> xShapeTunnel(xShapeInt, uno::UNO_QUERY);
|
2000-09-18 16:15:01 +00:00
|
|
|
|
|
|
|
SvxShape* pShape = xShapeTunnel.is() ?
|
2007-09-27 11:43:56 +00:00
|
|
|
reinterpret_cast<SvxShape*>(xShapeTunnel->getSomething(SvxShape::getUnoTunnelId())) : 0;
|
2000-09-18 16:15:01 +00:00
|
|
|
|
|
|
|
if (pShape)
|
|
|
|
{
|
|
|
|
SdrObject *pObj = pShape->GetSdrObject();
|
|
|
|
if (pObj)
|
|
|
|
{
|
|
|
|
if (!pPV) // erstes Objekt
|
|
|
|
{
|
2006-11-14 14:21:33 +00:00
|
|
|
pPV = pDrawView->GetSdrPageView();
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
if ( pPV && pObj->GetPage() == pPV->GetPage() )
|
|
|
|
{
|
|
|
|
pDrawView->MarkObj( pObj, pPV );
|
2005-10-05 12:25:37 +00:00
|
|
|
bSelected = sal_True;
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2005-10-05 12:25:37 +00:00
|
|
|
return bSelected;
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return sal_False;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
uno::Any SwXTextView::getSelection(void) throw( uno::RuntimeException )
|
|
|
|
{
|
2010-10-13 01:44:10 -05:00
|
|
|
SolarMutexGuard aGuard;
|
2006-06-19 11:44:16 +00:00
|
|
|
uno::Reference< uno::XInterface > aRef;
|
2007-09-27 11:43:56 +00:00
|
|
|
if(GetView())
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2002-10-09 13:01:16 +00:00
|
|
|
//force immediat shell update
|
2009-06-03 11:26:39 +00:00
|
|
|
m_pView->StopShellTimer();
|
2000-09-18 16:15:01 +00:00
|
|
|
// ein interface aus der aktuellen Selektion erzeugen
|
2009-06-03 11:26:39 +00:00
|
|
|
SwWrtShell& rSh = m_pView->GetWrtShell();
|
|
|
|
ShellModes eSelMode = m_pView->GetShellMode();
|
2000-09-18 16:15:01 +00:00
|
|
|
switch(eSelMode)
|
|
|
|
{
|
2007-09-27 11:43:56 +00:00
|
|
|
case SHELL_MODE_TABLE_TEXT :
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
|
|
|
if(rSh.GetTableCrsr())
|
|
|
|
{
|
2010-10-24 23:48:32 +02:00
|
|
|
OSL_ENSURE(rSh.GetTableFmt(), "kein Tabellenformat?");
|
2006-06-19 11:44:16 +00:00
|
|
|
uno::Reference< text::XTextTableCursor > xCrsr = new SwXTextTableCursor(*rSh.GetTableFmt(),
|
2000-09-18 16:15:01 +00:00
|
|
|
rSh.GetTableCrsr());
|
2006-06-19 11:44:16 +00:00
|
|
|
aRef = uno::Reference< uno::XInterface > (xCrsr, uno::UNO_QUERY);;
|
2000-09-18 16:15:01 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
// ohne Tabellenselektion wird der Text geliefert
|
|
|
|
//break;
|
2007-09-27 11:43:56 +00:00
|
|
|
case SHELL_MODE_LIST_TEXT :
|
|
|
|
case SHELL_MODE_TABLE_LIST_TEXT:
|
|
|
|
case SHELL_MODE_TEXT :
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2006-06-19 11:44:16 +00:00
|
|
|
uno::Reference< container::XIndexAccess > xPos = new SwXTextRanges(rSh.GetCrsr());
|
|
|
|
aRef = uno::Reference< uno::XInterface >(xPos, uno::UNO_QUERY);
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
break;
|
2007-09-27 11:43:56 +00:00
|
|
|
case SHELL_MODE_FRAME :
|
|
|
|
case SHELL_MODE_GRAPHIC :
|
|
|
|
case SHELL_MODE_OBJECT :
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
|
|
|
//Get FlyFrameFormat; fuer UI Macro Anbindung an Flys
|
|
|
|
const SwFrmFmt* pFmt = rSh.GetFlyFrmFmt();
|
2005-04-04 07:18:51 +00:00
|
|
|
if (pFmt)
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2010-12-17 09:02:23 +01:00
|
|
|
SwXFrame* pxFrame = SwIterator<SwXFrame,SwFmt>::FirstElement(*pFmt);
|
2005-04-04 07:18:51 +00:00
|
|
|
if(pxFrame) //das einzige gemeinsame interface fuer alle Frames
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2006-06-19 11:44:16 +00:00
|
|
|
aRef = uno::Reference< uno::XInterface >((cppu::OWeakObject*)pxFrame, uno::UNO_QUERY);
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2007-09-27 11:43:56 +00:00
|
|
|
if(SHELL_MODE_FRAME == eSelMode)
|
2005-04-04 07:18:51 +00:00
|
|
|
{
|
2006-06-19 11:44:16 +00:00
|
|
|
uno::Reference< text::XTextFrame > xFrm = new SwXTextFrame((SwFrmFmt&)*pFmt);
|
|
|
|
aRef = uno::Reference< uno::XInterface >(xFrm, uno::UNO_QUERY);
|
2005-04-04 07:18:51 +00:00
|
|
|
}
|
2007-09-27 11:43:56 +00:00
|
|
|
else if(SHELL_MODE_GRAPHIC == eSelMode)
|
2005-04-04 07:18:51 +00:00
|
|
|
{
|
2006-06-19 11:44:16 +00:00
|
|
|
uno::Reference< text::XTextContent > xFrm = new SwXTextGraphicObject((SwFrmFmt&)*pFmt);
|
2005-04-04 07:18:51 +00:00
|
|
|
aRef = xFrm;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2006-06-19 11:44:16 +00:00
|
|
|
uno::Reference< text::XTextContent > xFrm = new SwXTextEmbeddedObject((SwFrmFmt&)*pFmt);
|
2005-04-04 07:18:51 +00:00
|
|
|
aRef = xFrm;
|
|
|
|
}
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
2007-09-27 11:43:56 +00:00
|
|
|
case SHELL_MODE_DRAW :
|
|
|
|
case SHELL_MODE_DRAW_CTRL :
|
|
|
|
case SHELL_MODE_DRAW_FORM :
|
|
|
|
case SHELL_MODE_DRAWTEXT :
|
|
|
|
case SHELL_MODE_BEZIER :
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2006-06-19 11:44:16 +00:00
|
|
|
uno::Reference< drawing::XDrawPageSupplier > xPageSupp;
|
2009-06-03 11:26:39 +00:00
|
|
|
uno::Reference< frame::XModel > xModel = m_pView->GetDocShell()->GetBaseModel();
|
2006-06-19 11:44:16 +00:00
|
|
|
uno::Reference< lang::XUnoTunnel > xModelTunnel(xModel, uno::UNO_QUERY);
|
2007-09-27 11:43:56 +00:00
|
|
|
SwXTextDocument* pTextDoc = reinterpret_cast<SwXTextDocument*>(xModelTunnel->
|
|
|
|
getSomething(SwXTextDocument::getUnoTunnelId()));
|
2000-09-18 16:15:01 +00:00
|
|
|
|
|
|
|
SwFmDrawPage* pSvxDrawPage = pTextDoc->GetDrawPage()->GetSvxPage();
|
2006-06-19 11:44:16 +00:00
|
|
|
uno::Reference< drawing::XShapes > xShCol = new SvxShapeCollection();
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2004-07-12 14:53:22 +00:00
|
|
|
const SdrMarkList& rMarkList = rSh.GetDrawView()->GetMarkedObjectList();
|
2000-09-18 16:15:01 +00:00
|
|
|
for(sal_uInt16 i = 0; i < rMarkList.GetMarkCount(); i++)
|
|
|
|
{
|
2006-07-25 11:45:14 +00:00
|
|
|
SdrObject* pObj = rMarkList.GetMark(i)->GetMarkedSdrObj();
|
2006-06-19 11:44:16 +00:00
|
|
|
uno::Reference< uno::XInterface > xInt = pSvxDrawPage->GetInterface( pObj );
|
|
|
|
uno::Reference< drawing::XShape > xShape(xInt, uno::UNO_QUERY);;
|
2000-09-18 16:15:01 +00:00
|
|
|
xShCol->add(xShape);
|
|
|
|
}
|
2006-06-19 11:44:16 +00:00
|
|
|
aRef = uno::Reference< uno::XInterface >(xShCol, uno::UNO_QUERY);
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
break;
|
2007-09-27 11:43:56 +00:00
|
|
|
default:;//prevent warning
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
}
|
2006-06-19 11:44:16 +00:00
|
|
|
uno::Any aRet(&aRef, ::getCppuType((uno::Reference<uno::XInterface>*)0));
|
2000-09-18 16:15:01 +00:00
|
|
|
return aRet;
|
|
|
|
}
|
|
|
|
|
|
|
|
void SwXTextView::addSelectionChangeListener(
|
2006-06-19 11:44:16 +00:00
|
|
|
const uno::Reference< view::XSelectionChangeListener > & rxListener)
|
2000-09-18 16:15:01 +00:00
|
|
|
throw( uno::RuntimeException )
|
|
|
|
{
|
2010-10-13 01:44:10 -05:00
|
|
|
SolarMutexGuard aGuard;
|
2006-06-19 11:44:16 +00:00
|
|
|
uno::Reference< view::XSelectionChangeListener > * pInsert = new uno::Reference< view::XSelectionChangeListener > ;
|
2000-09-18 16:15:01 +00:00
|
|
|
*pInsert = rxListener;
|
|
|
|
aSelChangedListeners.Insert(pInsert, aSelChangedListeners.Count());
|
|
|
|
}
|
|
|
|
|
|
|
|
void SwXTextView::removeSelectionChangeListener(
|
2006-06-19 11:44:16 +00:00
|
|
|
const uno::Reference< view::XSelectionChangeListener > & rxListener)
|
2000-09-18 16:15:01 +00:00
|
|
|
throw( uno::RuntimeException )
|
|
|
|
{
|
2010-10-13 01:44:10 -05:00
|
|
|
SolarMutexGuard aGuard;
|
2000-09-18 16:15:01 +00:00
|
|
|
view::XSelectionChangeListener* pLeft = rxListener.get();
|
|
|
|
for(sal_uInt16 i = 0; i < aSelChangedListeners.Count(); i++)
|
|
|
|
{
|
2006-06-19 11:44:16 +00:00
|
|
|
uno::Reference< view::XSelectionChangeListener > * pElem = aSelChangedListeners.GetObject(i);
|
2000-09-18 16:15:01 +00:00
|
|
|
view::XSelectionChangeListener* pRight = pElem->get();
|
|
|
|
if(pLeft == pRight)
|
|
|
|
{
|
|
|
|
aSelChangedListeners.Remove(i);
|
|
|
|
delete pElem;
|
2002-04-22 08:33:26 +00:00
|
|
|
break;
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2001-06-05 06:44:35 +00:00
|
|
|
SdrObject* SwXTextView::GetControl(
|
2006-06-19 11:44:16 +00:00
|
|
|
const uno::Reference< awt::XControlModel > & xModel,
|
2007-09-27 11:43:56 +00:00
|
|
|
uno::Reference< awt::XControl >& xToFill )
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2007-09-27 11:43:56 +00:00
|
|
|
SwView* pView2 = GetView();
|
|
|
|
FmFormShell* pFormShell = pView2 ? pView2->GetFormShell() : NULL;
|
|
|
|
SdrView* pDrawView = pView2 ? pView2->GetDrawView() : NULL;
|
|
|
|
Window* pWindow = pView2 ? pView2->GetWrtShell().GetWin() : NULL;
|
2007-01-15 12:45:12 +00:00
|
|
|
|
2010-10-24 23:48:32 +02:00
|
|
|
OSL_ENSURE( pFormShell && pDrawView && pWindow, "SwXTextView::GetControl: how could I?" );
|
2007-01-15 12:45:12 +00:00
|
|
|
|
2007-05-10 08:49:07 +00:00
|
|
|
SdrObject* pControl = NULL;
|
|
|
|
if ( pFormShell && pDrawView && pWindow )
|
|
|
|
pControl = pFormShell->GetFormControl( xModel, *pDrawView, *pWindow, xToFill );
|
|
|
|
return pControl;
|
2001-06-05 06:44:35 +00:00
|
|
|
}
|
|
|
|
|
2006-06-19 11:44:16 +00:00
|
|
|
uno::Reference< awt::XControl > SwXTextView::getControl(const uno::Reference< awt::XControlModel > & xModel)
|
2001-06-05 06:44:35 +00:00
|
|
|
throw( container::NoSuchElementException, uno::RuntimeException )
|
|
|
|
{
|
2010-10-13 01:44:10 -05:00
|
|
|
SolarMutexGuard aGuard;
|
2006-06-19 11:44:16 +00:00
|
|
|
uno::Reference< awt::XControl > xRet;
|
2001-06-05 06:44:35 +00:00
|
|
|
GetControl(xModel, xRet);
|
2000-09-18 16:15:01 +00:00
|
|
|
return xRet;
|
|
|
|
}
|
2007-05-10 08:49:07 +00:00
|
|
|
|
2009-10-23 09:46:03 +02:00
|
|
|
uno::Reference< form::runtime::XFormController > SAL_CALL SwXTextView::getFormController( const uno::Reference< form::XForm >& _Form ) throw (RuntimeException)
|
2007-05-10 08:49:07 +00:00
|
|
|
{
|
2010-10-13 01:44:10 -05:00
|
|
|
SolarMutexGuard aGuard;
|
2007-05-10 08:49:07 +00:00
|
|
|
|
2007-09-27 11:43:56 +00:00
|
|
|
SwView* pView2 = GetView();
|
|
|
|
FmFormShell* pFormShell = pView2 ? pView2->GetFormShell() : NULL;
|
|
|
|
SdrView* pDrawView = pView2 ? pView2->GetDrawView() : NULL;
|
|
|
|
Window* pWindow = pView2 ? pView2->GetWrtShell().GetWin() : NULL;
|
2010-10-24 23:48:32 +02:00
|
|
|
OSL_ENSURE( pFormShell && pDrawView && pWindow, "SwXTextView::getFormController: how could I?" );
|
2007-05-10 08:49:07 +00:00
|
|
|
|
2009-10-23 09:46:03 +02:00
|
|
|
uno::Reference< form::runtime::XFormController > xController;
|
2007-05-10 08:49:07 +00:00
|
|
|
if ( pFormShell && pDrawView && pWindow )
|
|
|
|
xController = pFormShell->GetFormController( _Form, *pDrawView, *pWindow );
|
|
|
|
return xController;
|
|
|
|
}
|
|
|
|
|
|
|
|
::sal_Bool SAL_CALL SwXTextView::isFormDesignMode( ) throw (uno::RuntimeException)
|
|
|
|
{
|
2010-10-13 01:44:10 -05:00
|
|
|
SolarMutexGuard aGuard;
|
2007-09-27 11:43:56 +00:00
|
|
|
SwView* pView2 = GetView();
|
|
|
|
FmFormShell* pFormShell = pView2 ? pView2->GetFormShell() : NULL;
|
2007-05-10 08:49:07 +00:00
|
|
|
return pFormShell ? pFormShell->IsDesignMode() : sal_True;
|
|
|
|
}
|
|
|
|
|
|
|
|
void SAL_CALL SwXTextView::setFormDesignMode( ::sal_Bool _DesignMode ) throw (RuntimeException)
|
|
|
|
{
|
2010-10-13 01:44:10 -05:00
|
|
|
SolarMutexGuard aGuard;
|
2007-09-27 11:43:56 +00:00
|
|
|
SwView* pView2 = GetView();
|
|
|
|
FmFormShell* pFormShell = pView2 ? pView2->GetFormShell() : NULL;
|
2007-05-10 08:49:07 +00:00
|
|
|
if ( pFormShell )
|
|
|
|
pFormShell->SetDesignMode( _DesignMode );
|
|
|
|
}
|
|
|
|
|
2006-06-19 11:44:16 +00:00
|
|
|
uno::Reference< text::XTextViewCursor > SwXTextView::getViewCursor(void) throw( uno::RuntimeException )
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2010-10-13 01:44:10 -05:00
|
|
|
SolarMutexGuard aGuard;
|
2007-09-27 11:43:56 +00:00
|
|
|
if(GetView())
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
|
|
|
if(!pxTextViewCursor)
|
|
|
|
{
|
2006-06-19 11:44:16 +00:00
|
|
|
((SwXTextView*)this)->pxTextViewCursor = new uno::Reference< text::XTextViewCursor > ;
|
2007-09-27 11:43:56 +00:00
|
|
|
*pxTextViewCursor = new SwXTextViewCursor(GetView());
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
return *pxTextViewCursor;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
throw uno::RuntimeException();
|
|
|
|
}
|
|
|
|
|
2006-06-19 11:44:16 +00:00
|
|
|
uno::Reference< beans::XPropertySet > SwXTextView::getViewSettings(void) throw( uno::RuntimeException )
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2010-10-13 01:44:10 -05:00
|
|
|
SolarMutexGuard aGuard;
|
2009-06-03 11:26:39 +00:00
|
|
|
if(m_pView)
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
|
|
|
if(!pxViewSettings)
|
|
|
|
{
|
2006-06-19 11:44:16 +00:00
|
|
|
((SwXTextView*)this)->pxViewSettings = new uno::Reference< beans::XPropertySet > ;
|
2009-06-03 11:26:39 +00:00
|
|
|
*pxViewSettings = static_cast < HelperBaseNoState * > ( new SwXViewSettings( sal_False, m_pView ) );
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
throw uno::RuntimeException();
|
|
|
|
return *pxViewSettings;
|
|
|
|
}
|
2001-02-02 10:52:17 +00:00
|
|
|
|
2007-09-27 11:43:56 +00:00
|
|
|
Sequence< Sequence< PropertyValue > > SwXTextView::getRubyList( sal_Bool /*bAutomatic*/ ) throw(RuntimeException)
|
2001-02-02 10:52:17 +00:00
|
|
|
{
|
2010-10-13 01:44:10 -05:00
|
|
|
SolarMutexGuard aGuard;
|
2001-02-02 10:52:17 +00:00
|
|
|
|
2007-09-27 11:43:56 +00:00
|
|
|
if(!GetView())
|
2001-02-02 10:52:17 +00:00
|
|
|
throw RuntimeException();
|
2009-06-03 11:26:39 +00:00
|
|
|
SwWrtShell& rSh = m_pView->GetWrtShell();
|
|
|
|
ShellModes eSelMode = m_pView->GetShellMode();
|
2007-09-27 11:43:56 +00:00
|
|
|
if (eSelMode != SHELL_MODE_LIST_TEXT &&
|
|
|
|
eSelMode != SHELL_MODE_TABLE_LIST_TEXT &&
|
|
|
|
eSelMode != SHELL_MODE_TABLE_TEXT &&
|
|
|
|
eSelMode != SHELL_MODE_TEXT )
|
2001-02-02 10:52:17 +00:00
|
|
|
return Sequence< Sequence< PropertyValue > > ();
|
|
|
|
|
2009-06-03 11:26:39 +00:00
|
|
|
SwDoc* pDoc = m_pView->GetDocShell()->GetDoc();
|
2001-02-02 10:52:17 +00:00
|
|
|
SwRubyList aList;
|
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt16 nCount = pDoc->FillRubyList( *rSh.GetCrsr(), aList, 0 );
|
2001-02-02 10:52:17 +00:00
|
|
|
Sequence< Sequence< PropertyValue > > aRet(nCount);
|
|
|
|
Sequence< PropertyValue >* pRet = aRet.getArray();
|
2001-08-16 11:33:56 +00:00
|
|
|
String aString;
|
2011-01-17 15:06:54 +01:00
|
|
|
for(sal_uInt16 n = 0; n < nCount; n++)
|
2001-02-02 10:52:17 +00:00
|
|
|
{
|
|
|
|
const SwRubyListEntryPtr pEntry = aList[n];
|
|
|
|
|
|
|
|
const String& rEntryText = pEntry->GetText();
|
|
|
|
const SwFmtRuby& rAttr = pEntry->GetRubyAttr();
|
|
|
|
|
2001-06-01 09:13:04 +00:00
|
|
|
pRet[n].realloc(5);
|
2001-02-02 10:52:17 +00:00
|
|
|
PropertyValue* pValues = pRet[n].getArray();
|
2010-12-27 09:53:49 +01:00
|
|
|
pValues[0].Name = rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_RUBY_BASE_TEXT));
|
2001-02-02 10:52:17 +00:00
|
|
|
pValues[0].Value <<= OUString(rEntryText);
|
2010-12-27 09:53:49 +01:00
|
|
|
pValues[1].Name = rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_RUBY_TEXT));
|
2001-02-02 10:52:17 +00:00
|
|
|
pValues[1].Value <<= OUString(rAttr.GetText());
|
2010-12-27 09:53:49 +01:00
|
|
|
pValues[2].Name = rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_RUBY_CHAR_STYLE_NAME));
|
2007-09-27 11:43:56 +00:00
|
|
|
SwStyleNameMapper::FillProgName(rAttr.GetCharFmtName(), aString, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, sal_True );
|
2001-08-16 11:33:56 +00:00
|
|
|
pValues[2].Value <<= OUString( aString );
|
2010-12-27 09:53:49 +01:00
|
|
|
pValues[3].Name = rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_RUBY_ADJUST));
|
2001-02-02 10:52:17 +00:00
|
|
|
pValues[3].Value <<= (sal_Int16)rAttr.GetAdjustment();
|
2010-12-27 09:53:49 +01:00
|
|
|
pValues[4].Name = rtl::OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_RUBY_IS_ABOVE));
|
2001-06-01 09:13:04 +00:00
|
|
|
sal_Bool bVal = !rAttr.GetPosition();
|
|
|
|
pValues[4].Value.setValue(&bVal, ::getBooleanCppuType());
|
2001-02-02 10:52:17 +00:00
|
|
|
}
|
|
|
|
return aRet;
|
|
|
|
}
|
|
|
|
|
|
|
|
void SAL_CALL SwXTextView::setRubyList(
|
2007-09-27 11:43:56 +00:00
|
|
|
const Sequence< Sequence< PropertyValue > >& rRubyList, sal_Bool /*bAutomatic*/ )
|
2001-02-02 10:52:17 +00:00
|
|
|
throw(RuntimeException)
|
|
|
|
{
|
2010-10-13 01:44:10 -05:00
|
|
|
SolarMutexGuard aGuard;
|
2001-02-02 10:52:17 +00:00
|
|
|
|
2007-09-27 11:43:56 +00:00
|
|
|
if(!GetView() || !rRubyList.getLength())
|
2001-02-02 10:52:17 +00:00
|
|
|
throw RuntimeException();
|
2009-06-03 11:26:39 +00:00
|
|
|
SwWrtShell& rSh = m_pView->GetWrtShell();
|
|
|
|
ShellModes eSelMode = m_pView->GetShellMode();
|
2007-09-27 11:43:56 +00:00
|
|
|
if (eSelMode != SHELL_MODE_LIST_TEXT &&
|
|
|
|
eSelMode != SHELL_MODE_TABLE_LIST_TEXT &&
|
|
|
|
eSelMode != SHELL_MODE_TABLE_TEXT &&
|
|
|
|
eSelMode != SHELL_MODE_TEXT )
|
2001-02-02 10:52:17 +00:00
|
|
|
throw RuntimeException();
|
|
|
|
|
|
|
|
SwRubyList aList;
|
|
|
|
|
|
|
|
const Sequence<PropertyValue>* pRubyList = rRubyList.getConstArray();
|
|
|
|
for(sal_Int32 nPos = 0; nPos < rRubyList.getLength(); nPos++)
|
|
|
|
{
|
|
|
|
SwRubyListEntryPtr pEntry = new SwRubyListEntry;
|
|
|
|
const PropertyValue* pProperties = pRubyList[nPos].getConstArray();
|
|
|
|
OUString sTmp;
|
|
|
|
for(sal_Int32 nProp = 0; nProp < pRubyList[nPos].getLength(); nProp++)
|
|
|
|
{
|
2001-06-13 10:41:22 +00:00
|
|
|
if(pProperties[nProp].Name.equalsAsciiL(
|
|
|
|
SW_PROP_NAME(UNO_NAME_RUBY_BASE_TEXT)))
|
2001-02-02 10:52:17 +00:00
|
|
|
{
|
|
|
|
pProperties[nProp].Value >>= sTmp;
|
|
|
|
pEntry->SetText(sTmp);
|
|
|
|
}
|
2001-06-13 10:41:22 +00:00
|
|
|
else if(pProperties[nProp].Name.equalsAsciiL(
|
|
|
|
SW_PROP_NAME(UNO_NAME_RUBY_TEXT)))
|
2001-02-02 10:52:17 +00:00
|
|
|
{
|
|
|
|
pProperties[nProp].Value >>= sTmp;
|
|
|
|
pEntry->GetRubyAttr().SetText(sTmp);
|
|
|
|
}
|
2001-06-13 10:41:22 +00:00
|
|
|
else if(pProperties[nProp].Name.equalsAsciiL(
|
|
|
|
SW_PROP_NAME(UNO_NAME_RUBY_CHAR_STYLE_NAME)))
|
2001-02-02 10:52:17 +00:00
|
|
|
{
|
2001-06-19 09:32:09 +00:00
|
|
|
if((pProperties[nProp].Value >>= sTmp))
|
|
|
|
{
|
2001-08-16 11:33:56 +00:00
|
|
|
String sName;
|
2007-09-27 11:43:56 +00:00
|
|
|
SwStyleNameMapper::FillUIName(sTmp, sName, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT, sal_True );
|
2001-06-19 09:32:09 +00:00
|
|
|
sal_uInt16 nPoolId = sName.Len() ?
|
2007-09-27 11:43:56 +00:00
|
|
|
SwStyleNameMapper::GetPoolIdFromUIName( sName, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT ) : 0;
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2001-06-19 09:32:09 +00:00
|
|
|
pEntry->GetRubyAttr().SetCharFmtName( sName );
|
|
|
|
pEntry->GetRubyAttr().SetCharFmtId( nPoolId );
|
|
|
|
}
|
2001-02-02 10:52:17 +00:00
|
|
|
}
|
2001-06-13 10:41:22 +00:00
|
|
|
else if(pProperties[nProp].Name.equalsAsciiL(
|
|
|
|
SW_PROP_NAME(UNO_NAME_RUBY_ADJUST)))
|
2001-02-02 10:52:17 +00:00
|
|
|
{
|
2007-11-12 15:33:29 +00:00
|
|
|
sal_Int16 nTmp = 0;
|
2001-06-19 09:32:09 +00:00
|
|
|
if((pProperties[nProp].Value >>= nTmp))
|
|
|
|
pEntry->GetRubyAttr().SetAdjustment(nTmp);
|
2001-02-02 10:52:17 +00:00
|
|
|
}
|
2001-06-13 10:41:22 +00:00
|
|
|
else if(pProperties[nProp].Name.equalsAsciiL(
|
|
|
|
SW_PROP_NAME(UNO_NAME_RUBY_IS_ABOVE)))
|
2001-06-01 09:13:04 +00:00
|
|
|
{
|
2001-06-19 09:32:09 +00:00
|
|
|
sal_Bool bValue = pProperties[nProp].Value.hasValue() ?
|
|
|
|
*(sal_Bool*)pProperties[nProp].Value.getValue() : sal_True;
|
2001-06-01 09:13:04 +00:00
|
|
|
pEntry->GetRubyAttr().SetPosition(bValue ? 0 : 1);
|
|
|
|
}
|
2001-02-02 10:52:17 +00:00
|
|
|
}
|
2011-01-17 15:06:54 +01:00
|
|
|
aList.Insert(pEntry, (sal_uInt16)nPos);
|
2001-02-02 10:52:17 +00:00
|
|
|
}
|
2009-06-03 11:26:39 +00:00
|
|
|
SwDoc* pDoc = m_pView->GetDocShell()->GetDoc();
|
2001-02-02 10:52:17 +00:00
|
|
|
pDoc->SetRubyList( *rSh.GetCrsr(), aList, 0 );
|
|
|
|
}
|
2002-11-11 13:14:55 +00:00
|
|
|
|
2011-01-03 13:40:23 +01:00
|
|
|
SfxObjectShellLock SwXTextView::BuildTmpSelectionDoc()
|
2002-11-11 13:14:55 +00:00
|
|
|
{
|
2010-03-17 13:44:55 +01:00
|
|
|
SwWrtShell& rOldSh = m_pView->GetWrtShell();
|
|
|
|
SfxPrinter *pPrt = rOldSh.getIDocumentDeviceAccess()->getPrinter( false );
|
2002-11-11 13:14:55 +00:00
|
|
|
SwDocShell* pDocSh;
|
2011-01-03 13:40:23 +01:00
|
|
|
SfxObjectShellLock xDocSh( pDocSh = new SwDocShell( /*pPrtDoc, */SFX_CREATE_MODE_STANDARD ) );
|
2002-11-11 13:14:55 +00:00
|
|
|
xDocSh->DoInitNew( 0 );
|
2010-10-04 17:01:57 +02:00
|
|
|
SwDoc *const pTempDoc( pDocSh->GetDoc() );
|
|
|
|
// #i103634#, #i112425#: do not expand numbering and fields on PDF export
|
|
|
|
pTempDoc->SetClipBoard(true);
|
|
|
|
rOldSh.FillPrtDoc(pTempDoc, pPrt);
|
2009-12-09 10:11:48 +01:00
|
|
|
SfxViewFrame* pDocFrame = SfxViewFrame::LoadHiddenDocument( *xDocSh, 0 );
|
2002-11-11 13:14:55 +00:00
|
|
|
SwView* pDocView = (SwView*) pDocFrame->GetViewShell();
|
|
|
|
pDocView->AttrChangedNotify( &pDocView->GetWrtShell() );//Damit SelectShell gerufen wird.
|
|
|
|
SwWrtShell* pSh = pDocView->GetWrtShellPtr();
|
2006-08-14 17:02:09 +00:00
|
|
|
|
|
|
|
IDocumentDeviceAccess* pIDDA = pSh->getIDocumentDeviceAccess();
|
|
|
|
SfxPrinter* pTempPrinter = pIDDA->getPrinter( true );
|
|
|
|
|
2010-03-17 13:44:55 +01:00
|
|
|
const SwPageDesc& rCurPageDesc = rOldSh.GetPageDesc(rOldSh.GetCurPageDesc());
|
2006-08-14 17:02:09 +00:00
|
|
|
|
2010-03-17 13:44:55 +01:00
|
|
|
IDocumentDeviceAccess* pIDDA_old = rOldSh.getIDocumentDeviceAccess();
|
2006-08-14 17:02:09 +00:00
|
|
|
|
2010-03-17 13:44:55 +01:00
|
|
|
if( pIDDA_old->getPrinter( false ) )
|
|
|
|
{
|
|
|
|
pIDDA->setJobsetup( *pIDDA_old->getJobsetup() );
|
|
|
|
//#69563# if it isn't the same printer then the pointer has been invalidated!
|
|
|
|
pTempPrinter = pIDDA->getPrinter( true );
|
2002-11-11 13:14:55 +00:00
|
|
|
}
|
2006-08-14 17:02:09 +00:00
|
|
|
|
2010-03-17 13:44:55 +01:00
|
|
|
pTempPrinter->SetPaperBin(rCurPageDesc.GetMaster().GetPaperBin().GetValue());
|
|
|
|
|
2002-11-11 13:14:55 +00:00
|
|
|
return xDocSh;
|
|
|
|
}
|
|
|
|
|
2000-09-18 16:15:01 +00:00
|
|
|
void SwXTextView::NotifySelChanged()
|
|
|
|
{
|
2010-10-24 23:48:32 +02:00
|
|
|
OSL_ENSURE( m_pView, "view is missing" );
|
2002-11-11 13:14:55 +00:00
|
|
|
|
|
|
|
// destroy temporary document with selected text that is used
|
|
|
|
// in PDF export of (multi-)selections.
|
2009-06-03 11:26:39 +00:00
|
|
|
if (m_pView && m_pView->GetTmpSelectionDoc().Is())
|
2002-11-11 13:14:55 +00:00
|
|
|
{
|
2009-06-03 11:26:39 +00:00
|
|
|
m_pView->GetTmpSelectionDoc()->DoClose();
|
|
|
|
m_pView->GetTmpSelectionDoc() = 0;
|
2002-11-11 13:14:55 +00:00
|
|
|
}
|
|
|
|
|
2006-06-19 11:44:16 +00:00
|
|
|
uno::Reference< uno::XInterface > xInt = (cppu::OWeakObject*)(SfxBaseController*)this;
|
2000-09-18 16:15:01 +00:00
|
|
|
|
|
|
|
lang::EventObject aEvent(xInt);
|
|
|
|
|
|
|
|
sal_uInt16 nCount = aSelChangedListeners.Count();
|
|
|
|
for ( sal_uInt16 i = nCount; i--; )
|
|
|
|
{
|
2006-06-19 11:44:16 +00:00
|
|
|
uno::Reference< view::XSelectionChangeListener > *pObj = aSelChangedListeners[i];
|
2000-09-18 16:15:01 +00:00
|
|
|
(*pObj)->selectionChanged(aEvent);
|
|
|
|
}
|
|
|
|
}
|
2001-07-12 12:10:27 +00:00
|
|
|
|
|
|
|
void SwXTextView::NotifyDBChanged()
|
|
|
|
{
|
|
|
|
URL aURL;
|
2010-12-27 09:53:49 +01:00
|
|
|
aURL.Complete = rtl::OUString::createFromAscii(SwXDispatch::GetDBChangeURL());
|
2001-07-12 12:10:27 +00:00
|
|
|
|
|
|
|
sal_uInt16 nCount = aSelChangedListeners.Count();
|
|
|
|
for ( sal_uInt16 i = nCount; i--; )
|
|
|
|
{
|
2006-06-19 11:44:16 +00:00
|
|
|
uno::Reference< view::XSelectionChangeListener > *pObj = aSelChangedListeners[i];
|
|
|
|
uno::Reference<XDispatch> xDispatch((*pObj), UNO_QUERY);
|
2001-07-12 12:10:27 +00:00
|
|
|
if(xDispatch.is())
|
|
|
|
xDispatch->dispatch(aURL, Sequence<PropertyValue>(0));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2005-04-04 07:18:51 +00:00
|
|
|
uno::Reference< beans::XPropertySetInfo > SAL_CALL SwXTextView::getPropertySetInfo( )
|
|
|
|
throw (uno::RuntimeException)
|
|
|
|
{
|
2010-10-13 01:44:10 -05:00
|
|
|
SolarMutexGuard aGuard;
|
2009-06-03 11:26:39 +00:00
|
|
|
static uno::Reference< XPropertySetInfo > aRef = m_pPropSet->getPropertySetInfo();
|
2005-04-04 07:18:51 +00:00
|
|
|
return aRef;
|
|
|
|
}
|
|
|
|
|
|
|
|
void SAL_CALL SwXTextView::setPropertyValue(
|
|
|
|
const OUString& rPropertyName, const uno::Any& rValue )
|
|
|
|
throw (beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException)
|
|
|
|
{
|
2010-10-13 01:44:10 -05:00
|
|
|
SolarMutexGuard aGuard;
|
2009-06-03 11:26:39 +00:00
|
|
|
const SfxItemPropertySimpleEntry* pEntry = m_pPropSet->getPropertyMap()->getByName( rPropertyName );
|
|
|
|
if (!pEntry)
|
2005-04-04 07:18:51 +00:00
|
|
|
throw UnknownPropertyException();
|
2009-06-03 11:26:39 +00:00
|
|
|
else if (pEntry->nFlags & PropertyAttribute::READONLY)
|
2005-04-04 07:18:51 +00:00
|
|
|
throw PropertyVetoException();
|
|
|
|
else
|
|
|
|
{
|
2009-06-03 11:26:39 +00:00
|
|
|
switch (pEntry->nWID)
|
2005-04-04 07:18:51 +00:00
|
|
|
{
|
|
|
|
case WID_IS_HIDE_SPELL_MARKS :
|
2008-12-15 12:01:46 +00:00
|
|
|
// deprecated #i91949
|
|
|
|
break;
|
|
|
|
case WID_IS_CONSTANT_SPELLCHECK :
|
2005-04-04 07:18:51 +00:00
|
|
|
{
|
2007-11-12 15:33:29 +00:00
|
|
|
sal_Bool bVal = sal_False;
|
2009-06-03 11:26:39 +00:00
|
|
|
const SwViewOption *pOpt = m_pView->GetWrtShell().GetViewOptions();
|
2005-04-04 07:18:51 +00:00
|
|
|
if (!pOpt || !(rValue >>= bVal))
|
|
|
|
throw RuntimeException();
|
|
|
|
SwViewOption aNewOpt( *pOpt );
|
2009-06-03 11:26:39 +00:00
|
|
|
if (pEntry->nWID == WID_IS_CONSTANT_SPELLCHECK)
|
2005-04-04 07:18:51 +00:00
|
|
|
aNewOpt.SetOnlineSpell(bVal);
|
2009-06-03 11:26:39 +00:00
|
|
|
m_pView->GetWrtShell().ApplyViewOptions( aNewOpt );
|
2005-04-04 07:18:51 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
default :
|
2011-03-12 11:51:35 +01:00
|
|
|
OSL_FAIL("unknown WID");
|
2005-04-04 07:18:51 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
uno::Any SAL_CALL SwXTextView::getPropertyValue(
|
|
|
|
const OUString& rPropertyName )
|
|
|
|
throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
|
|
|
|
{
|
2010-10-13 01:44:10 -05:00
|
|
|
SolarMutexGuard aGuard;
|
2005-04-04 07:18:51 +00:00
|
|
|
|
|
|
|
Any aRet;
|
|
|
|
|
2009-06-03 11:26:39 +00:00
|
|
|
const SfxItemPropertySimpleEntry* pEntry = m_pPropSet->getPropertyMap()->getByName( rPropertyName );
|
|
|
|
if (!pEntry)
|
2005-04-04 07:18:51 +00:00
|
|
|
throw UnknownPropertyException();
|
|
|
|
else
|
|
|
|
{
|
2009-06-03 11:26:39 +00:00
|
|
|
sal_Int16 nWID = pEntry->nWID;
|
2005-04-04 07:18:51 +00:00
|
|
|
switch (nWID)
|
|
|
|
{
|
|
|
|
case WID_PAGE_COUNT :
|
|
|
|
case WID_LINE_COUNT :
|
|
|
|
{
|
|
|
|
// format document completely in order to get meaningful
|
|
|
|
// values for page count and line count
|
2009-06-03 11:26:39 +00:00
|
|
|
m_pView->GetWrtShell().CalcLayout();
|
2005-04-04 07:18:51 +00:00
|
|
|
|
|
|
|
sal_Int32 nCount = -1;
|
|
|
|
if (nWID == WID_PAGE_COUNT)
|
2010-06-13 15:22:56 +02:00
|
|
|
nCount = m_pView->GetWrtShell().GetPageCount();
|
2005-04-04 07:18:51 +00:00
|
|
|
else // WID_LINE_COUNT
|
2011-01-17 15:06:54 +01:00
|
|
|
nCount = m_pView->GetWrtShell().GetLineCount( sal_False /*of whole document*/ );
|
2005-04-04 07:18:51 +00:00
|
|
|
aRet <<= nCount;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case WID_IS_HIDE_SPELL_MARKS :
|
2008-12-15 12:01:46 +00:00
|
|
|
// deprecated #i91949
|
|
|
|
break;
|
|
|
|
case WID_IS_CONSTANT_SPELLCHECK :
|
2005-04-04 07:18:51 +00:00
|
|
|
{
|
2009-06-03 11:26:39 +00:00
|
|
|
const SwViewOption *pOpt = m_pView->GetWrtShell().GetViewOptions();
|
2005-04-04 07:18:51 +00:00
|
|
|
if (!pOpt)
|
|
|
|
throw RuntimeException();
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt32 nFlag = VIEWOPT_1_ONLINESPELL;
|
2005-04-04 07:18:51 +00:00
|
|
|
sal_Bool bVal = 0 != (pOpt->GetCoreOptions() & nFlag);
|
|
|
|
aRet <<= bVal;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
default :
|
2011-03-12 11:51:35 +01:00
|
|
|
OSL_FAIL("unknown WID");
|
2005-04-04 07:18:51 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return aRet;
|
|
|
|
}
|
|
|
|
|
|
|
|
void SAL_CALL SwXTextView::addPropertyChangeListener(
|
2007-09-27 11:43:56 +00:00
|
|
|
const OUString& /*rPropertyName*/,
|
|
|
|
const uno::Reference< beans::XPropertyChangeListener >& /*rxListener*/ )
|
2005-04-04 07:18:51 +00:00
|
|
|
throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
|
|
|
|
{
|
2011-03-12 11:51:35 +01:00
|
|
|
OSL_FAIL("not implemented");
|
2005-04-04 07:18:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void SAL_CALL SwXTextView::removePropertyChangeListener(
|
2007-09-27 11:43:56 +00:00
|
|
|
const OUString& /*rPropertyName*/,
|
|
|
|
const uno::Reference< beans::XPropertyChangeListener >& /*rxListener*/ )
|
2005-04-04 07:18:51 +00:00
|
|
|
throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
|
|
|
|
{
|
2011-03-12 11:51:35 +01:00
|
|
|
OSL_FAIL("not implemented");
|
2005-04-04 07:18:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void SAL_CALL SwXTextView::addVetoableChangeListener(
|
2007-09-27 11:43:56 +00:00
|
|
|
const OUString& /*rPropertyName*/,
|
|
|
|
const uno::Reference< beans::XVetoableChangeListener >& /*rxListener*/ )
|
2005-04-04 07:18:51 +00:00
|
|
|
throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
|
|
|
|
{
|
2011-03-12 11:51:35 +01:00
|
|
|
OSL_FAIL("not implemented");
|
2005-04-04 07:18:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void SAL_CALL SwXTextView::removeVetoableChangeListener(
|
2007-09-27 11:43:56 +00:00
|
|
|
const OUString& /*rPropertyName*/,
|
|
|
|
const uno::Reference< beans::XVetoableChangeListener >& /*rxListener*/ )
|
2005-04-04 07:18:51 +00:00
|
|
|
throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
|
|
|
|
{
|
2011-03-12 11:51:35 +01:00
|
|
|
OSL_FAIL("not implemented");
|
2005-04-04 07:18:51 +00:00
|
|
|
}
|
|
|
|
|
2000-09-18 16:15:01 +00:00
|
|
|
OUString SwXTextView::getImplementationName(void) throw( RuntimeException )
|
|
|
|
{
|
|
|
|
return C2U("SwXTextView");
|
|
|
|
}
|
|
|
|
|
2011-01-03 20:35:28 +00:00
|
|
|
sal_Bool SwXTextView::supportsService(const OUString& rServiceName) throw( RuntimeException )
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2011-01-19 23:09:51 +01:00
|
|
|
return rServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.TextDocumentView")) ||
|
|
|
|
rServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.view.OfficeDocumentView"));
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
Sequence< OUString > SwXTextView::getSupportedServiceNames(void) throw( RuntimeException )
|
|
|
|
{
|
2002-11-04 09:00:12 +00:00
|
|
|
Sequence< OUString > aRet(2);
|
2000-09-18 16:15:01 +00:00
|
|
|
OUString* pArray = aRet.getArray();
|
2002-11-04 08:23:40 +00:00
|
|
|
pArray[0] = C2U("com.sun.star.text.TextDocumentView");
|
|
|
|
pArray[1] = C2U("com.sun.star.view.OfficeDocumentView");
|
2000-09-18 16:15:01 +00:00
|
|
|
return aRet;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************
|
|
|
|
* SwXTextViewCursor
|
|
|
|
******************************************************************/
|
|
|
|
SwXTextViewCursor::SwXTextViewCursor(SwView* pVw) :
|
2009-06-03 11:26:39 +00:00
|
|
|
m_pView(pVw),
|
|
|
|
m_pPropSet(aSwMapProvider.GetPropertySet(PROPERTY_MAP_TEXT_CURSOR))
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
SwXTextViewCursor::~SwXTextViewCursor()
|
|
|
|
{
|
|
|
|
}
|
2004-11-15 15:51:46 +00:00
|
|
|
|
|
|
|
// used to determine if there is a text selction or not.
|
|
|
|
// If there is no text selection the functions that need a working
|
|
|
|
// cursor will be disabled (throw RuntimeException). This will be the case
|
|
|
|
// for the following interfaces:
|
|
|
|
// - XViewCursor
|
|
|
|
// - XTextCursor
|
|
|
|
// - XTextRange
|
|
|
|
// - XLineCursor
|
2005-02-21 12:48:54 +00:00
|
|
|
sal_Bool SwXTextViewCursor::IsTextSelection( sal_Bool bAllowTables ) const
|
|
|
|
{
|
2005-01-18 13:31:17 +00:00
|
|
|
|
2004-11-15 15:51:46 +00:00
|
|
|
sal_Bool bRes = sal_False;
|
2010-10-24 23:48:32 +02:00
|
|
|
OSL_ENSURE(m_pView, "m_pView is NULL ???");
|
2009-06-03 11:26:39 +00:00
|
|
|
if(m_pView)
|
2005-02-21 12:48:54 +00:00
|
|
|
{
|
2009-06-03 11:26:39 +00:00
|
|
|
//! m_pView->GetShellMode() will only work after the shell
|
2005-02-21 12:48:54 +00:00
|
|
|
//! has already changed and thus can not be used here!
|
2009-06-03 11:26:39 +00:00
|
|
|
SelectionType eSelType = m_pView->GetWrtShell().GetSelectionType();
|
2007-09-27 11:43:56 +00:00
|
|
|
bRes = ( (nsSelectionType::SEL_TXT & eSelType) ||
|
|
|
|
(nsSelectionType::SEL_NUM & eSelType) ) &&
|
|
|
|
(!(nsSelectionType::SEL_TBL_CELLS & eSelType) || bAllowTables);
|
2004-11-15 15:51:46 +00:00
|
|
|
}
|
|
|
|
return bRes;
|
|
|
|
}
|
|
|
|
|
2000-09-18 16:15:01 +00:00
|
|
|
sal_Bool SwXTextViewCursor::isVisible(void) throw( uno::RuntimeException )
|
|
|
|
{
|
2010-10-13 01:44:10 -05:00
|
|
|
SolarMutexGuard aGuard;
|
2011-03-12 11:51:35 +01:00
|
|
|
OSL_FAIL("not implemented");
|
2000-09-18 16:15:01 +00:00
|
|
|
return sal_True;
|
|
|
|
}
|
|
|
|
|
2007-09-27 11:43:56 +00:00
|
|
|
void SwXTextViewCursor::setVisible(sal_Bool /*bVisible*/) throw( uno::RuntimeException )
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2010-10-13 01:44:10 -05:00
|
|
|
SolarMutexGuard aGuard;
|
2011-03-12 11:51:35 +01:00
|
|
|
OSL_FAIL("not implemented");
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
awt::Point SwXTextViewCursor::getPosition(void) throw( uno::RuntimeException )
|
|
|
|
{
|
2010-10-13 01:44:10 -05:00
|
|
|
SolarMutexGuard aGuard;
|
2000-09-18 16:15:01 +00:00
|
|
|
awt::Point aRet;
|
2009-06-03 11:26:39 +00:00
|
|
|
if(m_pView)
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2009-06-03 11:26:39 +00:00
|
|
|
const SwWrtShell& rSh = m_pView->GetWrtShell();
|
2008-03-07 14:08:57 +00:00
|
|
|
const SwRect aCharRect(rSh.GetCharRect());
|
|
|
|
|
|
|
|
const SwFrmFmt& rMaster = rSh.GetPageDesc( rSh.GetCurPageDesc() ).GetMaster();
|
|
|
|
|
|
|
|
const SvxULSpaceItem& rUL = rMaster.GetULSpace();
|
|
|
|
const long nY = aCharRect.Top() - (rUL.GetUpper() + DOCUMENTBORDER);
|
2000-09-18 16:15:01 +00:00
|
|
|
aRet.Y = TWIP_TO_MM100(nY);
|
2008-03-07 14:08:57 +00:00
|
|
|
|
|
|
|
const SvxLRSpaceItem& rLR = rMaster.GetLRSpace();
|
|
|
|
const long nX = aCharRect.Left() - (rLR.GetLeft() + DOCUMENTBORDER);
|
2000-09-18 16:15:01 +00:00
|
|
|
aRet.X = TWIP_TO_MM100(nX);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
throw uno::RuntimeException();
|
|
|
|
return aRet;
|
|
|
|
}
|
|
|
|
|
|
|
|
void SwXTextViewCursor::collapseToStart(void) throw( uno::RuntimeException )
|
|
|
|
{
|
2010-10-13 01:44:10 -05:00
|
|
|
SolarMutexGuard aGuard;
|
2009-06-03 11:26:39 +00:00
|
|
|
if(m_pView)
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2004-11-15 15:51:46 +00:00
|
|
|
if (!IsTextSelection())
|
|
|
|
throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "no text selection" ) ), static_cast < cppu::OWeakObject * > ( this ) );
|
|
|
|
|
2009-06-03 11:26:39 +00:00
|
|
|
SwWrtShell& rSh = m_pView->GetWrtShell();
|
2000-09-18 16:15:01 +00:00
|
|
|
if(rSh.HasSelection())
|
|
|
|
{
|
|
|
|
SwPaM* pShellCrsr = rSh.GetCrsr();
|
|
|
|
if(*pShellCrsr->GetPoint() > *pShellCrsr->GetMark())
|
|
|
|
pShellCrsr->Exchange();
|
|
|
|
pShellCrsr->DeleteMark();
|
|
|
|
rSh.EnterStdMode();
|
|
|
|
rSh.SetSelection(*pShellCrsr);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
throw uno::RuntimeException();
|
|
|
|
}
|
|
|
|
|
|
|
|
void SwXTextViewCursor::collapseToEnd(void) throw( uno::RuntimeException )
|
|
|
|
{
|
2010-10-13 01:44:10 -05:00
|
|
|
SolarMutexGuard aGuard;
|
2009-06-03 11:26:39 +00:00
|
|
|
if(m_pView)
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2004-11-15 15:51:46 +00:00
|
|
|
if (!IsTextSelection())
|
|
|
|
throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "no text selection" ) ), static_cast < cppu::OWeakObject * > ( this ) );
|
|
|
|
|
2009-06-03 11:26:39 +00:00
|
|
|
SwWrtShell& rSh = m_pView->GetWrtShell();
|
2000-09-18 16:15:01 +00:00
|
|
|
if(rSh.HasSelection())
|
|
|
|
{
|
|
|
|
SwPaM* pShellCrsr = rSh.GetCrsr();
|
|
|
|
if(*pShellCrsr->GetPoint() < *pShellCrsr->GetMark())
|
|
|
|
pShellCrsr->Exchange();
|
|
|
|
pShellCrsr->DeleteMark();
|
|
|
|
rSh.EnterStdMode();
|
|
|
|
rSh.SetSelection(*pShellCrsr);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
throw uno::RuntimeException();
|
|
|
|
}
|
|
|
|
|
|
|
|
sal_Bool SwXTextViewCursor::isCollapsed(void) throw( uno::RuntimeException )
|
|
|
|
{
|
2010-10-13 01:44:10 -05:00
|
|
|
SolarMutexGuard aGuard;
|
2000-09-18 16:15:01 +00:00
|
|
|
sal_Bool bRet = sal_False;
|
2009-06-03 11:26:39 +00:00
|
|
|
if(m_pView)
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2004-11-15 15:51:46 +00:00
|
|
|
if (!IsTextSelection())
|
|
|
|
throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "no text selection" ) ), static_cast < cppu::OWeakObject * > ( this ) );
|
|
|
|
|
2009-06-03 11:26:39 +00:00
|
|
|
const SwWrtShell& rSh = m_pView->GetWrtShell();
|
2002-08-13 13:05:37 +00:00
|
|
|
bRet = !rSh.HasSelection();
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
throw uno::RuntimeException();
|
|
|
|
return bRet;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
sal_Bool SwXTextViewCursor::goLeft(sal_Int16 nCount, sal_Bool bExpand) throw( uno::RuntimeException )
|
|
|
|
{
|
2010-10-13 01:44:10 -05:00
|
|
|
SolarMutexGuard aGuard;
|
2000-09-18 16:15:01 +00:00
|
|
|
sal_Bool bRet = sal_False;
|
2009-06-03 11:26:39 +00:00
|
|
|
if(m_pView)
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2004-11-15 15:51:46 +00:00
|
|
|
if (!IsTextSelection())
|
|
|
|
throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "no text selection" ) ), static_cast < cppu::OWeakObject * > ( this ) );
|
|
|
|
|
2000-09-18 16:15:01 +00:00
|
|
|
for( sal_uInt16 i = 0; i < nCount; i++ )
|
2009-06-03 11:26:39 +00:00
|
|
|
bRet = m_pView->GetWrtShell().Left( CRSR_SKIP_CHARS, bExpand, 1, sal_True );
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
throw uno::RuntimeException();
|
|
|
|
return bRet;
|
|
|
|
}
|
|
|
|
|
|
|
|
sal_Bool SwXTextViewCursor::goRight(sal_Int16 nCount, sal_Bool bExpand) throw( uno::RuntimeException )
|
|
|
|
{
|
2010-10-13 01:44:10 -05:00
|
|
|
SolarMutexGuard aGuard;
|
2000-09-18 16:15:01 +00:00
|
|
|
sal_Bool bRet = sal_False;
|
2009-06-03 11:26:39 +00:00
|
|
|
if(m_pView)
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2004-11-15 15:51:46 +00:00
|
|
|
if (!IsTextSelection())
|
|
|
|
throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "no text selection" ) ), static_cast < cppu::OWeakObject * > ( this ) );
|
|
|
|
|
2000-09-18 16:15:01 +00:00
|
|
|
for( sal_uInt16 i = 0; i < nCount; i++ )
|
2009-06-03 11:26:39 +00:00
|
|
|
bRet = m_pView->GetWrtShell().Right( CRSR_SKIP_CHARS, bExpand, 1, sal_True );
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
throw uno::RuntimeException();
|
|
|
|
return bRet;
|
|
|
|
|
|
|
|
}
|
2010-10-12 02:05:03 -05:00
|
|
|
|
2000-10-16 08:08:13 +00:00
|
|
|
void SwXTextViewCursor::gotoRange(
|
2006-06-19 11:44:16 +00:00
|
|
|
const uno::Reference< text::XTextRange > & xRange,
|
2000-10-16 08:08:13 +00:00
|
|
|
sal_Bool bExpand)
|
|
|
|
throw(RuntimeException)
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2010-10-13 01:44:10 -05:00
|
|
|
SolarMutexGuard aGuard;
|
2009-06-03 11:26:39 +00:00
|
|
|
if(m_pView && xRange.is())
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2004-11-15 15:51:46 +00:00
|
|
|
if (!IsTextSelection())
|
|
|
|
throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "no text selection" ) ), static_cast < cppu::OWeakObject * > ( this ) );
|
|
|
|
|
2009-06-03 11:26:39 +00:00
|
|
|
SwUnoInternalPaM rDestPam(*m_pView->GetDocShell()->GetDoc());
|
2010-01-08 17:13:53 +01:00
|
|
|
if (!::sw::XTextRangeToSwPaM(rDestPam, xRange))
|
2010-01-20 16:59:56 +01:00
|
|
|
{
|
|
|
|
throw uno::RuntimeException();
|
|
|
|
}
|
2001-07-04 06:31:59 +00:00
|
|
|
|
2009-06-03 11:26:39 +00:00
|
|
|
ShellModes eSelMode = m_pView->GetShellMode();
|
|
|
|
SwWrtShell& rSh = m_pView->GetWrtShell();
|
2003-09-04 10:49:56 +00:00
|
|
|
// call EnterStdMode in non-text selections only
|
|
|
|
if(!bExpand ||
|
2007-09-27 11:43:56 +00:00
|
|
|
(eSelMode != SHELL_MODE_TABLE_TEXT &&
|
|
|
|
eSelMode != SHELL_MODE_LIST_TEXT &&
|
|
|
|
eSelMode != SHELL_MODE_TABLE_LIST_TEXT &&
|
|
|
|
eSelMode != SHELL_MODE_TEXT ))
|
2003-09-04 10:49:56 +00:00
|
|
|
rSh.EnterStdMode();
|
2000-09-18 16:15:01 +00:00
|
|
|
SwPaM* pShellCrsr = rSh.GetCrsr();
|
|
|
|
SwPaM aOwnPaM(*pShellCrsr->GetPoint());
|
|
|
|
if(pShellCrsr->HasMark())
|
|
|
|
{
|
|
|
|
aOwnPaM.SetMark();
|
|
|
|
*aOwnPaM.GetMark() = *pShellCrsr->GetMark();
|
|
|
|
}
|
|
|
|
|
2006-06-19 11:44:16 +00:00
|
|
|
uno::Reference<lang::XUnoTunnel> xRangeTunnel( xRange, uno::UNO_QUERY);
|
2001-07-20 09:40:14 +00:00
|
|
|
SwXTextRange* pRange = 0;
|
2003-09-04 10:49:56 +00:00
|
|
|
SwXParagraph* pPara = 0;
|
2003-04-01 14:43:48 +00:00
|
|
|
OTextCursorHelper* pCursor = 0;
|
2001-07-20 09:40:14 +00:00
|
|
|
if(xRangeTunnel.is())
|
|
|
|
{
|
2007-09-27 11:43:56 +00:00
|
|
|
pRange = reinterpret_cast<SwXTextRange*>(xRangeTunnel->getSomething(
|
|
|
|
SwXTextRange::getUnoTunnelId()));
|
|
|
|
pCursor = reinterpret_cast<OTextCursorHelper*>(xRangeTunnel->getSomething(
|
|
|
|
OTextCursorHelper::getUnoTunnelId()));
|
|
|
|
pPara = reinterpret_cast<SwXParagraph*>(xRangeTunnel->getSomething(
|
|
|
|
SwXParagraph::getUnoTunnelId()));
|
2001-07-20 09:40:14 +00:00
|
|
|
}
|
|
|
|
|
2000-09-18 16:15:01 +00:00
|
|
|
const sal_uInt16 nFrmType = rSh.GetFrmType(0,sal_True);
|
|
|
|
|
|
|
|
SwStartNodeType eSearchNodeType = SwNormalStartNode;
|
|
|
|
if(nFrmType & FRMTYPE_FLY_ANY)
|
|
|
|
eSearchNodeType = SwFlyStartNode;
|
|
|
|
else if(nFrmType &FRMTYPE_HEADER)
|
|
|
|
eSearchNodeType = SwHeaderStartNode;
|
|
|
|
else if(nFrmType & FRMTYPE_FOOTER)
|
|
|
|
eSearchNodeType = SwFooterStartNode;
|
|
|
|
else if(nFrmType & FRMTYPE_TABLE)
|
|
|
|
eSearchNodeType = SwTableBoxStartNode;
|
|
|
|
else if(nFrmType & FRMTYPE_FOOTNOTE)
|
|
|
|
eSearchNodeType = SwFootnoteStartNode;
|
|
|
|
|
|
|
|
const SwStartNode* pOwnStartNode = aOwnPaM.GetNode()->
|
|
|
|
FindSttNodeByType(eSearchNodeType);
|
|
|
|
|
|
|
|
const SwNode* pSrcNode = 0;
|
2003-04-01 14:43:48 +00:00
|
|
|
if(pCursor && pCursor->GetPaM())
|
2003-03-27 14:45:43 +00:00
|
|
|
{
|
2003-04-01 14:43:48 +00:00
|
|
|
pSrcNode = pCursor->GetPaM()->GetNode();
|
2003-03-27 14:45:43 +00:00
|
|
|
}
|
2010-01-08 17:13:52 +01:00
|
|
|
else if (pRange)
|
2003-03-27 14:45:43 +00:00
|
|
|
{
|
2010-01-08 17:13:52 +01:00
|
|
|
SwPaM aPam(pRange->GetDoc()->GetNodes());
|
|
|
|
if (pRange->GetPositions(aPam))
|
|
|
|
{
|
|
|
|
pSrcNode = aPam.GetNode();
|
|
|
|
}
|
2003-03-27 14:45:43 +00:00
|
|
|
}
|
CWS-TOOLING: integrate CWS odfmetadata2
2009-06-22 11:48:36 +0200 mst r273206 : - connectivity/source/drivers/mozab/mozillasrc/MNSInclude.hxx:
+ add "include ustrbuf.hxx" to work around warning caused by
solaris <sys/kstat.h> declaring a global "long l ;"
2009-06-19 14:25:25 +0200 mst r273159 : - scp2/source/ooo/file_library_ooo.scp:
+ fix MinGW build
2009-06-08 12:52:33 +0200 mst r272727 : - redland/raptor-1.4.18.patch.mingw, redland/raptor/makefile.mk:
+ disable parsers that do not build on MinGW (thanks for patch by tono)
2009-05-15 17:31:07 +0200 mst r271957 : fix typos
2009-05-15 17:28:57 +0200 mst r271956 : #i101965#
- offapi/com/sun/star/text/TextPortion:
+ add missing properties:
SoftPageBreak, DocumentIndexMark, ReferenceMark, Footnote, TextField
+ fix read-only status of properties: Bookmark, IsStart, IsCollapsed
- offapi/type_reference/{typelibrary_history.txt,types.rdb}:
+ update reference types.rdb
2009-05-07 14:41:38 +0200 mst r271669 : - sw/inc/{fmtftn.hxx,unocoll.hxx,doc.hxx,editsh.hxx,ftninfo.hxx},
sw/source/core/layout/{flowfrm.cxx,ftnfrm.cxx},
sw/source/core/doc/docftn.cxx, sw/source/core/edit/edattr.cxx,
sw/source/core/txtnode/atrftn.cxx, sw/source/core/unocore/unocoll.cxx,
sw/source/ui/fldui/fldref.cxx:
+ fix warning ... the hard way
+ also fix signature of SwDoc::SetCurFtn
2009-05-05 19:52:55 +0200 mst r271556 : - sw/inc/undobj.hxx:
+ make some members const
2009-05-05 19:34:40 +0200 mst r271555 : - sw/inc/rolbck.hxx, sw/source/core/undo/rolbck.cxx:
+ make some members const
2009-05-05 19:13:14 +0200 mst r271553 : - sw/inc/{undobj.hxx,rolbck.hxx},
sw/source/core/undo/{unbkmk.cxx,rolbck.cxx}:
+ fix rebase merge error
+ rename SwHstryBookmark to SwHistoryBookmark
+ clean up SwUndoBookmark
2009-05-05 19:05:53 +0200 mst r271552 : - sw/source/core/unocore/unoportenum.cxx:
+ fix annoying assertion
2009-05-05 15:34:48 +0200 mst r271522 : CWS-TOOLING: rebase CWS odfmetadata2 to trunk@271427 (milestone: DEV300:m47)
2009-05-04 12:37:01 +0200 mst r271444 : trivial
2009-04-22 13:30:37 +0200 mst r271102 : - sfx2/inc/sfx2/dinfdlg.hxx:
+ trivial change
2009-04-21 16:46:58 +0200 mst r271043 : - sw/inc/hintids.hxx:
+ introduce some predicates for the various hints, and use them
2009-04-21 16:19:03 +0200 mst r271041 : - sw/inc/undobj.hxx,
sw/source/core/doc/{docfly.cxx,docfmt.cxx,docftn.cxx,doctxm.cxx},
sw/source/core/undo/{unattr.cxx,unins.cxx}:
+ clean up unattr.cxx:
remove/fix casts, prefix members, use auto_ptr, etc.
2009-04-21 15:34:23 +0200 mst r271039 : - sw/inc/{rolbck.hxx,undobj.hxx},
sw/source/core/doc/docfmt.cxx,
sw/source/core/txtnode/{thints.cxx,txtedt.cxx},
sw/source/core/undo/{rolbck.cxx,undel.cxx,undobj.cxx,unins.cxx,unmove.cxx,
unovwr.cxx,unsect.cxx,unspnd.cxx,untbl.cxx,untblk.cxx,unattr.cxx}:
+ clean up SwHistory, SwRegHistory and SwHistoryHint etc.:
remove/fix casts, prefix members, remove wrong const annotations,
use auto_ptr, remove unused members, etc.
2009-04-20 19:17:36 +0200 mst r271013 : - sw/inc/ndhints.hxx,
sw/source/core/text/{itrtxt.cxx,txtftn.cxx,itratr.cxx,porfly.cxx,
txtfrm.cxx,txtdrop.cxx,frmform.cxx},
sw/source/core/txtnode/{ndtxt.cxx,ndhints.cxx,thints.cxx,txtedt.cxx},
sw/source/core/edit/acorrect.cxx,
sw/source/core/doc/{docedt.cxx,docfmt.cxx},
sw/source/filter/html/swhtml.cxx:
+ clean up SwHintsArray and its subclasses: remove/fix casts, prefix members
2009-04-20 18:42:07 +0200 mst r271007 : - sw/source/core/text/txtio.cxx, sw/source/core/edit/edattr.cxx,
sw/source/core/undo/rolbck.cxx:
+ remove JP_NEWCORE dead code
2009-04-20 18:38:09 +0200 mst r271006 : - sw/source/core/unocore/unochart.cxx:
+ silence unxlngi warning (debug=t)
2009-04-20 16:36:13 +0200 mst r270991 : - sfx2/inc/sfx2/dinfdlg.hxx, sfx2/source/dialog/dinfdlg.cxx,
sfx2/source/doc/objserv.cxx, sw/source/ui/fldui/flddinf.hxx:
+ trivial cleanups
2009-04-20 15:28:52 +0200 mst r270990 : - sfx2/inc/sfx2/dinfdlg.hxx, sfx2/source/dialog/dinfdlg.cxx,
sfx2/source/doc/objserv.cxx:
+ fix bug: replaying a macro with a DocumentInfoItem removes all
user-defined properties
2009-03-10 15:08:20 +0100 mst r269273 : - sfx2/source/doc/Metadatable.cxx:
+ add missing SolarMutex guards
2009-03-10 14:46:29 +0100 mst r269272 : - unoxml/source/rdf/librdf_repository.cxx:
+ never free rdf_world because that would call libxm2 xmlCleanupParser
(and, to add insult to injury, other libxml2 functions later...)
2009-03-06 19:02:44 +0100 mst r269041 : argh! undo...
2009-03-06 19:00:58 +0100 mst r269040 : fix #i99931#
- sw/source/ui/uno/unomod.cxx:
+ SwXViewSettings::_getSingleValue returns uninitialized memory
for the ZoomType property if the value is PAGE_WIDTH_EXACT
2009-03-06 18:59:28 +0100 mst r269039 : - sw/inc/ndtxt.hxx, sw/source/core/txtnode/ndtxt.cxx,
sw/source/core/unocore/unoportenum.cxx:
+ fix some more wntmsci12 warnings...
2009-03-06 18:56:46 +0100 mst r269038 : - sd/source/ui/slidesorter/model/SlsPageEnumerationProvider.cxx:
+ work around spurious warning on unxsoli4 debug=t
2009-03-05 14:02:01 +0100 mst r268902 : - sw/inc/txatbase.hxx:
+ back to c-style casts, they also compile on wntmsci12...
2009-03-05 10:23:25 +0100 mst r268882 : - comphelper/inc/comphelper/processfactory.hxx,
comphelper/source/processfactory/processfactory.cxx:
+ revert change of return type of comphelper_getProcessComponentContext
to Reference: does not build on wntmsci12
2009-03-04 19:08:09 +0100 mst r268861 : - sw/source/core/txtnode/{atrtox.cxx,ndtxt.cxx}:
+ fix initialization
2009-03-04 14:37:30 +0100 mst r268831 : - solenv/inc/target.mk:
+ fix CLASSPATH so complex tests run (fix by sb)
2009-03-04 14:36:30 +0100 mst r268830 : - sw/inc/unoobj.hxx,
sw/source/core/unocore/{unoparagraph.cxx,unoobj.cxx,unoobj2.cxx}:
+ SwXParaFrameEnumeration constructor now takes SwPaM, not SwUnoCrsr
+ move SwParaSelection into unoparagraph.cxx, as it is only used there
+ bugfix: replace SwUnoCrsrs on stack with SwCursors
2009-03-04 14:34:46 +0100 mst r268829 : - sw/inc/pam.hxx, sw/source/core/crsr/pam.cxx,
sw/source/core/edit/eddel.cxx, sw/source/core/doc/docredln.cxx,
sw/source/core/undo/{untbl.cxx,undel.cxx}, sw/source/filter/rtf/swparrtf.cxx:
+ clean up SwPaM: prefix members
+ new constructor SwPosition(SwCntntNode&, xub_StrLen)
+ fix several broken SwPosition and SwPaM constructors
+ SwPam::DeleteMark now actually resets the unused position to default
2009-03-02 12:07:09 +0100 mst r268646 : - sw/inc/fmtcol.hxx:
+ fix annoying warning (gcc 4)
2009-03-02 12:06:27 +0100 mst r268645 : - odk/util/check.pl, odk/examples/DevelopersGuide/Text/TextDocuments.java:
+ rename module from FieldMaster to fieldmaster
2009-02-27 19:49:56 +0100 mst r268614 : - sfx2/inc/sfx2/Metadatable.hxx, sfx2/prj/d.lst,
sfx2/source/doc/{Metadatable.cxx,makefile.mk},
sw/inc/{SwMetadatable.hxx,unoobj.hxx,undobj.hxx,ndtxt.hxx},
sw/source/core/doc/{SwMetadatable.cxx,makefile.mk,docnew.cxx},
sw/source/core/undo/{untbl.cxx,unins.cxx},
sw/source/core/unocore/unoparagraph.cxx, sw/source/ui/app/docsh.cxx:
+ move Metadatable implementation from sw to sfx2
2009-02-27 17:58:55 +0100 mst r268608 : - sw/inc/{SwMetadatable.hxx,undobj.hxx}, sw/source/core/doc/SwMetadatable.cxx,
sw/source/core/undo/{untbl.cxx,unins.cxx,undel.cxx}:
+ CreateUndo now returns an opaque MetadatableUndo object
2009-02-27 13:15:44 +0100 mst r268587 : - sw/inc/ndtxt.hxx, sw/source/core/doc/docfmt.cxx,
sw/source/core/text/{itratr.cxx,porlay.cxx},
sw/source/core/txtnode/{txtedt.cxx,ndtxt.cxx,thints.cxx}:
+ clean up SwTxtNode: fix casts, prefix members
+ factor out inline function SwTxtNode::TryDeleteSwpHints()
2009-02-27 13:14:30 +0100 mst r268586 : - svx/inc/svx/emphitem.hxx:
+ fix borken header guard
2009-02-27 13:13:56 +0100 mst r268585 : - sfx2/source/bastyp/progress.cxx:
+ fix use of compiler specific macro
2009-02-27 11:00:32 +0100 mst r268564 : - sw/inc/{txatbase.hxx,txtatr.hxx,txtinet.hxx,txtfld.hxx,txtftn.hxx,
txtflcnt.hxx,txttxmrk.hxx,txtrfmrk.hxx},
sw/source/core/txtnode/{atrtox.cxx,atrref.cxx,atrflyin.cxx,atrftn.cxx,
txtatr2.cxx,txatbase.cxx,atrfld.cxx,txtedt.cxx},
sw/source/core/text/atrstck.cxx, sw/source/core/access/acchyperlink.cxx,
sw/source/core/doc/visiturl.cxx, sw/source/ui/wrtsh/wrtsh2.cxx:
+ clean up SwTxtAttr and its subclasses: remove/fix casts, prefix members
+ SwTxtINetFmt: remove unused member bColor
- sw/source/core/text/txtfld.cxx:
+ move SwTxtFld methods to atrfld.cxx
2009-02-27 10:58:44 +0100 mst r268563 : - sfx2/inc/sfx2/sfxbasemodel.hxx:
+ don't privately inherit BaseMutex, ScModelObj wants to access it
2009-02-27 10:58:02 +0100 mst r268562 : - xmloff/source/core/{RDFaExportHelper.cxx,RDFaImportHelper.cxx}:
+ arrrgh!!! someone thought it would be a good idea to have 2 different
versions of boost in external! and they're NOT compatible!!!
insert an ugly fragile hack that maybe works with both...
2009-02-26 17:42:26 +0100 mst r268544 : - comphelper/inc/comphelper/storagehelper.hxx.
sfx2/source/doc/DocumentMetadataAccess.cxx:
+ someone made IsValidZipEntryFileName a static method and didn't tell me
2009-02-26 15:52:56 +0100 mst r268529 : redland: split up patches
2009-02-26 13:17:56 +0100 mst r268509 : migration of cws odfmetadata2 from CVS (resync to m42): module sw
#i95863#
- sw/inc/segdefs{,_}.hxx:
+ remove obsolete files
- sw/source/ui/inc/itemdef.hxx:
+ remove itemdef.hxx
- sw/source/ui/app/[apphdl.cxx,docsh.cxx}, sw/source/ui/misc/glshell.cxx,
sw/source/ui/shells/*.cxx, sw/source/ui/uiview/*.cxx, sw/source/ui/web/*.cxx:
+ use sfx2/msg.hxx instead of itemdef.hxx
- sw/source/core/edit/eddel.cxx:
+ @ JP: SwEditShell::Replace:
you're right, deleting the text to be replaced first, and then inserting
a space, and then replacing that space is unnecessary.
whew, i'm so happy that we finally answered that question after 11 years.
- sw/inc/edimp.hxx:
+ remove FOREACHCURSOR_START, FOREACHCURSOR_END
- sw/inc/{swcrsr.hxx,unocrsr.hxx,viscrs.hxx},
sw/source/core/crsr/{crsrsh.cxx,swcrsr.cxx,trvlreg.cxx,trvltbl.cxx,
unocrsr.cxx,viscrs.cxx},
sw/source/core/doc/{docbm.cxx,doccorr.cxx},
sw/source/core/docnode/{ndtbl.cxx,ndtbl1.cxx},
sw/source/core/edit/editsh.cxx,
sw/source/core/frmedt/{fefly1.cxx,fetab.cxx,tblsel.cxx},
sw/source/core/layout/trvlfrm.cxx,
sw/source/core/unocore/{unochart.cxx,unoobj2.cxx,unoparagraph.cxx,
unoportenum.cxx,unotbl.cxx},
sw/source/core/view/vprint.cxx:
+ remove the hideous virtual operator SwFooCursor*
+ make SwCursor::IsReadOnlyAvailable() virtual
+ make SwUnoCrsr::Clone() virtual
+ refactor SwCursor methods IsSelOver(), LeftRight(), UpDown(), GotoTable():
replace dynamic_cast<...>(this) with new virtual methods
2009-02-26 13:14:58 +0100 mst r268508 : migration of cws odfmetadata2 from CVS (resync to m42): module sw
- sw/source/filter/xml/swxml.cxx:
+ XMLReader::Read: load RDF metadata of the ODF document
- sw/source/filter/xml/wrtxml.cxx:
+ SwXMLWriter::_Write: write RDF metadata of the ODF document if ODF >= 1.2
#i90620#: import xml:id in text tables (does not actually work yet)
- sw/source/filter/xml/xmltbli{.hxx,.cxx}:
+ SwXMLTableCellAttrTokens,aTableCellAttrTokenMap: add XML_TOK_TABLE_XMLID
+ SwXMLTableCellContext_Impl::SwXMLTableCellContext_Impl: attribute xml:id
+ SwXMLTableCellContext_Impl::CreateChildContext: attribute xml:id
+ SwXMLTableColContext_Impl::SwXMLTableColContext_Impl: attribute xml:id
+ SwXMLTableContext::SwXMLTableContext: attribute xml:id
fix #i98530#
- sw/inc/unoport.hxx, sw/source/core/unocore/unoport.cxx:
+ SwXTextPortion: make constructor params const&
- sw/source/core/unocore/unoportenum.cxx:
+ refactor to remove some code duplication
+ fix bug: paragraph w/out hints: bookmark before frame gets lost
#i97274# handle invalid tables
- sw/source/core/layout/tabfrm.cxx, sw/source/filter/xml/xmltbli.cxx:
+ SwXMLTableContext::MakeTable():
check that the table actually contains cells,
and abort (removing the inserted table nodes) if not
2009-02-26 13:11:48 +0100 mst r268507 : migration of cws odfmetadata2 from CVS (resync to m42): module sw
refactor SwXTextRange and SwXParagraph
- sw/inc/unoobj.hxx, sw/source/core/unocore/unoobj2.cxx:
+ remove 3 constructors of SwXTextRange
+ new method SwXTextRange::CreateParentXText
+ refactor SwXTextRange::CreateTextRangeFromPosition and
SwXTextRange::getText
- sw/inc/unoobj.hxx, sw/source/core/unocore/unoparagraph.cxx:
+ SwXParagraph no longer uses a cursor; it registers directly at SwTxtNode
+ replace SwXParagraph::GetCrsr with SwXParagraph::GetTxtNode
- sw/source/core/unocore/unotext.cxx, sw/source/ui/uno/unotxvw.cxx:
+ adapt to new SwXParagraph
#i90620#
- sw/inc/SwMetadatable.hxx,
sw/source/core/doc/SwMetadatable.cxx:
+ new files: base classes sw::Metadatable and sw::MetadatableMixin;
also, 2 implementations of IXmlIdRegistry:
sw::XmlIdRegistryDocument and sw::XmlIdRegistryClipboard
+ setMetadataReference: handle empty stream name as auto-detect
- sw/source/core/doc/makefile.mk:
+ add SwMetadatable
add a XmlIdRegistry to SwDoc
- sw/inc/doc.hxx:
+ SwDoc: add member m_pXmlIdRegistry, method GetXmlIdRegistry()
- sw/source/core/doc/docnew.cxx:
+ initialize XmlIdRegistry in SwDoc::GetXmlIdRegistry, not in constructor,
because the constructor is not told whether the SwDoc is a clipboard
- sw/inc/docsh.hxx, sw/source/ui/app/docsh.cxx:
+ SwDocShell: override GetXmlIdRegistry()
#i91563#: make the SwTxtNode metadatable
- sw/inc/ndtxt.hxx
+ SwTxtNode inherits sw::Metadatable
- sw/inc/unoobj.hxx, sw/source/core/unocore/unoparagraph.cxx:
+ SwXParagraph inherits sw::MetadatableMixin
#i91563#: handle SwTxtNode's metadata for delete
- sw/source/core/txtnode/ndtxt.cxx:
+ SwTxtNode::SplitCntntNode: handle XmlId
+ SwTxtNode::JoinNext: merge XmlIds
- sw/source/core/doc/docedt.cxx:
+ lcl_GetJoinFlags: document postcondition
+ SwDoc::Delete: remove XmlId only if SwTxtNode _becomes_ empty
#i91563#: handle SwTxtNode's metadata for delete with undo
- sw/inc/undobj.hxx
+ SwUndoDelete: new members m_pMetadataUndoStart, m_pMetadataUndoEnd
- sw/source/core/undo/undel.cxx:
+ SwUndoDelete::SaveCntnt: save XmlIds for start and end SwTxtNode
+ SwUndoDelete::SaveCntnt: remove XmlId only if SwTxtNode _becomes_ empty
+ SwUndoDelete::Undo: restore saved XmlIds for start and end SwTxtNode
- sw/source/core/docnode/ndcopy.cxx:
+ SwTxtNode::MakeCopy: register copy at XmlIdRegistry
#i91563#: handle SwTxtNode's metadata for find/replace with undo
- sw/source/core/undo/unins.cxx:
+ _UnReplaceData: rename members: add prefix m_
+ _UnReplaceData: new members m_pMetadataUndoStart, m_pMetadataUndoEnd
+ _UnReplaceData::_UnReplaceData: save XmlIds for start and end SwTxtNode
+ _UnReplaceData::Undo: restore saved XmlIds for start and end SwTxtNode
#i91563#: handle SwTxtNode's metadata for table-to-text with undo
- sw/source/core/undo/untbl.cxx:
+ SwTblToTxtSave: rename members: add prefix m_
+ SwTblToTxtSave: new members m_pMetadataUndoStart, m_pMetadataUndoEnd
+ SwTblToTxtSave::SwTblToTxtSave: save XmlIds for start and end SwTxtNode
+ SwTblToTxtSave::SwTblToTxtSave, SwNodes::UndoTableToText:
always store the index of the first SwTxtNode in the cell, instead of
the index of the first SwTxtNode in case of the first cell in a row,
and the cell start node in other cases
+ SwNodes::UndoTableToText: restore saved XmlIds for start and end SwTxtNode
- sw/source/core/docnode/ndtbl.cxx:
+ lcl_DelBox: simplify for refactored start index handling in SwTblToTxtSave
2009-02-26 13:02:28 +0100 mst r268505 : migration of cws odfmetadata2 from CVS (resync to m42): module sd
- sd/source/ui/table/tableobjectbar.cxx,sd/source/ui/view/*.cxx:
+ remove invocations of SFX_DECL_TYPE
- sd/source/ui/slideshow/SlideShowRestarter.cxx,
sd/source/ui/toolpanel/LayoutMenu.cxx,
sd/source/ui/unoidl/DrawController.cxx,
sd/source/ui/view/{ViewShellBase.cxx,ViewTabBar.cxx,frmview.cxx}:
+ fix abuses of comphelper_getProcessComponentContext (missing release)
2009-02-26 13:01:24 +0100 mst r268504 : migration of cws odfmetadata2 from CVS (resync to m42): module starmath
- starmath/source/document.cxx:
+ don't touch SfxObjectShell's privates
2009-02-26 13:00:37 +0100 mst r268503 : migration of cws odfmetadata2 from CVS (resync to m42): module sfx2
#i90620#
- sfx2/inc/sfx2/XmlIdRegistry.hxx:
+ new file: interfaces sfx2::IXmlIdRegistry and sfx2::IXmlIdRegistrySupplier
and a couple of utility functions
- sfx2/inc/sfx2/DocumentMetadataAccess.hxx,
sfx2/source/doc/DocumentMetadataAccess.cxx:
+ new class sfx2::DocumentMetadataAccess, implements XDocumentMetadataAccess
+ the URI of the DocumentMetadataAccess is now the URI from which the
document was loaded; for a new document, use a vnd.sun.star.tdoc URI
+ add new function sfx2::createBaseURI()
+ prevent using reserved file names
+ try not to recurse into embedded subdocuments
- sfx2/source/doc/makefile.mk:
+ add DocumentMetadataAccess
- sfx2/util/makefile.mk:
+ link libsfx2 against libxml2 (needed for xmlValidateNCName)
- sfx2/source/doc/makefile.mk:
+ add LIBXML_CFLAGS to CFLAGS
- sfx2/prj/build.lst:
+ add dependence on libxml2
- sfx2/prj/d.lst:
+ add XmlIdRegistry.hxx, DocumentMetadataAccess.hxx
- sfx2/inc/sfx2/objsh.hxx, sfx2/source/doc/objxtor.cxx:
+ make SfxObjectShell's members private
+ new method SfxObjectShell::GetAutoStyleFilterIndex
+ SfxObjectShell inherits sfx2::IXmlIdRegistrySupplier
- sfx2/source/dialog/templdlg.cxx, sfx2/source/doc/sfxbasemodel.cxx:
+ don't touch SfxObjectShell's privates
- sfx2/inc/sfx2/sfxbasemodel.hxx, sfx2/source/doc/sfxbasemodel.cxx:
+ SfxBaseModel inherits BaseMutex instead of IMPL_SfxBaseModel_MutexContainer
+ SfxBaseModel implements additional interface XDocumentMetadataAccess
+ IMPL_SfxBaseModel_DataContainer has new member:
a sfx2::DocumentMetadataAccess
+ implementation of XDocumentMetadataAccess forwards to
the sfx2::DocumentMetadataAccess member
- sfx2/qa/complex/DocumentMetadataAccessTest.java,
sfx2/qa/complex/{tests.sce,makefile.mk},
sfx2/qa/complex/testdocuments/TESTRDFA.odt:
+ add complex test: DocumentMetadataAccessTest
+ add RDFa test document
#i95863#
- sfx2/inc/sfx2/dinfdlg.hxx, sfx2/source/dialog/dinfdlg.cxx:
+ refactor SfxDocumentItem so it no longer requires a XDocumentInfo
+ move struct CustomProperty to implementation file
+ remove class SfxDocumentUserPage
+ QueryValue,PutValue: remove MID_DOCINFO_FIELD*
- sfx2/source/doc/objserv.cxx:
+ adapt to SfxDocumentItem change
- sfx2/inc/sfx2/sfx.hrc, sfx2/sdi/sfxslots.sdi, sfx2/inc/sfx2/msg.hxx:
+ remove MID_DOCINFO_FIELD*
+ put all invocations of SFX_DECL_TYPE in msg.hxx, and undef SFX_DECL_TYPE
- sfx2/source/doc/objxtor.cxx:
+ fix abuses of comphelper_getProcessComponentContext (missing release)
- sfx2/source/doc/docfile.cxx:
+ SfxMedium::SfxMedium: don't dereference NULL, throw exception instead
- sfx2/source/doc/objstor.cxx:
+ SfxObjectShell::DoLoad: fix bug: DocumentBaseURI is not initialized
2009-02-26 12:58:07 +0100 mst r268502 : migration of cws odfmetadata2 from CVS (resync to m42): module xmloff
#i90620#: implement RDFa import (interface change)
- xmloff/inc/xmloff/xmlimp.hxx. xmloff/source/core/xmlimp.cxx:
+ make SvXMLImport::GetAbsoluteReference() const
+ add SvXMLImport::GetComponentContext()
+ SvXMLImport::_InitCtor(): add RDFa namespace
+ add SvXMLImport::AddRDFa()
+ SvXMLImport::endDocument() inserts RDFa into document repository
- xmloff/inc/xmloff/xmltoken.hxx, xmloff/source/core/xmltoken.cxx:
+ new tokens for RDFa: XML_ABOUT, XML_DATATYPE
- xmloff/inc/RDFaImportHelper.hxx, xmloff/source/core/RDFaImportHelper.cxx:
+ new class RDFaImportHelper
+ adapt the code to the bleak reality of broken C++ implementations
+ handle empty xhtml:about attributes properly, which are actually
valid relative URIs
+ work around broken SvXMLImport::GetAbsoluteReference
- xmloff/source/core/makefile.mk:
+ add RDFaImportHelper.cxx
#i90620#: implement RDFa export
- xmloff/inc/xmloff/xmlexp.hxx, xmloff/source/core/xmlexp.cxx:
+ add SvXMLExport::EnsureNamespace(), and a stack of namespace maps
+ add SvXMLExport::GetComponentContext()
+ add SvXMLExport::AddAttributesRDFa()
- xmloff/inc/RDFaExportHelper.hxx, xmloff/source/core/RDFaExportHelper.cxx:
+ new class RDFaExportHelper
+ don't use std::map::data_type, which is actually called
std::map::mapped_type by libstdc++
- xmloff/source/core/makefile.mk:
+ add RDFaExportHelper.cxx
#i91563#
- xmloff/inc/xmloff/txtimp.hxx, xmloff/source/text/txtimp.cxx:
+ XMLTextPAttrTokens: add RDFa tokens
- xmloff/source/text/txtparai{.hxx,.cxx}:
+ import RDFa for text:p
- xmloff/source/text/txtparae.cxx:
+ export RDFa for text:p
interface change: use XHTML namespace instead of RDFA
- xmloff/inc/xmlnmspe.hxx, xmloff/inc/xmloff/xmltoken.hxx,
xmloff/source/core/{xmltoken.cxx,xmlimp.cxx,xmlexp.cxx,RDFaExportHelper.cxx},
xmloff/source/text/txtimp.cxx:
+ use XHTML namespace instead of RDFA
#i91565#, #i91566#: (preliminary) import for text:meta, text:meta-field
- xmloff/source/text/txtparai.cxx:
+ new class XMLMetaImportContextBase with subclasses to import
text:meta and text:meta-field
- xmloff/source/text/XMLTextMarkImportContext.cxx:
+ change XMLTextMarkImportContext::CreateAndInsertMark to handle marks
with no name (text:meta)
#i91565#, #i91566#: (preliminary) export for text:meta, text:meta-field
- xmloff/inc/txtflde.hxx, xmloff/source/text/txtflde.cxx:
+ add FIELD_ID_META to FieldIdEnum
+ new method XMLTextFieldExport::ExportMetaField()
+ change XMLTextFieldExport::ExportField{,AutoStyle,Helper}
to take additional parameter for progress bar
- xmloff/inc/xmloff/txtparae.hxx, xmloff/source/text/txtparae.cxx:
+ make XMLTextParagraphExport::exportTextRangeEnumeration() public
+ new method XMLTextParagraphExport::exportMeta()
#i90620#
- xmloff/inc/xmloff/xmlimp.hxx, xmloff/source/core/xmlimp.cxx,
xmloff/inc/xmloff/xmlexp.hxx, xmloff/source/core/xmlexp.cxx:
+ rename SvXML{Im,Ex}port::GetStreamPath() to GetStreamName()
+ fix xml:id {im,ex}port for embedded documents and non-packages
+ adapt to API change: XMetadatable
#i90620# GRDDL
- xmloff/inc/xmlnmspe.hxx, xmloff/inc/xmloff/xmltoken.hxx,
xmloff/source/core/{xmltoken.cxx,xmlexp.cxx}:
+ add GRDDL namespace
+ add token XML_TRANSFORMATION
+ add grddl:transformation attribute to root elements for meta.xml,
content.xml and styles.xml
2009-02-26 12:54:40 +0100 mst r268501 : migration of cws odfmetadata2 from CVS (resync to m42): module unoxml
#i90620#
- unoxml/source/rdf/librdf_repository.cxx:
+ librdf_Repository::importGraph: allocate buffer sized length of stream
+ switch from one librdf_world per repository to a single static world
because redland has global variables with a brain-damaged life-cycle...
+ exportGraph: use new raptor 1.4.18 feature to disable writing
an xml:base attribute in RDF/XML files
- unoxml/source/rdf/librdf_repository.cxx:
unoxml/qa/complex/RDFRepositoryTest.java:
+ adapt to predicate is URI change
+ adapt to RDFa API change
+ adapt to API change: RDFa has multiple predicates...
+ adapt to API change: XMetadatable derives from XURI
+ allow xhtml:datatype without xhtml:content
+ adapt to API change: attribute MetadataReference is StringPair
- unoxml/source/rdf/CURI.cxx:
+ add some more URI constants
2009-02-26 12:53:32 +0100 mst r268500 : migration of cws odfmetadata2 from CVS (resync to m42): module package
- package/inc/ImplValidCharacters.hxx:
+ remove (moved to comphelper)
2009-02-26 12:52:49 +0100 mst r268499 : migration of cws odfmetadata2 from CVS (resync to m42): module comphelper
- comphelper/inc/comphelper/processfactory.hxx,
comphelper/source/processfactory/processfactory.cxx:
+ add getProcessComponentContext()
+ change return type of comphelper_getProcessComponentContext to Reference
- comphelper/inc/comphelper/stl_types.hxx:
+ add OUStringBufferAppender
+ add algorithm intersperse
- comphelper/source/misc/string.cxx:
+ rewrite convertCommaSeparated with intersperse and OUStringBufferAppender
- comphelper/inc/comphelper/stlunosequence.hxx:
+ fix bug: begin() on empty sequence != end()
2009-02-26 12:50:47 +0100 mst r268498 : migration of cws odfmetadata2 from CVS (resync to m42): module offapi
#i96209#
- offapi/com/sun/star/text/fieldmaster/*.idl:
+ rename module from FieldMaster to fieldmaster
- offapi/type_reference/{typelibrary_history.txt,types.rdb}:
+ update reference types.rdb
#i90620#
- offapi/com/sun/star/rdf/{XMetadatable.idl,XDocumentMetadataAccess.idl}:
+ API change: XMetadatable derives from XURI
+ API change: replace XmlId (string) with MetadataReference (StringPair)
- offapi/com/sun/star/rdf/{Statement.idl,XDocumentRepository.idl,
XNamedGraph.idl,XRepository.idl}:
+ the predicate of a statement is a URI, not a Resource
- offapi/com/sun/star/rdf/XDocumentMetadataAccess.idl:
+ rename: s/Package/Document/
+ remove uuid
+ remove everything related to mapping
+ graph names are now generated from base URI and file names
+ load methods: improve error handling with XInteractionHandler
- offapi/com/sun/star/rdf/XDocumentRepository.idl:
+ change: RDFa permits using multiple predicates in one attribute
+ setStatementRDFa: subject is now XResource, object is now XMetadatable
- offapi/com/sun/star/rdf/URIs.idl:
+ add some more URI constants
- offapi/com/sun/star/rdf:
+ fix @since tags and replace <method> with <member>
2009-02-26 12:47:24 +0100 mst r268497 : migration of cws odfmetadata2 from CVS (resync to m42): module redland
fix #i93768#
- redland/raptor-1.4.17.patch, redland/raptor/makefile.mk:
+ disable GRDDL parser to prevent call to libxslt
xsltSetDefaultSecurityPrefs, which breaks xmlhelp
- redland/raptor/makefile.mk, redland/raptor-1.4.17.patch,
redland/raptor-1.4.18.patch:
+ upgrade raptor to 1.4.18
+ deactivate serializer for RSS/Atom (does not build)
- redland/rasqal/makefile.mk, redland/rasqal-0.9.15.patch,
redland/rasqal-0.9.16.patch,
+ upgrade rasqal to 0.9.16
- redland/redland/makefile.mk, redland/redland-1.0.7.patch,
redland/redland-1.0.8.patch:
+ upgrade redland to 1.0.8
- redland/redlandversion.mk:
+ the librasqal SONAME has changed
2009-07-02 09:05:03 +00:00
|
|
|
else if (pPara && pPara->GetTxtNode())
|
2003-09-04 10:49:56 +00:00
|
|
|
{
|
CWS-TOOLING: integrate CWS odfmetadata2
2009-06-22 11:48:36 +0200 mst r273206 : - connectivity/source/drivers/mozab/mozillasrc/MNSInclude.hxx:
+ add "include ustrbuf.hxx" to work around warning caused by
solaris <sys/kstat.h> declaring a global "long l ;"
2009-06-19 14:25:25 +0200 mst r273159 : - scp2/source/ooo/file_library_ooo.scp:
+ fix MinGW build
2009-06-08 12:52:33 +0200 mst r272727 : - redland/raptor-1.4.18.patch.mingw, redland/raptor/makefile.mk:
+ disable parsers that do not build on MinGW (thanks for patch by tono)
2009-05-15 17:31:07 +0200 mst r271957 : fix typos
2009-05-15 17:28:57 +0200 mst r271956 : #i101965#
- offapi/com/sun/star/text/TextPortion:
+ add missing properties:
SoftPageBreak, DocumentIndexMark, ReferenceMark, Footnote, TextField
+ fix read-only status of properties: Bookmark, IsStart, IsCollapsed
- offapi/type_reference/{typelibrary_history.txt,types.rdb}:
+ update reference types.rdb
2009-05-07 14:41:38 +0200 mst r271669 : - sw/inc/{fmtftn.hxx,unocoll.hxx,doc.hxx,editsh.hxx,ftninfo.hxx},
sw/source/core/layout/{flowfrm.cxx,ftnfrm.cxx},
sw/source/core/doc/docftn.cxx, sw/source/core/edit/edattr.cxx,
sw/source/core/txtnode/atrftn.cxx, sw/source/core/unocore/unocoll.cxx,
sw/source/ui/fldui/fldref.cxx:
+ fix warning ... the hard way
+ also fix signature of SwDoc::SetCurFtn
2009-05-05 19:52:55 +0200 mst r271556 : - sw/inc/undobj.hxx:
+ make some members const
2009-05-05 19:34:40 +0200 mst r271555 : - sw/inc/rolbck.hxx, sw/source/core/undo/rolbck.cxx:
+ make some members const
2009-05-05 19:13:14 +0200 mst r271553 : - sw/inc/{undobj.hxx,rolbck.hxx},
sw/source/core/undo/{unbkmk.cxx,rolbck.cxx}:
+ fix rebase merge error
+ rename SwHstryBookmark to SwHistoryBookmark
+ clean up SwUndoBookmark
2009-05-05 19:05:53 +0200 mst r271552 : - sw/source/core/unocore/unoportenum.cxx:
+ fix annoying assertion
2009-05-05 15:34:48 +0200 mst r271522 : CWS-TOOLING: rebase CWS odfmetadata2 to trunk@271427 (milestone: DEV300:m47)
2009-05-04 12:37:01 +0200 mst r271444 : trivial
2009-04-22 13:30:37 +0200 mst r271102 : - sfx2/inc/sfx2/dinfdlg.hxx:
+ trivial change
2009-04-21 16:46:58 +0200 mst r271043 : - sw/inc/hintids.hxx:
+ introduce some predicates for the various hints, and use them
2009-04-21 16:19:03 +0200 mst r271041 : - sw/inc/undobj.hxx,
sw/source/core/doc/{docfly.cxx,docfmt.cxx,docftn.cxx,doctxm.cxx},
sw/source/core/undo/{unattr.cxx,unins.cxx}:
+ clean up unattr.cxx:
remove/fix casts, prefix members, use auto_ptr, etc.
2009-04-21 15:34:23 +0200 mst r271039 : - sw/inc/{rolbck.hxx,undobj.hxx},
sw/source/core/doc/docfmt.cxx,
sw/source/core/txtnode/{thints.cxx,txtedt.cxx},
sw/source/core/undo/{rolbck.cxx,undel.cxx,undobj.cxx,unins.cxx,unmove.cxx,
unovwr.cxx,unsect.cxx,unspnd.cxx,untbl.cxx,untblk.cxx,unattr.cxx}:
+ clean up SwHistory, SwRegHistory and SwHistoryHint etc.:
remove/fix casts, prefix members, remove wrong const annotations,
use auto_ptr, remove unused members, etc.
2009-04-20 19:17:36 +0200 mst r271013 : - sw/inc/ndhints.hxx,
sw/source/core/text/{itrtxt.cxx,txtftn.cxx,itratr.cxx,porfly.cxx,
txtfrm.cxx,txtdrop.cxx,frmform.cxx},
sw/source/core/txtnode/{ndtxt.cxx,ndhints.cxx,thints.cxx,txtedt.cxx},
sw/source/core/edit/acorrect.cxx,
sw/source/core/doc/{docedt.cxx,docfmt.cxx},
sw/source/filter/html/swhtml.cxx:
+ clean up SwHintsArray and its subclasses: remove/fix casts, prefix members
2009-04-20 18:42:07 +0200 mst r271007 : - sw/source/core/text/txtio.cxx, sw/source/core/edit/edattr.cxx,
sw/source/core/undo/rolbck.cxx:
+ remove JP_NEWCORE dead code
2009-04-20 18:38:09 +0200 mst r271006 : - sw/source/core/unocore/unochart.cxx:
+ silence unxlngi warning (debug=t)
2009-04-20 16:36:13 +0200 mst r270991 : - sfx2/inc/sfx2/dinfdlg.hxx, sfx2/source/dialog/dinfdlg.cxx,
sfx2/source/doc/objserv.cxx, sw/source/ui/fldui/flddinf.hxx:
+ trivial cleanups
2009-04-20 15:28:52 +0200 mst r270990 : - sfx2/inc/sfx2/dinfdlg.hxx, sfx2/source/dialog/dinfdlg.cxx,
sfx2/source/doc/objserv.cxx:
+ fix bug: replaying a macro with a DocumentInfoItem removes all
user-defined properties
2009-03-10 15:08:20 +0100 mst r269273 : - sfx2/source/doc/Metadatable.cxx:
+ add missing SolarMutex guards
2009-03-10 14:46:29 +0100 mst r269272 : - unoxml/source/rdf/librdf_repository.cxx:
+ never free rdf_world because that would call libxm2 xmlCleanupParser
(and, to add insult to injury, other libxml2 functions later...)
2009-03-06 19:02:44 +0100 mst r269041 : argh! undo...
2009-03-06 19:00:58 +0100 mst r269040 : fix #i99931#
- sw/source/ui/uno/unomod.cxx:
+ SwXViewSettings::_getSingleValue returns uninitialized memory
for the ZoomType property if the value is PAGE_WIDTH_EXACT
2009-03-06 18:59:28 +0100 mst r269039 : - sw/inc/ndtxt.hxx, sw/source/core/txtnode/ndtxt.cxx,
sw/source/core/unocore/unoportenum.cxx:
+ fix some more wntmsci12 warnings...
2009-03-06 18:56:46 +0100 mst r269038 : - sd/source/ui/slidesorter/model/SlsPageEnumerationProvider.cxx:
+ work around spurious warning on unxsoli4 debug=t
2009-03-05 14:02:01 +0100 mst r268902 : - sw/inc/txatbase.hxx:
+ back to c-style casts, they also compile on wntmsci12...
2009-03-05 10:23:25 +0100 mst r268882 : - comphelper/inc/comphelper/processfactory.hxx,
comphelper/source/processfactory/processfactory.cxx:
+ revert change of return type of comphelper_getProcessComponentContext
to Reference: does not build on wntmsci12
2009-03-04 19:08:09 +0100 mst r268861 : - sw/source/core/txtnode/{atrtox.cxx,ndtxt.cxx}:
+ fix initialization
2009-03-04 14:37:30 +0100 mst r268831 : - solenv/inc/target.mk:
+ fix CLASSPATH so complex tests run (fix by sb)
2009-03-04 14:36:30 +0100 mst r268830 : - sw/inc/unoobj.hxx,
sw/source/core/unocore/{unoparagraph.cxx,unoobj.cxx,unoobj2.cxx}:
+ SwXParaFrameEnumeration constructor now takes SwPaM, not SwUnoCrsr
+ move SwParaSelection into unoparagraph.cxx, as it is only used there
+ bugfix: replace SwUnoCrsrs on stack with SwCursors
2009-03-04 14:34:46 +0100 mst r268829 : - sw/inc/pam.hxx, sw/source/core/crsr/pam.cxx,
sw/source/core/edit/eddel.cxx, sw/source/core/doc/docredln.cxx,
sw/source/core/undo/{untbl.cxx,undel.cxx}, sw/source/filter/rtf/swparrtf.cxx:
+ clean up SwPaM: prefix members
+ new constructor SwPosition(SwCntntNode&, xub_StrLen)
+ fix several broken SwPosition and SwPaM constructors
+ SwPam::DeleteMark now actually resets the unused position to default
2009-03-02 12:07:09 +0100 mst r268646 : - sw/inc/fmtcol.hxx:
+ fix annoying warning (gcc 4)
2009-03-02 12:06:27 +0100 mst r268645 : - odk/util/check.pl, odk/examples/DevelopersGuide/Text/TextDocuments.java:
+ rename module from FieldMaster to fieldmaster
2009-02-27 19:49:56 +0100 mst r268614 : - sfx2/inc/sfx2/Metadatable.hxx, sfx2/prj/d.lst,
sfx2/source/doc/{Metadatable.cxx,makefile.mk},
sw/inc/{SwMetadatable.hxx,unoobj.hxx,undobj.hxx,ndtxt.hxx},
sw/source/core/doc/{SwMetadatable.cxx,makefile.mk,docnew.cxx},
sw/source/core/undo/{untbl.cxx,unins.cxx},
sw/source/core/unocore/unoparagraph.cxx, sw/source/ui/app/docsh.cxx:
+ move Metadatable implementation from sw to sfx2
2009-02-27 17:58:55 +0100 mst r268608 : - sw/inc/{SwMetadatable.hxx,undobj.hxx}, sw/source/core/doc/SwMetadatable.cxx,
sw/source/core/undo/{untbl.cxx,unins.cxx,undel.cxx}:
+ CreateUndo now returns an opaque MetadatableUndo object
2009-02-27 13:15:44 +0100 mst r268587 : - sw/inc/ndtxt.hxx, sw/source/core/doc/docfmt.cxx,
sw/source/core/text/{itratr.cxx,porlay.cxx},
sw/source/core/txtnode/{txtedt.cxx,ndtxt.cxx,thints.cxx}:
+ clean up SwTxtNode: fix casts, prefix members
+ factor out inline function SwTxtNode::TryDeleteSwpHints()
2009-02-27 13:14:30 +0100 mst r268586 : - svx/inc/svx/emphitem.hxx:
+ fix borken header guard
2009-02-27 13:13:56 +0100 mst r268585 : - sfx2/source/bastyp/progress.cxx:
+ fix use of compiler specific macro
2009-02-27 11:00:32 +0100 mst r268564 : - sw/inc/{txatbase.hxx,txtatr.hxx,txtinet.hxx,txtfld.hxx,txtftn.hxx,
txtflcnt.hxx,txttxmrk.hxx,txtrfmrk.hxx},
sw/source/core/txtnode/{atrtox.cxx,atrref.cxx,atrflyin.cxx,atrftn.cxx,
txtatr2.cxx,txatbase.cxx,atrfld.cxx,txtedt.cxx},
sw/source/core/text/atrstck.cxx, sw/source/core/access/acchyperlink.cxx,
sw/source/core/doc/visiturl.cxx, sw/source/ui/wrtsh/wrtsh2.cxx:
+ clean up SwTxtAttr and its subclasses: remove/fix casts, prefix members
+ SwTxtINetFmt: remove unused member bColor
- sw/source/core/text/txtfld.cxx:
+ move SwTxtFld methods to atrfld.cxx
2009-02-27 10:58:44 +0100 mst r268563 : - sfx2/inc/sfx2/sfxbasemodel.hxx:
+ don't privately inherit BaseMutex, ScModelObj wants to access it
2009-02-27 10:58:02 +0100 mst r268562 : - xmloff/source/core/{RDFaExportHelper.cxx,RDFaImportHelper.cxx}:
+ arrrgh!!! someone thought it would be a good idea to have 2 different
versions of boost in external! and they're NOT compatible!!!
insert an ugly fragile hack that maybe works with both...
2009-02-26 17:42:26 +0100 mst r268544 : - comphelper/inc/comphelper/storagehelper.hxx.
sfx2/source/doc/DocumentMetadataAccess.cxx:
+ someone made IsValidZipEntryFileName a static method and didn't tell me
2009-02-26 15:52:56 +0100 mst r268529 : redland: split up patches
2009-02-26 13:17:56 +0100 mst r268509 : migration of cws odfmetadata2 from CVS (resync to m42): module sw
#i95863#
- sw/inc/segdefs{,_}.hxx:
+ remove obsolete files
- sw/source/ui/inc/itemdef.hxx:
+ remove itemdef.hxx
- sw/source/ui/app/[apphdl.cxx,docsh.cxx}, sw/source/ui/misc/glshell.cxx,
sw/source/ui/shells/*.cxx, sw/source/ui/uiview/*.cxx, sw/source/ui/web/*.cxx:
+ use sfx2/msg.hxx instead of itemdef.hxx
- sw/source/core/edit/eddel.cxx:
+ @ JP: SwEditShell::Replace:
you're right, deleting the text to be replaced first, and then inserting
a space, and then replacing that space is unnecessary.
whew, i'm so happy that we finally answered that question after 11 years.
- sw/inc/edimp.hxx:
+ remove FOREACHCURSOR_START, FOREACHCURSOR_END
- sw/inc/{swcrsr.hxx,unocrsr.hxx,viscrs.hxx},
sw/source/core/crsr/{crsrsh.cxx,swcrsr.cxx,trvlreg.cxx,trvltbl.cxx,
unocrsr.cxx,viscrs.cxx},
sw/source/core/doc/{docbm.cxx,doccorr.cxx},
sw/source/core/docnode/{ndtbl.cxx,ndtbl1.cxx},
sw/source/core/edit/editsh.cxx,
sw/source/core/frmedt/{fefly1.cxx,fetab.cxx,tblsel.cxx},
sw/source/core/layout/trvlfrm.cxx,
sw/source/core/unocore/{unochart.cxx,unoobj2.cxx,unoparagraph.cxx,
unoportenum.cxx,unotbl.cxx},
sw/source/core/view/vprint.cxx:
+ remove the hideous virtual operator SwFooCursor*
+ make SwCursor::IsReadOnlyAvailable() virtual
+ make SwUnoCrsr::Clone() virtual
+ refactor SwCursor methods IsSelOver(), LeftRight(), UpDown(), GotoTable():
replace dynamic_cast<...>(this) with new virtual methods
2009-02-26 13:14:58 +0100 mst r268508 : migration of cws odfmetadata2 from CVS (resync to m42): module sw
- sw/source/filter/xml/swxml.cxx:
+ XMLReader::Read: load RDF metadata of the ODF document
- sw/source/filter/xml/wrtxml.cxx:
+ SwXMLWriter::_Write: write RDF metadata of the ODF document if ODF >= 1.2
#i90620#: import xml:id in text tables (does not actually work yet)
- sw/source/filter/xml/xmltbli{.hxx,.cxx}:
+ SwXMLTableCellAttrTokens,aTableCellAttrTokenMap: add XML_TOK_TABLE_XMLID
+ SwXMLTableCellContext_Impl::SwXMLTableCellContext_Impl: attribute xml:id
+ SwXMLTableCellContext_Impl::CreateChildContext: attribute xml:id
+ SwXMLTableColContext_Impl::SwXMLTableColContext_Impl: attribute xml:id
+ SwXMLTableContext::SwXMLTableContext: attribute xml:id
fix #i98530#
- sw/inc/unoport.hxx, sw/source/core/unocore/unoport.cxx:
+ SwXTextPortion: make constructor params const&
- sw/source/core/unocore/unoportenum.cxx:
+ refactor to remove some code duplication
+ fix bug: paragraph w/out hints: bookmark before frame gets lost
#i97274# handle invalid tables
- sw/source/core/layout/tabfrm.cxx, sw/source/filter/xml/xmltbli.cxx:
+ SwXMLTableContext::MakeTable():
check that the table actually contains cells,
and abort (removing the inserted table nodes) if not
2009-02-26 13:11:48 +0100 mst r268507 : migration of cws odfmetadata2 from CVS (resync to m42): module sw
refactor SwXTextRange and SwXParagraph
- sw/inc/unoobj.hxx, sw/source/core/unocore/unoobj2.cxx:
+ remove 3 constructors of SwXTextRange
+ new method SwXTextRange::CreateParentXText
+ refactor SwXTextRange::CreateTextRangeFromPosition and
SwXTextRange::getText
- sw/inc/unoobj.hxx, sw/source/core/unocore/unoparagraph.cxx:
+ SwXParagraph no longer uses a cursor; it registers directly at SwTxtNode
+ replace SwXParagraph::GetCrsr with SwXParagraph::GetTxtNode
- sw/source/core/unocore/unotext.cxx, sw/source/ui/uno/unotxvw.cxx:
+ adapt to new SwXParagraph
#i90620#
- sw/inc/SwMetadatable.hxx,
sw/source/core/doc/SwMetadatable.cxx:
+ new files: base classes sw::Metadatable and sw::MetadatableMixin;
also, 2 implementations of IXmlIdRegistry:
sw::XmlIdRegistryDocument and sw::XmlIdRegistryClipboard
+ setMetadataReference: handle empty stream name as auto-detect
- sw/source/core/doc/makefile.mk:
+ add SwMetadatable
add a XmlIdRegistry to SwDoc
- sw/inc/doc.hxx:
+ SwDoc: add member m_pXmlIdRegistry, method GetXmlIdRegistry()
- sw/source/core/doc/docnew.cxx:
+ initialize XmlIdRegistry in SwDoc::GetXmlIdRegistry, not in constructor,
because the constructor is not told whether the SwDoc is a clipboard
- sw/inc/docsh.hxx, sw/source/ui/app/docsh.cxx:
+ SwDocShell: override GetXmlIdRegistry()
#i91563#: make the SwTxtNode metadatable
- sw/inc/ndtxt.hxx
+ SwTxtNode inherits sw::Metadatable
- sw/inc/unoobj.hxx, sw/source/core/unocore/unoparagraph.cxx:
+ SwXParagraph inherits sw::MetadatableMixin
#i91563#: handle SwTxtNode's metadata for delete
- sw/source/core/txtnode/ndtxt.cxx:
+ SwTxtNode::SplitCntntNode: handle XmlId
+ SwTxtNode::JoinNext: merge XmlIds
- sw/source/core/doc/docedt.cxx:
+ lcl_GetJoinFlags: document postcondition
+ SwDoc::Delete: remove XmlId only if SwTxtNode _becomes_ empty
#i91563#: handle SwTxtNode's metadata for delete with undo
- sw/inc/undobj.hxx
+ SwUndoDelete: new members m_pMetadataUndoStart, m_pMetadataUndoEnd
- sw/source/core/undo/undel.cxx:
+ SwUndoDelete::SaveCntnt: save XmlIds for start and end SwTxtNode
+ SwUndoDelete::SaveCntnt: remove XmlId only if SwTxtNode _becomes_ empty
+ SwUndoDelete::Undo: restore saved XmlIds for start and end SwTxtNode
- sw/source/core/docnode/ndcopy.cxx:
+ SwTxtNode::MakeCopy: register copy at XmlIdRegistry
#i91563#: handle SwTxtNode's metadata for find/replace with undo
- sw/source/core/undo/unins.cxx:
+ _UnReplaceData: rename members: add prefix m_
+ _UnReplaceData: new members m_pMetadataUndoStart, m_pMetadataUndoEnd
+ _UnReplaceData::_UnReplaceData: save XmlIds for start and end SwTxtNode
+ _UnReplaceData::Undo: restore saved XmlIds for start and end SwTxtNode
#i91563#: handle SwTxtNode's metadata for table-to-text with undo
- sw/source/core/undo/untbl.cxx:
+ SwTblToTxtSave: rename members: add prefix m_
+ SwTblToTxtSave: new members m_pMetadataUndoStart, m_pMetadataUndoEnd
+ SwTblToTxtSave::SwTblToTxtSave: save XmlIds for start and end SwTxtNode
+ SwTblToTxtSave::SwTblToTxtSave, SwNodes::UndoTableToText:
always store the index of the first SwTxtNode in the cell, instead of
the index of the first SwTxtNode in case of the first cell in a row,
and the cell start node in other cases
+ SwNodes::UndoTableToText: restore saved XmlIds for start and end SwTxtNode
- sw/source/core/docnode/ndtbl.cxx:
+ lcl_DelBox: simplify for refactored start index handling in SwTblToTxtSave
2009-02-26 13:02:28 +0100 mst r268505 : migration of cws odfmetadata2 from CVS (resync to m42): module sd
- sd/source/ui/table/tableobjectbar.cxx,sd/source/ui/view/*.cxx:
+ remove invocations of SFX_DECL_TYPE
- sd/source/ui/slideshow/SlideShowRestarter.cxx,
sd/source/ui/toolpanel/LayoutMenu.cxx,
sd/source/ui/unoidl/DrawController.cxx,
sd/source/ui/view/{ViewShellBase.cxx,ViewTabBar.cxx,frmview.cxx}:
+ fix abuses of comphelper_getProcessComponentContext (missing release)
2009-02-26 13:01:24 +0100 mst r268504 : migration of cws odfmetadata2 from CVS (resync to m42): module starmath
- starmath/source/document.cxx:
+ don't touch SfxObjectShell's privates
2009-02-26 13:00:37 +0100 mst r268503 : migration of cws odfmetadata2 from CVS (resync to m42): module sfx2
#i90620#
- sfx2/inc/sfx2/XmlIdRegistry.hxx:
+ new file: interfaces sfx2::IXmlIdRegistry and sfx2::IXmlIdRegistrySupplier
and a couple of utility functions
- sfx2/inc/sfx2/DocumentMetadataAccess.hxx,
sfx2/source/doc/DocumentMetadataAccess.cxx:
+ new class sfx2::DocumentMetadataAccess, implements XDocumentMetadataAccess
+ the URI of the DocumentMetadataAccess is now the URI from which the
document was loaded; for a new document, use a vnd.sun.star.tdoc URI
+ add new function sfx2::createBaseURI()
+ prevent using reserved file names
+ try not to recurse into embedded subdocuments
- sfx2/source/doc/makefile.mk:
+ add DocumentMetadataAccess
- sfx2/util/makefile.mk:
+ link libsfx2 against libxml2 (needed for xmlValidateNCName)
- sfx2/source/doc/makefile.mk:
+ add LIBXML_CFLAGS to CFLAGS
- sfx2/prj/build.lst:
+ add dependence on libxml2
- sfx2/prj/d.lst:
+ add XmlIdRegistry.hxx, DocumentMetadataAccess.hxx
- sfx2/inc/sfx2/objsh.hxx, sfx2/source/doc/objxtor.cxx:
+ make SfxObjectShell's members private
+ new method SfxObjectShell::GetAutoStyleFilterIndex
+ SfxObjectShell inherits sfx2::IXmlIdRegistrySupplier
- sfx2/source/dialog/templdlg.cxx, sfx2/source/doc/sfxbasemodel.cxx:
+ don't touch SfxObjectShell's privates
- sfx2/inc/sfx2/sfxbasemodel.hxx, sfx2/source/doc/sfxbasemodel.cxx:
+ SfxBaseModel inherits BaseMutex instead of IMPL_SfxBaseModel_MutexContainer
+ SfxBaseModel implements additional interface XDocumentMetadataAccess
+ IMPL_SfxBaseModel_DataContainer has new member:
a sfx2::DocumentMetadataAccess
+ implementation of XDocumentMetadataAccess forwards to
the sfx2::DocumentMetadataAccess member
- sfx2/qa/complex/DocumentMetadataAccessTest.java,
sfx2/qa/complex/{tests.sce,makefile.mk},
sfx2/qa/complex/testdocuments/TESTRDFA.odt:
+ add complex test: DocumentMetadataAccessTest
+ add RDFa test document
#i95863#
- sfx2/inc/sfx2/dinfdlg.hxx, sfx2/source/dialog/dinfdlg.cxx:
+ refactor SfxDocumentItem so it no longer requires a XDocumentInfo
+ move struct CustomProperty to implementation file
+ remove class SfxDocumentUserPage
+ QueryValue,PutValue: remove MID_DOCINFO_FIELD*
- sfx2/source/doc/objserv.cxx:
+ adapt to SfxDocumentItem change
- sfx2/inc/sfx2/sfx.hrc, sfx2/sdi/sfxslots.sdi, sfx2/inc/sfx2/msg.hxx:
+ remove MID_DOCINFO_FIELD*
+ put all invocations of SFX_DECL_TYPE in msg.hxx, and undef SFX_DECL_TYPE
- sfx2/source/doc/objxtor.cxx:
+ fix abuses of comphelper_getProcessComponentContext (missing release)
- sfx2/source/doc/docfile.cxx:
+ SfxMedium::SfxMedium: don't dereference NULL, throw exception instead
- sfx2/source/doc/objstor.cxx:
+ SfxObjectShell::DoLoad: fix bug: DocumentBaseURI is not initialized
2009-02-26 12:58:07 +0100 mst r268502 : migration of cws odfmetadata2 from CVS (resync to m42): module xmloff
#i90620#: implement RDFa import (interface change)
- xmloff/inc/xmloff/xmlimp.hxx. xmloff/source/core/xmlimp.cxx:
+ make SvXMLImport::GetAbsoluteReference() const
+ add SvXMLImport::GetComponentContext()
+ SvXMLImport::_InitCtor(): add RDFa namespace
+ add SvXMLImport::AddRDFa()
+ SvXMLImport::endDocument() inserts RDFa into document repository
- xmloff/inc/xmloff/xmltoken.hxx, xmloff/source/core/xmltoken.cxx:
+ new tokens for RDFa: XML_ABOUT, XML_DATATYPE
- xmloff/inc/RDFaImportHelper.hxx, xmloff/source/core/RDFaImportHelper.cxx:
+ new class RDFaImportHelper
+ adapt the code to the bleak reality of broken C++ implementations
+ handle empty xhtml:about attributes properly, which are actually
valid relative URIs
+ work around broken SvXMLImport::GetAbsoluteReference
- xmloff/source/core/makefile.mk:
+ add RDFaImportHelper.cxx
#i90620#: implement RDFa export
- xmloff/inc/xmloff/xmlexp.hxx, xmloff/source/core/xmlexp.cxx:
+ add SvXMLExport::EnsureNamespace(), and a stack of namespace maps
+ add SvXMLExport::GetComponentContext()
+ add SvXMLExport::AddAttributesRDFa()
- xmloff/inc/RDFaExportHelper.hxx, xmloff/source/core/RDFaExportHelper.cxx:
+ new class RDFaExportHelper
+ don't use std::map::data_type, which is actually called
std::map::mapped_type by libstdc++
- xmloff/source/core/makefile.mk:
+ add RDFaExportHelper.cxx
#i91563#
- xmloff/inc/xmloff/txtimp.hxx, xmloff/source/text/txtimp.cxx:
+ XMLTextPAttrTokens: add RDFa tokens
- xmloff/source/text/txtparai{.hxx,.cxx}:
+ import RDFa for text:p
- xmloff/source/text/txtparae.cxx:
+ export RDFa for text:p
interface change: use XHTML namespace instead of RDFA
- xmloff/inc/xmlnmspe.hxx, xmloff/inc/xmloff/xmltoken.hxx,
xmloff/source/core/{xmltoken.cxx,xmlimp.cxx,xmlexp.cxx,RDFaExportHelper.cxx},
xmloff/source/text/txtimp.cxx:
+ use XHTML namespace instead of RDFA
#i91565#, #i91566#: (preliminary) import for text:meta, text:meta-field
- xmloff/source/text/txtparai.cxx:
+ new class XMLMetaImportContextBase with subclasses to import
text:meta and text:meta-field
- xmloff/source/text/XMLTextMarkImportContext.cxx:
+ change XMLTextMarkImportContext::CreateAndInsertMark to handle marks
with no name (text:meta)
#i91565#, #i91566#: (preliminary) export for text:meta, text:meta-field
- xmloff/inc/txtflde.hxx, xmloff/source/text/txtflde.cxx:
+ add FIELD_ID_META to FieldIdEnum
+ new method XMLTextFieldExport::ExportMetaField()
+ change XMLTextFieldExport::ExportField{,AutoStyle,Helper}
to take additional parameter for progress bar
- xmloff/inc/xmloff/txtparae.hxx, xmloff/source/text/txtparae.cxx:
+ make XMLTextParagraphExport::exportTextRangeEnumeration() public
+ new method XMLTextParagraphExport::exportMeta()
#i90620#
- xmloff/inc/xmloff/xmlimp.hxx, xmloff/source/core/xmlimp.cxx,
xmloff/inc/xmloff/xmlexp.hxx, xmloff/source/core/xmlexp.cxx:
+ rename SvXML{Im,Ex}port::GetStreamPath() to GetStreamName()
+ fix xml:id {im,ex}port for embedded documents and non-packages
+ adapt to API change: XMetadatable
#i90620# GRDDL
- xmloff/inc/xmlnmspe.hxx, xmloff/inc/xmloff/xmltoken.hxx,
xmloff/source/core/{xmltoken.cxx,xmlexp.cxx}:
+ add GRDDL namespace
+ add token XML_TRANSFORMATION
+ add grddl:transformation attribute to root elements for meta.xml,
content.xml and styles.xml
2009-02-26 12:54:40 +0100 mst r268501 : migration of cws odfmetadata2 from CVS (resync to m42): module unoxml
#i90620#
- unoxml/source/rdf/librdf_repository.cxx:
+ librdf_Repository::importGraph: allocate buffer sized length of stream
+ switch from one librdf_world per repository to a single static world
because redland has global variables with a brain-damaged life-cycle...
+ exportGraph: use new raptor 1.4.18 feature to disable writing
an xml:base attribute in RDF/XML files
- unoxml/source/rdf/librdf_repository.cxx:
unoxml/qa/complex/RDFRepositoryTest.java:
+ adapt to predicate is URI change
+ adapt to RDFa API change
+ adapt to API change: RDFa has multiple predicates...
+ adapt to API change: XMetadatable derives from XURI
+ allow xhtml:datatype without xhtml:content
+ adapt to API change: attribute MetadataReference is StringPair
- unoxml/source/rdf/CURI.cxx:
+ add some more URI constants
2009-02-26 12:53:32 +0100 mst r268500 : migration of cws odfmetadata2 from CVS (resync to m42): module package
- package/inc/ImplValidCharacters.hxx:
+ remove (moved to comphelper)
2009-02-26 12:52:49 +0100 mst r268499 : migration of cws odfmetadata2 from CVS (resync to m42): module comphelper
- comphelper/inc/comphelper/processfactory.hxx,
comphelper/source/processfactory/processfactory.cxx:
+ add getProcessComponentContext()
+ change return type of comphelper_getProcessComponentContext to Reference
- comphelper/inc/comphelper/stl_types.hxx:
+ add OUStringBufferAppender
+ add algorithm intersperse
- comphelper/source/misc/string.cxx:
+ rewrite convertCommaSeparated with intersperse and OUStringBufferAppender
- comphelper/inc/comphelper/stlunosequence.hxx:
+ fix bug: begin() on empty sequence != end()
2009-02-26 12:50:47 +0100 mst r268498 : migration of cws odfmetadata2 from CVS (resync to m42): module offapi
#i96209#
- offapi/com/sun/star/text/fieldmaster/*.idl:
+ rename module from FieldMaster to fieldmaster
- offapi/type_reference/{typelibrary_history.txt,types.rdb}:
+ update reference types.rdb
#i90620#
- offapi/com/sun/star/rdf/{XMetadatable.idl,XDocumentMetadataAccess.idl}:
+ API change: XMetadatable derives from XURI
+ API change: replace XmlId (string) with MetadataReference (StringPair)
- offapi/com/sun/star/rdf/{Statement.idl,XDocumentRepository.idl,
XNamedGraph.idl,XRepository.idl}:
+ the predicate of a statement is a URI, not a Resource
- offapi/com/sun/star/rdf/XDocumentMetadataAccess.idl:
+ rename: s/Package/Document/
+ remove uuid
+ remove everything related to mapping
+ graph names are now generated from base URI and file names
+ load methods: improve error handling with XInteractionHandler
- offapi/com/sun/star/rdf/XDocumentRepository.idl:
+ change: RDFa permits using multiple predicates in one attribute
+ setStatementRDFa: subject is now XResource, object is now XMetadatable
- offapi/com/sun/star/rdf/URIs.idl:
+ add some more URI constants
- offapi/com/sun/star/rdf:
+ fix @since tags and replace <method> with <member>
2009-02-26 12:47:24 +0100 mst r268497 : migration of cws odfmetadata2 from CVS (resync to m42): module redland
fix #i93768#
- redland/raptor-1.4.17.patch, redland/raptor/makefile.mk:
+ disable GRDDL parser to prevent call to libxslt
xsltSetDefaultSecurityPrefs, which breaks xmlhelp
- redland/raptor/makefile.mk, redland/raptor-1.4.17.patch,
redland/raptor-1.4.18.patch:
+ upgrade raptor to 1.4.18
+ deactivate serializer for RSS/Atom (does not build)
- redland/rasqal/makefile.mk, redland/rasqal-0.9.15.patch,
redland/rasqal-0.9.16.patch,
+ upgrade rasqal to 0.9.16
- redland/redland/makefile.mk, redland/redland-1.0.7.patch,
redland/redland-1.0.8.patch:
+ upgrade redland to 1.0.8
- redland/redlandversion.mk:
+ the librasqal SONAME has changed
2009-07-02 09:05:03 +00:00
|
|
|
pSrcNode = pPara->GetTxtNode();
|
2003-09-04 10:49:56 +00:00
|
|
|
}
|
2000-09-18 16:15:01 +00:00
|
|
|
const SwStartNode* pTmp = pSrcNode ? pSrcNode->FindSttNodeByType(eSearchNodeType) : 0;
|
|
|
|
|
|
|
|
//SectionNodes ueberspringen
|
|
|
|
while(pTmp && pTmp->IsSectionNode())
|
|
|
|
{
|
2006-08-14 17:02:09 +00:00
|
|
|
pTmp = pTmp->StartOfSectionNode();
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
2003-03-27 14:45:43 +00:00
|
|
|
while(pOwnStartNode && pOwnStartNode->IsSectionNode())
|
|
|
|
{
|
2006-08-14 17:02:09 +00:00
|
|
|
pOwnStartNode = pOwnStartNode->StartOfSectionNode();
|
2003-03-27 14:45:43 +00:00
|
|
|
}
|
2000-09-18 16:15:01 +00:00
|
|
|
//ohne Expand darf mit dem ViewCursor ueberall hingesprungen werden
|
|
|
|
//mit Expand nur in der gleichen Umgebung
|
|
|
|
if(bExpand &&
|
|
|
|
(pOwnStartNode != pTmp ||
|
2007-09-27 11:43:56 +00:00
|
|
|
(eSelMode != SHELL_MODE_TABLE_TEXT &&
|
|
|
|
eSelMode != SHELL_MODE_LIST_TEXT &&
|
|
|
|
eSelMode != SHELL_MODE_TABLE_LIST_TEXT &&
|
|
|
|
eSelMode != SHELL_MODE_TEXT)))
|
2000-09-18 16:15:01 +00:00
|
|
|
throw uno::RuntimeException();
|
|
|
|
|
|
|
|
//jetzt muss die Selektion erweitert werden
|
|
|
|
if(bExpand)
|
|
|
|
{
|
|
|
|
// der Cursor soll alles einschliessen, was bisher von ihm und dem uebergebenen
|
|
|
|
// Range eingeschlossen wurde
|
2001-07-04 06:31:59 +00:00
|
|
|
SwPosition aOwnLeft(*aOwnPaM.Start());
|
|
|
|
SwPosition aOwnRight(*aOwnPaM.End());
|
|
|
|
SwPosition* pParamLeft = rDestPam.Start();
|
|
|
|
SwPosition* pParamRight = rDestPam.End();
|
2000-09-18 16:15:01 +00:00
|
|
|
// jetzt sind vier SwPositions da, zwei davon werden gebraucht, also welche?
|
2003-09-04 10:49:56 +00:00
|
|
|
if(aOwnRight > *pParamRight)
|
2000-09-18 16:15:01 +00:00
|
|
|
*aOwnPaM.GetPoint() = aOwnRight;
|
|
|
|
else
|
|
|
|
*aOwnPaM.GetPoint() = *pParamRight;
|
|
|
|
aOwnPaM.SetMark();
|
|
|
|
if(aOwnLeft < *pParamLeft)
|
|
|
|
*aOwnPaM.GetMark() = aOwnLeft;
|
2003-09-04 10:49:56 +00:00
|
|
|
else
|
|
|
|
*aOwnPaM.GetMark() = *pParamLeft;
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
//der Cursor soll dem uebergebenen Range entsprechen
|
2001-07-04 06:31:59 +00:00
|
|
|
*aOwnPaM.GetPoint() = *rDestPam.GetPoint();
|
|
|
|
if(rDestPam.HasMark())
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2001-07-04 06:31:59 +00:00
|
|
|
aOwnPaM.SetMark();
|
|
|
|
*aOwnPaM.GetMark() = *rDestPam.GetMark();
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
else
|
2001-07-04 06:31:59 +00:00
|
|
|
aOwnPaM.DeleteMark();
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
rSh.SetSelection(aOwnPaM);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
throw uno::RuntimeException();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
void SwXTextViewCursor::gotoStart(sal_Bool bExpand) throw( uno::RuntimeException )
|
|
|
|
{
|
2010-10-13 01:44:10 -05:00
|
|
|
SolarMutexGuard aGuard;
|
2009-06-03 11:26:39 +00:00
|
|
|
if(m_pView)
|
2004-11-15 15:51:46 +00:00
|
|
|
{
|
|
|
|
if (!IsTextSelection())
|
|
|
|
throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "no text selection" ) ), static_cast < cppu::OWeakObject * > ( this ) );
|
|
|
|
|
2009-06-03 11:26:39 +00:00
|
|
|
m_pView->GetWrtShell().SttDoc( bExpand );
|
2004-11-15 15:51:46 +00:00
|
|
|
}
|
2000-09-18 16:15:01 +00:00
|
|
|
else
|
|
|
|
throw uno::RuntimeException();
|
|
|
|
}
|
|
|
|
|
|
|
|
void SwXTextViewCursor::gotoEnd(sal_Bool bExpand) throw( uno::RuntimeException )
|
|
|
|
{
|
2010-10-13 01:44:10 -05:00
|
|
|
SolarMutexGuard aGuard;
|
2009-06-03 11:26:39 +00:00
|
|
|
if(m_pView)
|
2004-11-15 15:51:46 +00:00
|
|
|
{
|
|
|
|
if (!IsTextSelection())
|
|
|
|
throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "no text selection" ) ), static_cast < cppu::OWeakObject * > ( this ) );
|
|
|
|
|
2009-06-03 11:26:39 +00:00
|
|
|
m_pView->GetWrtShell().EndDoc( bExpand );
|
2004-11-15 15:51:46 +00:00
|
|
|
}
|
2000-09-18 16:15:01 +00:00
|
|
|
else
|
|
|
|
throw uno::RuntimeException();
|
|
|
|
}
|
|
|
|
|
|
|
|
sal_Bool SwXTextViewCursor::jumpToFirstPage(void) throw( uno::RuntimeException )
|
|
|
|
{
|
2010-10-13 01:44:10 -05:00
|
|
|
SolarMutexGuard aGuard;
|
2000-09-18 16:15:01 +00:00
|
|
|
sal_Bool bRet = sal_False;
|
2009-06-03 11:26:39 +00:00
|
|
|
if(m_pView)
|
2001-07-04 05:31:05 +00:00
|
|
|
{
|
2009-06-03 11:26:39 +00:00
|
|
|
SwWrtShell& rSh = m_pView->GetWrtShell();
|
2001-07-04 05:31:05 +00:00
|
|
|
if (rSh.IsSelFrmMode())
|
|
|
|
{
|
|
|
|
rSh.UnSelectFrm();
|
|
|
|
rSh.LeaveSelFrmMode();
|
|
|
|
}
|
|
|
|
rSh.EnterStdMode();
|
2011-01-17 15:06:54 +01:00
|
|
|
bRet = rSh.SttEndDoc(sal_True);
|
2001-07-04 05:31:05 +00:00
|
|
|
}
|
2000-09-18 16:15:01 +00:00
|
|
|
else
|
|
|
|
throw uno::RuntimeException();
|
|
|
|
return bRet;
|
|
|
|
}
|
|
|
|
|
|
|
|
sal_Bool SwXTextViewCursor::jumpToLastPage(void) throw( uno::RuntimeException )
|
|
|
|
{
|
2010-10-13 01:44:10 -05:00
|
|
|
SolarMutexGuard aGuard;
|
2000-09-18 16:15:01 +00:00
|
|
|
sal_Bool bRet = sal_False;
|
2009-06-03 11:26:39 +00:00
|
|
|
if(m_pView)
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2009-06-03 11:26:39 +00:00
|
|
|
SwWrtShell& rSh = m_pView->GetWrtShell();
|
2001-07-04 05:31:05 +00:00
|
|
|
if (rSh.IsSelFrmMode())
|
|
|
|
{
|
|
|
|
rSh.UnSelectFrm();
|
|
|
|
rSh.LeaveSelFrmMode();
|
|
|
|
}
|
|
|
|
rSh.EnterStdMode();
|
2011-01-17 15:06:54 +01:00
|
|
|
bRet = rSh.SttEndDoc(sal_False);
|
2000-09-18 16:15:01 +00:00
|
|
|
rSh.SttPg();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
throw uno::RuntimeException();
|
|
|
|
return bRet;
|
|
|
|
}
|
|
|
|
|
|
|
|
sal_Bool SwXTextViewCursor::jumpToPage(sal_Int16 nPage) throw( uno::RuntimeException )
|
|
|
|
{
|
2010-10-13 01:44:10 -05:00
|
|
|
SolarMutexGuard aGuard;
|
2000-09-18 16:15:01 +00:00
|
|
|
sal_Bool bRet = sal_False;
|
2009-06-03 11:26:39 +00:00
|
|
|
if(m_pView)
|
2011-01-17 15:06:54 +01:00
|
|
|
bRet = m_pView->GetWrtShell().GotoPage(nPage, sal_True);
|
2000-09-18 16:15:01 +00:00
|
|
|
else
|
|
|
|
throw uno::RuntimeException();
|
|
|
|
return bRet;
|
|
|
|
}
|
|
|
|
|
|
|
|
sal_Bool SwXTextViewCursor::jumpToNextPage(void) throw( uno::RuntimeException )
|
|
|
|
{
|
2010-10-13 01:44:10 -05:00
|
|
|
SolarMutexGuard aGuard;
|
2000-09-18 16:15:01 +00:00
|
|
|
sal_Bool bRet = sal_False;
|
2009-06-03 11:26:39 +00:00
|
|
|
if(m_pView)
|
|
|
|
bRet = m_pView->GetWrtShell().SttNxtPg();
|
2000-09-18 16:15:01 +00:00
|
|
|
else
|
|
|
|
throw uno::RuntimeException();
|
|
|
|
return bRet;
|
|
|
|
}
|
|
|
|
|
|
|
|
sal_Bool SwXTextViewCursor::jumpToPreviousPage(void) throw( uno::RuntimeException )
|
|
|
|
{
|
2010-10-13 01:44:10 -05:00
|
|
|
SolarMutexGuard aGuard;
|
2000-09-18 16:15:01 +00:00
|
|
|
sal_Bool bRet = sal_False;
|
2009-06-03 11:26:39 +00:00
|
|
|
if(m_pView)
|
|
|
|
bRet = m_pView->GetWrtShell().EndPrvPg();
|
2000-09-18 16:15:01 +00:00
|
|
|
else
|
|
|
|
throw uno::RuntimeException();
|
|
|
|
return bRet;
|
|
|
|
}
|
|
|
|
|
|
|
|
sal_Bool SwXTextViewCursor::jumpToEndOfPage(void) throw( uno::RuntimeException )
|
|
|
|
{
|
2010-10-13 01:44:10 -05:00
|
|
|
SolarMutexGuard aGuard;
|
2000-09-18 16:15:01 +00:00
|
|
|
sal_Bool bRet = sal_False;
|
2009-06-03 11:26:39 +00:00
|
|
|
if(m_pView)
|
|
|
|
bRet = m_pView->GetWrtShell().EndPg();
|
2000-09-18 16:15:01 +00:00
|
|
|
else
|
|
|
|
throw uno::RuntimeException();
|
|
|
|
return bRet;
|
|
|
|
}
|
|
|
|
|
|
|
|
sal_Bool SwXTextViewCursor::jumpToStartOfPage(void) throw( uno::RuntimeException )
|
|
|
|
{
|
2010-10-13 01:44:10 -05:00
|
|
|
SolarMutexGuard aGuard;
|
2000-09-18 16:15:01 +00:00
|
|
|
sal_Bool bRet = sal_False;
|
2009-06-03 11:26:39 +00:00
|
|
|
if(m_pView)
|
|
|
|
bRet = m_pView->GetWrtShell().SttPg();
|
2000-09-18 16:15:01 +00:00
|
|
|
else
|
|
|
|
throw uno::RuntimeException();
|
|
|
|
return bRet;
|
|
|
|
}
|
|
|
|
|
|
|
|
sal_Int16 SwXTextViewCursor::getPage(void) throw( uno::RuntimeException )
|
|
|
|
{
|
2010-10-13 01:44:10 -05:00
|
|
|
SolarMutexGuard aGuard;
|
2000-09-18 16:15:01 +00:00
|
|
|
short nRet = 0;
|
2009-06-03 11:26:39 +00:00
|
|
|
if(m_pView)
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2009-06-03 11:26:39 +00:00
|
|
|
SwWrtShell& rSh = m_pView->GetWrtShell();
|
2001-07-04 05:31:05 +00:00
|
|
|
SwPaM* pShellCrsr = rSh.GetCrsr();
|
2011-01-17 15:06:54 +01:00
|
|
|
nRet = (short)pShellCrsr->GetPageNum( sal_True, 0 );
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
throw uno::RuntimeException();
|
|
|
|
return nRet;
|
|
|
|
}
|
|
|
|
|
|
|
|
sal_Bool SwXTextViewCursor::screenDown(void) throw( uno::RuntimeException )
|
|
|
|
{
|
2010-10-13 01:44:10 -05:00
|
|
|
SolarMutexGuard aGuard;
|
2000-09-18 16:15:01 +00:00
|
|
|
sal_Bool bRet = sal_False;
|
2009-06-03 11:26:39 +00:00
|
|
|
if(m_pView)
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2009-06-03 11:26:39 +00:00
|
|
|
SfxRequest aReq(FN_PAGEDOWN, SFX_CALLMODE_SLOT, m_pView->GetPool());
|
|
|
|
m_pView->Execute(aReq);
|
2000-09-18 16:15:01 +00:00
|
|
|
const SfxPoolItem* pRet = aReq.GetReturnValue();
|
|
|
|
bRet = pRet && ((const SfxBoolItem*)pRet)->GetValue();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
throw uno::RuntimeException();
|
|
|
|
return bRet;
|
|
|
|
}
|
|
|
|
|
|
|
|
sal_Bool SwXTextViewCursor::screenUp(void) throw( uno::RuntimeException )
|
|
|
|
{
|
2010-10-13 01:44:10 -05:00
|
|
|
SolarMutexGuard aGuard;
|
2000-09-18 16:15:01 +00:00
|
|
|
sal_Bool bRet = sal_False;
|
2009-06-03 11:26:39 +00:00
|
|
|
if(m_pView)
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2009-06-03 11:26:39 +00:00
|
|
|
SfxRequest aReq(FN_PAGEUP, SFX_CALLMODE_SLOT, m_pView->GetPool());
|
|
|
|
m_pView->Execute(aReq);
|
2000-09-18 16:15:01 +00:00
|
|
|
const SfxPoolItem* pRet = aReq.GetReturnValue();
|
|
|
|
bRet = pRet && ((const SfxBoolItem*)pRet)->GetValue();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
throw uno::RuntimeException();
|
|
|
|
return bRet;
|
|
|
|
}
|
|
|
|
|
2006-06-19 11:44:16 +00:00
|
|
|
uno::Reference< text::XText > SwXTextViewCursor::getText(void) throw( uno::RuntimeException )
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2010-10-13 01:44:10 -05:00
|
|
|
SolarMutexGuard aGuard;
|
2006-06-19 11:44:16 +00:00
|
|
|
uno::Reference< text::XText > xRet;
|
2009-06-03 11:26:39 +00:00
|
|
|
if(m_pView)
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2005-02-21 12:48:54 +00:00
|
|
|
if (!IsTextSelection( sal_False ))
|
2004-11-15 15:51:46 +00:00
|
|
|
throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "no text selection" ) ), static_cast < cppu::OWeakObject * > ( this ) );
|
|
|
|
|
2009-06-03 11:26:39 +00:00
|
|
|
SwWrtShell& rSh = m_pView->GetWrtShell();
|
2000-09-18 16:15:01 +00:00
|
|
|
SwPaM* pShellCrsr = rSh.GetCrsr();
|
2009-06-03 11:26:39 +00:00
|
|
|
SwDoc* pDoc = m_pView->GetDocShell()->GetDoc();
|
2010-01-08 17:13:53 +01:00
|
|
|
xRet = ::sw::CreateParentXText(*pDoc, *pShellCrsr->Start());
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
throw uno::RuntimeException();
|
|
|
|
return xRet;
|
|
|
|
}
|
|
|
|
|
2006-06-19 11:44:16 +00:00
|
|
|
uno::Reference< text::XTextRange > SwXTextViewCursor::getStart(void) throw( uno::RuntimeException )
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2010-10-13 01:44:10 -05:00
|
|
|
SolarMutexGuard aGuard;
|
2006-06-19 11:44:16 +00:00
|
|
|
uno::Reference< text::XTextRange > xRet;
|
2009-06-03 11:26:39 +00:00
|
|
|
if(m_pView)
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2004-11-15 15:51:46 +00:00
|
|
|
if (!IsTextSelection())
|
|
|
|
throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "no text selection" ) ), static_cast < cppu::OWeakObject * > ( this ) );
|
|
|
|
|
2009-06-03 11:26:39 +00:00
|
|
|
SwWrtShell& rSh = m_pView->GetWrtShell();
|
2000-09-18 16:15:01 +00:00
|
|
|
SwPaM* pShellCrsr = rSh.GetCrsr();
|
2009-06-03 11:26:39 +00:00
|
|
|
SwDoc* pDoc = m_pView->GetDocShell()->GetDoc();
|
2010-01-08 17:13:53 +01:00
|
|
|
xRet = SwXTextRange::CreateXTextRange(*pDoc, *pShellCrsr->Start(), 0);
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
throw uno::RuntimeException();
|
|
|
|
return xRet;
|
|
|
|
}
|
|
|
|
|
2006-06-19 11:44:16 +00:00
|
|
|
uno::Reference< text::XTextRange > SwXTextViewCursor::getEnd(void) throw( uno::RuntimeException )
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2010-10-13 01:44:10 -05:00
|
|
|
SolarMutexGuard aGuard;
|
2006-06-19 11:44:16 +00:00
|
|
|
uno::Reference< text::XTextRange > xRet;
|
2009-06-03 11:26:39 +00:00
|
|
|
if(m_pView)
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2004-11-15 15:51:46 +00:00
|
|
|
if (!IsTextSelection())
|
|
|
|
throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "no text selection" ) ), static_cast < cppu::OWeakObject * > ( this ) );
|
|
|
|
|
2009-06-03 11:26:39 +00:00
|
|
|
SwWrtShell& rSh = m_pView->GetWrtShell();
|
2000-09-18 16:15:01 +00:00
|
|
|
SwPaM* pShellCrsr = rSh.GetCrsr();
|
2009-06-03 11:26:39 +00:00
|
|
|
SwDoc* pDoc = m_pView->GetDocShell()->GetDoc();
|
2010-01-08 17:13:53 +01:00
|
|
|
xRet = SwXTextRange::CreateXTextRange(*pDoc, *pShellCrsr->End(), 0);
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
throw uno::RuntimeException();
|
|
|
|
return xRet;
|
|
|
|
}
|
|
|
|
|
|
|
|
OUString SwXTextViewCursor::getString(void) throw( uno::RuntimeException )
|
|
|
|
{
|
2010-10-13 01:44:10 -05:00
|
|
|
SolarMutexGuard aGuard;
|
2000-09-18 16:15:01 +00:00
|
|
|
OUString uRet;
|
2009-06-03 11:26:39 +00:00
|
|
|
if(m_pView)
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2005-02-21 12:48:54 +00:00
|
|
|
if (!IsTextSelection( sal_False ))
|
2004-11-15 15:51:46 +00:00
|
|
|
throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "no text selection" ) ), static_cast < cppu::OWeakObject * > ( this ) );
|
|
|
|
|
2009-06-03 11:26:39 +00:00
|
|
|
ShellModes eSelMode = m_pView->GetShellMode();
|
2000-09-18 16:15:01 +00:00
|
|
|
switch(eSelMode)
|
2002-02-13 11:22:31 +00:00
|
|
|
{
|
2004-11-15 15:51:46 +00:00
|
|
|
//! since setString for SEL_TABLE_TEXT (with possible
|
|
|
|
//! multi selection of cells) would not work properly we
|
|
|
|
//! will ignore this case for both
|
|
|
|
//! functions (setString AND getString) because of symmetrie.
|
|
|
|
|
2007-09-27 11:43:56 +00:00
|
|
|
case SHELL_MODE_LIST_TEXT :
|
|
|
|
case SHELL_MODE_TABLE_LIST_TEXT:
|
|
|
|
case SHELL_MODE_TEXT :
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2009-06-03 11:26:39 +00:00
|
|
|
SwWrtShell& rSh = m_pView->GetWrtShell();
|
2000-09-18 16:15:01 +00:00
|
|
|
SwPaM* pShellCrsr = rSh.GetCrsr();
|
2010-01-08 17:13:54 +01:00
|
|
|
SwUnoCursorHelper::GetTextFromPam(*pShellCrsr, uRet);
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
2007-09-27 11:43:56 +00:00
|
|
|
default:;//prevent warning
|
2002-02-13 11:22:31 +00:00
|
|
|
}
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
return uRet;
|
|
|
|
}
|
|
|
|
|
|
|
|
void SwXTextViewCursor::setString(const OUString& aString) throw( uno::RuntimeException )
|
|
|
|
{
|
2010-10-13 01:44:10 -05:00
|
|
|
SolarMutexGuard aGuard;
|
2009-06-03 11:26:39 +00:00
|
|
|
if(m_pView)
|
2002-02-13 11:22:31 +00:00
|
|
|
{
|
2005-02-21 12:48:54 +00:00
|
|
|
if (!IsTextSelection( sal_False ))
|
2004-11-15 15:51:46 +00:00
|
|
|
throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "no text selection" ) ), static_cast < cppu::OWeakObject * > ( this ) );
|
|
|
|
|
2009-06-03 11:26:39 +00:00
|
|
|
ShellModes eSelMode = m_pView->GetShellMode();
|
2002-02-13 11:22:31 +00:00
|
|
|
switch(eSelMode)
|
|
|
|
{
|
2004-11-15 15:51:46 +00:00
|
|
|
//! since setString for SEL_TABLE_TEXT (with possible
|
|
|
|
//! multi selection of cells) would not work properly we
|
|
|
|
//! will ignore this case for both
|
|
|
|
//! functions (setString AND getString) because of symmetrie.
|
|
|
|
|
2007-09-27 11:43:56 +00:00
|
|
|
case SHELL_MODE_LIST_TEXT :
|
|
|
|
case SHELL_MODE_TABLE_LIST_TEXT :
|
|
|
|
case SHELL_MODE_TEXT :
|
2002-02-13 11:22:31 +00:00
|
|
|
{
|
2009-06-03 11:26:39 +00:00
|
|
|
SwWrtShell& rSh = m_pView->GetWrtShell();
|
2002-02-13 11:22:31 +00:00
|
|
|
SwCursor* pShellCrsr = rSh.GetSwCrsr();
|
2010-01-08 17:13:54 +01:00
|
|
|
SwUnoCursorHelper::SetString(*pShellCrsr, aString);
|
2002-02-13 11:22:31 +00:00
|
|
|
}
|
2007-09-27 11:43:56 +00:00
|
|
|
default:;//prevent warning
|
2002-02-13 11:22:31 +00:00
|
|
|
}
|
|
|
|
}
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
|
2006-06-19 11:44:16 +00:00
|
|
|
uno::Reference< XPropertySetInfo > SwXTextViewCursor::getPropertySetInfo( ) throw(RuntimeException)
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2009-06-03 11:26:39 +00:00
|
|
|
static uno::Reference< XPropertySetInfo > xRef = m_pPropSet->getPropertySetInfo();
|
2000-09-18 16:15:01 +00:00
|
|
|
return xRef;
|
|
|
|
}
|
|
|
|
|
|
|
|
void SwXTextViewCursor::setPropertyValue( const OUString& rPropertyName, const Any& aValue )
|
|
|
|
throw(UnknownPropertyException, PropertyVetoException,
|
|
|
|
IllegalArgumentException, WrappedTargetException, RuntimeException)
|
|
|
|
{
|
2010-10-13 01:44:10 -05:00
|
|
|
SolarMutexGuard aGuard;
|
2009-06-03 11:26:39 +00:00
|
|
|
if(m_pView)
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2009-06-03 11:26:39 +00:00
|
|
|
SwWrtShell& rSh = m_pView->GetWrtShell();
|
2000-09-18 16:15:01 +00:00
|
|
|
SwPaM* pShellCrsr = rSh.GetCrsr();
|
2003-11-07 14:14:32 +00:00
|
|
|
SwNode *pNode = pShellCrsr->GetNode();
|
|
|
|
if (pNode && pNode->IsTxtNode())
|
2010-01-08 17:13:54 +01:00
|
|
|
{
|
|
|
|
SwUnoCursorHelper::SetPropertyValue(
|
|
|
|
*pShellCrsr, *m_pPropSet, rPropertyName, aValue );
|
|
|
|
}
|
2003-11-07 14:14:32 +00:00
|
|
|
else
|
|
|
|
throw RuntimeException();
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
throw RuntimeException();
|
|
|
|
}
|
|
|
|
|
|
|
|
Any SwXTextViewCursor::getPropertyValue( const OUString& rPropertyName )
|
|
|
|
throw(UnknownPropertyException, WrappedTargetException, RuntimeException)
|
|
|
|
{
|
2010-10-13 01:44:10 -05:00
|
|
|
SolarMutexGuard aGuard;
|
2000-09-18 16:15:01 +00:00
|
|
|
Any aRet;
|
2009-06-03 11:26:39 +00:00
|
|
|
if(m_pView)
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2009-06-03 11:26:39 +00:00
|
|
|
SwWrtShell& rSh = m_pView->GetWrtShell();
|
2000-09-18 16:15:01 +00:00
|
|
|
SwPaM* pShellCrsr = rSh.GetCrsr();
|
2010-01-08 17:13:54 +01:00
|
|
|
aRet = SwUnoCursorHelper::GetPropertyValue(
|
|
|
|
*pShellCrsr, *m_pPropSet, rPropertyName);
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
throw RuntimeException();
|
|
|
|
return aRet;
|
|
|
|
}
|
|
|
|
|
|
|
|
void SwXTextViewCursor::addPropertyChangeListener(
|
2007-09-27 11:43:56 +00:00
|
|
|
const OUString& /*aPropertyName*/, const uno::Reference< XPropertyChangeListener >& /*xListener*/ )
|
2000-09-18 16:15:01 +00:00
|
|
|
throw(UnknownPropertyException, WrappedTargetException, RuntimeException)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void SwXTextViewCursor::removePropertyChangeListener(
|
2007-09-27 11:43:56 +00:00
|
|
|
const OUString& /*aPropertyName*/, const uno::Reference< XPropertyChangeListener >& /*aListener*/ )
|
2000-09-18 16:15:01 +00:00
|
|
|
throw(UnknownPropertyException, WrappedTargetException, RuntimeException)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void SwXTextViewCursor::addVetoableChangeListener(
|
2007-09-27 11:43:56 +00:00
|
|
|
const OUString& /*PropertyName*/, const uno::Reference< XVetoableChangeListener >& /*aListener*/ )
|
2000-09-18 16:15:01 +00:00
|
|
|
throw(UnknownPropertyException, WrappedTargetException, RuntimeException)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2007-09-27 11:43:56 +00:00
|
|
|
void SwXTextViewCursor::removeVetoableChangeListener(
|
|
|
|
const OUString& /*PropertyName*/, const uno::Reference< XVetoableChangeListener >& /*aListener*/ ) throw(UnknownPropertyException, WrappedTargetException, RuntimeException)
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2007-09-27 11:43:56 +00:00
|
|
|
PropertyState SwXTextViewCursor::getPropertyState( const OUString& rPropertyName )
|
|
|
|
throw(UnknownPropertyException, RuntimeException)
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2010-10-13 01:44:10 -05:00
|
|
|
SolarMutexGuard aGuard;
|
2000-09-18 16:15:01 +00:00
|
|
|
PropertyState eState;
|
2009-06-03 11:26:39 +00:00
|
|
|
if(m_pView)
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2009-06-03 11:26:39 +00:00
|
|
|
SwWrtShell& rSh = m_pView->GetWrtShell();
|
2000-09-18 16:15:01 +00:00
|
|
|
SwPaM* pShellCrsr = rSh.GetCrsr();
|
2010-01-08 17:13:54 +01:00
|
|
|
eState = SwUnoCursorHelper::GetPropertyState(
|
|
|
|
*pShellCrsr, *m_pPropSet, rPropertyName);
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
throw RuntimeException();
|
|
|
|
return eState;
|
|
|
|
}
|
|
|
|
|
|
|
|
Sequence< PropertyState > SwXTextViewCursor::getPropertyStates(
|
|
|
|
const Sequence< OUString >& rPropertyNames ) throw(UnknownPropertyException, RuntimeException)
|
|
|
|
{
|
2010-10-13 01:44:10 -05:00
|
|
|
SolarMutexGuard aGuard;
|
2000-09-18 16:15:01 +00:00
|
|
|
Sequence< PropertyState > aRet;
|
2009-06-03 11:26:39 +00:00
|
|
|
if(m_pView)
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2009-06-03 11:26:39 +00:00
|
|
|
SwWrtShell& rSh = m_pView->GetWrtShell();
|
2000-09-18 16:15:01 +00:00
|
|
|
SwPaM* pShellCrsr = rSh.GetCrsr();
|
2010-01-08 17:13:54 +01:00
|
|
|
aRet = SwUnoCursorHelper::GetPropertyStates(
|
|
|
|
*pShellCrsr, *m_pPropSet, rPropertyNames);
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
return aRet;
|
|
|
|
}
|
|
|
|
|
|
|
|
void SwXTextViewCursor::setPropertyToDefault( const OUString& rPropertyName )
|
|
|
|
throw(UnknownPropertyException, RuntimeException)
|
|
|
|
{
|
2010-10-13 01:44:10 -05:00
|
|
|
SolarMutexGuard aGuard;
|
2009-06-03 11:26:39 +00:00
|
|
|
if(m_pView)
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2009-06-03 11:26:39 +00:00
|
|
|
SwWrtShell& rSh = m_pView->GetWrtShell();
|
2000-09-18 16:15:01 +00:00
|
|
|
SwPaM* pShellCrsr = rSh.GetCrsr();
|
2010-01-08 17:13:54 +01:00
|
|
|
SwUnoCursorHelper::SetPropertyToDefault(
|
|
|
|
*pShellCrsr, *m_pPropSet, rPropertyName);
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Any SwXTextViewCursor::getPropertyDefault( const OUString& rPropertyName )
|
|
|
|
throw(UnknownPropertyException, WrappedTargetException, RuntimeException)
|
|
|
|
{
|
|
|
|
Any aRet;
|
2010-10-13 01:44:10 -05:00
|
|
|
SolarMutexGuard aGuard;
|
2009-06-03 11:26:39 +00:00
|
|
|
if(m_pView)
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2009-06-03 11:26:39 +00:00
|
|
|
SwWrtShell& rSh = m_pView->GetWrtShell();
|
2000-09-18 16:15:01 +00:00
|
|
|
SwPaM* pShellCrsr = rSh.GetCrsr();
|
2010-01-08 17:13:54 +01:00
|
|
|
aRet = SwUnoCursorHelper::GetPropertyDefault(
|
|
|
|
*pShellCrsr, *m_pPropSet, rPropertyName);
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
return aRet;
|
|
|
|
}
|
|
|
|
|
|
|
|
sal_Bool SwXTextViewCursor::goDown(sal_Int16 nCount, sal_Bool bExpand) throw( uno::RuntimeException )
|
|
|
|
{
|
2010-10-13 01:44:10 -05:00
|
|
|
SolarMutexGuard aGuard;
|
2000-09-18 16:15:01 +00:00
|
|
|
sal_Bool bRet = sal_False;
|
2009-06-03 11:26:39 +00:00
|
|
|
if(m_pView)
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2004-11-15 15:51:46 +00:00
|
|
|
if (!IsTextSelection())
|
|
|
|
throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "no text selection" ) ), static_cast < cppu::OWeakObject * > ( this ) );
|
|
|
|
|
2000-09-18 16:15:01 +00:00
|
|
|
for( sal_uInt16 i = 0; i < nCount; i++ )
|
2009-06-03 11:26:39 +00:00
|
|
|
bRet = m_pView->GetWrtShell().Down( bExpand, 1, sal_True );
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
throw uno::RuntimeException();
|
|
|
|
return bRet;
|
|
|
|
}
|
|
|
|
|
|
|
|
sal_Bool SwXTextViewCursor::goUp(sal_Int16 nCount, sal_Bool bExpand) throw( uno::RuntimeException )
|
|
|
|
{
|
2010-10-13 01:44:10 -05:00
|
|
|
SolarMutexGuard aGuard;
|
2000-09-18 16:15:01 +00:00
|
|
|
sal_Bool bRet = sal_False;
|
2009-06-03 11:26:39 +00:00
|
|
|
if(m_pView)
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2004-11-15 15:51:46 +00:00
|
|
|
if (!IsTextSelection())
|
|
|
|
throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "no text selection" ) ), static_cast < cppu::OWeakObject * > ( this ) );
|
|
|
|
|
2000-09-18 16:15:01 +00:00
|
|
|
for( sal_uInt16 i = 0; i < nCount; i++ )
|
2009-06-03 11:26:39 +00:00
|
|
|
bRet = m_pView->GetWrtShell().Up( bExpand, 1, sal_True );
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
throw uno::RuntimeException();
|
|
|
|
return bRet;
|
|
|
|
}
|
|
|
|
|
|
|
|
sal_Bool SwXTextViewCursor::isAtStartOfLine(void) throw( uno::RuntimeException )
|
|
|
|
{
|
2010-10-13 01:44:10 -05:00
|
|
|
SolarMutexGuard aGuard;
|
2000-09-18 16:15:01 +00:00
|
|
|
sal_Bool bRet = sal_False;
|
2009-06-03 11:26:39 +00:00
|
|
|
if(m_pView)
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2005-02-21 12:48:54 +00:00
|
|
|
if (!IsTextSelection( sal_False ))
|
2004-11-15 15:51:46 +00:00
|
|
|
throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "no text selection" ) ), static_cast < cppu::OWeakObject * > ( this ) );
|
|
|
|
|
2009-06-03 11:26:39 +00:00
|
|
|
bRet = m_pView->GetWrtShell().IsAtLeftMargin();
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
throw uno::RuntimeException();
|
|
|
|
return bRet;
|
|
|
|
}
|
|
|
|
|
|
|
|
sal_Bool SwXTextViewCursor::isAtEndOfLine(void) throw( uno::RuntimeException )
|
|
|
|
{
|
2010-10-13 01:44:10 -05:00
|
|
|
SolarMutexGuard aGuard;
|
2000-09-18 16:15:01 +00:00
|
|
|
sal_Bool bRet = sal_False;
|
2009-06-03 11:26:39 +00:00
|
|
|
if(m_pView)
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2005-02-21 12:48:54 +00:00
|
|
|
if (!IsTextSelection( sal_False ))
|
2004-11-15 15:51:46 +00:00
|
|
|
throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "no text selection" ) ), static_cast < cppu::OWeakObject * > ( this ) );
|
|
|
|
|
2009-06-03 11:26:39 +00:00
|
|
|
bRet = m_pView->GetWrtShell().IsAtRightMargin(sal_True);
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
throw uno::RuntimeException();
|
|
|
|
return bRet;
|
|
|
|
}
|
|
|
|
|
|
|
|
void SwXTextViewCursor::gotoEndOfLine(sal_Bool bExpand) throw( uno::RuntimeException )
|
|
|
|
{
|
2010-10-13 01:44:10 -05:00
|
|
|
SolarMutexGuard aGuard;
|
2009-06-03 11:26:39 +00:00
|
|
|
if(m_pView)
|
2004-11-15 15:51:46 +00:00
|
|
|
{
|
2005-02-21 12:48:54 +00:00
|
|
|
if (!IsTextSelection( sal_False ))
|
2004-11-15 15:51:46 +00:00
|
|
|
throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "no text selection" ) ), static_cast < cppu::OWeakObject * > ( this ) );
|
|
|
|
|
2009-06-03 11:26:39 +00:00
|
|
|
m_pView->GetWrtShell().RightMargin(bExpand, sal_True);
|
2004-11-15 15:51:46 +00:00
|
|
|
}
|
2000-09-18 16:15:01 +00:00
|
|
|
else
|
|
|
|
throw uno::RuntimeException();
|
|
|
|
}
|
|
|
|
|
|
|
|
void SwXTextViewCursor::gotoStartOfLine(sal_Bool bExpand) throw( uno::RuntimeException )
|
|
|
|
{
|
2010-10-13 01:44:10 -05:00
|
|
|
SolarMutexGuard aGuard;
|
2009-06-03 11:26:39 +00:00
|
|
|
if(m_pView)
|
2004-11-15 15:51:46 +00:00
|
|
|
{
|
2005-02-21 12:48:54 +00:00
|
|
|
if (!IsTextSelection( sal_False ))
|
2004-11-15 15:51:46 +00:00
|
|
|
throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "no text selection" ) ), static_cast < cppu::OWeakObject * > ( this ) );
|
|
|
|
|
2009-06-03 11:26:39 +00:00
|
|
|
m_pView->GetWrtShell().LeftMargin(bExpand, sal_True);
|
2004-11-15 15:51:46 +00:00
|
|
|
}
|
2000-09-18 16:15:01 +00:00
|
|
|
else
|
|
|
|
throw uno::RuntimeException();
|
|
|
|
}
|
|
|
|
|
|
|
|
OUString SwXTextViewCursor::getImplementationName(void) throw( RuntimeException )
|
|
|
|
{
|
|
|
|
return C2U("SwXTextViewCursor");
|
|
|
|
}
|
|
|
|
|
2011-01-03 20:35:28 +00:00
|
|
|
sal_Bool SwXTextViewCursor::supportsService(const OUString& rServiceName) throw( RuntimeException )
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2001-04-17 07:32:32 +00:00
|
|
|
return !rServiceName.compareToAscii("com.sun.star.text.TextViewCursor") ||
|
|
|
|
!rServiceName.compareToAscii("com.sun.star.style.CharacterProperties") ||
|
|
|
|
!rServiceName.compareToAscii("com.sun.star.style.CharacterPropertiesAsian") ||
|
|
|
|
!rServiceName.compareToAscii("com.sun.star.style.CharacterPropertiesComplex") ||
|
2002-09-26 06:18:30 +00:00
|
|
|
!rServiceName.compareToAscii("com.sun.star.style.ParagraphProperties") ||
|
|
|
|
!rServiceName.compareToAscii("com.sun.star.style.ParagraphPropertiesAsian") ||
|
|
|
|
!rServiceName.compareToAscii("com.sun.star.style.ParagraphPropertiesComplex");
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
Sequence< OUString > SwXTextViewCursor::getSupportedServiceNames(void) throw( RuntimeException )
|
|
|
|
{
|
2002-09-26 06:18:30 +00:00
|
|
|
Sequence< OUString > aRet(7);
|
2000-09-18 16:15:01 +00:00
|
|
|
OUString* pArray = aRet.getArray();
|
|
|
|
pArray[0] = C2U("com.sun.star.text.TextViewCursor");
|
2001-04-17 07:32:32 +00:00
|
|
|
pArray[1] = C2U("com.sun.star.style.CharacterProperties");
|
|
|
|
pArray[2] = C2U("com.sun.star.style.CharacterPropertiesAsian");
|
|
|
|
pArray[3] = C2U("com.sun.star.style.CharacterPropertiesComplex");
|
|
|
|
pArray[4] = C2U("com.sun.star.style.ParagraphProperties");
|
2002-09-26 06:18:30 +00:00
|
|
|
pArray[5] = C2U("com.sun.star.style.ParagraphPropertiesAsian");
|
|
|
|
pArray[6] = C2U("com.sun.star.style.ParagraphPropertiesComplex");
|
2000-09-18 16:15:01 +00:00
|
|
|
return aRet;
|
|
|
|
}
|
2003-04-01 14:43:48 +00:00
|
|
|
|
2011-06-01 22:40:08 +01:00
|
|
|
namespace
|
|
|
|
{
|
|
|
|
class theSwXTextViewCursorUnoTunnelId : public rtl::Static< UnoTunnelIdInit, theSwXTextViewCursorUnoTunnelId > {};
|
|
|
|
}
|
|
|
|
|
2003-04-01 14:43:48 +00:00
|
|
|
const uno::Sequence< sal_Int8 > & SwXTextViewCursor::getUnoTunnelId()
|
|
|
|
{
|
2011-06-01 22:40:08 +01:00
|
|
|
return theSwXTextViewCursorUnoTunnelId::get().getSeq();
|
2003-04-01 14:43:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
//XUnoTunnel
|
|
|
|
sal_Int64 SAL_CALL SwXTextViewCursor::getSomething(
|
|
|
|
const uno::Sequence< sal_Int8 >& rId )
|
|
|
|
throw(uno::RuntimeException)
|
|
|
|
{
|
|
|
|
if( rId.getLength() == 16
|
|
|
|
&& 0 == rtl_compareMemory( getUnoTunnelId().getConstArray(),
|
|
|
|
rId.getConstArray(), 16 ) )
|
|
|
|
{
|
2007-09-27 11:43:56 +00:00
|
|
|
return sal::static_int_cast< sal_Int64 >( reinterpret_cast< sal_IntPtr >( this ));
|
2003-04-01 14:43:48 +00:00
|
|
|
}
|
|
|
|
return OTextCursorHelper::getSomething(rId);;
|
|
|
|
}
|
|
|
|
|
|
|
|
IMPLEMENT_FORWARD_XINTERFACE2(SwXTextViewCursor,SwXTextViewCursor_Base,OTextCursorHelper)
|
|
|
|
const SwDoc* SwXTextViewCursor::GetDoc() const
|
|
|
|
{
|
2009-06-03 11:26:39 +00:00
|
|
|
SwWrtShell& rSh = m_pView->GetWrtShell();
|
2003-04-01 14:43:48 +00:00
|
|
|
return rSh.GetCrsr() ? rSh.GetCrsr()->GetDoc() : 0;
|
|
|
|
}
|
2010-10-12 02:05:03 -05:00
|
|
|
|
2003-04-01 14:43:48 +00:00
|
|
|
SwDoc* SwXTextViewCursor::GetDoc()
|
|
|
|
{
|
2009-06-03 11:26:39 +00:00
|
|
|
SwWrtShell& rSh = m_pView->GetWrtShell();
|
2003-04-01 14:43:48 +00:00
|
|
|
return rSh.GetCrsr() ? rSh.GetCrsr()->GetDoc() : 0;
|
|
|
|
}
|
2010-10-12 02:05:03 -05:00
|
|
|
|
2003-04-01 14:43:48 +00:00
|
|
|
const SwPaM* SwXTextViewCursor::GetPaM() const
|
|
|
|
{
|
2009-06-03 11:26:39 +00:00
|
|
|
SwWrtShell& rSh = m_pView->GetWrtShell();
|
2003-04-01 14:43:48 +00:00
|
|
|
return rSh.GetCrsr();
|
|
|
|
}
|
2010-10-12 02:05:03 -05:00
|
|
|
|
2003-04-01 14:43:48 +00:00
|
|
|
SwPaM* SwXTextViewCursor::GetPaM()
|
|
|
|
{
|
2009-06-03 11:26:39 +00:00
|
|
|
SwWrtShell& rSh = m_pView->GetWrtShell();
|
2003-04-01 14:43:48 +00:00
|
|
|
return rSh.GetCrsr();
|
|
|
|
}
|
2006-05-08 13:48:31 +00:00
|
|
|
|
2007-09-27 11:43:56 +00:00
|
|
|
uno::Reference< datatransfer::XTransferable > SAL_CALL SwXTextView::getTransferable( ) throw (uno::RuntimeException)
|
2006-05-08 13:48:31 +00:00
|
|
|
{
|
2010-10-13 01:44:10 -05:00
|
|
|
SolarMutexGuard aGuard;
|
2006-05-08 13:48:31 +00:00
|
|
|
|
|
|
|
//force immediat shell update
|
|
|
|
GetView()->StopShellTimer();
|
|
|
|
SwWrtShell& rSh = GetView()->GetWrtShell();
|
2007-09-27 11:43:56 +00:00
|
|
|
if ( GetView()->GetShellMode() == SHELL_MODE_DRAWTEXT )
|
2006-05-08 13:48:31 +00:00
|
|
|
{
|
|
|
|
SdrView *pSdrView = rSh.GetDrawView();
|
|
|
|
OutlinerView* pOLV = pSdrView->GetTextEditOutlinerView();
|
|
|
|
return pOLV->GetEditView().GetTransferable();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
SwTransferable* pTransfer = new SwTransferable( rSh );
|
2011-01-17 15:06:54 +01:00
|
|
|
const sal_Bool bLockedView = rSh.IsViewLocked();
|
|
|
|
rSh.LockView( sal_True ); //lock visible section
|
2006-05-08 13:48:31 +00:00
|
|
|
pTransfer->PrepareForCopy();
|
|
|
|
rSh.LockView( bLockedView );
|
2007-09-27 11:43:56 +00:00
|
|
|
return uno::Reference< datatransfer::XTransferable >( pTransfer );
|
2006-05-08 13:48:31 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2007-09-27 11:43:56 +00:00
|
|
|
void SAL_CALL SwXTextView::insertTransferable( const uno::Reference< datatransfer::XTransferable >& xTrans ) throw (datatransfer::UnsupportedFlavorException, uno::RuntimeException)
|
2006-05-08 13:48:31 +00:00
|
|
|
{
|
2010-10-13 01:44:10 -05:00
|
|
|
SolarMutexGuard aGuard;
|
2008-07-17 11:43:02 +00:00
|
|
|
|
2006-05-08 13:48:31 +00:00
|
|
|
//force immediat shell update
|
|
|
|
GetView()->StopShellTimer();
|
|
|
|
SwWrtShell& rSh = GetView()->GetWrtShell();
|
2007-09-27 11:43:56 +00:00
|
|
|
if ( GetView()->GetShellMode() == SHELL_MODE_DRAWTEXT )
|
2006-05-08 13:48:31 +00:00
|
|
|
{
|
|
|
|
SdrView *pSdrView = rSh.GetDrawView();
|
|
|
|
OutlinerView* pOLV = pSdrView->GetTextEditOutlinerView();
|
2011-01-17 15:06:54 +01:00
|
|
|
pOLV->GetEditView().InsertText( xTrans, GetView()->GetDocShell()->GetMedium()->GetBaseURL(), sal_False );
|
2006-05-08 13:48:31 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
TransferableDataHelper aDataHelper( xTrans );
|
|
|
|
if ( SwTransferable::IsPaste( rSh, aDataHelper ) )
|
|
|
|
{
|
|
|
|
SwTransferable::Paste( rSh, aDataHelper );
|
|
|
|
if( rSh.IsFrmSelected() || rSh.IsObjSelected() )
|
|
|
|
rSh.EnterSelFrmMode();
|
|
|
|
GetView()->AttrChangedNotify( &rSh );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2010-10-14 08:30:41 +02:00
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|