2010-10-14 08:30:41 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2011-03-31 10:05:04 +02:00
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* This file incorporates work covered by the following license notice:
|
|
|
|
*
|
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
|
|
* with this work for additional information regarding copyright
|
|
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
|
|
* License, Version 2.0 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
|
|
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
|
|
*/
|
2000-09-18 23:08:29 +00:00
|
|
|
|
|
|
|
#include <hintids.hxx>
|
2010-01-08 18:32:51 +01:00
|
|
|
#include <editeng/charscaleitem.hxx>
|
2001-03-06 15:08:39 +00:00
|
|
|
#include <txtatr.hxx>
|
2000-09-18 23:08:29 +00:00
|
|
|
#include <sfx2/printer.hxx>
|
2010-06-13 15:22:56 +02:00
|
|
|
#include <svx/svdobj.hxx>
|
2000-09-18 23:08:29 +00:00
|
|
|
#include <vcl/window.hxx>
|
|
|
|
#include <vcl/svapp.hxx>
|
|
|
|
#include <fmtanchr.hxx>
|
|
|
|
#include <fmtfsize.hxx>
|
|
|
|
#include <fmtornt.hxx>
|
|
|
|
#include <fmtflcnt.hxx>
|
|
|
|
#include <fmtcntnt.hxx>
|
|
|
|
#include <fmtftn.hxx>
|
|
|
|
#include <frmatr.hxx>
|
|
|
|
#include <frmfmt.hxx>
|
|
|
|
#include <fmtfld.hxx>
|
|
|
|
#include <doc.hxx>
|
2013-10-22 15:58:57 +03:00
|
|
|
#include <viewsh.hxx>
|
2000-09-18 23:08:29 +00:00
|
|
|
#include <rootfrm.hxx>
|
|
|
|
#include <docary.hxx>
|
|
|
|
#include <ndtxt.hxx>
|
|
|
|
#include <dcontact.hxx>
|
2013-10-22 15:58:57 +03:00
|
|
|
#include <fldbas.hxx>
|
|
|
|
#include <pam.hxx>
|
2000-09-18 23:08:29 +00:00
|
|
|
#include <itratr.hxx>
|
|
|
|
#include <htmltbl.hxx>
|
|
|
|
#include <swtable.hxx>
|
|
|
|
#include <redlnitr.hxx>
|
|
|
|
#include <fmtsrnd.hxx>
|
2001-02-23 08:58:03 +00:00
|
|
|
#include <itrtxt.hxx>
|
2001-03-08 09:53:32 +00:00
|
|
|
#include <breakit.hxx>
|
|
|
|
#include <com/sun/star/i18n/WordType.hpp>
|
2012-06-21 17:39:01 +01:00
|
|
|
#include <com/sun/star/i18n/ScriptType.hpp>
|
2010-06-13 15:22:56 +02:00
|
|
|
#include <editeng/lrspitem.hxx>
|
2010-12-17 09:02:23 +01:00
|
|
|
#include <switerator.hxx>
|
2012-06-20 16:36:51 +02:00
|
|
|
#include <boost/foreach.hpp>
|
2000-09-18 23:08:29 +00:00
|
|
|
|
2001-03-08 09:53:32 +00:00
|
|
|
using namespace ::com::sun::star::i18n;
|
2000-11-30 10:42:24 +00:00
|
|
|
using namespace ::com::sun::star;
|
2000-09-27 10:53:31 +00:00
|
|
|
|
2000-09-18 23:08:29 +00:00
|
|
|
/*************************************************************************
|
|
|
|
* SwAttrIter::Chg()
|
|
|
|
*************************************************************************/
|
|
|
|
|
|
|
|
void SwAttrIter::Chg( SwTxtAttr *pHt )
|
|
|
|
{
|
2010-11-25 17:08:45 +01:00
|
|
|
OSL_ENSURE( pHt && pFnt, "No attribute of font available for change");
|
2001-03-05 11:54:15 +00:00
|
|
|
if( pRedln && pRedln->IsOn() )
|
|
|
|
pRedln->ChangeTxtAttr( pFnt, *pHt, sal_True );
|
|
|
|
else
|
|
|
|
aAttrHandler.PushAndChg( *pHt, *pFnt );
|
|
|
|
nChgCnt++;
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* SwAttrIter::Rst()
|
|
|
|
*************************************************************************/
|
|
|
|
|
|
|
|
void SwAttrIter::Rst( SwTxtAttr *pHt )
|
|
|
|
{
|
2010-11-25 17:08:45 +01:00
|
|
|
OSL_ENSURE( pHt && pFnt, "No attribute of font available for reset");
|
2001-03-05 11:54:15 +00:00
|
|
|
// get top from stack after removing pHt
|
|
|
|
if( pRedln && pRedln->IsOn() )
|
|
|
|
pRedln->ChangeTxtAttr( pFnt, *pHt, sal_False );
|
|
|
|
else
|
|
|
|
aAttrHandler.PopAndChg( *pHt, *pFnt );
|
|
|
|
nChgCnt--;
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* virtual SwAttrIter::~SwAttrIter()
|
|
|
|
*************************************************************************/
|
|
|
|
|
|
|
|
SwAttrIter::~SwAttrIter()
|
|
|
|
{
|
|
|
|
delete pRedln;
|
|
|
|
delete pFnt;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* SwAttrIter::GetAttr()
|
|
|
|
*
|
|
|
|
* Liefert fuer eine Position das Attribut, wenn das Attribut genau auf
|
|
|
|
* der Position nPos liegt und kein EndIndex besitzt.
|
|
|
|
* GetAttr() wird fuer Attribute benoetigt, die die Formatierung beeinflussen
|
|
|
|
* sollen, ohne dabei den Inhalt des Strings zu veraendern. Solche "entarteten"
|
|
|
|
* Attribute sind z.B. Felder (die expandierten Text bereit halten) und
|
|
|
|
* zeilengebundene Frames. Um Mehrdeutigkeiten zwischen verschiedenen
|
|
|
|
* solcher Attribute zu vermeiden, werden beim Anlegen eines Attributs
|
|
|
|
* an der Startposition ein Sonderzeichen in den String einfuegt.
|
|
|
|
* Der Formatierer stoesst auf das Sonderzeichen und holt sich per
|
|
|
|
* GetAttr() das entartete Attribut.
|
|
|
|
*************************************************************************/
|
|
|
|
|
2007-09-27 08:13:42 +00:00
|
|
|
SwTxtAttr *SwAttrIter::GetAttr( const xub_StrLen nPosition ) const
|
2000-09-18 23:08:29 +00:00
|
|
|
{
|
CWS-TOOLING: integrate CWS odfmetadata3
2009-09-11 Michael Stahl merge DEV300_m58
2009-09-07 Michael Stahl SwFmtFld::Modify(): do nothing on RES_OBJECTDYING
2009-08-27 Michael Stahl #i91565#, #i91566#: TextPortionEnumerationTest.java: add test document
2009-08-27 Michael Stahl #i91565#, #i91566#: add complex test: TextPortionEnumerationTest.java
2009-08-27 Michael Stahl CLiteral::initialize(): zero-length literals probably not an error
2009-08-27 Michael Stahl #i91565#, #i91566#: offapi: new InContentMetadata and MetadataField services
adapt TextPortion for InContentMetadata
2009-08-27 Michael Stahl #i91564#: xmloff: load/store xml:id and RDFa for text:bookmark(-start).
2009-08-27 Michael Stahl #i91564#: sw core: add support for xml:id at bookmarks:
sw::mark::Bookmark: derive from Metadatable.
SwHistoryBookmark, SaveBookmark: store a MetadatableUndo.
ndcopy.cxx: lcl_CopyBookmarks(): copy the xml:id.
SwXBookmark: derive from MetadatableMixin.
2009-08-27 Michael Stahl #i91565#, #i91566#: xmloff: refactor ruby import so nested meta(-field) works:
remove XMLRubyHint_Impl.
XMLImpRubyContext_Impl::~XMLImpRubyContext_Impl(): insert ruby directly.
2009-08-27 Michael Stahl #i91565#, #i91566#: xmloff: fix text:meta(-field) import/export:
new XMLTextParagraphExport::exportTextField() overload for XTextField.
CreateAndInsertMark(): set xml:id after insertion.
fix meta(-field) service names, bugs etc.
2009-08-27 Michael Stahl #i91565#, #i91566#: sw text formatting: paint background of meta(-field) body:
SwFont: add member m_nMetaCount.
txttypes.hxx: add POR_META.
atrstck.cxx: handle RES_TXTATR_META(FIELD).
itrform2.cxx: SwTxtFormatter::WhichTxtPor(): create new class SwMetaPortion.
2009-08-27 Michael Stahl #i91566#: sw text formatting: display meta-field prefix and suffix:
SwAttrIter::GetAttr(): replace with call to GetTxtAttrForCharAt().
SwTxtFormatter::NewExtraPortion(): handle meta-field prefix.
SwTxtFormatter: new member m_nHintEndIndex.
SwTxtFormatter::WhichFirstPortion(): call TryNewNoLengthPortion().
SwTxtFormatter::TryNewNoLengthPortion(): new; handle suffix of meta-field.
SwTxtFormatter::UnderFlow(): UGLY HACK: decrement m_nHintEndIndex.
SwFldPortion: add flag m_bNoLength: portion has zero length (for suffix).
2009-08-27 Michael Stahl #i91565#, #i91566#: extend text:meta(-field) uno wrapper with XText interface:
unoobj.hxx: new CursorType CURSOR_META.
unoobj2.cxx: refactor SwXText implementation to ensure that when the SwXText
belongs to a SwXMeta, content is always inserted inside the meta(-field).
unoobj.cxx: new SwXTextCursor::ForceIntoMeta(): cursor stays in meta(-field).
unometa.hxx: SwXMeta implements XText, forwarding to a member SwXMetaText.
DocInsertStringSplitCR(), SwX*::attachToRange(), SwX*::DeleteAndInsert():
use FORCEHINTEXPAND hack to ensure insert into the meta(-field) at the end.
2009-08-27 Michael Stahl #i91565#, #i91566#: add text:meta(-field) uno wrapper to sw:
fmtmeta.hxx, fmtatr2.cxx: new class sw::MetaField, new sw::MetaFieldManager.
doc.hxx, docnew.cxx: new SwDoc::GetMetaFieldManager().
unocoll.hxx,.cxx: new SW_SERVICE_FIELDTYPE_METAFIELD, SW_SERVICE_TYPE_META.
unomap.hxx,.cxx: new PROPERTY_MAP_METAFIELD.
unoprnms.hxx: new UNO_NAME_META.
unoport.hxx: new PORTION_META; add "InContentMetadata" prop to SwXTextPortion.
new unometa.hxx: new class SwXMeta and SwXMetaField.
unofield.cxx: SwXFieldEnumeration: include meta-fields.
unoportenum.cxx: handle RES_TXTATR_META(FIELD) by using a portion list stack.
unotext.cxx: SwXText::insertTextContent(): handle meta(-field) as attribute.
2009-08-27 Michael Stahl #i91565#, #i91566#: ndhints.cxx: remove sort number from SwTxtAttrNesting
2009-08-27 Michael Stahl #i91565#, #i91566#: add support for hints with end and CH_TXTATR to sw core:
doc.hxx, docedt.cxx: replace SwDoc::Delete(), DeleteAndJoin(), ReplaceRange()
with wrappers that split at left-overlapped end+CH_TXTATR hints.
txatbase.hxx: new member SwTxtAttr::m_bHasDummyChar.
ndtxt.hxx: rename SwTxtNode::GetTxtAttr() to GetTxtAttrForCharAt().
ndtxt.cxx: SwTxtNode::CopyText(): copy end+CH_TXTATR hints iff copy CH_TXTATR.
txtatr2.cxx, thints.cxx: SwTxtMeta gets a CH_TXTATR.
2009-08-27 Michael Stahl #i91565#, #i91566#: add text:meta(-field) to sw core:
txatbase.hxx: new member SwTxtAttr::m_bNesting.
hintids.hxx: new ids RES_TXTATR_META, RES_TXTATR_METAFIELD.
txtatr.hxx: new base class SwTxtAttrNesting.
new hint SwTxtMeta.
SwTxtRuby derives from SwTxtAttrNesting.
txtinet.hxx: SwTxtINetFmt derives from SwTxtAttrNesting.
new header fmtmeta.hxx: new pool item SwFmtMeta. new class sw::Meta.
ndhints.hxx, thints.cxx: new method SwpHints::TryInsertNesting().
thints.cxx: refactoring: BuildPortions() no longer handles Ruby/Hyperlink,
but TryInsertNesting(), which also handles meta(-field).
SwTxtNode::InsertItem(): check if the hint is actually inserted.
ndhints.cxx: sort nesting hints based on sort number.
ndtxt.cxx: lcl_CopyHint(): handle copy of meta/meta-field.
2009-08-27 Michael Stahl enable expanding hints with m_bLockExpandFlag set:
add new InsertFlag: INS_FORCEHINTEXPAND.
add new SetAttrMode: SETATTR_FORCEHINTEXPAND.
rename SwEditShell::Insert() to Insert2() because changed signature fails
to compile when SwWrtShell tries to overwrite these non-virtual members...
SwWrtShell::Insert() sets FOCEHINTEXPAND if range was selected/deleted.
adapt SwUndoInsert to store flags.
2009-08-27 Michael Stahl change formal parameters of item insertion methods to type SetAttrMode
2009-08-27 Michael Stahl fix incorrect resetting of text attributes in SwUndoInsSection, SwUndoInserts
2009-08-27 Michael Stahl clean up SwTxtNode::CutImpl() and lcl_CopyHint()
2009-08-27 Michael Stahl rename SwDoc::Copy() to CopyRange(), and _Copy() to CopyImpl()
2009-08-27 Michael Stahl rename SwNodes::Move() to MoveRange(), and remove unused parameter
2009-08-27 Michael Stahl rename SwDoc::Move() to MoveRange()/MoveNodeRange()
2009-08-27 Michael Stahl rename SwDoc::Insert() to InsertString(), and remove sal_Unicode variant
2009-08-27 Michael Stahl rename SwDoc::Insert() to InsertPoolItem()/InsertItemSet()/InsertSwSection()
2009-08-27 Michael Stahl rename SwDoc::Replace() to ReplaceRange()
2009-08-27 Michael Stahl remove SwDoc::Overwrite() sal_Unicode variant
2009-08-27 Michael Stahl split up SwDoc::DeleteAndJoin(): factor out DeleteAndJoinWithRedline()
2009-08-27 Michael Stahl rename overloaded SwDoc::Delete() to DeleteRange()/DeleteTOXMark()
2009-08-27 Michael Stahl rename SwTxtNode::Copy() to CopyText()
2009-08-27 Michael Stahl rename SwTxtNode::Cut() to CutText(), and _Cut() to CutImpl()
2009-08-27 Michael Stahl rename SwTxtNode::Delete() to DeleteAttribute()/DeleteAttributes()
2009-08-27 Michael Stahl rename SwTxtNode::Replace() to ReplaceText(), and remove the xub_Unicode variant
2009-08-27 Michael Stahl rename SwTxtNode::Erase() to EraseText()
2009-08-27 Michael Stahl rename SwTxtNode::Insert() to InsertText(), and remove the xub_Unicode variant
2009-08-27 Michael Stahl clean up SwTxtNode::Update()
2009-08-27 Michael Stahl remove SwTxtAttr::RemoveFromPool() and make destructor non-public,
to be invoked by new method SwTxtAttr::Destroy()
2009-08-27 Michael Stahl ensure that SwDoc::Insert() for item (set) returns success indicator:
replace SwRegHistory constructor with method InsertItems(), returning bool.
refactor InsAttr() so that it checks if InsertItems() succeeds.
2009-08-27 Michael Stahl move SwXTextPortionEnumeration from unoobj.hxx to unoport.hxx
2009-08-27 Michael Stahl add missing SolarMutex in SwXTextPortion methods
2009-08-27 Michael Stahl SwXTextPortion: new member m_xTextField (so the TextField property need not
be returned indirectly via SwUnoCursorHelper).
factor out function CreateSwXTextField().
2009-08-27 Michael Stahl SwXTextPortion: remove PORTION_CONTROL_CHAR and implementation of XTextField
2009-08-27 Michael Stahl remove obsolete hint SwTxtHardBlank and formats SwFmtHardBlank/SwFmtSoftHyph
2009-08-27 Michael Stahl clean up SwTxtAttr and friends:
remove many accessor methods for obsolete (due to autofmt) char format items.
remove unused flag SwTxtAttr::m_bDontMergeAttr.
MakeRedlineTxtAttr() now dedicated function, no longer calls MakeTxtAttr().
2009-08-27 Michael Stahl remove obsolete attribute SwTxt2Lines
2009-08-27 Michael Stahl SwXTextPortionEnumeration: finish refactoring CreatePortions
change ExportHints so it always returns a text portion for hint w/ CH_TXTATR.
remove special case for handling end of paragraph.
unfortunately had to refactor the fieldmarks export as well (got in the way).
2009-08-27 Michael Stahl SwXTextPortionEnumeration: refactor CreatePortions: frames export
extract function ExportFrames() from CreatePortions().
remove (un)dead code that calls evil MovePara(fnParaCurr, fnParaEnd)
2009-08-27 Michael Stahl clean up SwXParaFrameEnumeration
2009-08-27 Michael Stahl CollectFrameAtNode: replace SwDependArr with STL based FrameDependList_t
2009-08-27 Michael Stahl SwXTextPortionEnumeration: tweak refmark/toxmark export
so ExportHints returns the portion for point marks
2009-08-27 Michael Stahl clean up SwXTextPortionEnumeration:
prefix members, remove casts, replace SvWeirdArray with STL, etc.
make CreatePortions() method a function, and remove lots of members.
extract fieldmarks function from CreatePortions.
2009-08-27 Michael Stahl remove FOREACHUNOPAM_START/END macros
2009-08-27 Michael Stahl clean up SwXTextPortion:
prefix members, remove casts, etc.
remove SwXRubyPortion: replace it with another SwXTextPortion constructor
2009-08-27 Michael Stahl #i102541# SwXReferenceMark::InsertRefMark(): use flag SETATTR_DONTEXPAND
2009-08-27 Michael Stahl rename SwTxtNode::Insert to SwTxtNode::InsertHint, and
fix constness in SwTxtNode::InsertItem
2009-08-27 Michael Stahl turn SwTxtNode::MakeTxtAttr() methods into global functions in ndhints.hxx
2009-08-27 Michael Stahl remove obsolete sw/inc/bookmrk.hxx
2009-08-27 Michael Stahl pam.cxx: fix ComparePosition functions (returned wrong result in one case)
2009-08-27 Michael Stahl #i103613# only import RDF metadata on normal open of a document
2009-09-11 kz CWS-TOOLING: integrate CWS impress176
2009-09-08 20:18:24 +0200 sj r275957 : fixed warning (shadowed variable)
2009-09-08 18:02:05 +0200 cl r275948 : #i104315# added missing tab pages
2009-09-08 17:35:18 +0200 cl r275947 : #i104866# fixed angle import
2009-09-08 17:32:53 +0200 cl r275946 : #i104841# fixed angle import
2009-09-08 17:01:25 +0200 cl r275943 : #i103935# fixed the SID_EVENTCONFIG mess
2009-09-08 14:32:57 +0200 sj r275928 : #i104685# only comments
2009-09-07 12:37:36 +0200 sj r275886 : #i104683# fixed import of bold/italic attributes for normal text shapes
2009-09-04 15:07:46 +0200 sj r275808 : #104689# fixed bullet color problem
2009-09-03 15:25:07 +0200 sj r275753 : #160200# added vertical alignment of table cells
2009-09-11 kz CWS-TOOLING: integrate CWS dv14
2009-09-10 15:16:32 +0200 sg r276035 : #160513# updated wfs scheme to accept ports
2009-09-10 07:41:47 +0200 dv r276019 : #i104942# Better renaming algorithmen
2009-08-31 13:41:11 +0200 dv r275604 : #160505# Setting APP1PRODUCTNAME must not overwrite APP1PRODUCTDEF
2009-09-11 kz CWS-TOOLING: integrate CWS jl131
2009-09-02 16:42:40 +0200 jl r275720 : #i97896#
2009-08-31 13:01:53 +0200 jl r275599 : CWS-TOOLING: rebase CWS jl131 to trunk@275331 (milestone: DEV300:m56)
2009-07-31 14:35:30 +0200 jl r274531 : CWS-TOOLING: rebase CWS jl131 to trunk@274203 (milestone: DEV300:m53)
2009-07-23 14:20:32 +0200 jl r274272 : #i79839# better error text when trying to modify shared layer without having write permission, eg. unopkg add --shared, unopkg remove --shared, unopkg reinstall --shared
2009-07-22 16:38:02 +0200 jl r274252 : #i97896# localize error message for lock file
2009-07-22 16:37:22 +0200 jl r274251 : #i80462# unprecise wording in updatedialog
2009-07-22 16:36:06 +0200 jl r274250 : #i97896# localize error message for lock file
2009-07-22 16:35:20 +0200 jl r274249 : #i97896# localize error message for lock file
2009-07-22 15:07:30 +0200 jl r274242 : #i98873# minimum java version is 1.5 since OOo 3.0
2009-09-11 kz CWS-TOOLING: integrate CWS changehc
2009-08-31 19:38:50 +0200 pl r275633 : remove dbug printf
2009-08-31 17:41:50 +0200 pl r275623 : CWS-TOOLING: rebase CWS changehc to trunk@275331 (milestone: DEV300:m56)
2009-07-15 19:45:46 +0200 pl r274028 : #i35482# use HC flag to decide high contrast mode
2009-07-15 17:40:52 +0200 pl r274020 : #i35482# use HC flag to decide high contrast mode
2009-07-15 17:39:50 +0200 pl r274019 : #i35482# update autohc correctly in MergeSystemSettings
2009-07-15 17:38:57 +0200 pl r274018 : #i35482# update autohc correctly in MergeSystemSettings
2009-09-11 kz CWS-TOOLING: integrate CWS notes10
2009-08-24 07:25:57 +0200 mod r275287 : 2009-07-26 02:38:32 +0200 mod r274343 : #i#i103645#
2009-07-26 02:01:53 +0200 mod r274342 : #i103645#
2009-07-26 01:52:42 +0200 mod r274341 : #i103490#
2009-07-22 08:31:48 +0200 mod r274215 : #i103373#
2009-07-15 00:55:11 +0200 mod r273987 : #i101419#
2009-07-14 07:07:55 +0200 mod r273956 : #i101419#
2009-07-14 07:07:43 +0200 mod r273955 : #i101419#
2009-07-14 07:02:10 +0200 mod r273954 : changes from notes9
2009-07-14 06:14:25 +0200 mod r273953 : #i103476#
2009-09-11 kz CWS-TOOLING: integrate CWS ab70
2009-09-10 15:12:54 +0200 jsk r276034 : #i85434# - mandatory automatic update test
2009-09-10 15:11:06 +0200 jsk r276033 : #i85434# - mandatory automatic update test
2009-09-02 09:49:24 +0200 ab r275698 : #i85434# Dialog Import
2009-09-11 kz CWS-TOOLING: integrate CWS hb32bugs02
2009-09-02 Henning Brinkmann #i102420# revert changes
2009-08-26 Henning Brinkmann merged DEV300_m56
2009-08-19 Henning Brinkmann merged DEV300_m55
2009-08-14 Henning Brinkmann merged changes from wntmsci12
2009-08-12 Henning Brinkmann Implemented NoSpaceEdit constructor and destructor in .cxx to allow compile with debug on wntmsci12.
2009-08-12 Henning Brinkmann Added some SW_DLLPUBLIC to make compilable on wntmsci12.
2009-08-11 Henning Brinkmann #i102420# dbg_out: surround output for SwNodes with <nodes-array>.
2009-08-10 Henning Brinkmann #i102420# rewritten debug output for SwNodes.
2009-08-07 Henning Brinkmann #i102420# debug _MoveNodes: output the destination, too. Break after two iterations.
2009-08-07 Henning Brinkmann #i102420# _MoveNodes: Additionally check if destination index is inside source => false
Check if current range was already handled => loop
Debug output current range
2009-08-06 Henning Brinkmann merged DEV300_m54
2009-08-06 Henning Brinkmann added master fix
2009-08-06 Henning Brinkmann debug output for SwNodeRange
2009-08-04 Henning Brinkmann #i102844# robustness: check for NULL pointer to prevent crash
2009-08-03 Henning Brinkmann #i103475# applied patch and verified
2009-08-03 Henning Brinkmann Removed code preventing build of sw with DEBUG.
2009-09-11 convert-repo update tags
2009-09-10 kz CWS-TOOLING: integrate CWS os2port06dev300
2009-09-05 22:49:00 +0200 ydario r275858 : #i99588# applied os2port06 diff to DEV300 tree.
2009-09-10 kz CWS-TOOLING: integrate CWS mingwport23
2009-08-29 07:07:53 +0200 tono r275555 : i#104522: mingw port graphite
2009-08-29 07:07:26 +0200 tono r275554 : i#104522: mingw port printf format fix
2009-09-10 kz CWS-TOOLING: integrate CWS mh232
2009-08-26 03:52:57 +0200 mh r275385 : #i102182# FreeBSD patch
2009-08-26 03:43:20 +0200 mh r275384 : #i101333# patch for FreeBSD
2009-08-26 03:11:20 +0200 mh r275383 : #i39230
2009-08-26 03:07:51 +0200 mh r275382 : #i39230# more space for initials field
2009-08-26 02:41:19 +0200 mh r275380 : #i39230# use vos::osecurity for reading the user name
2009-08-18 22:06:00 +0200 mh r275130 : #i104243#, line ending problem with newer perl
2009-08-18 21:53:21 +0200 mh r275129 : #i39230# read initials via getpwnam
2009-08-18 21:34:05 +0200 mh r275128 : enable CAIROCANVAS for Linux and Mac, #i88613#
2009-08-17 18:02:59 +0200 mh r275067 : #i95498# make compile with gcc3
2009-09-10 kz CWS-TOOLING: integrate CWS tkr24
2009-09-07 14:31:06 +0200 is r275898 : #160081# adding NO_LICENSE_INTO_COPYRIGHT
2009-09-10 releng #i10000# change KeyMapping to SingletonRef<framework::KeyMapping>
2009-09-11 convert-repo update tags
2009-09-10 kz CWS-TOOLING: integrate CWS os2port06dev300
2009-09-05 22:49:00 +0200 ydario r275858 : #i99588# applied os2port06 diff to DEV300 tree.
2009-09-10 kz CWS-TOOLING: integrate CWS mingwport23
2009-08-29 07:07:53 +0200 tono r275555 : i#104522: mingw port graphite
2009-08-29 07:07:26 +0200 tono r275554 : i#104522: mingw port printf format fix
2009-09-10 kz CWS-TOOLING: integrate CWS mh232
2009-08-26 03:52:57 +0200 mh r275385 : #i102182# FreeBSD patch
2009-08-26 03:43:20 +0200 mh r275384 : #i101333# patch for FreeBSD
2009-08-26 03:11:20 +0200 mh r275383 : #i39230
2009-08-26 03:07:51 +0200 mh r275382 : #i39230# more space for initials field
2009-08-26 02:41:19 +0200 mh r275380 : #i39230# use vos::osecurity for reading the user name
2009-08-18 22:06:00 +0200 mh r275130 : #i104243#, line ending problem with newer perl
2009-08-18 21:53:21 +0200 mh r275129 : #i39230# read initials via getpwnam
2009-08-18 21:34:05 +0200 mh r275128 : enable CAIROCANVAS for Linux and Mac, #i88613#
2009-08-17 18:02:59 +0200 mh r275067 : #i95498# make compile with gcc3
2009-09-10 kz CWS-TOOLING: integrate CWS tkr24
2009-09-07 14:31:06 +0200 is r275898 : #160081# adding NO_LICENSE_INTO_COPYRIGHT
2009-09-10 releng #i10000# change KeyMapping to SingletonRef<framework::KeyMapping>
2009-09-11 14:29:45 +00:00
|
|
|
return (m_pTxtNode) ? m_pTxtNode->GetTxtAttrForCharAt(nPosition) : 0;
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* SwAttrIter::SeekAndChg()
|
|
|
|
*************************************************************************/
|
|
|
|
|
2007-09-27 08:13:42 +00:00
|
|
|
sal_Bool SwAttrIter::SeekAndChgAttrIter( const xub_StrLen nNewPos, OutputDevice* pOut )
|
2000-09-18 23:08:29 +00:00
|
|
|
{
|
|
|
|
sal_Bool bChg = nStartIndex && nNewPos == nPos ? pFnt->IsFntChg() : Seek( nNewPos );
|
|
|
|
if ( pLastOut != pOut )
|
|
|
|
{
|
|
|
|
pLastOut = pOut;
|
|
|
|
pFnt->SetFntChg( sal_True );
|
|
|
|
bChg = sal_True;
|
|
|
|
}
|
|
|
|
if( bChg )
|
|
|
|
{
|
|
|
|
// wenn der Aenderungszaehler auf Null ist, kennen wir die MagicNo
|
|
|
|
// des gewuenschten Fonts ...
|
2000-12-11 10:05:15 +00:00
|
|
|
if ( !nChgCnt && !nPropFont )
|
2000-09-27 10:53:31 +00:00
|
|
|
pFnt->SetMagic( aMagicNo[ pFnt->GetActual() ],
|
|
|
|
aFntIdx[ pFnt->GetActual() ], pFnt->GetActual() );
|
2003-10-15 08:55:55 +00:00
|
|
|
pFnt->ChgPhysFnt( pShell, *pOut );
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
2013-07-28 12:44:52 +02:00
|
|
|
|
2000-09-18 23:08:29 +00:00
|
|
|
return bChg;
|
|
|
|
}
|
|
|
|
|
|
|
|
sal_Bool SwAttrIter::IsSymbol( const xub_StrLen nNewPos )
|
|
|
|
{
|
|
|
|
Seek( nNewPos );
|
2000-12-11 10:05:15 +00:00
|
|
|
if ( !nChgCnt && !nPropFont )
|
2000-09-27 10:53:31 +00:00
|
|
|
pFnt->SetMagic( aMagicNo[ pFnt->GetActual() ],
|
|
|
|
aFntIdx[ pFnt->GetActual() ], pFnt->GetActual() );
|
2000-09-18 23:08:29 +00:00
|
|
|
return pFnt->IsSymbol( pShell );
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* SwAttrIter::SeekStartAndChg()
|
|
|
|
*************************************************************************/
|
2013-07-28 12:44:52 +02:00
|
|
|
|
2013-08-16 13:01:37 +02:00
|
|
|
sal_Bool SwAttrIter::SeekStartAndChgAttrIter( OutputDevice* pOut, const sal_Bool bParaFont )
|
2000-09-18 23:08:29 +00:00
|
|
|
{
|
2001-03-08 07:16:18 +00:00
|
|
|
if ( pRedln && pRedln->ExtOn() )
|
|
|
|
pRedln->LeaveExtend( *pFnt, 0 );
|
|
|
|
|
2001-07-12 10:21:31 +00:00
|
|
|
// reset font to its original state
|
2001-03-19 14:58:50 +00:00
|
|
|
aAttrHandler.Reset();
|
2001-07-12 10:21:31 +00:00
|
|
|
aAttrHandler.ResetFont( *pFnt );
|
|
|
|
|
2000-09-18 23:08:29 +00:00
|
|
|
nStartIndex = nEndIndex = nPos = nChgCnt = 0;
|
2000-12-11 10:05:15 +00:00
|
|
|
if( nPropFont )
|
|
|
|
pFnt->SetProportion( nPropFont );
|
2000-09-18 23:08:29 +00:00
|
|
|
if( pRedln )
|
|
|
|
{
|
|
|
|
pRedln->Clear( pFnt );
|
|
|
|
if( !bParaFont )
|
2007-09-27 08:13:42 +00:00
|
|
|
nChgCnt = nChgCnt + pRedln->Seek( *pFnt, 0, STRING_LEN );
|
2000-09-18 23:08:29 +00:00
|
|
|
else
|
|
|
|
pRedln->Reset();
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( pHints && !bParaFont )
|
|
|
|
{
|
|
|
|
SwTxtAttr *pTxtAttr;
|
|
|
|
// Solange wir noch nicht am Ende des StartArrays angekommen sind &&
|
|
|
|
// das TextAttribut an Position 0 beginnt ...
|
|
|
|
while ( ( nStartIndex < pHints->GetStartCount() ) &&
|
|
|
|
!(*(pTxtAttr=pHints->GetStart(nStartIndex))->GetStart()) )
|
|
|
|
{
|
|
|
|
// oeffne die TextAttribute
|
|
|
|
Chg( pTxtAttr );
|
|
|
|
nStartIndex++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2007-09-27 08:13:42 +00:00
|
|
|
sal_Bool bChg = pFnt->IsFntChg();
|
2000-09-18 23:08:29 +00:00
|
|
|
if ( pLastOut != pOut )
|
|
|
|
{
|
|
|
|
pLastOut = pOut;
|
|
|
|
pFnt->SetFntChg( sal_True );
|
|
|
|
bChg = sal_True;
|
|
|
|
}
|
|
|
|
if( bChg )
|
|
|
|
{
|
|
|
|
// wenn der Aenderungszaehler auf Null ist, kennen wir die MagicNo
|
|
|
|
// des gewuenschten Fonts ...
|
2000-12-11 10:05:15 +00:00
|
|
|
if ( !nChgCnt && !nPropFont )
|
2000-09-27 10:53:31 +00:00
|
|
|
pFnt->SetMagic( aMagicNo[ pFnt->GetActual() ],
|
|
|
|
aFntIdx[ pFnt->GetActual() ], pFnt->GetActual() );
|
2003-10-15 08:55:55 +00:00
|
|
|
pFnt->ChgPhysFnt( pShell, *pOut );
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
return bChg;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* SwAttrIter::SeekFwd()
|
|
|
|
*************************************************************************/
|
|
|
|
|
|
|
|
// AMA: Neuer AttrIter Nov 94
|
|
|
|
|
|
|
|
void SwAttrIter::SeekFwd( const xub_StrLen nNewPos )
|
|
|
|
{
|
|
|
|
SwTxtAttr *pTxtAttr;
|
|
|
|
|
|
|
|
if ( nStartIndex ) // wenn ueberhaupt schon Attribute geoeffnet wurden...
|
|
|
|
{
|
|
|
|
// Schliesse Attr, die z. Z. geoeffnet sind, vor nNewPos+1 aber enden.
|
|
|
|
|
|
|
|
// Solange wir noch nicht am Ende des EndArrays angekommen sind &&
|
|
|
|
// das TextAttribut vor oder an der neuen Position endet ...
|
|
|
|
while ( ( nEndIndex < pHints->GetEndCount() ) &&
|
|
|
|
(*(pTxtAttr=pHints->GetEnd(nEndIndex))->GetAnyEnd()<=nNewPos))
|
|
|
|
{
|
|
|
|
// schliesse die TextAttribute, deren StartPos vor
|
|
|
|
// oder an der alten nPos lag, die z.Z. geoeffnet sind.
|
|
|
|
if (*pTxtAttr->GetStart() <= nPos) Rst( pTxtAttr );
|
|
|
|
nEndIndex++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else // ueberlies die nicht geoeffneten Enden
|
|
|
|
{
|
|
|
|
while ( ( nEndIndex < pHints->GetEndCount() ) &&
|
|
|
|
(*(pTxtAttr=pHints->GetEnd(nEndIndex))->GetAnyEnd()<=nNewPos))
|
|
|
|
{
|
|
|
|
nEndIndex++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// Solange wir noch nicht am Ende des StartArrays angekommen sind &&
|
|
|
|
// das TextAttribut vor oder an der neuen Position beginnt ...
|
|
|
|
while ( ( nStartIndex < pHints->GetStartCount() ) &&
|
|
|
|
(*(pTxtAttr=pHints->GetStart(nStartIndex))->GetStart()<=nNewPos))
|
|
|
|
{
|
2013-07-28 12:44:52 +02:00
|
|
|
|
2000-09-18 23:08:29 +00:00
|
|
|
// oeffne die TextAttribute, deren Ende hinter der neuen Position liegt
|
|
|
|
if ( *pTxtAttr->GetAnyEnd() > nNewPos ) Chg( pTxtAttr );
|
|
|
|
nStartIndex++;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* SwAttrIter::Seek()
|
|
|
|
*************************************************************************/
|
|
|
|
|
|
|
|
sal_Bool SwAttrIter::Seek( const xub_StrLen nNewPos )
|
|
|
|
{
|
2001-03-08 07:16:18 +00:00
|
|
|
if ( pRedln && pRedln->ExtOn() )
|
|
|
|
pRedln->LeaveExtend( *pFnt, nNewPos );
|
|
|
|
|
2000-09-18 23:08:29 +00:00
|
|
|
if( pHints )
|
|
|
|
{
|
2013-08-16 13:01:37 +02:00
|
|
|
if( !nNewPos || nNewPos < nPos )
|
2000-09-18 23:08:29 +00:00
|
|
|
{
|
|
|
|
if( pRedln )
|
|
|
|
pRedln->Clear( NULL );
|
2001-07-12 10:21:31 +00:00
|
|
|
|
|
|
|
// reset font to its original state
|
2001-03-19 14:58:50 +00:00
|
|
|
aAttrHandler.Reset();
|
2001-07-12 10:21:31 +00:00
|
|
|
aAttrHandler.ResetFont( *pFnt );
|
|
|
|
|
2000-12-11 10:05:15 +00:00
|
|
|
if( nPropFont )
|
|
|
|
pFnt->SetProportion( nPropFont );
|
2000-09-18 23:08:29 +00:00
|
|
|
nStartIndex = nEndIndex = nPos = 0;
|
|
|
|
nChgCnt = 0;
|
2002-04-22 11:35:17 +00:00
|
|
|
|
|
|
|
// Achtung!
|
|
|
|
// resetting the font here makes it necessary to apply any
|
|
|
|
// changes for extended input directly to the font
|
|
|
|
if ( pRedln && pRedln->ExtOn() )
|
|
|
|
{
|
|
|
|
pRedln->UpdateExtFont( *pFnt );
|
|
|
|
++nChgCnt;
|
|
|
|
}
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
SeekFwd( nNewPos );
|
|
|
|
}
|
2001-10-22 12:03:21 +00:00
|
|
|
|
2003-10-30 09:19:20 +00:00
|
|
|
pFnt->SetActual( SwScriptInfo::WhichFont( nNewPos, 0, pScriptInfo ) );
|
2001-10-22 12:03:21 +00:00
|
|
|
|
2000-09-18 23:08:29 +00:00
|
|
|
if( pRedln )
|
2007-09-27 08:13:42 +00:00
|
|
|
nChgCnt = nChgCnt + pRedln->Seek( *pFnt, nNewPos, nPos );
|
2000-09-18 23:08:29 +00:00
|
|
|
nPos = nNewPos;
|
2001-03-15 14:59:12 +00:00
|
|
|
|
|
|
|
if( nPropFont )
|
|
|
|
pFnt->SetProportion( nPropFont );
|
|
|
|
|
2000-09-18 23:08:29 +00:00
|
|
|
return pFnt->IsFntChg();
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
* SwAttrIter::GetNextAttr()
|
|
|
|
*************************************************************************/
|
|
|
|
|
|
|
|
xub_StrLen SwAttrIter::GetNextAttr( ) const
|
|
|
|
{
|
|
|
|
xub_StrLen nNext = STRING_LEN;
|
|
|
|
if( pHints )
|
|
|
|
{
|
2013-06-15 21:25:27 +02:00
|
|
|
// are there attribute starts left?
|
|
|
|
for (sal_uInt16 i = nStartIndex; i < pHints->GetStartCount(); ++i)
|
2000-09-18 23:08:29 +00:00
|
|
|
{
|
2013-06-15 21:25:27 +02:00
|
|
|
SwTxtAttr *const pAttr(pHints->GetStart(i));
|
|
|
|
if (!pAttr->IsFormatIgnoreStart())
|
|
|
|
{
|
|
|
|
nNext = *pAttr->GetStart();
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// are there attribute ends left?
|
|
|
|
for (sal_uInt16 i = nEndIndex; i < pHints->GetEndCount(); ++i)
|
|
|
|
{
|
|
|
|
SwTxtAttr *const pAttr(pHints->GetEnd(i));
|
|
|
|
if (!pAttr->IsFormatIgnoreEnd())
|
|
|
|
{
|
|
|
|
xub_StrLen const nNextEnd = *pAttr->GetAnyEnd();
|
|
|
|
nNext = std::min(nNext, nNextEnd); // pick nearest one
|
|
|
|
break;
|
|
|
|
}
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
}
|
2008-09-04 09:20:30 +00:00
|
|
|
if (m_pTxtNode!=NULL) {
|
|
|
|
//TODO maybe use hints like FieldHints for this instead of looking at the text...
|
2013-11-12 00:46:22 +01:00
|
|
|
const sal_Int32 l = nNext<m_pTxtNode->Len() ? nNext : m_pTxtNode->Len();
|
2013-11-08 15:32:06 +00:00
|
|
|
xub_StrLen p=nPos;
|
2013-02-18 18:36:45 +01:00
|
|
|
while (p<l && m_pTxtNode->GetTxt()[p] != CH_TXT_ATR_FIELDSTART
|
|
|
|
&& m_pTxtNode->GetTxt()[p] != CH_TXT_ATR_FIELDEND
|
|
|
|
&& m_pTxtNode->GetTxt()[p] != CH_TXT_ATR_FORMELEMENT)
|
|
|
|
{
|
|
|
|
++p;
|
|
|
|
}
|
2008-09-04 09:20:30 +00:00
|
|
|
if ((p<l && p>nPos) || nNext<=p)
|
|
|
|
nNext=p;
|
|
|
|
else
|
|
|
|
nNext=p+1;
|
|
|
|
}
|
2000-09-18 23:08:29 +00:00
|
|
|
if( pRedln )
|
|
|
|
return pRedln->GetNextRedln( nNext );
|
|
|
|
return nNext;
|
|
|
|
}
|
|
|
|
|
|
|
|
class SwMinMaxArgs
|
|
|
|
{
|
|
|
|
public:
|
2003-10-15 08:55:55 +00:00
|
|
|
OutputDevice* pOut;
|
2013-10-26 19:50:13 +02:00
|
|
|
SwViewShell* pSh;
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uLong &rMin;
|
|
|
|
sal_uLong &rMax;
|
|
|
|
sal_uLong &rAbsMin;
|
2000-09-18 23:08:29 +00:00
|
|
|
long nRowWidth;
|
|
|
|
long nWordWidth;
|
|
|
|
long nWordAdd;
|
2001-11-30 12:52:05 +00:00
|
|
|
xub_StrLen nNoLineBreak;
|
2013-10-26 19:50:13 +02:00
|
|
|
SwMinMaxArgs( OutputDevice* pOutI, SwViewShell* pShI, sal_uLong& rMinI, sal_uLong &rMaxI, sal_uLong &rAbsI )
|
2003-10-15 08:55:55 +00:00
|
|
|
: pOut( pOutI ), pSh( pShI ), rMin( rMinI ), rMax( rMaxI ), rAbsMin( rAbsI )
|
2001-11-30 12:52:05 +00:00
|
|
|
{ nRowWidth = nWordWidth = nWordAdd = 0; nNoLineBreak = STRING_LEN; }
|
2011-02-10 15:39:08 +01:00
|
|
|
void Minimum( long nNew ) const { if( (long)rMin < nNew ) rMin = nNew; }
|
2000-09-18 23:08:29 +00:00
|
|
|
void NewWord() { nWordAdd = nWordWidth = 0; }
|
|
|
|
};
|
|
|
|
|
2013-09-09 15:15:00 +02:00
|
|
|
static sal_Bool lcl_MinMaxString( SwMinMaxArgs& rArg, SwFont* pFnt, const OUString &rTxt,
|
2000-09-18 23:08:29 +00:00
|
|
|
xub_StrLen nIdx, xub_StrLen nEnd )
|
|
|
|
{
|
|
|
|
sal_Bool bRet = sal_False;
|
|
|
|
while( nIdx < nEnd )
|
|
|
|
{
|
|
|
|
xub_StrLen nStop = nIdx;
|
2001-09-10 08:55:04 +00:00
|
|
|
sal_Bool bClear;
|
|
|
|
LanguageType eLang = pFnt->GetLanguage();
|
2013-04-19 10:34:21 +02:00
|
|
|
if( g_pBreakIt->GetBreakIter().is() )
|
2000-09-18 23:08:29 +00:00
|
|
|
{
|
2013-09-09 15:15:00 +02:00
|
|
|
bClear = CH_BLANK == rTxt[ nStop ];
|
2013-04-19 10:34:21 +02:00
|
|
|
Boundary aBndry( g_pBreakIt->GetBreakIter()->getWordBoundary( rTxt, nIdx,
|
|
|
|
g_pBreakIt->GetLocale( eLang ),
|
2011-01-17 15:06:54 +01:00
|
|
|
WordType::DICTIONARY_WORD, sal_True ) );
|
2003-04-01 08:56:20 +00:00
|
|
|
nStop = (xub_StrLen)aBndry.endPos;
|
2001-11-30 12:52:05 +00:00
|
|
|
if( nIdx <= aBndry.startPos && nIdx && nIdx-1 != rArg.nNoLineBreak )
|
2001-09-10 08:55:04 +00:00
|
|
|
rArg.NewWord();
|
|
|
|
if( nStop == nIdx )
|
|
|
|
++nStop;
|
|
|
|
if( nStop > nEnd )
|
|
|
|
nStop = nEnd;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2013-09-09 15:15:00 +02:00
|
|
|
while( nStop < nEnd && CH_BLANK != rTxt[ nStop ] )
|
2000-09-18 23:08:29 +00:00
|
|
|
++nStop;
|
2001-09-10 08:55:04 +00:00
|
|
|
bClear = nStop == nIdx;
|
|
|
|
if ( bClear )
|
|
|
|
{
|
|
|
|
rArg.NewWord();
|
2013-09-09 15:15:00 +02:00
|
|
|
while( nStop < nEnd && CH_BLANK == rTxt[ nStop ] )
|
2001-09-10 08:55:04 +00:00
|
|
|
++nStop;
|
|
|
|
}
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
2001-04-09 09:44:17 +00:00
|
|
|
|
2003-10-15 08:55:55 +00:00
|
|
|
SwDrawTextInfo aDrawInf( rArg.pSh, *rArg.pOut, 0, rTxt, nIdx, nStop - nIdx );
|
2001-04-09 09:44:17 +00:00
|
|
|
long nAktWidth = pFnt->_GetTxtSize( aDrawInf ).Width();
|
2000-09-18 23:08:29 +00:00
|
|
|
rArg.nRowWidth += nAktWidth;
|
|
|
|
if( bClear )
|
|
|
|
rArg.NewWord();
|
|
|
|
else
|
|
|
|
{
|
|
|
|
rArg.nWordWidth += nAktWidth;
|
|
|
|
if( (long)rArg.rAbsMin < rArg.nWordWidth )
|
|
|
|
rArg.rAbsMin = rArg.nWordWidth;
|
|
|
|
rArg.Minimum( rArg.nWordWidth + rArg.nWordAdd );
|
|
|
|
bRet = sal_True;
|
|
|
|
}
|
|
|
|
nIdx = nStop;
|
|
|
|
}
|
|
|
|
return bRet;
|
|
|
|
}
|
|
|
|
|
2013-12-14 22:46:05 +01:00
|
|
|
sal_Bool SwTxtNode::IsSymbol( const sal_Int32 nBegin ) const
|
2000-09-18 23:08:29 +00:00
|
|
|
{
|
2003-04-01 08:56:20 +00:00
|
|
|
SwScriptInfo aScriptInfo;
|
|
|
|
SwAttrIter aIter( *(SwTxtNode*)this, aScriptInfo );
|
|
|
|
aIter.Seek( nBegin );
|
2010-06-13 15:22:56 +02:00
|
|
|
return aIter.GetFnt()->IsSymbol(
|
2013-10-26 19:50:13 +02:00
|
|
|
const_cast<SwViewShell *>(getIDocumentLayoutAccess()->GetCurrentViewShell()) );
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
class SwMinMaxNodeArgs
|
|
|
|
{
|
|
|
|
public:
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uLong nMaxWidth; // Summe aller Rahmenbreite
|
2000-09-18 23:08:29 +00:00
|
|
|
long nMinWidth; // Breitester Rahmen
|
|
|
|
long nLeftRest; // noch nicht von Rahmen ueberdeckter Platz im l. Rand
|
|
|
|
long nRightRest; // noch nicht von Rahmen ueberdeckter Platz im r. Rand
|
|
|
|
long nLeftDiff; // Min/Max-Differenz des Rahmens im linken Rand
|
|
|
|
long nRightDiff; // Min/Max-Differenz des Rahmens im rechten Rand
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uLong nIndx; // Indexnummer des Nodes
|
2000-09-18 23:08:29 +00:00
|
|
|
void Minimum( long nNew ) { if( nNew > nMinWidth ) nMinWidth = nNew; }
|
|
|
|
};
|
|
|
|
|
2012-06-20 16:36:51 +02:00
|
|
|
static void lcl_MinMaxNode( SwFrmFmt* pNd, SwMinMaxNodeArgs* pIn )
|
2000-09-18 23:08:29 +00:00
|
|
|
{
|
2012-06-20 16:36:51 +02:00
|
|
|
const SwFmtAnchor& rFmtA = pNd->GetAnchor();
|
2003-07-14 11:45:42 +00:00
|
|
|
|
|
|
|
bool bCalculate = false;
|
2010-01-05 16:37:41 +01:00
|
|
|
if ((FLY_AT_PARA == rFmtA.GetAnchorId()) ||
|
|
|
|
(FLY_AT_CHAR == rFmtA.GetAnchorId()))
|
2003-07-14 11:45:42 +00:00
|
|
|
{
|
|
|
|
bCalculate = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (bCalculate)
|
|
|
|
{
|
|
|
|
const SwPosition *pPos = rFmtA.GetCntntAnchor();
|
2010-11-25 17:08:45 +01:00
|
|
|
OSL_ENSURE(pPos && pIn, "Unexpected NULL arguments");
|
2003-07-14 11:45:42 +00:00
|
|
|
if (!pPos || !pIn || pIn->nIndx != pPos->nNode.GetIndex())
|
|
|
|
bCalculate = false;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (bCalculate)
|
2000-09-18 23:08:29 +00:00
|
|
|
{
|
|
|
|
long nMin, nMax;
|
|
|
|
SwHTMLTableLayout *pLayout = 0;
|
2012-06-20 16:36:51 +02:00
|
|
|
MSHORT nWhich = pNd->Which();
|
2000-09-18 23:08:29 +00:00
|
|
|
if( RES_DRAWFRMFMT != nWhich )
|
|
|
|
{
|
|
|
|
// Enthaelt der Rahmen zu Beginn oder am Ende eine Tabelle?
|
2012-06-20 16:36:51 +02:00
|
|
|
const SwNodes& rNodes = pNd->GetDoc()->GetNodes();
|
|
|
|
const SwFmtCntnt& rFlyCntnt = pNd->GetCntnt();
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uLong nStt = rFlyCntnt.GetCntntIdx()->GetIndex();
|
2006-08-14 15:38:07 +00:00
|
|
|
SwTableNode* pTblNd = rNodes[nStt+1]->GetTableNode();
|
2000-09-18 23:08:29 +00:00
|
|
|
if( !pTblNd )
|
|
|
|
{
|
2012-06-20 16:36:51 +02:00
|
|
|
SwNode *pNd2 = rNodes[nStt];
|
|
|
|
pNd2 = rNodes[pNd2->EndOfSectionIndex()-1];
|
|
|
|
if( pNd2->IsEndNode() )
|
|
|
|
pTblNd = pNd2->StartOfSectionNode()->GetTableNode();
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if( pTblNd )
|
|
|
|
pLayout = pTblNd->GetTable().GetHTMLTableLayout();
|
|
|
|
}
|
|
|
|
|
2012-06-20 16:36:51 +02:00
|
|
|
const SwFmtHoriOrient& rOrient = pNd->GetHoriOrient();
|
2007-09-27 08:13:42 +00:00
|
|
|
sal_Int16 eHoriOri = rOrient.GetHoriOrient();
|
2000-09-18 23:08:29 +00:00
|
|
|
|
|
|
|
long nDiff;
|
|
|
|
if( pLayout )
|
|
|
|
{
|
|
|
|
nMin = pLayout->GetMin();
|
|
|
|
nMax = pLayout->GetMax();
|
|
|
|
nDiff = nMax - nMin;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if( RES_DRAWFRMFMT == nWhich )
|
|
|
|
{
|
2012-06-20 16:36:51 +02:00
|
|
|
const SdrObject* pSObj = pNd->FindSdrObject();
|
2000-09-18 23:08:29 +00:00
|
|
|
if( pSObj )
|
2003-11-24 15:09:00 +00:00
|
|
|
nMin = pSObj->GetCurrentBoundRect().GetWidth();
|
2000-09-18 23:08:29 +00:00
|
|
|
else
|
|
|
|
nMin = 0;
|
|
|
|
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2012-06-20 16:36:51 +02:00
|
|
|
const SwFmtFrmSize &rSz = pNd->GetFrmSize();
|
2000-09-18 23:08:29 +00:00
|
|
|
nMin = rSz.GetWidth();
|
|
|
|
}
|
|
|
|
nMax = nMin;
|
|
|
|
nDiff = 0;
|
|
|
|
}
|
|
|
|
|
2012-06-20 16:36:51 +02:00
|
|
|
const SvxLRSpaceItem &rLR = pNd->GetLRSpace();
|
2000-09-18 23:08:29 +00:00
|
|
|
nMin += rLR.GetLeft();
|
|
|
|
nMin += rLR.GetRight();
|
|
|
|
nMax += rLR.GetLeft();
|
|
|
|
nMax += rLR.GetRight();
|
|
|
|
|
2012-06-20 16:36:51 +02:00
|
|
|
if( SURROUND_THROUGHT == pNd->GetSurround().GetSurround() )
|
2000-09-18 23:08:29 +00:00
|
|
|
{
|
2012-06-20 16:36:51 +02:00
|
|
|
pIn->Minimum( nMin );
|
|
|
|
return;
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Rahmen, die recht bzw. links ausgerichtet sind, gehen nur
|
|
|
|
// teilweise in die Max-Berechnung ein, da der Rand schon berueck-
|
|
|
|
// sichtigt wird. Nur wenn die Rahmen in den Textkoerper ragen,
|
|
|
|
// wird dieser Teil hinzuaddiert.
|
|
|
|
switch( eHoriOri )
|
|
|
|
{
|
2007-09-27 08:13:42 +00:00
|
|
|
case text::HoriOrientation::RIGHT:
|
2000-09-18 23:08:29 +00:00
|
|
|
{
|
|
|
|
if( nDiff )
|
|
|
|
{
|
2012-06-20 16:36:51 +02:00
|
|
|
pIn->nRightRest -= pIn->nRightDiff;
|
|
|
|
pIn->nRightDiff = nDiff;
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
2007-09-27 08:13:42 +00:00
|
|
|
if( text::RelOrientation::FRAME != rOrient.GetRelationOrient() )
|
2000-09-18 23:08:29 +00:00
|
|
|
{
|
2012-06-20 16:36:51 +02:00
|
|
|
if( pIn->nRightRest > 0 )
|
|
|
|
pIn->nRightRest = 0;
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
2012-06-20 16:36:51 +02:00
|
|
|
pIn->nRightRest -= nMin;
|
2000-09-18 23:08:29 +00:00
|
|
|
break;
|
|
|
|
}
|
2007-09-27 08:13:42 +00:00
|
|
|
case text::HoriOrientation::LEFT:
|
2000-09-18 23:08:29 +00:00
|
|
|
{
|
|
|
|
if( nDiff )
|
|
|
|
{
|
2012-06-20 16:36:51 +02:00
|
|
|
pIn->nLeftRest -= pIn->nLeftDiff;
|
|
|
|
pIn->nLeftDiff = nDiff;
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
2007-09-27 08:13:42 +00:00
|
|
|
if( text::RelOrientation::FRAME != rOrient.GetRelationOrient() &&
|
2012-06-20 16:36:51 +02:00
|
|
|
pIn->nLeftRest < 0 )
|
|
|
|
pIn->nLeftRest = 0;
|
|
|
|
pIn->nLeftRest -= nMin;
|
2000-09-18 23:08:29 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
default:
|
|
|
|
{
|
2012-06-20 16:36:51 +02:00
|
|
|
pIn->nMaxWidth += nMax;
|
|
|
|
pIn->Minimum( nMin );
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#define FLYINCNT_MIN_WIDTH 284
|
|
|
|
|
2001-03-05 11:54:15 +00:00
|
|
|
// changing this method very likely requires changing of
|
|
|
|
// "GetScalingOfSelectedText"
|
2011-01-17 15:06:54 +01:00
|
|
|
void SwTxtNode::GetMinMaxSize( sal_uLong nIndex, sal_uLong& rMin, sal_uLong &rMax,
|
|
|
|
sal_uLong& rAbsMin, OutputDevice* pOut ) const
|
2000-09-18 23:08:29 +00:00
|
|
|
{
|
2013-10-26 19:50:13 +02:00
|
|
|
SwViewShell* pSh = 0;
|
2003-10-15 08:55:55 +00:00
|
|
|
GetDoc()->GetEditShell( &pSh );
|
2000-09-18 23:08:29 +00:00
|
|
|
if( !pOut )
|
|
|
|
{
|
|
|
|
if( pSh )
|
|
|
|
pOut = pSh->GetWin();
|
|
|
|
if( !pOut )
|
|
|
|
pOut = GetpApp()->GetDefaultDevice();
|
|
|
|
}
|
|
|
|
|
|
|
|
MapMode aOldMap( pOut->GetMapMode() );
|
|
|
|
pOut->SetMapMode( MapMode( MAP_TWIP ) );
|
|
|
|
|
|
|
|
rMin = 0;
|
|
|
|
rMax = 0;
|
|
|
|
rAbsMin = 0;
|
|
|
|
|
|
|
|
const SvxLRSpaceItem &rSpace = GetSwAttrSet().GetLRSpace();
|
|
|
|
long nLROffset = rSpace.GetTxtLeft() + GetLeftMarginWithNum( sal_True );
|
|
|
|
short nFLOffs;
|
|
|
|
// Bei Numerierung ist ein neg. Erstzeileneinzug vermutlich
|
|
|
|
// bereits gefuellt...
|
|
|
|
if( !GetFirstLineOfsWithNum( nFLOffs ) || nFLOffs > nLROffset )
|
|
|
|
nLROffset = nFLOffs;
|
|
|
|
|
|
|
|
SwMinMaxNodeArgs aNodeArgs;
|
|
|
|
aNodeArgs.nMinWidth = 0;
|
|
|
|
aNodeArgs.nMaxWidth = 0;
|
|
|
|
aNodeArgs.nLeftRest = nLROffset;
|
|
|
|
aNodeArgs.nRightRest = rSpace.GetRight();
|
|
|
|
aNodeArgs.nLeftDiff = 0;
|
|
|
|
aNodeArgs.nRightDiff = 0;
|
|
|
|
if( nIndex )
|
|
|
|
{
|
2012-06-20 16:36:51 +02:00
|
|
|
SwFrmFmts* pTmp = (SwFrmFmts*)GetDoc()->GetSpzFrmFmts();
|
2000-09-18 23:08:29 +00:00
|
|
|
if( pTmp )
|
|
|
|
{
|
|
|
|
aNodeArgs.nIndx = nIndex;
|
2012-06-20 16:36:51 +02:00
|
|
|
BOOST_FOREACH( SwFrmFmt *pFmt, *pTmp )
|
|
|
|
lcl_MinMaxNode( pFmt, &aNodeArgs );
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
if( aNodeArgs.nLeftRest < 0 )
|
|
|
|
aNodeArgs.Minimum( nLROffset - aNodeArgs.nLeftRest );
|
|
|
|
aNodeArgs.nLeftRest -= aNodeArgs.nLeftDiff;
|
|
|
|
if( aNodeArgs.nLeftRest < 0 )
|
|
|
|
aNodeArgs.nMaxWidth -= aNodeArgs.nLeftRest;
|
|
|
|
|
|
|
|
if( aNodeArgs.nRightRest < 0 )
|
|
|
|
aNodeArgs.Minimum( rSpace.GetRight() - aNodeArgs.nRightRest );
|
|
|
|
aNodeArgs.nRightRest -= aNodeArgs.nRightDiff;
|
|
|
|
if( aNodeArgs.nRightRest < 0 )
|
|
|
|
aNodeArgs.nMaxWidth -= aNodeArgs.nRightRest;
|
|
|
|
|
2001-02-20 09:27:05 +00:00
|
|
|
SwScriptInfo aScriptInfo;
|
2001-03-05 11:54:15 +00:00
|
|
|
SwAttrIter aIter( *(SwTxtNode*)this, aScriptInfo );
|
2000-09-18 23:08:29 +00:00
|
|
|
xub_StrLen nIdx = 0;
|
2007-09-27 08:13:42 +00:00
|
|
|
aIter.SeekAndChgAttrIter( nIdx, pOut );
|
2013-10-28 15:41:25 +02:00
|
|
|
sal_Int32 nLen = m_Text.getLength();
|
2000-09-18 23:08:29 +00:00
|
|
|
long nAktWidth = 0;
|
|
|
|
MSHORT nAdd = 0;
|
2003-10-15 08:55:55 +00:00
|
|
|
SwMinMaxArgs aArg( pOut, pSh, rMin, rMax, rAbsMin );
|
2000-09-18 23:08:29 +00:00
|
|
|
while( nIdx < nLen )
|
|
|
|
{
|
|
|
|
xub_StrLen nNextChg = aIter.GetNextAttr();
|
2001-02-20 09:27:05 +00:00
|
|
|
xub_StrLen nStop = aScriptInfo.NextScriptChg( nIdx );
|
2000-09-27 10:53:31 +00:00
|
|
|
if( nNextChg > nStop )
|
|
|
|
nNextChg = nStop;
|
2000-09-18 23:08:29 +00:00
|
|
|
SwTxtAttr *pHint = NULL;
|
2012-10-19 05:34:48 -05:00
|
|
|
sal_Unicode cChar = CH_BLANK;
|
2000-09-27 10:53:31 +00:00
|
|
|
nStop = nIdx;
|
2000-09-18 23:08:29 +00:00
|
|
|
while( nStop < nLen && nStop < nNextChg &&
|
2013-02-17 00:14:26 +01:00
|
|
|
CH_TAB != ( cChar = m_Text[nStop] ) &&
|
2001-11-30 12:52:05 +00:00
|
|
|
CH_BREAK != cChar && CHAR_HARDBLANK != cChar &&
|
|
|
|
CHAR_HARDHYPHEN != cChar && CHAR_SOFTHYPHEN != cChar &&
|
|
|
|
!pHint )
|
2000-09-18 23:08:29 +00:00
|
|
|
{
|
|
|
|
if( ( CH_TXTATR_BREAKWORD != cChar && CH_TXTATR_INWORD != cChar )
|
|
|
|
|| ( 0 == ( pHint = aIter.GetAttr( nStop ) ) ) )
|
|
|
|
++nStop;
|
|
|
|
}
|
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
|
|
|
if ( lcl_MinMaxString( aArg, aIter.GetFnt(), m_Text, nIdx, nStop ) )
|
|
|
|
{
|
2000-09-18 23:08:29 +00:00
|
|
|
nAdd = 20;
|
CWS-TOOLING: integrate CWS odfmetadata2
2009-06-22 11:48:36 +0200 mst r273206 : - connectivity/source/drivers/mozab/mozillasrc/MNSInclude.hxx:
+ add "include ustrbuf.hxx" to work around warning caused by
solaris <sys/kstat.h> declaring a global "long l ;"
2009-06-19 14:25:25 +0200 mst r273159 : - scp2/source/ooo/file_library_ooo.scp:
+ fix MinGW build
2009-06-08 12:52:33 +0200 mst r272727 : - redland/raptor-1.4.18.patch.mingw, redland/raptor/makefile.mk:
+ disable parsers that do not build on MinGW (thanks for patch by tono)
2009-05-15 17:31:07 +0200 mst r271957 : fix typos
2009-05-15 17:28:57 +0200 mst r271956 : #i101965#
- offapi/com/sun/star/text/TextPortion:
+ add missing properties:
SoftPageBreak, DocumentIndexMark, ReferenceMark, Footnote, TextField
+ fix read-only status of properties: Bookmark, IsStart, IsCollapsed
- offapi/type_reference/{typelibrary_history.txt,types.rdb}:
+ update reference types.rdb
2009-05-07 14:41:38 +0200 mst r271669 : - sw/inc/{fmtftn.hxx,unocoll.hxx,doc.hxx,editsh.hxx,ftninfo.hxx},
sw/source/core/layout/{flowfrm.cxx,ftnfrm.cxx},
sw/source/core/doc/docftn.cxx, sw/source/core/edit/edattr.cxx,
sw/source/core/txtnode/atrftn.cxx, sw/source/core/unocore/unocoll.cxx,
sw/source/ui/fldui/fldref.cxx:
+ fix warning ... the hard way
+ also fix signature of SwDoc::SetCurFtn
2009-05-05 19:52:55 +0200 mst r271556 : - sw/inc/undobj.hxx:
+ make some members const
2009-05-05 19:34:40 +0200 mst r271555 : - sw/inc/rolbck.hxx, sw/source/core/undo/rolbck.cxx:
+ make some members const
2009-05-05 19:13:14 +0200 mst r271553 : - sw/inc/{undobj.hxx,rolbck.hxx},
sw/source/core/undo/{unbkmk.cxx,rolbck.cxx}:
+ fix rebase merge error
+ rename SwHstryBookmark to SwHistoryBookmark
+ clean up SwUndoBookmark
2009-05-05 19:05:53 +0200 mst r271552 : - sw/source/core/unocore/unoportenum.cxx:
+ fix annoying assertion
2009-05-05 15:34:48 +0200 mst r271522 : CWS-TOOLING: rebase CWS odfmetadata2 to trunk@271427 (milestone: DEV300:m47)
2009-05-04 12:37:01 +0200 mst r271444 : trivial
2009-04-22 13:30:37 +0200 mst r271102 : - sfx2/inc/sfx2/dinfdlg.hxx:
+ trivial change
2009-04-21 16:46:58 +0200 mst r271043 : - sw/inc/hintids.hxx:
+ introduce some predicates for the various hints, and use them
2009-04-21 16:19:03 +0200 mst r271041 : - sw/inc/undobj.hxx,
sw/source/core/doc/{docfly.cxx,docfmt.cxx,docftn.cxx,doctxm.cxx},
sw/source/core/undo/{unattr.cxx,unins.cxx}:
+ clean up unattr.cxx:
remove/fix casts, prefix members, use auto_ptr, etc.
2009-04-21 15:34:23 +0200 mst r271039 : - sw/inc/{rolbck.hxx,undobj.hxx},
sw/source/core/doc/docfmt.cxx,
sw/source/core/txtnode/{thints.cxx,txtedt.cxx},
sw/source/core/undo/{rolbck.cxx,undel.cxx,undobj.cxx,unins.cxx,unmove.cxx,
unovwr.cxx,unsect.cxx,unspnd.cxx,untbl.cxx,untblk.cxx,unattr.cxx}:
+ clean up SwHistory, SwRegHistory and SwHistoryHint etc.:
remove/fix casts, prefix members, remove wrong const annotations,
use auto_ptr, remove unused members, etc.
2009-04-20 19:17:36 +0200 mst r271013 : - sw/inc/ndhints.hxx,
sw/source/core/text/{itrtxt.cxx,txtftn.cxx,itratr.cxx,porfly.cxx,
txtfrm.cxx,txtdrop.cxx,frmform.cxx},
sw/source/core/txtnode/{ndtxt.cxx,ndhints.cxx,thints.cxx,txtedt.cxx},
sw/source/core/edit/acorrect.cxx,
sw/source/core/doc/{docedt.cxx,docfmt.cxx},
sw/source/filter/html/swhtml.cxx:
+ clean up SwHintsArray and its subclasses: remove/fix casts, prefix members
2009-04-20 18:42:07 +0200 mst r271007 : - sw/source/core/text/txtio.cxx, sw/source/core/edit/edattr.cxx,
sw/source/core/undo/rolbck.cxx:
+ remove JP_NEWCORE dead code
2009-04-20 18:38:09 +0200 mst r271006 : - sw/source/core/unocore/unochart.cxx:
+ silence unxlngi warning (debug=t)
2009-04-20 16:36:13 +0200 mst r270991 : - sfx2/inc/sfx2/dinfdlg.hxx, sfx2/source/dialog/dinfdlg.cxx,
sfx2/source/doc/objserv.cxx, sw/source/ui/fldui/flddinf.hxx:
+ trivial cleanups
2009-04-20 15:28:52 +0200 mst r270990 : - sfx2/inc/sfx2/dinfdlg.hxx, sfx2/source/dialog/dinfdlg.cxx,
sfx2/source/doc/objserv.cxx:
+ fix bug: replaying a macro with a DocumentInfoItem removes all
user-defined properties
2009-03-10 15:08:20 +0100 mst r269273 : - sfx2/source/doc/Metadatable.cxx:
+ add missing SolarMutex guards
2009-03-10 14:46:29 +0100 mst r269272 : - unoxml/source/rdf/librdf_repository.cxx:
+ never free rdf_world because that would call libxm2 xmlCleanupParser
(and, to add insult to injury, other libxml2 functions later...)
2009-03-06 19:02:44 +0100 mst r269041 : argh! undo...
2009-03-06 19:00:58 +0100 mst r269040 : fix #i99931#
- sw/source/ui/uno/unomod.cxx:
+ SwXViewSettings::_getSingleValue returns uninitialized memory
for the ZoomType property if the value is PAGE_WIDTH_EXACT
2009-03-06 18:59:28 +0100 mst r269039 : - sw/inc/ndtxt.hxx, sw/source/core/txtnode/ndtxt.cxx,
sw/source/core/unocore/unoportenum.cxx:
+ fix some more wntmsci12 warnings...
2009-03-06 18:56:46 +0100 mst r269038 : - sd/source/ui/slidesorter/model/SlsPageEnumerationProvider.cxx:
+ work around spurious warning on unxsoli4 debug=t
2009-03-05 14:02:01 +0100 mst r268902 : - sw/inc/txatbase.hxx:
+ back to c-style casts, they also compile on wntmsci12...
2009-03-05 10:23:25 +0100 mst r268882 : - comphelper/inc/comphelper/processfactory.hxx,
comphelper/source/processfactory/processfactory.cxx:
+ revert change of return type of comphelper_getProcessComponentContext
to Reference: does not build on wntmsci12
2009-03-04 19:08:09 +0100 mst r268861 : - sw/source/core/txtnode/{atrtox.cxx,ndtxt.cxx}:
+ fix initialization
2009-03-04 14:37:30 +0100 mst r268831 : - solenv/inc/target.mk:
+ fix CLASSPATH so complex tests run (fix by sb)
2009-03-04 14:36:30 +0100 mst r268830 : - sw/inc/unoobj.hxx,
sw/source/core/unocore/{unoparagraph.cxx,unoobj.cxx,unoobj2.cxx}:
+ SwXParaFrameEnumeration constructor now takes SwPaM, not SwUnoCrsr
+ move SwParaSelection into unoparagraph.cxx, as it is only used there
+ bugfix: replace SwUnoCrsrs on stack with SwCursors
2009-03-04 14:34:46 +0100 mst r268829 : - sw/inc/pam.hxx, sw/source/core/crsr/pam.cxx,
sw/source/core/edit/eddel.cxx, sw/source/core/doc/docredln.cxx,
sw/source/core/undo/{untbl.cxx,undel.cxx}, sw/source/filter/rtf/swparrtf.cxx:
+ clean up SwPaM: prefix members
+ new constructor SwPosition(SwCntntNode&, xub_StrLen)
+ fix several broken SwPosition and SwPaM constructors
+ SwPam::DeleteMark now actually resets the unused position to default
2009-03-02 12:07:09 +0100 mst r268646 : - sw/inc/fmtcol.hxx:
+ fix annoying warning (gcc 4)
2009-03-02 12:06:27 +0100 mst r268645 : - odk/util/check.pl, odk/examples/DevelopersGuide/Text/TextDocuments.java:
+ rename module from FieldMaster to fieldmaster
2009-02-27 19:49:56 +0100 mst r268614 : - sfx2/inc/sfx2/Metadatable.hxx, sfx2/prj/d.lst,
sfx2/source/doc/{Metadatable.cxx,makefile.mk},
sw/inc/{SwMetadatable.hxx,unoobj.hxx,undobj.hxx,ndtxt.hxx},
sw/source/core/doc/{SwMetadatable.cxx,makefile.mk,docnew.cxx},
sw/source/core/undo/{untbl.cxx,unins.cxx},
sw/source/core/unocore/unoparagraph.cxx, sw/source/ui/app/docsh.cxx:
+ move Metadatable implementation from sw to sfx2
2009-02-27 17:58:55 +0100 mst r268608 : - sw/inc/{SwMetadatable.hxx,undobj.hxx}, sw/source/core/doc/SwMetadatable.cxx,
sw/source/core/undo/{untbl.cxx,unins.cxx,undel.cxx}:
+ CreateUndo now returns an opaque MetadatableUndo object
2009-02-27 13:15:44 +0100 mst r268587 : - sw/inc/ndtxt.hxx, sw/source/core/doc/docfmt.cxx,
sw/source/core/text/{itratr.cxx,porlay.cxx},
sw/source/core/txtnode/{txtedt.cxx,ndtxt.cxx,thints.cxx}:
+ clean up SwTxtNode: fix casts, prefix members
+ factor out inline function SwTxtNode::TryDeleteSwpHints()
2009-02-27 13:14:30 +0100 mst r268586 : - svx/inc/svx/emphitem.hxx:
+ fix borken header guard
2009-02-27 13:13:56 +0100 mst r268585 : - sfx2/source/bastyp/progress.cxx:
+ fix use of compiler specific macro
2009-02-27 11:00:32 +0100 mst r268564 : - sw/inc/{txatbase.hxx,txtatr.hxx,txtinet.hxx,txtfld.hxx,txtftn.hxx,
txtflcnt.hxx,txttxmrk.hxx,txtrfmrk.hxx},
sw/source/core/txtnode/{atrtox.cxx,atrref.cxx,atrflyin.cxx,atrftn.cxx,
txtatr2.cxx,txatbase.cxx,atrfld.cxx,txtedt.cxx},
sw/source/core/text/atrstck.cxx, sw/source/core/access/acchyperlink.cxx,
sw/source/core/doc/visiturl.cxx, sw/source/ui/wrtsh/wrtsh2.cxx:
+ clean up SwTxtAttr and its subclasses: remove/fix casts, prefix members
+ SwTxtINetFmt: remove unused member bColor
- sw/source/core/text/txtfld.cxx:
+ move SwTxtFld methods to atrfld.cxx
2009-02-27 10:58:44 +0100 mst r268563 : - sfx2/inc/sfx2/sfxbasemodel.hxx:
+ don't privately inherit BaseMutex, ScModelObj wants to access it
2009-02-27 10:58:02 +0100 mst r268562 : - xmloff/source/core/{RDFaExportHelper.cxx,RDFaImportHelper.cxx}:
+ arrrgh!!! someone thought it would be a good idea to have 2 different
versions of boost in external! and they're NOT compatible!!!
insert an ugly fragile hack that maybe works with both...
2009-02-26 17:42:26 +0100 mst r268544 : - comphelper/inc/comphelper/storagehelper.hxx.
sfx2/source/doc/DocumentMetadataAccess.cxx:
+ someone made IsValidZipEntryFileName a static method and didn't tell me
2009-02-26 15:52:56 +0100 mst r268529 : redland: split up patches
2009-02-26 13:17:56 +0100 mst r268509 : migration of cws odfmetadata2 from CVS (resync to m42): module sw
#i95863#
- sw/inc/segdefs{,_}.hxx:
+ remove obsolete files
- sw/source/ui/inc/itemdef.hxx:
+ remove itemdef.hxx
- sw/source/ui/app/[apphdl.cxx,docsh.cxx}, sw/source/ui/misc/glshell.cxx,
sw/source/ui/shells/*.cxx, sw/source/ui/uiview/*.cxx, sw/source/ui/web/*.cxx:
+ use sfx2/msg.hxx instead of itemdef.hxx
- sw/source/core/edit/eddel.cxx:
+ @ JP: SwEditShell::Replace:
you're right, deleting the text to be replaced first, and then inserting
a space, and then replacing that space is unnecessary.
whew, i'm so happy that we finally answered that question after 11 years.
- sw/inc/edimp.hxx:
+ remove FOREACHCURSOR_START, FOREACHCURSOR_END
- sw/inc/{swcrsr.hxx,unocrsr.hxx,viscrs.hxx},
sw/source/core/crsr/{crsrsh.cxx,swcrsr.cxx,trvlreg.cxx,trvltbl.cxx,
unocrsr.cxx,viscrs.cxx},
sw/source/core/doc/{docbm.cxx,doccorr.cxx},
sw/source/core/docnode/{ndtbl.cxx,ndtbl1.cxx},
sw/source/core/edit/editsh.cxx,
sw/source/core/frmedt/{fefly1.cxx,fetab.cxx,tblsel.cxx},
sw/source/core/layout/trvlfrm.cxx,
sw/source/core/unocore/{unochart.cxx,unoobj2.cxx,unoparagraph.cxx,
unoportenum.cxx,unotbl.cxx},
sw/source/core/view/vprint.cxx:
+ remove the hideous virtual operator SwFooCursor*
+ make SwCursor::IsReadOnlyAvailable() virtual
+ make SwUnoCrsr::Clone() virtual
+ refactor SwCursor methods IsSelOver(), LeftRight(), UpDown(), GotoTable():
replace dynamic_cast<...>(this) with new virtual methods
2009-02-26 13:14:58 +0100 mst r268508 : migration of cws odfmetadata2 from CVS (resync to m42): module sw
- sw/source/filter/xml/swxml.cxx:
+ XMLReader::Read: load RDF metadata of the ODF document
- sw/source/filter/xml/wrtxml.cxx:
+ SwXMLWriter::_Write: write RDF metadata of the ODF document if ODF >= 1.2
#i90620#: import xml:id in text tables (does not actually work yet)
- sw/source/filter/xml/xmltbli{.hxx,.cxx}:
+ SwXMLTableCellAttrTokens,aTableCellAttrTokenMap: add XML_TOK_TABLE_XMLID
+ SwXMLTableCellContext_Impl::SwXMLTableCellContext_Impl: attribute xml:id
+ SwXMLTableCellContext_Impl::CreateChildContext: attribute xml:id
+ SwXMLTableColContext_Impl::SwXMLTableColContext_Impl: attribute xml:id
+ SwXMLTableContext::SwXMLTableContext: attribute xml:id
fix #i98530#
- sw/inc/unoport.hxx, sw/source/core/unocore/unoport.cxx:
+ SwXTextPortion: make constructor params const&
- sw/source/core/unocore/unoportenum.cxx:
+ refactor to remove some code duplication
+ fix bug: paragraph w/out hints: bookmark before frame gets lost
#i97274# handle invalid tables
- sw/source/core/layout/tabfrm.cxx, sw/source/filter/xml/xmltbli.cxx:
+ SwXMLTableContext::MakeTable():
check that the table actually contains cells,
and abort (removing the inserted table nodes) if not
2009-02-26 13:11:48 +0100 mst r268507 : migration of cws odfmetadata2 from CVS (resync to m42): module sw
refactor SwXTextRange and SwXParagraph
- sw/inc/unoobj.hxx, sw/source/core/unocore/unoobj2.cxx:
+ remove 3 constructors of SwXTextRange
+ new method SwXTextRange::CreateParentXText
+ refactor SwXTextRange::CreateTextRangeFromPosition and
SwXTextRange::getText
- sw/inc/unoobj.hxx, sw/source/core/unocore/unoparagraph.cxx:
+ SwXParagraph no longer uses a cursor; it registers directly at SwTxtNode
+ replace SwXParagraph::GetCrsr with SwXParagraph::GetTxtNode
- sw/source/core/unocore/unotext.cxx, sw/source/ui/uno/unotxvw.cxx:
+ adapt to new SwXParagraph
#i90620#
- sw/inc/SwMetadatable.hxx,
sw/source/core/doc/SwMetadatable.cxx:
+ new files: base classes sw::Metadatable and sw::MetadatableMixin;
also, 2 implementations of IXmlIdRegistry:
sw::XmlIdRegistryDocument and sw::XmlIdRegistryClipboard
+ setMetadataReference: handle empty stream name as auto-detect
- sw/source/core/doc/makefile.mk:
+ add SwMetadatable
add a XmlIdRegistry to SwDoc
- sw/inc/doc.hxx:
+ SwDoc: add member m_pXmlIdRegistry, method GetXmlIdRegistry()
- sw/source/core/doc/docnew.cxx:
+ initialize XmlIdRegistry in SwDoc::GetXmlIdRegistry, not in constructor,
because the constructor is not told whether the SwDoc is a clipboard
- sw/inc/docsh.hxx, sw/source/ui/app/docsh.cxx:
+ SwDocShell: override GetXmlIdRegistry()
#i91563#: make the SwTxtNode metadatable
- sw/inc/ndtxt.hxx
+ SwTxtNode inherits sw::Metadatable
- sw/inc/unoobj.hxx, sw/source/core/unocore/unoparagraph.cxx:
+ SwXParagraph inherits sw::MetadatableMixin
#i91563#: handle SwTxtNode's metadata for delete
- sw/source/core/txtnode/ndtxt.cxx:
+ SwTxtNode::SplitCntntNode: handle XmlId
+ SwTxtNode::JoinNext: merge XmlIds
- sw/source/core/doc/docedt.cxx:
+ lcl_GetJoinFlags: document postcondition
+ SwDoc::Delete: remove XmlId only if SwTxtNode _becomes_ empty
#i91563#: handle SwTxtNode's metadata for delete with undo
- sw/inc/undobj.hxx
+ SwUndoDelete: new members m_pMetadataUndoStart, m_pMetadataUndoEnd
- sw/source/core/undo/undel.cxx:
+ SwUndoDelete::SaveCntnt: save XmlIds for start and end SwTxtNode
+ SwUndoDelete::SaveCntnt: remove XmlId only if SwTxtNode _becomes_ empty
+ SwUndoDelete::Undo: restore saved XmlIds for start and end SwTxtNode
- sw/source/core/docnode/ndcopy.cxx:
+ SwTxtNode::MakeCopy: register copy at XmlIdRegistry
#i91563#: handle SwTxtNode's metadata for find/replace with undo
- sw/source/core/undo/unins.cxx:
+ _UnReplaceData: rename members: add prefix m_
+ _UnReplaceData: new members m_pMetadataUndoStart, m_pMetadataUndoEnd
+ _UnReplaceData::_UnReplaceData: save XmlIds for start and end SwTxtNode
+ _UnReplaceData::Undo: restore saved XmlIds for start and end SwTxtNode
#i91563#: handle SwTxtNode's metadata for table-to-text with undo
- sw/source/core/undo/untbl.cxx:
+ SwTblToTxtSave: rename members: add prefix m_
+ SwTblToTxtSave: new members m_pMetadataUndoStart, m_pMetadataUndoEnd
+ SwTblToTxtSave::SwTblToTxtSave: save XmlIds for start and end SwTxtNode
+ SwTblToTxtSave::SwTblToTxtSave, SwNodes::UndoTableToText:
always store the index of the first SwTxtNode in the cell, instead of
the index of the first SwTxtNode in case of the first cell in a row,
and the cell start node in other cases
+ SwNodes::UndoTableToText: restore saved XmlIds for start and end SwTxtNode
- sw/source/core/docnode/ndtbl.cxx:
+ lcl_DelBox: simplify for refactored start index handling in SwTblToTxtSave
2009-02-26 13:02:28 +0100 mst r268505 : migration of cws odfmetadata2 from CVS (resync to m42): module sd
- sd/source/ui/table/tableobjectbar.cxx,sd/source/ui/view/*.cxx:
+ remove invocations of SFX_DECL_TYPE
- sd/source/ui/slideshow/SlideShowRestarter.cxx,
sd/source/ui/toolpanel/LayoutMenu.cxx,
sd/source/ui/unoidl/DrawController.cxx,
sd/source/ui/view/{ViewShellBase.cxx,ViewTabBar.cxx,frmview.cxx}:
+ fix abuses of comphelper_getProcessComponentContext (missing release)
2009-02-26 13:01:24 +0100 mst r268504 : migration of cws odfmetadata2 from CVS (resync to m42): module starmath
- starmath/source/document.cxx:
+ don't touch SfxObjectShell's privates
2009-02-26 13:00:37 +0100 mst r268503 : migration of cws odfmetadata2 from CVS (resync to m42): module sfx2
#i90620#
- sfx2/inc/sfx2/XmlIdRegistry.hxx:
+ new file: interfaces sfx2::IXmlIdRegistry and sfx2::IXmlIdRegistrySupplier
and a couple of utility functions
- sfx2/inc/sfx2/DocumentMetadataAccess.hxx,
sfx2/source/doc/DocumentMetadataAccess.cxx:
+ new class sfx2::DocumentMetadataAccess, implements XDocumentMetadataAccess
+ the URI of the DocumentMetadataAccess is now the URI from which the
document was loaded; for a new document, use a vnd.sun.star.tdoc URI
+ add new function sfx2::createBaseURI()
+ prevent using reserved file names
+ try not to recurse into embedded subdocuments
- sfx2/source/doc/makefile.mk:
+ add DocumentMetadataAccess
- sfx2/util/makefile.mk:
+ link libsfx2 against libxml2 (needed for xmlValidateNCName)
- sfx2/source/doc/makefile.mk:
+ add LIBXML_CFLAGS to CFLAGS
- sfx2/prj/build.lst:
+ add dependence on libxml2
- sfx2/prj/d.lst:
+ add XmlIdRegistry.hxx, DocumentMetadataAccess.hxx
- sfx2/inc/sfx2/objsh.hxx, sfx2/source/doc/objxtor.cxx:
+ make SfxObjectShell's members private
+ new method SfxObjectShell::GetAutoStyleFilterIndex
+ SfxObjectShell inherits sfx2::IXmlIdRegistrySupplier
- sfx2/source/dialog/templdlg.cxx, sfx2/source/doc/sfxbasemodel.cxx:
+ don't touch SfxObjectShell's privates
- sfx2/inc/sfx2/sfxbasemodel.hxx, sfx2/source/doc/sfxbasemodel.cxx:
+ SfxBaseModel inherits BaseMutex instead of IMPL_SfxBaseModel_MutexContainer
+ SfxBaseModel implements additional interface XDocumentMetadataAccess
+ IMPL_SfxBaseModel_DataContainer has new member:
a sfx2::DocumentMetadataAccess
+ implementation of XDocumentMetadataAccess forwards to
the sfx2::DocumentMetadataAccess member
- sfx2/qa/complex/DocumentMetadataAccessTest.java,
sfx2/qa/complex/{tests.sce,makefile.mk},
sfx2/qa/complex/testdocuments/TESTRDFA.odt:
+ add complex test: DocumentMetadataAccessTest
+ add RDFa test document
#i95863#
- sfx2/inc/sfx2/dinfdlg.hxx, sfx2/source/dialog/dinfdlg.cxx:
+ refactor SfxDocumentItem so it no longer requires a XDocumentInfo
+ move struct CustomProperty to implementation file
+ remove class SfxDocumentUserPage
+ QueryValue,PutValue: remove MID_DOCINFO_FIELD*
- sfx2/source/doc/objserv.cxx:
+ adapt to SfxDocumentItem change
- sfx2/inc/sfx2/sfx.hrc, sfx2/sdi/sfxslots.sdi, sfx2/inc/sfx2/msg.hxx:
+ remove MID_DOCINFO_FIELD*
+ put all invocations of SFX_DECL_TYPE in msg.hxx, and undef SFX_DECL_TYPE
- sfx2/source/doc/objxtor.cxx:
+ fix abuses of comphelper_getProcessComponentContext (missing release)
- sfx2/source/doc/docfile.cxx:
+ SfxMedium::SfxMedium: don't dereference NULL, throw exception instead
- sfx2/source/doc/objstor.cxx:
+ SfxObjectShell::DoLoad: fix bug: DocumentBaseURI is not initialized
2009-02-26 12:58:07 +0100 mst r268502 : migration of cws odfmetadata2 from CVS (resync to m42): module xmloff
#i90620#: implement RDFa import (interface change)
- xmloff/inc/xmloff/xmlimp.hxx. xmloff/source/core/xmlimp.cxx:
+ make SvXMLImport::GetAbsoluteReference() const
+ add SvXMLImport::GetComponentContext()
+ SvXMLImport::_InitCtor(): add RDFa namespace
+ add SvXMLImport::AddRDFa()
+ SvXMLImport::endDocument() inserts RDFa into document repository
- xmloff/inc/xmloff/xmltoken.hxx, xmloff/source/core/xmltoken.cxx:
+ new tokens for RDFa: XML_ABOUT, XML_DATATYPE
- xmloff/inc/RDFaImportHelper.hxx, xmloff/source/core/RDFaImportHelper.cxx:
+ new class RDFaImportHelper
+ adapt the code to the bleak reality of broken C++ implementations
+ handle empty xhtml:about attributes properly, which are actually
valid relative URIs
+ work around broken SvXMLImport::GetAbsoluteReference
- xmloff/source/core/makefile.mk:
+ add RDFaImportHelper.cxx
#i90620#: implement RDFa export
- xmloff/inc/xmloff/xmlexp.hxx, xmloff/source/core/xmlexp.cxx:
+ add SvXMLExport::EnsureNamespace(), and a stack of namespace maps
+ add SvXMLExport::GetComponentContext()
+ add SvXMLExport::AddAttributesRDFa()
- xmloff/inc/RDFaExportHelper.hxx, xmloff/source/core/RDFaExportHelper.cxx:
+ new class RDFaExportHelper
+ don't use std::map::data_type, which is actually called
std::map::mapped_type by libstdc++
- xmloff/source/core/makefile.mk:
+ add RDFaExportHelper.cxx
#i91563#
- xmloff/inc/xmloff/txtimp.hxx, xmloff/source/text/txtimp.cxx:
+ XMLTextPAttrTokens: add RDFa tokens
- xmloff/source/text/txtparai{.hxx,.cxx}:
+ import RDFa for text:p
- xmloff/source/text/txtparae.cxx:
+ export RDFa for text:p
interface change: use XHTML namespace instead of RDFA
- xmloff/inc/xmlnmspe.hxx, xmloff/inc/xmloff/xmltoken.hxx,
xmloff/source/core/{xmltoken.cxx,xmlimp.cxx,xmlexp.cxx,RDFaExportHelper.cxx},
xmloff/source/text/txtimp.cxx:
+ use XHTML namespace instead of RDFA
#i91565#, #i91566#: (preliminary) import for text:meta, text:meta-field
- xmloff/source/text/txtparai.cxx:
+ new class XMLMetaImportContextBase with subclasses to import
text:meta and text:meta-field
- xmloff/source/text/XMLTextMarkImportContext.cxx:
+ change XMLTextMarkImportContext::CreateAndInsertMark to handle marks
with no name (text:meta)
#i91565#, #i91566#: (preliminary) export for text:meta, text:meta-field
- xmloff/inc/txtflde.hxx, xmloff/source/text/txtflde.cxx:
+ add FIELD_ID_META to FieldIdEnum
+ new method XMLTextFieldExport::ExportMetaField()
+ change XMLTextFieldExport::ExportField{,AutoStyle,Helper}
to take additional parameter for progress bar
- xmloff/inc/xmloff/txtparae.hxx, xmloff/source/text/txtparae.cxx:
+ make XMLTextParagraphExport::exportTextRangeEnumeration() public
+ new method XMLTextParagraphExport::exportMeta()
#i90620#
- xmloff/inc/xmloff/xmlimp.hxx, xmloff/source/core/xmlimp.cxx,
xmloff/inc/xmloff/xmlexp.hxx, xmloff/source/core/xmlexp.cxx:
+ rename SvXML{Im,Ex}port::GetStreamPath() to GetStreamName()
+ fix xml:id {im,ex}port for embedded documents and non-packages
+ adapt to API change: XMetadatable
#i90620# GRDDL
- xmloff/inc/xmlnmspe.hxx, xmloff/inc/xmloff/xmltoken.hxx,
xmloff/source/core/{xmltoken.cxx,xmlexp.cxx}:
+ add GRDDL namespace
+ add token XML_TRANSFORMATION
+ add grddl:transformation attribute to root elements for meta.xml,
content.xml and styles.xml
2009-02-26 12:54:40 +0100 mst r268501 : migration of cws odfmetadata2 from CVS (resync to m42): module unoxml
#i90620#
- unoxml/source/rdf/librdf_repository.cxx:
+ librdf_Repository::importGraph: allocate buffer sized length of stream
+ switch from one librdf_world per repository to a single static world
because redland has global variables with a brain-damaged life-cycle...
+ exportGraph: use new raptor 1.4.18 feature to disable writing
an xml:base attribute in RDF/XML files
- unoxml/source/rdf/librdf_repository.cxx:
unoxml/qa/complex/RDFRepositoryTest.java:
+ adapt to predicate is URI change
+ adapt to RDFa API change
+ adapt to API change: RDFa has multiple predicates...
+ adapt to API change: XMetadatable derives from XURI
+ allow xhtml:datatype without xhtml:content
+ adapt to API change: attribute MetadataReference is StringPair
- unoxml/source/rdf/CURI.cxx:
+ add some more URI constants
2009-02-26 12:53:32 +0100 mst r268500 : migration of cws odfmetadata2 from CVS (resync to m42): module package
- package/inc/ImplValidCharacters.hxx:
+ remove (moved to comphelper)
2009-02-26 12:52:49 +0100 mst r268499 : migration of cws odfmetadata2 from CVS (resync to m42): module comphelper
- comphelper/inc/comphelper/processfactory.hxx,
comphelper/source/processfactory/processfactory.cxx:
+ add getProcessComponentContext()
+ change return type of comphelper_getProcessComponentContext to Reference
- comphelper/inc/comphelper/stl_types.hxx:
+ add OUStringBufferAppender
+ add algorithm intersperse
- comphelper/source/misc/string.cxx:
+ rewrite convertCommaSeparated with intersperse and OUStringBufferAppender
- comphelper/inc/comphelper/stlunosequence.hxx:
+ fix bug: begin() on empty sequence != end()
2009-02-26 12:50:47 +0100 mst r268498 : migration of cws odfmetadata2 from CVS (resync to m42): module offapi
#i96209#
- offapi/com/sun/star/text/fieldmaster/*.idl:
+ rename module from FieldMaster to fieldmaster
- offapi/type_reference/{typelibrary_history.txt,types.rdb}:
+ update reference types.rdb
#i90620#
- offapi/com/sun/star/rdf/{XMetadatable.idl,XDocumentMetadataAccess.idl}:
+ API change: XMetadatable derives from XURI
+ API change: replace XmlId (string) with MetadataReference (StringPair)
- offapi/com/sun/star/rdf/{Statement.idl,XDocumentRepository.idl,
XNamedGraph.idl,XRepository.idl}:
+ the predicate of a statement is a URI, not a Resource
- offapi/com/sun/star/rdf/XDocumentMetadataAccess.idl:
+ rename: s/Package/Document/
+ remove uuid
+ remove everything related to mapping
+ graph names are now generated from base URI and file names
+ load methods: improve error handling with XInteractionHandler
- offapi/com/sun/star/rdf/XDocumentRepository.idl:
+ change: RDFa permits using multiple predicates in one attribute
+ setStatementRDFa: subject is now XResource, object is now XMetadatable
- offapi/com/sun/star/rdf/URIs.idl:
+ add some more URI constants
- offapi/com/sun/star/rdf:
+ fix @since tags and replace <method> with <member>
2009-02-26 12:47:24 +0100 mst r268497 : migration of cws odfmetadata2 from CVS (resync to m42): module redland
fix #i93768#
- redland/raptor-1.4.17.patch, redland/raptor/makefile.mk:
+ disable GRDDL parser to prevent call to libxslt
xsltSetDefaultSecurityPrefs, which breaks xmlhelp
- redland/raptor/makefile.mk, redland/raptor-1.4.17.patch,
redland/raptor-1.4.18.patch:
+ upgrade raptor to 1.4.18
+ deactivate serializer for RSS/Atom (does not build)
- redland/rasqal/makefile.mk, redland/rasqal-0.9.15.patch,
redland/rasqal-0.9.16.patch,
+ upgrade rasqal to 0.9.16
- redland/redland/makefile.mk, redland/redland-1.0.7.patch,
redland/redland-1.0.8.patch:
+ upgrade redland to 1.0.8
- redland/redlandversion.mk:
+ the librasqal SONAME has changed
2009-07-02 09:05:03 +00:00
|
|
|
}
|
2000-09-18 23:08:29 +00:00
|
|
|
nIdx = nStop;
|
2007-09-27 08:13:42 +00:00
|
|
|
aIter.SeekAndChgAttrIter( nIdx, pOut );
|
2000-09-18 23:08:29 +00:00
|
|
|
switch( cChar )
|
|
|
|
{
|
|
|
|
case CH_BREAK :
|
|
|
|
{
|
|
|
|
if( (long)rMax < aArg.nRowWidth )
|
|
|
|
rMax = aArg.nRowWidth;
|
|
|
|
aArg.nRowWidth = 0;
|
|
|
|
aArg.NewWord();
|
2007-09-27 08:13:42 +00:00
|
|
|
aIter.SeekAndChgAttrIter( ++nIdx, pOut );
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
case CH_TAB :
|
|
|
|
{
|
|
|
|
aArg.NewWord();
|
2007-09-27 08:13:42 +00:00
|
|
|
aIter.SeekAndChgAttrIter( ++nIdx, pOut );
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
break;
|
2001-11-30 12:52:05 +00:00
|
|
|
case CHAR_SOFTHYPHEN:
|
|
|
|
++nIdx;
|
|
|
|
break;
|
|
|
|
case CHAR_HARDBLANK:
|
|
|
|
case CHAR_HARDHYPHEN:
|
|
|
|
{
|
2012-10-24 07:28:15 +02:00
|
|
|
OUString sTmp( cChar );
|
2013-10-26 19:50:13 +02:00
|
|
|
SwDrawTextInfo aDrawInf( const_cast<SwViewShell *>(getIDocumentLayoutAccess()->GetCurrentViewShell()),
|
2013-10-22 15:14:13 +03:00
|
|
|
*pOut, 0, sTmp, 0, 1, 0, sal_False );
|
2001-11-30 12:52:05 +00:00
|
|
|
nAktWidth = aIter.GetFnt()->_GetTxtSize( aDrawInf ).Width();
|
|
|
|
aArg.nWordWidth += nAktWidth;
|
|
|
|
aArg.nRowWidth += nAktWidth;
|
|
|
|
if( (long)rAbsMin < aArg.nWordWidth )
|
|
|
|
rAbsMin = aArg.nWordWidth;
|
|
|
|
aArg.Minimum( aArg.nWordWidth + aArg.nWordAdd );
|
|
|
|
aArg.nNoLineBreak = nIdx++;
|
|
|
|
}
|
|
|
|
break;
|
2000-09-18 23:08:29 +00:00
|
|
|
case CH_TXTATR_BREAKWORD:
|
|
|
|
case CH_TXTATR_INWORD:
|
|
|
|
{
|
|
|
|
if( !pHint )
|
|
|
|
break;
|
|
|
|
long nOldWidth = aArg.nWordWidth;
|
|
|
|
long nOldAdd = aArg.nWordAdd;
|
|
|
|
aArg.NewWord();
|
|
|
|
|
|
|
|
switch( pHint->Which() )
|
|
|
|
{
|
|
|
|
case RES_TXTATR_FLYCNT :
|
|
|
|
{
|
|
|
|
SwFrmFmt *pFrmFmt = pHint->GetFlyCnt().GetFrmFmt();
|
|
|
|
const SvxLRSpaceItem &rLR = pFrmFmt->GetLRSpace();
|
|
|
|
if( RES_DRAWFRMFMT == pFrmFmt->Which() )
|
|
|
|
{
|
|
|
|
const SdrObject* pSObj = pFrmFmt->FindSdrObject();
|
|
|
|
if( pSObj )
|
2003-11-24 15:09:00 +00:00
|
|
|
nAktWidth = pSObj->GetCurrentBoundRect().GetWidth();
|
2000-09-18 23:08:29 +00:00
|
|
|
else
|
|
|
|
nAktWidth = 0;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
const SwFmtFrmSize& rTmpSize = pFrmFmt->GetFrmSize();
|
|
|
|
if( RES_FLYFRMFMT == pFrmFmt->Which()
|
|
|
|
&& rTmpSize.GetWidthPercent() )
|
|
|
|
{
|
2011-01-17 21:50:08 +01:00
|
|
|
/*-----------------------------------------------------------------------------
|
2000-09-18 23:08:29 +00:00
|
|
|
* Hier ein HACK fuer folgende Situation: In dem Absatz befindet sich
|
|
|
|
* ein Textrahmen mit relativer Groesse. Dann nehmen wir mal als minimale
|
|
|
|
* Breite 0,5 cm und als maximale KSHRT_MAX.
|
|
|
|
* Sauberer und vielleicht spaeter notwendig waere es, ueber den Inhalt
|
|
|
|
* des Textrahmens zu iterieren und GetMinMaxSize rekursiv zu rufen.
|
|
|
|
* --------------------------------------------------------------------------*/
|
|
|
|
nAktWidth = FLYINCNT_MIN_WIDTH; // 0,5 cm
|
|
|
|
if( (long)rMax < KSHRT_MAX )
|
|
|
|
rMax = KSHRT_MAX;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
nAktWidth = pFrmFmt->GetFrmSize().GetWidth();
|
|
|
|
}
|
|
|
|
nAktWidth += rLR.GetLeft();
|
|
|
|
nAktWidth += rLR.GetRight();
|
|
|
|
aArg.nWordAdd = nOldWidth + nOldAdd;
|
|
|
|
aArg.nWordWidth = nAktWidth;
|
|
|
|
aArg.nRowWidth += nAktWidth;
|
|
|
|
if( (long)rAbsMin < aArg.nWordWidth )
|
|
|
|
rAbsMin = aArg.nWordWidth;
|
|
|
|
aArg.Minimum( aArg.nWordWidth + aArg.nWordAdd );
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case RES_TXTATR_FTN :
|
|
|
|
{
|
2013-09-09 15:15:00 +02:00
|
|
|
const OUString aTxt = pHint->GetFtn().GetNumStr();
|
2000-09-18 23:08:29 +00:00
|
|
|
if( lcl_MinMaxString( aArg, aIter.GetFnt(), aTxt, 0,
|
2013-09-09 15:15:00 +02:00
|
|
|
aTxt.getLength() ) )
|
2000-09-18 23:08:29 +00:00
|
|
|
nAdd = 20;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case RES_TXTATR_FIELD :
|
|
|
|
{
|
2013-09-24 15:03:38 +00:00
|
|
|
SwField *pFld = (SwField*)pHint->GetFmtFld().GetField();
|
2013-09-09 15:15:00 +02:00
|
|
|
const OUString aTxt = pFld->ExpandField(true);
|
2000-09-18 23:08:29 +00:00
|
|
|
if( lcl_MinMaxString( aArg, aIter.GetFnt(), aTxt, 0,
|
2013-09-09 15:15:00 +02:00
|
|
|
aTxt.getLength() ) )
|
2000-09-18 23:08:29 +00:00
|
|
|
nAdd = 20;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
default: aArg.nWordWidth = nOldWidth;
|
|
|
|
aArg.nWordAdd = nOldAdd;
|
|
|
|
|
|
|
|
}
|
2007-09-27 08:13:42 +00:00
|
|
|
aIter.SeekAndChgAttrIter( ++nIdx, pOut );
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if( (long)rMax < aArg.nRowWidth )
|
|
|
|
rMax = aArg.nRowWidth;
|
|
|
|
|
|
|
|
nLROffset += rSpace.GetRight();
|
|
|
|
|
|
|
|
rAbsMin += nLROffset;
|
|
|
|
rAbsMin += nAdd;
|
|
|
|
rMin += nLROffset;
|
|
|
|
rMin += nAdd;
|
|
|
|
if( (long)rMin < aNodeArgs.nMinWidth )
|
|
|
|
rMin = aNodeArgs.nMinWidth;
|
|
|
|
if( (long)rAbsMin < aNodeArgs.nMinWidth )
|
|
|
|
rAbsMin = aNodeArgs.nMinWidth;
|
|
|
|
rMax += aNodeArgs.nMaxWidth;
|
|
|
|
rMax += nLROffset;
|
|
|
|
rMax += nAdd;
|
|
|
|
if( rMax < rMin ) // z.B. Rahmen mit Durchlauf gehen zunaechst nur
|
|
|
|
rMax = rMin; // in das Minimum ein
|
|
|
|
pOut->SetMapMode( aOldMap );
|
|
|
|
}
|
|
|
|
|
2001-02-23 08:58:03 +00:00
|
|
|
/*************************************************************************
|
|
|
|
* SwTxtNode::GetScalingOfSelectedText()
|
|
|
|
*
|
|
|
|
* Calculates the width of the text part specified by nStt and nEnd,
|
|
|
|
* the height of the line containing nStt is devided by this width,
|
|
|
|
* indicating the scaling factor, if the text part is rotated.
|
|
|
|
* Having CH_BREAKs in the text part, this method returns the scaling
|
|
|
|
* factor for the longest of the text parts separated by the CH_BREAKs.
|
|
|
|
*
|
|
|
|
* changing this method very likely requires changing of "GetMinMaxSize"
|
|
|
|
*************************************************************************/
|
|
|
|
|
2013-12-14 22:46:05 +01:00
|
|
|
sal_uInt16 SwTxtNode::GetScalingOfSelectedText( sal_Int32 nStt, sal_Int32 nEnd )
|
2001-02-23 08:58:03 +00:00
|
|
|
const
|
|
|
|
{
|
2013-10-26 19:50:13 +02:00
|
|
|
SwViewShell* pSh = NULL;
|
2003-04-01 08:56:20 +00:00
|
|
|
OutputDevice* pOut = NULL;
|
2001-02-23 08:58:03 +00:00
|
|
|
GetDoc()->GetEditShell( &pSh );
|
2003-04-01 08:56:20 +00:00
|
|
|
|
|
|
|
if ( pSh )
|
|
|
|
pOut = &pSh->GetRefDev();
|
|
|
|
else
|
2001-02-23 08:58:03 +00:00
|
|
|
{
|
2003-04-01 08:56:20 +00:00
|
|
|
//Zugriff ueber StarONE, es muss keine Shell existieren oder aktiv sein.
|
2010-06-13 15:22:56 +02:00
|
|
|
if ( getIDocumentSettingAccess()->get(IDocumentSettingAccess::HTML_MODE) )
|
2001-02-23 08:58:03 +00:00
|
|
|
pOut = GetpApp()->GetDefaultDevice();
|
2003-04-01 08:56:20 +00:00
|
|
|
else
|
2006-08-14 15:38:07 +00:00
|
|
|
pOut = getIDocumentDeviceAccess()->getReferenceDevice( true );
|
2001-02-23 08:58:03 +00:00
|
|
|
}
|
|
|
|
|
2010-11-25 17:08:45 +01:00
|
|
|
OSL_ENSURE( pOut, "GetScalingOfSelectedText without outdev" );
|
2003-04-01 08:56:20 +00:00
|
|
|
|
2001-02-23 08:58:03 +00:00
|
|
|
MapMode aOldMap( pOut->GetMapMode() );
|
|
|
|
pOut->SetMapMode( MapMode( MAP_TWIP ) );
|
|
|
|
|
2001-03-08 09:53:32 +00:00
|
|
|
if ( nStt == nEnd )
|
|
|
|
{
|
2013-04-19 10:34:21 +02:00
|
|
|
if ( !g_pBreakIt->GetBreakIter().is() )
|
2001-03-08 09:53:32 +00:00
|
|
|
return 100;
|
|
|
|
|
|
|
|
SwScriptInfo aScriptInfo;
|
|
|
|
SwAttrIter aIter( *(SwTxtNode*)this, aScriptInfo );
|
2007-09-27 08:13:42 +00:00
|
|
|
aIter.SeekAndChgAttrIter( nStt, pOut );
|
2001-03-08 09:53:32 +00:00
|
|
|
|
|
|
|
Boundary aBound =
|
2013-04-19 10:34:21 +02:00
|
|
|
g_pBreakIt->GetBreakIter()->getWordBoundary( GetTxt(), nStt,
|
|
|
|
g_pBreakIt->GetLocale( aIter.GetFnt()->GetLanguage() ),
|
2001-03-08 09:53:32 +00:00
|
|
|
WordType::DICTIONARY_WORD, sal_True );
|
|
|
|
|
|
|
|
if ( nStt == aBound.startPos )
|
2004-02-10 13:56:16 +00:00
|
|
|
{
|
2001-03-08 09:53:32 +00:00
|
|
|
// cursor is at left or right border of word
|
2004-02-10 13:56:16 +00:00
|
|
|
pOut->SetMapMode( aOldMap );
|
2001-03-08 09:53:32 +00:00
|
|
|
return 100;
|
2004-02-10 13:56:16 +00:00
|
|
|
}
|
2001-03-08 09:53:32 +00:00
|
|
|
|
2013-12-14 22:46:05 +01:00
|
|
|
nStt = aBound.startPos;
|
|
|
|
nEnd = aBound.endPos;
|
2001-03-08 09:53:32 +00:00
|
|
|
|
|
|
|
if ( nStt == nEnd )
|
2004-02-10 13:56:16 +00:00
|
|
|
{
|
|
|
|
pOut->SetMapMode( aOldMap );
|
2001-03-08 09:53:32 +00:00
|
|
|
return 100;
|
2004-02-10 13:56:16 +00:00
|
|
|
}
|
2001-03-08 09:53:32 +00:00
|
|
|
}
|
|
|
|
|
2001-02-23 08:58:03 +00:00
|
|
|
SwScriptInfo aScriptInfo;
|
2001-03-05 11:54:15 +00:00
|
|
|
SwAttrIter aIter( *(SwTxtNode*)this, aScriptInfo );
|
2001-02-23 08:58:03 +00:00
|
|
|
|
2001-03-06 15:08:39 +00:00
|
|
|
// We do not want scaling attributes to be considered during this
|
|
|
|
// calculation. For this, we push a temporary scaling attribute with
|
|
|
|
// scaling value 100 and priority flag on top of the scaling stack
|
|
|
|
SwAttrHandler& rAH = aIter.GetAttrHandler();
|
2007-05-10 15:01:48 +00:00
|
|
|
SvxCharScaleWidthItem aItem(100, RES_CHRATR_SCALEW);
|
2001-03-15 14:59:12 +00:00
|
|
|
SwTxtAttrEnd aAttr( aItem, nStt, nEnd );
|
2001-03-06 15:08:39 +00:00
|
|
|
aAttr.SetPriorityAttr( sal_True );
|
|
|
|
rAH.PushAndChg( aAttr, *(aIter.GetFnt()) );
|
|
|
|
|
2013-12-14 22:46:05 +01:00
|
|
|
sal_Int32 nIdx = nStt;
|
2001-02-23 08:58:03 +00:00
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uLong nWidth = 0;
|
|
|
|
sal_uLong nProWidth = 0;
|
2001-02-23 08:58:03 +00:00
|
|
|
|
|
|
|
while( nIdx < nEnd )
|
|
|
|
{
|
2007-09-27 08:13:42 +00:00
|
|
|
aIter.SeekAndChgAttrIter( nIdx, pOut );
|
2001-02-23 08:58:03 +00:00
|
|
|
|
|
|
|
// scan for end of portion
|
2013-12-14 22:46:05 +01:00
|
|
|
const sal_Int32 nNextChg = std::max(aIter.GetNextAttr(), aScriptInfo.NextScriptChg( nIdx ));
|
2001-02-23 08:58:03 +00:00
|
|
|
|
2013-12-14 22:46:05 +01:00
|
|
|
sal_Int32 nStop = nIdx;
|
2012-10-19 05:34:48 -05:00
|
|
|
sal_Unicode cChar = CH_BLANK;
|
2001-03-06 15:08:39 +00:00
|
|
|
SwTxtAttr* pHint = NULL;
|
2001-02-23 08:58:03 +00:00
|
|
|
|
|
|
|
// stop at special characters in [ nIdx, nNextChg ]
|
|
|
|
while( nStop < nEnd && nStop < nNextChg )
|
|
|
|
{
|
2013-02-17 00:14:26 +01:00
|
|
|
cChar = m_Text[nStop];
|
2010-09-30 15:58:05 +01:00
|
|
|
if (
|
|
|
|
CH_TAB == cChar ||
|
|
|
|
CH_BREAK == cChar ||
|
|
|
|
CHAR_HARDBLANK == cChar ||
|
|
|
|
CHAR_HARDHYPHEN == cChar ||
|
2001-11-30 12:52:05 +00:00
|
|
|
CHAR_SOFTHYPHEN == cChar ||
|
2010-09-30 15:58:05 +01:00
|
|
|
(
|
|
|
|
(CH_TXTATR_BREAKWORD == cChar || CH_TXTATR_INWORD == cChar) &&
|
|
|
|
(0 == (pHint = aIter.GetAttr(nStop)))
|
|
|
|
)
|
|
|
|
)
|
|
|
|
{
|
2001-02-23 08:58:03 +00:00
|
|
|
break;
|
2010-09-30 15:58:05 +01:00
|
|
|
}
|
2001-02-23 08:58:03 +00:00
|
|
|
else
|
|
|
|
++nStop;
|
|
|
|
}
|
|
|
|
|
|
|
|
// calculate text widths up to cChar
|
|
|
|
if ( nStop > nIdx )
|
2001-04-09 09:44:17 +00:00
|
|
|
{
|
2003-04-01 08:56:20 +00:00
|
|
|
SwDrawTextInfo aDrawInf( pSh, *pOut, 0, GetTxt(), nIdx, nStop - nIdx );
|
2001-04-09 09:44:17 +00:00
|
|
|
nProWidth += aIter.GetFnt()->_GetTxtSize( aDrawInf ).Width();
|
|
|
|
}
|
2001-02-23 08:58:03 +00:00
|
|
|
|
|
|
|
nIdx = nStop;
|
2007-09-27 08:13:42 +00:00
|
|
|
aIter.SeekAndChgAttrIter( nIdx, pOut );
|
2001-02-23 08:58:03 +00:00
|
|
|
|
|
|
|
if ( cChar == CH_BREAK )
|
|
|
|
{
|
2013-04-11 00:21:40 -03:00
|
|
|
nWidth = std::max( nWidth, nProWidth );
|
2001-02-23 08:58:03 +00:00
|
|
|
nProWidth = 0;
|
|
|
|
nIdx++;
|
|
|
|
}
|
|
|
|
else if ( cChar == CH_TAB )
|
|
|
|
{
|
|
|
|
// tab receives width of one space
|
2012-10-24 07:28:15 +02:00
|
|
|
OUString sTmp( CH_BLANK );
|
2003-04-01 08:56:20 +00:00
|
|
|
SwDrawTextInfo aDrawInf( pSh, *pOut, 0, sTmp, 0, 1 );
|
2001-11-30 12:52:05 +00:00
|
|
|
nProWidth += aIter.GetFnt()->_GetTxtSize( aDrawInf ).Width();
|
|
|
|
nIdx++;
|
|
|
|
}
|
|
|
|
else if ( cChar == CHAR_SOFTHYPHEN )
|
|
|
|
++nIdx;
|
|
|
|
else if ( cChar == CHAR_HARDBLANK || cChar == CHAR_HARDHYPHEN )
|
|
|
|
{
|
2012-10-24 07:28:15 +02:00
|
|
|
OUString sTmp( cChar );
|
2003-04-01 08:56:20 +00:00
|
|
|
SwDrawTextInfo aDrawInf( pSh, *pOut, 0, sTmp, 0, 1 );
|
2001-04-09 09:44:17 +00:00
|
|
|
nProWidth += aIter.GetFnt()->_GetTxtSize( aDrawInf ).Width();
|
2001-02-23 08:58:03 +00:00
|
|
|
nIdx++;
|
|
|
|
}
|
|
|
|
else if ( pHint && ( cChar == CH_TXTATR_BREAKWORD || CH_TXTATR_INWORD ) )
|
|
|
|
{
|
|
|
|
switch( pHint->Which() )
|
|
|
|
{
|
|
|
|
case RES_TXTATR_FTN :
|
|
|
|
{
|
2013-09-09 15:15:00 +02:00
|
|
|
const OUString aTxt = pHint->GetFtn().GetNumStr();
|
|
|
|
SwDrawTextInfo aDrawInf( pSh, *pOut, 0, aTxt, 0, aTxt.getLength() );
|
2001-04-09 09:44:17 +00:00
|
|
|
|
|
|
|
nProWidth += aIter.GetFnt()->_GetTxtSize( aDrawInf ).Width();
|
2001-02-23 08:58:03 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
case RES_TXTATR_FIELD :
|
|
|
|
{
|
2013-09-24 15:03:38 +00:00
|
|
|
SwField *pFld = (SwField*)pHint->GetFmtFld().GetField();
|
2013-09-09 15:15:00 +02:00
|
|
|
OUString const aTxt = pFld->ExpandField(true);
|
|
|
|
SwDrawTextInfo aDrawInf( pSh, *pOut, 0, aTxt, 0, aTxt.getLength() );
|
2001-04-09 09:44:17 +00:00
|
|
|
|
|
|
|
nProWidth += aIter.GetFnt()->_GetTxtSize( aDrawInf ).Width();
|
2001-02-23 08:58:03 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
default:
|
|
|
|
{
|
|
|
|
// any suggestions for a default action?
|
|
|
|
}
|
|
|
|
} // end of switch
|
|
|
|
nIdx++;
|
|
|
|
} // end of while
|
|
|
|
}
|
|
|
|
|
2013-04-11 00:21:40 -03:00
|
|
|
nWidth = std::max( nWidth, nProWidth );
|
2001-02-23 08:58:03 +00:00
|
|
|
|
|
|
|
// search for a text frame this node belongs to
|
2010-12-17 09:02:23 +01:00
|
|
|
SwIterator<SwTxtFrm,SwTxtNode> aFrmIter( *this );
|
2001-07-17 08:11:33 +00:00
|
|
|
SwTxtFrm* pFrm = 0;
|
2010-12-17 09:02:23 +01:00
|
|
|
for( SwTxtFrm* pTmpFrm = aFrmIter.First(); pTmpFrm; pTmpFrm = aFrmIter.Next() )
|
2001-02-23 08:58:03 +00:00
|
|
|
{
|
|
|
|
if ( pTmpFrm->GetOfst() <= nStt &&
|
|
|
|
( !pTmpFrm->GetFollow() ||
|
|
|
|
pTmpFrm->GetFollow()->GetOfst() > nStt ) )
|
|
|
|
{
|
|
|
|
pFrm = pTmpFrm;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// search for the line containing nStt
|
|
|
|
if ( pFrm && pFrm->HasPara() )
|
|
|
|
{
|
|
|
|
SwTxtInfo aInf( pFrm );
|
|
|
|
SwTxtIter aLine( pFrm, &aInf );
|
|
|
|
aLine.CharToLine( nStt );
|
|
|
|
pOut->SetMapMode( aOldMap );
|
2011-01-17 15:06:54 +01:00
|
|
|
return (sal_uInt16)( nWidth ?
|
2001-03-05 11:54:15 +00:00
|
|
|
( ( 100 * aLine.GetCurr()->Height() ) / nWidth ) : 0 );
|
2001-02-23 08:58:03 +00:00
|
|
|
}
|
|
|
|
// no frame or no paragraph, we take the height of the character
|
|
|
|
// at nStt as line height
|
|
|
|
|
2007-09-27 08:13:42 +00:00
|
|
|
aIter.SeekAndChgAttrIter( nStt, pOut );
|
2001-02-23 08:58:03 +00:00
|
|
|
pOut->SetMapMode( aOldMap );
|
2001-04-09 09:44:17 +00:00
|
|
|
|
2003-04-01 08:56:20 +00:00
|
|
|
SwDrawTextInfo aDrawInf( pSh, *pOut, 0, GetTxt(), nStt, 1 );
|
2011-01-17 15:06:54 +01:00
|
|
|
return (sal_uInt16)
|
2001-04-09 09:44:17 +00:00
|
|
|
( nWidth ? ((100 * aIter.GetFnt()->_GetTxtSize( aDrawInf ).Height()) / nWidth ) : 0 );
|
2001-02-23 08:58:03 +00:00
|
|
|
}
|
2004-10-22 07:13:38 +00:00
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt16 SwTxtNode::GetWidthOfLeadingTabs() const
|
2004-10-22 07:13:38 +00:00
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt16 nRet = 0;
|
2004-10-22 07:13:38 +00:00
|
|
|
|
2013-11-12 00:46:22 +01:00
|
|
|
sal_Int32 nIdx = 0;
|
2004-10-22 07:13:38 +00:00
|
|
|
|
2013-11-21 17:51:25 +01:00
|
|
|
while ( nIdx < GetTxt().getLength() )
|
|
|
|
{
|
|
|
|
const sal_Unicode cCh = GetTxt()[nIdx];
|
|
|
|
if ( cCh!='\t' && cCh!=' ' )
|
|
|
|
{
|
|
|
|
break;
|
|
|
|
}
|
2005-01-21 09:41:03 +00:00
|
|
|
++nIdx;
|
2013-11-21 17:51:25 +01:00
|
|
|
}
|
2005-01-21 09:41:03 +00:00
|
|
|
|
|
|
|
if ( nIdx > 0 )
|
2004-10-22 07:13:38 +00:00
|
|
|
{
|
2005-01-21 09:41:03 +00:00
|
|
|
SwPosition aPos( *this );
|
|
|
|
aPos.nContent += nIdx;
|
|
|
|
|
|
|
|
// Find the non-follow text frame:
|
2010-12-17 09:02:23 +01:00
|
|
|
SwIterator<SwTxtFrm,SwTxtNode> aIter( *this );
|
|
|
|
for( SwTxtFrm* pFrm = aIter.First(); pFrm; pFrm = aIter.Next() )
|
2005-01-21 09:41:03 +00:00
|
|
|
{
|
|
|
|
// Only consider master frames:
|
2010-12-17 09:02:23 +01:00
|
|
|
if ( !pFrm->IsFollow() )
|
2004-10-22 07:13:38 +00:00
|
|
|
{
|
2005-01-21 09:41:03 +00:00
|
|
|
SWRECTFN( pFrm )
|
|
|
|
SwRect aRect;
|
|
|
|
pFrm->GetCharRect( aRect, aPos );
|
2011-01-17 15:06:54 +01:00
|
|
|
nRet = (sal_uInt16)
|
2005-01-21 09:41:03 +00:00
|
|
|
( pFrm->IsRightToLeft() ?
|
|
|
|
(pFrm->*fnRect->fnGetPrtRight)() - (aRect.*fnRect->fnGetRight)() :
|
|
|
|
(aRect.*fnRect->fnGetLeft)() - (pFrm->*fnRect->fnGetPrtLeft)() );
|
|
|
|
break;
|
2004-10-22 07:13:38 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return nRet;
|
|
|
|
}
|
2010-10-14 08:30:41 +02:00
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|