2010-10-14 08:30:41 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2011-03-31 10:05:04 +02:00
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* This file incorporates work covered by the following license notice:
|
|
|
|
*
|
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
|
|
* with this work for additional information regarding copyright
|
|
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
|
|
* License, Version 2.0 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
|
|
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
|
|
*/
|
2006-09-16 21:43:25 +00:00
|
|
|
|
2004-08-23 07:48:00 +00:00
|
|
|
#include "dbinsdlg.hxx"
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2002-08-21 11:23:43 +00:00
|
|
|
#include <memory>
|
2004-08-23 07:48:00 +00:00
|
|
|
|
|
|
|
#include <float.h>
|
2010-05-21 15:21:49 +02:00
|
|
|
|
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>
|
2001-02-21 11:27:37 +00:00
|
|
|
#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>
|
2012-08-29 09:32:55 +02:00
|
|
|
#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>
|
2010-01-08 18:32:51 +01:00
|
|
|
#include <editeng/langitem.hxx>
|
2009-10-16 00:05:16 +02:00
|
|
|
#include <svl/numuno.hxx>
|
|
|
|
#include <svl/stritem.hxx>
|
2000-09-18 16:15:01 +00:00
|
|
|
#include <vcl/msgbox.hxx>
|
|
|
|
#include <vcl/svapp.hxx>
|
2004-01-07 15:34:42 +00:00
|
|
|
#include <vcl/mnemonic.hxx>
|
2009-10-16 00:05:16 +02:00
|
|
|
#include <svl/style.hxx>
|
|
|
|
#include <svl/zformat.hxx>
|
2000-09-18 16:15:01 +00:00
|
|
|
#include <svx/htmlmode.hxx>
|
2010-01-08 18:32:51 +01:00
|
|
|
#include <editeng/unolingu.hxx>
|
2000-09-18 16:15:01 +00:00
|
|
|
#include <sfx2/app.hxx>
|
2009-10-16 00:05:16 +02:00
|
|
|
#include <svl/itemset.hxx>
|
2013-02-12 13:41:53 -05:00
|
|
|
#include <editeng/brushitem.hxx>
|
2010-01-08 18:32:51 +01:00
|
|
|
#include <editeng/boxitem.hxx>
|
2000-09-18 16:15:01 +00:00
|
|
|
#include <svx/rulritem.hxx>
|
2004-08-23 07:48:00 +00:00
|
|
|
#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>
|
2002-02-01 11:51:13 +00:00
|
|
|
#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>
|
2001-07-19 15:59:17 +00:00
|
|
|
#include <SwStyleNameMapper.hxx>
|
2002-08-21 11:23:43 +00:00
|
|
|
#include <comphelper/uno3.hxx>
|
2004-08-23 07:48:00 +00:00
|
|
|
#include "tabsh.hxx"
|
2007-09-27 10:30:48 +00:00
|
|
|
#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>
|
2007-09-27 10:30:48 +00:00
|
|
|
|
2004-08-23 07:48:00 +00:00
|
|
|
namespace swui
|
|
|
|
{
|
|
|
|
SwAbstractDialogFactory * GetFactory();
|
|
|
|
}
|
|
|
|
|
2007-09-27 10:30:48 +00:00
|
|
|
using namespace ::com::sun::star;
|
2012-08-29 09:32:55 +02:00
|
|
|
using namespace ::com::sun::star::beans;
|
2007-09-27 10:30:48 +00:00
|
|
|
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;
|
2012-08-29 09:32:55 +02:00
|
|
|
using namespace ::com::sun::star::uno;
|
2000-09-18 16:15:01 +00:00
|
|
|
|
|
|
|
const char cDBFldStart = '<';
|
|
|
|
const char cDBFldEnd = '>';
|
2004-08-23 07:48:00 +00:00
|
|
|
|
2011-02-25 22:21:36 +01:00
|
|
|
// Helper structure for adding database rows as fields or text
|
2000-09-18 16:15:01 +00:00
|
|
|
struct _DB_Column
|
|
|
|
{
|
2005-04-04 06:45:07 +00:00
|
|
|
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;
|
2011-01-17 15:06:54 +01:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
_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;
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_Bool bIsTable : 1,
|
2000-09-18 16:15:01 +00:00
|
|
|
bIsField : 1,
|
|
|
|
bIsHeadlineOn : 1,
|
|
|
|
bIsEmptyHeadln : 1;
|
|
|
|
|
|
|
|
_DB_ColumnConfigData()
|
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
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
|
|
|
|
{
|
2001-04-27 16:18:14 +00:00
|
|
|
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,
|
2001-02-21 11:27:37 +00:00
|
|
|
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 )),
|
2007-09-27 10:30:48 +00:00
|
|
|
|
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 )),
|
2007-09-27 10:30:48 +00:00
|
|
|
|
|
|
|
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 )),
|
|
|
|
|
2007-09-27 10:30:48 +00:00
|
|
|
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),
|
2007-09-27 10:30:48 +00:00
|
|
|
|
|
|
|
aOldNumFmtLnk( aLbDbFmtFromUsr.GetSelectHdl() ),
|
|
|
|
sNoTmpl( SW_RES( STR_NOTEMPL )),
|
2000-09-18 16:15:01 +00:00
|
|
|
pView( &rView ),
|
|
|
|
pTAutoFmt( 0 ),
|
|
|
|
pTblSet( 0 ),
|
2007-09-27 10:30:48 +00:00
|
|
|
pRep( 0 )
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
|
|
|
FreeResource();
|
|
|
|
|
2013-01-21 14:32:09 +01:00
|
|
|
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;
|
2007-09-27 10:30:48 +00:00
|
|
|
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);
|
2007-09-27 10:30:48 +00:00
|
|
|
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())
|
|
|
|
{
|
2007-09-27 10:30:48 +00:00
|
|
|
Reference< util::XNumberFormatsSupplier> xSuppl;
|
2001-09-06 12:36:15 +00:00
|
|
|
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++)
|
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
SwInsDBColumn* pNew = new SwInsDBColumn( pColNames[n], (sal_uInt16)n );
|
2000-09-18 16:15:01 +00:00
|
|
|
Any aCol = xCols->getByName(pColNames[n]);
|
2001-09-06 12:36:15 +00:00
|
|
|
Reference <XPropertySet> xCol;
|
|
|
|
aCol >>= xCol;
|
2012-07-02 16:02:38 +01:00
|
|
|
Any aType = xCol->getPropertyValue(rtl::OUString("Type"));
|
2007-11-12 15:30:41 +00:00
|
|
|
sal_Int32 eDataType = 0;
|
2000-09-18 16:15:01 +00:00
|
|
|
aType >>= eDataType;
|
|
|
|
switch(eDataType)
|
|
|
|
{
|
|
|
|
case DataType::BIT:
|
2005-02-17 09:37:38 +00:00
|
|
|
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:
|
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
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())
|
|
|
|
{
|
2007-11-12 15:30:41 +00:00
|
|
|
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;
|
2007-09-27 10:30:48 +00:00
|
|
|
aFormatVal >>= sFormat;
|
|
|
|
lang::Locale aLoc;
|
2000-09-18 16:15:01 +00:00
|
|
|
aLocale >>= aLoc;
|
2001-01-26 12:22:20 +00:00
|
|
|
long nKey = xDocNumberFormats->queryKey( sFormat, aLoc, sal_True);
|
|
|
|
if(nKey < 0)
|
|
|
|
{
|
2002-09-27 12:18:44 +00:00
|
|
|
nKey = xDocNumberFormats->addNew( sFormat, aLoc );
|
2001-01-26 12:22:20 +00:00
|
|
|
}
|
2002-09-27 12:18:44 +00:00
|
|
|
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
|
|
|
{
|
2011-03-12 11:51:35 +01:00
|
|
|
OSL_FAIL("illegal number format key");
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
2001-08-30 12:56:46 +00:00
|
|
|
{
|
2002-08-21 11:23:43 +00:00
|
|
|
pNew->nDBNumFmt = SwNewDBMgr::GetDbtoolsClient().getDefaultNumberFormat(xCol,
|
2012-11-24 18:54:09 +01:00
|
|
|
xDocNumberFormatTypes, LanguageTag( rSh.GetCurLang() ).getLocale());
|
2001-08-30 12:56:46 +00:00
|
|
|
}
|
2000-09-18 16:15:01 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
2012-07-13 14:47:46 +02:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-02-25 22:21:36 +01:00
|
|
|
// 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 );
|
|
|
|
}
|
|
|
|
|
2011-02-25 22:21:36 +01:00
|
|
|
// 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() )
|
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
aRbAsTable.Enable( sal_False );
|
|
|
|
aRbAsField.Check( sal_True );
|
|
|
|
aRbDbFmtFromDb.Check( sal_True );
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
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 ));
|
|
|
|
|
2012-07-13 14:47:46 +02:00
|
|
|
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
|
|
|
|
2011-02-25 22:21:36 +01: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 )
|
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_Bool bShowTbl = pButton == &aRbAsTable;
|
2000-09-18 16:15:01 +00:00
|
|
|
|
|
|
|
String sTxt( pButton->GetText() );
|
2004-01-07 15:34:42 +00:00
|
|
|
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 );
|
2012-07-13 14:47:46 +02:00
|
|
|
SwInsDBColumns::const_iterator it = aDBColumns.find( &aSrch );
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_Bool bFromDB = &aRbDbFmtFromDb == pButton;
|
2012-07-13 14:47:46 +02:00
|
|
|
(*it)->bIsDBFmt = bFromDB;
|
2000-09-18 16:15:01 +00:00
|
|
|
aLbDbFmtFromUsr.Enable( !bFromDB );
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
IMPL_LINK( SwInsertDBColAutoPilot, TblToFromHdl, Button*, pButton )
|
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
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
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
bEnableTo = sal_False;
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2011-01-17 15:06:54 +01: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() )
|
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
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() )
|
|
|
|
{
|
2012-07-13 14:47:46 +02:00
|
|
|
sal_uInt16 nInsPos,
|
2000-09-18 16:15:01 +00:00
|
|
|
nDelPos = aLbTableCol.GetSelectEntryPos(),
|
|
|
|
nTopPos = aLbTableCol.GetTopEntry();
|
|
|
|
|
2011-02-25 22:21:36 +01:00
|
|
|
// look for the right InsertPos!!
|
2000-09-18 16:15:01 +00:00
|
|
|
SwInsDBColumn aSrch( aLbTableCol.GetEntry( nDelPos ), 0 );
|
2012-07-13 14:47:46 +02:00
|
|
|
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;
|
2012-07-13 14:47:46 +02:00
|
|
|
while( ++it != aDBColumns.end() &&
|
2000-09-18 16:15:01 +00:00
|
|
|
LISTBOX_ENTRY_NOTFOUND == (nInsPos = aLbTblDbColumn.
|
2012-07-13 14:47:46 +02:00
|
|
|
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
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
bEnableFrom = sal_False;
|
2000-09-18 16:15:01 +00:00
|
|
|
|
|
|
|
aLbTblDbColumn.Clear();
|
|
|
|
aLbTableCol.Clear();
|
2012-07-13 14:47:46 +02:00
|
|
|
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
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
bChgEnable = sal_False;
|
2011-02-25 22:21:36 +01:00
|
|
|
// move data to Edit:
|
2000-09-18 16:15:01 +00:00
|
|
|
String aFld( aLbTxtDbColumn.GetSelectEntry() );
|
|
|
|
if( aFld.Len() )
|
|
|
|
{
|
|
|
|
String aStr( aEdDbText.GetText() );
|
2011-01-17 15:06:54 +01:00
|
|
|
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 )
|
2011-02-25 22:21:36 +01:00
|
|
|
// 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() )
|
|
|
|
{
|
2011-02-25 22:21:36 +01:00
|
|
|
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 );
|
|
|
|
}
|
2011-02-25 22:21:36 +01:00
|
|
|
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 );
|
2007-09-27 10:30:48 +00:00
|
|
|
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
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
aRbDbFmtFromDb.Enable( sal_False );
|
|
|
|
aRbDbFmtFromUsr.Enable( sal_False );
|
|
|
|
aLbDbFmtFromUsr.Enable( sal_False );
|
2000-09-18 16:15:01 +00:00
|
|
|
|
|
|
|
aPbTblFormat.Enable( bEnableFrom );
|
|
|
|
}
|
2011-01-17 15:06:54 +01:00
|
|
|
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();
|
2013-01-10 00:02:56 +09:00
|
|
|
bool bNewSet = false;
|
2000-09-18 16:15:01 +00:00
|
|
|
if( !pTblSet )
|
|
|
|
{
|
2013-01-10 00:02:56 +09:00
|
|
|
bNewSet = true;
|
2004-08-23 07:48:00 +00:00
|
|
|
pTblSet = new SfxItemSet( rSh.GetAttrPool(), SwuiGetUITableAttrRange() );
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2011-02-25 22:21:36 +01:00
|
|
|
// At first acquire the simple attributes
|
2000-09-18 16:15:01 +00:00
|
|
|
pTblSet->Put( SfxStringItem( FN_PARAM_TABLE_NAME, rSh.GetUniqueTblName() ));
|
2004-05-03 12:53:12 +00:00
|
|
|
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 );
|
|
|
|
|
2007-05-10 15:15:17 +00:00
|
|
|
SvxBoxInfoItem aBoxInfo( SID_ATTR_BORDER_INNER );
|
2011-02-25 22:21:36 +01:00
|
|
|
// table variant, when multiple table cells are selected
|
2011-01-17 15:06:54 +01:00
|
|
|
aBoxInfo.SetTable( sal_True );
|
2011-02-25 22:21:36 +01:00
|
|
|
// always show gap field
|
2011-01-17 15:06:54 +01:00
|
|
|
aBoxInfo.SetDist( sal_True);
|
2011-02-25 22:21:36 +01:00
|
|
|
// set minimum size in tables and paragraphs
|
2011-01-17 15:06:54 +01:00
|
|
|
aBoxInfo.SetMinDist( sal_False );
|
2011-02-25 22:21:36 +01:00
|
|
|
// always set default-gap
|
2000-09-18 16:15:01 +00:00
|
|
|
aBoxInfo.SetDefDist( MIN_BORDER_DIST );
|
2011-02-25 22:21:36 +01:00
|
|
|
// Single lines can have DontCare-status only in tables
|
2011-01-17 15:06:54 +01:00
|
|
|
aBoxInfo.SetValid( VALID_DISABLE, sal_True );
|
2000-09-18 16:15:01 +00:00
|
|
|
pTblSet->Put( aBoxInfo );
|
|
|
|
|
|
|
|
SwGetCurColNumPara aPara;
|
2011-01-17 15:06:54 +01:00
|
|
|
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();
|
|
|
|
|
2011-02-25 22:21:36 +01:00
|
|
|
// initialise nStart und nEnd for nNum == 0
|
2000-09-18 16:15:01 +00:00
|
|
|
long nWidth1 = 0,
|
|
|
|
nStart1 = 0,
|
|
|
|
nEnd1 = nWidth;
|
2011-01-17 15:06:54 +01:00
|
|
|
for( sal_uInt16 i = 0; i < nNum; ++i )
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2012-04-25 12:12:02 +02:00
|
|
|
const SwColumn* pCol = &rCols[i];
|
2000-09-18 16:15:01 +00:00
|
|
|
nStart1 = pCol->GetLeft() + nWidth1;
|
2011-01-17 15:06:54 +01:00
|
|
|
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(
|
2011-01-17 15:06:54 +01:00
|
|
|
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 );
|
2012-12-07 09:59:24 +01:00
|
|
|
pRep = new SwTableRep( aTabCols );
|
2007-09-27 10:30:48 +00:00
|
|
|
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() )
|
|
|
|
{
|
2011-02-25 22:21:36 +01:00
|
|
|
// Number of columns has changed: then the TabCols have to be adjusted
|
2000-09-18 16:15:01 +00:00
|
|
|
long nWidth = pRep->GetWidth();
|
2011-01-17 15:06:54 +01:00
|
|
|
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 )
|
2011-01-17 15:06:54 +01:00
|
|
|
for( sal_uInt16 n = 0, nStep = (sal_uInt16)(nWidth / (nCols+1)), nW = nStep;
|
2007-09-27 10:30:48 +00:00
|
|
|
n < nCols; ++n, nW = nW + nStep )
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
aTabCols.Insert( nW, sal_False, n );
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
delete pRep;
|
2012-12-07 09:59:24 +01:00
|
|
|
pRep = new SwTableRep( aTabCols );
|
2007-09-27 10:30:48 +00:00
|
|
|
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 ));
|
|
|
|
}
|
|
|
|
|
2007-09-27 10:30:48 +00:00
|
|
|
SwAbstractDialogFactory* pFact = swui::GetFactory();
|
2010-10-20 15:36:15 +01:00
|
|
|
OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
|
2007-09-27 10:30:48 +00:00
|
|
|
|
2013-01-18 13:33:47 +00:00
|
|
|
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 )
|
|
|
|
{
|
2007-09-27 10:30:48 +00:00
|
|
|
SwAbstractDialogFactory* pFact = swui::GetFactory();
|
2010-10-20 15:36:15 +01:00
|
|
|
OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
|
2007-09-27 10:30:48 +00:00
|
|
|
|
2012-09-25 11:35:47 +01:00
|
|
|
AbstractSwAutoFormatDlg* pDlg = pFact->CreateSwAutoFormatDlg(pButton, pView->GetWrtShellPtr(), sal_False, pTAutoFmt);
|
2010-10-20 15:36:15 +01:00
|
|
|
OSL_ENSURE(pDlg, "Dialogdiet fail!");
|
2007-09-27 10:30:48 +00:00
|
|
|
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 );
|
2012-07-13 14:47:46 +02:00
|
|
|
SwInsDBColumns::const_iterator it = aDBColumns.find( &aSrch );
|
2000-09-18 16:15:01 +00:00
|
|
|
|
|
|
|
if( pBox == &aLbDbFmtFromUsr )
|
|
|
|
{
|
2012-01-17 17:47:34 -02:00
|
|
|
if( !aSrch.sColumn.isEmpty() )
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
|
|
|
aOldNumFmtLnk.Call( pBox );
|
2012-07-13 14:47:46 +02:00
|
|
|
(*it)->nUsrNumFmt = aLbDbFmtFromUsr.GetFormat();
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2011-02-25 22:21:36 +01:00
|
|
|
// set the selected FieldName at the FormatGroupBox, so that
|
|
|
|
// it's clear what field is configured by the format!
|
2013-01-21 14:32:09 +01:00
|
|
|
String sTxt( aFlFormat.GetText().copy( 0, nGBFmtLen ));
|
2012-01-17 17:47:34 -02:00
|
|
|
if( aSrch.sColumn.isEmpty() )
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
aRbDbFmtFromDb.Enable( sal_False );
|
|
|
|
aRbDbFmtFromUsr.Enable( sal_False );
|
|
|
|
aLbDbFmtFromUsr.Enable( sal_False );
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2012-07-13 14:47:46 +02:00
|
|
|
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
|
|
|
{
|
2012-07-02 16:02:38 +01: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
|
|
|
|
2012-07-13 14:47:46 +02: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 )
|
2012-07-13 14:47:46 +02:00
|
|
|
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
|
|
|
|
2011-02-25 22:21:36 +01: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 )
|
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_Bool bEnable = aCbTableHeadon.IsChecked();
|
2000-09-18 16:15:01 +00:00
|
|
|
|
|
|
|
aRbHeadlColnms.Enable( bEnable );
|
|
|
|
aRbHeadlEmpty.Enable( bEnable );
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2004-08-23 07:48:00 +00:00
|
|
|
static void lcl_InsTextInArr( const String& rTxt, _DB_Columns& rColArr )
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
|
|
|
_DB_Column* pNew;
|
2011-01-17 15:06:54 +01:00
|
|
|
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 ) );
|
2012-04-25 12:12:51 +02:00
|
|
|
rColArr.push_back( pNew );
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
pNew = new _DB_Column;
|
2012-04-25 12:12:51 +02:00
|
|
|
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 ) );
|
2012-04-25 12:12:51 +02:00
|
|
|
rColArr.push_back( pNew );
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-02-05 23:42:42 +09:00
|
|
|
bool SwInsertDBColAutoPilot::SplitTextToColArr( const String& rTxt,
|
2000-09-18 16:15:01 +00:00
|
|
|
_DB_Columns& rColArr,
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_Bool bInsField )
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2011-02-25 22:21:36 +01: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 );
|
2011-01-17 15:06:54 +01:00
|
|
|
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 )))
|
|
|
|
{
|
2011-02-25 22:21:36 +01:00
|
|
|
// Text in <> brackets found: what is it:
|
2000-09-18 16:15:01 +00:00
|
|
|
SwInsDBColumn aSrch( sTxt.Copy( nSttPos, nEndPos - nSttPos ), 0);
|
2012-07-13 14:47:46 +02:00
|
|
|
SwInsDBColumns::const_iterator it = aDBColumns.find( &aSrch );
|
|
|
|
if( it != aDBColumns.end() )
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2011-02-25 22:21:36 +01:00
|
|
|
// that is a valid field
|
|
|
|
// so surely the text "before":
|
2012-07-13 14:47:46 +02:00
|
|
|
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 );
|
|
|
|
}
|
|
|
|
|
2004-03-17 11:18:59 +00:00
|
|
|
sTxt.Erase( 0, (xub_StrLen)(rFndCol.sColumn.getLength() + 2) );
|
2000-09-18 16:15:01 +00:00
|
|
|
nSttPos = 0;
|
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
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;
|
2007-09-27 10:30:48 +00:00
|
|
|
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,
|
2001-02-21 11:27:37 +00:00
|
|
|
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 );
|
|
|
|
|
2012-04-25 12:12:51 +02:00
|
|
|
rColArr.push_back( pNew );
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-02-25 22:21:36 +01:00
|
|
|
// don't forget the last text
|
2000-09-18 16:15:01 +00:00
|
|
|
if( sTxt.Len() )
|
|
|
|
::lcl_InsTextInArr( sTxt, rColArr );
|
|
|
|
|
2012-04-25 12:12:51 +02:00
|
|
|
return !rColArr.empty();
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
|
2001-06-06 11:01:40 +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
|
|
|
{
|
2001-06-06 11:01:40 +00:00
|
|
|
const Any* pSelection = rSelection.getLength() ? rSelection.getConstArray() : 0;
|
2000-09-18 16:15:01 +00:00
|
|
|
SwWrtShell& rSh = pView->GetWrtShell();
|
|
|
|
|
2000-12-05 11:26:36 +00:00
|
|
|
//with the drag and drop interface no result set is initially available
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_Bool bDisposeResultSet = sal_False;
|
2002-08-21 11:23:43 +00:00
|
|
|
// 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
|
|
|
{
|
2002-08-21 11:23:43 +00:00
|
|
|
xResultSet = SwNewDBMgr::createCursor(aDBData.sDataSource,aDBData.sCommand,aDBData.nCommandType,xConnection);
|
|
|
|
bDisposeResultSet = xResultSet.is();
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
2002-08-21 11:23:43 +00:00
|
|
|
|
|
|
|
Reference< sdbc::XRow > xRow(xResultSet, UNO_QUERY);
|
|
|
|
if ( !xRow.is() )
|
2000-09-18 16:15:01 +00:00
|
|
|
return;
|
2001-02-08 13:30:09 +00:00
|
|
|
|
2000-09-18 16:15:01 +00:00
|
|
|
rSh.StartAllAction();
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_Bool bUndo = rSh.DoesUndo();
|
2001-02-08 13:30:09 +00:00
|
|
|
if( bUndo )
|
2007-09-27 10:30:48 +00:00
|
|
|
rSh.StartUndo( UNDO_EMPTY );
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_Bool bAsTable = aRbAsTable.IsChecked();
|
2000-09-18 16:15:01 +00:00
|
|
|
SvNumberFormatter& rNumFmtr = *rSh.GetNumberFormatter();
|
|
|
|
|
|
|
|
if( rSh.HasSelection() )
|
|
|
|
rSh.DelRight();
|
|
|
|
|
2002-08-21 11:23:43 +00:00
|
|
|
::std::auto_ptr<SwWait> pWait;
|
|
|
|
|
|
|
|
Reference< XColumnsSupplier > xColsSupp( xResultSet, UNO_QUERY );
|
|
|
|
Reference <XNameAccess> xCols = xColsSupp->getColumns();
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2001-02-08 13:30:09 +00:00
|
|
|
do{ // middle checked loop!!
|
|
|
|
if( bAsTable ) // Daten als Tabelle einfuegen
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
rSh.DoUndo( sal_False );
|
2001-02-08 13:30:09 +00:00
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
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 )
|
2011-01-17 15:06:54 +01:00
|
|
|
nRows = nRows + (sal_uInt16)rSelection.getLength();
|
2000-09-18 16:15:01 +00:00
|
|
|
else
|
|
|
|
++nRows;
|
|
|
|
|
2011-02-25 22:21:36 +01:00
|
|
|
// prepare the array for the selected columns
|
2012-07-13 14:47:46 +02:00
|
|
|
std::vector<SwInsDBColumn*> aColFlds;
|
2000-09-18 16:15:01 +00:00
|
|
|
for( n = 0; n < nCols; ++n )
|
|
|
|
{
|
|
|
|
SwInsDBColumn aSrch( aLbTableCol.GetEntry( n ), 0 );
|
2012-07-13 14:47:46 +02:00
|
|
|
SwInsDBColumns::const_iterator it = aDBColumns.find( &aSrch );
|
2013-02-12 14:48:56 +01:00
|
|
|
if (it != aDBColumns.end())
|
|
|
|
aColFlds.push_back(*it);
|
2008-04-22 14:04:47 +00:00
|
|
|
else {
|
2010-10-20 15:36:15 +01:00
|
|
|
OSL_ENSURE( !this, "database column not found" );
|
2008-04-22 14:04:47 +00:00
|
|
|
}
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
|
2012-07-13 14:47:46 +02: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" );
|
2012-07-13 14:47:46 +02:00
|
|
|
nCols = aColFlds.size();
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
|
2000-12-08 09:19:55 +00:00
|
|
|
if(!nRows || !nCols)
|
2001-02-08 13:30:09 +00:00
|
|
|
{
|
2010-10-20 15:36:15 +01:00
|
|
|
OSL_ENSURE( !this, "wrong parameters" );
|
2001-02-08 13:30:09 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2000-09-18 16:15:01 +00:00
|
|
|
const SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig();
|
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_Bool bHTML = 0 != (::GetHtmlMode( pView->GetDocShell() ) & HTMLMODE_ON);
|
2004-05-03 12:53:12 +00:00
|
|
|
rSh.InsertTable(
|
|
|
|
pModOpt->GetInsTblFlags(bHTML),
|
2007-09-27 10:30:48 +00:00
|
|
|
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 );
|
2011-01-17 15:06:54 +01:00
|
|
|
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
|
2004-05-03 12:53:12 +00:00
|
|
|
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
|
|
|
{
|
2013-01-10 00:02:56 +09:00
|
|
|
bool bBreak = false;
|
2000-09-18 16:15:01 +00:00
|
|
|
try
|
|
|
|
{
|
2002-08-21 11:23:43 +00:00
|
|
|
if(pSelection)
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2007-11-12 15:30:41 +00:00
|
|
|
sal_Int32 nPos = 0;
|
|
|
|
pSelection[i] >>= nPos;
|
2002-08-21 11:23:43 +00:00
|
|
|
bBreak = !xResultSet->absolute(nPos);
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
else if(!i)
|
2002-08-21 11:23:43 +00:00
|
|
|
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
|
|
|
{
|
2013-01-10 00:02:56 +09:00
|
|
|
bBreak = true;
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
if(bBreak)
|
|
|
|
break;
|
2002-08-21 11:23:43 +00:00
|
|
|
|
2000-09-18 16:15:01 +00:00
|
|
|
for( n = 0; n < nCols; ++n )
|
|
|
|
{
|
2011-02-25 22:21:36 +01:00
|
|
|
// 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 ];
|
2002-08-21 11:23:43 +00:00
|
|
|
|
|
|
|
Reference< XColumn > xColumn;
|
|
|
|
xCols->getByName(pEntry->sColumn) >>= xColumn;
|
2006-04-27 08:46:15 +00:00
|
|
|
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");
|
2006-04-27 08:46:15 +00:00
|
|
|
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 );
|
|
|
|
}
|
2006-04-27 08:46:15 +00:00
|
|
|
//#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
|
|
|
{
|
2002-08-21 11:23:43 +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 )
|
2011-01-17 15:06:54 +01:00
|
|
|
pWait = ::std::auto_ptr<SwWait>(new SwWait( *pView->GetDocShell(), sal_True ));
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
|
2007-09-27 10:30:48 +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 );
|
|
|
|
}
|
2011-02-25 22:21:36 +01:00
|
|
|
else // add data as fields/text
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
|
|
|
_DB_Columns aColArr;
|
|
|
|
if( SplitTextToColArr( aEdDbText.GetText(), aColArr, aRbAsField.IsChecked() ) )
|
|
|
|
{
|
2011-02-25 22:21:36 +01:00
|
|
|
// 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();
|
2002-02-01 11:51:13 +00:00
|
|
|
rSh.SwCrsrShell::Left(1,CRSR_SKIP_CHARS);
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
rSh.DoUndo( sal_False );
|
2001-02-08 13:30:09 +00:00
|
|
|
|
2000-09-18 16:15:01 +00:00
|
|
|
SwTxtFmtColl* pColl = 0;
|
|
|
|
{
|
|
|
|
String sTmplNm( aLbDbParaColl.GetSelectEntry() );
|
|
|
|
if( sNoTmpl != sTmplNm )
|
|
|
|
{
|
|
|
|
pColl = rSh.FindTxtFmtCollByName( sTmplNm );
|
|
|
|
if( !pColl )
|
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
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 );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-02-25 22:21:36 +01:00
|
|
|
// 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() );
|
2012-08-29 09:32:55 +02:00
|
|
|
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");
|
2004-03-17 11:18:59 +00:00
|
|
|
if(aFormats.hasValue())
|
|
|
|
{
|
2007-09-27 10:30:48 +00:00
|
|
|
Reference< util::XNumberFormatsSupplier> xSuppl;
|
2004-03-17 11:18:59 +00:00
|
|
|
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");
|
2001-09-06 12:36:15 +00:00
|
|
|
aNull >>= aDBFormatData.aNullDate;
|
2004-03-17 11:18:59 +00:00
|
|
|
if(aDBFormatData.xFormatter.is())
|
|
|
|
aDBFormatData.xFormatter->attachNumberFormatsSupplier(xSuppl);
|
|
|
|
}
|
|
|
|
}
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
2012-11-24 18:54:09 +01:00
|
|
|
aDBFormatData.aLocale = LanguageTag( rSh.GetCurLang() ).getLocale();
|
2000-09-18 16:15:01 +00:00
|
|
|
SwDBNextSetField aNxtDBFld( (SwDBNextSetFieldType*)rSh.
|
|
|
|
GetFldType( 0, RES_DBNEXTSETFLD ),
|
2012-07-02 16:02:38 +01:00
|
|
|
rtl::OUString("1"), aEmptyStr, aDBData );
|
2000-09-18 16:15:01 +00:00
|
|
|
|
|
|
|
|
2013-01-10 00:02:56 +09:00
|
|
|
bool bSetCrsr = true;
|
2012-04-25 12:12:51 +02:00
|
|
|
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
|
|
|
{
|
2013-01-10 00:02:56 +09:00
|
|
|
bool bBreak = false;
|
2000-09-18 16:15:01 +00:00
|
|
|
try
|
|
|
|
{
|
2002-08-21 11:23:43 +00:00
|
|
|
if(pSelection)
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2007-11-12 15:30:41 +00:00
|
|
|
sal_Int32 nPos = 0;
|
|
|
|
pSelection[i] >>= nPos;
|
2002-08-21 11:23:43 +00:00
|
|
|
bBreak = !xResultSet->absolute(nPos);
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
else if(!i)
|
2002-08-21 11:23:43 +00:00
|
|
|
bBreak = !xResultSet->first();
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
2011-07-26 23:49:42 +01:00
|
|
|
catch (const Exception&)
|
2002-08-21 11:23:43 +00:00
|
|
|
{
|
2013-01-10 00:02:56 +09:00
|
|
|
bBreak = true;
|
2002-08-21 11:23:43 +00:00
|
|
|
}
|
|
|
|
|
2000-09-18 16:15:01 +00:00
|
|
|
if(bBreak)
|
|
|
|
break;
|
2002-08-21 11:23:43 +00:00
|
|
|
|
|
|
|
|
2000-09-18 16:15:01 +00:00
|
|
|
for( n = 0; n < nCols; ++n )
|
|
|
|
{
|
2012-04-25 12:12:51 +02:00
|
|
|
_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();
|
2011-02-25 22:21:36 +01:00
|
|
|
// 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:
|
|
|
|
{
|
2010-05-21 15:21:49 +02:00
|
|
|
SwDBField *const pFld = static_cast<SwDBField *>(
|
|
|
|
pDBCol->DB_ColumnData.pField->CopyField());
|
2000-09-18 16:15:01 +00:00
|
|
|
double nValue = DBL_MAX;
|
2002-08-21 11:23:43 +00:00
|
|
|
|
2000-09-18 16:15:01 +00:00
|
|
|
Reference< XPropertySet > xColumnProps;
|
2002-08-21 11:23:43 +00:00
|
|
|
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 )
|
2005-11-04 15:01:25 +00:00
|
|
|
{
|
2012-12-21 12:00:43 +01:00
|
|
|
Any aType = xColumnProps->getPropertyValue("Type");
|
2007-11-12 15:30:41 +00:00
|
|
|
sal_Int32 eDataType = 0;
|
2005-11-04 15:01:25 +00:00
|
|
|
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);
|
|
|
|
}
|
2011-01-17 15:06:54 +01:00
|
|
|
pFld->ChgValue( nValue, sal_True );
|
2005-11-04 15:01:25 +00:00
|
|
|
}
|
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;
|
2002-08-21 11:23:43 +00:00
|
|
|
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;
|
2004-03-17 11:18:59 +00:00
|
|
|
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() )
|
|
|
|
{
|
2011-02-25 22:21:36 +01:00
|
|
|
// to the beginning and set a mark, so that
|
|
|
|
// the cursor can be set to the initial position
|
|
|
|
// at the end.
|
2004-08-23 07:48:00 +00:00
|
|
|
|
|
|
|
rSh.SwCrsrShell::MovePara(
|
2004-09-24 15:16:57 +00:00
|
|
|
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 );
|
2004-08-23 07:48:00 +00:00
|
|
|
rSh.SwCrsrShell::MovePara(
|
2004-09-24 15:16:57 +00:00
|
|
|
GetfnParaCurr(), GetfnParaEnd() );
|
2013-01-10 00:02:56 +09:00
|
|
|
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
|
|
|
{
|
2011-01-17 15:06:54 +01: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 )
|
2011-01-17 15:06:54 +01:00
|
|
|
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
|
|
|
{
|
2001-02-08 13:30:09 +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();
|
2013-03-03 00:44:38 +09:00
|
|
|
}while( false ); // middle checked loop
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2001-02-08 13:30:09 +00:00
|
|
|
if( bUndo )
|
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
rSh.DoUndo( sal_True );
|
2001-02-08 13:30:09 +00:00
|
|
|
rSh.AppendUndoForInsertFromDB( bAsTable );
|
2007-09-27 10:30:48 +00:00
|
|
|
rSh.EndUndo( UNDO_EMPTY );
|
2001-02-08 13:30:09 +00:00
|
|
|
}
|
|
|
|
rSh.ClearMark();
|
2000-09-18 16:15:01 +00:00
|
|
|
rSh.EndAllAction();
|
2001-10-16 10:10:55 +00:00
|
|
|
|
2002-08-21 11:23:43 +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() )
|
|
|
|
{
|
2011-02-25 22:21:36 +01:00
|
|
|
// 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
|
|
|
|
{
|
2011-02-25 22:21:36 +01:00
|
|
|
// remove the defaults again, it makes no sense to set them
|
2000-09-18 16:15:01 +00:00
|
|
|
SvxBrushItem aBrush( RES_BACKGROUND );
|
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 ],
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_False, &pItem ) && *pItem == aBrush )
|
2000-09-18 16:15:01 +00:00
|
|
|
pTblSet->ClearItem( aIds[ i ] );
|
|
|
|
}
|
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
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 );
|
|
|
|
|
2007-09-27 10:30:48 +00:00
|
|
|
rSh.MoveTable( GetfnTableCurr(), GetfnTableStart() );
|
2000-09-18 16:15:01 +00:00
|
|
|
rSh.SetMark();
|
2007-09-27 10:30:48 +00:00
|
|
|
rSh.MoveTable( GetfnTableCurr(), GetfnTableEnd() );
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2004-08-23 07:48:00 +00:00
|
|
|
ItemSetToTableParam( *pTblSet, rSh );
|
2000-09-18 16:15:01 +00:00
|
|
|
|
|
|
|
rSh.ClearMark();
|
2007-09-27 10:30:48 +00:00
|
|
|
rSh.MoveTable( GetfnTableCurr(), GetfnTableStart() );
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
_DB_ColumnConfigData::~_DB_ColumnConfigData() {}
|
|
|
|
|
2004-08-23 07:48:00 +00:00
|
|
|
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();
|
2001-02-08 13:30:09 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
2004-08-23 07:48:00 +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();
|
2001-02-08 13:30:09 +00:00
|
|
|
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
|
|
|
|
2004-08-23 07:48:00 +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;
|
2013-01-10 00:02:56 +09:00
|
|
|
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++);
|
2013-01-10 00:02:56 +09:00
|
|
|
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)
|
|
|
|
{
|
2013-01-10 00:02:56 +09:00
|
|
|
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
|
|
|
}
|
|
|
|
|
2009-11-04 15:39:48 +01:00
|
|
|
void SwInsertDBColAutoPilot::Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& ) {}
|
2009-10-16 00:05:16 +02:00
|
|
|
|
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;
|
2001-02-21 11:27:37 +00:00
|
|
|
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);
|
2001-02-21 11:27:37 +00:00
|
|
|
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;
|
2011-01-17 15:06:54 +01:00
|
|
|
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);
|
2001-02-08 13:30:09 +00:00
|
|
|
|
2012-12-21 12:00:43 +01:00
|
|
|
sNewNode += "/ColumnSet";
|
2012-07-02 16:02:38 +01:00
|
|
|
rtl::OUString sDelim("/__");
|
2001-02-08 13:30:09 +00:00
|
|
|
|
|
|
|
LanguageType ePrevLang = (LanguageType)-1;
|
2001-09-04 11:16:28 +00:00
|
|
|
rtl::OUString sPrevLang;
|
2001-02-08 13:30:09 +00:00
|
|
|
|
2000-12-08 09:19:55 +00:00
|
|
|
SvNumberFormatter& rNFmtr = *pView->GetWrtShell().GetNumberFormatter();
|
2012-07-13 14:47:46 +02:00
|
|
|
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];
|
2001-02-08 13:30:09 +00:00
|
|
|
String sColumnInsertNode(sColumnNode);
|
|
|
|
sColumnInsertNode += sDelim;
|
|
|
|
if( nCol < 100 )
|
|
|
|
sColumnInsertNode += '0';
|
|
|
|
if( nCol < 10 )
|
|
|
|
sColumnInsertNode += '0';
|
2013-02-20 00:18:07 +01:00
|
|
|
sColumnInsertNode += OUString::number( nCol );
|
2001-02-08 13:30:09 +00:00
|
|
|
|
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();
|
2003-12-01 16:32:12 +00:00
|
|
|
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);
|
|
|
|
|
2001-07-31 15:04:55 +00:00
|
|
|
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);
|
2012-11-27 14:39:05 +01:00
|
|
|
eLang = GetAppLanguage();
|
2000-12-08 09:19:55 +00:00
|
|
|
}
|
2001-02-08 13:30:09 +00:00
|
|
|
|
|
|
|
if( eLang != ePrevLang )
|
|
|
|
{
|
2012-11-24 18:54:09 +01:00
|
|
|
/* 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;
|
2001-02-08 13:30:09 +00:00
|
|
|
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;
|
2001-02-21 11:27:37 +00:00
|
|
|
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;
|
2002-08-07 13:29:06 +00:00
|
|
|
//check for existance of the loaded column name
|
2013-01-10 00:02:56 +09:00
|
|
|
bool bFound = false;
|
2012-07-13 14:47:46 +02:00
|
|
|
for(sal_uInt16 nRealColumn = 0; nRealColumn < aDBColumns.size(); nRealColumn++)
|
2002-08-07 13:29:06 +00:00
|
|
|
{
|
2012-07-13 14:47:46 +02:00
|
|
|
if(aDBColumns[nRealColumn]->sColumn == sColumn)
|
2002-08-07 13:29:06 +00:00
|
|
|
{
|
2013-01-10 00:02:56 +09:00
|
|
|
bFound = true;
|
2002-08-07 13:29:06 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(!bFound)
|
|
|
|
continue;
|
2007-11-12 15:30:41 +00:00
|
|
|
sal_Int16 nIndex = 0;
|
2000-12-08 09:19:55 +00:00
|
|
|
pSubProps[1] >>= nIndex;
|
2012-07-13 14:47:46 +02:00
|
|
|
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;
|
|
|
|
|
2012-11-27 11:24:59 +01:00
|
|
|
/* FIXME-BCP47: handle language tags, and cope with the wrong
|
|
|
|
* Country-Language string that
|
|
|
|
* SwInsertDBColAutoPilot::Commit() writes so far! */
|
2011-09-29 15:14:34 +02:00
|
|
|
lang::Locale aLocale;
|
2000-12-08 09:19:55 +00:00
|
|
|
aLocale.Language = sNumberFormatLocale.copy(0, 2);
|
|
|
|
aLocale.Country = sNumberFormatLocale.copy(3, 2);
|
2012-11-24 18:54:09 +01:00
|
|
|
pInsDBColumn->eUsrNumFmtLng = LanguageTag( aLocale ).getLanguageType();
|
2000-12-08 09:19:55 +00:00
|
|
|
|
|
|
|
pInsDBColumn->nUsrNumFmt = rNFmtr.GetEntryKey( pInsDBColumn->sUsrNumFmt,
|
|
|
|
pInsDBColumn->eUsrNumFmtLng );
|
|
|
|
|
|
|
|
|
2012-07-13 14:47:46 +02:00
|
|
|
pNewData->aDBColumns.insert(pInsDBColumn);
|
2000-12-08 09:19:55 +00:00
|
|
|
}
|
2011-01-17 15:06:54 +01: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 ) );
|
2002-08-07 13:29:06 +00:00
|
|
|
//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() )
|
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
aIbDbcolAllTo.Enable( sal_False );
|
|
|
|
aIbDbcolOneTo.Enable( sal_False );
|
2000-12-08 09:19:55 +00:00
|
|
|
}
|
2011-01-17 15:06:54 +01: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() )
|
|
|
|
{
|
2011-02-25 22:21:36 +01:00
|
|
|
// then load the AutoFmt file and look for Autoformat first
|
2000-12-08 09:19:55 +00:00
|
|
|
SwTableAutoFmtTbl aAutoFmtTbl;
|
|
|
|
aAutoFmtTbl.Load();
|
2012-05-09 14:24:47 +02:00
|
|
|
for( sal_uInt16 nAutoFmt = aAutoFmtTbl.size(); nAutoFmt; )
|
|
|
|
if( sTmp == aAutoFmtTbl[ --nAutoFmt ].GetName() )
|
2000-12-08 09:19:55 +00:00
|
|
|
{
|
2012-05-09 14:24:47 +02: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
|
|
|
|
2011-02-25 22:21:36 +01:00
|
|
|
// now copy the user defined Numberformat strings to the
|
|
|
|
// Shell. Then only these are available as ID
|
2012-07-13 14:47:46 +02:00
|
|
|
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 ];
|
2012-07-13 14:47:46 +02:00
|
|
|
for( sal_uInt16 m = 0; m < pNewData->aDBColumns.size() ; ++m )
|
2000-12-08 09:19:55 +00:00
|
|
|
{
|
2010-01-25 11:36:33 +01:00
|
|
|
SwInsDBColumn& rGet = *pNewData->aDBColumns[ m ];
|
2002-08-07 13:29:06 +00:00
|
|
|
if(rGet.sColumn == rSet.sColumn)
|
2000-12-08 09:19:55 +00:00
|
|
|
{
|
2002-08-07 13:29:06 +00:00
|
|
|
if( rGet.bHasFmt && !rGet.bIsDBFmt )
|
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
rSet.bIsDBFmt = sal_False;
|
2002-08-07 13:29:06 +00:00
|
|
|
rSet.nUsrNumFmt = rNFmtr.GetEntryKey( rGet.sUsrNumFmt,
|
|
|
|
rGet.eUsrNumFmtLng );
|
|
|
|
if( NUMBERFORMAT_ENTRY_NOT_FOUND == rSet.nUsrNumFmt )
|
|
|
|
{
|
2012-11-27 22:58:50 -06:00
|
|
|
sal_Int32 nCheckPos;
|
2002-08-07 13:29:06 +00:00
|
|
|
short nType;
|
2012-11-27 22:58:50 -06:00
|
|
|
rNFmtr.PutEntry( rGet.sUsrNumFmt, nCheckPos, nType,
|
2002-08-07 13:29:06 +00:00
|
|
|
rSet.nUsrNumFmt, rGet.eUsrNumFmtLng );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
2000-12-08 09:19:55 +00:00
|
|
|
}
|
|
|
|
}
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
|
2011-02-25 22:21:36 +01: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() )
|
2011-01-17 15:06:54 +01:00
|
|
|
aRbAsField.Check( sal_True );
|
2000-12-08 09:19:55 +00:00
|
|
|
delete pNewData;
|
|
|
|
break;
|
|
|
|
}
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-10-14 08:30:41 +02:00
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|