Files
libreoffice/sw/source/ui/dbui/dbinsdlg.cxx

1865 lines
68 KiB
C++
Raw Normal View History

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
re-base on ALv2 code. Includes: Patches contributed by Oliver-Rainer Wittmann sw34bf06: #i117783# - Writer's implementation of XPagePrintable - apply print settings to new printing routines http://svn.apache.org/viewvc?view=revision&revision=1172115 sw34bf06: #o12311627# use <rtl_random> methods to create unique ids for list styles and list ids http://svn.apache.org/viewvc?view=revision&revision=1172112 sw34bf06 #i114725#,#i115828# - method <SwDoc::ClearDoc()> - clear list structures completely http://svn.apache.org/viewvc?view=revision&revision=1172122 i#118572 - remove ui string and help content regarding usage of Java Mail in Writer's Mail Merge as Java Mail is not used. http://svn.apache.org/viewvc?view=revision&revision=1197035 Patches contributed by Mathias Bauer cws mba34issues01: #i117718#: provide filter name in case storage of medium does not allow to detect one http://svn.apache.org/viewvc?view=revision&revision=1172350 cws mba34issues01: #i117721#: directly provide parameters retrieved from SfxMedium http://svn.apache.org/viewvc?view=revision&revision=1172353 gnumake4 work variously http://svn.apache.org/viewvc?view=revision&revision=1394707 http://svn.apache.org/viewvc?view=revision&revision=1394326 http://svn.apache.org/viewvc?view=revision&revision=1396797 http://svn.apache.org/viewvc?view=revision&revision=1397315 cws mba34issues01: #i117723#: convert assertion into trace http://svn.apache.org/viewvc?view=revision&revision=1172355 cws mba34issues01: #i117699#: keep layout alive until swdoc dies http://svn.apache.org/viewvc?view=revision&revision=1172362 cws mba34issues01: #i117943#: missing color attributes in RTF clipboard http://svn.apache.org/viewvc?view=revision&revision=1172363 Patch contributed by Henning Brinkmann imported patch i#103878 http://svn.apache.org/viewvc?view=revision&revision=1172109 Patches contributed by Michael Stahl sw34bf06: #i117955#: WW8 export: disable storing of section breaks in endnotes http://svn.apache.org/viewvc?view=revision&revision=1172119 Patch contributed by imacat Fixed the Asian language work count. http://svn.apache.org/viewvc?view=revision&revision=1241345 Patch contributed by Pedro Giffuni i#20878 - Add comment with BZ issue for reference. http://svn.apache.org/viewvc?view=revision&revision=1244517 Patch contributed by Andre Fischer Do not add targets for junit tests when junit is disabled. http://svn.apache.org/viewvc?view=revision&revision=1241508 add writerperfect dependency.
2011-03-31 10:05:04 +02:00
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include "dbinsdlg.hxx"
2000-09-18 16:15:01 +00:00
#include <memory>
#include <float.h>
2000-09-18 16:15:01 +00:00
#include <hintids.hxx>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/sdbc/XDataSource.hpp>
#include <com/sun/star/sdbc/XRow.hpp>
#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
#include <com/sun/star/sdb/XQueriesSupplier.hpp>
#include <com/sun/star/sdb/CommandType.hpp>
2000-09-18 16:15:01 +00:00
#include <com/sun/star/sdb/XColumn.hpp>
#include <com/sun/star/sdb/XDatabaseAccess.hpp>
#include <com/sun/star/sdbc/DataType.hpp>
#include <com/sun/star/sdbc/ResultSetType.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/util/NumberFormatter.hpp>
2000-09-18 16:15:01 +00:00
#include <com/sun/star/util/XNumberFormatTypes.hpp>
2001-10-16 10:10:55 +00:00
#include <com/sun/star/sdbc/XRowSet.hpp>
2000-10-20 13:18:07 +00:00
#include <comphelper/processfactory.hxx>
#include <editeng/langitem.hxx>
#include <svl/numuno.hxx>
#include <svl/stritem.hxx>
2000-09-18 16:15:01 +00:00
#include <vcl/msgbox.hxx>
#include <vcl/svapp.hxx>
#include <vcl/mnemonic.hxx>
#include <svl/style.hxx>
#include <svl/zformat.hxx>
2000-09-18 16:15:01 +00:00
#include <svx/htmlmode.hxx>
#include <editeng/unolingu.hxx>
2000-09-18 16:15:01 +00:00
#include <sfx2/app.hxx>
#include <svl/itemset.hxx>
#include <editeng/brushitem.hxx>
#include <editeng/boxitem.hxx>
2000-09-18 16:15:01 +00:00
#include <svx/rulritem.hxx>
#include <swdbtoolsclient.hxx>
2000-09-18 16:15:01 +00:00
#include <tabledlg.hxx>
#include <fmtclds.hxx>
#include <tabcol.hxx>
#include <uiitems.hxx>
#include <viewopt.hxx>
#include <uitool.hxx>
#include <wrtsh.hxx>
#include <wview.hxx>
#include <docsh.hxx>
#include <dbmgr.hxx>
#include <tblafmt.hxx>
#include <cellatr.hxx>
#include <swtable.hxx>
#include <dbfld.hxx>
#include <fmtcol.hxx>
#include <section.hxx>
#include <swwait.hxx>
#include <modcfg.hxx>
#include <swmodule.hxx>
#include <poolfmt.hxx>
#include <crsskip.hxx>
2000-09-18 16:15:01 +00:00
#include <dbinsdlg.hrc>
#include <dbui.hrc>
2000-12-08 09:19:55 +00:00
2000-09-18 16:15:01 +00:00
#include <cmdid.h>
#include <helpid.h>
#include <cfgid.h>
#include <SwStyleNameMapper.hxx>
#include <comphelper/uno3.hxx>
#include "tabsh.hxx"
#include "swabstdlg.hxx"
#include "table.hrc"
#include <unomid.h>
CWS-TOOLING: integrate CWS swrefactormarks2 2009-04-09 12:51:41 +0200 b_michaelsen r270689 : #i94949# cleaned up assertions after rebasing 2009-04-08 17:37:08 +0200 b_michaelsen r270658 : fixing sw/source/ui/utlui/makefile.mk 2009-04-07 17:56:54 +0200 b_michaelsen r270606 : added bookctrl.cxx to EXCEPTIONFILES, because this is needed for stl on unxsols4 2009-04-07 17:05:20 +0200 b_michaelsen r270603 : added crbm.cxx to EXCEPTIONFILES, because this is needed for stl on unxsols4 2009-04-02 23:44:38 +0200 b_michaelsen r270436 : CWS-TOOLING: rebase CWS swrefactormarks2 to trunk@270033 (milestone: DEV300:m45) 2009-02-27 16:25:31 +0100 b_michaelsen r268606 : #i94949# fixed Windows buildbreaker 2009-02-25 18:01:13 +0100 b_michaelsen r268464 : #i94949# Bookmarktest document filter roundtrips 2009-02-24 18:23:55 +0100 b_michaelsen r268404 : #i94949# Bookmark unittests 2009-02-23 19:47:44 +0100 b_michaelsen r268370 : #i94949# added unittest for bookmarks 2009-02-23 12:22:07 +0100 b_michaelsen r268348 : #i94949# fixing CheckCrossReferences testcase 2009-02-20 18:12:50 +0100 b_michaelsen r268335 : #i94949# fixing SwXTextRange 2009-02-18 18:32:57 +0100 b_michaelsen r268252 : #i94949# deregistering DdeBookmarks on delete 2009-02-18 18:29:08 +0100 b_michaelsen r268251 : fixing dbgoutsw.cxx for debug builds 2009-02-16 18:42:43 +0100 b_michaelsen r267834 : CWS-TOOLING: rebase CWS swrefactormarks2 to trunk@267171 (milestone: DEV300:m41) 2009-02-12 15:32:02 +0100 b_michaelsen r267667 : #i94949 fixed crossrefbookmark naming 2009-02-11 18:30:08 +0100 b_michaelsen r267624 : #94949# fixing bookmark navigation 2009-02-11 13:55:26 +0100 b_michaelsen r267599 : #i94949# fixed bookmark naming 2009-02-10 17:53:05 +0100 b_michaelsen r267571 : #i94949# renamed HasOtherMarkPos to IsExpanded 2009-02-10 17:23:01 +0100 b_michaelsen r267564 : #i94949# renamed ::sw::bookmark namespace to more fitting ::sw::mark 2009-02-10 16:16:32 +0100 b_michaelsen r267553 : #i94949# creating only CrossRefBookmark per Txtnode 2009-02-10 12:14:05 +0100 b_michaelsen r267547 : #i94949# fixed bookmark count in navigator 2009-02-09 19:12:18 +0100 b_michaelsen r267532 : #i94949# lcl_CopyBookmarks(..) - handle marks on boundaries correctly 2009-02-09 17:32:45 +0100 b_michaelsen r267524 : #i94949# setting the refobject of the DdeBookmark in Sin SwServerObject::SetDdeBookmark(..) 2009-02-09 17:22:15 +0100 b_michaelsen r267523 : #i94949# trying to harden SwServerObject 2009-02-09 16:47:32 +0100 b_michaelsen r267521 : #i94949# lcl_CopyBookmarks(..): try to get the source mark name, if possible 2009-02-09 16:05:42 +0100 b_michaelsen r267519 : #i94949# clearing the OtherMarkPos if PaM has no mark in repositionMark(..), swapping inverted bookmarks without hissing an assertion 2009-02-09 15:55:38 +0100 b_michaelsen r267518 : #i94949# checking for out-of-bounds in SwView::ExecuteStatusLine(..) 2009-02-09 15:23:47 +0100 b_michaelsen r267517 : #i94949# using an UNO_BOOKMARK in ui/dbui/dbinsdlg.cxx 2009-02-09 14:14:47 +0100 b_michaelsen r267514 : #i94949# IDocumentMarkAccess::GetType(..) asserts on unknown type 2009-02-09 14:04:25 +0100 b_michaelsen r267513 : #i94949# using rtl strings instead of tools-strings in CrossRefBookmarks 2009-02-09 13:55:01 +0100 b_michaelsen r267510 : #i94949# using empty string for UnoMark construction 2009-02-09 13:46:46 +0100 b_michaelsen r267509 : #i94949# removed superfluous #includes, removed superfluous member DdeBookmark::bGenerateName, initialized DdeBookmark::m_aRefObj removed superfluous local _FindItem::ClearObj 2009-02-06 14:38:37 +0100 b_michaelsen r267462 : #i94949# fixing FN_STAT_BOOKMARK dispatches 2009-02-05 18:05:07 +0100 b_michaelsen r267436 : #i94949# removing superfluous #includes 2009-02-04 15:51:31 +0100 b_michaelsen r267391 : fixing resync merge error 2009-02-02 19:39:55 +0100 b_michaelsen r267294 : #i94949# bookmark performance 2009-01-30 19:30:51 +0100 b_michaelsen r267229 : #i94949# throwing IllegalArgumentException, if appropriate 2009-01-30 19:29:56 +0100 b_michaelsen r267228 : #i94949# refactored lcl_FillBookmarkArray, comments, constness 2009-01-30 19:23:49 +0100 b_michaelsen r267227 : #i94949# refactored lcl_FillBookmarkArray, comments, constness 2009-01-30 19:16:06 +0100 b_michaelsen r267226 : #i94949# refactored lcl_FillBookmarkArray 2009-01-30 17:59:27 +0100 b_michaelsen r267222 : #i94949# removed superficial #include 2009-01-30 17:50:02 +0100 b_michaelsen r267220 : #i94949# SwXTextRange remembers its UNO bookmark 2009-01-29 20:19:58 +0100 b_michaelsen r267168 : #i94949# implemented IDocumentMarkAccess::findBookmark 2009-01-29 17:22:17 +0100 b_michaelsen r267162 : #i94949# implemented renameMark in Markmanager 2009-01-29 14:17:10 +0100 b_michaelsen r267134 : #i94949# cleanup in SwXBookmark, whitespace 2009-01-29 13:21:54 +0100 b_michaelsen r267125 : #i94949# cleanup in SwXBookmark, whitespace 2009-01-29 13:06:10 +0100 b_michaelsen r267120 : #i94949# cleanup in SwXBookmark, whitespace 2009-01-29 13:00:09 +0100 b_michaelsen r267118 : #i94949# cleanup in SwXBookmark, whitespace 2009-01-29 10:35:10 +0100 b_michaelsen r267101 : #i94949# renamed SetCrsrToBkmk to SetCrsrToMark, moving to start/end of doc if no more bookmarks can be found 2009-01-28 17:05:36 +0100 b_michaelsen r267070 : #i94949# fixed order in aProvNamesId in unocoll.cxx 2009-01-28 15:46:13 +0100 b_michaelsen r267063 : #i94949# documentation 2009-01-28 15:36:59 +0100 b_michaelsen r267062 : #i94949# removing superficial #include 2009-01-28 15:30:36 +0100 b_michaelsen r267061 : #i94949# basic code conventions 2009-01-28 11:14:30 +0100 b_michaelsen r267039 : #i94949# comparing to the actual name of the new mark 2009-01-26 15:22:25 +0100 b_michaelsen r266927 : #i94949# performance fixes 2009-01-14 21:16:56 +0100 b_michaelsen r266332 : #i94949# fixing linux x86-64 compiler warnings 2009-01-14 19:52:06 +0100 b_michaelsen r266331 : #i94949# fixing some compiler warnings 2008-12-15 13:04:49 +0100 b_michaelsen r265474 : #i94949# fixed microsoft compiler warnings 2008-12-12 18:26:02 +0100 b_michaelsen r265434 : #i94949# fixed pro platform buildbreakers 2008-12-11 17:51:24 +0100 b_michaelsen r265342 : CWS-TOOLING: rebase CWS swrefactormarks2 to trunk@264807 (milestone: DEV300:m37) 2008-12-09 18:30:59 +0100 b_michaelsen r265134 : #i94949# fixed IDocumentMarkAccess::GetType for new mark inheritance tree 2008-12-09 16:56:26 +0100 b_michaelsen r265118 : #i94949# fixed deleteMark optimization 2008-12-09 14:55:58 +0100 b_michaelsen r265092 : #i94949# DdeLink and DdeBookmark 2008-12-05 18:28:05 +0100 b_michaelsen r264914 : #i94949# fixed InitDoc in bookmarks 2008-12-02 02:23:51 +0100 b_michaelsen r264649 : #i94949# removed obsolete naming proposal code in SwXTextRange, fixed navigator reminders to forget the oldest reminder when the pool is empty 2008-12-02 02:05:19 +0100 b_michaelsen r264648 : #i94949# using bisect search for delete 2008-12-02 01:58:16 +0100 b_michaelsen r264647 : #i94949# using bisect search for delete 2008-12-02 01:37:33 +0100 b_michaelsen r264646 : #i94949# using bisect search for delete 2008-12-02 01:03:29 +0100 b_michaelsen r264645 : #i94949# fixed deleteMark crash 2008-12-01 20:55:00 +0100 b_michaelsen r264638 : #i94949# removed crossrefs from ui enumerations 2008-12-01 15:48:12 +0100 b_michaelsen r264613 : #i94949# removed superfluous local functions 2008-12-01 15:01:19 +0100 b_michaelsen r264608 : #i94949# optimized insertion of new marks 2008-12-01 14:33:21 +0100 b_michaelsen r264603 : #i94949# simplified code finding Fieldmark for a position 2008-12-01 14:05:55 +0100 b_michaelsen r264598 : #i94949# fixed reverse travelling through marks, removed obsolete getUniqueMarkName() 2008-11-27 18:48:15 +0100 b_michaelsen r264515 : #i94949# fixed _SaveCntntIdx and friends 2008-11-27 15:59:49 +0100 b_michaelsen r264500 : #i94949# fix Mark position only in ctor 2008-11-27 15:52:28 +0100 b_michaelsen r264497 : #i94949# fixed Bug in SwXBookmark, was using pDoc too early 2008-11-26 14:54:22 +0100 b_michaelsen r264396 : #i94949# fixed documentation, simplified navigator reminder code 2008-11-24 20:45:51 +0100 b_michaelsen r264266 : #i94949# removed last obsolete getUniqueMarkName calls 2008-11-24 20:21:35 +0100 b_michaelsen r264265 : #i94949# fixed typo in IDocumentMarkAccess, removed obsolete getUniqueMarkName calls 2008-11-24 18:34:32 +0100 b_michaelsen r264264 : #i94949# repositioning of Marks, removed possibility to delete marks by name in the core, refactoring of navigator reminder generation 2008-11-21 14:08:49 +0100 b_michaelsen r264137 : #i94949# simplified makeMark 2008-11-21 12:07:09 +0100 b_michaelsen r264120 : #i94949# moved ShortName and KeyCode from IMark to IBookmark 2008-11-19 12:50:49 +0100 b_michaelsen r263981 : #i94949# starting refactoring of bookmark naming 2008-11-19 11:31:08 +0100 b_michaelsen r263972 : #i94949# getting rid of obsolete dynamic casts 2008-11-18 19:06:09 +0100 b_michaelsen r263795 : #i94949# getting rid of index based mark access, IDocumentMarkAccess already provides iterators 2008-11-18 17:50:18 +0100 b_michaelsen r263792 : #i94949# getting rid of index based mark access, IDocumentMarkAccess already provides iterators 2008-11-18 16:48:20 +0100 b_michaelsen r263783 : #i94949# removed methods from crsrsh which are already available directly via IDocumentMarkAccess 2008-11-18 11:31:35 +0100 b_michaelsen r263753 : #i94949# cleaning up mark code in crsrsh 2008-11-17 10:15:25 +0100 b_michaelsen r263705 : #i94949# removed possible integer overflow 2008-11-14 18:48:45 +0100 b_michaelsen r263695 : #i94949# management of mark names in MarkManager 2008-11-14 18:23:40 +0100 b_michaelsen r263693 : #i94949# using polymorphism to do mark-specific setup in SwDoc 2008-11-14 16:27:09 +0100 b_michaelsen r263684 : #i94949# got rid of makeCrossRefBookmark 2008-11-14 13:03:32 +0100 b_michaelsen r263674 : #i94949# refactored Correction methods 2008-11-13 12:27:55 +0100 b_michaelsen r263631 : #i94949# got rid of old-style tools assertions in new code 2008-11-12 16:58:16 +0100 b_michaelsen r263608 : #i94949# added assertion for unique names 2008-11-12 16:55:18 +0100 b_michaelsen r263607 : #i94949# maked XFormField deprecated 2008-11-12 13:04:29 +0100 b_michaelsen r263587 : #i94949# replaced IDocumentMarkAccess::GetType with simple dynamic_cast where possible 2008-11-11 18:45:53 +0100 b_michaelsen r263572 : #i94949# cleaned up SwHstryBookmark 2008-11-11 13:48:18 +0100 b_michaelsen r263557 : #i94949# removed dynamic_casts to SwModify by inheriting IMark from it 2008-11-11 11:26:28 +0100 b_michaelsen r263548 : #i94949# fixed SwXBookmark 2008-11-10 17:01:19 +0100 b_michaelsen r263529 : #i94949# fixed DdeBookmarks in clipboard 2008-11-10 16:44:52 +0100 b_michaelsen r263527 : #i94949# formatting 2008-11-10 16:29:16 +0100 b_michaelsen r263526 : #i94949# fixing unoobj.cxx 2008-11-10 16:23:50 +0100 b_michaelsen r263525 : #i94949# cleaning up crossrefbookmark.cxx/.hxx 2008-11-10 16:02:08 +0100 b_michaelsen r263524 : #i94949# Pdf Export should only generate 'real' bookmarks 2008-11-10 15:33:58 +0100 b_michaelsen r263521 : #i94949# removed const_casts 2008-11-10 15:12:06 +0100 b_michaelsen r263520 : #i94949# moved _DelBookmarks into MarksManager 2008-11-07 18:48:38 +0100 b_michaelsen r263480 : #i94949# using iterator interface 2008-11-07 18:41:46 +0100 b_michaelsen r263478 : #i94949# using iterator interface 2008-11-07 18:07:41 +0100 b_michaelsen r263477 : #i94949# using iterator interface 2008-11-07 17:54:41 +0100 b_michaelsen r263476 : #i94949# using iterator interface 2008-11-07 17:44:41 +0100 b_michaelsen r263475 : #i94949# moved correction methods into MarkManager 2008-11-06 18:47:28 +0100 b_michaelsen r263404 : #i94949# getting rid of superfluous const_casts 2008-11-06 17:58:01 +0100 b_michaelsen r263403 : #i94949# no more setting of mark positions outside of the core 2008-11-06 17:08:37 +0100 b_michaelsen r263401 : #i94949# removed setters from IMark 2008-11-06 13:55:25 +0100 b_michaelsen r263383 : #i94949 SwDoc does not implement IDocumentMarkAccess anymore 2008-11-04 18:17:03 +0100 b_michaelsen r263333 : #i94949# began removing IDocumentMarkAccess from SwDoc 2008-11-04 16:48:34 +0100 b_michaelsen r263330 : removing dead code (SwBitArray) found by mst 2008-11-04 16:29:32 +0100 b_michaelsen r263329 : removing dead code (SwBitArray) found by mst 2008-11-04 14:57:48 +0100 b_michaelsen r263326 : removing dead code (SwBitArray) found by mst 2008-11-04 14:50:18 +0100 b_michaelsen r263325 : #i94949# stricter typing in IDocumentMarkAccess 2008-10-24 15:16:27 +0200 b_michaelsen r262647 : #i94949# renamed ::sw::bookmark::SimpleMark to NavigatorReminder to fit the IDocumentMarkAccess enum 2008-10-24 15:10:10 +0200 b_michaelsen r262646 : #i94949# only 'real' bookmark implement IBookmark, Marks also get removed from m_vFieldmarks on delete/clear 2008-10-24 13:06:23 +0200 b_michaelsen r262636 : #i94949# Fieldmark tabnavigation 2008-10-23 12:16:36 +0200 b_michaelsen r262619 : #i94949# Fieldmark classes and filters 2008-10-22 13:17:18 +0200 b_michaelsen r262597 : #i94949# writer import fixes 2008-10-21 11:30:38 +0200 b_michaelsen r262565 : #i94949# renamed methods containing Bookmark in the generic IMark interface 2008-10-20 14:09:02 +0200 b_michaelsen r262318 : #i94949# fixed SwDoc::CorrRel 2008-10-16 22:45:13 +0200 b_michaelsen r262273 : #i94949 simplified Before/After methods 2008-10-16 21:40:57 +0200 b_michaelsen r262271 : #i94949 renamed SimpleMark to NavigatorReminder 2008-10-16 21:15:23 +0200 b_michaelsen r262270 : #i94949 using shared_ptr only in MarkManager 2008-10-16 17:46:37 +0200 b_michaelsen r262269 : #i94949# getFieldmarkBefore and getFieldmarkAfter 2008-10-16 17:12:13 +0200 b_michaelsen r262265 : #i94949# cleanup in crbm.cxx 2008-10-16 12:49:01 +0200 b_michaelsen r262257 : #i94949# fixed usage of invalid iterator, fixed invalid cast 2008-10-15 15:34:20 +0200 b_michaelsen r262239 : #i94949# added moved files 2008-10-15 15:26:45 +0200 b_michaelsen r262237 : #i94949# initial reimplementation of Bookmarks
2009-04-21 15:40:02 +00:00
#include <IDocumentMarkAccess.hxx>
namespace swui
{
SwAbstractDialogFactory * GetFactory();
}
using namespace ::com::sun::star;
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::container;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::sdb;
using namespace ::com::sun::star::sdbc;
using namespace ::com::sun::star::sdbcx;
using namespace ::com::sun::star::uno;
2000-09-18 16:15:01 +00:00
const char cDBFldStart = '<';
const char cDBFldEnd = '>';
// Helper structure for adding database rows as fields or text
2000-09-18 16:15:01 +00:00
struct _DB_Column
{
enum ColType { DB_FILLTEXT, DB_COL_FIELD, DB_COL_TEXT, DB_SPLITPARA } eColType;
2000-09-18 16:15:01 +00:00
union {
String* pText;
SwField* pField;
sal_uLong nFormat;
2000-09-18 16:15:01 +00:00
} DB_ColumnData;
const SwInsDBColumn* pColInfo;
_DB_Column()
{
pColInfo = 0;
DB_ColumnData.pText = 0;
eColType = DB_SPLITPARA;
}
_DB_Column( const String& rTxt )
{
pColInfo = 0;
DB_ColumnData.pText = new String( rTxt );
eColType = DB_FILLTEXT;
}
_DB_Column( const SwInsDBColumn& rInfo, sal_uLong nFormat )
2000-09-18 16:15:01 +00:00
{
pColInfo = &rInfo;
DB_ColumnData.nFormat = nFormat;
eColType = DB_COL_TEXT;
}
_DB_Column( const SwInsDBColumn& rInfo, SwDBField& rFld )
{
pColInfo = &rInfo;
DB_ColumnData.pField = &rFld;
eColType = DB_COL_FIELD;
}
~_DB_Column()
{
if( DB_COL_FIELD == eColType )
delete DB_ColumnData.pField;
else if( DB_FILLTEXT == eColType )
delete DB_ColumnData.pText;
}
};
struct _DB_ColumnConfigData
{
SwInsDBColumns aDBColumns;
2001-09-04 11:16:28 +00:00
rtl::OUString sSource, sTable, sEdit, sTblList, sTmplNm, sTAutoFmtNm;
sal_Bool bIsTable : 1,
2000-09-18 16:15:01 +00:00
bIsField : 1,
bIsHeadlineOn : 1,
bIsEmptyHeadln : 1;
_DB_ColumnConfigData()
{
bIsTable = bIsHeadlineOn = sal_True;
bIsField = bIsEmptyHeadln = sal_False;
2000-09-18 16:15:01 +00:00
}
~_DB_ColumnConfigData();
private:
_DB_ColumnConfigData( const _DB_ColumnConfigData& );
_DB_ColumnConfigData& operator =( const _DB_ColumnConfigData& );
};
int SwInsDBColumn::operator<( const SwInsDBColumn& rCmp ) const
{
return 0 > GetAppCollator().compareString( sColumn, rCmp.sColumn );
2000-09-18 16:15:01 +00:00
}
SwInsertDBColAutoPilot::SwInsertDBColAutoPilot( SwView& rView,
Reference<XDataSource> xDataSource,
Reference<sdbcx::XColumnsSupplier> xColSupp,
const SwDBData& rData )
2000-09-18 16:15:01 +00:00
: SfxModalDialog( rView.GetWindow(), SW_RES( DLG_AP_INSERT_DB_SEL )),
2012-12-21 12:00:43 +01:00
ConfigItem("Office.Writer/InsertData/DataSet", CONFIG_MODE_DELAYED_UPDATE),
2000-09-18 16:15:01 +00:00
aFtInsertData( this, SW_RES( FT_INSERT_DATA )),
aRbAsTable( this, SW_RES( RB_AS_TABLE )),
aRbAsField( this, SW_RES( RB_AS_FIELD )),
aRbAsText( this, SW_RES( RB_AS_TEXT )),
2001-05-25 13:43:23 +00:00
aFlHead( this, SW_RES( FL_HEAD )),
2000-09-18 16:15:01 +00:00
aFtDbColumn( this, SW_RES( FT_DB_COLUMN )),
aLbTblDbColumn( this, SW_RES( LB_TBL_DB_COLUMN )),
aLbTxtDbColumn( this, SW_RES( LB_TXT_DB_COLUMN )),
2001-05-25 13:43:23 +00:00
aFlFormat( this, SW_RES( FL_FORMAT )),
2000-09-18 16:15:01 +00:00
aRbDbFmtFromDb( this, SW_RES( RB_DBFMT_FROM_DB )),
aRbDbFmtFromUsr( this, SW_RES( RB_DBFMT_FROM_USR )),
aLbDbFmtFromUsr( this, &rView, SW_RES( LB_DBFMT_FROM_USR )),
2001-05-25 13:43:23 +00:00
aIbDbcolToEdit( this, SW_RES( IB_DBCOL_TOEDIT )),
2000-09-18 16:15:01 +00:00
aEdDbText( this, SW_RES( ED_DB_TEXT )),
aFtDbParaColl( this, SW_RES( FT_DB_PARA_COLL )),
aLbDbParaColl( this, SW_RES( LB_DB_PARA_COLL )),
2001-05-25 13:43:23 +00:00
aIbDbcolAllTo( this, SW_RES( IB_DBCOL_ALL_TO )),
aIbDbcolOneTo( this, SW_RES( IB_DBCOL_ONE_TO )),
aIbDbcolOneFrom( this, SW_RES( IB_DBCOL_ONE_FROM )),
aIbDbcolAllFrom( this, SW_RES( IB_DBCOL_ALL_FROM )),
2000-09-18 16:15:01 +00:00
aFtTableCol( this, SW_RES( FT_TABLE_COL )),
aLbTableCol( this, SW_RES( LB_TABLE_COL )),
aCbTableHeadon( this, SW_RES( CB_TABLE_HEADON )),
aRbHeadlColnms( this, SW_RES( RB_HEADL_COLNMS )),
aRbHeadlEmpty( this, SW_RES( RB_HEADL_EMPTY )),
aPbTblFormat( this, SW_RES( PB_TBL_FORMAT )),
aPbTblAutofmt( this, SW_RES( PB_TBL_AUTOFMT )),
aBtOk( this, SW_RES( BT_OK )),
aBtCancel( this, SW_RES( BT_CANCEL )),
aBtHelp( this, SW_RES( BT_HELP )),
2001-05-25 13:43:23 +00:00
aFlBottom( this, SW_RES( FL_BOTTOM )),
2000-09-18 16:15:01 +00:00
aDBData(rData),
aOldNumFmtLnk( aLbDbFmtFromUsr.GetSelectHdl() ),
sNoTmpl( SW_RES( STR_NOTEMPL )),
2000-09-18 16:15:01 +00:00
pView( &rView ),
pTAutoFmt( 0 ),
pTblSet( 0 ),
pRep( 0 )
2000-09-18 16:15:01 +00:00
{
FreeResource();
nGBFmtLen = aFlFormat.GetText().getLength();
2000-09-18 16:15:01 +00:00
if(xColSupp.is())
{
SwWrtShell& rSh = pView->GetWrtShell();
SvNumberFormatter* pNumFmtr = rSh.GetNumberFormatter();
SvNumberFormatsSupplierObj* pNumFmt = new SvNumberFormatsSupplierObj( pNumFmtr );
Reference< util::XNumberFormatsSupplier > xDocNumFmtsSupplier = pNumFmt;
Reference< util::XNumberFormats > xDocNumberFormats = xDocNumFmtsSupplier->getNumberFormats();
Reference< util::XNumberFormatTypes > xDocNumberFormatTypes(xDocNumberFormats, UNO_QUERY);
2000-09-18 16:15:01 +00:00
Reference<XPropertySet> xSourceProps(xDataSource, UNO_QUERY);
Reference< util::XNumberFormats > xNumberFormats;
2000-09-18 16:15:01 +00:00
if(xSourceProps.is())
{
2012-12-21 12:00:43 +01:00
Any aFormats = xSourceProps->getPropertyValue("NumberFormatsSupplier");
2000-09-18 16:15:01 +00:00
if(aFormats.hasValue())
{
Reference< util::XNumberFormatsSupplier> xSuppl;
aFormats >>= xSuppl;
2000-09-18 16:15:01 +00:00
if(xSuppl.is())
{
xNumberFormats = xSuppl->getNumberFormats( );
}
}
}
Reference <XNameAccess> xCols = xColSupp->getColumns();
2001-09-04 11:16:28 +00:00
Sequence<rtl::OUString> aColNames = xCols->getElementNames();
const rtl::OUString* pColNames = aColNames.getConstArray();
2000-09-18 16:15:01 +00:00
long nCount = aColNames.getLength();
for (long n = 0; n < nCount; n++)
{
SwInsDBColumn* pNew = new SwInsDBColumn( pColNames[n], (sal_uInt16)n );
2000-09-18 16:15:01 +00:00
Any aCol = xCols->getByName(pColNames[n]);
Reference <XPropertySet> xCol;
aCol >>= xCol;
Any aType = xCol->getPropertyValue(rtl::OUString("Type"));
sal_Int32 eDataType = 0;
2000-09-18 16:15:01 +00:00
aType >>= eDataType;
switch(eDataType)
{
case DataType::BIT:
case DataType::BOOLEAN:
2000-09-18 16:15:01 +00:00
case DataType::TINYINT:
case DataType::SMALLINT:
case DataType::INTEGER:
case DataType::BIGINT:
case DataType::FLOAT:
case DataType::REAL:
case DataType::DOUBLE:
case DataType::NUMERIC:
case DataType::DECIMAL:
case DataType::DATE:
case DataType::TIME:
case DataType::TIMESTAMP:
{
pNew->bHasFmt = sal_True;
2012-12-21 12:00:43 +01:00
Any aFormat = xCol->getPropertyValue("FormatKey");
2000-09-18 16:15:01 +00:00
if(aFormat.hasValue())
{
sal_Int32 nFmt = 0;
2000-09-18 16:15:01 +00:00
aFormat >>= nFmt;
if(xNumberFormats.is())
{
try
{
Reference<XPropertySet> xNumProps = xNumberFormats->getByKey( nFmt );
2012-12-21 12:00:43 +01:00
Any aFormatVal = xNumProps->getPropertyValue("FormatString");
Any aLocale = xNumProps->getPropertyValue("Locale");
2001-09-04 11:16:28 +00:00
rtl::OUString sFormat;
aFormatVal >>= sFormat;
lang::Locale aLoc;
2000-09-18 16:15:01 +00:00
aLocale >>= aLoc;
long nKey = xDocNumberFormats->queryKey( sFormat, aLoc, sal_True);
if(nKey < 0)
{
nKey = xDocNumberFormats->addNew( sFormat, aLoc );
}
pNew->nDBNumFmt = nKey;
2000-09-18 16:15:01 +00:00
}
2011-07-26 23:49:42 +01:00
catch (const Exception&)
2000-09-18 16:15:01 +00:00
{
OSL_FAIL("illegal number format key");
2000-09-18 16:15:01 +00:00
}
}
}
else
{
pNew->nDBNumFmt = SwNewDBMgr::GetDbtoolsClient().getDefaultNumberFormat(xCol,
xDocNumberFormatTypes, LanguageTag( rSh.GetCurLang() ).getLocale());
}
2000-09-18 16:15:01 +00:00
}
break;
}
if( !aDBColumns.insert( pNew ).second )
2000-09-18 16:15:01 +00:00
{
2010-10-20 15:36:15 +01:00
OSL_ENSURE( !this, "Spaltenname mehrfach vergeben?" );
2000-09-18 16:15:01 +00:00
delete pNew;
}
}
}
// fill paragraph templates-ListBox
2000-09-18 16:15:01 +00:00
{
SfxStyleSheetBasePool* pPool = pView->GetDocShell()->GetStyleSheetPool();
pPool->SetSearchMask( SFX_STYLE_FAMILY_PARA, SFXSTYLEBIT_ALL );
aLbDbParaColl.InsertEntry( sNoTmpl );
const SfxStyleSheetBase* pBase = pPool->First();
while( pBase )
{
aLbDbParaColl.InsertEntry( pBase->GetName() );
pBase = pPool->Next();
}
aLbDbParaColl.SelectEntryPos( 0 );
}
// when the cursor is inside of a table, table must NEVER be selectable
2000-09-18 16:15:01 +00:00
if( pView->GetWrtShell().GetTableFmt() )
{
aRbAsTable.Enable( sal_False );
aRbAsField.Check( sal_True );
aRbDbFmtFromDb.Check( sal_True );
2000-09-18 16:15:01 +00:00
}
else
{
aRbAsTable.Check( sal_True );
aRbDbFmtFromDb.Check( sal_True );
aIbDbcolOneFrom.Enable( sal_False );
aIbDbcolAllFrom.Enable( sal_False );
2000-09-18 16:15:01 +00:00
}
aRbAsTable.SetClickHdl( LINK(this, SwInsertDBColAutoPilot, PageHdl ));
aRbAsField.SetClickHdl( LINK(this, SwInsertDBColAutoPilot, PageHdl ));
aRbAsText.SetClickHdl( LINK(this, SwInsertDBColAutoPilot, PageHdl ));
aRbDbFmtFromDb.SetClickHdl( LINK(this, SwInsertDBColAutoPilot, DBFormatHdl ));
aRbDbFmtFromUsr.SetClickHdl( LINK(this, SwInsertDBColAutoPilot, DBFormatHdl ));
aPbTblFormat.SetClickHdl(LINK(this, SwInsertDBColAutoPilot, TblFmtHdl ));
aPbTblAutofmt.SetClickHdl(LINK(this, SwInsertDBColAutoPilot, AutoFmtHdl ));
2001-05-25 13:43:23 +00:00
aIbDbcolAllTo.SetClickHdl( LINK(this, SwInsertDBColAutoPilot, TblToFromHdl ));
aIbDbcolOneTo.SetClickHdl( LINK(this, SwInsertDBColAutoPilot, TblToFromHdl ));
aIbDbcolOneFrom.SetClickHdl( LINK(this, SwInsertDBColAutoPilot, TblToFromHdl ));
aIbDbcolAllFrom.SetClickHdl( LINK(this, SwInsertDBColAutoPilot, TblToFromHdl ));
aIbDbcolToEdit.SetClickHdl( LINK(this, SwInsertDBColAutoPilot, TblToFromHdl ));
2000-09-18 16:15:01 +00:00
aCbTableHeadon.SetClickHdl( LINK(this, SwInsertDBColAutoPilot, HeaderHdl ));
aRbHeadlColnms.SetClickHdl( LINK(this, SwInsertDBColAutoPilot, HeaderHdl ));
aRbHeadlEmpty.SetClickHdl( LINK(this, SwInsertDBColAutoPilot, HeaderHdl ));
aLbTxtDbColumn.SetSelectHdl( LINK( this, SwInsertDBColAutoPilot, SelectHdl ));
aLbTblDbColumn.SetSelectHdl( LINK( this, SwInsertDBColAutoPilot, SelectHdl ));
aLbDbFmtFromUsr.SetSelectHdl( LINK( this, SwInsertDBColAutoPilot, SelectHdl ));
aLbTableCol.SetSelectHdl( LINK( this, SwInsertDBColAutoPilot, SelectHdl ));
aLbTxtDbColumn.SetDoubleClickHdl( LINK( this, SwInsertDBColAutoPilot, DblClickHdl ));
aLbTblDbColumn.SetDoubleClickHdl( LINK( this, SwInsertDBColAutoPilot, DblClickHdl ));
aLbTableCol.SetDoubleClickHdl( LINK( this, SwInsertDBColAutoPilot, DblClickHdl ));
for( sal_uInt16 n = 0; n < aDBColumns.size(); ++n )
2000-09-18 16:15:01 +00:00
{
const String& rS = aDBColumns[ n ]->sColumn;
aLbTblDbColumn.InsertEntry( rS, n );
aLbTxtDbColumn.InsertEntry( rS, n );
}
aLbTxtDbColumn.SelectEntryPos( 0 );
aLbTblDbColumn.SelectEntryPos( 0 );
2000-12-08 09:19:55 +00:00
// read configuration
Load();
2000-09-18 16:15:01 +00:00
// initialise Controls:
2000-09-18 16:15:01 +00:00
PageHdl( aRbAsTable.IsChecked() ? &aRbAsTable : &aRbAsField );
}
SwInsertDBColAutoPilot::~SwInsertDBColAutoPilot()
{
delete pTblSet;
delete pRep;
delete pTAutoFmt;
}
IMPL_LINK( SwInsertDBColAutoPilot, PageHdl, Button*, pButton )
{
sal_Bool bShowTbl = pButton == &aRbAsTable;
2000-09-18 16:15:01 +00:00
String sTxt( pButton->GetText() );
aFlHead.SetText( MnemonicGenerator::EraseAllMnemonicChars( sTxt ) );
2000-09-18 16:15:01 +00:00
aLbTxtDbColumn.Show( !bShowTbl );
2001-05-25 13:43:23 +00:00
aIbDbcolToEdit.Show( !bShowTbl );
2000-09-18 16:15:01 +00:00
aEdDbText.Show( !bShowTbl );
aFtDbParaColl.Show( !bShowTbl );
aLbDbParaColl.Show( !bShowTbl );
aLbTblDbColumn.Show( bShowTbl );
2001-05-25 13:43:23 +00:00
aIbDbcolAllTo.Show( bShowTbl );
aIbDbcolOneTo.Show( bShowTbl );
aIbDbcolOneFrom.Show( bShowTbl );
aIbDbcolAllFrom.Show( bShowTbl );
2000-09-18 16:15:01 +00:00
aFtTableCol.Show( bShowTbl );
aLbTableCol.Show( bShowTbl );
aCbTableHeadon.Show( bShowTbl );
aRbHeadlColnms.Show( bShowTbl );
aRbHeadlEmpty.Show( bShowTbl );
aPbTblFormat.Show( bShowTbl );
aPbTblAutofmt.Show( bShowTbl );
if( bShowTbl )
aPbTblFormat.Enable( 0 != aLbTableCol.GetEntryCount() );
SelectHdl( bShowTbl ? &aLbTblDbColumn : &aLbTxtDbColumn );
return 0;
}
IMPL_LINK( SwInsertDBColAutoPilot, DBFormatHdl, Button*, pButton )
{
ListBox& rBox = aRbAsTable.IsChecked()
? ( 0 == aLbTableCol.GetEntryData( 0 )
? aLbTblDbColumn
: aLbTableCol )
: aLbTxtDbColumn;
SwInsDBColumn aSrch( rBox.GetSelectEntry(), 0 );
SwInsDBColumns::const_iterator it = aDBColumns.find( &aSrch );
2000-09-18 16:15:01 +00:00
sal_Bool bFromDB = &aRbDbFmtFromDb == pButton;
(*it)->bIsDBFmt = bFromDB;
2000-09-18 16:15:01 +00:00
aLbDbFmtFromUsr.Enable( !bFromDB );
return 0;
}
IMPL_LINK( SwInsertDBColAutoPilot, TblToFromHdl, Button*, pButton )
{
sal_Bool bChgEnable = sal_True, bEnableTo = sal_True, bEnableFrom = sal_True;
aLbTblDbColumn.SetUpdateMode( sal_False );
aLbTableCol.SetUpdateMode( sal_False );
2000-09-18 16:15:01 +00:00
2001-05-25 13:43:23 +00:00
if( pButton == &aIbDbcolAllTo )
2000-09-18 16:15:01 +00:00
{
bEnableTo = sal_False;
2000-09-18 16:15:01 +00:00
sal_uInt16 n, nInsPos = aLbTableCol.GetSelectEntryPos(),
2000-09-18 16:15:01 +00:00
nCnt = aLbTblDbColumn.GetEntryCount();
if( LISTBOX_APPEND == nInsPos )
for( n = 0; n < nCnt; ++n )
aLbTableCol.InsertEntry( aLbTblDbColumn.GetEntry( n ),
LISTBOX_APPEND );
else
for( n = 0; n < nCnt; ++n, ++nInsPos )
aLbTableCol.InsertEntry( aLbTblDbColumn.GetEntry( n ), nInsPos );
aLbTblDbColumn.Clear();
aLbTableCol.SelectEntryPos( nInsPos );
aLbTblDbColumn.SelectEntryPos( LISTBOX_APPEND );
}
2001-05-25 13:43:23 +00:00
else if( pButton == &aIbDbcolOneTo &&
2000-09-18 16:15:01 +00:00
LISTBOX_ENTRY_NOTFOUND != aLbTblDbColumn.GetSelectEntryPos() )
{
sal_uInt16 nInsPos = aLbTableCol.GetSelectEntryPos(),
2000-09-18 16:15:01 +00:00
nDelPos = aLbTblDbColumn.GetSelectEntryPos(),
nTopPos = aLbTblDbColumn.GetTopEntry();
aLbTableCol.InsertEntry( aLbTblDbColumn.GetEntry( nDelPos ), nInsPos );
aLbTblDbColumn.RemoveEntry( nDelPos );
aLbTableCol.SelectEntryPos( nInsPos );
if( nDelPos >= aLbTblDbColumn.GetEntryCount() )
nDelPos = aLbTblDbColumn.GetEntryCount() - 1;
aLbTblDbColumn.SelectEntryPos( nDelPos );
aLbTblDbColumn.SetTopEntry( nTopPos );
bEnableTo = 0 != aLbTblDbColumn.GetEntryCount();
}
2001-05-25 13:43:23 +00:00
else if( pButton == &aIbDbcolOneFrom )
2000-09-18 16:15:01 +00:00
{
if( LISTBOX_ENTRY_NOTFOUND != aLbTableCol.GetSelectEntryPos() )
{
sal_uInt16 nInsPos,
2000-09-18 16:15:01 +00:00
nDelPos = aLbTableCol.GetSelectEntryPos(),
nTopPos = aLbTableCol.GetTopEntry();
// look for the right InsertPos!!
2000-09-18 16:15:01 +00:00
SwInsDBColumn aSrch( aLbTableCol.GetEntry( nDelPos ), 0 );
SwInsDBColumns::const_iterator it = aDBColumns.find( &aSrch );
if( it == aDBColumns.begin() || (it+1) == aDBColumns.end() )
nInsPos = it - aDBColumns.begin();
2000-09-18 16:15:01 +00:00
else
{
nInsPos = LISTBOX_ENTRY_NOTFOUND;
while( ++it != aDBColumns.end() &&
2000-09-18 16:15:01 +00:00
LISTBOX_ENTRY_NOTFOUND == (nInsPos = aLbTblDbColumn.
GetEntryPos( String( (*it)->sColumn ))) )
2000-09-18 16:15:01 +00:00
;
}
aLbTblDbColumn.InsertEntry( aSrch.sColumn, nInsPos );
aLbTableCol.RemoveEntry( nDelPos );
if( nInsPos >= aLbTblDbColumn.GetEntryCount() )
nInsPos = aLbTblDbColumn.GetEntryCount() - 1;
aLbTblDbColumn.SelectEntryPos( nInsPos );
if( nDelPos >= aLbTableCol.GetEntryCount() )
nDelPos = aLbTableCol.GetEntryCount() - 1;
aLbTableCol.SelectEntryPos( nDelPos );
aLbTableCol.SetTopEntry( nTopPos );
}
else
bEnableTo = 0 != aLbTblDbColumn.GetEntryCount();
bEnableFrom = 0 != aLbTableCol.GetEntryCount();
}
2001-05-25 13:43:23 +00:00
else if( pButton == &aIbDbcolAllFrom )
2000-09-18 16:15:01 +00:00
{
bEnableFrom = sal_False;
2000-09-18 16:15:01 +00:00
aLbTblDbColumn.Clear();
aLbTableCol.Clear();
for( sal_uInt16 n = 0; n < aDBColumns.size(); ++n )
2000-09-18 16:15:01 +00:00
aLbTblDbColumn.InsertEntry( aDBColumns[ n ]->sColumn, n );
aLbTblDbColumn.SelectEntryPos( 0 );
}
2001-05-25 13:43:23 +00:00
else if( pButton == &aIbDbcolToEdit )
2000-09-18 16:15:01 +00:00
{
bChgEnable = sal_False;
// move data to Edit:
2000-09-18 16:15:01 +00:00
String aFld( aLbTxtDbColumn.GetSelectEntry() );
if( aFld.Len() )
{
String aStr( aEdDbText.GetText() );
sal_uInt16 nPos = (sal_uInt16)aEdDbText.GetSelection().Min();
sal_uInt16 nSel = sal_uInt16(aEdDbText.GetSelection().Max()) - nPos;
2000-09-18 16:15:01 +00:00
if( nSel )
// first delete the existing selection
2000-09-18 16:15:01 +00:00
aStr.Erase( nPos, nSel );
aFld.Insert( cDBFldStart, 0 );
aFld += cDBFldEnd;
if( aStr.Len() )
{
if( nPos ) // one blank in front
2000-09-18 16:15:01 +00:00
{
2000-12-08 09:19:55 +00:00
sal_Unicode c = aStr.GetChar( nPos-1 );
2000-09-18 16:15:01 +00:00
if( '\n' != c && '\r' != c )
aFld.Insert( ' ', 0 );
}
if( nPos < aStr.Len() ) // one blank behind
2000-09-18 16:15:01 +00:00
{
2000-12-08 09:19:55 +00:00
sal_Unicode c = aStr.GetChar( nPos );
2000-09-18 16:15:01 +00:00
if( '\n' != c && '\r' != c )
aFld += ' ';
}
}
aStr.Insert( aFld, nPos );
aEdDbText.SetText( aStr );
nPos = nPos + aFld.Len();
2000-09-18 16:15:01 +00:00
aEdDbText.SetSelection( Selection( nPos ));
}
}
if( bChgEnable )
{
2001-05-25 13:43:23 +00:00
aIbDbcolOneTo.Enable( bEnableTo );
aIbDbcolAllTo.Enable( bEnableTo );
aIbDbcolOneFrom.Enable( bEnableFrom );
aIbDbcolAllFrom.Enable( bEnableFrom );
2000-09-18 16:15:01 +00:00
aRbDbFmtFromDb.Enable( sal_False );
aRbDbFmtFromUsr.Enable( sal_False );
aLbDbFmtFromUsr.Enable( sal_False );
2000-09-18 16:15:01 +00:00
aPbTblFormat.Enable( bEnableFrom );
}
aLbTblDbColumn.SetUpdateMode( sal_True );
aLbTableCol.SetUpdateMode( sal_True );
2000-09-18 16:15:01 +00:00
return 0;
}
IMPL_LINK( SwInsertDBColAutoPilot, DblClickHdl, ListBox*, pBox )
{
Button* pButton = 0;
if( pBox == &aLbTxtDbColumn )
2001-05-25 13:43:23 +00:00
pButton = &aIbDbcolToEdit;
else if( pBox == &aLbTblDbColumn && aIbDbcolOneTo.IsEnabled() )
pButton = &aIbDbcolOneTo;
else if( pBox == &aLbTableCol && aIbDbcolOneFrom.IsEnabled() )
pButton = &aIbDbcolOneFrom;
2000-09-18 16:15:01 +00:00
if( pButton )
TblToFromHdl( pButton );
return 0;
}
IMPL_LINK( SwInsertDBColAutoPilot, TblFmtHdl, PushButton*, pButton )
{
SwWrtShell& rSh = pView->GetWrtShell();
bool bNewSet = false;
2000-09-18 16:15:01 +00:00
if( !pTblSet )
{
bNewSet = true;
pTblSet = new SfxItemSet( rSh.GetAttrPool(), SwuiGetUITableAttrRange() );
2000-09-18 16:15:01 +00:00
// At first acquire the simple attributes
2000-09-18 16:15:01 +00:00
pTblSet->Put( SfxStringItem( FN_PARAM_TABLE_NAME, rSh.GetUniqueTblName() ));
pTblSet->Put( SfxUInt16Item( FN_PARAM_TABLE_HEADLINE, 1 ) );
2000-09-18 16:15:01 +00:00
pTblSet->Put( SfxUInt16Item( SID_BACKGRND_DESTINATION,
rSh.GetViewOptions()->GetTblDest() ));
SvxBrushItem aBrush( RES_BACKGROUND );
pTblSet->Put( aBrush );
pTblSet->Put( aBrush, SID_ATTR_BRUSH_ROW );
pTblSet->Put( aBrush, SID_ATTR_BRUSH_TABLE );
SvxBoxInfoItem aBoxInfo( SID_ATTR_BORDER_INNER );
// table variant, when multiple table cells are selected
aBoxInfo.SetTable( sal_True );
// always show gap field
aBoxInfo.SetDist( sal_True);
// set minimum size in tables and paragraphs
aBoxInfo.SetMinDist( sal_False );
// always set default-gap
2000-09-18 16:15:01 +00:00
aBoxInfo.SetDefDist( MIN_BORDER_DIST );
// Single lines can have DontCare-status only in tables
aBoxInfo.SetValid( VALID_DISABLE, sal_True );
2000-09-18 16:15:01 +00:00
pTblSet->Put( aBoxInfo );
SwGetCurColNumPara aPara;
const sal_uInt16 nNum = rSh.GetCurColNum( &aPara );
2000-09-18 16:15:01 +00:00
long nWidth;
if( nNum )
{
nWidth = aPara.pPrtRect->Width();
const SwFmtCol& rCol = aPara.pFrmFmt->GetCol();
const SwColumns& rCols = rCol.GetColumns();
// initialise nStart und nEnd for nNum == 0
2000-09-18 16:15:01 +00:00
long nWidth1 = 0,
nStart1 = 0,
nEnd1 = nWidth;
for( sal_uInt16 i = 0; i < nNum; ++i )
2000-09-18 16:15:01 +00:00
{
const SwColumn* pCol = &rCols[i];
2000-09-18 16:15:01 +00:00
nStart1 = pCol->GetLeft() + nWidth1;
nWidth1 += (long)rCol.CalcColWidth( i, (sal_uInt16)nWidth );
2000-09-18 16:15:01 +00:00
nEnd1 = nWidth1 - pCol->GetRight();
}
if(nStart1 || nEnd1 != nWidth)
nWidth = nEnd1 - nStart1;
}
else
nWidth = rSh.GetAnyCurRect(
FRMTYPE_FLY_ANY & rSh.GetFrmType( 0, sal_True )
2000-09-18 16:15:01 +00:00
? RECT_FLY_PRT_EMBEDDED
: RECT_PAGE_PRT ).Width();
SwTabCols aTabCols;
aTabCols.SetRight( nWidth );
aTabCols.SetRightMax( nWidth );
pRep = new SwTableRep( aTabCols );
pRep->SetAlign( text::HoriOrientation::NONE );
2000-09-18 16:15:01 +00:00
pRep->SetSpace( nWidth );
pRep->SetWidth( nWidth );
pRep->SetWidthPercent( 100 );
pTblSet->Put( SwPtrItem( FN_TABLE_REP, pRep ));
pTblSet->Put( SfxUInt16Item( SID_HTML_MODE,
::GetHtmlMode( pView->GetDocShell() )));
}
if( aLbTableCol.GetEntryCount() != pRep->GetAllColCount() )
{
// Number of columns has changed: then the TabCols have to be adjusted
2000-09-18 16:15:01 +00:00
long nWidth = pRep->GetWidth();
sal_uInt16 nCols = aLbTableCol.GetEntryCount() - 1;
2000-09-18 16:15:01 +00:00
SwTabCols aTabCols( nCols );
aTabCols.SetRight( nWidth );
aTabCols.SetRightMax( nWidth );
if( nCols )
for( sal_uInt16 n = 0, nStep = (sal_uInt16)(nWidth / (nCols+1)), nW = nStep;
n < nCols; ++n, nW = nW + nStep )
2000-09-18 16:15:01 +00:00
{
aTabCols.Insert( nW, sal_False, n );
2000-09-18 16:15:01 +00:00
}
delete pRep;
pRep = new SwTableRep( aTabCols );
pRep->SetAlign( text::HoriOrientation::NONE );
2000-09-18 16:15:01 +00:00
pRep->SetSpace( nWidth );
pRep->SetWidth( nWidth );
pRep->SetWidthPercent( 100 );
pTblSet->Put( SwPtrItem( FN_TABLE_REP, pRep ));
}
SwAbstractDialogFactory* pFact = swui::GetFactory();
2010-10-20 15:36:15 +01:00
OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
SfxAbstractTabDialog* pDlg = pFact->CreateSwTableTabDlg(pButton, rSh.GetAttrPool(), pTblSet, &rSh);
2010-10-20 15:36:15 +01:00
OSL_ENSURE(pDlg, "Dialogdiet fail!");
2000-09-18 16:15:01 +00:00
if( RET_OK == pDlg->Execute() )
pTblSet->Put( *pDlg->GetOutputItemSet() );
else if( bNewSet )
{
delete pTblSet, pTblSet = 0;
delete pRep, pRep = 0;
}
delete pDlg;
return 0;
}
IMPL_LINK( SwInsertDBColAutoPilot, AutoFmtHdl, PushButton*, pButton )
{
SwAbstractDialogFactory* pFact = swui::GetFactory();
2010-10-20 15:36:15 +01:00
OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
AbstractSwAutoFormatDlg* pDlg = pFact->CreateSwAutoFormatDlg(pButton, pView->GetWrtShellPtr(), sal_False, pTAutoFmt);
2010-10-20 15:36:15 +01:00
OSL_ENSURE(pDlg, "Dialogdiet fail!");
if( RET_OK == pDlg->Execute())
pDlg->FillAutoFmtOfIndex( pTAutoFmt );
delete pDlg;
2000-09-18 16:15:01 +00:00
return 0;
}
IMPL_LINK( SwInsertDBColAutoPilot, SelectHdl, ListBox*, pBox )
{
ListBox* pGetBox = pBox == &aLbDbFmtFromUsr
? ( aRbAsTable.IsChecked()
? ( 0 == aLbTableCol.GetEntryData( 0 )
? &aLbTblDbColumn
: &aLbTableCol )
: &aLbTxtDbColumn )
: pBox;
SwInsDBColumn aSrch( pGetBox->GetSelectEntry(), 0 );
SwInsDBColumns::const_iterator it = aDBColumns.find( &aSrch );
2000-09-18 16:15:01 +00:00
if( pBox == &aLbDbFmtFromUsr )
{
if( !aSrch.sColumn.isEmpty() )
2000-09-18 16:15:01 +00:00
{
aOldNumFmtLnk.Call( pBox );
(*it)->nUsrNumFmt = aLbDbFmtFromUsr.GetFormat();
2000-09-18 16:15:01 +00:00
}
}
else
{
// set the selected FieldName at the FormatGroupBox, so that
// it's clear what field is configured by the format!
String sTxt( aFlFormat.GetText().copy( 0, nGBFmtLen ));
if( aSrch.sColumn.isEmpty() )
2000-09-18 16:15:01 +00:00
{
aRbDbFmtFromDb.Enable( sal_False );
aRbDbFmtFromUsr.Enable( sal_False );
aLbDbFmtFromUsr.Enable( sal_False );
2000-09-18 16:15:01 +00:00
}
else
{
sal_Bool bEnableFmt = (*it)->bHasFmt;
2000-09-18 16:15:01 +00:00
aRbDbFmtFromDb.Enable( bEnableFmt );
aRbDbFmtFromUsr.Enable( bEnableFmt );
if( bEnableFmt )
2000-12-08 09:19:55 +00:00
{
(( sTxt += rtl::OUString(" (" )) += String(aSrch.sColumn) ) += (sal_Unicode)')';
2000-12-08 09:19:55 +00:00
}
2000-09-18 16:15:01 +00:00
sal_Bool bIsDBFmt = (*it)->bIsDBFmt;
2000-09-18 16:15:01 +00:00
aRbDbFmtFromDb.Check( bIsDBFmt );
aRbDbFmtFromUsr.Check( !bIsDBFmt );
aLbDbFmtFromUsr.Enable( !bIsDBFmt );
if( !bIsDBFmt )
aLbDbFmtFromUsr.SetDefFormat( (*it)->nUsrNumFmt );
2000-09-18 16:15:01 +00:00
}
2001-05-25 13:43:23 +00:00
aFlFormat.SetText( sTxt );
2000-09-18 16:15:01 +00:00
// to know later on, what ListBox was the "active", a Flag
// is remembered in the 1st entry
2000-09-18 16:15:01 +00:00
void* pPtr = pBox == &aLbTableCol ? &aLbTableCol : 0;
aLbTableCol.SetEntryData( 0, pPtr );
}
return 0;
}
IMPL_LINK( SwInsertDBColAutoPilot, HeaderHdl, Button*, pButton )
{
if( pButton == &aCbTableHeadon )
{
sal_Bool bEnable = aCbTableHeadon.IsChecked();
2000-09-18 16:15:01 +00:00
aRbHeadlColnms.Enable( bEnable );
aRbHeadlEmpty.Enable( bEnable );
}
return 0;
}
static void lcl_InsTextInArr( const String& rTxt, _DB_Columns& rColArr )
2000-09-18 16:15:01 +00:00
{
_DB_Column* pNew;
sal_uInt16 nSttPos = 0, nFndPos;
2000-09-18 16:15:01 +00:00
while( STRING_NOTFOUND != ( nFndPos = rTxt.Search( '\x0A', nSttPos )) )
{
if( 1 < nFndPos )
{
pNew = new _DB_Column( rTxt.Copy( nSttPos, nFndPos -1 ) );
rColArr.push_back( pNew );
2000-09-18 16:15:01 +00:00
}
pNew = new _DB_Column;
rColArr.push_back( pNew );
2000-09-18 16:15:01 +00:00
nSttPos = nFndPos + 1;
}
if( nSttPos < rTxt.Len() )
{
pNew = new _DB_Column( rTxt.Copy( nSttPos ) );
rColArr.push_back( pNew );
2000-09-18 16:15:01 +00:00
}
}
bool SwInsertDBColAutoPilot::SplitTextToColArr( const String& rTxt,
2000-09-18 16:15:01 +00:00
_DB_Columns& rColArr,
sal_Bool bInsField )
2000-09-18 16:15:01 +00:00
{
// create each of the database columns from the text again
// and then save in an array
// database columns are in <> and must be present in the columns' array:
2000-09-18 16:15:01 +00:00
String sTxt( rTxt );
sal_uInt16 nFndPos, nEndPos, nSttPos = 0;
2000-09-18 16:15:01 +00:00
while( STRING_NOTFOUND != ( nFndPos = sTxt.Search( cDBFldStart, nSttPos )))
{
nSttPos = nFndPos + 1;
if( STRING_NOTFOUND != ( nEndPos = sTxt.Search( cDBFldEnd, nSttPos+1 )))
{
// Text in <> brackets found: what is it:
2000-09-18 16:15:01 +00:00
SwInsDBColumn aSrch( sTxt.Copy( nSttPos, nEndPos - nSttPos ), 0);
SwInsDBColumns::const_iterator it = aDBColumns.find( &aSrch );
if( it != aDBColumns.end() )
2000-09-18 16:15:01 +00:00
{
// that is a valid field
// so surely the text "before":
const SwInsDBColumn& rFndCol = **it;
2000-09-18 16:15:01 +00:00
_DB_Column* pNew;
if( 1 < nSttPos )
{
::lcl_InsTextInArr( sTxt.Copy( 0, nSttPos-1 ), rColArr );
sTxt.Erase( 0, nSttPos-1 );
}
sTxt.Erase( 0, (xub_StrLen)(rFndCol.sColumn.getLength() + 2) );
2000-09-18 16:15:01 +00:00
nSttPos = 0;
sal_uInt16 nSubType = 0;
sal_uLong nFormat;
2000-09-18 16:15:01 +00:00
if( rFndCol.bHasFmt )
{
if( rFndCol.bIsDBFmt )
nFormat = rFndCol.nDBNumFmt;
else
{
nFormat = rFndCol.nUsrNumFmt;
nSubType = nsSwExtendedSubType::SUB_OWN_FMT;
2000-09-18 16:15:01 +00:00
}
}
else
nFormat = 0;
if( bInsField )
{
SwWrtShell& rSh = pView->GetWrtShell();
SwDBFieldType aFldType( rSh.GetDoc(), aSrch.sColumn,
aDBData );
2000-09-18 16:15:01 +00:00
pNew = new _DB_Column( rFndCol, *new SwDBField(
(SwDBFieldType*)rSh.InsertFldType( aFldType ),
nFormat ) );
if( nSubType )
pNew->DB_ColumnData.pField->SetSubType( nSubType );
}
else
pNew = new _DB_Column( rFndCol, nFormat );
rColArr.push_back( pNew );
2000-09-18 16:15:01 +00:00
}
}
}
// don't forget the last text
2000-09-18 16:15:01 +00:00
if( sTxt.Len() )
::lcl_InsTextInArr( sTxt, rColArr );
return !rColArr.empty();
2000-09-18 16:15:01 +00:00
}
void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
2000-09-18 16:15:01 +00:00
Reference< XDataSource> xSource,
2000-11-13 07:32:00 +00:00
Reference< XConnection> xConnection,
Reference< sdbc::XResultSet > xResultSet )
2000-09-18 16:15:01 +00:00
{
const Any* pSelection = rSelection.getLength() ? rSelection.getConstArray() : 0;
2000-09-18 16:15:01 +00:00
SwWrtShell& rSh = pView->GetWrtShell();
//with the drag and drop interface no result set is initially available
sal_Bool bDisposeResultSet = sal_False;
// we don't have a cursor, so we have to create our own RowSet
if ( !xResultSet.is() )
2000-09-18 16:15:01 +00:00
{
xResultSet = SwNewDBMgr::createCursor(aDBData.sDataSource,aDBData.sCommand,aDBData.nCommandType,xConnection);
bDisposeResultSet = xResultSet.is();
2000-09-18 16:15:01 +00:00
}
Reference< sdbc::XRow > xRow(xResultSet, UNO_QUERY);
if ( !xRow.is() )
2000-09-18 16:15:01 +00:00
return;
2000-09-18 16:15:01 +00:00
rSh.StartAllAction();
sal_Bool bUndo = rSh.DoesUndo();
if( bUndo )
rSh.StartUndo( UNDO_EMPTY );
2000-09-18 16:15:01 +00:00
sal_Bool bAsTable = aRbAsTable.IsChecked();
2000-09-18 16:15:01 +00:00
SvNumberFormatter& rNumFmtr = *rSh.GetNumberFormatter();
if( rSh.HasSelection() )
rSh.DelRight();
::std::auto_ptr<SwWait> pWait;
Reference< XColumnsSupplier > xColsSupp( xResultSet, UNO_QUERY );
Reference <XNameAccess> xCols = xColsSupp->getColumns();
2000-09-18 16:15:01 +00:00
do{ // middle checked loop!!
if( bAsTable ) // Daten als Tabelle einfuegen
2000-09-18 16:15:01 +00:00
{
rSh.DoUndo( sal_False );
sal_uInt16 n, nRows = 0, nCols = aLbTableCol.GetEntryCount();
2000-09-18 16:15:01 +00:00
if( aCbTableHeadon.IsChecked() )
nRows++;
2000-11-13 07:32:00 +00:00
if( pSelection )
nRows = nRows + (sal_uInt16)rSelection.getLength();
2000-09-18 16:15:01 +00:00
else
++nRows;
// prepare the array for the selected columns
std::vector<SwInsDBColumn*> aColFlds;
2000-09-18 16:15:01 +00:00
for( n = 0; n < nCols; ++n )
{
SwInsDBColumn aSrch( aLbTableCol.GetEntry( n ), 0 );
SwInsDBColumns::const_iterator it = aDBColumns.find( &aSrch );
if (it != aDBColumns.end())
aColFlds.push_back(*it);
else {
2010-10-20 15:36:15 +01:00
OSL_ENSURE( !this, "database column not found" );
}
2000-09-18 16:15:01 +00:00
}
if( nCols != aColFlds.size() )
2000-09-18 16:15:01 +00:00
{
2010-10-20 15:36:15 +01:00
OSL_ENSURE( !this, "not all database columns found" );
nCols = aColFlds.size();
2000-09-18 16:15:01 +00:00
}
2000-12-08 09:19:55 +00:00
if(!nRows || !nCols)
{
2010-10-20 15:36:15 +01:00
OSL_ENSURE( !this, "wrong parameters" );
break;
}
2000-09-18 16:15:01 +00:00
const SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig();
sal_Bool bHTML = 0 != (::GetHtmlMode( pView->GetDocShell() ) & HTMLMODE_ON);
rSh.InsertTable(
pModOpt->GetInsTblFlags(bHTML),
nRows, nCols, text::HoriOrientation::FULL, (pSelection ? pTAutoFmt : 0) );
rSh.MoveTable( GetfnTablePrev(), GetfnTableStart() );
2000-09-18 16:15:01 +00:00
2000-11-13 07:32:00 +00:00
if( pSelection && pTblSet )
2000-09-18 16:15:01 +00:00
SetTabSet();
SfxItemSet aTblSet( rSh.GetAttrPool(), RES_BOXATR_FORMAT,
RES_BOXATR_VALUE );
sal_Bool bIsAutoUpdateCells = rSh.IsAutoUpdateCells();
rSh.SetAutoUpdateCells( sal_False );
2000-09-18 16:15:01 +00:00
if( aCbTableHeadon.IsChecked() )
{
for( n = 0; n < nCols; ++n )
{
if( aRbHeadlColnms.IsChecked() )
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
{
rSh.SwEditShell::Insert2( aColFlds[ n ]->sColumn );
}
2000-09-18 16:15:01 +00:00
rSh.GoNextCell();
}
}
else
rSh.SetRowsToRepeat( 0 );
2000-09-18 16:15:01 +00:00
2000-12-08 09:19:55 +00:00
for( sal_Int32 i = 0 ; ; ++i )
2000-09-18 16:15:01 +00:00
{
bool bBreak = false;
2000-09-18 16:15:01 +00:00
try
{
if(pSelection)
2000-09-18 16:15:01 +00:00
{
sal_Int32 nPos = 0;
pSelection[i] >>= nPos;
bBreak = !xResultSet->absolute(nPos);
2000-09-18 16:15:01 +00:00
}
else if(!i)
bBreak = !xResultSet->first();
2000-09-18 16:15:01 +00:00
}
2011-07-26 23:49:42 +01:00
catch (const Exception&)
2000-09-18 16:15:01 +00:00
{
bBreak = true;
2000-09-18 16:15:01 +00:00
}
if(bBreak)
break;
2000-09-18 16:15:01 +00:00
for( n = 0; n < nCols; ++n )
{
// at the very first time, NO GoNextCell, because we're
// already in it. Also no GoNextCell after the Insert,
// because an empty line is added at the end.
2000-09-18 16:15:01 +00:00
if( i || n )
rSh.GoNextCell();
const SwInsDBColumn* pEntry = aColFlds[ n ];
Reference< XColumn > xColumn;
xCols->getByName(pEntry->sColumn) >>= xColumn;
Reference< XPropertySet > xColumnProps( xColumn, UNO_QUERY );
sal_Int32 eDataType = 0;
if( xColumnProps.is() )
{
2012-12-21 12:00:43 +01:00
Any aType = xColumnProps->getPropertyValue("Type");
aType >>= eDataType;
}
2000-09-18 16:15:01 +00:00
try
{
if( pEntry->bHasFmt )
{
SwTblBoxNumFormat aNumFmt(
pEntry->bIsDBFmt ? pEntry->nDBNumFmt
: pEntry->nUsrNumFmt );
aTblSet.Put(aNumFmt);
if( xColumn.is() )
{
double fVal = xColumn->getDouble();
if( xColumn->wasNull() )
aTblSet.ClearItem( RES_BOXATR_VALUE );
else
{
if(rNumFmtr.GetType(aNumFmt.GetValue()) & NUMBERFORMAT_DATE)
{
::Date aStandard(1,1,1900);
if (*rNumFmtr.GetNullDate() != aStandard)
fVal += (aStandard - *rNumFmtr.GetNullDate());
}
aTblSet.Put( SwTblBoxValue( fVal ));
}
}
else
aTblSet.ClearItem( RES_BOXATR_VALUE );
rSh.SetTblBoxFormulaAttrs( aTblSet );
}
//#i60207# don't insert binary data as string - creates a loop
else if( DataType::BINARY == eDataType ||
DataType::VARBINARY == eDataType ||
DataType::LONGVARBINARY== eDataType ||
DataType::SQLNULL == eDataType ||
DataType::OTHER == eDataType ||
DataType::OBJECT == eDataType ||
DataType::DISTINCT == eDataType ||
DataType::STRUCT == eDataType ||
DataType::ARRAY == eDataType ||
DataType::BLOB == eDataType ||
DataType::CLOB == eDataType ||
DataType::REF == eDataType
)
{
// do nothing
}
2000-09-18 16:15:01 +00:00
else
{
2001-09-04 11:16:28 +00:00
rtl::OUString sVal = xColumn->getString();
2000-09-18 16:15:01 +00:00
if(!xColumn->wasNull())
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
{
rSh.SwEditShell::Insert2( sVal );
}
2000-09-18 16:15:01 +00:00
}
}
2011-07-26 23:49:42 +01:00
catch (const Exception& rExcept)
2000-09-18 16:15:01 +00:00
{
2011-10-28 21:44:12 +01:00
OSL_FAIL(rtl::OUStringToOString(rExcept.Message, osl_getThreadTextEncoding()).getStr());
2011-07-26 23:49:42 +01:00
(void)rExcept;
2000-09-18 16:15:01 +00:00
}
}
2000-11-13 07:32:00 +00:00
if( !pSelection )
2000-09-18 16:15:01 +00:00
{
if ( !xResultSet->next() )
2000-09-18 16:15:01 +00:00
break;
}
2000-11-13 07:32:00 +00:00
else if( i+1 >= rSelection.getLength() )
2000-09-18 16:15:01 +00:00
break;
if( 10 == i )
pWait = ::std::auto_ptr<SwWait>(new SwWait( *pView->GetDocShell(), sal_True ));
2000-09-18 16:15:01 +00:00
}
rSh.MoveTable( GetfnTableCurr(), GetfnTableStart() );
2000-11-13 07:32:00 +00:00
if( !pSelection && ( pTblSet || pTAutoFmt ))
2000-09-18 16:15:01 +00:00
{
if( pTblSet )
SetTabSet();
if( pTAutoFmt )
rSh.SetTableAutoFmt( *pTAutoFmt );
}
rSh.SetAutoUpdateCells( bIsAutoUpdateCells );
}
else // add data as fields/text
2000-09-18 16:15:01 +00:00
{
_DB_Columns aColArr;
if( SplitTextToColArr( aEdDbText.GetText(), aColArr, aRbAsField.IsChecked() ) )
{
// now for each data set, we can iterate over the array
// and add the data
2000-09-18 16:15:01 +00:00
if( !rSh.IsSttPara() )
rSh.SwEditShell::SplitNode();
if( !rSh.IsEndPara() )
{
rSh.SwEditShell::SplitNode();
rSh.SwCrsrShell::Left(1,CRSR_SKIP_CHARS);
2000-09-18 16:15:01 +00:00
}
rSh.DoUndo( sal_False );
2000-09-18 16:15:01 +00:00
SwTxtFmtColl* pColl = 0;
{
String sTmplNm( aLbDbParaColl.GetSelectEntry() );
if( sNoTmpl != sTmplNm )
{
pColl = rSh.FindTxtFmtCollByName( sTmplNm );
if( !pColl )
{
sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName( sTmplNm, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL );
2000-09-18 16:15:01 +00:00
if( USHRT_MAX != nId )
pColl = rSh.GetTxtCollFromPool( nId );
else
pColl = rSh.MakeTxtFmtColl( sTmplNm );
}
rSh.SetTxtFmtColl( pColl );
}
}
// for adding as fields -> insert a "NextField" after
// every data set
2000-09-18 16:15:01 +00:00
SwDBFormatData aDBFormatData;
2000-10-20 13:18:07 +00:00
Reference< XMultiServiceFactory > xMgr( ::comphelper::getProcessServiceFactory() );
Reference< XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
aDBFormatData.xFormatter = Reference<util::XNumberFormatter>(util::NumberFormatter::create(xContext), UNO_QUERY_THROW) ;
2000-09-18 16:15:01 +00:00
Reference<XPropertySet> xSourceProps(xSource, UNO_QUERY);
if(xSourceProps.is())
{
2012-12-21 12:00:43 +01:00
Any aFormats = xSourceProps->getPropertyValue("NumberFormatsSupplier");
if(aFormats.hasValue())
{
Reference< util::XNumberFormatsSupplier> xSuppl;
aFormats >>= xSuppl;
if(xSuppl.is())
{
2000-09-18 16:15:01 +00:00
Reference< XPropertySet > xSettings = xSuppl->getNumberFormatSettings();
2012-12-21 12:00:43 +01:00
Any aNull = xSettings->getPropertyValue("NullDate");
aNull >>= aDBFormatData.aNullDate;
if(aDBFormatData.xFormatter.is())
aDBFormatData.xFormatter->attachNumberFormatsSupplier(xSuppl);
}
}
2000-09-18 16:15:01 +00:00
}
aDBFormatData.aLocale = LanguageTag( rSh.GetCurLang() ).getLocale();
2000-09-18 16:15:01 +00:00
SwDBNextSetField aNxtDBFld( (SwDBNextSetFieldType*)rSh.
GetFldType( 0, RES_DBNEXTSETFLD ),
rtl::OUString("1"), aEmptyStr, aDBData );
2000-09-18 16:15:01 +00:00
bool bSetCrsr = true;
sal_uInt16 n = 0, nCols = aColArr.size();
CWS-TOOLING: integrate CWS swrefactormarks2 2009-04-09 12:51:41 +0200 b_michaelsen r270689 : #i94949# cleaned up assertions after rebasing 2009-04-08 17:37:08 +0200 b_michaelsen r270658 : fixing sw/source/ui/utlui/makefile.mk 2009-04-07 17:56:54 +0200 b_michaelsen r270606 : added bookctrl.cxx to EXCEPTIONFILES, because this is needed for stl on unxsols4 2009-04-07 17:05:20 +0200 b_michaelsen r270603 : added crbm.cxx to EXCEPTIONFILES, because this is needed for stl on unxsols4 2009-04-02 23:44:38 +0200 b_michaelsen r270436 : CWS-TOOLING: rebase CWS swrefactormarks2 to trunk@270033 (milestone: DEV300:m45) 2009-02-27 16:25:31 +0100 b_michaelsen r268606 : #i94949# fixed Windows buildbreaker 2009-02-25 18:01:13 +0100 b_michaelsen r268464 : #i94949# Bookmarktest document filter roundtrips 2009-02-24 18:23:55 +0100 b_michaelsen r268404 : #i94949# Bookmark unittests 2009-02-23 19:47:44 +0100 b_michaelsen r268370 : #i94949# added unittest for bookmarks 2009-02-23 12:22:07 +0100 b_michaelsen r268348 : #i94949# fixing CheckCrossReferences testcase 2009-02-20 18:12:50 +0100 b_michaelsen r268335 : #i94949# fixing SwXTextRange 2009-02-18 18:32:57 +0100 b_michaelsen r268252 : #i94949# deregistering DdeBookmarks on delete 2009-02-18 18:29:08 +0100 b_michaelsen r268251 : fixing dbgoutsw.cxx for debug builds 2009-02-16 18:42:43 +0100 b_michaelsen r267834 : CWS-TOOLING: rebase CWS swrefactormarks2 to trunk@267171 (milestone: DEV300:m41) 2009-02-12 15:32:02 +0100 b_michaelsen r267667 : #i94949 fixed crossrefbookmark naming 2009-02-11 18:30:08 +0100 b_michaelsen r267624 : #94949# fixing bookmark navigation 2009-02-11 13:55:26 +0100 b_michaelsen r267599 : #i94949# fixed bookmark naming 2009-02-10 17:53:05 +0100 b_michaelsen r267571 : #i94949# renamed HasOtherMarkPos to IsExpanded 2009-02-10 17:23:01 +0100 b_michaelsen r267564 : #i94949# renamed ::sw::bookmark namespace to more fitting ::sw::mark 2009-02-10 16:16:32 +0100 b_michaelsen r267553 : #i94949# creating only CrossRefBookmark per Txtnode 2009-02-10 12:14:05 +0100 b_michaelsen r267547 : #i94949# fixed bookmark count in navigator 2009-02-09 19:12:18 +0100 b_michaelsen r267532 : #i94949# lcl_CopyBookmarks(..) - handle marks on boundaries correctly 2009-02-09 17:32:45 +0100 b_michaelsen r267524 : #i94949# setting the refobject of the DdeBookmark in Sin SwServerObject::SetDdeBookmark(..) 2009-02-09 17:22:15 +0100 b_michaelsen r267523 : #i94949# trying to harden SwServerObject 2009-02-09 16:47:32 +0100 b_michaelsen r267521 : #i94949# lcl_CopyBookmarks(..): try to get the source mark name, if possible 2009-02-09 16:05:42 +0100 b_michaelsen r267519 : #i94949# clearing the OtherMarkPos if PaM has no mark in repositionMark(..), swapping inverted bookmarks without hissing an assertion 2009-02-09 15:55:38 +0100 b_michaelsen r267518 : #i94949# checking for out-of-bounds in SwView::ExecuteStatusLine(..) 2009-02-09 15:23:47 +0100 b_michaelsen r267517 : #i94949# using an UNO_BOOKMARK in ui/dbui/dbinsdlg.cxx 2009-02-09 14:14:47 +0100 b_michaelsen r267514 : #i94949# IDocumentMarkAccess::GetType(..) asserts on unknown type 2009-02-09 14:04:25 +0100 b_michaelsen r267513 : #i94949# using rtl strings instead of tools-strings in CrossRefBookmarks 2009-02-09 13:55:01 +0100 b_michaelsen r267510 : #i94949# using empty string for UnoMark construction 2009-02-09 13:46:46 +0100 b_michaelsen r267509 : #i94949# removed superfluous #includes, removed superfluous member DdeBookmark::bGenerateName, initialized DdeBookmark::m_aRefObj removed superfluous local _FindItem::ClearObj 2009-02-06 14:38:37 +0100 b_michaelsen r267462 : #i94949# fixing FN_STAT_BOOKMARK dispatches 2009-02-05 18:05:07 +0100 b_michaelsen r267436 : #i94949# removing superfluous #includes 2009-02-04 15:51:31 +0100 b_michaelsen r267391 : fixing resync merge error 2009-02-02 19:39:55 +0100 b_michaelsen r267294 : #i94949# bookmark performance 2009-01-30 19:30:51 +0100 b_michaelsen r267229 : #i94949# throwing IllegalArgumentException, if appropriate 2009-01-30 19:29:56 +0100 b_michaelsen r267228 : #i94949# refactored lcl_FillBookmarkArray, comments, constness 2009-01-30 19:23:49 +0100 b_michaelsen r267227 : #i94949# refactored lcl_FillBookmarkArray, comments, constness 2009-01-30 19:16:06 +0100 b_michaelsen r267226 : #i94949# refactored lcl_FillBookmarkArray 2009-01-30 17:59:27 +0100 b_michaelsen r267222 : #i94949# removed superficial #include 2009-01-30 17:50:02 +0100 b_michaelsen r267220 : #i94949# SwXTextRange remembers its UNO bookmark 2009-01-29 20:19:58 +0100 b_michaelsen r267168 : #i94949# implemented IDocumentMarkAccess::findBookmark 2009-01-29 17:22:17 +0100 b_michaelsen r267162 : #i94949# implemented renameMark in Markmanager 2009-01-29 14:17:10 +0100 b_michaelsen r267134 : #i94949# cleanup in SwXBookmark, whitespace 2009-01-29 13:21:54 +0100 b_michaelsen r267125 : #i94949# cleanup in SwXBookmark, whitespace 2009-01-29 13:06:10 +0100 b_michaelsen r267120 : #i94949# cleanup in SwXBookmark, whitespace 2009-01-29 13:00:09 +0100 b_michaelsen r267118 : #i94949# cleanup in SwXBookmark, whitespace 2009-01-29 10:35:10 +0100 b_michaelsen r267101 : #i94949# renamed SetCrsrToBkmk to SetCrsrToMark, moving to start/end of doc if no more bookmarks can be found 2009-01-28 17:05:36 +0100 b_michaelsen r267070 : #i94949# fixed order in aProvNamesId in unocoll.cxx 2009-01-28 15:46:13 +0100 b_michaelsen r267063 : #i94949# documentation 2009-01-28 15:36:59 +0100 b_michaelsen r267062 : #i94949# removing superficial #include 2009-01-28 15:30:36 +0100 b_michaelsen r267061 : #i94949# basic code conventions 2009-01-28 11:14:30 +0100 b_michaelsen r267039 : #i94949# comparing to the actual name of the new mark 2009-01-26 15:22:25 +0100 b_michaelsen r266927 : #i94949# performance fixes 2009-01-14 21:16:56 +0100 b_michaelsen r266332 : #i94949# fixing linux x86-64 compiler warnings 2009-01-14 19:52:06 +0100 b_michaelsen r266331 : #i94949# fixing some compiler warnings 2008-12-15 13:04:49 +0100 b_michaelsen r265474 : #i94949# fixed microsoft compiler warnings 2008-12-12 18:26:02 +0100 b_michaelsen r265434 : #i94949# fixed pro platform buildbreakers 2008-12-11 17:51:24 +0100 b_michaelsen r265342 : CWS-TOOLING: rebase CWS swrefactormarks2 to trunk@264807 (milestone: DEV300:m37) 2008-12-09 18:30:59 +0100 b_michaelsen r265134 : #i94949# fixed IDocumentMarkAccess::GetType for new mark inheritance tree 2008-12-09 16:56:26 +0100 b_michaelsen r265118 : #i94949# fixed deleteMark optimization 2008-12-09 14:55:58 +0100 b_michaelsen r265092 : #i94949# DdeLink and DdeBookmark 2008-12-05 18:28:05 +0100 b_michaelsen r264914 : #i94949# fixed InitDoc in bookmarks 2008-12-02 02:23:51 +0100 b_michaelsen r264649 : #i94949# removed obsolete naming proposal code in SwXTextRange, fixed navigator reminders to forget the oldest reminder when the pool is empty 2008-12-02 02:05:19 +0100 b_michaelsen r264648 : #i94949# using bisect search for delete 2008-12-02 01:58:16 +0100 b_michaelsen r264647 : #i94949# using bisect search for delete 2008-12-02 01:37:33 +0100 b_michaelsen r264646 : #i94949# using bisect search for delete 2008-12-02 01:03:29 +0100 b_michaelsen r264645 : #i94949# fixed deleteMark crash 2008-12-01 20:55:00 +0100 b_michaelsen r264638 : #i94949# removed crossrefs from ui enumerations 2008-12-01 15:48:12 +0100 b_michaelsen r264613 : #i94949# removed superfluous local functions 2008-12-01 15:01:19 +0100 b_michaelsen r264608 : #i94949# optimized insertion of new marks 2008-12-01 14:33:21 +0100 b_michaelsen r264603 : #i94949# simplified code finding Fieldmark for a position 2008-12-01 14:05:55 +0100 b_michaelsen r264598 : #i94949# fixed reverse travelling through marks, removed obsolete getUniqueMarkName() 2008-11-27 18:48:15 +0100 b_michaelsen r264515 : #i94949# fixed _SaveCntntIdx and friends 2008-11-27 15:59:49 +0100 b_michaelsen r264500 : #i94949# fix Mark position only in ctor 2008-11-27 15:52:28 +0100 b_michaelsen r264497 : #i94949# fixed Bug in SwXBookmark, was using pDoc too early 2008-11-26 14:54:22 +0100 b_michaelsen r264396 : #i94949# fixed documentation, simplified navigator reminder code 2008-11-24 20:45:51 +0100 b_michaelsen r264266 : #i94949# removed last obsolete getUniqueMarkName calls 2008-11-24 20:21:35 +0100 b_michaelsen r264265 : #i94949# fixed typo in IDocumentMarkAccess, removed obsolete getUniqueMarkName calls 2008-11-24 18:34:32 +0100 b_michaelsen r264264 : #i94949# repositioning of Marks, removed possibility to delete marks by name in the core, refactoring of navigator reminder generation 2008-11-21 14:08:49 +0100 b_michaelsen r264137 : #i94949# simplified makeMark 2008-11-21 12:07:09 +0100 b_michaelsen r264120 : #i94949# moved ShortName and KeyCode from IMark to IBookmark 2008-11-19 12:50:49 +0100 b_michaelsen r263981 : #i94949# starting refactoring of bookmark naming 2008-11-19 11:31:08 +0100 b_michaelsen r263972 : #i94949# getting rid of obsolete dynamic casts 2008-11-18 19:06:09 +0100 b_michaelsen r263795 : #i94949# getting rid of index based mark access, IDocumentMarkAccess already provides iterators 2008-11-18 17:50:18 +0100 b_michaelsen r263792 : #i94949# getting rid of index based mark access, IDocumentMarkAccess already provides iterators 2008-11-18 16:48:20 +0100 b_michaelsen r263783 : #i94949# removed methods from crsrsh which are already available directly via IDocumentMarkAccess 2008-11-18 11:31:35 +0100 b_michaelsen r263753 : #i94949# cleaning up mark code in crsrsh 2008-11-17 10:15:25 +0100 b_michaelsen r263705 : #i94949# removed possible integer overflow 2008-11-14 18:48:45 +0100 b_michaelsen r263695 : #i94949# management of mark names in MarkManager 2008-11-14 18:23:40 +0100 b_michaelsen r263693 : #i94949# using polymorphism to do mark-specific setup in SwDoc 2008-11-14 16:27:09 +0100 b_michaelsen r263684 : #i94949# got rid of makeCrossRefBookmark 2008-11-14 13:03:32 +0100 b_michaelsen r263674 : #i94949# refactored Correction methods 2008-11-13 12:27:55 +0100 b_michaelsen r263631 : #i94949# got rid of old-style tools assertions in new code 2008-11-12 16:58:16 +0100 b_michaelsen r263608 : #i94949# added assertion for unique names 2008-11-12 16:55:18 +0100 b_michaelsen r263607 : #i94949# maked XFormField deprecated 2008-11-12 13:04:29 +0100 b_michaelsen r263587 : #i94949# replaced IDocumentMarkAccess::GetType with simple dynamic_cast where possible 2008-11-11 18:45:53 +0100 b_michaelsen r263572 : #i94949# cleaned up SwHstryBookmark 2008-11-11 13:48:18 +0100 b_michaelsen r263557 : #i94949# removed dynamic_casts to SwModify by inheriting IMark from it 2008-11-11 11:26:28 +0100 b_michaelsen r263548 : #i94949# fixed SwXBookmark 2008-11-10 17:01:19 +0100 b_michaelsen r263529 : #i94949# fixed DdeBookmarks in clipboard 2008-11-10 16:44:52 +0100 b_michaelsen r263527 : #i94949# formatting 2008-11-10 16:29:16 +0100 b_michaelsen r263526 : #i94949# fixing unoobj.cxx 2008-11-10 16:23:50 +0100 b_michaelsen r263525 : #i94949# cleaning up crossrefbookmark.cxx/.hxx 2008-11-10 16:02:08 +0100 b_michaelsen r263524 : #i94949# Pdf Export should only generate 'real' bookmarks 2008-11-10 15:33:58 +0100 b_michaelsen r263521 : #i94949# removed const_casts 2008-11-10 15:12:06 +0100 b_michaelsen r263520 : #i94949# moved _DelBookmarks into MarksManager 2008-11-07 18:48:38 +0100 b_michaelsen r263480 : #i94949# using iterator interface 2008-11-07 18:41:46 +0100 b_michaelsen r263478 : #i94949# using iterator interface 2008-11-07 18:07:41 +0100 b_michaelsen r263477 : #i94949# using iterator interface 2008-11-07 17:54:41 +0100 b_michaelsen r263476 : #i94949# using iterator interface 2008-11-07 17:44:41 +0100 b_michaelsen r263475 : #i94949# moved correction methods into MarkManager 2008-11-06 18:47:28 +0100 b_michaelsen r263404 : #i94949# getting rid of superfluous const_casts 2008-11-06 17:58:01 +0100 b_michaelsen r263403 : #i94949# no more setting of mark positions outside of the core 2008-11-06 17:08:37 +0100 b_michaelsen r263401 : #i94949# removed setters from IMark 2008-11-06 13:55:25 +0100 b_michaelsen r263383 : #i94949 SwDoc does not implement IDocumentMarkAccess anymore 2008-11-04 18:17:03 +0100 b_michaelsen r263333 : #i94949# began removing IDocumentMarkAccess from SwDoc 2008-11-04 16:48:34 +0100 b_michaelsen r263330 : removing dead code (SwBitArray) found by mst 2008-11-04 16:29:32 +0100 b_michaelsen r263329 : removing dead code (SwBitArray) found by mst 2008-11-04 14:57:48 +0100 b_michaelsen r263326 : removing dead code (SwBitArray) found by mst 2008-11-04 14:50:18 +0100 b_michaelsen r263325 : #i94949# stricter typing in IDocumentMarkAccess 2008-10-24 15:16:27 +0200 b_michaelsen r262647 : #i94949# renamed ::sw::bookmark::SimpleMark to NavigatorReminder to fit the IDocumentMarkAccess enum 2008-10-24 15:10:10 +0200 b_michaelsen r262646 : #i94949# only 'real' bookmark implement IBookmark, Marks also get removed from m_vFieldmarks on delete/clear 2008-10-24 13:06:23 +0200 b_michaelsen r262636 : #i94949# Fieldmark tabnavigation 2008-10-23 12:16:36 +0200 b_michaelsen r262619 : #i94949# Fieldmark classes and filters 2008-10-22 13:17:18 +0200 b_michaelsen r262597 : #i94949# writer import fixes 2008-10-21 11:30:38 +0200 b_michaelsen r262565 : #i94949# renamed methods containing Bookmark in the generic IMark interface 2008-10-20 14:09:02 +0200 b_michaelsen r262318 : #i94949# fixed SwDoc::CorrRel 2008-10-16 22:45:13 +0200 b_michaelsen r262273 : #i94949 simplified Before/After methods 2008-10-16 21:40:57 +0200 b_michaelsen r262271 : #i94949 renamed SimpleMark to NavigatorReminder 2008-10-16 21:15:23 +0200 b_michaelsen r262270 : #i94949 using shared_ptr only in MarkManager 2008-10-16 17:46:37 +0200 b_michaelsen r262269 : #i94949# getFieldmarkBefore and getFieldmarkAfter 2008-10-16 17:12:13 +0200 b_michaelsen r262265 : #i94949# cleanup in crbm.cxx 2008-10-16 12:49:01 +0200 b_michaelsen r262257 : #i94949# fixed usage of invalid iterator, fixed invalid cast 2008-10-15 15:34:20 +0200 b_michaelsen r262239 : #i94949# added moved files 2008-10-15 15:26:45 +0200 b_michaelsen r262237 : #i94949# initial reimplementation of Bookmarks
2009-04-21 15:40:02 +00:00
::sw::mark::IMark* pMark = NULL;
2000-12-08 09:19:55 +00:00
for( sal_Int32 i = 0 ; ; ++i )
2000-09-18 16:15:01 +00:00
{
bool bBreak = false;
2000-09-18 16:15:01 +00:00
try
{
if(pSelection)
2000-09-18 16:15:01 +00:00
{
sal_Int32 nPos = 0;
pSelection[i] >>= nPos;
bBreak = !xResultSet->absolute(nPos);
2000-09-18 16:15:01 +00:00
}
else if(!i)
bBreak = !xResultSet->first();
2000-09-18 16:15:01 +00:00
}
2011-07-26 23:49:42 +01:00
catch (const Exception&)
{
bBreak = true;
}
2000-09-18 16:15:01 +00:00
if(bBreak)
break;
2000-09-18 16:15:01 +00:00
for( n = 0; n < nCols; ++n )
{
_DB_Column* pDBCol = &aColArr[ n ];
2000-09-18 16:15:01 +00:00
String sIns;
switch( pDBCol->eColType )
{
case _DB_Column::DB_FILLTEXT:
sIns = *pDBCol->DB_ColumnData.pText;
break;
case _DB_Column::DB_SPLITPARA:
rSh.SplitNode();
// when the template is not the same as the follow template,
// the selected has to be set newly
2000-09-18 16:15:01 +00:00
if( pColl && &pColl->GetNextTxtFmtColl() != pColl )
rSh.SetTxtFmtColl( pColl );
break;
case _DB_Column::DB_COL_FIELD:
{
SwDBField *const pFld = static_cast<SwDBField *>(
pDBCol->DB_ColumnData.pField->CopyField());
2000-09-18 16:15:01 +00:00
double nValue = DBL_MAX;
2000-09-18 16:15:01 +00:00
Reference< XPropertySet > xColumnProps;
xCols->getByName(pDBCol->pColInfo->sColumn) >>= xColumnProps;
2000-09-18 16:15:01 +00:00
pFld->SetExpansion( SwNewDBMgr::GetDBField(
xColumnProps,
aDBFormatData,
&nValue ) );
if( DBL_MAX != nValue )
{
2012-12-21 12:00:43 +01:00
Any aType = xColumnProps->getPropertyValue("Type");
sal_Int32 eDataType = 0;
aType >>= eDataType;
if( DataType::DATE == eDataType || DataType::TIME == eDataType ||
DataType::TIMESTAMP == eDataType)
{
::Date aStandard(1,1,1900);
::Date aCompare(aDBFormatData.aNullDate.Day ,
aDBFormatData.aNullDate.Month,
aDBFormatData.aNullDate.Year);
if(aStandard != aCompare)
nValue += (aStandard - aCompare);
}
pFld->ChgValue( nValue, sal_True );
}
2000-09-18 16:15:01 +00:00
pFld->SetInitialized();
rSh.Insert( *pFld );
delete pFld;
}
break;
case _DB_Column::DB_COL_TEXT:
{
double nValue = DBL_MAX;
Reference< XPropertySet > xColumnProps;
xCols->getByName(pDBCol->pColInfo->sColumn) >>= xColumnProps;
2000-09-18 16:15:01 +00:00
sIns = SwNewDBMgr::GetDBField(
xColumnProps,
aDBFormatData,
&nValue );
if( pDBCol->DB_ColumnData.nFormat &&
DBL_MAX != nValue )
{
Color* pCol;
if(rNumFmtr.GetType(pDBCol->DB_ColumnData.nFormat) & NUMBERFORMAT_DATE)
{
::Date aStandard(1,1,1900);
if (*rNumFmtr.GetNullDate() != aStandard)
nValue += (aStandard - *rNumFmtr.GetNullDate());
}
rNumFmtr.GetOutputString( nValue,
2000-09-18 16:15:01 +00:00
pDBCol->DB_ColumnData.nFormat,
sIns, &pCol );
}
}
break;
}
if( sIns.Len() )
rSh.Insert( sIns );
if( bSetCrsr && sIns.Len() )
{
// to the beginning and set a mark, so that
// the cursor can be set to the initial position
// at the end.
rSh.SwCrsrShell::MovePara(
GetfnParaCurr(), GetfnParaStart() );
CWS-TOOLING: integrate CWS swrefactormarks2 2009-04-09 12:51:41 +0200 b_michaelsen r270689 : #i94949# cleaned up assertions after rebasing 2009-04-08 17:37:08 +0200 b_michaelsen r270658 : fixing sw/source/ui/utlui/makefile.mk 2009-04-07 17:56:54 +0200 b_michaelsen r270606 : added bookctrl.cxx to EXCEPTIONFILES, because this is needed for stl on unxsols4 2009-04-07 17:05:20 +0200 b_michaelsen r270603 : added crbm.cxx to EXCEPTIONFILES, because this is needed for stl on unxsols4 2009-04-02 23:44:38 +0200 b_michaelsen r270436 : CWS-TOOLING: rebase CWS swrefactormarks2 to trunk@270033 (milestone: DEV300:m45) 2009-02-27 16:25:31 +0100 b_michaelsen r268606 : #i94949# fixed Windows buildbreaker 2009-02-25 18:01:13 +0100 b_michaelsen r268464 : #i94949# Bookmarktest document filter roundtrips 2009-02-24 18:23:55 +0100 b_michaelsen r268404 : #i94949# Bookmark unittests 2009-02-23 19:47:44 +0100 b_michaelsen r268370 : #i94949# added unittest for bookmarks 2009-02-23 12:22:07 +0100 b_michaelsen r268348 : #i94949# fixing CheckCrossReferences testcase 2009-02-20 18:12:50 +0100 b_michaelsen r268335 : #i94949# fixing SwXTextRange 2009-02-18 18:32:57 +0100 b_michaelsen r268252 : #i94949# deregistering DdeBookmarks on delete 2009-02-18 18:29:08 +0100 b_michaelsen r268251 : fixing dbgoutsw.cxx for debug builds 2009-02-16 18:42:43 +0100 b_michaelsen r267834 : CWS-TOOLING: rebase CWS swrefactormarks2 to trunk@267171 (milestone: DEV300:m41) 2009-02-12 15:32:02 +0100 b_michaelsen r267667 : #i94949 fixed crossrefbookmark naming 2009-02-11 18:30:08 +0100 b_michaelsen r267624 : #94949# fixing bookmark navigation 2009-02-11 13:55:26 +0100 b_michaelsen r267599 : #i94949# fixed bookmark naming 2009-02-10 17:53:05 +0100 b_michaelsen r267571 : #i94949# renamed HasOtherMarkPos to IsExpanded 2009-02-10 17:23:01 +0100 b_michaelsen r267564 : #i94949# renamed ::sw::bookmark namespace to more fitting ::sw::mark 2009-02-10 16:16:32 +0100 b_michaelsen r267553 : #i94949# creating only CrossRefBookmark per Txtnode 2009-02-10 12:14:05 +0100 b_michaelsen r267547 : #i94949# fixed bookmark count in navigator 2009-02-09 19:12:18 +0100 b_michaelsen r267532 : #i94949# lcl_CopyBookmarks(..) - handle marks on boundaries correctly 2009-02-09 17:32:45 +0100 b_michaelsen r267524 : #i94949# setting the refobject of the DdeBookmark in Sin SwServerObject::SetDdeBookmark(..) 2009-02-09 17:22:15 +0100 b_michaelsen r267523 : #i94949# trying to harden SwServerObject 2009-02-09 16:47:32 +0100 b_michaelsen r267521 : #i94949# lcl_CopyBookmarks(..): try to get the source mark name, if possible 2009-02-09 16:05:42 +0100 b_michaelsen r267519 : #i94949# clearing the OtherMarkPos if PaM has no mark in repositionMark(..), swapping inverted bookmarks without hissing an assertion 2009-02-09 15:55:38 +0100 b_michaelsen r267518 : #i94949# checking for out-of-bounds in SwView::ExecuteStatusLine(..) 2009-02-09 15:23:47 +0100 b_michaelsen r267517 : #i94949# using an UNO_BOOKMARK in ui/dbui/dbinsdlg.cxx 2009-02-09 14:14:47 +0100 b_michaelsen r267514 : #i94949# IDocumentMarkAccess::GetType(..) asserts on unknown type 2009-02-09 14:04:25 +0100 b_michaelsen r267513 : #i94949# using rtl strings instead of tools-strings in CrossRefBookmarks 2009-02-09 13:55:01 +0100 b_michaelsen r267510 : #i94949# using empty string for UnoMark construction 2009-02-09 13:46:46 +0100 b_michaelsen r267509 : #i94949# removed superfluous #includes, removed superfluous member DdeBookmark::bGenerateName, initialized DdeBookmark::m_aRefObj removed superfluous local _FindItem::ClearObj 2009-02-06 14:38:37 +0100 b_michaelsen r267462 : #i94949# fixing FN_STAT_BOOKMARK dispatches 2009-02-05 18:05:07 +0100 b_michaelsen r267436 : #i94949# removing superfluous #includes 2009-02-04 15:51:31 +0100 b_michaelsen r267391 : fixing resync merge error 2009-02-02 19:39:55 +0100 b_michaelsen r267294 : #i94949# bookmark performance 2009-01-30 19:30:51 +0100 b_michaelsen r267229 : #i94949# throwing IllegalArgumentException, if appropriate 2009-01-30 19:29:56 +0100 b_michaelsen r267228 : #i94949# refactored lcl_FillBookmarkArray, comments, constness 2009-01-30 19:23:49 +0100 b_michaelsen r267227 : #i94949# refactored lcl_FillBookmarkArray, comments, constness 2009-01-30 19:16:06 +0100 b_michaelsen r267226 : #i94949# refactored lcl_FillBookmarkArray 2009-01-30 17:59:27 +0100 b_michaelsen r267222 : #i94949# removed superficial #include 2009-01-30 17:50:02 +0100 b_michaelsen r267220 : #i94949# SwXTextRange remembers its UNO bookmark 2009-01-29 20:19:58 +0100 b_michaelsen r267168 : #i94949# implemented IDocumentMarkAccess::findBookmark 2009-01-29 17:22:17 +0100 b_michaelsen r267162 : #i94949# implemented renameMark in Markmanager 2009-01-29 14:17:10 +0100 b_michaelsen r267134 : #i94949# cleanup in SwXBookmark, whitespace 2009-01-29 13:21:54 +0100 b_michaelsen r267125 : #i94949# cleanup in SwXBookmark, whitespace 2009-01-29 13:06:10 +0100 b_michaelsen r267120 : #i94949# cleanup in SwXBookmark, whitespace 2009-01-29 13:00:09 +0100 b_michaelsen r267118 : #i94949# cleanup in SwXBookmark, whitespace 2009-01-29 10:35:10 +0100 b_michaelsen r267101 : #i94949# renamed SetCrsrToBkmk to SetCrsrToMark, moving to start/end of doc if no more bookmarks can be found 2009-01-28 17:05:36 +0100 b_michaelsen r267070 : #i94949# fixed order in aProvNamesId in unocoll.cxx 2009-01-28 15:46:13 +0100 b_michaelsen r267063 : #i94949# documentation 2009-01-28 15:36:59 +0100 b_michaelsen r267062 : #i94949# removing superficial #include 2009-01-28 15:30:36 +0100 b_michaelsen r267061 : #i94949# basic code conventions 2009-01-28 11:14:30 +0100 b_michaelsen r267039 : #i94949# comparing to the actual name of the new mark 2009-01-26 15:22:25 +0100 b_michaelsen r266927 : #i94949# performance fixes 2009-01-14 21:16:56 +0100 b_michaelsen r266332 : #i94949# fixing linux x86-64 compiler warnings 2009-01-14 19:52:06 +0100 b_michaelsen r266331 : #i94949# fixing some compiler warnings 2008-12-15 13:04:49 +0100 b_michaelsen r265474 : #i94949# fixed microsoft compiler warnings 2008-12-12 18:26:02 +0100 b_michaelsen r265434 : #i94949# fixed pro platform buildbreakers 2008-12-11 17:51:24 +0100 b_michaelsen r265342 : CWS-TOOLING: rebase CWS swrefactormarks2 to trunk@264807 (milestone: DEV300:m37) 2008-12-09 18:30:59 +0100 b_michaelsen r265134 : #i94949# fixed IDocumentMarkAccess::GetType for new mark inheritance tree 2008-12-09 16:56:26 +0100 b_michaelsen r265118 : #i94949# fixed deleteMark optimization 2008-12-09 14:55:58 +0100 b_michaelsen r265092 : #i94949# DdeLink and DdeBookmark 2008-12-05 18:28:05 +0100 b_michaelsen r264914 : #i94949# fixed InitDoc in bookmarks 2008-12-02 02:23:51 +0100 b_michaelsen r264649 : #i94949# removed obsolete naming proposal code in SwXTextRange, fixed navigator reminders to forget the oldest reminder when the pool is empty 2008-12-02 02:05:19 +0100 b_michaelsen r264648 : #i94949# using bisect search for delete 2008-12-02 01:58:16 +0100 b_michaelsen r264647 : #i94949# using bisect search for delete 2008-12-02 01:37:33 +0100 b_michaelsen r264646 : #i94949# using bisect search for delete 2008-12-02 01:03:29 +0100 b_michaelsen r264645 : #i94949# fixed deleteMark crash 2008-12-01 20:55:00 +0100 b_michaelsen r264638 : #i94949# removed crossrefs from ui enumerations 2008-12-01 15:48:12 +0100 b_michaelsen r264613 : #i94949# removed superfluous local functions 2008-12-01 15:01:19 +0100 b_michaelsen r264608 : #i94949# optimized insertion of new marks 2008-12-01 14:33:21 +0100 b_michaelsen r264603 : #i94949# simplified code finding Fieldmark for a position 2008-12-01 14:05:55 +0100 b_michaelsen r264598 : #i94949# fixed reverse travelling through marks, removed obsolete getUniqueMarkName() 2008-11-27 18:48:15 +0100 b_michaelsen r264515 : #i94949# fixed _SaveCntntIdx and friends 2008-11-27 15:59:49 +0100 b_michaelsen r264500 : #i94949# fix Mark position only in ctor 2008-11-27 15:52:28 +0100 b_michaelsen r264497 : #i94949# fixed Bug in SwXBookmark, was using pDoc too early 2008-11-26 14:54:22 +0100 b_michaelsen r264396 : #i94949# fixed documentation, simplified navigator reminder code 2008-11-24 20:45:51 +0100 b_michaelsen r264266 : #i94949# removed last obsolete getUniqueMarkName calls 2008-11-24 20:21:35 +0100 b_michaelsen r264265 : #i94949# fixed typo in IDocumentMarkAccess, removed obsolete getUniqueMarkName calls 2008-11-24 18:34:32 +0100 b_michaelsen r264264 : #i94949# repositioning of Marks, removed possibility to delete marks by name in the core, refactoring of navigator reminder generation 2008-11-21 14:08:49 +0100 b_michaelsen r264137 : #i94949# simplified makeMark 2008-11-21 12:07:09 +0100 b_michaelsen r264120 : #i94949# moved ShortName and KeyCode from IMark to IBookmark 2008-11-19 12:50:49 +0100 b_michaelsen r263981 : #i94949# starting refactoring of bookmark naming 2008-11-19 11:31:08 +0100 b_michaelsen r263972 : #i94949# getting rid of obsolete dynamic casts 2008-11-18 19:06:09 +0100 b_michaelsen r263795 : #i94949# getting rid of index based mark access, IDocumentMarkAccess already provides iterators 2008-11-18 17:50:18 +0100 b_michaelsen r263792 : #i94949# getting rid of index based mark access, IDocumentMarkAccess already provides iterators 2008-11-18 16:48:20 +0100 b_michaelsen r263783 : #i94949# removed methods from crsrsh which are already available directly via IDocumentMarkAccess 2008-11-18 11:31:35 +0100 b_michaelsen r263753 : #i94949# cleaning up mark code in crsrsh 2008-11-17 10:15:25 +0100 b_michaelsen r263705 : #i94949# removed possible integer overflow 2008-11-14 18:48:45 +0100 b_michaelsen r263695 : #i94949# management of mark names in MarkManager 2008-11-14 18:23:40 +0100 b_michaelsen r263693 : #i94949# using polymorphism to do mark-specific setup in SwDoc 2008-11-14 16:27:09 +0100 b_michaelsen r263684 : #i94949# got rid of makeCrossRefBookmark 2008-11-14 13:03:32 +0100 b_michaelsen r263674 : #i94949# refactored Correction methods 2008-11-13 12:27:55 +0100 b_michaelsen r263631 : #i94949# got rid of old-style tools assertions in new code 2008-11-12 16:58:16 +0100 b_michaelsen r263608 : #i94949# added assertion for unique names 2008-11-12 16:55:18 +0100 b_michaelsen r263607 : #i94949# maked XFormField deprecated 2008-11-12 13:04:29 +0100 b_michaelsen r263587 : #i94949# replaced IDocumentMarkAccess::GetType with simple dynamic_cast where possible 2008-11-11 18:45:53 +0100 b_michaelsen r263572 : #i94949# cleaned up SwHstryBookmark 2008-11-11 13:48:18 +0100 b_michaelsen r263557 : #i94949# removed dynamic_casts to SwModify by inheriting IMark from it 2008-11-11 11:26:28 +0100 b_michaelsen r263548 : #i94949# fixed SwXBookmark 2008-11-10 17:01:19 +0100 b_michaelsen r263529 : #i94949# fixed DdeBookmarks in clipboard 2008-11-10 16:44:52 +0100 b_michaelsen r263527 : #i94949# formatting 2008-11-10 16:29:16 +0100 b_michaelsen r263526 : #i94949# fixing unoobj.cxx 2008-11-10 16:23:50 +0100 b_michaelsen r263525 : #i94949# cleaning up crossrefbookmark.cxx/.hxx 2008-11-10 16:02:08 +0100 b_michaelsen r263524 : #i94949# Pdf Export should only generate 'real' bookmarks 2008-11-10 15:33:58 +0100 b_michaelsen r263521 : #i94949# removed const_casts 2008-11-10 15:12:06 +0100 b_michaelsen r263520 : #i94949# moved _DelBookmarks into MarksManager 2008-11-07 18:48:38 +0100 b_michaelsen r263480 : #i94949# using iterator interface 2008-11-07 18:41:46 +0100 b_michaelsen r263478 : #i94949# using iterator interface 2008-11-07 18:07:41 +0100 b_michaelsen r263477 : #i94949# using iterator interface 2008-11-07 17:54:41 +0100 b_michaelsen r263476 : #i94949# using iterator interface 2008-11-07 17:44:41 +0100 b_michaelsen r263475 : #i94949# moved correction methods into MarkManager 2008-11-06 18:47:28 +0100 b_michaelsen r263404 : #i94949# getting rid of superfluous const_casts 2008-11-06 17:58:01 +0100 b_michaelsen r263403 : #i94949# no more setting of mark positions outside of the core 2008-11-06 17:08:37 +0100 b_michaelsen r263401 : #i94949# removed setters from IMark 2008-11-06 13:55:25 +0100 b_michaelsen r263383 : #i94949 SwDoc does not implement IDocumentMarkAccess anymore 2008-11-04 18:17:03 +0100 b_michaelsen r263333 : #i94949# began removing IDocumentMarkAccess from SwDoc 2008-11-04 16:48:34 +0100 b_michaelsen r263330 : removing dead code (SwBitArray) found by mst 2008-11-04 16:29:32 +0100 b_michaelsen r263329 : removing dead code (SwBitArray) found by mst 2008-11-04 14:57:48 +0100 b_michaelsen r263326 : removing dead code (SwBitArray) found by mst 2008-11-04 14:50:18 +0100 b_michaelsen r263325 : #i94949# stricter typing in IDocumentMarkAccess 2008-10-24 15:16:27 +0200 b_michaelsen r262647 : #i94949# renamed ::sw::bookmark::SimpleMark to NavigatorReminder to fit the IDocumentMarkAccess enum 2008-10-24 15:10:10 +0200 b_michaelsen r262646 : #i94949# only 'real' bookmark implement IBookmark, Marks also get removed from m_vFieldmarks on delete/clear 2008-10-24 13:06:23 +0200 b_michaelsen r262636 : #i94949# Fieldmark tabnavigation 2008-10-23 12:16:36 +0200 b_michaelsen r262619 : #i94949# Fieldmark classes and filters 2008-10-22 13:17:18 +0200 b_michaelsen r262597 : #i94949# writer import fixes 2008-10-21 11:30:38 +0200 b_michaelsen r262565 : #i94949# renamed methods containing Bookmark in the generic IMark interface 2008-10-20 14:09:02 +0200 b_michaelsen r262318 : #i94949# fixed SwDoc::CorrRel 2008-10-16 22:45:13 +0200 b_michaelsen r262273 : #i94949 simplified Before/After methods 2008-10-16 21:40:57 +0200 b_michaelsen r262271 : #i94949 renamed SimpleMark to NavigatorReminder 2008-10-16 21:15:23 +0200 b_michaelsen r262270 : #i94949 using shared_ptr only in MarkManager 2008-10-16 17:46:37 +0200 b_michaelsen r262269 : #i94949# getFieldmarkBefore and getFieldmarkAfter 2008-10-16 17:12:13 +0200 b_michaelsen r262265 : #i94949# cleanup in crbm.cxx 2008-10-16 12:49:01 +0200 b_michaelsen r262257 : #i94949# fixed usage of invalid iterator, fixed invalid cast 2008-10-15 15:34:20 +0200 b_michaelsen r262239 : #i94949# added moved files 2008-10-15 15:26:45 +0200 b_michaelsen r262237 : #i94949# initial reimplementation of Bookmarks
2009-04-21 15:40:02 +00:00
pMark = rSh.SetBookmark(
KeyCode(),
::rtl::OUString(),
::rtl::OUString(), IDocumentMarkAccess::UNO_BOOKMARK );
rSh.SwCrsrShell::MovePara(
GetfnParaCurr(), GetfnParaEnd() );
bSetCrsr = false;
2000-09-18 16:15:01 +00:00
}
}
2000-11-13 07:32:00 +00:00
if( !pSelection )
2000-09-18 16:15:01 +00:00
{
sal_Bool bNext = xResultSet->next();
2000-09-18 16:15:01 +00:00
if(!bNext)
break;
}
2000-11-13 07:32:00 +00:00
else if( i+1 >= rSelection.getLength() )
2000-09-18 16:15:01 +00:00
break;
if( aRbAsField.IsChecked() )
rSh.Insert( aNxtDBFld );
if( !rSh.IsSttPara() )
rSh.SwEditShell::SplitNode();
if( 10 == i )
pWait = ::std::auto_ptr<SwWait>(new SwWait( *pView->GetDocShell(), sal_True ));
2000-09-18 16:15:01 +00:00
}
CWS-TOOLING: integrate CWS swrefactormarks2 2009-04-09 12:51:41 +0200 b_michaelsen r270689 : #i94949# cleaned up assertions after rebasing 2009-04-08 17:37:08 +0200 b_michaelsen r270658 : fixing sw/source/ui/utlui/makefile.mk 2009-04-07 17:56:54 +0200 b_michaelsen r270606 : added bookctrl.cxx to EXCEPTIONFILES, because this is needed for stl on unxsols4 2009-04-07 17:05:20 +0200 b_michaelsen r270603 : added crbm.cxx to EXCEPTIONFILES, because this is needed for stl on unxsols4 2009-04-02 23:44:38 +0200 b_michaelsen r270436 : CWS-TOOLING: rebase CWS swrefactormarks2 to trunk@270033 (milestone: DEV300:m45) 2009-02-27 16:25:31 +0100 b_michaelsen r268606 : #i94949# fixed Windows buildbreaker 2009-02-25 18:01:13 +0100 b_michaelsen r268464 : #i94949# Bookmarktest document filter roundtrips 2009-02-24 18:23:55 +0100 b_michaelsen r268404 : #i94949# Bookmark unittests 2009-02-23 19:47:44 +0100 b_michaelsen r268370 : #i94949# added unittest for bookmarks 2009-02-23 12:22:07 +0100 b_michaelsen r268348 : #i94949# fixing CheckCrossReferences testcase 2009-02-20 18:12:50 +0100 b_michaelsen r268335 : #i94949# fixing SwXTextRange 2009-02-18 18:32:57 +0100 b_michaelsen r268252 : #i94949# deregistering DdeBookmarks on delete 2009-02-18 18:29:08 +0100 b_michaelsen r268251 : fixing dbgoutsw.cxx for debug builds 2009-02-16 18:42:43 +0100 b_michaelsen r267834 : CWS-TOOLING: rebase CWS swrefactormarks2 to trunk@267171 (milestone: DEV300:m41) 2009-02-12 15:32:02 +0100 b_michaelsen r267667 : #i94949 fixed crossrefbookmark naming 2009-02-11 18:30:08 +0100 b_michaelsen r267624 : #94949# fixing bookmark navigation 2009-02-11 13:55:26 +0100 b_michaelsen r267599 : #i94949# fixed bookmark naming 2009-02-10 17:53:05 +0100 b_michaelsen r267571 : #i94949# renamed HasOtherMarkPos to IsExpanded 2009-02-10 17:23:01 +0100 b_michaelsen r267564 : #i94949# renamed ::sw::bookmark namespace to more fitting ::sw::mark 2009-02-10 16:16:32 +0100 b_michaelsen r267553 : #i94949# creating only CrossRefBookmark per Txtnode 2009-02-10 12:14:05 +0100 b_michaelsen r267547 : #i94949# fixed bookmark count in navigator 2009-02-09 19:12:18 +0100 b_michaelsen r267532 : #i94949# lcl_CopyBookmarks(..) - handle marks on boundaries correctly 2009-02-09 17:32:45 +0100 b_michaelsen r267524 : #i94949# setting the refobject of the DdeBookmark in Sin SwServerObject::SetDdeBookmark(..) 2009-02-09 17:22:15 +0100 b_michaelsen r267523 : #i94949# trying to harden SwServerObject 2009-02-09 16:47:32 +0100 b_michaelsen r267521 : #i94949# lcl_CopyBookmarks(..): try to get the source mark name, if possible 2009-02-09 16:05:42 +0100 b_michaelsen r267519 : #i94949# clearing the OtherMarkPos if PaM has no mark in repositionMark(..), swapping inverted bookmarks without hissing an assertion 2009-02-09 15:55:38 +0100 b_michaelsen r267518 : #i94949# checking for out-of-bounds in SwView::ExecuteStatusLine(..) 2009-02-09 15:23:47 +0100 b_michaelsen r267517 : #i94949# using an UNO_BOOKMARK in ui/dbui/dbinsdlg.cxx 2009-02-09 14:14:47 +0100 b_michaelsen r267514 : #i94949# IDocumentMarkAccess::GetType(..) asserts on unknown type 2009-02-09 14:04:25 +0100 b_michaelsen r267513 : #i94949# using rtl strings instead of tools-strings in CrossRefBookmarks 2009-02-09 13:55:01 +0100 b_michaelsen r267510 : #i94949# using empty string for UnoMark construction 2009-02-09 13:46:46 +0100 b_michaelsen r267509 : #i94949# removed superfluous #includes, removed superfluous member DdeBookmark::bGenerateName, initialized DdeBookmark::m_aRefObj removed superfluous local _FindItem::ClearObj 2009-02-06 14:38:37 +0100 b_michaelsen r267462 : #i94949# fixing FN_STAT_BOOKMARK dispatches 2009-02-05 18:05:07 +0100 b_michaelsen r267436 : #i94949# removing superfluous #includes 2009-02-04 15:51:31 +0100 b_michaelsen r267391 : fixing resync merge error 2009-02-02 19:39:55 +0100 b_michaelsen r267294 : #i94949# bookmark performance 2009-01-30 19:30:51 +0100 b_michaelsen r267229 : #i94949# throwing IllegalArgumentException, if appropriate 2009-01-30 19:29:56 +0100 b_michaelsen r267228 : #i94949# refactored lcl_FillBookmarkArray, comments, constness 2009-01-30 19:23:49 +0100 b_michaelsen r267227 : #i94949# refactored lcl_FillBookmarkArray, comments, constness 2009-01-30 19:16:06 +0100 b_michaelsen r267226 : #i94949# refactored lcl_FillBookmarkArray 2009-01-30 17:59:27 +0100 b_michaelsen r267222 : #i94949# removed superficial #include 2009-01-30 17:50:02 +0100 b_michaelsen r267220 : #i94949# SwXTextRange remembers its UNO bookmark 2009-01-29 20:19:58 +0100 b_michaelsen r267168 : #i94949# implemented IDocumentMarkAccess::findBookmark 2009-01-29 17:22:17 +0100 b_michaelsen r267162 : #i94949# implemented renameMark in Markmanager 2009-01-29 14:17:10 +0100 b_michaelsen r267134 : #i94949# cleanup in SwXBookmark, whitespace 2009-01-29 13:21:54 +0100 b_michaelsen r267125 : #i94949# cleanup in SwXBookmark, whitespace 2009-01-29 13:06:10 +0100 b_michaelsen r267120 : #i94949# cleanup in SwXBookmark, whitespace 2009-01-29 13:00:09 +0100 b_michaelsen r267118 : #i94949# cleanup in SwXBookmark, whitespace 2009-01-29 10:35:10 +0100 b_michaelsen r267101 : #i94949# renamed SetCrsrToBkmk to SetCrsrToMark, moving to start/end of doc if no more bookmarks can be found 2009-01-28 17:05:36 +0100 b_michaelsen r267070 : #i94949# fixed order in aProvNamesId in unocoll.cxx 2009-01-28 15:46:13 +0100 b_michaelsen r267063 : #i94949# documentation 2009-01-28 15:36:59 +0100 b_michaelsen r267062 : #i94949# removing superficial #include 2009-01-28 15:30:36 +0100 b_michaelsen r267061 : #i94949# basic code conventions 2009-01-28 11:14:30 +0100 b_michaelsen r267039 : #i94949# comparing to the actual name of the new mark 2009-01-26 15:22:25 +0100 b_michaelsen r266927 : #i94949# performance fixes 2009-01-14 21:16:56 +0100 b_michaelsen r266332 : #i94949# fixing linux x86-64 compiler warnings 2009-01-14 19:52:06 +0100 b_michaelsen r266331 : #i94949# fixing some compiler warnings 2008-12-15 13:04:49 +0100 b_michaelsen r265474 : #i94949# fixed microsoft compiler warnings 2008-12-12 18:26:02 +0100 b_michaelsen r265434 : #i94949# fixed pro platform buildbreakers 2008-12-11 17:51:24 +0100 b_michaelsen r265342 : CWS-TOOLING: rebase CWS swrefactormarks2 to trunk@264807 (milestone: DEV300:m37) 2008-12-09 18:30:59 +0100 b_michaelsen r265134 : #i94949# fixed IDocumentMarkAccess::GetType for new mark inheritance tree 2008-12-09 16:56:26 +0100 b_michaelsen r265118 : #i94949# fixed deleteMark optimization 2008-12-09 14:55:58 +0100 b_michaelsen r265092 : #i94949# DdeLink and DdeBookmark 2008-12-05 18:28:05 +0100 b_michaelsen r264914 : #i94949# fixed InitDoc in bookmarks 2008-12-02 02:23:51 +0100 b_michaelsen r264649 : #i94949# removed obsolete naming proposal code in SwXTextRange, fixed navigator reminders to forget the oldest reminder when the pool is empty 2008-12-02 02:05:19 +0100 b_michaelsen r264648 : #i94949# using bisect search for delete 2008-12-02 01:58:16 +0100 b_michaelsen r264647 : #i94949# using bisect search for delete 2008-12-02 01:37:33 +0100 b_michaelsen r264646 : #i94949# using bisect search for delete 2008-12-02 01:03:29 +0100 b_michaelsen r264645 : #i94949# fixed deleteMark crash 2008-12-01 20:55:00 +0100 b_michaelsen r264638 : #i94949# removed crossrefs from ui enumerations 2008-12-01 15:48:12 +0100 b_michaelsen r264613 : #i94949# removed superfluous local functions 2008-12-01 15:01:19 +0100 b_michaelsen r264608 : #i94949# optimized insertion of new marks 2008-12-01 14:33:21 +0100 b_michaelsen r264603 : #i94949# simplified code finding Fieldmark for a position 2008-12-01 14:05:55 +0100 b_michaelsen r264598 : #i94949# fixed reverse travelling through marks, removed obsolete getUniqueMarkName() 2008-11-27 18:48:15 +0100 b_michaelsen r264515 : #i94949# fixed _SaveCntntIdx and friends 2008-11-27 15:59:49 +0100 b_michaelsen r264500 : #i94949# fix Mark position only in ctor 2008-11-27 15:52:28 +0100 b_michaelsen r264497 : #i94949# fixed Bug in SwXBookmark, was using pDoc too early 2008-11-26 14:54:22 +0100 b_michaelsen r264396 : #i94949# fixed documentation, simplified navigator reminder code 2008-11-24 20:45:51 +0100 b_michaelsen r264266 : #i94949# removed last obsolete getUniqueMarkName calls 2008-11-24 20:21:35 +0100 b_michaelsen r264265 : #i94949# fixed typo in IDocumentMarkAccess, removed obsolete getUniqueMarkName calls 2008-11-24 18:34:32 +0100 b_michaelsen r264264 : #i94949# repositioning of Marks, removed possibility to delete marks by name in the core, refactoring of navigator reminder generation 2008-11-21 14:08:49 +0100 b_michaelsen r264137 : #i94949# simplified makeMark 2008-11-21 12:07:09 +0100 b_michaelsen r264120 : #i94949# moved ShortName and KeyCode from IMark to IBookmark 2008-11-19 12:50:49 +0100 b_michaelsen r263981 : #i94949# starting refactoring of bookmark naming 2008-11-19 11:31:08 +0100 b_michaelsen r263972 : #i94949# getting rid of obsolete dynamic casts 2008-11-18 19:06:09 +0100 b_michaelsen r263795 : #i94949# getting rid of index based mark access, IDocumentMarkAccess already provides iterators 2008-11-18 17:50:18 +0100 b_michaelsen r263792 : #i94949# getting rid of index based mark access, IDocumentMarkAccess already provides iterators 2008-11-18 16:48:20 +0100 b_michaelsen r263783 : #i94949# removed methods from crsrsh which are already available directly via IDocumentMarkAccess 2008-11-18 11:31:35 +0100 b_michaelsen r263753 : #i94949# cleaning up mark code in crsrsh 2008-11-17 10:15:25 +0100 b_michaelsen r263705 : #i94949# removed possible integer overflow 2008-11-14 18:48:45 +0100 b_michaelsen r263695 : #i94949# management of mark names in MarkManager 2008-11-14 18:23:40 +0100 b_michaelsen r263693 : #i94949# using polymorphism to do mark-specific setup in SwDoc 2008-11-14 16:27:09 +0100 b_michaelsen r263684 : #i94949# got rid of makeCrossRefBookmark 2008-11-14 13:03:32 +0100 b_michaelsen r263674 : #i94949# refactored Correction methods 2008-11-13 12:27:55 +0100 b_michaelsen r263631 : #i94949# got rid of old-style tools assertions in new code 2008-11-12 16:58:16 +0100 b_michaelsen r263608 : #i94949# added assertion for unique names 2008-11-12 16:55:18 +0100 b_michaelsen r263607 : #i94949# maked XFormField deprecated 2008-11-12 13:04:29 +0100 b_michaelsen r263587 : #i94949# replaced IDocumentMarkAccess::GetType with simple dynamic_cast where possible 2008-11-11 18:45:53 +0100 b_michaelsen r263572 : #i94949# cleaned up SwHstryBookmark 2008-11-11 13:48:18 +0100 b_michaelsen r263557 : #i94949# removed dynamic_casts to SwModify by inheriting IMark from it 2008-11-11 11:26:28 +0100 b_michaelsen r263548 : #i94949# fixed SwXBookmark 2008-11-10 17:01:19 +0100 b_michaelsen r263529 : #i94949# fixed DdeBookmarks in clipboard 2008-11-10 16:44:52 +0100 b_michaelsen r263527 : #i94949# formatting 2008-11-10 16:29:16 +0100 b_michaelsen r263526 : #i94949# fixing unoobj.cxx 2008-11-10 16:23:50 +0100 b_michaelsen r263525 : #i94949# cleaning up crossrefbookmark.cxx/.hxx 2008-11-10 16:02:08 +0100 b_michaelsen r263524 : #i94949# Pdf Export should only generate 'real' bookmarks 2008-11-10 15:33:58 +0100 b_michaelsen r263521 : #i94949# removed const_casts 2008-11-10 15:12:06 +0100 b_michaelsen r263520 : #i94949# moved _DelBookmarks into MarksManager 2008-11-07 18:48:38 +0100 b_michaelsen r263480 : #i94949# using iterator interface 2008-11-07 18:41:46 +0100 b_michaelsen r263478 : #i94949# using iterator interface 2008-11-07 18:07:41 +0100 b_michaelsen r263477 : #i94949# using iterator interface 2008-11-07 17:54:41 +0100 b_michaelsen r263476 : #i94949# using iterator interface 2008-11-07 17:44:41 +0100 b_michaelsen r263475 : #i94949# moved correction methods into MarkManager 2008-11-06 18:47:28 +0100 b_michaelsen r263404 : #i94949# getting rid of superfluous const_casts 2008-11-06 17:58:01 +0100 b_michaelsen r263403 : #i94949# no more setting of mark positions outside of the core 2008-11-06 17:08:37 +0100 b_michaelsen r263401 : #i94949# removed setters from IMark 2008-11-06 13:55:25 +0100 b_michaelsen r263383 : #i94949 SwDoc does not implement IDocumentMarkAccess anymore 2008-11-04 18:17:03 +0100 b_michaelsen r263333 : #i94949# began removing IDocumentMarkAccess from SwDoc 2008-11-04 16:48:34 +0100 b_michaelsen r263330 : removing dead code (SwBitArray) found by mst 2008-11-04 16:29:32 +0100 b_michaelsen r263329 : removing dead code (SwBitArray) found by mst 2008-11-04 14:57:48 +0100 b_michaelsen r263326 : removing dead code (SwBitArray) found by mst 2008-11-04 14:50:18 +0100 b_michaelsen r263325 : #i94949# stricter typing in IDocumentMarkAccess 2008-10-24 15:16:27 +0200 b_michaelsen r262647 : #i94949# renamed ::sw::bookmark::SimpleMark to NavigatorReminder to fit the IDocumentMarkAccess enum 2008-10-24 15:10:10 +0200 b_michaelsen r262646 : #i94949# only 'real' bookmark implement IBookmark, Marks also get removed from m_vFieldmarks on delete/clear 2008-10-24 13:06:23 +0200 b_michaelsen r262636 : #i94949# Fieldmark tabnavigation 2008-10-23 12:16:36 +0200 b_michaelsen r262619 : #i94949# Fieldmark classes and filters 2008-10-22 13:17:18 +0200 b_michaelsen r262597 : #i94949# writer import fixes 2008-10-21 11:30:38 +0200 b_michaelsen r262565 : #i94949# renamed methods containing Bookmark in the generic IMark interface 2008-10-20 14:09:02 +0200 b_michaelsen r262318 : #i94949# fixed SwDoc::CorrRel 2008-10-16 22:45:13 +0200 b_michaelsen r262273 : #i94949 simplified Before/After methods 2008-10-16 21:40:57 +0200 b_michaelsen r262271 : #i94949 renamed SimpleMark to NavigatorReminder 2008-10-16 21:15:23 +0200 b_michaelsen r262270 : #i94949 using shared_ptr only in MarkManager 2008-10-16 17:46:37 +0200 b_michaelsen r262269 : #i94949# getFieldmarkBefore and getFieldmarkAfter 2008-10-16 17:12:13 +0200 b_michaelsen r262265 : #i94949# cleanup in crbm.cxx 2008-10-16 12:49:01 +0200 b_michaelsen r262257 : #i94949# fixed usage of invalid iterator, fixed invalid cast 2008-10-15 15:34:20 +0200 b_michaelsen r262239 : #i94949# added moved files 2008-10-15 15:26:45 +0200 b_michaelsen r262237 : #i94949# initial reimplementation of Bookmarks
2009-04-21 15:40:02 +00:00
if( !bSetCrsr && pMark != NULL)
2000-09-18 16:15:01 +00:00
{
rSh.SetMark();
CWS-TOOLING: integrate CWS swrefactormarks2 2009-04-09 12:51:41 +0200 b_michaelsen r270689 : #i94949# cleaned up assertions after rebasing 2009-04-08 17:37:08 +0200 b_michaelsen r270658 : fixing sw/source/ui/utlui/makefile.mk 2009-04-07 17:56:54 +0200 b_michaelsen r270606 : added bookctrl.cxx to EXCEPTIONFILES, because this is needed for stl on unxsols4 2009-04-07 17:05:20 +0200 b_michaelsen r270603 : added crbm.cxx to EXCEPTIONFILES, because this is needed for stl on unxsols4 2009-04-02 23:44:38 +0200 b_michaelsen r270436 : CWS-TOOLING: rebase CWS swrefactormarks2 to trunk@270033 (milestone: DEV300:m45) 2009-02-27 16:25:31 +0100 b_michaelsen r268606 : #i94949# fixed Windows buildbreaker 2009-02-25 18:01:13 +0100 b_michaelsen r268464 : #i94949# Bookmarktest document filter roundtrips 2009-02-24 18:23:55 +0100 b_michaelsen r268404 : #i94949# Bookmark unittests 2009-02-23 19:47:44 +0100 b_michaelsen r268370 : #i94949# added unittest for bookmarks 2009-02-23 12:22:07 +0100 b_michaelsen r268348 : #i94949# fixing CheckCrossReferences testcase 2009-02-20 18:12:50 +0100 b_michaelsen r268335 : #i94949# fixing SwXTextRange 2009-02-18 18:32:57 +0100 b_michaelsen r268252 : #i94949# deregistering DdeBookmarks on delete 2009-02-18 18:29:08 +0100 b_michaelsen r268251 : fixing dbgoutsw.cxx for debug builds 2009-02-16 18:42:43 +0100 b_michaelsen r267834 : CWS-TOOLING: rebase CWS swrefactormarks2 to trunk@267171 (milestone: DEV300:m41) 2009-02-12 15:32:02 +0100 b_michaelsen r267667 : #i94949 fixed crossrefbookmark naming 2009-02-11 18:30:08 +0100 b_michaelsen r267624 : #94949# fixing bookmark navigation 2009-02-11 13:55:26 +0100 b_michaelsen r267599 : #i94949# fixed bookmark naming 2009-02-10 17:53:05 +0100 b_michaelsen r267571 : #i94949# renamed HasOtherMarkPos to IsExpanded 2009-02-10 17:23:01 +0100 b_michaelsen r267564 : #i94949# renamed ::sw::bookmark namespace to more fitting ::sw::mark 2009-02-10 16:16:32 +0100 b_michaelsen r267553 : #i94949# creating only CrossRefBookmark per Txtnode 2009-02-10 12:14:05 +0100 b_michaelsen r267547 : #i94949# fixed bookmark count in navigator 2009-02-09 19:12:18 +0100 b_michaelsen r267532 : #i94949# lcl_CopyBookmarks(..) - handle marks on boundaries correctly 2009-02-09 17:32:45 +0100 b_michaelsen r267524 : #i94949# setting the refobject of the DdeBookmark in Sin SwServerObject::SetDdeBookmark(..) 2009-02-09 17:22:15 +0100 b_michaelsen r267523 : #i94949# trying to harden SwServerObject 2009-02-09 16:47:32 +0100 b_michaelsen r267521 : #i94949# lcl_CopyBookmarks(..): try to get the source mark name, if possible 2009-02-09 16:05:42 +0100 b_michaelsen r267519 : #i94949# clearing the OtherMarkPos if PaM has no mark in repositionMark(..), swapping inverted bookmarks without hissing an assertion 2009-02-09 15:55:38 +0100 b_michaelsen r267518 : #i94949# checking for out-of-bounds in SwView::ExecuteStatusLine(..) 2009-02-09 15:23:47 +0100 b_michaelsen r267517 : #i94949# using an UNO_BOOKMARK in ui/dbui/dbinsdlg.cxx 2009-02-09 14:14:47 +0100 b_michaelsen r267514 : #i94949# IDocumentMarkAccess::GetType(..) asserts on unknown type 2009-02-09 14:04:25 +0100 b_michaelsen r267513 : #i94949# using rtl strings instead of tools-strings in CrossRefBookmarks 2009-02-09 13:55:01 +0100 b_michaelsen r267510 : #i94949# using empty string for UnoMark construction 2009-02-09 13:46:46 +0100 b_michaelsen r267509 : #i94949# removed superfluous #includes, removed superfluous member DdeBookmark::bGenerateName, initialized DdeBookmark::m_aRefObj removed superfluous local _FindItem::ClearObj 2009-02-06 14:38:37 +0100 b_michaelsen r267462 : #i94949# fixing FN_STAT_BOOKMARK dispatches 2009-02-05 18:05:07 +0100 b_michaelsen r267436 : #i94949# removing superfluous #includes 2009-02-04 15:51:31 +0100 b_michaelsen r267391 : fixing resync merge error 2009-02-02 19:39:55 +0100 b_michaelsen r267294 : #i94949# bookmark performance 2009-01-30 19:30:51 +0100 b_michaelsen r267229 : #i94949# throwing IllegalArgumentException, if appropriate 2009-01-30 19:29:56 +0100 b_michaelsen r267228 : #i94949# refactored lcl_FillBookmarkArray, comments, constness 2009-01-30 19:23:49 +0100 b_michaelsen r267227 : #i94949# refactored lcl_FillBookmarkArray, comments, constness 2009-01-30 19:16:06 +0100 b_michaelsen r267226 : #i94949# refactored lcl_FillBookmarkArray 2009-01-30 17:59:27 +0100 b_michaelsen r267222 : #i94949# removed superficial #include 2009-01-30 17:50:02 +0100 b_michaelsen r267220 : #i94949# SwXTextRange remembers its UNO bookmark 2009-01-29 20:19:58 +0100 b_michaelsen r267168 : #i94949# implemented IDocumentMarkAccess::findBookmark 2009-01-29 17:22:17 +0100 b_michaelsen r267162 : #i94949# implemented renameMark in Markmanager 2009-01-29 14:17:10 +0100 b_michaelsen r267134 : #i94949# cleanup in SwXBookmark, whitespace 2009-01-29 13:21:54 +0100 b_michaelsen r267125 : #i94949# cleanup in SwXBookmark, whitespace 2009-01-29 13:06:10 +0100 b_michaelsen r267120 : #i94949# cleanup in SwXBookmark, whitespace 2009-01-29 13:00:09 +0100 b_michaelsen r267118 : #i94949# cleanup in SwXBookmark, whitespace 2009-01-29 10:35:10 +0100 b_michaelsen r267101 : #i94949# renamed SetCrsrToBkmk to SetCrsrToMark, moving to start/end of doc if no more bookmarks can be found 2009-01-28 17:05:36 +0100 b_michaelsen r267070 : #i94949# fixed order in aProvNamesId in unocoll.cxx 2009-01-28 15:46:13 +0100 b_michaelsen r267063 : #i94949# documentation 2009-01-28 15:36:59 +0100 b_michaelsen r267062 : #i94949# removing superficial #include 2009-01-28 15:30:36 +0100 b_michaelsen r267061 : #i94949# basic code conventions 2009-01-28 11:14:30 +0100 b_michaelsen r267039 : #i94949# comparing to the actual name of the new mark 2009-01-26 15:22:25 +0100 b_michaelsen r266927 : #i94949# performance fixes 2009-01-14 21:16:56 +0100 b_michaelsen r266332 : #i94949# fixing linux x86-64 compiler warnings 2009-01-14 19:52:06 +0100 b_michaelsen r266331 : #i94949# fixing some compiler warnings 2008-12-15 13:04:49 +0100 b_michaelsen r265474 : #i94949# fixed microsoft compiler warnings 2008-12-12 18:26:02 +0100 b_michaelsen r265434 : #i94949# fixed pro platform buildbreakers 2008-12-11 17:51:24 +0100 b_michaelsen r265342 : CWS-TOOLING: rebase CWS swrefactormarks2 to trunk@264807 (milestone: DEV300:m37) 2008-12-09 18:30:59 +0100 b_michaelsen r265134 : #i94949# fixed IDocumentMarkAccess::GetType for new mark inheritance tree 2008-12-09 16:56:26 +0100 b_michaelsen r265118 : #i94949# fixed deleteMark optimization 2008-12-09 14:55:58 +0100 b_michaelsen r265092 : #i94949# DdeLink and DdeBookmark 2008-12-05 18:28:05 +0100 b_michaelsen r264914 : #i94949# fixed InitDoc in bookmarks 2008-12-02 02:23:51 +0100 b_michaelsen r264649 : #i94949# removed obsolete naming proposal code in SwXTextRange, fixed navigator reminders to forget the oldest reminder when the pool is empty 2008-12-02 02:05:19 +0100 b_michaelsen r264648 : #i94949# using bisect search for delete 2008-12-02 01:58:16 +0100 b_michaelsen r264647 : #i94949# using bisect search for delete 2008-12-02 01:37:33 +0100 b_michaelsen r264646 : #i94949# using bisect search for delete 2008-12-02 01:03:29 +0100 b_michaelsen r264645 : #i94949# fixed deleteMark crash 2008-12-01 20:55:00 +0100 b_michaelsen r264638 : #i94949# removed crossrefs from ui enumerations 2008-12-01 15:48:12 +0100 b_michaelsen r264613 : #i94949# removed superfluous local functions 2008-12-01 15:01:19 +0100 b_michaelsen r264608 : #i94949# optimized insertion of new marks 2008-12-01 14:33:21 +0100 b_michaelsen r264603 : #i94949# simplified code finding Fieldmark for a position 2008-12-01 14:05:55 +0100 b_michaelsen r264598 : #i94949# fixed reverse travelling through marks, removed obsolete getUniqueMarkName() 2008-11-27 18:48:15 +0100 b_michaelsen r264515 : #i94949# fixed _SaveCntntIdx and friends 2008-11-27 15:59:49 +0100 b_michaelsen r264500 : #i94949# fix Mark position only in ctor 2008-11-27 15:52:28 +0100 b_michaelsen r264497 : #i94949# fixed Bug in SwXBookmark, was using pDoc too early 2008-11-26 14:54:22 +0100 b_michaelsen r264396 : #i94949# fixed documentation, simplified navigator reminder code 2008-11-24 20:45:51 +0100 b_michaelsen r264266 : #i94949# removed last obsolete getUniqueMarkName calls 2008-11-24 20:21:35 +0100 b_michaelsen r264265 : #i94949# fixed typo in IDocumentMarkAccess, removed obsolete getUniqueMarkName calls 2008-11-24 18:34:32 +0100 b_michaelsen r264264 : #i94949# repositioning of Marks, removed possibility to delete marks by name in the core, refactoring of navigator reminder generation 2008-11-21 14:08:49 +0100 b_michaelsen r264137 : #i94949# simplified makeMark 2008-11-21 12:07:09 +0100 b_michaelsen r264120 : #i94949# moved ShortName and KeyCode from IMark to IBookmark 2008-11-19 12:50:49 +0100 b_michaelsen r263981 : #i94949# starting refactoring of bookmark naming 2008-11-19 11:31:08 +0100 b_michaelsen r263972 : #i94949# getting rid of obsolete dynamic casts 2008-11-18 19:06:09 +0100 b_michaelsen r263795 : #i94949# getting rid of index based mark access, IDocumentMarkAccess already provides iterators 2008-11-18 17:50:18 +0100 b_michaelsen r263792 : #i94949# getting rid of index based mark access, IDocumentMarkAccess already provides iterators 2008-11-18 16:48:20 +0100 b_michaelsen r263783 : #i94949# removed methods from crsrsh which are already available directly via IDocumentMarkAccess 2008-11-18 11:31:35 +0100 b_michaelsen r263753 : #i94949# cleaning up mark code in crsrsh 2008-11-17 10:15:25 +0100 b_michaelsen r263705 : #i94949# removed possible integer overflow 2008-11-14 18:48:45 +0100 b_michaelsen r263695 : #i94949# management of mark names in MarkManager 2008-11-14 18:23:40 +0100 b_michaelsen r263693 : #i94949# using polymorphism to do mark-specific setup in SwDoc 2008-11-14 16:27:09 +0100 b_michaelsen r263684 : #i94949# got rid of makeCrossRefBookmark 2008-11-14 13:03:32 +0100 b_michaelsen r263674 : #i94949# refactored Correction methods 2008-11-13 12:27:55 +0100 b_michaelsen r263631 : #i94949# got rid of old-style tools assertions in new code 2008-11-12 16:58:16 +0100 b_michaelsen r263608 : #i94949# added assertion for unique names 2008-11-12 16:55:18 +0100 b_michaelsen r263607 : #i94949# maked XFormField deprecated 2008-11-12 13:04:29 +0100 b_michaelsen r263587 : #i94949# replaced IDocumentMarkAccess::GetType with simple dynamic_cast where possible 2008-11-11 18:45:53 +0100 b_michaelsen r263572 : #i94949# cleaned up SwHstryBookmark 2008-11-11 13:48:18 +0100 b_michaelsen r263557 : #i94949# removed dynamic_casts to SwModify by inheriting IMark from it 2008-11-11 11:26:28 +0100 b_michaelsen r263548 : #i94949# fixed SwXBookmark 2008-11-10 17:01:19 +0100 b_michaelsen r263529 : #i94949# fixed DdeBookmarks in clipboard 2008-11-10 16:44:52 +0100 b_michaelsen r263527 : #i94949# formatting 2008-11-10 16:29:16 +0100 b_michaelsen r263526 : #i94949# fixing unoobj.cxx 2008-11-10 16:23:50 +0100 b_michaelsen r263525 : #i94949# cleaning up crossrefbookmark.cxx/.hxx 2008-11-10 16:02:08 +0100 b_michaelsen r263524 : #i94949# Pdf Export should only generate 'real' bookmarks 2008-11-10 15:33:58 +0100 b_michaelsen r263521 : #i94949# removed const_casts 2008-11-10 15:12:06 +0100 b_michaelsen r263520 : #i94949# moved _DelBookmarks into MarksManager 2008-11-07 18:48:38 +0100 b_michaelsen r263480 : #i94949# using iterator interface 2008-11-07 18:41:46 +0100 b_michaelsen r263478 : #i94949# using iterator interface 2008-11-07 18:07:41 +0100 b_michaelsen r263477 : #i94949# using iterator interface 2008-11-07 17:54:41 +0100 b_michaelsen r263476 : #i94949# using iterator interface 2008-11-07 17:44:41 +0100 b_michaelsen r263475 : #i94949# moved correction methods into MarkManager 2008-11-06 18:47:28 +0100 b_michaelsen r263404 : #i94949# getting rid of superfluous const_casts 2008-11-06 17:58:01 +0100 b_michaelsen r263403 : #i94949# no more setting of mark positions outside of the core 2008-11-06 17:08:37 +0100 b_michaelsen r263401 : #i94949# removed setters from IMark 2008-11-06 13:55:25 +0100 b_michaelsen r263383 : #i94949 SwDoc does not implement IDocumentMarkAccess anymore 2008-11-04 18:17:03 +0100 b_michaelsen r263333 : #i94949# began removing IDocumentMarkAccess from SwDoc 2008-11-04 16:48:34 +0100 b_michaelsen r263330 : removing dead code (SwBitArray) found by mst 2008-11-04 16:29:32 +0100 b_michaelsen r263329 : removing dead code (SwBitArray) found by mst 2008-11-04 14:57:48 +0100 b_michaelsen r263326 : removing dead code (SwBitArray) found by mst 2008-11-04 14:50:18 +0100 b_michaelsen r263325 : #i94949# stricter typing in IDocumentMarkAccess 2008-10-24 15:16:27 +0200 b_michaelsen r262647 : #i94949# renamed ::sw::bookmark::SimpleMark to NavigatorReminder to fit the IDocumentMarkAccess enum 2008-10-24 15:10:10 +0200 b_michaelsen r262646 : #i94949# only 'real' bookmark implement IBookmark, Marks also get removed from m_vFieldmarks on delete/clear 2008-10-24 13:06:23 +0200 b_michaelsen r262636 : #i94949# Fieldmark tabnavigation 2008-10-23 12:16:36 +0200 b_michaelsen r262619 : #i94949# Fieldmark classes and filters 2008-10-22 13:17:18 +0200 b_michaelsen r262597 : #i94949# writer import fixes 2008-10-21 11:30:38 +0200 b_michaelsen r262565 : #i94949# renamed methods containing Bookmark in the generic IMark interface 2008-10-20 14:09:02 +0200 b_michaelsen r262318 : #i94949# fixed SwDoc::CorrRel 2008-10-16 22:45:13 +0200 b_michaelsen r262273 : #i94949 simplified Before/After methods 2008-10-16 21:40:57 +0200 b_michaelsen r262271 : #i94949 renamed SimpleMark to NavigatorReminder 2008-10-16 21:15:23 +0200 b_michaelsen r262270 : #i94949 using shared_ptr only in MarkManager 2008-10-16 17:46:37 +0200 b_michaelsen r262269 : #i94949# getFieldmarkBefore and getFieldmarkAfter 2008-10-16 17:12:13 +0200 b_michaelsen r262265 : #i94949# cleanup in crbm.cxx 2008-10-16 12:49:01 +0200 b_michaelsen r262257 : #i94949# fixed usage of invalid iterator, fixed invalid cast 2008-10-15 15:34:20 +0200 b_michaelsen r262239 : #i94949# added moved files 2008-10-15 15:26:45 +0200 b_michaelsen r262237 : #i94949# initial reimplementation of Bookmarks
2009-04-21 15:40:02 +00:00
rSh.GotoMark( pMark );
rSh.getIDocumentMarkAccess()->deleteMark( pMark );
break;
2000-09-18 16:15:01 +00:00
}
}
}
2000-12-08 09:19:55 +00:00
// write configuration
Commit();
}while( false ); // middle checked loop
2000-09-18 16:15:01 +00:00
if( bUndo )
{
rSh.DoUndo( sal_True );
rSh.AppendUndoForInsertFromDB( bAsTable );
rSh.EndUndo( UNDO_EMPTY );
}
rSh.ClearMark();
2000-09-18 16:15:01 +00:00
rSh.EndAllAction();
2001-10-16 10:10:55 +00:00
if ( bDisposeResultSet )
::comphelper::disposeComponent(xResultSet);
2000-09-18 16:15:01 +00:00
}
2010-10-11 17:38:56 -05:00
2000-09-18 16:15:01 +00:00
void SwInsertDBColAutoPilot::SetTabSet()
{
SwWrtShell& rSh = pView->GetWrtShell();
const SfxPoolItem* pItem;
if( pTAutoFmt )
{
if( pTAutoFmt->IsFrame() )
{
// border is from AutoFormat
2000-09-18 16:15:01 +00:00
pTblSet->ClearItem( RES_BOX );
pTblSet->ClearItem( SID_ATTR_BORDER_INNER );
}
if( pTAutoFmt->IsBackground() )
{
pTblSet->ClearItem( RES_BACKGROUND );
pTblSet->ClearItem( SID_ATTR_BRUSH_ROW );
pTblSet->ClearItem( SID_ATTR_BRUSH_TABLE );
}
}
else
{
// remove the defaults again, it makes no sense to set them
2000-09-18 16:15:01 +00:00
SvxBrushItem aBrush( RES_BACKGROUND );
Merge commit 'ooo/DEV300_m101' into integration/dev300_m101 Conflicts: starmath/inc/applicat.hxx starmath/inc/dialog.hxx starmath/inc/document.hxx starmath/inc/edit.hxx starmath/inc/format.hxx starmath/inc/node.hxx starmath/inc/parse.hxx starmath/inc/rect.hxx starmath/inc/smdll.hxx starmath/inc/smmod.hxx starmath/inc/starmath.hrc starmath/inc/symbol.hxx starmath/inc/toolbox.hxx starmath/inc/utility.hxx starmath/inc/view.hxx starmath/prj/build.lst starmath/qa/cppunit/version.map starmath/sdi/smslots.sdi starmath/source/accessibility.cxx starmath/source/cfgitem.cxx starmath/source/cfgitem.hxx starmath/source/config.cxx starmath/source/dialog.cxx starmath/source/document.cxx starmath/source/edit.cxx starmath/source/format.cxx starmath/source/makefile.mk starmath/source/math_pch.cxx starmath/source/mathmlexport.cxx starmath/source/mathmlimport.cxx starmath/source/mathtype.cxx starmath/source/node.cxx starmath/source/parse.cxx starmath/source/rect.cxx starmath/source/register.cxx starmath/source/smdetect.cxx starmath/source/smdll.cxx starmath/source/smmod.cxx starmath/source/smres.src starmath/source/symbol.cxx starmath/source/toolbox.cxx starmath/source/unomodel.cxx starmath/source/utility.cxx starmath/source/view.cxx sw/JunitTest_sw_unoapi.mk sw/Library_swd.mk sw/Makefile sw/inc/IDocumentFieldsAccess.hxx sw/inc/IDocumentSettingAccess.hxx sw/inc/IDocumentUndoRedo.hxx sw/inc/IShellCursorSupplier.hxx sw/inc/SwUndoField.hxx sw/inc/acmplwrd.hxx sw/inc/authfld.hxx sw/inc/bparr.hxx sw/inc/calbck.hxx sw/inc/calc.hxx sw/inc/ccoll.hxx sw/inc/cellatr.hxx sw/inc/cellfml.hxx sw/inc/chpfld.hxx sw/inc/cmdid.h sw/inc/crsrsh.hxx sw/inc/crstate.hxx sw/inc/dbfld.hxx sw/inc/dbmgr.hxx sw/inc/dcontact.hxx sw/inc/ddefld.hxx sw/inc/doc.hxx sw/inc/docary.hxx sw/inc/docsh.hxx sw/inc/docstat.hxx sw/inc/docstyle.hxx sw/inc/docufld.hxx sw/inc/editsh.hxx sw/inc/errhdl.hxx sw/inc/expfld.hxx sw/inc/fchrfmt.hxx sw/inc/fesh.hxx sw/inc/fldbas.hxx sw/inc/flddat.hxx sw/inc/flddropdown.hxx sw/inc/flypos.hxx sw/inc/fmtanchr.hxx sw/inc/fmtautofmt.hxx sw/inc/fmtclds.hxx sw/inc/fmtcnct.hxx sw/inc/fmtcol.hxx sw/inc/fmtfsize.hxx sw/inc/fmtftn.hxx sw/inc/fmtftntx.hxx sw/inc/fmthdft.hxx sw/inc/fmtinfmt.hxx sw/inc/fmtline.hxx sw/inc/fmtornt.hxx sw/inc/fmtpdsc.hxx sw/inc/fmtruby.hxx sw/inc/fmtsrnd.hxx sw/inc/fmturl.hxx sw/inc/fmtwrapinfluenceonobjpos.hxx sw/inc/format.hxx sw/inc/frmatr.hxx sw/inc/frmfmt.hxx sw/inc/grfatr.hxx sw/inc/helpid.h sw/inc/hintids.hxx sw/inc/hints.hxx sw/inc/htmltbl.hxx sw/inc/inetfld.hxx sw/inc/io.hxx sw/inc/iodetect.hxx sw/inc/itabenum.hxx sw/inc/ndarr.hxx sw/inc/ndgrf.hxx sw/inc/ndindex.hxx sw/inc/ndnotxt.hxx sw/inc/ndole.hxx sw/inc/ndtxt.hxx sw/inc/ndtyp.hxx sw/inc/node.hxx sw/inc/numrule.hxx sw/inc/pagedesc.hxx sw/inc/pagepreviewlayout.hxx sw/inc/pam.hxx sw/inc/paratr.hxx sw/inc/poolfmt.awk sw/inc/poolfmt.hxx sw/inc/printdata.hxx sw/inc/reffld.hxx sw/inc/shellio.hxx sw/inc/shellres.hxx sw/inc/swabstdlg.hxx sw/inc/swatrset.hxx sw/inc/swerror.h sw/inc/swprtopt.hxx sw/inc/swtable.hxx sw/inc/swtypes.hxx sw/inc/tblafmt.hxx sw/inc/tgrditem.hxx sw/inc/tox.hxx sw/inc/undobj.hxx sw/inc/unocoll.hxx sw/inc/unoframe.hxx sw/inc/unoprnms.hxx sw/inc/usrfld.hxx sw/inc/viewopt.hxx sw/inc/viewsh.hxx sw/inc/viscrs.hxx sw/prj/build.lst sw/qa/complex/accessibility/makefile.mk sw/qa/core/Test-BigPtrArray.cxx sw/qa/core/makefile.mk sw/sdi/makefile.mk sw/source/core/access/makefile.mk sw/source/core/access/textmarkuphelper.cxx sw/source/core/attr/calbck.cxx sw/source/core/attr/cellatr.cxx sw/source/core/attr/fmtwrapinfluenceonobjpos.cxx sw/source/core/attr/format.cxx sw/source/core/attr/hints.cxx sw/source/core/bastyp/calc.cxx sw/source/core/bastyp/init.cxx sw/source/core/bastyp/makefile.mk sw/source/core/bastyp/swcache.cxx sw/source/core/crsr/bookmrk.cxx sw/source/core/crsr/callnk.cxx sw/source/core/crsr/crsrsh.cxx sw/source/core/crsr/crstrvl.cxx sw/source/core/crsr/findattr.cxx sw/source/core/crsr/findcoll.cxx sw/source/core/crsr/makefile.mk sw/source/core/crsr/pam.cxx sw/source/core/crsr/swcrsr.cxx sw/source/core/crsr/trvltbl.cxx sw/source/core/crsr/unocrsr.cxx sw/source/core/crsr/viscrs.cxx sw/source/core/doc/acmplwrd.cxx sw/source/core/doc/doc.cxx sw/source/core/doc/docbm.cxx sw/source/core/doc/doccomp.cxx sw/source/core/doc/docdesc.cxx sw/source/core/doc/docdraw.cxx sw/source/core/doc/docedt.cxx sw/source/core/doc/docfld.cxx sw/source/core/doc/docfly.cxx sw/source/core/doc/docfmt.cxx sw/source/core/doc/docftn.cxx sw/source/core/doc/docglbl.cxx sw/source/core/doc/docglos.cxx sw/source/core/doc/doclay.cxx sw/source/core/doc/docnew.cxx sw/source/core/doc/docnum.cxx sw/source/core/doc/docredln.cxx sw/source/core/doc/docruby.cxx sw/source/core/doc/docsort.cxx sw/source/core/doc/docstat.cxx sw/source/core/doc/doctxm.cxx sw/source/core/doc/fmtcol.cxx sw/source/core/doc/gctable.cxx sw/source/core/doc/htmltbl.cxx sw/source/core/doc/makefile.mk sw/source/core/doc/number.cxx sw/source/core/doc/poolfmt.cxx sw/source/core/doc/tblafmt.cxx sw/source/core/doc/tblcpy.cxx sw/source/core/doc/tblrwcl.cxx sw/source/core/docnode/makefile.mk sw/source/core/docnode/ndcopy.cxx sw/source/core/docnode/ndnum.cxx sw/source/core/docnode/ndsect.cxx sw/source/core/docnode/ndtbl.cxx sw/source/core/docnode/ndtbl1.cxx sw/source/core/docnode/node.cxx sw/source/core/docnode/node2lay.cxx sw/source/core/docnode/nodes.cxx sw/source/core/docnode/section.cxx sw/source/core/docnode/swbaslnk.cxx sw/source/core/draw/dcontact.cxx sw/source/core/draw/dflyobj.cxx sw/source/core/draw/drawdoc.cxx sw/source/core/draw/dview.cxx sw/source/core/draw/makefile.mk sw/source/core/edit/autofmt.cxx sw/source/core/edit/edattr.cxx sw/source/core/edit/eddel.cxx sw/source/core/edit/edfcol.cxx sw/source/core/edit/edfld.cxx sw/source/core/edit/edfldexp.cxx sw/source/core/edit/edfmt.cxx sw/source/core/edit/edglss.cxx sw/source/core/edit/editsh.cxx sw/source/core/edit/edlingu.cxx sw/source/core/edit/ednumber.cxx sw/source/core/edit/edsect.cxx sw/source/core/edit/edtab.cxx sw/source/core/edit/edtox.cxx sw/source/core/edit/edundo.cxx sw/source/core/edit/makefile.mk sw/source/core/except/dbgloop.cxx sw/source/core/except/errhdl.cxx sw/source/core/fields/authfld.cxx sw/source/core/fields/cellfml.cxx sw/source/core/fields/chpfld.cxx sw/source/core/fields/dbfld.cxx sw/source/core/fields/ddefld.cxx sw/source/core/fields/ddetbl.cxx sw/source/core/fields/docufld.cxx sw/source/core/fields/expfld.cxx sw/source/core/fields/fldbas.cxx sw/source/core/fields/flddat.cxx sw/source/core/fields/flddropdown.cxx sw/source/core/fields/macrofld.cxx sw/source/core/fields/makefile.mk sw/source/core/fields/reffld.cxx sw/source/core/fields/scrptfld.cxx sw/source/core/fields/tblcalc.cxx sw/source/core/fields/usrfld.cxx sw/source/core/frmedt/fecopy.cxx sw/source/core/frmedt/fedesc.cxx sw/source/core/frmedt/fefly1.cxx sw/source/core/frmedt/feshview.cxx sw/source/core/frmedt/fetab.cxx sw/source/core/frmedt/fews.cxx sw/source/core/frmedt/makefile.mk sw/source/core/frmedt/tblsel.cxx sw/source/core/graphic/grfatr.cxx sw/source/core/inc/SwUndoFmt.hxx sw/source/core/inc/SwUndoTOXChange.hxx sw/source/core/inc/anchoredobjectposition.hxx sw/source/core/inc/dbgloop.hxx sw/source/core/inc/drawfont.hxx sw/source/core/inc/flowfrm.hxx sw/source/core/inc/frame.hxx sw/source/core/inc/frmtool.hxx sw/source/core/inc/layact.hxx sw/source/core/inc/layfrm.hxx sw/source/core/inc/notxtfrm.hxx sw/source/core/inc/rolbck.hxx sw/source/core/inc/rootfrm.hxx sw/source/core/inc/scriptinfo.hxx sw/source/core/inc/swblocks.hxx sw/source/core/inc/swcache.hxx sw/source/core/inc/tabfrm.hxx sw/source/core/inc/txmsrt.hxx sw/source/core/inc/undoflystrattr.hxx sw/source/core/inc/viewimp.hxx sw/source/core/layout/atrfrm.cxx sw/source/core/layout/calcmove.cxx sw/source/core/layout/dbg_lay.cxx sw/source/core/layout/findfrm.cxx sw/source/core/layout/flowfrm.cxx sw/source/core/layout/fly.cxx sw/source/core/layout/flycnt.cxx sw/source/core/layout/flyincnt.cxx sw/source/core/layout/flylay.cxx sw/source/core/layout/frmtool.cxx sw/source/core/layout/ftnfrm.cxx sw/source/core/layout/layact.cxx sw/source/core/layout/laycache.cxx sw/source/core/layout/makefile.mk sw/source/core/layout/objectformatter.cxx sw/source/core/layout/pagechg.cxx sw/source/core/layout/pagedesc.cxx sw/source/core/layout/paintfrm.cxx sw/source/core/layout/sectfrm.cxx sw/source/core/layout/tabfrm.cxx sw/source/core/layout/trvlfrm.cxx sw/source/core/layout/unusedf.cxx sw/source/core/layout/wsfrm.cxx sw/source/core/makefile.mk sw/source/core/objectpositioning/anchoredobjectposition.cxx sw/source/core/objectpositioning/ascharanchoredobjectposition.cxx sw/source/core/objectpositioning/makefile.mk sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx sw/source/core/ole/ndole.cxx sw/source/core/para/makefile.mk sw/source/core/para/paratr.cxx sw/source/core/sw3io/makefile.mk sw/source/core/sw3io/sw3convert.cxx sw/source/core/swg/SwXMLTextBlocks.cxx sw/source/core/swg/makefile.mk sw/source/core/swg/swblocks.cxx sw/source/core/table/swnewtable.cxx sw/source/core/table/swtable.cxx sw/source/core/text/EnhancedPDFExportHelper.cxx sw/source/core/text/atrstck.cxx sw/source/core/text/frmcrsr.cxx sw/source/core/text/frmform.cxx sw/source/core/text/itrcrsr.cxx sw/source/core/text/itrform2.cxx sw/source/core/text/makefile.mk sw/source/core/text/porlay.cxx sw/source/core/text/pormulti.cxx sw/source/core/text/txtfld.cxx sw/source/core/text/txtfrm.cxx sw/source/core/text/txtio.cxx sw/source/core/tox/makefile.mk sw/source/core/tox/txmsrt.cxx sw/source/core/txtnode/fmtatr2.cxx sw/source/core/txtnode/fntcache.cxx sw/source/core/txtnode/fntcap.cxx sw/source/core/txtnode/makefile.mk sw/source/core/txtnode/ndhints.cxx sw/source/core/txtnode/ndtxt.cxx sw/source/core/txtnode/swfont.cxx sw/source/core/txtnode/thints.cxx sw/source/core/txtnode/txtatr2.cxx sw/source/core/txtnode/txtedt.cxx sw/source/core/undo/SwUndoField.cxx sw/source/core/undo/SwUndoPageDesc.cxx sw/source/core/undo/SwUndoTOXChange.cxx sw/source/core/undo/docundo.cxx sw/source/core/undo/makefile.mk sw/source/core/undo/rolbck.cxx sw/source/core/undo/unbkmk.cxx sw/source/core/undo/undel.cxx sw/source/core/undo/undobj.cxx sw/source/core/undo/undobj1.cxx sw/source/core/undo/unfmco.cxx sw/source/core/undo/unins.cxx sw/source/core/undo/unnum.cxx sw/source/core/undo/unoutl.cxx sw/source/core/undo/unredln.cxx sw/source/core/undo/unsect.cxx sw/source/core/undo/unsort.cxx sw/source/core/undo/unspnd.cxx sw/source/core/undo/untbl.cxx sw/source/core/unocore/makefile.mk sw/source/core/unocore/swunohelper.cxx sw/source/core/unocore/unobkm.cxx sw/source/core/unocore/unocoll.cxx sw/source/core/unocore/unocrsrhelper.cxx sw/source/core/unocore/unodraw.cxx sw/source/core/unocore/unofield.cxx sw/source/core/unocore/unoframe.cxx sw/source/core/unocore/unomap.cxx sw/source/core/unocore/unoprnms.cxx sw/source/core/unocore/unoredlines.cxx sw/source/core/unocore/unosett.cxx sw/source/core/unocore/unosrch.cxx sw/source/core/unocore/unostyle.cxx sw/source/core/unocore/unotbl.cxx sw/source/core/view/vdraw.cxx sw/source/core/view/viewimp.cxx sw/source/core/view/viewpg.cxx sw/source/core/view/viewsh.cxx sw/source/core/view/vnew.cxx sw/source/core/view/vprint.cxx sw/source/filter/ascii/ascatr.cxx sw/source/filter/ascii/makefile.mk sw/source/filter/ascii/wrtasc.cxx sw/source/filter/basflt/fltini.cxx sw/source/filter/basflt/iodetect.cxx sw/source/filter/basflt/makefile.mk sw/source/filter/html/SwAppletImpl.cxx sw/source/filter/html/css1atr.cxx sw/source/filter/html/htmlatr.cxx sw/source/filter/html/htmlbas.cxx sw/source/filter/html/htmlcss1.cxx sw/source/filter/html/htmlfly.cxx sw/source/filter/html/htmlftn.cxx sw/source/filter/html/htmlgrin.cxx sw/source/filter/html/htmlnum.cxx sw/source/filter/html/htmlplug.cxx sw/source/filter/html/htmltab.cxx sw/source/filter/html/makefile.mk sw/source/filter/html/parcss1.cxx sw/source/filter/html/svxcss1.cxx sw/source/filter/html/swhtml.cxx sw/source/filter/inc/msfilter.hxx sw/source/filter/inc/wrtswtbl.hxx sw/source/filter/rtf/makefile.mk sw/source/filter/rtf/rtffly.cxx sw/source/filter/rtf/rtfnum.cxx sw/source/filter/rtf/rtftbl.cxx sw/source/filter/rtf/swparrtf.cxx sw/source/filter/rtf/swparrtf.hxx sw/source/filter/writer/makefile.mk sw/source/filter/writer/writer.cxx sw/source/filter/writer/wrt_fn.cxx sw/source/filter/writer/wrtswtbl.cxx sw/source/filter/ww1/fltshell.cxx sw/source/filter/ww1/makefile.mk sw/source/filter/ww1/w1class.cxx sw/source/filter/ww1/w1class.hxx sw/source/filter/ww1/w1filter.cxx sw/source/filter/ww1/w1par.cxx sw/source/filter/ww1/w1sprm.cxx sw/source/filter/ww1/w1struct.hxx sw/source/filter/ww8/README-rtf.txt sw/source/filter/ww8/attributeoutputbase.hxx sw/source/filter/ww8/docxattributeoutput.cxx sw/source/filter/ww8/docxattributeoutput.hxx sw/source/filter/ww8/docxexport.cxx sw/source/filter/ww8/docxexport.hxx sw/source/filter/ww8/docxexportfilter.cxx sw/source/filter/ww8/dump/dump8.cxx sw/source/filter/ww8/dump/dump8a.cxx sw/source/filter/ww8/dump/msvbasic.cxx sw/source/filter/ww8/dump/msvbasic.hxx sw/source/filter/ww8/dump/ww8darr.cxx sw/source/filter/ww8/dump/ww8darr.hxx sw/source/filter/ww8/dump/ww8dout.cxx sw/source/filter/ww8/dump/ww8dout.hxx sw/source/filter/ww8/dump/ww8scan.cxx sw/source/filter/ww8/dump/ww8scan.hxx sw/source/filter/ww8/dump/ww8struc.hxx sw/source/filter/ww8/makefile.mk sw/source/filter/ww8/rtfattributeoutput.cxx sw/source/filter/ww8/rtfattributeoutput.hxx sw/source/filter/ww8/rtfexport.cxx sw/source/filter/ww8/rtfexport.hxx sw/source/filter/ww8/rtfexportfilter.cxx sw/source/filter/ww8/rtfexportfilter.hxx sw/source/filter/ww8/rtfimportfilter.cxx sw/source/filter/ww8/rtfimportfilter.hxx sw/source/filter/ww8/rtfsdrexport.cxx sw/source/filter/ww8/rtfsdrexport.hxx sw/source/filter/ww8/writerhelper.cxx sw/source/filter/ww8/writerwordglue.cxx sw/source/filter/ww8/wrtw8esh.cxx sw/source/filter/ww8/wrtw8nds.cxx sw/source/filter/ww8/wrtw8num.cxx sw/source/filter/ww8/wrtw8sty.cxx sw/source/filter/ww8/wrtww8.cxx sw/source/filter/ww8/wrtww8.hxx sw/source/filter/ww8/wrtww8gr.cxx sw/source/filter/ww8/ww8atr.cxx sw/source/filter/ww8/ww8attributeoutput.hxx sw/source/filter/ww8/ww8graf.cxx sw/source/filter/ww8/ww8graf.hxx sw/source/filter/ww8/ww8graf2.cxx sw/source/filter/ww8/ww8par.cxx sw/source/filter/ww8/ww8par.hxx sw/source/filter/ww8/ww8par2.cxx sw/source/filter/ww8/ww8par3.cxx sw/source/filter/ww8/ww8par5.cxx sw/source/filter/ww8/ww8par6.cxx sw/source/filter/ww8/ww8scan.cxx sw/source/filter/ww8/ww8scan.hxx sw/source/filter/ww8/ww8struc.hxx sw/source/filter/xml/makefile.mk sw/source/filter/xml/xmlimpit.cxx sw/source/filter/xml/xmltble.cxx sw/source/filter/xml/xmltbli.cxx sw/source/ui/app/appenv.cxx sw/source/ui/app/apphdl.cxx sw/source/ui/app/applab.cxx sw/source/ui/app/appopt.cxx sw/source/ui/app/docsh.cxx sw/source/ui/app/docsh2.cxx sw/source/ui/app/docshini.cxx sw/source/ui/app/docst.cxx sw/source/ui/app/docstyle.cxx sw/source/ui/app/makefile.mk sw/source/ui/app/mn.src sw/source/ui/app/swmodul1.cxx sw/source/ui/cctrl/makefile.mk sw/source/ui/cctrl/swlbox.cxx sw/source/ui/chrdlg/break.cxx sw/source/ui/chrdlg/ccoll.cxx sw/source/ui/chrdlg/chardlg.cxx sw/source/ui/chrdlg/drpcps.cxx sw/source/ui/chrdlg/makefile.mk sw/source/ui/chrdlg/numpara.cxx sw/source/ui/chrdlg/pardlg.cxx sw/source/ui/chrdlg/swuiccoll.cxx sw/source/ui/config/barcfg.cxx sw/source/ui/config/caption.cxx sw/source/ui/config/cfgitems.cxx sw/source/ui/config/fontcfg.cxx sw/source/ui/config/mailconfigpage.cxx sw/source/ui/config/makefile.mk sw/source/ui/config/modcfg.cxx sw/source/ui/config/optcomp.cxx sw/source/ui/config/optload.cxx sw/source/ui/config/optpage.cxx sw/source/ui/config/prtopt.cxx sw/source/ui/config/uinums.cxx sw/source/ui/config/usrpref.cxx sw/source/ui/config/viewopt.cxx sw/source/ui/dbui/dbinsdlg.cxx sw/source/ui/dbui/dbmgr.cxx sw/source/ui/dbui/dbtree.cxx sw/source/ui/dbui/makefile.mk sw/source/ui/dbui/mmaddressblockpage.cxx sw/source/ui/dbui/mmdocselectpage.cxx sw/source/ui/dbui/mmoutputpage.cxx sw/source/ui/dbui/swdbtoolsclient.cxx sw/source/ui/dialog/abstract.cxx sw/source/ui/dialog/ascfldlg.cxx sw/source/ui/dialog/macassgn.cxx sw/source/ui/dialog/makefile.mk sw/source/ui/dialog/regionsw.cxx sw/source/ui/dialog/swdlgfact.cxx sw/source/ui/dialog/swdlgfact.hxx sw/source/ui/dialog/uiregionsw.cxx sw/source/ui/dochdl/gloshdl.cxx sw/source/ui/dochdl/makefile.mk sw/source/ui/dochdl/swdtflvr.cxx sw/source/ui/docvw/PostItMgr.cxx sw/source/ui/docvw/SidebarWin.cxx sw/source/ui/docvw/edtdd.cxx sw/source/ui/docvw/edtwin.cxx sw/source/ui/docvw/edtwin2.cxx sw/source/ui/docvw/edtwin3.cxx sw/source/ui/docvw/makefile.mk sw/source/ui/docvw/romenu.cxx sw/source/ui/docvw/romenu.hxx sw/source/ui/docvw/srcedtw.cxx sw/source/ui/envelp/envfmt.cxx sw/source/ui/envelp/envimg.cxx sw/source/ui/envelp/envlop1.cxx sw/source/ui/envelp/envprt.cxx sw/source/ui/envelp/label1.cxx sw/source/ui/envelp/labfmt.cxx sw/source/ui/envelp/labprt.cxx sw/source/ui/envelp/mailmrge.cxx sw/source/ui/envelp/makefile.mk sw/source/ui/fldui/flddb.cxx sw/source/ui/fldui/flddinf.cxx sw/source/ui/fldui/flddok.cxx sw/source/ui/fldui/fldedt.cxx sw/source/ui/fldui/fldfunc.cxx sw/source/ui/fldui/fldmgr.cxx sw/source/ui/fldui/fldpage.cxx sw/source/ui/fldui/fldref.cxx sw/source/ui/fldui/fldtdlg.cxx sw/source/ui/fldui/fldvar.cxx sw/source/ui/fldui/fldwrap.cxx sw/source/ui/fldui/inpdlg.cxx sw/source/ui/fldui/makefile.mk sw/source/ui/fmtui/makefile.mk sw/source/ui/fmtui/tmpdlg.cxx sw/source/ui/frmdlg/colmgr.cxx sw/source/ui/frmdlg/column.cxx sw/source/ui/frmdlg/cption.cxx sw/source/ui/frmdlg/frmdlg.cxx sw/source/ui/frmdlg/frmmgr.cxx sw/source/ui/frmdlg/frmpage.cxx sw/source/ui/frmdlg/makefile.mk sw/source/ui/frmdlg/wrap.cxx sw/source/ui/globdoc/makefile.mk sw/source/ui/inc/bmpwin.hxx sw/source/ui/inc/colmgr.hxx sw/source/ui/inc/column.hxx sw/source/ui/inc/envimg.hxx sw/source/ui/inc/envlop.hxx sw/source/ui/inc/frmpage.hxx sw/source/ui/inc/inputwin.hxx sw/source/ui/inc/javaedit.hxx sw/source/ui/inc/num.hxx sw/source/ui/inc/optpage.hxx sw/source/ui/inc/regionsw.hxx sw/source/ui/inc/split.hxx sw/source/ui/inc/swlbox.hxx sw/source/ui/inc/swmn_tmpl.hrc sw/source/ui/inc/swuiidxmrk.hxx sw/source/ui/inc/tabsh.hxx sw/source/ui/inc/toxmgr.hxx sw/source/ui/inc/uiitems.hxx sw/source/ui/inc/view.hxx sw/source/ui/inc/workctrl.hxx sw/source/ui/inc/wrap.hxx sw/source/ui/inc/wrtsh.hxx sw/source/ui/index/cnttab.cxx sw/source/ui/index/makefile.mk sw/source/ui/index/toxmgr.cxx sw/source/ui/lingu/hhcwrp.cxx sw/source/ui/lingu/makefile.mk sw/source/ui/lingu/olmenu.cxx sw/source/ui/misc/bookmark.cxx sw/source/ui/misc/docfnote.cxx sw/source/ui/misc/glosbib.cxx sw/source/ui/misc/glosdoc.cxx sw/source/ui/misc/glshell.cxx sw/source/ui/misc/insfnote.cxx sw/source/ui/misc/linenum.cxx sw/source/ui/misc/makefile.mk sw/source/ui/misc/num.cxx sw/source/ui/misc/numberingtypelistbox.cxx sw/source/ui/misc/outline.cxx sw/source/ui/misc/pgfnote.cxx sw/source/ui/misc/pggrid.cxx sw/source/ui/misc/redlndlg.cxx sw/source/ui/misc/srtdlg.cxx sw/source/ui/misc/swmodalredlineacceptdlg.cxx sw/source/ui/ribbar/conarc.cxx sw/source/ui/ribbar/drawbase.cxx sw/source/ui/ribbar/inputwin.cxx sw/source/ui/ribbar/inputwin.src sw/source/ui/ribbar/makefile.mk sw/source/ui/ribbar/tbxanchr.cxx sw/source/ui/ribbar/workctrl.cxx sw/source/ui/ribbar/workctrl.src sw/source/ui/shells/annotsh.cxx sw/source/ui/shells/basesh.cxx sw/source/ui/shells/beziersh.cxx sw/source/ui/shells/drawdlg.cxx sw/source/ui/shells/drwbassh.cxx sw/source/ui/shells/drwtxtex.cxx sw/source/ui/shells/drwtxtsh.cxx sw/source/ui/shells/frmsh.cxx sw/source/ui/shells/grfsh.cxx sw/source/ui/shells/grfshex.cxx sw/source/ui/shells/makefile.mk sw/source/ui/shells/tabsh.cxx sw/source/ui/shells/textfld.cxx sw/source/ui/shells/textglos.cxx sw/source/ui/shells/textsh.cxx sw/source/ui/shells/textsh1.cxx sw/source/ui/shells/txtattr.cxx sw/source/ui/shells/txtcrsr.cxx sw/source/ui/shells/txtnum.cxx sw/source/ui/table/convert.cxx sw/source/ui/table/instable.cxx sw/source/ui/table/makefile.mk sw/source/ui/table/swtablerep.cxx sw/source/ui/table/tabledlg.cxx sw/source/ui/table/tablemgr.cxx sw/source/ui/table/tablepg.hxx sw/source/ui/table/tautofmt.cxx sw/source/ui/uiview/formatclipboard.cxx sw/source/ui/uiview/makefile.mk sw/source/ui/uiview/pview.cxx sw/source/ui/uiview/pview.src sw/source/ui/uiview/scroll.cxx sw/source/ui/uiview/srcview.cxx sw/source/ui/uiview/swcli.cxx sw/source/ui/uiview/uivwimp.cxx sw/source/ui/uiview/view.cxx sw/source/ui/uiview/view1.cxx sw/source/ui/uiview/view2.cxx sw/source/ui/uiview/viewcoll.cxx sw/source/ui/uiview/viewdlg2.cxx sw/source/ui/uiview/viewling.cxx sw/source/ui/uiview/viewmdi.cxx sw/source/ui/uiview/viewport.cxx sw/source/ui/uiview/viewprt.cxx sw/source/ui/uiview/viewsrch.cxx sw/source/ui/uiview/viewtab.cxx sw/source/ui/uno/SwXDocumentSettings.cxx sw/source/ui/uno/SwXPrintPreviewSettings.cxx sw/source/ui/uno/SwXPrintPreviewSettings.hxx sw/source/ui/uno/unoatxt.cxx sw/source/ui/uno/unomod.cxx sw/source/ui/uno/unotxdoc.cxx sw/source/ui/uno/unotxvw.cxx sw/source/ui/utlui/attrdesc.cxx sw/source/ui/utlui/content.cxx sw/source/ui/utlui/glbltree.cxx sw/source/ui/utlui/initui.cxx sw/source/ui/utlui/makefile.mk sw/source/ui/utlui/navipi.cxx sw/source/ui/utlui/navipi.src sw/source/ui/utlui/numfmtlb.cxx sw/source/ui/utlui/prcntfld.cxx sw/source/ui/utlui/uiitems.cxx sw/source/ui/utlui/uitool.cxx sw/source/ui/utlui/unotools.cxx sw/source/ui/utlui/viewlayoutctrl.cxx sw/source/ui/utlui/zoomctrl.cxx sw/source/ui/vba/makefile.mk sw/source/ui/vba/service.cxx sw/source/ui/web/makefile.mk sw/source/ui/wrtsh/makefile.mk sw/source/ui/wrtsh/wrtsh1.cxx sw/source/ui/wrtsh/wrtsh2.cxx sw/source/ui/wrtsh/wrtsh4.cxx sw/source/ui/wrtsh/wrtundo.cxx sw/util/hidother.src sw/util/makefile.mk sw/util/msword.map
2011-03-14 16:51:14 +00:00
static sal_uInt16 aIds[3] =
2000-09-18 16:15:01 +00:00
{ RES_BACKGROUND, SID_ATTR_BRUSH_ROW, SID_ATTR_BRUSH_TABLE };
for( int i = 0; i < 3; ++i )
if( SFX_ITEM_SET == pTblSet->GetItemState( aIds[ i ],
sal_False, &pItem ) && *pItem == aBrush )
2000-09-18 16:15:01 +00:00
pTblSet->ClearItem( aIds[ i ] );
}
if( SFX_ITEM_SET == pTblSet->GetItemState( FN_PARAM_TABLE_NAME, sal_False,
2000-09-18 16:15:01 +00:00
&pItem ) && ((const SfxStringItem*)pItem)->GetValue() ==
rSh.GetTableFmt()->GetName() )
pTblSet->ClearItem( FN_PARAM_TABLE_NAME );
rSh.MoveTable( GetfnTableCurr(), GetfnTableStart() );
2000-09-18 16:15:01 +00:00
rSh.SetMark();
rSh.MoveTable( GetfnTableCurr(), GetfnTableEnd() );
2000-09-18 16:15:01 +00:00
ItemSetToTableParam( *pTblSet, rSh );
2000-09-18 16:15:01 +00:00
rSh.ClearMark();
rSh.MoveTable( GetfnTableCurr(), GetfnTableStart() );
2000-09-18 16:15:01 +00:00
}
_DB_ColumnConfigData::~_DB_ColumnConfigData() {}
static Sequence<rtl::OUString> lcl_createSourceNames(const String& rNodeName)
2000-09-18 16:15:01 +00:00
{
2001-09-04 11:16:28 +00:00
Sequence<rtl::OUString> aSourceNames(11);
rtl::OUString* pNames = aSourceNames.getArray();
String sTmp( rNodeName );
const xub_StrLen nPos = sTmp.Len();
pNames[0] = sTmp.ReplaceAscii( nPos, STRING_MAXLEN,
RTL_CONSTASCII_STRINGPARAM( "/DataSource" ));
pNames[1] = sTmp.ReplaceAscii( nPos, STRING_MAXLEN,
RTL_CONSTASCII_STRINGPARAM( "/Command" ));
pNames[2] = sTmp.ReplaceAscii( nPos, STRING_MAXLEN,
RTL_CONSTASCII_STRINGPARAM( "/CommandType" ));
pNames[3] = sTmp.ReplaceAscii( nPos, STRING_MAXLEN,
RTL_CONSTASCII_STRINGPARAM( "/ColumnsToText" ));
pNames[4] = sTmp.ReplaceAscii( nPos, STRING_MAXLEN,
RTL_CONSTASCII_STRINGPARAM( "/ColumnsToTable" ));
pNames[5] = sTmp.ReplaceAscii( nPos, STRING_MAXLEN,
RTL_CONSTASCII_STRINGPARAM( "/ParaStyle" ));
pNames[6] = sTmp.ReplaceAscii( nPos, STRING_MAXLEN,
RTL_CONSTASCII_STRINGPARAM( "/TableAutoFormat" ));
pNames[7] = sTmp.ReplaceAscii( nPos, STRING_MAXLEN,
RTL_CONSTASCII_STRINGPARAM( "/IsTable" ));
pNames[8] = sTmp.ReplaceAscii( nPos, STRING_MAXLEN,
RTL_CONSTASCII_STRINGPARAM( "/IsField" ));
pNames[9] = sTmp.ReplaceAscii( nPos, STRING_MAXLEN,
RTL_CONSTASCII_STRINGPARAM( "/IsHeadlineOn" ));
pNames[10] = sTmp.ReplaceAscii( nPos, STRING_MAXLEN,
RTL_CONSTASCII_STRINGPARAM( "/IsEmptyHeadline" ));
2000-12-08 09:19:55 +00:00
return aSourceNames;
}
2000-09-18 16:15:01 +00:00
static Sequence<rtl::OUString> lcl_CreateSubNames( const String& rSubNodeName )
2000-12-08 09:19:55 +00:00
{
2001-09-04 11:16:28 +00:00
Sequence<rtl::OUString> aSubSourceNames(6);
rtl::OUString* pNames = aSubSourceNames.getArray();
String sTmp( rSubNodeName );
const xub_StrLen nPos = sTmp.Len();
pNames[0] = sTmp.ReplaceAscii( nPos, STRING_MAXLEN,
RTL_CONSTASCII_STRINGPARAM( "/ColumnName" ));
pNames[1] = sTmp.ReplaceAscii( nPos, STRING_MAXLEN,
RTL_CONSTASCII_STRINGPARAM( "/ColumnIndex" ));
pNames[2] = sTmp.ReplaceAscii( nPos, STRING_MAXLEN,
RTL_CONSTASCII_STRINGPARAM( "/IsNumberFormat" ));
pNames[3] = sTmp.ReplaceAscii( nPos, STRING_MAXLEN,
RTL_CONSTASCII_STRINGPARAM( "/IsNumberFormatFromDataBase" ));
pNames[4] = sTmp.ReplaceAscii( nPos, STRING_MAXLEN,
RTL_CONSTASCII_STRINGPARAM( "/NumberFormat" ));
pNames[5] = sTmp.ReplaceAscii( nPos, STRING_MAXLEN,
RTL_CONSTASCII_STRINGPARAM( "/NumberFormatLocale" ));
2000-12-08 09:19:55 +00:00
return aSubSourceNames;
}
2000-09-18 16:15:01 +00:00
static rtl::OUString lcl_CreateUniqueName(const Sequence<rtl::OUString>& aNames)
2000-12-08 09:19:55 +00:00
{
sal_Int32 nIdx = aNames.getLength();
2001-09-04 11:16:28 +00:00
const rtl::OUString* pNames = aNames.getConstArray();
2012-12-21 12:00:43 +01:00
rtl::OUString sTest("_");
2001-09-04 11:16:28 +00:00
rtl::OUString sRet;
while(true)
2000-12-08 09:19:55 +00:00
{
2001-09-04 11:16:28 +00:00
sRet = sTest; sRet += rtl::OUString::valueOf(nIdx++);
bool bFound = false;
2000-12-08 09:19:55 +00:00
for(sal_Int32 i = 0; i < aNames.getLength(); i++)
2000-09-18 16:15:01 +00:00
{
2000-12-08 09:19:55 +00:00
if(pNames[i] == sRet)
{
bFound = true;
2000-12-08 09:19:55 +00:00
break;
}
2000-09-18 16:15:01 +00:00
}
2000-12-08 09:19:55 +00:00
if(!bFound)
break;
2000-09-18 16:15:01 +00:00
}
2000-12-08 09:19:55 +00:00
return sRet;
2000-09-18 16:15:01 +00:00
}
void SwInsertDBColAutoPilot::Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& ) {}
2000-12-08 09:19:55 +00:00
void SwInsertDBColAutoPilot::Commit()
2000-09-18 16:15:01 +00:00
{
2001-09-04 11:16:28 +00:00
Sequence <rtl::OUString> aNames = GetNodeNames(rtl::OUString());
const rtl::OUString* pNames = aNames.getArray();
2000-12-08 09:19:55 +00:00
//remove entries that contain this data source + table at first
for(sal_Int32 nNode = 0; nNode < aNames.getLength(); nNode++)
2000-09-18 16:15:01 +00:00
{
2001-09-04 11:16:28 +00:00
Sequence<rtl::OUString> aSourceNames(2);
rtl::OUString* pSourceNames = aSourceNames.getArray();
2000-12-08 09:19:55 +00:00
pSourceNames[0] = pNames[nNode];
2012-12-21 12:00:43 +01:00
pSourceNames[0] += "/DataSource";
2000-12-08 09:19:55 +00:00
pSourceNames[1] = pNames[nNode];
2012-12-21 12:00:43 +01:00
pSourceNames[1] += "/Command";
2000-12-08 09:19:55 +00:00
Sequence<Any> aSourceProperties = GetProperties(aSourceNames);
const Any* pSourceProps = aSourceProperties.getArray();
2001-09-04 11:16:28 +00:00
rtl::OUString sSource, sCommand;
2000-12-08 09:19:55 +00:00
pSourceProps[0] >>= sSource;
pSourceProps[1] >>= sCommand;
if(sSource.equals(aDBData.sDataSource) && sCommand.equals(aDBData.sCommand))
2000-09-18 16:15:01 +00:00
{
2001-09-04 11:16:28 +00:00
Sequence<rtl::OUString> aElements(1);
2000-12-08 09:19:55 +00:00
aElements.getArray()[0] = pNames[nNode];
2001-09-04 11:16:28 +00:00
ClearNodeElements(rtl::OUString(), aElements);
2000-09-18 16:15:01 +00:00
}
}
2001-09-04 11:16:28 +00:00
aNames = GetNodeNames(rtl::OUString());
rtl::OUString sNewNode = lcl_CreateUniqueName(aNames);
Sequence<rtl::OUString> aNodeNames = lcl_createSourceNames(sNewNode);
2000-12-08 09:19:55 +00:00
Sequence<PropertyValue> aValues(aNodeNames.getLength());
PropertyValue* pValues = aValues.getArray();
2001-09-04 11:16:28 +00:00
const rtl::OUString* pNodeNames = aNodeNames.getConstArray();
2012-12-21 12:00:43 +01:00
rtl::OUString sSlash("/");
2000-12-08 09:19:55 +00:00
for(sal_Int32 i = 0; i < aNodeNames.getLength(); i++)
{
pValues[i].Name = sSlash;
pValues[i].Name += pNodeNames[i];
}
2000-09-18 16:15:01 +00:00
2001-09-04 11:16:28 +00:00
pValues[0].Value <<= rtl::OUString(aDBData.sDataSource);
pValues[1].Value <<= rtl::OUString(aDBData.sCommand);
pValues[2].Value <<= aDBData.nCommandType;
2001-09-04 11:16:28 +00:00
pValues[3].Value <<= rtl::OUString(aEdDbText.GetText());
2000-09-18 16:15:01 +00:00
2000-12-08 09:19:55 +00:00
String sTmp;
for( sal_uInt16 n = 0, nCnt = aLbTableCol.GetEntryCount(); n < nCnt; ++n )
2000-12-08 09:19:55 +00:00
( sTmp += aLbTableCol.GetEntry( n ) ) += '\x0a';
2000-09-18 16:15:01 +00:00
2000-12-08 09:19:55 +00:00
if( sTmp.Len() )
2001-09-04 11:16:28 +00:00
pValues[4].Value <<= rtl::OUString(sTmp);
2000-09-18 16:15:01 +00:00
2000-12-08 09:19:55 +00:00
if( sNoTmpl != (sTmp = aLbDbParaColl.GetSelectEntry()) )
2001-09-04 11:16:28 +00:00
pValues[5].Value <<= rtl::OUString(sTmp);
2000-09-18 16:15:01 +00:00
2000-12-08 09:19:55 +00:00
if( pTAutoFmt )
2001-09-04 11:16:28 +00:00
pValues[6].Value <<= rtl::OUString(pTAutoFmt->GetName());
2000-09-18 16:15:01 +00:00
2000-12-08 09:19:55 +00:00
const Type& rBoolType = ::getBooleanCppuType();
sal_Bool bTmp = aRbAsTable.IsChecked();
pValues[7].Value.setValue(&bTmp, rBoolType);
2000-09-18 16:15:01 +00:00
2000-12-08 09:19:55 +00:00
bTmp = aRbAsField.IsChecked();
pValues[8].Value.setValue(&bTmp, rBoolType);
2000-09-18 16:15:01 +00:00
2000-12-08 09:19:55 +00:00
bTmp = aCbTableHeadon.IsChecked();
pValues[9].Value.setValue(&bTmp, rBoolType);
2000-09-18 16:15:01 +00:00
2000-12-08 09:19:55 +00:00
bTmp = aRbHeadlEmpty.IsChecked();
pValues[10].Value.setValue(&bTmp, rBoolType);
2000-09-18 16:15:01 +00:00
2001-09-04 11:16:28 +00:00
SetSetProperties(rtl::OUString(), aValues);
2012-12-21 12:00:43 +01:00
sNewNode += "/ColumnSet";
rtl::OUString sDelim("/__");
LanguageType ePrevLang = (LanguageType)-1;
2001-09-04 11:16:28 +00:00
rtl::OUString sPrevLang;
2000-12-08 09:19:55 +00:00
SvNumberFormatter& rNFmtr = *pView->GetWrtShell().GetNumberFormatter();
for(sal_uInt16 nCol = 0; nCol < aDBColumns.size(); nCol++)
2000-12-08 09:19:55 +00:00
{
2001-09-04 11:16:28 +00:00
rtl::OUString sColumnNode = sNewNode;
2000-12-08 09:19:55 +00:00
SwInsDBColumn* pColumn = aDBColumns[nCol];
String sColumnInsertNode(sColumnNode);
sColumnInsertNode += sDelim;
if( nCol < 100 )
sColumnInsertNode += '0';
if( nCol < 10 )
sColumnInsertNode += '0';
sColumnInsertNode += OUString::number( nCol );
2001-09-04 11:16:28 +00:00
Sequence <rtl::OUString> aSubNodeNames = lcl_CreateSubNames(sColumnInsertNode);
2000-12-08 09:19:55 +00:00
Sequence<PropertyValue> aSubValues(aSubNodeNames.getLength());
PropertyValue* pSubValues = aSubValues.getArray();
2001-09-04 11:16:28 +00:00
const rtl::OUString* pSubNodeNames = aSubNodeNames.getConstArray();
sal_Int32 i;
for( i = 0; i < aSubNodeNames.getLength(); i++)
2000-12-08 09:19:55 +00:00
pSubValues[i].Name = pSubNodeNames[i];
pSubValues[0].Value <<= pColumn->sColumn;
pSubValues[1].Value <<= i;
sal_Bool bVal = pColumn->bHasFmt;
pSubValues[2].Value.setValue(&bVal, rBoolType);
bVal = pColumn->bIsDBFmt;
pSubValues[3].Value.setValue(&bVal, rBoolType);
SwStyleNameMapper::FillUIName( RES_POOLCOLL_STANDARD, sTmp );
2000-12-08 09:19:55 +00:00
const SvNumberformat* pNF = rNFmtr.GetEntry( pColumn->nUsrNumFmt );
LanguageType eLang;
if( pNF )
2000-09-18 16:15:01 +00:00
{
2001-09-04 11:16:28 +00:00
pSubValues[4].Value <<= rtl::OUString(pNF->GetFormatstring());
2000-12-08 09:19:55 +00:00
eLang = pNF->GetLanguage();
}
else
{
2001-09-04 11:16:28 +00:00
pSubValues[4].Value <<= rtl::OUString(sTmp);
eLang = GetAppLanguage();
2000-12-08 09:19:55 +00:00
}
if( eLang != ePrevLang )
{
/* FIXME-BCP47: handle language tags! */
lang::Locale aLocale( LanguageTag( eLang ).getLocale());
/* umm.. what's this string anyway, "Country-Language" instead of
* "Language-Country" ??? */
2001-09-04 11:16:28 +00:00
(( sPrevLang = aLocale.Country ) += rtl::OUString( '-' )) += aLocale.Language;
ePrevLang = eLang;
}
pSubValues[5].Value <<= sPrevLang;
2000-12-09 12:03:26 +00:00
SetSetProperties(sColumnNode, aSubValues);
2000-12-08 09:19:55 +00:00
}
2000-09-18 16:15:01 +00:00
}
2000-12-08 09:19:55 +00:00
void SwInsertDBColAutoPilot::Load()
2000-09-18 16:15:01 +00:00
{
2001-09-04 11:16:28 +00:00
Sequence <rtl::OUString> aNames = GetNodeNames(rtl::OUString());
const rtl::OUString* pNames = aNames.getArray();
2000-12-08 09:19:55 +00:00
SvNumberFormatter& rNFmtr = *pView->GetWrtShell().GetNumberFormatter();
for(sal_Int32 nNode = 0; nNode < aNames.getLength(); nNode++)
2000-09-18 16:15:01 +00:00
{
2000-12-08 09:19:55 +00:00
//search for entries with the appropriate data source and table
2001-09-04 11:16:28 +00:00
Sequence<rtl::OUString> aSourceNames = lcl_createSourceNames(pNames[nNode]);
2000-12-08 09:19:55 +00:00
Sequence< Any> aDataSourceProps = GetProperties(aSourceNames);
const Any* pDataSourceProps = aDataSourceProps.getConstArray();
2001-09-04 11:16:28 +00:00
rtl::OUString sSource, sCommand;
2000-12-08 09:19:55 +00:00
sal_Int16 nCommandType;
pDataSourceProps[0] >>= sSource;
pDataSourceProps[1] >>= sCommand;
pDataSourceProps[2] >>= nCommandType;
if(sSource.equals(aDBData.sDataSource) && sCommand.equals(aDBData.sCommand))
2000-09-18 16:15:01 +00:00
{
2000-12-08 09:19:55 +00:00
_DB_ColumnConfigData* pNewData = new _DB_ColumnConfigData;
pNewData->sSource = sSource;
pNewData->sTable = sCommand;
pDataSourceProps[3] >>= pNewData->sEdit;
pDataSourceProps[4] >>= pNewData->sTblList;
pDataSourceProps[5] >>= pNewData->sTmplNm;
pDataSourceProps[6] >>= pNewData->sTAutoFmtNm;
if(pDataSourceProps[7].hasValue())
pNewData->bIsTable = *(sal_Bool*)pDataSourceProps[7].getValue();
if(pDataSourceProps[8].hasValue())
pNewData->bIsField = *(sal_Bool*)pDataSourceProps[8].getValue();
if(pDataSourceProps[9].hasValue())
pNewData->bIsHeadlineOn = *(sal_Bool*)pDataSourceProps[9].getValue();
if(pDataSourceProps[10].hasValue())
pNewData->bIsEmptyHeadln = *(sal_Bool*)pDataSourceProps[10].getValue();
2001-09-04 11:16:28 +00:00
rtl::OUString sSubNodeName(pNames[nNode]);
2012-12-21 12:00:43 +01:00
sSubNodeName += "/ColumnSet/";
2001-09-04 11:16:28 +00:00
Sequence <rtl::OUString> aSubNames = GetNodeNames(sSubNodeName);
const rtl::OUString* pSubNames = aSubNames.getConstArray();
2000-12-08 09:19:55 +00:00
for(sal_Int32 nSub = 0; nSub < aSubNames.getLength(); nSub++)
{
2001-09-04 11:16:28 +00:00
rtl::OUString sSubSubNodeName(sSubNodeName);
2001-01-19 13:45:15 +00:00
sSubSubNodeName += pSubNames[nSub];
2001-09-04 11:16:28 +00:00
Sequence <rtl::OUString> aSubNodeNames = lcl_CreateSubNames(sSubSubNodeName);
2000-12-08 09:19:55 +00:00
Sequence< Any> aSubProps = GetProperties(aSubNodeNames);
const Any* pSubProps = aSubProps.getConstArray();
2001-09-04 11:16:28 +00:00
rtl::OUString sColumn;
2000-12-08 09:19:55 +00:00
pSubProps[0] >>= sColumn;
//check for existance of the loaded column name
bool bFound = false;
for(sal_uInt16 nRealColumn = 0; nRealColumn < aDBColumns.size(); nRealColumn++)
{
if(aDBColumns[nRealColumn]->sColumn == sColumn)
{
bFound = true;
break;
}
}
if(!bFound)
continue;
sal_Int16 nIndex = 0;
2000-12-08 09:19:55 +00:00
pSubProps[1] >>= nIndex;
SwInsDBColumn* pInsDBColumn = new SwInsDBColumn(sColumn, nIndex);
2000-12-08 09:19:55 +00:00
if(pSubProps[2].hasValue())
pInsDBColumn->bHasFmt = *(sal_Bool*)pSubProps[2].getValue();
if(pSubProps[3].hasValue())
pInsDBColumn->bIsDBFmt = *(sal_Bool*)pSubProps[3].getValue();
pSubProps[4] >>= pInsDBColumn->sUsrNumFmt;
2001-09-04 11:16:28 +00:00
rtl::OUString sNumberFormatLocale;
2000-12-08 09:19:55 +00:00
pSubProps[5] >>= sNumberFormatLocale;
/* FIXME-BCP47: handle language tags, and cope with the wrong
* Country-Language string that
* SwInsertDBColAutoPilot::Commit() writes so far! */
lang::Locale aLocale;
2000-12-08 09:19:55 +00:00
aLocale.Language = sNumberFormatLocale.copy(0, 2);
aLocale.Country = sNumberFormatLocale.copy(3, 2);
pInsDBColumn->eUsrNumFmtLng = LanguageTag( aLocale ).getLanguageType();
2000-12-08 09:19:55 +00:00
pInsDBColumn->nUsrNumFmt = rNFmtr.GetEntryKey( pInsDBColumn->sUsrNumFmt,
pInsDBColumn->eUsrNumFmtLng );
pNewData->aDBColumns.insert(pInsDBColumn);
2000-12-08 09:19:55 +00:00
}
sal_uInt16 n = 0;
2000-12-08 09:19:55 +00:00
String sTmp( pNewData->sTblList );
if( sTmp.Len() )
{
do {
String sEntry( sTmp.GetToken( 0, '\x0a', n ) );
//preselect column - if they still exist!
if(aLbTblDbColumn.GetEntryPos(sEntry) != LISTBOX_ENTRY_NOTFOUND)
{
aLbTableCol.InsertEntry( sEntry );
aLbTblDbColumn.RemoveEntry( sEntry );
}
2000-12-08 09:19:55 +00:00
} while( n < sTmp.Len() );
2000-09-18 16:15:01 +00:00
2000-12-08 09:19:55 +00:00
if( !aLbTblDbColumn.GetEntryCount() )
{
aIbDbcolAllTo.Enable( sal_False );
aIbDbcolOneTo.Enable( sal_False );
2000-12-08 09:19:55 +00:00
}
aIbDbcolOneFrom.Enable( sal_True );
aIbDbcolAllFrom.Enable( sal_True );
2000-12-08 09:19:55 +00:00
}
aEdDbText.SetText( pNewData->sEdit );
2000-09-18 16:15:01 +00:00
2000-12-08 09:19:55 +00:00
sTmp = pNewData->sTmplNm;
if( sTmp.Len() )
aLbDbParaColl.SelectEntry( sTmp );
else
aLbDbParaColl.SelectEntryPos( 0 );
2000-09-18 16:15:01 +00:00
2011-11-17 22:13:42 +04:00
delete pTAutoFmt, pTAutoFmt = 0;
2000-12-08 09:19:55 +00:00
sTmp = pNewData->sTAutoFmtNm;
if( sTmp.Len() )
{
// then load the AutoFmt file and look for Autoformat first
2000-12-08 09:19:55 +00:00
SwTableAutoFmtTbl aAutoFmtTbl;
aAutoFmtTbl.Load();
for( sal_uInt16 nAutoFmt = aAutoFmtTbl.size(); nAutoFmt; )
if( sTmp == aAutoFmtTbl[ --nAutoFmt ].GetName() )
2000-12-08 09:19:55 +00:00
{
pTAutoFmt = new SwTableAutoFmt( aAutoFmtTbl[ nAutoFmt ] );
2000-12-08 09:19:55 +00:00
break;
}
}
2000-09-18 16:15:01 +00:00
2000-12-08 09:19:55 +00:00
aRbAsTable.Check( pNewData->bIsTable );
aRbAsField.Check( pNewData->bIsField );
aRbAsText.Check( !pNewData->bIsTable && !pNewData->bIsField );
2000-09-18 16:15:01 +00:00
2000-12-08 09:19:55 +00:00
aCbTableHeadon.Check( pNewData->bIsHeadlineOn );
aRbHeadlColnms.Check( !pNewData->bIsEmptyHeadln );
aRbHeadlEmpty.Check( pNewData->bIsEmptyHeadln );
2000-12-09 12:03:26 +00:00
HeaderHdl(&aCbTableHeadon);
2000-12-08 09:19:55 +00:00
// now copy the user defined Numberformat strings to the
// Shell. Then only these are available as ID
for( n = 0; n < aDBColumns.size() ; ++n )
2000-09-18 16:15:01 +00:00
{
2000-12-08 09:19:55 +00:00
SwInsDBColumn& rSet = *aDBColumns[ n ];
for( sal_uInt16 m = 0; m < pNewData->aDBColumns.size() ; ++m )
2000-12-08 09:19:55 +00:00
{
SwInsDBColumn& rGet = *pNewData->aDBColumns[ m ];
if(rGet.sColumn == rSet.sColumn)
2000-12-08 09:19:55 +00:00
{
if( rGet.bHasFmt && !rGet.bIsDBFmt )
{
rSet.bIsDBFmt = sal_False;
rSet.nUsrNumFmt = rNFmtr.GetEntryKey( rGet.sUsrNumFmt,
rGet.eUsrNumFmtLng );
if( NUMBERFORMAT_ENTRY_NOT_FOUND == rSet.nUsrNumFmt )
{
sal_Int32 nCheckPos;
short nType;
rNFmtr.PutEntry( rGet.sUsrNumFmt, nCheckPos, nType,
rSet.nUsrNumFmt, rGet.eUsrNumFmtLng );
}
}
break;
2000-12-08 09:19:55 +00:00
}
}
2000-09-18 16:15:01 +00:00
}
// when the cursor is inside of a table, table must NEVER be selectable
2000-12-08 09:19:55 +00:00
if( !aRbAsTable.IsEnabled() && aRbAsTable.IsChecked() )
aRbAsField.Check( sal_True );
2000-12-08 09:19:55 +00:00
delete pNewData;
break;
}
2000-09-18 16:15:01 +00:00
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */