From ba079682ac262fd45add1a728726baac219a29db Mon Sep 17 00:00:00 2001 From: Kurt Zenker Date: Fri, 11 Sep 2009 11:10:31 +0000 Subject: 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 --- svx/source/cui/optaccessibility.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'svx') diff --git a/svx/source/cui/optaccessibility.cxx b/svx/source/cui/optaccessibility.cxx index 749e98a7d5c2..eb7cac6d8c5d 100644 --- a/svx/source/cui/optaccessibility.cxx +++ b/svx/source/cui/optaccessibility.cxx @@ -145,14 +145,14 @@ BOOL SvxAccessibilityOptionsTabPage::FillItemSet( SfxItemSet& ) if(m_pImpl->m_aConfig.IsModified()) m_pImpl->m_aConfig.Commit(); -#ifndef UNX AllSettings aAllSettings = Application::GetSettings(); MiscSettings aMiscSettings = aAllSettings.GetMiscSettings(); +#ifndef UNX aMiscSettings.SetEnableATToolSupport( m_aAccessibilityTool.IsChecked() ); +#endif aAllSettings.SetMiscSettings(aMiscSettings); Application::SetSettings(aAllSettings); Application::MergeSystemSettings( aAllSettings ); -#endif return FALSE; } -- cgit From 58b135a8ce92463eb5d9fc95241e147213fe9ed2 Mon Sep 17 00:00:00 2001 From: Kurt Zenker Date: Fri, 11 Sep 2009 12:01:22 +0000 Subject: 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 --- svx/source/dialog/imapwnd.cxx | 3 ++- svx/source/msfilter/msdffimp.cxx | 4 ++++ svx/source/svdraw/svdfppt.cxx | 41 +++++++++++++++++++++------------------- 3 files changed, 28 insertions(+), 20 deletions(-) (limited to 'svx') diff --git a/svx/source/dialog/imapwnd.cxx b/svx/source/dialog/imapwnd.cxx index 40c94d2128c3..d835dd1a129e 100644 --- a/svx/source/dialog/imapwnd.cxx +++ b/svx/source/dialog/imapwnd.cxx @@ -819,11 +819,12 @@ void IMapWindow::DoMacroAssign() if ( pSdrObj ) { - SfxItemSet aSet( *pIMapPool, SID_ATTR_MACROITEM, SID_ATTR_MACROITEM, SID_EVENTCONFIG, SID_EVENTCONFIG ); + SfxItemSet aSet( *pIMapPool, SID_ATTR_MACROITEM, SID_ATTR_MACROITEM, SID_EVENTCONFIG, SID_EVENTCONFIG, 0 ); SfxEventNamesItem aNamesItem(SID_EVENTCONFIG); aNamesItem.AddEvent( String::CreateFromAscii( "MouseOver" ), String(), SFX_EVENT_MOUSEOVER_OBJECT ); aNamesItem.AddEvent( String::CreateFromAscii( "MouseOut" ), String(), SFX_EVENT_MOUSEOUT_OBJECT ); + aSet.Put( aNamesItem ); SvxMacroItem aMacroItem(SID_ATTR_MACROITEM); IMapObject* pIMapObj = GetIMapObj( pSdrObj ); diff --git a/svx/source/msfilter/msdffimp.cxx b/svx/source/msfilter/msdffimp.cxx index 544546149645..0e751e3181e7 100644 --- a/svx/source/msfilter/msdffimp.cxx +++ b/svx/source/msfilter/msdffimp.cxx @@ -3780,6 +3780,10 @@ Color SvxMSDffManager::MSO_CLR_ToColor( sal_uInt32 nColorCode, sal_uInt16 nConte nColorCode &= 0x00ffffff; sal_uInt8 nUpper = (sal_uInt8)( nColorCode >> 24 ); + + // sj: below change from 0x1b to 0x19 was done because of i84812 (0x02 -> rgb color), + // now I have some problems to fix i104685 (there the color value is 0x02000000 whichs requires + // a 0x2 scheme color to be displayed properly), the color docu seems to be incomplete if( nUpper & 0x19 ) // if( nUpper & 0x1f ) { if( ( nUpper & 0x08 ) || ( ( nUpper & 0x10 ) == 0 ) ) diff --git a/svx/source/svdraw/svdfppt.cxx b/svx/source/svdraw/svdfppt.cxx index 94d1ae4b4e70..35101eb2f418 100644 --- a/svx/source/svdraw/svdfppt.cxx +++ b/svx/source/svdraw/svdfppt.cxx @@ -120,6 +120,7 @@ #include #include #include +#include #include #include #include @@ -3819,21 +3820,20 @@ BOOL PPTNumberFormatCreator::GetNumberFormat( SdrPowerPointImport& rManager, Svx nHardCount += pParaObj->GetAttrib( PPT_ParaAttr_BulletOfs, nBulletOfs, nDestinationInstance ); if ( nIsBullet ) - { rNumberFormat.SetNumberingType( SVX_NUM_CHAR_SPECIAL ); - UINT32 nFontHeight = 24; - PPTPortionObj* pPtr = pParaObj->First(); - if ( pPtr ) - pPtr->GetAttrib( PPT_CharAttr_FontHeight, nFontHeight, nDestinationInstance ); + UINT32 nFontHeight = 24; + PPTPortionObj* pPtr = pParaObj->First(); + if ( pPtr ) + pPtr->GetAttrib( PPT_CharAttr_FontHeight, nFontHeight, nDestinationInstance ); + if ( nIsBullet ) nHardCount += ImplGetExtNumberFormat( rManager, rNumberFormat, pParaObj->pParaSet->mnDepth, pParaObj->mnInstance, nDestinationInstance, rStartNumbering, nFontHeight, pParaObj ); - if ( rNumberFormat.GetNumberingType() != SVX_NUM_BITMAP ) - pParaObj->UpdateBulletRelSize( nBulletHeight ); - if ( nHardCount ) - ImplGetNumberFormat( rManager, rNumberFormat, pParaObj->pParaSet->mnDepth ); - } + if ( rNumberFormat.GetNumberingType() != SVX_NUM_BITMAP ) + pParaObj->UpdateBulletRelSize( nBulletHeight ); + if ( nHardCount ) + ImplGetNumberFormat( rManager, rNumberFormat, pParaObj->pParaSet->mnDepth ); if ( nHardCount ) { @@ -3847,7 +3847,6 @@ BOOL PPTNumberFormatCreator::GetNumberFormat( SdrPowerPointImport& rManager, Svx case SVX_NUM_CHARS_UPPER_LETTER_N : case SVX_NUM_CHARS_LOWER_LETTER_N : { - PPTPortionObj* pPtr = pParaObj->First(); if ( pPtr ) { sal_uInt32 nFont; @@ -5566,11 +5565,6 @@ BOOL PPTPortionObj::GetAttrib( UINT32 nAttr, UINT32& nRetValue, UINT32 nDestinat if ( nRetValue != nTmp ) bIsHardAttribute = 1; } - if ( nRetValue && ( nDestinationInstance == TSS_TYPE_TEXT_IN_SHAPE ) ) - { - nRetValue = 0; // no inheritance for standard textobjects - bIsHardAttribute = 1; // this attribute must be hard formatted - } } break; case PPT_CharAttr_Font : @@ -6215,10 +6209,10 @@ void PPTParagraphObj::ApplyTo( SfxItemSet& rSet, boost::optional< sal_Int16 >& if ( pRule ) { pRule->SetLevel( pParaSet->mnDepth, aNumberFormat ); - if ( nDestinationInstance == 0xffffffff ) + sal_uInt16 i, n; + for ( i = 0; i < pRule->GetLevelCount(); i++ ) { - sal_uInt16 i, n; - for ( i = 0; i < pRule->GetLevelCount(); i++ ) + if ( i != pParaSet->mnDepth ) { n = i > 4 ? 4 : i; @@ -7429,6 +7423,15 @@ void ApplyCellAttributes( const SdrObject* pObj, Reference< XCell >& xCell ) xPropSet->setPropertyValue( sLeftBorder, Any( nLeftDist ) ); xPropSet->setPropertyValue( sBottomBorder, Any( nLowerDist ) ); + static const rtl::OUString sTextVerticalAdjust( RTL_CONSTASCII_USTRINGPARAM( "TextVerticalAdjust" ) ); + const SdrTextVertAdjust eTextVertAdjust(((const SdrTextVertAdjustItem&)pObj->GetMergedItem(SDRATTR_TEXT_VERTADJUST)).GetValue()); + drawing::TextVerticalAdjust eVA( drawing::TextVerticalAdjust_TOP ); + if ( eTextVertAdjust == SDRTEXTVERTADJUST_CENTER ) + eVA = drawing::TextVerticalAdjust_CENTER; + else if ( eTextVertAdjust == SDRTEXTVERTADJUST_BOTTOM ) + eVA = drawing::TextVerticalAdjust_BOTTOM; + xPropSet->setPropertyValue( sTextVerticalAdjust, Any( eVA ) ); + SfxItemSet aSet( pObj->GetMergedItemSet() ); XFillStyle eFillStyle(((XFillStyleItem&)pObj->GetMergedItem( XATTR_FILLSTYLE )).GetValue()); ::com::sun::star::drawing::FillStyle eFS( com::sun::star::drawing::FillStyle_NONE ); -- cgit From 8570f88531e1b206f3fa63e10b308df9c57bb9c9 Mon Sep 17 00:00:00 2001 From: Kurt Zenker Date: Mon, 14 Sep 2009 10:57:16 +0000 Subject: CWS-TOOLING: integrate CWS chart41 2009-09-07 11:17:59 +0200 iha r275880 : #i104854# ODF: Fallback to bar chart for surface charts as long as surface charts are not implemented 2009-09-03 10:07:24 +0200 iha r275745 : #i104020# Y axis scaling problem with stock chart 2009-09-02 17:11:42 +0200 iha r275723 : #i103984# XChartDataArray / setDataArray broken 2009-09-02 17:05:16 +0200 iha r275721 : #i103984# XChartDataArray / setDataArray broken 2009-08-31 18:18:21 +0200 iha r275629 : #i103076# ODF, chart from MS-Office2007sp2 doesn't load caused be different xlink:href syntax 2009-08-28 18:35:52 +0200 iha r275548 : #i103460# ODF charts without svg:width and svg:height are not imported correctly 2009-08-28 18:35:25 +0200 iha r275547 : #i103460# ODF charts without svg:width and svg:height are not imported correctly 2009-08-28 18:25:45 +0200 iha r275546 : #i103460# ODF charts without svg:width and svg:height are not imported correctly 2009-08-28 18:23:21 +0200 iha r275544 : #i103460# ODF charts without svg:width and svg:height are not imported correctly 2009-08-28 18:18:34 +0200 iha r275543 : #i103460# ODF charts without svg:width and svg:height are not imported correctly 2009-08-27 15:57:20 +0200 iha r275490 : #i104160# report designer broken --- svx/source/svdraw/svdoole2.cxx | 8 ++++++++ svx/source/xml/xmleohlp.cxx | 28 +++++++++++++++++++++++----- 2 files changed, 31 insertions(+), 5 deletions(-) (limited to 'svx') diff --git a/svx/source/svdraw/svdoole2.cxx b/svx/source/svdraw/svdoole2.cxx index 8c30bfb88018..a2b6991773e1 100644 --- a/svx/source/svdraw/svdoole2.cxx +++ b/svx/source/svdraw/svdoole2.cxx @@ -1867,6 +1867,14 @@ void SdrOle2Obj::NbcSetSnapRect(const Rectangle& rRect) SdrRectObj::NbcSetSnapRect(rRect); if( pModel && !pModel->isLocked() ) ImpSetVisAreaSize(); + + if ( xObjRef.is() && IsChart() ) + { + //#i103460# charts do not necessaryly have an own size within ODF files, + //for this case they need to use the size settings from the surrounding frame, + //which is made available with this method as there is no other way + xObjRef.SetDefaultSizeForChart( Size( rRect.GetWidth(), rRect.GetHeight() ) ); + } } // ----------------------------------------------------------------------------- diff --git a/svx/source/xml/xmleohlp.cxx b/svx/source/xml/xmleohlp.cxx index e6f7221623fd..ab9eb5aeb36d 100644 --- a/svx/source/xml/xmleohlp.cxx +++ b/svx/source/xml/xmleohlp.cxx @@ -326,11 +326,29 @@ sal_Bool SvXMLEmbeddedObjectHelper::ImplGetStorageNames( } else { - sal_Int32 nPathStart = 0; - if( 0 == aURLNoPar.compareToAscii( "./", 2 ) ) - nPathStart = 2; - if( _nPos >= nPathStart ) - rContainerStorageName = aURLNoPar.copy( nPathStart, _nPos-nPathStart); + //eliminate 'superfluous' slashes at start and end + //#i103076# load objects with all allowed xlink:href syntaxes + { + //eliminate './' at start + sal_Int32 nStart = 0; + sal_Int32 nCount = aURLNoPar.getLength(); + if( 0 == aURLNoPar.compareToAscii( "./", 2 ) ) + { + nStart = 2; + nCount -= 2; + } + + //eliminate '/' at end + sal_Int32 nEnd = aURLNoPar.lastIndexOf( '/' ); + if( nEnd == aURLNoPar.getLength()-1 && nEnd != (nStart-1) ) + nCount--; + + aURLNoPar = aURLNoPar.copy( nStart, nCount ); + } + + _nPos = aURLNoPar.lastIndexOf( '/' ); + if( _nPos >= 0 ) + rContainerStorageName = aURLNoPar.copy( 0, _nPos ); rObjectStorageName = aURLNoPar.copy( _nPos+1 ); } } -- cgit From ea35f2f06cbb9507218af9c224d2ebdcaa2bec10 Mon Sep 17 00:00:00 2001 From: Kurt Zenker Date: Mon, 14 Sep 2009 11:18:01 +0000 Subject: CWS-TOOLING: integrate CWS dba32g 2009-09-09 07:53:55 +0200 oj r275964 : replace strlen with rtl_str_getLength 2009-09-07 20:59:10 +0200 fs r275913 : disable the CopyTableWizard test until issue 104869 is fixed 2009-09-07 12:17:31 +0200 oj r275885 : #i104810# remove de as lang 2009-09-05 22:26:21 +0200 fs r275857 : protect StateChanged against re-entrance 2009-09-05 22:25:52 +0200 fs r275856 : don't attempt to classify the parent of a form as control 2009-09-05 22:25:29 +0200 fs r275855 : protect against re-entrance 2009-09-05 00:11:40 +0200 fs r275835 : #i10000# 2009-09-04 23:25:50 +0200 fs r275834 : #i10000# 2009-09-04 23:23:47 +0200 fs r275833 : #i10000# 2009-09-04 21:49:37 +0200 fs r275830 : #i10000# correct wrong conflict resolution 2009-09-04 20:59:51 +0200 fs r275829 : CWS-TOOLING: rebase CWS dba32g to trunk@275801 (milestone: DEV300:m57) 2009-09-04 11:08:32 +0200 oj r275791 : #i104780# new version 1.2.0 2009-09-03 22:29:21 +0200 fs r275775 : OSL_TRACE doesn't need \n anymore 2009-09-03 08:33:21 +0200 fs r275743 : CWS-TOOLING: rebase CWS dba32g to trunk@275331 (milestone: DEV300:m56) 2009-09-02 13:48:12 +0200 fs r275708 : removed useless include 2009-09-02 13:45:43 +0200 fs r275707 : more since tags, which are used across offapi/udkapi 2009-09-02 13:23:04 +0200 fs r275705 : should *not* have the dtor, copy ctor, and assignment operator compiler-generated, else we run into trouble as soon as the compiler creates different versions of our singleton member's static data in different libraries 2009-09-02 12:32:45 +0200 fs r275704 : AutoIncrementIsPrimaryKey is a driver setting, not a data source setting 2009-09-02 11:42:49 +0200 fs r275701 : URL meta data are meta data which are valid for all connections of this type, not per-data-source properties. Settings them as data source properties is a hack. 2009-09-02 08:43:34 +0200 fs r275696 : 3.x.x is not a valid 'since' tag 2009-09-01 16:05:24 +0200 fs r275665 : #i104686# don't treat controls bound to read-only columns as required 2009-09-01 13:10:22 +0200 fs r275657 : #i104574# use PageUp/Down to scroll through the complete page 2009-09-01 07:04:48 +0200 oj r275641 : #i104104# correct line ends 2009-08-31 15:52:34 +0200 fs r275612 : #i104410# 2009-08-31 12:29:05 +0200 fs r275596 : #i104364# 2009-08-31 12:28:56 +0200 fs r275595 : #i104364# 2009-08-31 11:43:09 +0200 fs r275593 : #i104649# JavaDriverClassPath is also a known JDBC-bridge setting 2009-08-31 11:41:37 +0200 fs r275592 : #i104649# 2009-08-28 21:48:27 +0200 fs r275552 : during #i96862#: renamed the configuration data which controls availability of certain DBA-related UI 2009-08-28 21:48:17 +0200 fs r275551 : #i96862# do not show the 'Create a new database' option when a) no embedded/dBase driver is installed or b) the configuration requests to hide the option 2009-08-28 21:47:19 +0200 fs r275550 : during #i96862#: renamed the configuration data which controls availability of certain DBA-related UI 2009-08-28 21:46:41 +0200 fs r275549 : #i96862# renamed and extended the configuration data which controls availability of certain DBA-related UI 2009-08-28 15:10:19 +0200 fs r275535 : #i96862# if no embedded driver is installed, use dBase for creating new DBs. If no dBase driver is installed, too, do not offer the 'Create new database' option 2009-08-28 14:03:04 +0200 fs r275532 : #i104454# allow multiple fields to display the same column 2009-08-28 13:14:00 +0200 fs r275528 : #i104584# driver meta data do not belong into a data source's settings 2009-08-28 13:09:57 +0200 fs r275527 : properly chech the MySQL type buttons (else next/back in the wizard leads to state with two buttons checked) 2009-08-28 13:09:17 +0200 fs r275526 : #i104584# driver meta data do not belong into a data source's settings 2009-08-28 13:07:18 +0200 fs r275525 : BooleanComparisonMode is a property, or a feature - but not a driver meta data 2009-08-28 11:00:31 +0200 fs r275521 : #i104580# 2009-08-28 10:40:05 +0200 fs r275519 : #i104577# correct assertion: If the template node type is ANY, then any value type is allowed 2009-08-28 10:09:30 +0200 fs r275518 : #i104575# implement Named Pipe UI 2009-08-28 10:09:07 +0200 fs r275517 : pass the trigger-event to IWindowOperator::operateOn / work with VclWindowEvents, not VclSimpleEvents 2009-08-27 14:27:36 +0200 fs r275484 : ImplPosTabPage: respect mbEmptyViewMargin for WINDOWALIGN_LEFT 2009-08-27 13:43:56 +0200 fs r275480 : merging latest changes from CWS dba32f herein 2009-08-27 13:23:07 +0200 fs r275475 : #i103882# 2009-08-27 11:56:55 +0200 fs r275466 : #i104544# SetState: Do not call Update at the window which we just set text for. It should (sic\!) not be needed, but causes trouble 2009-08-27 11:55:34 +0200 fs r275465 : #i104544# do not allow re-entrance for impl_ensureControl_nothrow Actually, this is part of the fix only. I also removed the code which triggered this re-entrance (from the grid control implementation), but to ensure it won't happen, again, I added some safety herein. 2009-08-27 10:14:11 +0200 fs r275459 : preparations for supporting a 'NamedPipe' parameter for the MySQL Connector/OOo 2009-08-27 10:13:21 +0200 fs r275458 : preparations for supporting a 'NamedPipe' setting for the MySQL Connector/OOo 2009-08-27 10:11:14 +0200 fs r275456 : outsourced the MySQLNative settings into a dedicated class, to not duplicate all the code in two tab page implementations 2009-08-26 14:18:13 +0200 fs r275422 : #i10000# 2009-08-26 13:26:36 +0200 fs r275419 : ignore output paths 2009-08-26 13:23:38 +0200 fs r275417 : support the LocalSocket property for the MySQL native driver 2009-08-26 13:17:05 +0200 fs r275416 : some re-factoring, to outsource the tab page for setting up the MySQLNative connection, into a dedicated class (needed later) 2009-08-26 13:15:15 +0200 fs r275415 : support a NoThousandSep property for NumericFormatters - I'm tired of correcting this at runtime, instead of controlling it in the resource 2009-08-26 11:45:08 +0200 fs r275410 : oops, 'flat' shouldn't have got lost 2009-08-26 09:38:57 +0200 fs r275398 : #i102631# when saving the document fails, ensure that the interaction handler really can handle/display the error 2009-08-26 09:37:05 +0200 fs r275397 : #i102631# don't let non-IO/RuntimeExceptions escape from DatabaseDocument::store*, wrap them into an IOException 2009-08-26 09:35:39 +0200 fs r275395 : let the default interaction handler implement XInteractionHandler2 2009-08-25 13:51:34 +0200 fs r275352 : #i102631# createTempFile: pass URL through FileHelper.getOOoCompatibleFileURL 2009-08-25 13:49:23 +0200 fs r275351 : #i102631# createTempFileURL: immediately delete the file implicitly created by createTempFile, we really only need the URL 2009-08-24 14:49:07 +0200 fs r275318 : #i10000# 2009-08-24 14:36:03 +0200 fs r275315 : properly terminate message with 0 character 2009-08-24 14:35:45 +0200 fs r275314 : trace method concepts in non-pro, if special flag is enabled 2009-08-24 14:24:17 +0200 fs r275312 : #i98973# filter some more events for grid control columns 2009-08-24 14:15:23 +0200 fs r275311 : #i98973# implement XComboBox for combo box cells 2009-08-24 13:39:24 +0200 fs r275308 : #i98973# do not display the 'actionPerformed' event for grid combo box columns 2009-08-24 12:52:03 +0200 fs r275303 : #i98973# implement XCheckBox and XButton for check box cells 2009-08-24 11:56:05 +0200 oj r275300 : #i104447# wrong default for orientation 2009-08-24 10:51:21 +0200 fs r275296 : in the script selector dialog, interpret a double click onto a function as OK 2009-08-24 10:50:56 +0200 fs r275295 : localize some to-be-displayed names, consolidate some code regarding form/control naming 2009-08-21 14:28:05 +0200 fs r275255 : #i98973# implement KeyListeners 2009-08-21 14:27:20 +0200 fs r275254 : #i98973# move the conversion VCL[Mouse|Key]Event->Awt[Mouse|Key]Event from vclxwindow.cxx to VCLUnoHelper 2009-08-21 14:08:50 +0200 fs r275248 : #i98973# implement Mouse- and MouseMotion-broadcasting 2009-08-21 13:31:08 +0200 fs r275244 : #i98973# implement text and change listeners at text cells 2009-08-21 12:47:38 +0200 fs r275234 : #i104399# some refactoring: If the MySQL Connector/OOo is installed, it registers for the sdbc:mysqlc: protocol (now known as DST_MYSQL_NATIVE_DIRECT). However, we do not want to display this in the UI, instead we display "MySQL" only, which collects DST_MYSQL_ODBC, DST_MYSQL_JDBC, and DST_MYSQL_NATIVE. 2009-08-21 12:45:18 +0200 fs r275232 : #i104399# also register for the sdbc:mysql:mysqlc protocol, decide at runtime (depending on the availability of sdbc:mysqlc:), whether it is really accepted. This prevents that the C/OOo extension needs to register *our* implementation name for the sdbc:mysql:mysqlc: protocol, which would be somewhat weird 2009-08-20 16:18:48 +0200 fs r275190 : merging the latest changes from CWS dba32f (which this CWS was created from) 2009-08-19 20:19:59 +0200 fs r275160 : add some spacing between the radios 2009-08-19 14:50:15 +0200 fs r275150 : #i98973# slightly refactoring the grid cell implementations, to prepare for proper events being fired. Implement focus events for the moment, more to come. 2009-08-19 10:53:38 +0200 fs r275142 : #i99936# initialize newly created models 2009-08-18 23:03:48 +0200 fs r275132 : merging latest changes from CWS dba32f 2009-08-18 15:14:08 +0200 fs r275110 : #i102819# SetColumnPos: SCROLL_CLIP is deadly here --- svx/source/cui/macropg.src | 4 +- svx/source/cui/selector.cxx | 9 + svx/source/cui/selector.hxx | 1 + svx/source/fmcomp/fmgridcl.cxx | 23 +- svx/source/fmcomp/gridcell.cxx | 855 ++++++++++++++++++++++++++------- svx/source/form/fmPropBrw.cxx | 14 +- svx/source/form/fmctrler.cxx | 8 +- svx/source/form/fmpgeimp.cxx | 95 +--- svx/source/form/fmshimp.cxx | 10 +- svx/source/form/fmstring.src | 103 +--- svx/source/form/fmview.cxx | 4 +- svx/source/form/formcontrolfactory.cxx | 70 +++ svx/source/form/navigatortree.cxx | 2 +- svx/source/inc/fmPropBrw.hxx | 1 + svx/source/inc/fmpgeimp.hxx | 13 - svx/source/inc/fmresids.hrc | 46 +- svx/source/inc/formcontrolfactory.hxx | 17 + svx/source/inc/gridcell.hxx | 199 ++++++-- 18 files changed, 1027 insertions(+), 447 deletions(-) (limited to 'svx') diff --git a/svx/source/cui/macropg.src b/svx/source/cui/macropg.src index 0de8a8c5e1dd..e9b6c10d6014 100644 --- a/svx/source/cui/macropg.src +++ b/svx/source/cui/macropg.src @@ -172,12 +172,12 @@ String RID_SVXSTR_EVENT_CREATEDOC String RID_SVXSTR_EVENT_CLOSEDOC { - Text [ en-US ] = "Document is closing" ; + Text [ en-US ] = "Document closed" ; }; String RID_SVXSTR_EVENT_PREPARECLOSEDOC { - Text [ en-US ] = "Close Document" ; + Text [ en-US ] = "Document is closing" ; }; String RID_SVXSTR_EVENT_OPENDOC diff --git a/svx/source/cui/selector.cxx b/svx/source/cui/selector.cxx index 39e22e5ab9f2..83e4aa2b1612 100644 --- a/svx/source/cui/selector.cxx +++ b/svx/source/cui/selector.cxx @@ -1053,6 +1053,7 @@ SvxScriptSelectorDialog::SvxScriptSelectorDialog( aCategories.SetSelectHdl( LINK( this, SvxScriptSelectorDialog, SelectHdl ) ); aCommands.SetSelectHdl( LINK( this, SvxScriptSelectorDialog, SelectHdl ) ); + aCommands.SetDoubleClickHdl( LINK( this, SvxScriptSelectorDialog, FunctionDoubleClickHdl ) ); aOKButton.SetClickHdl( LINK( this, SvxScriptSelectorDialog, ClickHdl ) ); aCancelButton.SetClickHdl( LINK( this, SvxScriptSelectorDialog, ClickHdl ) ); @@ -1140,6 +1141,14 @@ IMPL_LINK( SvxScriptSelectorDialog, SelectHdl, Control*, pCtrl ) return 0; } +IMPL_LINK( SvxScriptSelectorDialog, FunctionDoubleClickHdl, Control*, pCtrl ) +{ + (void)pCtrl; + if ( aOKButton.IsEnabled() ) + return ClickHdl( &aOKButton ); + return 0; +} + // Check if command is selected and enable the OK button accordingly // Grab the help text for this id if available and update the description field void diff --git a/svx/source/cui/selector.hxx b/svx/source/cui/selector.hxx index fe6152131c9d..10346f251563 100644 --- a/svx/source/cui/selector.hxx +++ b/svx/source/cui/selector.hxx @@ -216,6 +216,7 @@ class SvxScriptSelectorDialog : public ModelessDialog DECL_LINK( ClickHdl, Button * ); DECL_LINK( SelectHdl, Control* ); + DECL_LINK( FunctionDoubleClickHdl, Control* ); void UpdateUI(); void ResizeControls(); diff --git a/svx/source/fmcomp/fmgridcl.cxx b/svx/source/fmcomp/fmgridcl.cxx index 20de4e139b9d..c210919bd09d 100644 --- a/svx/source/fmcomp/fmgridcl.cxx +++ b/svx/source/fmcomp/fmgridcl.cxx @@ -889,9 +889,6 @@ void FmGridHeader::PostExecuteColumnContextMenu(sal_uInt16 nColId, const PopupMe break; case SID_FM_SHOWCOLS_MORE: { - //CHINA001 FmShowColsDialog dlg(NULL); - //CHINA001 dlg.SetColumns(xCols); - //CHINA001 dlg.Execute(); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); if(pFact) { @@ -960,24 +957,14 @@ void FmGridHeader::PostExecuteColumnContextMenu(sal_uInt16 nColId, const PopupMe } else { - // Standardlabel setzen - ::rtl::OUString sLabelBase = String( SVX_RES( RID_STR_COLUMN ) ); - // disambiguate the name - Reference< XNameAccess > xColNames( xCols, UNO_QUERY ); - ::rtl::OUString sLabel; - for ( sal_Int32 i=1; i<65535; ++i ) - { - sLabel = sLabelBase; - sLabel += ::rtl::OUString::valueOf( (sal_Int32)i ); - if ( !xColNames->hasByName( sLabel ) ) - break; - } - // no fallback in case the name is not unique (which is rather improbable) .... + FormControlFactory factory( ::comphelper::getProcessServiceFactory() ); + + ::rtl::OUString sLabel = factory.getDefaultUniqueName_ByComponentType( + Reference< XNameAccess >( xCols, UNO_QUERY_THROW ), xNewCol ); xNewCol->setPropertyValue( FM_PROP_LABEL, makeAny( sLabel ) ); xNewCol->setPropertyValue( FM_PROP_NAME, makeAny( sLabel ) ); - FormControlFactory determine( ::comphelper::getProcessServiceFactory() ); - determine.initializeControlModel( DocumentClassification::classifyHostDocument( xCols ), xNewCol ); + factory.initializeControlModel( DocumentClassification::classifyHostDocument( xCols ), xNewCol ); xCols->insertByIndex( nPos, makeAny( xNewCol ) ); } diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx index 45a67a09e52d..96f11adfa6df 100644 --- a/svx/source/fmcomp/gridcell.cxx +++ b/svx/source/fmcomp/gridcell.cxx @@ -30,55 +30,52 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" -#include "gridcell.hxx" -#include "fmtools.hxx" -#include -#ifndef _SVX_FMPROP_HRC + + #include "fmprop.hrc" -#endif +#include "fmresids.hrc" +#include "fmtools.hxx" +#include "gridcell.hxx" #include "gridcols.hxx" #include "sdbdatacolumn.hxx" + +#include +#include #include -#include +#include +#include +#include +#include #include -#ifndef _COM_SUN_STAR_SDDB_XCOLUMNSSUPPLIER_HPP_ -#include -#endif #include -#include #include -#include -#include -#include -#include +#include +#include +#include #include #include -#include -#include -#include -#ifndef _COM_SUN_STAR_SCRTIP_XEVENTATTACHERMANAGER_HPP_ -#include -#endif -#include -#include -#include -#include -#include -#ifndef _SVX_FMRESIDS_HRC -#include "fmresids.hrc" -#endif -#include -#include +#include + +#include #include #include -#include +#include #include #include -#include -#include #include +#include +#include +#include #include +#include +#include +#include +#include +#include + +#include +#include using namespace ::connectivity; using namespace ::connectivity::simple; @@ -228,13 +225,15 @@ void DbGridColumn::CreateControl(sal_Int32 _nFieldPos, const Reference< ::com::s { switch (nTypeId) { - case TYPE_CHECKBOX: m_pCell = new FmXCheckBoxCell(this, pCellControl); break; - case TYPE_LISTBOX: m_pCell = new FmXListBoxCell(this, pCellControl); break; + case TYPE_CHECKBOX: m_pCell = new FmXCheckBoxCell( this, *pCellControl ); break; + case TYPE_LISTBOX: m_pCell = new FmXListBoxCell( this, *pCellControl ); break; + case TYPE_COMBOBOX: m_pCell = new FmXComboBoxCell( this, *pCellControl ); break; default: - m_pCell = new FmXEditCell(this, pCellControl); + m_pCell = new FmXEditCell( this, *pCellControl ); } } m_pCell->acquire(); + m_pCell->init(); impl_toggleScriptManager_nothrow( true ); @@ -3199,13 +3198,33 @@ TYPEINIT0(FmXGridCell); DBG_NAME(FmXGridCell); //----------------------------------------------------------------------------- -FmXGridCell::FmXGridCell(DbGridColumn* pColumn, DbCellControl* pControl) +FmXGridCell::FmXGridCell( DbGridColumn* pColumn, DbCellControl* _pControl ) :OComponentHelper(m_aMutex) ,m_pColumn(pColumn) - ,m_pCellControl(pControl) + ,m_pCellControl( _pControl ) + ,m_aWindowListeners( m_aMutex ) + ,m_aFocusListeners( m_aMutex ) + ,m_aKeyListeners( m_aMutex ) + ,m_aMouseListeners( m_aMutex ) + ,m_aMouseMotionListeners( m_aMutex ) { DBG_CTOR(FmXGridCell,NULL); +} + +//----------------------------------------------------------------------------- +void FmXGridCell::init() +{ + Window* pEventWindow( getEventWindow() ); + if ( pEventWindow ) + pEventWindow->AddEventListener( LINK( this, FmXGridCell, OnWindowEvent ) ); +} +//----------------------------------------------------------------------------- +Window* FmXGridCell::getEventWindow() const +{ + if ( m_pCellControl ) + return &m_pCellControl->GetWindow(); + return NULL; } //----------------------------------------------------------------------------- @@ -3236,25 +3255,34 @@ void FmXGridCell::SetTextLineColor(const Color& _rColor) // XTypeProvider //------------------------------------------------------------------ -Sequence< sal_Int8 > SAL_CALL FmXGridCell::getImplementationId() throw(RuntimeException) -{ - static ::cppu::OImplementationId* pId = 0; - if (! pId) - { - ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); - if (! pId) - { - static ::cppu::OImplementationId aId; - pId = &aId; - } - } - return pId->getImplementationId(); +Sequence< Type > SAL_CALL FmXGridCell::getTypes( ) throw (RuntimeException) +{ + Sequence< uno::Type > aTypes = ::comphelper::concatSequences( + ::cppu::OComponentHelper::getTypes(), + FmXGridCell_Base::getTypes() + ); + if ( m_pCellControl ) + aTypes = ::comphelper::concatSequences( + aTypes, + FmXGridCell_WindowBase::getTypes() + ); + return aTypes; } +//------------------------------------------------------------------ +IMPLEMENT_GET_IMPLEMENTATION_ID( FmXGridCell ) + // OComponentHelper //----------------------------------------------------------------------------- void FmXGridCell::disposing() { + lang::EventObject aEvent( *this ); + m_aWindowListeners.disposeAndClear( aEvent ); + m_aFocusListeners.disposeAndClear( aEvent ); + m_aKeyListeners.disposeAndClear( aEvent ); + m_aMouseListeners.disposeAndClear( aEvent ); + m_aMouseMotionListeners.disposeAndClear( aEvent ); + OComponentHelper::disposing(); m_pColumn = NULL; DELETEZ(m_pCellControl); @@ -3263,12 +3291,13 @@ void FmXGridCell::disposing() //------------------------------------------------------------------ Any SAL_CALL FmXGridCell::queryAggregation( const ::com::sun::star::uno::Type& _rType ) throw(RuntimeException) { - Any aReturn = OComponentHelper::queryAggregation(_rType); - if (!aReturn.hasValue()) - aReturn = ::cppu::queryInterface(_rType, - static_cast< ::com::sun::star::awt::XControl* >(this), - static_cast< ::com::sun::star::form::XBoundControl* >(this) - ); + Any aReturn = OComponentHelper::queryAggregation( _rType ); + + if ( !aReturn.hasValue() ) + aReturn = FmXGridCell_Base::queryInterface( _rType ); + + if ( !aReturn.hasValue() && ( m_pCellControl != NULL ) ) + aReturn = FmXGridCell_WindowBase::queryInterface( _rType ); return aReturn; } @@ -3305,6 +3334,231 @@ void FmXGridCell::setLock(sal_Bool _bLock) throw( RuntimeException ) } } +//------------------------------------------------------------------ +void SAL_CALL FmXGridCell::setPosSize( ::sal_Int32 _X, ::sal_Int32 _Y, ::sal_Int32 _Width, ::sal_Int32 _Height, ::sal_Int16 _Flags ) throw (RuntimeException) +{ + OSL_ENSURE( false, "FmXGridCell::setPosSize: not implemented" ); + (void)_X; + (void)_Y; + (void)_Width; + (void)_Height; + (void)_Flags; + // not allowed to tamper with this for a grid cell +} + +//------------------------------------------------------------------ +awt::Rectangle SAL_CALL FmXGridCell::getPosSize( ) throw (RuntimeException) +{ + OSL_ENSURE( false, "FmXGridCell::getPosSize: not implemented" ); + return awt::Rectangle(); +} + +//------------------------------------------------------------------ +void SAL_CALL FmXGridCell::setVisible( ::sal_Bool _Visible ) throw (RuntimeException) +{ + OSL_ENSURE( false, "FmXGridCell::setVisible: not implemented" ); + (void)_Visible; + // not allowed to tamper with this for a grid cell +} + +//------------------------------------------------------------------ +void SAL_CALL FmXGridCell::setEnable( ::sal_Bool _Enable ) throw (RuntimeException) +{ + OSL_ENSURE( false, "FmXGridCell::setEnable: not implemented" ); + (void)_Enable; + // not allowed to tamper with this for a grid cell +} + +//------------------------------------------------------------------ +void SAL_CALL FmXGridCell::setFocus( ) throw (RuntimeException) +{ + OSL_ENSURE( false, "FmXGridCell::setFocus: not implemented" ); + // not allowed to tamper with this for a grid cell +} + +//------------------------------------------------------------------ +void SAL_CALL FmXGridCell::addWindowListener( const Reference< awt::XWindowListener >& _rxListener ) throw (RuntimeException) +{ + m_aWindowListeners.addInterface( _rxListener ); +} + +//------------------------------------------------------------------ +void SAL_CALL FmXGridCell::removeWindowListener( const Reference< awt::XWindowListener >& _rxListener ) throw (RuntimeException) +{ + m_aWindowListeners.removeInterface( _rxListener ); +} + +//------------------------------------------------------------------ +void SAL_CALL FmXGridCell::addFocusListener( const Reference< awt::XFocusListener >& _rxListener ) throw (RuntimeException) +{ + m_aFocusListeners.addInterface( _rxListener ); +} + +//------------------------------------------------------------------ +void SAL_CALL FmXGridCell::removeFocusListener( const Reference< awt::XFocusListener >& _rxListener ) throw (RuntimeException) +{ + m_aFocusListeners.removeInterface( _rxListener ); +} + +//------------------------------------------------------------------ +void SAL_CALL FmXGridCell::addKeyListener( const Reference< awt::XKeyListener >& _rxListener ) throw (RuntimeException) +{ + m_aKeyListeners.addInterface( _rxListener ); +} + +//------------------------------------------------------------------ +void SAL_CALL FmXGridCell::removeKeyListener( const Reference< awt::XKeyListener >& _rxListener ) throw (RuntimeException) +{ + m_aKeyListeners.removeInterface( _rxListener ); +} + +//------------------------------------------------------------------ +void SAL_CALL FmXGridCell::addMouseListener( const Reference< awt::XMouseListener >& _rxListener ) throw (RuntimeException) +{ + m_aMouseListeners.addInterface( _rxListener ); +} + +//------------------------------------------------------------------ +void SAL_CALL FmXGridCell::removeMouseListener( const Reference< awt::XMouseListener >& _rxListener ) throw (RuntimeException) +{ + m_aMouseListeners.removeInterface( _rxListener ); +} + +//------------------------------------------------------------------ +void SAL_CALL FmXGridCell::addMouseMotionListener( const Reference< awt::XMouseMotionListener >& _rxListener ) throw (RuntimeException) +{ + m_aMouseMotionListeners.addInterface( _rxListener ); +} + +//------------------------------------------------------------------ +void SAL_CALL FmXGridCell::removeMouseMotionListener( const Reference< awt::XMouseMotionListener >& _rxListener ) throw (RuntimeException) +{ + m_aMouseMotionListeners.removeInterface( _rxListener ); +} + +//------------------------------------------------------------------ +void SAL_CALL FmXGridCell::addPaintListener( const Reference< awt::XPaintListener >& _rxListener ) throw (RuntimeException) +{ + OSL_ENSURE( false, "FmXGridCell::addPaintListener: not implemented" ); + (void)_rxListener; +} + +//------------------------------------------------------------------ +void SAL_CALL FmXGridCell::removePaintListener( const Reference< awt::XPaintListener >& _rxListener ) throw (RuntimeException) +{ + OSL_ENSURE( false, "FmXGridCell::removePaintListener: not implemented" ); + (void)_rxListener; +} + +//------------------------------------------------------------------ +IMPL_LINK( FmXGridCell, OnWindowEvent, VclWindowEvent*, _pEvent ) +{ + ENSURE_OR_THROW( _pEvent, "illegal event pointer" ); + ENSURE_OR_THROW( _pEvent->GetWindow(), "illegal window" ); + onWindowEvent( _pEvent->GetId(), *_pEvent->GetWindow(), _pEvent->GetData() ); + return 1L; +} + +//------------------------------------------------------------------------------ +void FmXGridCell::onFocusGained( const awt::FocusEvent& _rEvent ) +{ + m_aFocusListeners.notifyEach( &awt::XFocusListener::focusGained, _rEvent ); +} + +//------------------------------------------------------------------------------ +void FmXGridCell::onFocusLost( const awt::FocusEvent& _rEvent ) +{ + m_aFocusListeners.notifyEach( &awt::XFocusListener::focusLost, _rEvent ); +} + +//------------------------------------------------------------------------------ +void FmXGridCell::onWindowEvent( const ULONG _nEventId, const Window& _rWindow, const void* _pEventData ) +{ + switch ( _nEventId ) + { + case VCLEVENT_CONTROL_GETFOCUS: + case VCLEVENT_WINDOW_GETFOCUS: + case VCLEVENT_CONTROL_LOSEFOCUS: + case VCLEVENT_WINDOW_LOSEFOCUS: + { + if ( ( _rWindow.IsCompoundControl() + && ( _nEventId == VCLEVENT_CONTROL_GETFOCUS + || _nEventId == VCLEVENT_CONTROL_LOSEFOCUS + ) + ) + || ( !_rWindow.IsCompoundControl() + && ( _nEventId == VCLEVENT_WINDOW_GETFOCUS + || _nEventId == VCLEVENT_WINDOW_LOSEFOCUS + ) + ) + ) + { + if ( !m_aFocusListeners.getLength() ) + break; + + bool bFocusGained = ( _nEventId == VCLEVENT_CONTROL_GETFOCUS ) || ( _nEventId == VCLEVENT_WINDOW_GETFOCUS ); + + awt::FocusEvent aEvent; + aEvent.Source = *this; + aEvent.FocusFlags = _rWindow.GetGetFocusFlags(); + aEvent.Temporary = sal_False; + + if ( bFocusGained ) + onFocusGained( aEvent ); + else + onFocusLost( aEvent ); + } + } + break; + case VCLEVENT_WINDOW_MOUSEBUTTONDOWN: + case VCLEVENT_WINDOW_MOUSEBUTTONUP: + { + if ( !m_aMouseListeners.getLength() ) + break; + + const bool bButtonDown = ( _nEventId == VCLEVENT_WINDOW_MOUSEBUTTONDOWN ); + + awt::MouseEvent aEvent( VCLUnoHelper::createMouseEvent( *static_cast< const ::MouseEvent* >( _pEventData ), *this ) ); + m_aMouseListeners.notifyEach( bButtonDown ? &awt::XMouseListener::mousePressed : &awt::XMouseListener::mouseReleased, aEvent ); + } + break; + case VCLEVENT_WINDOW_MOUSEMOVE: + { + const MouseEvent& rMouseEvent = *static_cast< const ::MouseEvent* >( _pEventData ); + if ( rMouseEvent.IsEnterWindow() || rMouseEvent.IsLeaveWindow() ) + { + if ( m_aMouseListeners.getLength() != 0 ) + { + awt::MouseEvent aEvent( VCLUnoHelper::createMouseEvent( rMouseEvent, *this ) ); + m_aMouseListeners.notifyEach( rMouseEvent.IsEnterWindow() ? &awt::XMouseListener::mouseEntered: &awt::XMouseListener::mouseExited, aEvent ); + } + } + else if ( !rMouseEvent.IsEnterWindow() && !rMouseEvent.IsLeaveWindow() ) + { + if ( m_aMouseMotionListeners.getLength() != 0 ) + { + awt::MouseEvent aEvent( VCLUnoHelper::createMouseEvent( rMouseEvent, *this ) ); + aEvent.ClickCount = 0; + const bool bSimpleMove = ( ( rMouseEvent.GetMode() & MOUSE_SIMPLEMOVE ) != 0 ); + m_aMouseMotionListeners.notifyEach( bSimpleMove ? &awt::XMouseMotionListener::mouseMoved: &awt::XMouseMotionListener::mouseDragged, aEvent ); + } + } + } + break; + case VCLEVENT_WINDOW_KEYINPUT: + case VCLEVENT_WINDOW_KEYUP: + { + if ( !m_aKeyListeners.getLength() ) + break; + + const bool bKeyPressed = ( _nEventId == VCLEVENT_WINDOW_KEYINPUT ); + awt::KeyEvent aEvent( VCLUnoHelper::createKeyEvent( *static_cast< const ::KeyEvent* >( _pEventData ), *this ) ); + m_aKeyListeners.notifyEach( bKeyPressed ? &awt::XKeyListener::keyPressed: &awt::XKeyListener::keyReleased, aEvent ); + } + break; + } +} + /*************************************************************************/ TYPEINIT1(FmXDataCell, FmXGridCell); //------------------------------------------------------------------------------ @@ -3326,6 +3580,12 @@ void FmXDataCell::UpdateFromColumn() /*************************************************************************/ TYPEINIT1(FmXTextCell, FmXDataCell); +FmXTextCell::FmXTextCell( DbGridColumn* pColumn, DbCellControl& _rControl ) + :FmXDataCell( pColumn, _rControl ) + ,m_bFastPaint( sal_True ) +{ +} + //------------------------------------------------------------------------------ void FmXTextCell::PaintFieldToCell(OutputDevice& rDev, const Rectangle& rRect, @@ -3372,15 +3632,16 @@ void FmXTextCell::PaintFieldToCell(OutputDevice& rDev, DBG_NAME(FmXEditCell); //------------------------------------------------------------------------------ -FmXEditCell::FmXEditCell(DbGridColumn* pColumn, DbCellControl* pControl) - :FmXTextCell(pColumn, pControl) +FmXEditCell::FmXEditCell( DbGridColumn* pColumn, DbCellControl& _rControl ) + :FmXTextCell( pColumn, _rControl ) ,m_aTextListeners(m_aMutex) + ,m_aChangeListeners( m_aMutex ) ,m_pEditImplementation( NULL ) ,m_bOwnEditImplementation( false ) { DBG_CTOR(FmXEditCell,NULL); - DbTextField* pTextField = PTR_CAST( DbTextField, pControl ); + DbTextField* pTextField = PTR_CAST( DbTextField, &_rControl ); if ( pTextField ) { @@ -3390,11 +3651,9 @@ FmXEditCell::FmXEditCell(DbGridColumn* pColumn, DbCellControl* pControl) } else { - m_pEditImplementation = new EditImplementation( *static_cast< Edit* >( pControl->GetControl() ) ); + m_pEditImplementation = new EditImplementation( static_cast< Edit& >( _rControl.GetWindow() ) ); m_bOwnEditImplementation = true; } - - m_pEditImplementation->SetModifyHdl( LINK( this, FmXEditCell, OnTextChanged ) ); } //------------------------------------------------------------------ @@ -3416,6 +3675,7 @@ void FmXEditCell::disposing() { ::com::sun::star::lang::EventObject aEvt(*this); m_aTextListeners.disposeAndClear(aEvt); + m_aChangeListeners.disposeAndClear(aEvt); m_pEditImplementation->SetModifyHdl( Link() ); if ( m_bOwnEditImplementation ) @@ -3428,27 +3688,26 @@ void FmXEditCell::disposing() //------------------------------------------------------------------ Any SAL_CALL FmXEditCell::queryAggregation( const ::com::sun::star::uno::Type& _rType ) throw(RuntimeException) { - Any aReturn = FmXDataCell::queryAggregation(_rType); - if (!aReturn.hasValue()) - aReturn = ::cppu::queryInterface(_rType, - static_cast< ::com::sun::star::awt::XTextComponent* >(this) - ); + Any aReturn = FmXTextCell::queryAggregation( _rType ); + + if ( !aReturn.hasValue() ) + aReturn = FmXEditCell_Base::queryInterface( _rType ); + return aReturn; } //------------------------------------------------------------------------- Sequence< ::com::sun::star::uno::Type > SAL_CALL FmXEditCell::getTypes( ) throw(RuntimeException) { - Sequence< ::com::sun::star::uno::Type > aTypes = OComponentHelper::getTypes(); - - sal_Int32 nLen = aTypes.getLength(); - aTypes.realloc(nLen + 2); - aTypes.getArray()[nLen++] = ::getCppuType(static_cast< Reference< ::com::sun::star::awt::XControl >* >(NULL)); - aTypes.getArray()[nLen++] = ::getCppuType(static_cast< Reference< ::com::sun::star::awt::XTextComponent >* >(NULL)); - - return aTypes; + return ::comphelper::concatSequences( + FmXTextCell::getTypes(), + FmXEditCell_Base::getTypes() + ); } +//------------------------------------------------------------------------------ +IMPLEMENT_GET_IMPLEMENTATION_ID( FmXEditCell ) + // ::com::sun::star::awt::XTextComponent //------------------------------------------------------------------------------ void SAL_CALL FmXEditCell::addTextListener(const Reference< ::com::sun::star::awt::XTextListener >& l) throw( RuntimeException ) @@ -3473,7 +3732,7 @@ void SAL_CALL FmXEditCell::setText( const ::rtl::OUString& aText ) throw( Runtim // In JAVA wird auch ein textChanged ausgeloest, in VCL nicht. // ::com::sun::star::awt::Toolkit soll JAVA-komform sein... - OnTextChanged( NULL ); + onTextChanged(); } } @@ -3583,30 +3842,71 @@ void SAL_CALL FmXEditCell::setMaxTextLen( sal_Int16 nLen ) throw( RuntimeExcepti } //------------------------------------------------------------------------------ -IMPL_LINK( FmXEditCell, OnTextChanged, void*, EMPTYARG ) +void SAL_CALL FmXEditCell::addChangeListener( const Reference< form::XChangeListener >& _Listener ) throw (RuntimeException) { - if ( m_pEditImplementation ) + m_aChangeListeners.addInterface( _Listener ); +} + +//------------------------------------------------------------------------------ +void SAL_CALL FmXEditCell::removeChangeListener( const Reference< form::XChangeListener >& _Listener ) throw (RuntimeException) +{ + m_aChangeListeners.removeInterface( _Listener ); +} + +//------------------------------------------------------------------------------ +void FmXEditCell::onTextChanged() +{ + ::com::sun::star::awt::TextEvent aEvent; + aEvent.Source = *this; + m_aTextListeners.notifyEach( &awt::XTextListener::textChanged, aEvent ); +} + +//------------------------------------------------------------------------------ +void FmXEditCell::onFocusGained( const awt::FocusEvent& _rEvent ) +{ + FmXTextCell::onFocusGained( _rEvent ); + m_sValueOnEnter = getText(); +} + +//------------------------------------------------------------------------------ +void FmXEditCell::onFocusLost( const awt::FocusEvent& _rEvent ) +{ + FmXTextCell::onFocusLost( _rEvent ); + + if ( getText() != m_sValueOnEnter ) { - ::cppu::OInterfaceIteratorHelper aIt( m_aTextListeners ); - ::com::sun::star::awt::TextEvent aEvt; - aEvt.Source = *this; - while( aIt.hasMoreElements() ) - ((::com::sun::star::awt::XTextListener *)aIt.next())->textChanged( aEvt ); + lang::EventObject aEvent( *this ); + m_aChangeListeners.notifyEach( &XChangeListener::changed, aEvent ); } - return 1; +} + +//------------------------------------------------------------------------------ +void FmXEditCell::onWindowEvent( const ULONG _nEventId, const Window& _rWindow, const void* _pEventData ) +{ + switch ( _nEventId ) + { + case VCLEVENT_EDIT_MODIFY: + { + if ( m_pEditImplementation && m_aTextListeners.getLength() ) + onTextChanged(); + return; + } + break; + } + + FmXTextCell::onWindowEvent( _nEventId, _rWindow, _pEventData ); } /*************************************************************************/ DBG_NAME(FmXCheckBoxCell); //------------------------------------------------------------------------------ -FmXCheckBoxCell::FmXCheckBoxCell(DbGridColumn* pColumn, DbCellControl* pControl) - :FmXDataCell(pColumn, pControl) +FmXCheckBoxCell::FmXCheckBoxCell( DbGridColumn* pColumn, DbCellControl& _rControl ) + :FmXDataCell( pColumn, _rControl ) ,m_aItemListeners(m_aMutex) - ,m_pBox(&((CheckBoxControl*)pControl->GetControl())->GetBox()) + ,m_aActionListeners( m_aMutex ) + ,m_pBox( & static_cast< CheckBoxControl& >( _rControl.GetWindow() ).GetBox() ) { DBG_CTOR(FmXCheckBoxCell,NULL); - - ((CheckBoxControl*)pControl->GetControl())->SetClickHdl( LINK( this, FmXCheckBoxCell, OnClick ) ); } //------------------------------------------------------------------ @@ -3627,8 +3927,9 @@ void FmXCheckBoxCell::disposing() { ::com::sun::star::lang::EventObject aEvt(*this); m_aItemListeners.disposeAndClear(aEvt); + m_aActionListeners.disposeAndClear(aEvt); - ((CheckBoxControl*)m_pCellControl->GetControl())->SetClickHdl(Link()); + static_cast< CheckBoxControl& >( m_pCellControl->GetWindow() ).SetClickHdl(Link()); m_pBox = NULL; FmXDataCell::disposing(); @@ -3637,27 +3938,26 @@ void FmXCheckBoxCell::disposing() //------------------------------------------------------------------ Any SAL_CALL FmXCheckBoxCell::queryAggregation( const ::com::sun::star::uno::Type& _rType ) throw(RuntimeException) { - Any aReturn = FmXDataCell::queryAggregation(_rType); - if (!aReturn.hasValue()) - aReturn = ::cppu::queryInterface(_rType, - static_cast< ::com::sun::star::awt::XCheckBox* >(this) - ); + Any aReturn = FmXDataCell::queryAggregation( _rType ); + + if ( !aReturn.hasValue() ) + aReturn = FmXCheckBoxCell_Base::queryInterface( _rType ); + return aReturn; } //------------------------------------------------------------------------- Sequence< ::com::sun::star::uno::Type > SAL_CALL FmXCheckBoxCell::getTypes( ) throw(RuntimeException) { - Sequence< ::com::sun::star::uno::Type > aTypes = OComponentHelper::getTypes(); - - sal_Int32 nLen = aTypes.getLength(); - aTypes.realloc(nLen + 2); - aTypes.getArray()[nLen++] = ::getCppuType(static_cast< Reference< ::com::sun::star::awt::XControl >* >(NULL)); - aTypes.getArray()[nLen++] = ::getCppuType(static_cast< Reference< ::com::sun::star::awt::XCheckBox >* >(NULL)); - - return aTypes; + return ::comphelper::concatSequences( + FmXDataCell::getTypes(), + FmXCheckBoxCell_Base::getTypes() + ); } +//------------------------------------------------------------------------------ +IMPLEMENT_GET_IMPLEMENTATION_ID( FmXCheckBoxCell ) + //------------------------------------------------------------------ void SAL_CALL FmXCheckBoxCell::addItemListener( const Reference< ::com::sun::star::awt::XItemListener >& l ) throw( RuntimeException ) { @@ -3670,17 +3970,6 @@ void SAL_CALL FmXCheckBoxCell::removeItemListener( const Reference< ::com::sun:: m_aItemListeners.removeInterface( l ); } -//------------------------------------------------------------------ -void SAL_CALL FmXCheckBoxCell::setLabel( const ::rtl::OUString& rLabel ) throw( RuntimeException ) -{ - ::osl::MutexGuard aGuard( m_aMutex ); - if (m_pBox) - { - UpdateFromColumn(); - m_pBox->SetText( rLabel ); - } -} - //------------------------------------------------------------------ void SAL_CALL FmXCheckBoxCell::setState( short n ) throw( RuntimeException ) { @@ -3716,42 +4005,89 @@ void SAL_CALL FmXCheckBoxCell::enableTriState( sal_Bool b ) throw( RuntimeExcept } //------------------------------------------------------------------ -IMPL_LINK( FmXCheckBoxCell, OnClick, void*, EMPTYARG ) +void SAL_CALL FmXCheckBoxCell::addActionListener( const Reference< awt::XActionListener >& _Listener ) throw (RuntimeException) { - if (m_pBox) + m_aActionListeners.addInterface( _Listener ); +} + +//------------------------------------------------------------------ +void SAL_CALL FmXCheckBoxCell::removeActionListener( const Reference< awt::XActionListener >& _Listener ) throw (RuntimeException) +{ + m_aActionListeners.removeInterface( _Listener ); +} + +//------------------------------------------------------------------ +void SAL_CALL FmXCheckBoxCell::setLabel( const ::rtl::OUString& _Label ) throw (RuntimeException) +{ + ::vos::OGuard aGuard( Application::GetSolarMutex() ); + if ( m_pColumn ) + { + DbGridControl& rGrid( m_pColumn->GetParent() ); + rGrid.SetColumnTitle( rGrid.GetColumnId( m_pColumn->GetFieldPos() ), _Label ); + } +} + +//------------------------------------------------------------------ +void SAL_CALL FmXCheckBoxCell::setActionCommand( const ::rtl::OUString& _Command ) throw (RuntimeException) +{ + m_aActionCommand = _Command; +} + +//------------------------------------------------------------------ +Window* FmXCheckBoxCell::getEventWindow() const +{ + return m_pBox; +} + +//------------------------------------------------------------------ +void FmXCheckBoxCell::onWindowEvent( const ULONG _nEventId, const Window& _rWindow, const void* _pEventData ) +{ + switch ( _nEventId ) + { + case VCLEVENT_CHECKBOX_TOGGLE: { // check boxes are to be committed immediately (this holds for ordinary check box controls in // documents, and this must hold for check boxes in grid columns, too // 91210 - 22.08.2001 - frank.schoenheit@sun.com m_pCellControl->Commit(); - // notify our listeners - ::cppu::OInterfaceIteratorHelper aIt( m_aItemListeners ); - - ::com::sun::star::awt::ItemEvent aEvent; - aEvent.Source = *this; - aEvent.Highlighted = sal_False; - aEvent.Selected = m_pBox->GetState(); + Reference< XWindow > xKeepAlive( this ); + if ( m_aItemListeners.getLength() && m_pBox ) + { + awt::ItemEvent aEvent; + aEvent.Source = *this; + aEvent.Highlighted = sal_False; + aEvent.Selected = m_pBox->GetState(); + m_aItemListeners.notifyEach( &awt::XItemListener::itemStateChanged, aEvent ); + } + if ( m_aActionListeners.getLength() ) + { + awt::ActionEvent aEvent; + aEvent.Source = *this; + aEvent.ActionCommand = m_aActionCommand; + m_aActionListeners.notifyEach( &awt::XActionListener::actionPerformed, aEvent ); + } + } + break; - while ( aIt.hasMoreElements() ) - static_cast< awt::XItemListener* >( aIt.next() )->itemStateChanged( aEvent ); + default: + FmXDataCell::onWindowEvent( _nEventId, _rWindow, _pEventData ); + break; } - return 1; } /*************************************************************************/ DBG_NAME(FmXListBoxCell); //------------------------------------------------------------------------------ -FmXListBoxCell::FmXListBoxCell(DbGridColumn* pColumn, DbCellControl* pControl) - :FmXTextCell(pColumn, pControl) +FmXListBoxCell::FmXListBoxCell(DbGridColumn* pColumn, DbCellControl& _rControl) + :FmXTextCell( pColumn, _rControl ) ,m_aItemListeners(m_aMutex) ,m_aActionListeners(m_aMutex) - ,m_pBox((ListBox*)pControl->GetControl()) + ,m_pBox( &static_cast< ListBox& >( _rControl.GetWindow() ) ) { DBG_CTOR(FmXListBoxCell,NULL); - m_pBox->AddEventListener( LINK( this, FmXListBoxCell, OnSelect ) ); m_pBox->SetDoubleClickHdl( LINK( this, FmXListBoxCell, OnDoubleClick ) ); } @@ -3786,26 +4122,25 @@ void FmXListBoxCell::disposing() Any SAL_CALL FmXListBoxCell::queryAggregation( const ::com::sun::star::uno::Type& _rType ) throw(RuntimeException) { Any aReturn = FmXTextCell::queryAggregation(_rType); - if (!aReturn.hasValue()) - aReturn = ::cppu::queryInterface(_rType, - static_cast< ::com::sun::star::awt::XListBox* >(this) - ); + + if ( !aReturn.hasValue() ) + aReturn = FmXListBoxCell_Base::queryInterface( _rType ); + return aReturn; } //------------------------------------------------------------------------- Sequence< ::com::sun::star::uno::Type > SAL_CALL FmXListBoxCell::getTypes( ) throw(RuntimeException) { - Sequence< ::com::sun::star::uno::Type > aTypes = OComponentHelper::getTypes(); - - sal_Int32 nLen = aTypes.getLength(); - aTypes.realloc(nLen + 2); - aTypes.getArray()[nLen++] = ::getCppuType(static_cast< Reference< ::com::sun::star::awt::XControl >* >(NULL)); - aTypes.getArray()[nLen++] = ::getCppuType(static_cast< Reference< ::com::sun::star::awt::XListBox >* >(NULL)); - - return aTypes; + return ::comphelper::concatSequences( + FmXTextCell::getTypes(), + FmXListBoxCell_Base::getTypes() + ); } +//------------------------------------------------------------------------------ +IMPLEMENT_GET_IMPLEMENTATION_ID( FmXListBoxCell ) + //------------------------------------------------------------------ void SAL_CALL FmXListBoxCell::addItemListener(const Reference< ::com::sun::star::awt::XItemListener >& l) throw( RuntimeException ) { @@ -4042,10 +4377,10 @@ void SAL_CALL FmXListBoxCell::makeVisible(sal_Int16 nEntry) throw( RuntimeExcept } //------------------------------------------------------------------ -IMPL_LINK(FmXListBoxCell, OnSelect, VclWindowEvent*, _pEvent ) +void FmXListBoxCell::onWindowEvent( const ULONG _nEventId, const Window& _rWindow, const void* _pEventData ) { - if ( ( _pEvent->GetWindow() == m_pBox ) - && ( _pEvent->GetId() == VCLEVENT_LISTBOX_SELECT ) + if ( ( &_rWindow == m_pBox ) + && ( _nEventId == VCLEVENT_LISTBOX_SELECT ) ) { OnDoubleClick( NULL ); @@ -4059,8 +4394,10 @@ IMPL_LINK(FmXListBoxCell, OnSelect, VclWindowEvent*, _pEvent ) ? m_pBox->GetSelectEntryPos() : 0xFFFF; m_aItemListeners.notifyEach( &awt::XItemListener::itemStateChanged, aEvent ); + return; } - return 1; + + FmXTextCell::onWindowEvent( _nEventId, _rWindow, _pEventData ); } @@ -4082,6 +4419,203 @@ IMPL_LINK( FmXListBoxCell, OnDoubleClick, void*, EMPTYARG ) } +/*************************************************************************/ + +DBG_NAME( FmXComboBoxCell ); + +//------------------------------------------------------------------------------ +FmXComboBoxCell::FmXComboBoxCell( DbGridColumn* pColumn, DbCellControl& _rControl ) + :FmXTextCell( pColumn, _rControl ) + ,m_aItemListeners( m_aMutex ) + ,m_aActionListeners( m_aMutex ) + ,m_pComboBox( &static_cast< ComboBox& >( _rControl.GetWindow() ) ) +{ + DBG_CTOR( FmXComboBoxCell, NULL ); +} + +//------------------------------------------------------------------------------ +FmXComboBoxCell::~FmXComboBoxCell() +{ + if ( !OComponentHelper::rBHelper.bDisposed ) + { + acquire(); + dispose(); + } + + DBG_DTOR( FmXComboBoxCell, NULL ); +} + +//----------------------------------------------------------------------------- +void FmXComboBoxCell::disposing() +{ + ::com::sun::star::lang::EventObject aEvt(*this); + m_aItemListeners.disposeAndClear(aEvt); + m_aActionListeners.disposeAndClear(aEvt); + + FmXTextCell::disposing(); +} + +//------------------------------------------------------------------ +Any SAL_CALL FmXComboBoxCell::queryAggregation( const ::com::sun::star::uno::Type& _rType ) throw(RuntimeException) +{ + Any aReturn = FmXTextCell::queryAggregation(_rType); + + if ( !aReturn.hasValue() ) + aReturn = FmXComboBoxCell_Base::queryInterface( _rType ); + + return aReturn; +} + +//------------------------------------------------------------------------- +Sequence< Type > SAL_CALL FmXComboBoxCell::getTypes( ) throw(RuntimeException) +{ + return ::comphelper::concatSequences( + FmXTextCell::getTypes(), + FmXComboBoxCell_Base::getTypes() + ); +} + +//------------------------------------------------------------------------------ +IMPLEMENT_GET_IMPLEMENTATION_ID( FmXComboBoxCell ) + +//------------------------------------------------------------------ +void SAL_CALL FmXComboBoxCell::addItemListener(const Reference< awt::XItemListener >& l) throw( RuntimeException ) +{ + m_aItemListeners.addInterface( l ); +} + +//------------------------------------------------------------------ +void SAL_CALL FmXComboBoxCell::removeItemListener(const Reference< awt::XItemListener >& l) throw( RuntimeException ) +{ + m_aItemListeners.removeInterface( l ); +} + +//------------------------------------------------------------------ +void SAL_CALL FmXComboBoxCell::addActionListener(const Reference< awt::XActionListener >& l) throw( RuntimeException ) +{ + m_aActionListeners.addInterface( l ); +} + +//------------------------------------------------------------------ +void SAL_CALL FmXComboBoxCell::removeActionListener(const Reference< awt::XActionListener >& l) throw( RuntimeException ) +{ + m_aActionListeners.removeInterface( l ); +} + +//------------------------------------------------------------------ +void SAL_CALL FmXComboBoxCell::addItem( const ::rtl::OUString& _Item, sal_Int16 _Pos ) throw( RuntimeException ) +{ + ::osl::MutexGuard aGuard( m_aMutex ); + if ( m_pComboBox ) + m_pComboBox->InsertEntry( _Item, _Pos ); +} + +//------------------------------------------------------------------ +void SAL_CALL FmXComboBoxCell::addItems( const Sequence< ::rtl::OUString >& _Items, sal_Int16 _Pos ) throw( RuntimeException ) +{ + ::osl::MutexGuard aGuard( m_aMutex ); + if ( m_pComboBox ) + { + sal_uInt16 nP = _Pos; + for ( sal_uInt16 n = 0; n < _Items.getLength(); n++ ) + { + m_pComboBox->InsertEntry( _Items.getConstArray()[n], nP ); + if ( _Pos != -1 ) + nP++; + } + } +} + +//------------------------------------------------------------------ +void SAL_CALL FmXComboBoxCell::removeItems( sal_Int16 _Pos, sal_Int16 _Count ) throw( RuntimeException ) +{ + ::osl::MutexGuard aGuard( m_aMutex ); + if ( m_pComboBox ) + { + for ( sal_uInt16 n = _Count; n; ) + m_pComboBox->RemoveEntry( _Pos + (--n) ); + } +} + +//------------------------------------------------------------------ +sal_Int16 SAL_CALL FmXComboBoxCell::getItemCount() throw( RuntimeException ) +{ + ::osl::MutexGuard aGuard( m_aMutex ); + return m_pComboBox ? m_pComboBox->GetEntryCount() : 0; +} + +//------------------------------------------------------------------ +::rtl::OUString SAL_CALL FmXComboBoxCell::getItem( sal_Int16 _Pos ) throw( RuntimeException ) +{ + ::osl::MutexGuard aGuard( m_aMutex ); + String sItem; + if ( m_pComboBox ) + sItem = m_pComboBox->GetEntry( _Pos ); + return sItem; +} +//------------------------------------------------------------------ +Sequence< ::rtl::OUString > SAL_CALL FmXComboBoxCell::getItems() throw( RuntimeException ) +{ + ::osl::MutexGuard aGuard( m_aMutex ); + + Sequence< ::rtl::OUString > aItems; + if ( m_pComboBox ) + { + sal_uInt16 nEntries = m_pComboBox->GetEntryCount(); + aItems.realloc( nEntries ); + ::rtl::OUString* pItem = aItems.getArray(); + for ( sal_uInt16 n=0; nGetEntry( n ); + } + return aItems; +} + +//------------------------------------------------------------------ +sal_Int16 SAL_CALL FmXComboBoxCell::getDropDownLineCount() throw( RuntimeException ) +{ + ::osl::MutexGuard aGuard( m_aMutex ); + + sal_Int16 nLines = 0; + if ( m_pComboBox ) + nLines = m_pComboBox->GetDropDownLineCount(); + + return nLines; +} + +//------------------------------------------------------------------ +void SAL_CALL FmXComboBoxCell::setDropDownLineCount(sal_Int16 nLines) throw( RuntimeException ) +{ + ::osl::MutexGuard aGuard( m_aMutex ); + if ( m_pComboBox ) + m_pComboBox->SetDropDownLineCount( nLines ); +} + +//------------------------------------------------------------------------------ +void FmXComboBoxCell::onWindowEvent( const ULONG _nEventId, const Window& _rWindow, const void* _pEventData ) +{ + + switch ( _nEventId ) + { + case VCLEVENT_COMBOBOX_SELECT: + { + awt::ItemEvent aEvent; + aEvent.Source = *this; + aEvent.Highlighted = sal_False; + + // Bei Mehrfachselektion 0xFFFF, sonst die ID + aEvent.Selected = ( m_pComboBox->GetSelectEntryCount() == 1 ) + ? m_pComboBox->GetSelectEntryPos() + : 0xFFFF; + m_aItemListeners.notifyEach( &awt::XItemListener::itemStateChanged, aEvent ); + } + break; + + default: + FmXTextCell::onWindowEvent( _nEventId, _rWindow, _pEventData ); + break; + } +} + /*************************************************************************/ TYPEINIT1(FmXFilterCell, FmXGridCell); @@ -4093,8 +4627,8 @@ Reference< XInterface > FmXFilterCell_CreateInstance(const Reference< ::com::su DBG_NAME(FmXFilterCell); //------------------------------------------------------------------------------ -FmXFilterCell::FmXFilterCell(DbGridColumn* pColumn, DbCellControl* pControl) - :FmXGridCell(pColumn, pControl) +FmXFilterCell::FmXFilterCell(DbGridColumn* pColumn, DbCellControl* pControl ) + :FmXGridCell( pColumn, pControl ) ,m_aTextListeners(m_aMutex) { DBG_CTOR(FmXFilterCell,NULL); @@ -4180,26 +4714,25 @@ void FmXFilterCell::disposing() Any SAL_CALL FmXFilterCell::queryAggregation( const ::com::sun::star::uno::Type& _rType ) throw(RuntimeException) { Any aReturn = FmXGridCell::queryAggregation(_rType); - if (!aReturn.hasValue()) - aReturn = ::cppu::queryInterface(_rType, - static_cast< ::com::sun::star::awt::XTextComponent* >(this) - ); + + if ( !aReturn.hasValue() ) + aReturn = FmXFilterCell_Base::queryInterface( _rType ); + return aReturn; } //------------------------------------------------------------------------- Sequence< ::com::sun::star::uno::Type > SAL_CALL FmXFilterCell::getTypes( ) throw(RuntimeException) { - Sequence< ::com::sun::star::uno::Type > aTypes = OComponentHelper::getTypes(); - - sal_Int32 nLen = aTypes.getLength(); - aTypes.realloc(nLen + 2); - aTypes.getArray()[nLen++] = ::getCppuType(static_cast< Reference< ::com::sun::star::awt::XControl >* >(NULL)); - aTypes.getArray()[nLen++] = ::getCppuType(static_cast< Reference< ::com::sun::star::awt::XTextComponent >* >(NULL)); - - return aTypes; + return ::comphelper::concatSequences( + FmXGridCell::getTypes(), + FmXFilterCell_Base::getTypes() + ); } +//------------------------------------------------------------------------------ +IMPLEMENT_GET_IMPLEMENTATION_ID( FmXFilterCell ) + // ::com::sun::star::awt::XTextComponent //------------------------------------------------------------------------------ void SAL_CALL FmXFilterCell::addTextListener(const Reference< ::com::sun::star::awt::XTextListener >& l) throw( RuntimeException ) diff --git a/svx/source/form/fmPropBrw.cxx b/svx/source/form/fmPropBrw.cxx index d968342d6ef5..ccce6b50ee20 100644 --- a/svx/source/form/fmPropBrw.cxx +++ b/svx/source/form/fmPropBrw.cxx @@ -190,7 +190,7 @@ using namespace ::svxform; case FormComponentType::IMAGECONTROL: nClassNameResourceId = RID_STR_PROPTITLE_IMAGECONTROL; break; case FormComponentType::HIDDENCONTROL: - nClassNameResourceId = RID_STR_HIDDEN_CLASSNAME; break; + nClassNameResourceId = RID_STR_PROPTITLE_HIDDEN; break; case FormComponentType::SCROLLBAR: nClassNameResourceId = RID_STR_PROPTITLE_SCROLLBAR; break; case FormComponentType::SPINBUTTON: @@ -199,7 +199,7 @@ using namespace ::svxform; nClassNameResourceId = RID_STR_PROPTITLE_NAVBAR; break; case FormComponentType::CONTROL: default: - nClassNameResourceId = RID_STR_CONTROL_CLASSNAME; break; + nClassNameResourceId = RID_STR_CONTROL; break; } if ( !nClassNameResourceId ) @@ -218,6 +218,7 @@ FmPropBrw::FmPropBrw( const Reference< XMultiServiceFactory >& _xORB, SfxBinding :SfxFloatingWindow(_pBindings, _pMgr, _pParent, WinBits(WB_STDMODELESS|WB_SIZEABLE|WB_3DLOOK|WB_ROLLABLE) ) ,SfxControllerItem(SID_FM_PROPERTY_CONTROL, *_pBindings) ,m_bInitialStateChange(sal_True) + ,m_bInStateChange( false ) ,m_xORB(_xORB) { DBG_CTOR(FmPropBrw,NULL); @@ -668,11 +669,12 @@ void FmPropBrw::impl_ensurePropertyBrowser_nothrow( FmFormShell* _pFormShell ) //----------------------------------------------------------------------- void FmPropBrw::StateChanged(sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState) { + if (!pState || SID_FM_PROPERTY_CONTROL != nSID) + return; + + m_bInStateChange = true; try { - if (!pState || SID_FM_PROPERTY_CONTROL != nSID) - return; - if (eState >= SFX_ITEM_AVAILABLE) { FmFormShell* pShell = PTR_CAST(FmFormShell,((SfxObjectItem*)pState)->GetShell()); @@ -719,5 +721,5 @@ void FmPropBrw::StateChanged(sal_uInt16 nSID, SfxItemState eState, const SfxPool { DBG_ERROR("FmPropBrw::StateChanged: Exception occured!"); } - + m_bInStateChange = false; } diff --git a/svx/source/form/fmctrler.cxx b/svx/source/form/fmctrler.cxx index 935bdbc74fe8..48db5acbb01e 100644 --- a/svx/source/form/fmctrler.cxx +++ b/svx/source/form/fmctrler.cxx @@ -129,6 +129,7 @@ struct ColumnInfo Reference< XColumn > xColumn; sal_Int32 nNullable; sal_Bool bAutoIncrement; + sal_Bool bReadOnly; ::rtl::OUString sName; // information about the control(s) bound to this column @@ -148,6 +149,7 @@ struct ColumnInfo :xColumn() ,nNullable( ColumnValue::NULLABLE_UNKNOWN ) ,bAutoIncrement( sal_False ) + ,bReadOnly( sal_False ) ,sName() ,xFirstControlWithInputRequired() ,xFirstGridWithInputRequiredColumn() @@ -202,6 +204,7 @@ ColumnInfoCache::ColumnInfoCache( const Reference< XColumnsSupplier >& _rxColSup OSL_VERIFY( xColumnProps->getPropertyValue( FM_PROP_ISNULLABLE ) >>= aColInfo.nNullable ); OSL_VERIFY( xColumnProps->getPropertyValue( FM_PROP_AUTOINCREMENT ) >>= aColInfo.bAutoIncrement ); OSL_VERIFY( xColumnProps->getPropertyValue( FM_PROP_NAME ) >>= aColInfo.sName ); + OSL_VERIFY( xColumnProps->getPropertyValue( FM_PROP_ISREADONLY ) >>= aColInfo.bReadOnly ); m_aColumns.push_back( aColInfo ); } @@ -227,6 +230,7 @@ namespace OSL_VERIFY( _rxControlModel->getPropertyValue( FM_PROP_INPUT_REQUIRED ) >>= bInputRequired ); return ( bInputRequired != sal_False ); } + void lcl_resetColumnControlInfo( ColumnInfo& _rColInfo ) { _rColInfo.xFirstControlWithInputRequired.clear(); @@ -2956,7 +2960,6 @@ void FmXFormController::setFilter(::std::vector& rFieldInfos) aRow[(*iter).xText] = sCriteria; } } - break; } } } @@ -3502,6 +3505,9 @@ sal_Bool SAL_CALL FmXFormController::approveRowChange(const RowChangeEvent& _rEv if ( rColInfo.bAutoIncrement ) continue; + if ( rColInfo.bReadOnly ) + continue; + if ( !rColInfo.xFirstControlWithInputRequired.is() && !rColInfo.xFirstGridWithInputRequiredColumn.is() ) continue; diff --git a/svx/source/form/fmpgeimp.cxx b/svx/source/form/fmpgeimp.cxx index b4a5b209956f..ed4cd890ec9e 100644 --- a/svx/source/form/fmpgeimp.cxx +++ b/svx/source/form/fmpgeimp.cxx @@ -38,6 +38,7 @@ #include "fmprop.hrc" #include "fmservs.hxx" #include "fmobj.hxx" +#include "formcontrolfactory.hxx" #include "svditer.hxx" #include "fmresids.hrc" #include "svx/dbtoolsclient.hxx" @@ -551,18 +552,12 @@ Reference< ::com::sun::star::form::XForm > FmFormPageImpl::findPlaceInFormCompo xFormProps->setPropertyValue(FM_PROP_COMMANDTYPE, makeAny(nCommandType)); Reference< ::com::sun::star::container::XNameAccess > xNamedSet( getForms(), UNO_QUERY ); - ::rtl::OUString aName; - if ((CommandType::TABLE == nCommandType) || (CommandType::QUERY == nCommandType)) - { - // Namen der ::com::sun::star::form ueber den Titel der CursorSource setzen - aName = getUniqueName(rCursorSource, xNamedSet); - } - else - // ansonsten StandardformName verwenden - aName = getUniqueName(::rtl::OUString(String(SVX_RES(RID_STR_STDFORMNAME))), xNamedSet); + const bool bTableOrQuery = ( CommandType::TABLE == nCommandType ) || ( CommandType::QUERY == nCommandType ); + ::rtl::OUString sName = FormControlFactory::getUniqueName( xNamedSet, + bTableOrQuery ? rCursorSource : ::rtl::OUString( String( SVX_RES( RID_STR_STDFORMNAME ) ) ) ); - xFormProps->setPropertyValue(FM_PROP_NAME, makeAny(aName)); + xFormProps->setPropertyValue( FM_PROP_NAME, makeAny( sName ) ); if( bUndo ) { @@ -574,7 +569,7 @@ Reference< ::com::sun::star::form::XForm > FmFormPageImpl::findPlaceInFormCompo xContainer->getCount())); } - getForms()->insertByName(aName, makeAny(xForm)); + getForms()->insertByName( sName, makeAny( xForm ) ); if( bUndo ) pModel->EndUndo(); @@ -672,7 +667,6 @@ Reference< XForm > FmFormPageImpl::findFormForDataSource( //------------------------------------------------------------------------------ ::rtl::OUString FmFormPageImpl::setUniqueName(const Reference< XFormComponent > & xFormComponent, const Reference< XForm > & xControls) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFormPageImpl::setUniqueName" ); #if OSL_DEBUG_LEVEL > 0 try { @@ -696,9 +690,10 @@ Reference< XForm > FmFormPageImpl::findFormForDataSource( // setzen eines default Namens ueber die ClassId sal_Int16 nClassId( FormComponentType::CONTROL ); xSet->getPropertyValue( FM_PROP_CLASSID ) >>= nClassId; - Reference< XServiceInfo > xSI( xSet, UNO_QUERY ); - ::rtl::OUString sDefaultName = getDefaultName( nClassId, xControls, xSI ); + ::rtl::OUString sDefaultName = FormControlFactory::getDefaultUniqueName_ByComponentType( + Reference< XNameAccess >( xControls, UNO_QUERY ), xSet ); + // bei Radiobuttons, die einen Namen haben, diesen nicht ueberschreiben! if (!sName.getLength() || nClassId != ::com::sun::star::form::FormComponentType::RADIOBUTTON) { @@ -711,78 +706,6 @@ Reference< XForm > FmFormPageImpl::findFormForDataSource( return sName; } - -UniString FmFormPageImpl::getDefaultName( sal_Int16 _nClassId, const Reference< XServiceInfo >& _rxObject ) -{ - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFormPageImpl::getDefaultName" ); - sal_uInt16 nResId; - - switch (_nClassId) - { - case FormComponentType::COMMANDBUTTON: nResId = RID_STR_BUTTON_CLASSNAME; break; - case FormComponentType::RADIOBUTTON: nResId = RID_STR_RADIOBUTTON_CLASSNAME; break; - case FormComponentType::CHECKBOX: nResId = RID_STR_CHECKBOX_CLASSNAME; break; - case FormComponentType::LISTBOX: nResId = RID_STR_LISTBOX_CLASSNAME; break; - case FormComponentType::COMBOBOX: nResId = RID_STR_COMBOBOX_CLASSNAME; break; - case FormComponentType::GROUPBOX: nResId = RID_STR_GROUPBOX_CLASSNAME; break; - case FormComponentType::IMAGEBUTTON: nResId = RID_STR_IMAGE_CLASSNAME; break; - case FormComponentType::FIXEDTEXT: nResId = RID_STR_FIXEDTEXT_CLASSNAME; break; - case FormComponentType::GRIDCONTROL: nResId = RID_STR_GRID_CLASSNAME; break; - case FormComponentType::FILECONTROL: nResId = RID_STR_FILECONTROL_CLASSNAME; break; - case FormComponentType::DATEFIELD: nResId = RID_STR_DATEFIELD_CLASSNAME; break; - case FormComponentType::TIMEFIELD: nResId = RID_STR_TIMEFIELD_CLASSNAME; break; - case FormComponentType::NUMERICFIELD: nResId = RID_STR_NUMERICFIELD_CLASSNAME; break; - case FormComponentType::CURRENCYFIELD: nResId = RID_STR_CURRENCYFIELD_CLASSNAME; break; - case FormComponentType::PATTERNFIELD: nResId = RID_STR_PATTERNFIELD_CLASSNAME; break; - case FormComponentType::IMAGECONTROL: nResId = RID_STR_IMAGECONTROL_CLASSNAME; break; - case FormComponentType::HIDDENCONTROL: nResId = RID_STR_HIDDEN_CLASSNAME; break; - case FormComponentType::SCROLLBAR: nResId = RID_STR_CLASSNAME_SCROLLBAR; break; - case FormComponentType::SPINBUTTON: nResId = RID_STR_CLASSNAME_SPINBUTTON; break; - case FormComponentType::NAVIGATIONBAR: nResId = RID_STR_NAVBAR_CLASSNAME; break; - - case FormComponentType::TEXTFIELD: - nResId = RID_STR_EDIT_CLASSNAME; - if ( _rxObject.is() && _rxObject->supportsService( FM_SUN_COMPONENT_FORMATTEDFIELD ) ) - nResId = RID_STR_FORMATTED_CLASSNAME; - break; - - default: - nResId = RID_STR_CONTROL_CLASSNAME; break; - } - - return SVX_RES(nResId); -} - -//------------------------------------------------------------------------------ -::rtl::OUString FmFormPageImpl::getDefaultName( - sal_Int16 _nClassId, const Reference< XForm >& _rxControls, const Reference< XServiceInfo >& _rxObject ) const -{ - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFormPageImpl::getDefaultName" ); - ::rtl::OUString aClassName=getDefaultName( _nClassId, _rxObject ); - - Reference< ::com::sun::star::container::XNameAccess > xNamedSet( _rxControls, UNO_QUERY ); - return getUniqueName(aClassName, xNamedSet); -} - -//------------------------------------------------------------------ -::rtl::OUString FmFormPageImpl::getUniqueName(const ::rtl::OUString& rName, const Reference< ::com::sun::star::container::XNameAccess > & xNamedSet) const -{ - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFormPageImpl::getUniqueName" ); - Reference< ::com::sun::star::container::XIndexAccess > xIndexSet(xNamedSet, UNO_QUERY); - ::rtl::OUString sName( rName ); - - if ( !xIndexSet.is() ) - return sName; - - sal_Int32 n = 0; - ::rtl::OUString sClassName = rName; - - while ( xNamedSet->hasByName( sName ) ) - sName = sClassName + ::rtl::OUString::valueOf(++n); - - return sName; -} - //------------------------------------------------------------------ void FmFormPageImpl::formObjectInserted( const FmFormObj& _object ) { diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx index 87149994839b..8c5ca61f6691 100644 --- a/svx/source/form/fmshimp.cxx +++ b/svx/source/form/fmshimp.cxx @@ -785,7 +785,7 @@ void SAL_CALL FmXFormShell::formDeactivated(const EventObject& rEvent) throw( Ru void FmXFormShell::disposing() { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::disposing" ); - OSL_TRACE( "--- FmXFormShell::disposing : %p, ........, ........\n", this ); + OSL_TRACE( "--- FmXFormShell::disposing : %p, ........, ........", this ); impl_checkDisposed(); FmXFormShell_BASE::disposing(); @@ -3936,7 +3936,7 @@ void FmXFormShell::SetWizardUsing(sal_Bool _bUseThem) void FmXFormShell::viewDeactivated( FmFormView& _rCurrentView, sal_Bool _bDeactivateController /* = sal_True */ ) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::viewDeactivated" ); - OSL_TRACE( "--- FmXFormShell::viewDeactivated: %p, %p, ........\n", this, &_rCurrentView ); + OSL_TRACE( "--- FmXFormShell::viewDeactivated: %p, %p, ........", this, &_rCurrentView ); if ( _rCurrentView.GetImpl() && !_rCurrentView.IsDesignMode() ) { @@ -3971,7 +3971,7 @@ void FmXFormShell::viewDeactivated( FmFormView& _rCurrentView, sal_Bool _bDeacti // remove callbacks at the page if ( pPage ) { - OSL_TRACE( "--- FmXFormShell::resetHandler : %p, ........, %p\n", this, pPage ); + OSL_TRACE( "--- FmXFormShell::resetHandler : %p, ........, %p", this, pPage ); pPage->GetImpl().SetFormsCreationHdl( Link() ); } UpdateForms( sal_True ); @@ -4010,7 +4010,7 @@ IMPL_LINK( FmXFormShell, OnFormsCreated, FmFormPage*, /*_pPage*/ ) void FmXFormShell::viewActivated( FmFormView& _rCurrentView, sal_Bool _bSyncAction /* = sal_False */ ) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::viewActivated" ); - OSL_TRACE( "--- FmXFormShell::viewActivated : %p, %p, ........\n", this, &_rCurrentView ); + OSL_TRACE( "--- FmXFormShell::viewActivated : %p, %p, ........", this, &_rCurrentView ); FmFormPage* pPage = _rCurrentView.GetCurPage(); @@ -4040,7 +4040,7 @@ void FmXFormShell::viewActivated( FmFormView& _rCurrentView, sal_Bool _bSyncActi // set callbacks at the page if ( pPage ) { - OSL_TRACE( "--- FmXFormShell::setHandler : %p, ........, %p\n", this, pPage ); + OSL_TRACE( "--- FmXFormShell::setHandler : %p, ........, %p", this, pPage ); pPage->GetImpl().SetFormsCreationHdl( LINK( this, FmXFormShell, OnFormsCreated ) ); } diff --git a/svx/source/form/fmstring.src b/svx/source/form/fmstring.src index 2572c2ed2239..8b42ccadc6a6 100644 --- a/svx/source/form/fmstring.src +++ b/svx/source/form/fmstring.src @@ -84,107 +84,16 @@ Resource RID_RSC_TABWIN_PREFIX }; String RID_STR_FORMSHELL { - Text [ en-US ] = "Form"; + Text = "Form Shell"; }; String RID_STR_STDFORMNAME { - Text = "Standard"; -}; -String RID_STR_FORMATTED_CLASSNAME -{ - Text = "FormattedField"; -}; -String RID_STR_CONTROL_CLASSNAME -{ - Text = "Control"; -}; -String RID_STR_CHECKBOX_CLASSNAME -{ - Text = "CheckBox"; -}; -String RID_STR_RADIOBUTTON_CLASSNAME -{ - Text = "OptionButton"; -}; -String RID_STR_BUTTON_CLASSNAME -{ - Text = "PushButton"; -}; -String RID_STR_FIXEDTEXT_CLASSNAME -{ - Text = "LabelField"; -}; -String RID_STR_IMAGE_CLASSNAME -{ - Text = "ImageButton"; -}; -String RID_STR_GRID_CLASSNAME -{ - Text = "TableControl"; -}; -String RID_STR_GROUPBOX_CLASSNAME -{ - Text = "GroupBox"; -}; -String RID_STR_LISTBOX_CLASSNAME -{ - Text = "ListBox"; -}; -String RID_STR_COMBOBOX_CLASSNAME -{ - Text = "ComboBox"; -}; -String RID_STR_EDIT_CLASSNAME -{ - Text = "TextBox"; + Text [ en-US ]= "Form"; }; -String RID_STR_FILECONTROL_CLASSNAME +String RID_STR_PROPTITLE_HIDDEN { - Text = "FileSelection"; + Text [ en-US ] = "Hidden Control"; }; -String RID_STR_DATEFIELD_CLASSNAME -{ - Text = "DateField"; -}; -String RID_STR_TIMEFIELD_CLASSNAME -{ - Text = "TimeField"; -}; -String RID_STR_NUMERICFIELD_CLASSNAME -{ - Text = "NumericalField"; -}; -String RID_STR_CURRENCYFIELD_CLASSNAME -{ - Text = "CurrencyField"; -}; -String RID_STR_PATTERNFIELD_CLASSNAME -{ - Text = "PatternField"; -}; -String RID_STR_IMAGECONTROL_CLASSNAME -{ - Text = "ImageControl"; -}; -String RID_STR_HIDDEN_CLASSNAME -{ - Text = "HiddenControl"; -}; -String RID_STR_NAVBAR_CLASSNAME -{ - Text [ en-US ] = "NavigationBar"; -}; - -String RID_STR_CLASSNAME_SCROLLBAR -{ - Text [ en-US ] = "Scrollbar"; -}; - -String RID_STR_CLASSNAME_SPINBUTTON -{ - Text [ en-US ] = "SpinButton"; -}; - String RID_STR_CONTROL { Text [ en-US ] = "Control"; @@ -282,7 +191,7 @@ String RID_STR_TIME }; String RID_STR_PROPTITLE_PUSHBUTTON { - Text [ en-US ] = "Button"; + Text [ en-US ] = "Push Button"; }; String RID_STR_PROPTITLE_RADIOBUTTON { @@ -294,7 +203,7 @@ String RID_STR_PROPTITLE_CHECKBOX }; String RID_STR_PROPTITLE_FIXEDTEXT { - Text [ en-US ] = "Label field"; + Text [ en-US ] = "Label Field"; }; String RID_STR_PROPTITLE_GROUPBOX { diff --git a/svx/source/form/fmview.cxx b/svx/source/form/fmview.cxx index 94ce048f4ed2..222407a36021 100644 --- a/svx/source/form/fmview.cxx +++ b/svx/source/form/fmview.cxx @@ -342,7 +342,7 @@ void FmFormView::GrabFirstControlFocus( sal_Bool _bForceSync ) //------------------------------------------------------------------------ SdrPageView* FmFormView::ShowSdrPage(SdrPage* pPage) { - OSL_TRACE( "--- FmFormView::ShowSdrPage : ........, %p, %p\n", this, pPage ); + OSL_TRACE( "--- FmFormView::ShowSdrPage : ........, %p, %p", this, pPage ); SdrPageView* pPV = E3dView::ShowSdrPage(pPage); @@ -380,7 +380,7 @@ SdrPageView* FmFormView::ShowSdrPage(SdrPage* pPage) //------------------------------------------------------------------------ void FmFormView::HideSdrPage() { - OSL_TRACE( "--- FmFormView::HideSdrPage : ........, %p, %p\n", this, GetCurPage() ); + OSL_TRACE( "--- FmFormView::HideSdrPage : ........, %p, %p", this, GetCurPage() ); // --- 1. deactivate controls if ( !IsDesignMode() ) diff --git a/svx/source/form/formcontrolfactory.cxx b/svx/source/form/formcontrolfactory.cxx index 50434af4917b..de1a7d76b526 100644 --- a/svx/source/form/formcontrolfactory.cxx +++ b/svx/source/form/formcontrolfactory.cxx @@ -35,6 +35,7 @@ #include "fmcontrollayout.hxx" #include "fmprop.hrc" #include "fmresids.hrc" +#include "fmservs.hxx" #include "svx/dialmgr.hxx" #include "svx/svdouno.hxx" @@ -739,6 +740,75 @@ namespace svxform } } + //------------------------------------------------------------------------------ + ::rtl::OUString FormControlFactory::getDefaultName( sal_Int16 _nClassId, const Reference< XServiceInfo >& _rxObject ) + { + sal_uInt16 nResId(0); + + switch ( _nClassId ) + { + case FormComponentType::COMMANDBUTTON: nResId = RID_STR_PROPTITLE_PUSHBUTTON; break; + case FormComponentType::RADIOBUTTON: nResId = RID_STR_PROPTITLE_RADIOBUTTON; break; + case FormComponentType::CHECKBOX: nResId = RID_STR_PROPTITLE_CHECKBOX; break; + case FormComponentType::LISTBOX: nResId = RID_STR_PROPTITLE_LISTBOX; break; + case FormComponentType::COMBOBOX: nResId = RID_STR_PROPTITLE_COMBOBOX; break; + case FormComponentType::GROUPBOX: nResId = RID_STR_PROPTITLE_GROUPBOX; break; + case FormComponentType::IMAGEBUTTON: nResId = RID_STR_PROPTITLE_IMAGEBUTTON; break; + case FormComponentType::FIXEDTEXT: nResId = RID_STR_PROPTITLE_FIXEDTEXT; break; + case FormComponentType::GRIDCONTROL: nResId = RID_STR_PROPTITLE_DBGRID; break; + case FormComponentType::FILECONTROL: nResId = RID_STR_PROPTITLE_FILECONTROL; break; + case FormComponentType::DATEFIELD: nResId = RID_STR_PROPTITLE_DATEFIELD; break; + case FormComponentType::TIMEFIELD: nResId = RID_STR_PROPTITLE_TIMEFIELD; break; + case FormComponentType::NUMERICFIELD: nResId = RID_STR_PROPTITLE_NUMERICFIELD; break; + case FormComponentType::CURRENCYFIELD: nResId = RID_STR_PROPTITLE_CURRENCYFIELD; break; + case FormComponentType::PATTERNFIELD: nResId = RID_STR_PROPTITLE_PATTERNFIELD; break; + case FormComponentType::IMAGECONTROL: nResId = RID_STR_PROPTITLE_IMAGECONTROL; break; + case FormComponentType::HIDDENCONTROL: nResId = RID_STR_PROPTITLE_HIDDEN; break; + case FormComponentType::SCROLLBAR: nResId = RID_STR_PROPTITLE_SCROLLBAR; break; + case FormComponentType::SPINBUTTON: nResId = RID_STR_PROPTITLE_SPINBUTTON; break; + case FormComponentType::NAVIGATIONBAR: nResId = RID_STR_PROPTITLE_NAVBAR; break; + + case FormComponentType::TEXTFIELD: + nResId = RID_STR_PROPTITLE_EDIT; + if ( _rxObject.is() && _rxObject->supportsService( FM_SUN_COMPONENT_FORMATTEDFIELD ) ) + nResId = RID_STR_PROPTITLE_FORMATTED; + break; + + default: + nResId = RID_STR_CONTROL; break; + } + + return String( SVX_RES( nResId ) ); + } + + //------------------------------------------------------------------------------ + ::rtl::OUString FormControlFactory::getDefaultUniqueName_ByComponentType( const Reference< XNameAccess >& _rxContainer, + const Reference< XPropertySet >& _rxObject ) + { + sal_Int16 nClassId = FormComponentType::CONTROL; + OSL_VERIFY( _rxObject->getPropertyValue( FM_PROP_CLASSID ) >>= nClassId ); + ::rtl::OUString sBaseName = getDefaultName( nClassId, Reference< XServiceInfo >( _rxObject, UNO_QUERY ) ); + + return getUniqueName( _rxContainer, sBaseName ); + } + + //------------------------------------------------------------------------------ + ::rtl::OUString FormControlFactory::getUniqueName( const Reference< XNameAccess >& _rxContainer, const ::rtl::OUString& _rBaseName ) + { + sal_Int32 n = 0; + ::rtl::OUString sName; + do + { + ::rtl::OUStringBuffer aBuf( _rBaseName ); + aBuf.appendAscii( " " ); + aBuf.append( ++n ); + sName = aBuf.makeStringAndClear(); + } + while ( _rxContainer->hasByName( sName ) ); + + return sName; + } + //........................................................................ } // namespace svxform //........................................................................ diff --git a/svx/source/form/navigatortree.cxx b/svx/source/form/navigatortree.cxx index b57863ffd5ae..f90f0d8c2ce4 100644 --- a/svx/source/form/navigatortree.cxx +++ b/svx/source/form/navigatortree.cxx @@ -1573,7 +1573,7 @@ namespace svxform aBaseName = SVX_RES( RID_STR_STDFORMNAME ); else if( pEntryData->ISA(FmControlData) ) - aBaseName = SVX_RES( RID_STR_CONTROL_CLASSNAME ); + aBaseName = SVX_RES( RID_STR_CONTROL ); ////////////////////////////////////////////////////////////////////// // Neuen Namen erstellen diff --git a/svx/source/inc/fmPropBrw.hxx b/svx/source/inc/fmPropBrw.hxx index 6d7e6bde0259..285cb90320d2 100644 --- a/svx/source/inc/fmPropBrw.hxx +++ b/svx/source/inc/fmPropBrw.hxx @@ -57,6 +57,7 @@ class FmFormShell; class FmPropBrw : public SfxFloatingWindow, public SfxControllerItem { sal_Bool m_bInitialStateChange; + bool m_bInStateChange; ::rtl::OUString m_sLastActivePage; ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xInspectorContext; diff --git a/svx/source/inc/fmpgeimp.hxx b/svx/source/inc/fmpgeimp.hxx index 350fbedd709e..880ecb21d7e5 100644 --- a/svx/source/inc/fmpgeimp.hxx +++ b/svx/source/inc/fmpgeimp.hxx @@ -133,21 +133,8 @@ protected: sal_Int32 nCommandType ); - ::rtl::OUString getDefaultName( - sal_Int16 _nClassId, - const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm>& _rxControls, - const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XServiceInfo >& _rxObject - ) const; - public: - - static UniString getDefaultName( - sal_Int16 nClassId, - const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XServiceInfo >& _rxObject - ); - ::rtl::OUString setUniqueName(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent>& xFormComponent, const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm>& xControls); - ::rtl::OUString getUniqueName(const ::rtl::OUString& rName, const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess>& xNamedSet) const; void formObjectInserted( const FmFormObj& _object ); void formObjectRemoved( const FmFormObj& _object ); diff --git a/svx/source/inc/fmresids.hrc b/svx/source/inc/fmresids.hrc index e9f39396cca6..95a478fc5aee 100644 --- a/svx/source/inc/fmresids.hrc +++ b/svx/source/inc/fmresids.hrc @@ -214,29 +214,29 @@ #define RID_STR_SVT_SQL_SYNTAX_COLUMN (RID_FORMS_START + 98) #define RID_STR_PROPTITLE_SCROLLBAR (RID_FORMS_START + 99) #define RID_STR_PROPTITLE_SPINBUTTON (RID_FORMS_START + 100) -#define RID_STR_EDIT_CLASSNAME (RID_FORMS_START + 101) -#define RID_STR_BUTTON_CLASSNAME (RID_FORMS_START + 102) -#define RID_STR_FIXEDTEXT_CLASSNAME (RID_FORMS_START + 103) -#define RID_STR_CHECKBOX_CLASSNAME (RID_FORMS_START + 104) -#define RID_STR_RADIOBUTTON_CLASSNAME (RID_FORMS_START + 105) -#define RID_STR_LISTBOX_CLASSNAME (RID_FORMS_START + 106) -#define RID_STR_COMBOBOX_CLASSNAME (RID_FORMS_START + 107) -#define RID_STR_FORMATTED_CLASSNAME (RID_FORMS_START + 108) -#define RID_STR_GROUPBOX_CLASSNAME (RID_FORMS_START + 109) -#define RID_STR_CONTROL_CLASSNAME (RID_FORMS_START + 110) -#define RID_STR_IMAGE_CLASSNAME (RID_FORMS_START + 111) -#define RID_STR_GRID_CLASSNAME (RID_FORMS_START + 112) -#define RID_STR_FILECONTROL_CLASSNAME (RID_FORMS_START + 113) -#define RID_STR_DATEFIELD_CLASSNAME (RID_FORMS_START + 114) -#define RID_STR_TIMEFIELD_CLASSNAME (RID_FORMS_START + 115) -#define RID_STR_NUMERICFIELD_CLASSNAME (RID_FORMS_START + 116) -#define RID_STR_CURRENCYFIELD_CLASSNAME (RID_FORMS_START + 117) -#define RID_STR_PATTERNFIELD_CLASSNAME (RID_FORMS_START + 118) -#define RID_STR_IMAGECONTROL_CLASSNAME (RID_FORMS_START + 119) -#define RID_STR_HIDDEN_CLASSNAME (RID_FORMS_START + 120) -#define RID_STR_CLASSNAME_SCROLLBAR (RID_FORMS_START + 121) -#define RID_STR_CLASSNAME_SPINBUTTON (RID_FORMS_START + 122) -#define RID_STR_NAVBAR_CLASSNAME (RID_FORMS_START + 123) +#define RID_STR_PROPTITLE_HIDDEN (RID_FORMS_START + 101) + // FREE + // FREE + // FREE + // FREE + // FREE + // FREE + // FREE + // FREE + // FREE + // FREE + // FREE + // FREE + // FREE + // FREE + // FREE + // FREE + // FREE + // FREE + // FREE + // FREE + // FREE + // FREE #define RID_STR_DATANAVIGATOR (RID_FORMS_START + 124) #define RID_STR_DATANAV_SUBM_PARENT (RID_FORMS_START + 125) #define RID_STR_DATANAV_SUBM_ID (RID_FORMS_START + 126) diff --git a/svx/source/inc/formcontrolfactory.hxx b/svx/source/inc/formcontrolfactory.hxx index 2868308d6f7c..432ad25bdea0 100644 --- a/svx/source/inc/formcontrolfactory.hxx +++ b/svx/source/inc/formcontrolfactory.hxx @@ -37,6 +37,8 @@ #include #include #include +#include +#include /** === end UNO includes === **/ #include @@ -94,6 +96,21 @@ namespace svxform const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormats >& _rxNumberFormats ); + static ::rtl::OUString getDefaultName( + const sal_Int16 nClassId, + const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XServiceInfo >& _rxObject + ); + + static ::rtl::OUString getDefaultUniqueName_ByComponentType( + const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& _rxContainer, + const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxObject + ); + + static ::rtl::OUString getUniqueName( + const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& _rxContainer, + const ::rtl::OUString& _rBaseName + ); + private: ::std::auto_ptr< FormControlFactory_Data > m_pData; }; diff --git a/svx/source/inc/gridcell.hxx b/svx/source/inc/gridcell.hxx index 6a552da6edb7..cb747e3a894c 100644 --- a/svx/source/inc/gridcell.hxx +++ b/svx/source/inc/gridcell.hxx @@ -42,20 +42,24 @@ #include #include #include +#include #include #include #include #include +#include #include #include +#include /** === end UNO includes === **/ -#include - #include #include - #include +#include +#include +#include +#include class DbCellControl; class Edit; @@ -282,7 +286,11 @@ public: virtual ~DbCellControl(); - Window* GetControl() const { return m_pWindow; } + Window& GetWindow() const + { + ENSURE_OR_THROW( m_pWindow, "no window" ); + return *m_pWindow; + } // control alignment inline sal_Bool isAlignedController() const { return m_bAlignedController; } @@ -732,20 +740,34 @@ protected: //================================================================== // Base class providing the access to a grid cell //================================================================== -class FmXGridCell : public ::cppu::OComponentHelper, - public ::com::sun::star::awt::XControl, - public ::com::sun::star::form::XBoundControl +typedef ::cppu::ImplHelper2 < ::com::sun::star::awt::XControl + , ::com::sun::star::form::XBoundControl + > FmXGridCell_Base; +typedef ::cppu::ImplHelper1 < ::com::sun::star::awt::XWindow + > FmXGridCell_WindowBase; +class FmXGridCell :public ::cppu::OComponentHelper + ,public FmXGridCell_Base + ,public FmXGridCell_WindowBase { protected: - ::osl::Mutex m_aMutex; - DbGridColumn* m_pColumn; - DbCellControl* m_pCellControl; + ::osl::Mutex m_aMutex; + DbGridColumn* m_pColumn; + DbCellControl* m_pCellControl; + +private: + ::cppu::OInterfaceContainerHelper m_aWindowListeners; + ::cppu::OInterfaceContainerHelper m_aFocusListeners; + ::cppu::OInterfaceContainerHelper m_aKeyListeners; + ::cppu::OInterfaceContainerHelper m_aMouseListeners; + ::cppu::OInterfaceContainerHelper m_aMouseMotionListeners; +protected: virtual ~FmXGridCell(); + public: TYPEINFO(); - FmXGridCell(DbGridColumn* pColumn, DbCellControl* pControl); - + FmXGridCell( DbGridColumn* pColumn, DbCellControl* pControl ); + void init(); DECLARE_UNO3_AGG_DEFAULTS(FmXGridCell, OComponentHelper); virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type& _rType ) throw(::com::sun::star::uno::RuntimeException); @@ -754,6 +776,7 @@ public: void SetTextLineColor(const Color& _rColor); // XTypeProvider + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw (::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException); // OComponentHelper @@ -781,6 +804,25 @@ public: virtual sal_Bool SAL_CALL getLock() throw(::com::sun::star::uno::RuntimeException); virtual void SAL_CALL setLock(sal_Bool _bLock) throw(::com::sun::star::uno::RuntimeException); + // XWindow + virtual void SAL_CALL setPosSize( ::sal_Int32 X, ::sal_Int32 Y, ::sal_Int32 Width, ::sal_Int32 Height, ::sal_Int16 Flags ) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::awt::Rectangle SAL_CALL getPosSize( ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setVisible( ::sal_Bool Visible ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setEnable( ::sal_Bool Enable ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setFocus( ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addWindowListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeWindowListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addFocusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFocusListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeFocusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFocusListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addKeyListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XKeyListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeKeyListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XKeyListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addMouseListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMouseListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeMouseListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMouseListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addMouseMotionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMouseMotionListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeMouseMotionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMouseMotionListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addPaintListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPaintListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removePaintListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPaintListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); + sal_Bool Commit() {return m_pCellControl->Commit();} void ImplInitWindow( Window& rParent, const InitWindowFacet _eInitWhat ) { m_pCellControl->ImplInitWindow( rParent, _eInitWhat ); } @@ -788,6 +830,17 @@ public: sal_Bool isAlignedController() const { return m_pCellControl->isAlignedController(); } void AlignControl(sal_Int16 nAlignment) { m_pCellControl->AlignControl(nAlignment);} + +protected: + virtual Window* getEventWindow() const; + virtual void onWindowEvent( const ULONG _nEventId, const Window& _rWindow, const void* _pEventData ); + + // default implementations call our focus listeners, don't forget to call them if you override this + virtual void onFocusGained( const ::com::sun::star::awt::FocusEvent& _rEvent ); + virtual void onFocusLost( const ::com::sun::star::awt::FocusEvent& _rEvent ); + +private: + DECL_LINK( OnWindowEvent, VclWindowEvent* ); }; //================================================================== @@ -795,7 +848,10 @@ class FmXDataCell : public FmXGridCell { public: TYPEINFO(); - FmXDataCell(DbGridColumn* pColumn, DbCellControl* pControl):FmXGridCell(pColumn, pControl){} + FmXDataCell( DbGridColumn* pColumn, DbCellControl& _rControl ) + :FmXGridCell( pColumn, &_rControl ) + { + } virtual void PaintFieldToCell(OutputDevice& rDev, const Rectangle& rRect, @@ -831,11 +887,7 @@ protected: public: TYPEINFO(); - FmXTextCell( DbGridColumn* pColumn, DbCellControl* pControl ) - :FmXDataCell( pColumn, pControl ) - ,m_bFastPaint( sal_True ) - { - } + FmXTextCell( DbGridColumn* pColumn, DbCellControl& _rControl ); virtual void PaintFieldToCell(OutputDevice& rDev, const Rectangle& rRect, @@ -849,23 +901,31 @@ public: }; //================================================================== +typedef ::cppu::ImplHelper2 < ::com::sun::star::awt::XTextComponent + , ::com::sun::star::form::XChangeBroadcaster + > FmXEditCell_Base; class FmXEditCell : public FmXTextCell, - public ::com::sun::star::awt::XTextComponent + public FmXEditCell_Base { +private: + ::rtl::OUString m_sValueOnEnter; + protected: ::cppu::OInterfaceContainerHelper m_aTextListeners; + ::cppu::OInterfaceContainerHelper m_aChangeListeners; ::svt::IEditImplementation* m_pEditImplementation; bool m_bOwnEditImplementation; virtual ~FmXEditCell(); public: - FmXEditCell(DbGridColumn* pColumn, DbCellControl* pControl); + FmXEditCell( DbGridColumn* pColumn, DbCellControl& _rControl ); DECLARE_UNO3_AGG_DEFAULTS(FmXEditCell, FmXTextCell); virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type& _rType ) throw(::com::sun::star::uno::RuntimeException); // XTypeProvider virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException); // OComponentHelper virtual void SAL_CALL disposing(); @@ -884,26 +944,43 @@ public: virtual void SAL_CALL setMaxTextLen(sal_Int16 nLen) throw(::com::sun::star::uno::RuntimeException); virtual sal_Int16 SAL_CALL getMaxTextLen() throw(::com::sun::star::uno::RuntimeException); + // XChangeBroadcaster + virtual void SAL_CALL addChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::form::XChangeListener >& aListener ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::form::XChangeListener >& aListener ) throw (::com::sun::star::uno::RuntimeException); + protected: - DECL_LINK( OnTextChanged, void* ); + virtual void onWindowEvent( const ULONG _nEventId, const Window& _rWindow, const void* _pEventData ); + + virtual void onFocusGained( const ::com::sun::star::awt::FocusEvent& _rEvent ); + virtual void onFocusLost( const ::com::sun::star::awt::FocusEvent& _rEvent ); + +private: + void onTextChanged(); }; //================================================================== +typedef ::cppu::ImplHelper2 < ::com::sun::star::awt::XCheckBox + , ::com::sun::star::awt::XButton + > FmXCheckBoxCell_Base; class FmXCheckBoxCell : public FmXDataCell, - public ::com::sun::star::awt::XCheckBox + public FmXCheckBoxCell_Base { ::cppu::OInterfaceContainerHelper m_aItemListeners; + ::cppu::OInterfaceContainerHelper m_aActionListeners; + ::rtl::OUString m_aActionCommand; CheckBox* m_pBox; + protected: virtual ~FmXCheckBoxCell(); -public: - FmXCheckBoxCell(DbGridColumn* pColumn, DbCellControl* pControl); +public: + FmXCheckBoxCell( DbGridColumn* pColumn, DbCellControl& _rControl ); // UNO DECLARE_UNO3_AGG_DEFAULTS(FmXCheckBoxCell, FmXDataCell); virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type& _rType ) throw(::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException); // OComponentHelper virtual void SAL_CALL disposing(); @@ -916,26 +993,37 @@ public: virtual void SAL_CALL setLabel(const ::rtl::OUString& Label) throw(::com::sun::star::uno::RuntimeException); virtual void SAL_CALL enableTriState(sal_Bool b) throw(::com::sun::star::uno::RuntimeException); + // XButton + virtual void SAL_CALL addActionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener >& l ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeActionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener >& l ) throw (::com::sun::star::uno::RuntimeException); + //virtual void SAL_CALL setLabel( const ::rtl::OUString& Label ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setActionCommand( const ::rtl::OUString& Command ) throw (::com::sun::star::uno::RuntimeException); + protected: - DECL_LINK( OnClick, void* ); + virtual Window* getEventWindow() const; + virtual void onWindowEvent( const ULONG _nEventId, const Window& _rWindow, const void* _pEventData ); }; //================================================================== -class FmXListBoxCell : public FmXTextCell, - public ::com::sun::star::awt::XListBox +typedef ::cppu::ImplHelper1 < ::com::sun::star::awt::XListBox + > FmXListBoxCell_Base; +class FmXListBoxCell :public FmXTextCell + ,public FmXListBoxCell_Base { ::cppu::OInterfaceContainerHelper m_aItemListeners, m_aActionListeners; ListBox* m_pBox; + protected: virtual ~FmXListBoxCell(); -public: - FmXListBoxCell(DbGridColumn* pColumn, DbCellControl* pControl); +public: + FmXListBoxCell( DbGridColumn* pColumn, DbCellControl& _rControl ); DECLARE_UNO3_AGG_DEFAULTS(FmXListBoxCell, FmXTextCell); virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type& _rType ) throw(::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException); // OComponentHelper virtual void SAL_CALL disposing(); @@ -965,14 +1053,60 @@ public: virtual void SAL_CALL SAL_CALL makeVisible(sal_Int16 nEntry) throw(::com::sun::star::uno::RuntimeException); protected: - DECL_LINK( OnSelect, VclWindowEvent* ); + virtual void onWindowEvent( const ULONG _nEventId, const Window& _rWindow, const void* _pEventData ); + DECL_LINK( OnDoubleClick, void* ); }; //================================================================== +typedef ::cppu::ImplHelper1 < ::com::sun::star::awt::XComboBox + > FmXComboBoxCell_Base; +class FmXComboBoxCell :public FmXTextCell + ,public FmXComboBoxCell_Base +{ +private: + ::cppu::OInterfaceContainerHelper m_aItemListeners, + m_aActionListeners; + ComboBox* m_pComboBox; + +protected: + virtual ~FmXComboBoxCell(); + +public: + FmXComboBoxCell( DbGridColumn* pColumn, DbCellControl& _rControl ); + + DECLARE_UNO3_AGG_DEFAULTS(FmXListBoxCell, FmXTextCell); + virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type& _rType ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException); + + // OComponentHelper + virtual void SAL_CALL disposing(); + + // XComboBox + virtual void SAL_CALL addItemListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListener >& _Listener ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeItemListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListener >& _Listener ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addActionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener >& _Listener ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeActionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener >& _Listener ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addItem( const ::rtl::OUString& _Item, ::sal_Int16 _Pos ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addItems( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& _Items, ::sal_Int16 _Pos ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeItems( ::sal_Int16 nPos, ::sal_Int16 nCount ) throw (::com::sun::star::uno::RuntimeException); + virtual ::sal_Int16 SAL_CALL getItemCount( ) throw (::com::sun::star::uno::RuntimeException); + virtual ::rtl::OUString SAL_CALL getItem( ::sal_Int16 _Pos ) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getItems( ) throw (::com::sun::star::uno::RuntimeException); + virtual ::sal_Int16 SAL_CALL getDropDownLineCount( ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setDropDownLineCount( ::sal_Int16 _Lines ) throw (::com::sun::star::uno::RuntimeException); + +protected: + virtual void onWindowEvent( const ULONG _nEventId, const Window& _rWindow, const void* _pEventData ); +}; + +//================================================================== +typedef ::cppu::ImplHelper2 < ::com::sun::star::awt::XTextComponent + , ::com::sun::star::lang::XUnoTunnel + > FmXFilterCell_Base; class FmXFilterCell :public FmXGridCell - ,public ::com::sun::star::awt::XTextComponent - ,public ::com::sun::star::lang::XUnoTunnel + ,public FmXFilterCell_Base { ::cppu::OInterfaceContainerHelper m_aTextListeners; protected: @@ -985,6 +1119,7 @@ public: DECLARE_UNO3_AGG_DEFAULTS(FmXFilterCell, FmXGridCell); virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type& _rType ) throw(::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException); // XUnoTunnel virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException); -- cgit From 3ec91dff370216b1ee529bd1631736c23dc050ad Mon Sep 17 00:00:00 2001 From: Kurt Zenker Date: Mon, 14 Sep 2009 12:35:50 +0000 Subject: #i104978# patch --- svx/util/makefile.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'svx') diff --git a/svx/util/makefile.mk b/svx/util/makefile.mk index 898629299e65..3dcf5ca250f3 100644 --- a/svx/util/makefile.mk +++ b/svx/util/makefile.mk @@ -163,7 +163,7 @@ SHL1STDLIBS= \ SHL1DEF= $(MISC)$/$(SHL1TARGET).def DEF1NAME= $(SHL1TARGET) -DEFLIB1NAME=$(TARGET)_5 +DEFLIB1NAME=$(TARGET)_5 $(TARGET)_6 # svx SHL2TARGET= svx$(DLLPOSTFIX) @@ -280,7 +280,7 @@ SHL4STDLIBS= \ SHL4DEF= $(MISC)$/$(SHL4TARGET).def DEF4NAME= $(SHL4TARGET) -DEFLIB4NAME=$(TARGET)_6 +DEFLIB4NAME=$(TARGET)_7 # ------------------------------------------------------------------------------ -- cgit From 2cf1b92c231f06eff95a1fce8654ce0e01b5014b Mon Sep 17 00:00:00 2001 From: Kurt Zenker Date: Tue, 15 Sep 2009 08:02:36 +0000 Subject: #i10000# builderror and WaE on solaris fixed --- svx/source/fmcomp/gridcell.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'svx') diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx index 96f11adfa6df..ff7cfd422eb8 100644 --- a/svx/source/fmcomp/gridcell.cxx +++ b/svx/source/fmcomp/gridcell.cxx @@ -3335,10 +3335,10 @@ void FmXGridCell::setLock(sal_Bool _bLock) throw( RuntimeException ) } //------------------------------------------------------------------ -void SAL_CALL FmXGridCell::setPosSize( ::sal_Int32 _X, ::sal_Int32 _Y, ::sal_Int32 _Width, ::sal_Int32 _Height, ::sal_Int16 _Flags ) throw (RuntimeException) +void SAL_CALL FmXGridCell::setPosSize( ::sal_Int32 _XX, ::sal_Int32 _Y, ::sal_Int32 _Width, ::sal_Int32 _Height, ::sal_Int16 _Flags ) throw (RuntimeException) { OSL_ENSURE( false, "FmXGridCell::setPosSize: not implemented" ); - (void)_X; + (void)_XX; (void)_Y; (void)_Width; (void)_Height; @@ -3891,7 +3891,6 @@ void FmXEditCell::onWindowEvent( const ULONG _nEventId, const Window& _rWindow, onTextChanged(); return; } - break; } FmXTextCell::onWindowEvent( _nEventId, _rWindow, _pEventData ); -- cgit From 17f1988c7649d4239ba675040bf7dc145f3e5423 Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Wed, 16 Sep 2009 11:45:54 +0000 Subject: CWS-TOOLING: integrate CWS l10nframework01 --- svx/sdi/makefile.mk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'svx') diff --git a/svx/sdi/makefile.mk b/svx/sdi/makefile.mk index 60f3cc3fb5c3..2ea64ddedbba 100644 --- a/svx/sdi/makefile.mk +++ b/svx/sdi/makefile.mk @@ -39,6 +39,8 @@ TARGET=svxslots .INCLUDE : settings.mk +.IF "$(L10N_framework)"=="" + SDI1NAME=$(TARGET) SDI1EXPORT=svx @@ -53,6 +55,6 @@ SVSDI1DEPEND= \ svxitems.sdi # --- Targets ------------------------------------------------------- - +.ENDIF .INCLUDE : target.mk -- cgit From a9ac4fe6fd5b3ee921a8eee85a715c3ef881e47e Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Wed, 16 Sep 2009 13:55:36 +0000 Subject: CWS-TOOLING: integrate CWS impressnotes01 2009-09-11 13:52:41 +0200 cl r276061 : CWS-TOOLING: rebase CWS impressnotes01 to trunk@276043 (milestone: DEV300:m58) 2009-09-10 15:44:57 +0200 cl r276039 : #i103139# continued work on the impress annotation feature 2009-09-10 14:52:31 +0200 cl r276032 : #i103139# continued work on the impress annotation feature 2009-09-10 14:50:32 +0200 cl r276031 : #i103139# continued work on the impress annotation feature 2009-09-10 14:48:29 +0200 cl r276030 : #i103139# continued work on the impress annotation feature 2009-09-10 11:36:11 +0200 cl r276027 : #i103139# continued work on the impress annotation feature 2009-09-09 20:22:41 +0200 cl r276018 : #i103139# continued work on the impress annotation feature 2009-09-09 20:21:45 +0200 cl r276017 : #i103139# continued work on the impress annotation feature 2009-09-09 19:32:29 +0200 sj r276015 : #i103139# added import of comments (ppt binary) 2009-09-09 19:31:07 +0200 sj r276014 : #i103139# added import of comments (ppt binary) 2009-09-09 19:16:41 +0200 cl r276011 : #i103139# continued work on the impress annotation feature 2009-09-09 19:15:19 +0200 cl r276010 : #i103139# continued work on the impress annotation feature 2009-09-09 16:27:19 +0200 cl r276001 : #i104579# fixed isEmptyPresObj() 2009-09-09 15:12:02 +0200 cl r275997 : #i103139# continued work on the impress annotation feature 2009-09-09 15:06:29 +0200 sj r275996 : #i103139# added import of comments (ppt binary) 2009-09-09 14:53:01 +0200 cl r275995 : #i103139# continued work on the impress annotation feature 2009-09-09 14:51:32 +0200 cl r275994 : #i103139# continued work on the impress annotation feature 2009-09-09 12:11:17 +0200 cl r275982 : #i103139# continued work on the impress annotation feature 2009-09-09 11:47:55 +0200 cl r275981 : #i103139# continued work on the impress annotation feature 2009-09-09 11:47:23 +0200 cl r275980 : #i103139# continued work on the impress annotation feature 2009-09-09 11:44:47 +0200 cl r275978 : #i104315# added missing tab pages 2009-09-08 16:04:44 +0200 cl r275936 : #i103139# continued work on the impress annotation feature 2009-09-08 16:03:28 +0200 cl r275935 : #i103139# continued work on the impress annotation feature 2009-09-08 11:45:47 +0200 cl r275920 : #i103139# continued work on the impress annotation feature 2009-09-08 11:41:51 +0200 cl r275919 : #i103139# continued work on the impress annotation feature 2009-09-07 18:30:55 +0200 cl r275910 : #i103139# continued work on the impress annotation feature 2009-09-07 18:29:37 +0200 cl r275909 : #i103139# continued work on the impress annotation feature 2009-09-07 17:25:43 +0200 cl r275905 : #i103139# continued work on the impress annotation feature 2009-09-07 12:00:28 +0200 cl r275884 : #i103139# continued work on the impress annotation feature 2009-09-06 14:14:00 +0200 cl r275859 : #i103139# continued work on the impress annotation feature 2009-09-05 20:57:24 +0200 cl r275854 : #i103139# continued work on the impress annotation feature 2009-09-05 20:56:29 +0200 cl r275853 : #i103139# continued work on the impress annotation feature 2009-09-05 20:55:27 +0200 cl r275852 : #i103139# continued work on the impress annotation feature 2009-09-05 20:11:42 +0200 cl r275851 : #i103139# continued work on the impress annotation feature 2009-09-05 20:11:09 +0200 cl r275850 : #i103139# continued work on the impress annotation feature 2009-09-05 17:43:33 +0200 cl r275845 : #i103139# continued work on the impress annotation feature 2009-09-05 17:04:41 +0200 cl r275843 : #i103139# continued work on the impress annotation feature 2009-09-05 17:03:26 +0200 cl r275842 : #i103139# continued work on the impress annotation feature 2009-09-05 17:02:53 +0200 cl r275841 : #i103139# continued work on the impress annotation feature 2009-09-05 13:15:04 +0200 pl r275839 : #i104823# WB_NEEDSFOCUS 2009-09-05 13:14:41 +0200 pl r275838 : #i104823# WB_NEEDSFOCUS 2009-09-04 17:48:21 +0200 cl r275826 : #i103139# continued work on the impress annotation feature 2009-09-04 17:35:03 +0200 cl r275825 : #i103139# continued work on the impress annotation feature 2009-09-04 17:15:46 +0200 cl r275824 : #i103139# continued work on the impress annotation feature 2009-09-04 17:12:54 +0200 cl r275823 : #i103139# continued work on the impress annotation feature 2009-09-04 17:05:23 +0200 cl r275822 : #i103139# continued work on the impress annotation feature 2009-09-04 16:48:28 +0200 cl r275820 : #i103139# continued work on the impress annotation feature 2009-09-04 16:44:02 +0200 cl r275818 : #i103139# continued work on the impress annotation feature 2009-09-04 16:43:23 +0200 cl r275817 : #i103139# continued work on the impress annotation feature 2009-09-04 16:06:04 +0200 cl r275812 : #i103139# continued work on the impress annotation feature 2009-09-04 16:05:45 +0200 cl r275811 : #i103139# continued work on the impress annotation feature 2009-09-04 15:04:33 +0200 cl r275806 : #i103139# continued work on the impress annotation feature 2009-09-04 11:43:14 +0200 cl r275795 : #i103139# continued work on the impress annotation feature 2009-09-04 11:27:10 +0200 cl r275793 : #i103139# continued work on the impress annotation feature 2009-09-04 11:10:02 +0200 cl r275792 : #i103139# continued work on the impress annotation feature 2009-09-04 11:07:05 +0200 cl r275790 : #i103139# continued work on the impress annotation feature 2009-09-04 11:05:01 +0200 cl r275789 : #i103139# continued work on the impress annotation feature 2009-09-04 10:55:51 +0200 cl r275785 : #i103139# renamed notes to comments 2009-09-04 10:54:57 +0200 cl r275784 : #i103139# renamed notes to comments 2009-09-03 20:37:35 +0200 cl r275772 : #i103139# continued work on the impress annotation feature 2009-09-03 20:35:31 +0200 cl r275771 : #i103139# continued work on the impress annotation feature 2009-09-01 18:17:55 +0200 cl r275680 : #i103139# continued work on the impress annotation feature 2009-09-01 18:15:08 +0200 cl r275678 : #i103139# continued work on the impress annotation feature 2009-09-01 18:13:38 +0200 cl r275677 : #i103139# continued work on the impress annotation feature 2009-08-18 12:35:42 +0200 cl r275089 : fixed merge error 2009-08-18 11:39:58 +0200 cl r275086 : CWS-TOOLING: rebase CWS impressnotes01 to trunk@275001 (milestone: DEV300:m55) 2009-07-30 13:45:10 +0200 cl r274481 : fixed merge errrors 2009-07-30 13:41:21 +0200 cl r274480 : fixed merge errrors 2009-07-30 13:39:40 +0200 cl r274478 : fixed merge errrors 2009-07-22 18:07:30 +0200 cl r274256 : CWS-TOOLING: rebase CWS impressnotes01 to trunk@273858 (milestone: DEV300:m52) 2009-07-21 17:21:31 +0200 cl r274208 : merging 2009-07-20 14:28:34 +0200 cl r274137 : #i103139# annotation support for impress 2009-07-20 14:28:04 +0200 cl r274136 : #i103139# annotation support for impress 2009-07-20 14:27:20 +0200 cl r274135 : #i103139# annotation support for impress 2009-07-20 14:21:17 +0200 cl r274134 : #i103139# annotation support for impress 2009-07-20 14:20:56 +0200 cl r274133 : #i103139# annotation support for impress 2009-07-20 14:20:09 +0200 cl r274132 : #i103139# annotation support for impress 2009-07-20 14:19:00 +0200 cl r274131 : #i103139# annotation support for impress 2009-07-20 14:17:50 +0200 cl r274130 : #i103139# annotation support for impress 2009-07-20 14:12:24 +0200 cl r274129 : #i103139# annotation support for impress 2009-07-20 13:52:03 +0200 cl r274128 : #i103139# annotation support for impress 2009-07-20 13:51:11 +0200 cl r274127 : #i103139# annotation support for impress 2009-07-20 13:48:59 +0200 cl r274126 : #i103139# annotation support for impress 2009-07-20 13:43:56 +0200 cl r274125 : #i103139# annotation support for impress 2009-07-20 13:31:55 +0200 cl r274123 : #i103139# annotation support for impress 2009-07-20 13:30:45 +0200 cl r274122 : #i103139# annotation support for impress --- .../svx/sdr/overlay/overlayanimatedbitmapex.hxx | 2 +- svx/inc/svx/svdfppt.hxx | 2 + svx/inc/svx/svxids.hrc | 12 +- svx/sdi/svx.sdi | 179 +++++++++++++++++++++ svx/sdi/svxitems.sdi | 1 - svx/source/cui/optsave.cxx | 6 +- svx/source/options/optsave.src | 8 +- svx/source/svdraw/svddrgv.cxx | 6 +- svx/source/svdraw/svdfppt.cxx | 95 ++++++++++- svx/source/unoedit/unoforou.cxx | 2 +- 10 files changed, 299 insertions(+), 14 deletions(-) (limited to 'svx') diff --git a/svx/inc/svx/sdr/overlay/overlayanimatedbitmapex.hxx b/svx/inc/svx/sdr/overlay/overlayanimatedbitmapex.hxx index 9acc34c8dcc8..23a720467710 100644 --- a/svx/inc/svx/sdr/overlay/overlayanimatedbitmapex.hxx +++ b/svx/inc/svx/sdr/overlay/overlayanimatedbitmapex.hxx @@ -40,7 +40,7 @@ namespace sdr { namespace overlay { - class OverlayAnimatedBitmapEx : public OverlayObjectWithBasePosition + class SVX_DLLPUBLIC OverlayAnimatedBitmapEx : public OverlayObjectWithBasePosition { protected: // the Bitmaps diff --git a/svx/inc/svx/svdfppt.hxx b/svx/inc/svx/svdfppt.hxx index 5a73bea5052f..63f196876e93 100644 --- a/svx/inc/svx/svdfppt.hxx +++ b/svx/inc/svx/svdfppt.hxx @@ -1337,6 +1337,8 @@ class PPTConvertOCXControls : public SvxMSConvertOCXControls #define PPT_PST_NewlyAddedAtomByXP11008 11008 #define PPT_PST_NewlyAddedAtomByXP11010 11010 +#define PPT_PST_Comment10 12000 +#define PPT_PST_CommentAtom10 12001 #define PPT_PST_NewlyAddedAtomByXP12004 12004 #define PPT_PST_NewlyAddedAtomByXP12010 12010 #define PPT_PST_NewlyAddedAtomByXP12011 12011 diff --git a/svx/inc/svx/svxids.hrc b/svx/inc/svx/svxids.hrc index 6019c3590d55..5d37c1ee87f3 100644 --- a/svx/inc/svx/svxids.hrc +++ b/svx/inc/svx/svxids.hrc @@ -377,7 +377,6 @@ #define SID_FRAME_UP (SID_SC_START + 407) #define SID_FRAME_DOWN (SID_SC_START + 408) #define SID_ENTER_STRING (SID_SC_START + 476) -#define SID_INSERT_POSTIT (SID_SC_START + 276) #define SID_ATTR_SECIALCHAR (SID_SC_START + 581) #define SID_ATTR_SPECIALCHAR (SID_SC_START + 581) @@ -1352,8 +1351,17 @@ #define SID_RECHECK_DOCUMENT (SID_SVX_START+1091) #define SID_ATTR_PARA_OUTLINE_LEVEL (SID_SVX_START+1092) +#define SID_INSERT_POSTIT (SID_SVX_START+1093) +#define SID_DELETE_POSTIT (SID_SVX_START+1094) +#define SID_NEXT_POSTIT (SID_SVX_START+1095) +#define SID_PREVIOUS_POSTIT (SID_SVX_START+1096) +#define SID_DELETEALL_POSTIT (SID_SVX_START+1097) +#define SID_SHOW_POSTIT (SID_SVX_START+1098) +#define SID_REPLYTO_POSTIT (SID_SVX_START+1099) +#define SID_DELETEALLBYAUTHOR_POSTIT (SID_SVX_START+1100) + // IMPORTANT NOTE: adjust SID_SVX_FIRSTFREE, when adding new slot id -#define SID_SVX_FIRSTFREE SID_ATTR_PARA_OUTLINE_LEVEL + 1 +#define SID_SVX_FIRSTFREE SID_DELETEALLBYAUTHOR_POSTIT + 1 // -------------------------------------------------------------------------- // Overflow check for slot IDs diff --git a/svx/sdi/svx.sdi b/svx/sdi/svx.sdi index 3c819229ee4c..dc303bad5732 100644 --- a/svx/sdi/svx.sdi +++ b/svx/sdi/svx.sdi @@ -5981,6 +5981,185 @@ SfxVoidItem InsertAnnotation SID_INSERT_POSTIT GroupId = GID_INSERT; ] +//-------------------------------------------------------------------------- +SfxBoolItem ShowAnnotation SID_SHOW_POSTIT +() +[ + /* flags: */ + AutoUpdate = FALSE, + Cachable = Cachable, + FastCall = FALSE, + HasCoreId = FALSE, + HasDialog = FALSE, + ReadOnlyDoc = TRUE, + Toggle = FALSE, + Container = FALSE, + RecordAbsolute = FALSE, + RecordPerSet; + Synchron; + + /* config: */ + AccelConfig = TRUE, + MenuConfig = TRUE, + StatusBarConfig = FALSE, + ToolBoxConfig = TRUE, + GroupId = GID_VIEW; +] + +//-------------------------------------------------------------------------- + +SfxVoidItem ReplyToAnnotation SID_REPLYTO_POSTIT +() +[ + /* flags: */ + AutoUpdate = FALSE, + Cachable = Cachable, + FastCall = FALSE, + HasCoreId = FALSE, + HasDialog = FALSE, + ReadOnlyDoc = FALSE, + Toggle = FALSE, + Container = FALSE, + RecordAbsolute = FALSE, + RecordPerSet; + Synchron; + + /* config: */ + AccelConfig = FALSE, + MenuConfig = FALSE, + StatusBarConfig = FALSE, + ToolBoxConfig = FALSE, + GroupId = GID_DOCUMENT; +] + +//-------------------------------------------------------------------------- + +SfxVoidItem DeleteAnnotation SID_DELETE_POSTIT +() +[ + /* flags: */ + AutoUpdate = FALSE, + Cachable = Cachable, + FastCall = FALSE, + HasCoreId = FALSE, + HasDialog = FALSE, + ReadOnlyDoc = FALSE, + Toggle = FALSE, + Container = FALSE, + RecordAbsolute = FALSE, + RecordPerSet; + Synchron; + + /* config: */ + AccelConfig = TRUE, + MenuConfig = TRUE, + StatusBarConfig = FALSE, + ToolBoxConfig = TRUE, + GroupId = GID_DOCUMENT; +] + +//-------------------------------------------------------------------------- + +SfxVoidItem DeleteAllAnnotation SID_DELETEALL_POSTIT +() +[ + /* flags: */ + AutoUpdate = FALSE, + Cachable = Cachable, + FastCall = FALSE, + HasCoreId = FALSE, + HasDialog = FALSE, + ReadOnlyDoc = FALSE, + Toggle = FALSE, + Container = FALSE, + RecordAbsolute = FALSE, + RecordPerSet; + Synchron; + + /* config: */ + AccelConfig = TRUE, + MenuConfig = TRUE, + StatusBarConfig = FALSE, + ToolBoxConfig = TRUE, + GroupId = GID_DOCUMENT; +] + +SfxVoidItem DeleteAllAnnotationByAuthor SID_DELETEALLBYAUTHOR_POSTIT +() +[ + /* flags: */ + AutoUpdate = FALSE, + Cachable = Cachable, + FastCall = FALSE, + HasCoreId = FALSE, + HasDialog = FALSE, + ReadOnlyDoc = FALSE, + Toggle = FALSE, + Container = FALSE, + RecordAbsolute = FALSE, + RecordPerSet; + Synchron; + + /* config: */ + AccelConfig = FALSE, + MenuConfig = FALSE, + StatusBarConfig = FALSE, + ToolBoxConfig = FALSE, + GroupId = GID_DOCUMENT; +] + +//-------------------------------------------------------------------------- + +SfxVoidItem NextAnnotation SID_NEXT_POSTIT +() +[ + /* flags: */ + AutoUpdate = FALSE, + Cachable = Cachable, + FastCall = FALSE, + HasCoreId = FALSE, + HasDialog = FALSE, + ReadOnlyDoc = TRUE, + Toggle = FALSE, + Container = FALSE, + RecordAbsolute = FALSE, + RecordPerSet; + Synchron; + + /* config: */ + AccelConfig = TRUE, + MenuConfig = TRUE, + StatusBarConfig = FALSE, + ToolBoxConfig = TRUE, + GroupId = GID_VIEW; +] + +//-------------------------------------------------------------------------- + +SfxVoidItem PreviousAnnotation SID_PREVIOUS_POSTIT +() +[ + /* flags: */ + AutoUpdate = FALSE, + Cachable = Cachable, + FastCall = FALSE, + HasCoreId = FALSE, + HasDialog = FALSE, + ReadOnlyDoc = TRUE, + Toggle = FALSE, + Container = FALSE, + RecordAbsolute = FALSE, + RecordPerSet; + Synchron; + + /* config: */ + AccelConfig = TRUE, + MenuConfig = TRUE, + StatusBarConfig = FALSE, + ToolBoxConfig = TRUE, + GroupId = GID_VIEW; +] + //-------------------------------------------------------------------------- SfxVoidItem InsertApplet SID_INSERT_APPLET (SfxStringItem Class FN_PARAM_1, diff --git a/svx/sdi/svxitems.sdi b/svx/sdi/svxitems.sdi index 795f2aea1177..f977f24c4b0a 100644 --- a/svx/sdi/svxitems.sdi +++ b/svx/sdi/svxitems.sdi @@ -700,4 +700,3 @@ struct ZoomSlider INT16 SvxMaxZoom MID_ZOOMSLIDER_MAXZOOM; }; item ZoomSlider SvxZoomSliderItem; - diff --git a/svx/source/cui/optsave.cxx b/svx/source/cui/optsave.cxx index 67ac02536b47..294f9cd041da 100644 --- a/svx/source/cui/optsave.cxx +++ b/svx/source/cui/optsave.cxx @@ -777,7 +777,7 @@ IMPL_LINK( SfxSaveTabPage, FilterHdl_Impl, ListBox *, pBox ) IMPL_LINK( SfxSaveTabPage, ODFVersionHdl_Impl, ListBox *, EMPTYARG ) { long nVersion = long( aODFVersionLB.GetEntryData( aODFVersionLB.GetSelectEntryPos() ) ); - bool bShown = SvtSaveOptions::ODFDefaultVersion( nVersion ) == SvtSaveOptions::ODFVER_012; + bool bShown = SvtSaveOptions::ODFDefaultVersion( nVersion ) != SvtSaveOptions::ODFVER_LATEST; if ( bShown ) { bool bHasODFFormat = false; @@ -795,8 +795,8 @@ IMPL_LINK( SfxSaveTabPage, ODFVersionHdl_Impl, ListBox *, EMPTYARG ) || ( aSaveAsLB.GetEntryData( aSaveAsLB.GetSelectEntryPos() ) != NULL ); } - aODFWarningFI.Show( !bShown ); - aODFWarningFT.Show( !bShown ); + aODFWarningFI.Show( bShown ); + aODFWarningFT.Show( bShown ); return 0; } diff --git a/svx/source/options/optsave.src b/svx/source/options/optsave.src index afa1c4b6d0c8..374f53ef618f 100644 --- a/svx/source/options/optsave.src +++ b/svx/source/options/optsave.src @@ -149,8 +149,9 @@ TabPage RID_SFXPAGE_SAVE DropDown = TRUE; StringList [ en-US ] = { - < "1.0/1.1 (OpenOffice.org 2.x)" ; 2 ; > ; - < "1.2 (recommended)" ; 3 ; > ; + < "1.0/1.1" ; 2 ; > ; + < "1.2" ; 4 ; > ; + < "1.2 Extended (recommended)"; 0x7fffffff ; > ; }; }; CheckBox BTN_NOPRETTYPRINTING @@ -219,7 +220,8 @@ TabPage RID_SFXPAGE_SAVE Pos = MAP_APPFONT ( 23 , 169 ) ; Size = MAP_APPFONT ( 239 , 8 ) ; Hide = TRUE; - Text [ en-US ] = "Not using ODF 1.2 may cause infomation to be lost."; + Text [ en-US ] = "Not using ODF 1.2 Extended may cause infomation to be lost."; + Text [ x-comment ] = "EN-US, the term 'extended' must not be translated."; }; Image IMG_ODF_WARNING { diff --git a/svx/source/svdraw/svddrgv.cxx b/svx/source/svdraw/svddrgv.cxx index 69459b1bff35..8236ca1f19ac 100644 --- a/svx/source/svdraw/svddrgv.cxx +++ b/svx/source/svdraw/svddrgv.cxx @@ -282,7 +282,11 @@ BOOL SdrDragView::BegDragObj(const Point& rPnt, OutputDevice* pOut, SdrHdl* pHdl // #103894# Expand test for HDL_ANCHOR_TR BOOL bNotDraggable = (HDL_ANCHOR == eDragHdl || HDL_ANCHOR_TR == eDragHdl); - if(bDragHdl) + if(pHdl && (pHdl->GetKind() == HDL_SMARTTAG) && pForcedMeth ) + { + // just use the forced method for smart tags + } + else if(bDragHdl) { mpCurrentSdrDragMethod = new SdrDragMovHdl(*this); } diff --git a/svx/source/svdraw/svdfppt.cxx b/svx/source/svdraw/svdfppt.cxx index 35101eb2f418..d0b01f6a820f 100644 --- a/svx/source/svdraw/svdfppt.cxx +++ b/svx/source/svdraw/svdfppt.cxx @@ -39,6 +39,11 @@ #include #include #include +#include +#include +#include +#include +#include #include @@ -2563,9 +2568,11 @@ sal_Bool SdrPowerPointImport::SeekToContentOfProgTag( sal_Int32 nVersion, SvStre sal_uInt32 nOldPos = rSt.Tell(); DffRecordHeader aProgTagsHd, aProgTagBinaryDataHd; - rSourceHd.SeekToContent( rSt ); - if ( SeekToRec( rSt, PPT_PST_ProgTags, rSourceHd.GetRecEndFilePos(), &aProgTagsHd ) ) + sal_Bool bFound = rSourceHd.nRecType == PPT_PST_ProgTags; + if ( !bFound ) + bFound = SeekToRec( rSt, PPT_PST_ProgTags, rSourceHd.GetRecEndFilePos(), &aProgTagsHd ); + if ( bFound ) { while( SeekToRec( rSt, PPT_PST_ProgBinaryTag, aProgTagsHd.GetRecEndFilePos(), &aProgTagBinaryDataHd ) ) { @@ -2860,6 +2867,75 @@ SdrPage* SdrPowerPointImport::MakeBlancPage( sal_Bool bMaster ) const return pRet; } +void ImportComment10( SvxMSDffManager& rMan, SvStream& rStCtrl, SdrPage* pPage, DffRecordHeader& rComment10Hd ) +{ + rtl::OUString sAuthor; + rtl::OUString sText; + rtl::OUString sInitials; + + sal_Int32 nIndex = 0; + util::DateTime aDateTime; + sal_Int32 nPosX = 0; + sal_Int32 nPosY = 0; + + while ( ( rStCtrl.GetError() == 0 ) && ( rStCtrl.Tell() < rComment10Hd.GetRecEndFilePos() ) ) + { + DffRecordHeader aCommentHd; + rStCtrl >> aCommentHd; + switch( aCommentHd.nRecType ) + { + case PPT_PST_CString : + { + String aString; + SvxMSDffManager::MSDFFReadZString( rStCtrl, aString, aCommentHd.nRecLen, TRUE ); + switch ( aCommentHd.nRecInstance ) + { + case 0 : sAuthor = aString; break; + case 1 : sText = aString; break; + case 2 : sInitials = aString; break; + } + } + break; + + case PPT_PST_CommentAtom10 : + { + rStCtrl >> nIndex + >> aDateTime.Year + >> aDateTime.Month + >> aDateTime.Day // DayOfWeek + >> aDateTime.Day + >> aDateTime.Hours + >> aDateTime.Minutes + >> aDateTime.Seconds + >> aDateTime.HundredthSeconds + >> nPosX + >> nPosY; + + aDateTime.HundredthSeconds /= 10; + } + break; + } + aCommentHd.SeekToEndOfRecord( rStCtrl ); + } + Point aPosition( nPosX, nPosY ); + rMan.Scale( aPosition ); + + try + { + uno::Reference< office::XAnnotationAccess > xAnnotationAccess( pPage->getUnoPage(), UNO_QUERY_THROW ); + uno::Reference< office::XAnnotation > xAnnotation( xAnnotationAccess->createAndInsertAnnotation() ); + xAnnotation->setPosition( geometry::RealPoint2D( aPosition.X() / 100.0, aPosition.Y() / 100.0 ) ); + xAnnotation->setAuthor( sAuthor ); + xAnnotation->setDateTime( aDateTime ); + uno::Reference< text::XText > xText( xAnnotation->getTextRange() ); + xText->setString( sText ); + } + catch( uno::Exception& ) + { + + } +} + // be sure not to import masterpages with this method // be sure not to import masterpages with this method @@ -2896,6 +2972,21 @@ void SdrPowerPointImport::ImportPage( SdrPage* pRet, const PptSlidePersistEntry* } break; + case PPT_PST_ProgTags : + { + DffRecordHeader aContentDataHd; + if ( SeekToContentOfProgTag( 10, rStCtrl, aHd, aContentDataHd ) ) + { + DffRecordHeader aComment10Hd; + while( ( rStCtrl.GetError() == 0 ) && SeekToRec( rStCtrl, PPT_PST_Comment10, aContentDataHd.GetRecEndFilePos(), &aComment10Hd ) ) + { + ImportComment10( *this, rStCtrl, pRet, aComment10Hd ); + aComment10Hd.SeekToEndOfRecord( rStCtrl ); + } + } + } + break; + case PPT_PST_PPDrawing : { DffRecordHeader aPPDrawHd; diff --git a/svx/source/unoedit/unoforou.cxx b/svx/source/unoedit/unoforou.cxx index 9c6cb07440d7..c54f76d5f4dc 100644 --- a/svx/source/unoedit/unoforou.cxx +++ b/svx/source/unoedit/unoforou.cxx @@ -490,7 +490,7 @@ sal_Bool SvxOutlinerForwarder::SetDepth( USHORT nPara, sal_Int16 nNewDepth ) { rOutliner.SetDepth( pPara, nNewDepth ); - const bool bOutlinerText = (pSdrObject->GetObjInventor() == SdrInventor) && (pSdrObject->GetObjIdentifier() == OBJ_OUTLINETEXT); + const bool bOutlinerText = pSdrObject && (pSdrObject->GetObjInventor() == SdrInventor) && (pSdrObject->GetObjIdentifier() == OBJ_OUTLINETEXT); if( bOutlinerText ) rOutliner.SetLevelDependendStyleSheet( nPara ); -- cgit From f67921c8a411cd5740ee2e1884f5c3c95ce4dd05 Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Wed, 16 Sep 2009 14:55:33 +0000 Subject: CWS-TOOLING: integrate CWS locales32 2009-09-06 19:13:15 +0200 er r275860 : #i104308# Lower and Upper Sorbian 2009-09-03 01:40:09 +0200 erack r275732 : CWS-TOOLING: rebase CWS locales32 to trunk@275331 (milestone: DEV300:m56) 2009-08-17 21:48:26 +0200 erack r275072 : * #i102920# use OUString::iterateCodePoints() in xdictionary; patch from * Adapted local iterateCodePoints() in breakiteratorImpl.cxx to cope with surrogates at text end. * Use OUString::iterateCodePoints() in BreakIterator_CJK::getLineBreak() 2009-08-09 23:14:39 +0200 erack r274792 : mergeinfo 2009-08-09 23:09:31 +0200 erack r274791 : re-adding this again, merge from tag didn't work; SVN IS A PIECE OF CRAP 2009-08-09 22:45:02 +0200 erack r274790 : don't re-add file, merge instead 2009-08-09 22:09:49 +0200 erack r274789 : cws rebase ERRONEOUSLY REMOVED THIS FILE! 2009-08-09 22:01:02 +0200 erack r274788 : adapt to new postset.mk completelangiso content; get rid of /i modifier uglyness 2009-08-09 19:40:46 +0200 erack r274787 : #i99823# sort currency list ISO,symbol,language/country; removed unused STR_EUROPE 2009-08-09 01:23:35 +0200 erack r274786 : make AZM currency legacyOnly to avoid duplicate listing in number formatter because of the identical 'man.' currency symbol 2009-08-09 01:11:38 +0200 erack r274785 : #i94445# make ROL currency legacyOnly to avoid duplicate listing in number formatter because of the identical 'lei' currency symbol 2009-08-06 19:10:34 +0200 erack r274743 : CWS-TOOLING: rebase CWS locales32 to trunk@274622 (milestone: DEV300:m54) 2009-08-04 21:26:24 +0200 erack r274634 : #i94445# new currency RON 2009-08-04 21:06:55 +0200 erack r274633 : #i103193# corrected data; from 2009-07-18 23:56:55 +0200 erack r274104 : #i103408# ignore an empty LANGUAGE variable; patch from 2009-07-07 00:21:02 +0200 erack r273764 : Langpack.ulf is gone 2009-07-07 00:02:39 +0200 erack r273763 : #i103358# add 'is' Icelandic 2009-07-04 02:10:55 +0200 erack r273720 : #i101173# typographic quotation marks 2009-07-04 01:07:44 +0200 erack r273719 : #i65127# make it compile with OSL_DEBUG_LEVEL>2 again 2009-06-26 22:50:49 +0200 erack r273444 : #i97602# add Asturian_Spain [ast-ES]; locale data contributed by / 2009-06-26 22:01:25 +0200 erack r273443 : #i101173# add Oromo [om-ET] locale data; contributed by 2009-06-26 21:55:41 +0200 erack r273442 : #i101173# add Oromo [om-ET] locale data; contributed by 2009-06-26 21:11:46 +0200 erack r273441 : #i102991# linguistic corrections 2009-06-26 21:02:45 +0200 erack r273440 : #i102986# add Somali 'so' 2009-06-22 00:04:35 +0200 erack r273190 : #i101235# add Uyghur_China [ug-CN] locale; contributed by / 2009-06-21 23:35:21 +0200 erack r273189 : blah 2009-06-21 23:22:40 +0200 erack r273188 : #i99972# add Quechua (Ecuador) [qu-EC] 2009-06-21 21:57:29 +0200 erack r273187 : #i97791# add Yiddish [yi-IL] 2009-06-21 21:24:29 +0200 erack r273186 : #i102186# add Greek, Ancient [grc-GR] 2009-06-21 21:00:59 +0200 erack r273185 : #i98489# add Arabic (Oman) [ar-OM] locale data; contributed by / 2009-06-21 20:54:07 +0200 erack r273184 : check ListSeparator for ';' semicolon, for consistency 2009-06-21 20:20:13 +0200 erack r273183 : ISO 4217 checks only if not legacy (e.g. Macau Pound 'P') 2009-06-21 20:00:27 +0200 erack r273182 : check CurrencyID and BankSymbol vor ISO 4217 2009-06-21 19:10:36 +0200 erack r273181 : #i73118# Bokmål instead of Bokmal 2009-06-21 19:00:47 +0200 erack r273180 : #i99827# add Sardinian locale data; contributed by 2009-06-21 18:20:05 +0200 erack r273179 : give URL of svn instead of legacy cvs 2009-06-21 17:45:31 +0200 erack r273178 : #i87907# add Oromo [om-ET] 2009-06-21 17:23:14 +0200 erack r273177 : grep in completelangiso of postset.mk 2009-03-24 00:22:16 +0100 erack r269901 : #i100368# parentheses, parentheses, parentheses ... 2009-03-23 23:31:22 +0100 erack r269899 : #i99712# call OutlineNumberingLevel_Impl dtor 2009-03-23 22:37:31 +0100 erack r269897 : #i98347# register NumToCharHalfwidth 2009-03-22 18:07:40 +0100 erack r269852 : definitely ignore any output resulting from the cd command in list of rules, which may have lead to a spurious rule file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- svx/inc/svx/numfmtsh.hxx | 4 +-- svx/source/cui/numfmt.cxx | 3 +-- svx/source/cui/numfmt.hrc | 7 +++-- svx/source/cui/numfmt.hxx | 1 - svx/source/cui/numfmt.src | 4 --- svx/source/items/numfmtsh.cxx | 61 +++++++++++++++++++++++++++---------------- 6 files changed, 44 insertions(+), 36 deletions(-) (limited to 'svx') diff --git a/svx/inc/svx/numfmtsh.hxx b/svx/inc/svx/numfmtsh.hxx index 8e2eb238d3bd..5e6fe3737f94 100644 --- a/svx/inc/svx/numfmtsh.hxx +++ b/svx/inc/svx/numfmtsh.hxx @@ -212,8 +212,8 @@ public: short GetListPos4Entry(sal_uInt32 nIdx); short GetListPos4Entry( const String& rFmtString ); - void GetCurrencySymbols(SvStringsDtor& rList,const XubString& rStrEurope,USHORT* pPos); - void GetCurrencySymbols(SvStringsDtor& rList,const XubString& rStrEurope, BOOL bFlag); + void GetCurrencySymbols( SvStringsDtor& rList, USHORT* pPos ); + void GetCurrencySymbols( SvStringsDtor& rList, BOOL bFlag ); USHORT FindCurrencyTableEntry( const String& rFmtString, BOOL &bTestBanking ); BOOL IsInTable(USHORT nPos,BOOL bTmpBanking,const String &rFmtString); diff --git a/svx/source/cui/numfmt.cxx b/svx/source/cui/numfmt.cxx index a3b426c6110e..d6978ea008b8 100644 --- a/svx/source/cui/numfmt.cxx +++ b/svx/source/cui/numfmt.cxx @@ -292,7 +292,6 @@ SvxNumberFormatTabPage::SvxNumberFormatTabPage( Window* pParent, pNumFmtShell ( NULL ), nInitFormat ( ULONG_MAX ), - aStrEurope ( THIS_SVX_RES( STR_EUROPE) ), sAutomaticEntry ( THIS_SVX_RES( STR_AUTO_ENTRY)), pLastActivWindow( NULL ) { @@ -1887,7 +1886,7 @@ void SvxNumberFormatTabPage::FillCurrencyBox() USHORT nPos=0; USHORT nSelPos=0; - pNumFmtShell->GetCurrencySymbols(aList,aStrEurope,&nSelPos); + pNumFmtShell->GetCurrencySymbols( aList, &nSelPos); for(USHORT i=1;i #include +#include #include // class SvxNumberFormatShell -------------------------------------------- @@ -1523,22 +1524,22 @@ String SvxNumberFormatShell::GetStandardName() const return pFormatter->GetStandardName( eCurLanguage); } -void SvxNumberFormatShell::GetCurrencySymbols(SvStringsDtor& rList,const XubString& rStrEurope, sal_uInt16* pPos) +void SvxNumberFormatShell::GetCurrencySymbols( SvStringsDtor& rList, sal_uInt16* pPos ) { const NfCurrencyEntry* pTmpCurrencyEntry=SvNumberFormatter::MatchSystemCurrency(); sal_Bool bFlag=(pTmpCurrencyEntry==NULL); - GetCurrencySymbols(rList,rStrEurope, bFlag); + GetCurrencySymbols( rList, bFlag); if(pPos!=NULL) { const NfCurrencyTable& rCurrencyTable=SvNumberFormatter::GetTheCurrencyTable(); - sal_uInt16 nCount=rCurrencyTable.Count(); + sal_uInt16 nTableCount=rCurrencyTable.Count(); *pPos=0; - nCount=aCurCurrencyList.Count(); + sal_uInt16 nCount=aCurCurrencyList.Count(); if(bFlag) { @@ -1549,8 +1550,9 @@ void SvxNumberFormatShell::GetCurrencySymbols(SvStringsDtor& rList,const XubStri { for(sal_uInt16 i=1;iGetSymbol()); + XubString aString( ApplyLreOrRleEmbedding( rCurrencyTable[0]->GetSymbol())); aString += sal_Unicode(' '); - aString += pLanguageTable->GetString(rCurrencyTable[0]->GetLanguage()); + aString += ApplyLreOrRleEmbedding( pLanguageTable->GetString( rCurrencyTable[0]->GetLanguage())); WSStringPtr pStr = new XubString(aString); rList.Insert( pStr,rList.Count()); @@ -1591,41 +1593,54 @@ void SvxNumberFormatShell::GetCurrencySymbols(SvStringsDtor& rList,const XubStri ++nStart; } - for(i=1;iGetSymbol()); - _aString += sal_Unicode(' '); - _aString += pLanguageTable->GetString(rCurrencyTable[i]->GetLanguage()); + CollatorWrapper aCollator( ::comphelper::getProcessServiceFactory()); + aCollator.loadDefaultCollator( Application::GetSettings().GetLocale(), 0); - pStr = new XubString(_aString); + const String aTwoSpace( RTL_CONSTASCII_USTRINGPARAM( " ")); + for(i=1;iGetBankSymbol())); + aStr += aTwoSpace; + aStr += ApplyLreOrRleEmbedding( rCurrencyTable[i]->GetSymbol()); + aStr += aTwoSpace; + aStr += ApplyLreOrRleEmbedding( pLanguageTable->GetString( rCurrencyTable[i]->GetLanguage())); + + pStr = new XubString(aStr); +#if 0 + fprintf( stderr, "currency entry: %s\n", ByteString( *pStr, RTL_TEXTENCODING_UTF8).GetBuffer()); +#endif for(j=nStart;jaString) break; + if (aCollator.compareString( *pStr, *pTestStr) < 0) + break; // insert before first greater than } rList.Insert( pStr,j); aCurCurrencyList.Insert(i,j); } + // Append ISO codes to symbol list. + // XXX If this is to be changed, various other places would had to be + // adapted that assume this order! sal_uInt16 nCont = rList.Count(); for(i=1;iGetBankSymbol()); + bool bInsert = true; + pStr = new XubString( ApplyLreOrRleEmbedding( rCurrencyTable[i]->GetBankSymbol())); - for(j=nCont;j*pStr) break; + if (aCollator.compareString( *pStr, *pTestStr) < 0) + break; // insert before first greater than } - if(bTest) + if(bInsert) { rList.Insert( pStr,j); aCurCurrencyList.Insert(i,j); -- cgit From cb6a7b19436d658990b582c98612d95da8d17afd Mon Sep 17 00:00:00 2001 From: Jens-Heiner Rechtien Date: Wed, 16 Sep 2009 16:04:37 +0000 Subject: CWS-TOOLING: integrate CWS automationdev300m57cat0 2009-09-09 tb121644 #i104895# split options test into 2 files one for first.bas and the other for X_updt.bas'es 2009-09-09 tb121644 #i100286# add HElpId HID_OPTIONS_JAVA_LIST 2009-09-08 tb121644 #i103219 CB_KEEP_LIST -> CB_REMOVE_LIST; clean hid.lst 2009-09-08 tb121644 #i103219 revert of revert of change; clean hid.lst --- svx/util/hidother.src | 1 + 1 file changed, 1 insertion(+) (limited to 'svx') diff --git a/svx/util/hidother.src b/svx/util/hidother.src index 86c0edea64d3..6ef00e2640a2 100644 --- a/svx/util/hidother.src +++ b/svx/util/hidother.src @@ -392,4 +392,5 @@ hidspecial HID_MACRO_HEADERTABLISTBOX { HelpID = HID_MACRO_HEADERTABLI hidspecial HID_PASTE_DLG { HelpId = HID_PASTE_DLG; }; hidspecial HID_LINKDLG_TABLB { HelpId = HID_LINKDLG_TABLB; }; +hidspecial HID_OPTIONS_JAVA_LIST { HelpId = HID_OPTIONS_JAVA_LIST; }; -- cgit From 21f00c5087181a81462af1b9ec07007d1636ebc1 Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Thu, 17 Sep 2009 10:04:40 +0000 Subject: CWS-TOOLING: integrate CWS fwk115 2009-08-30 10:55:35 +0200 mav r275560 : CWS-TOOLING: rebase CWS fwk115 to trunk@275331 (milestone: DEV300:m56) 2009-08-10 10:25:27 +0200 mav r274795 : #i101907# fix typo 2009-07-21 09:05:31 +0200 mav r274157 : CWS-TOOLING: rebase CWS fwk115 to trunk@273468 (milestone: DEV300:m51) 2009-05-14 11:01:51 +0200 mav r271877 : #i101907# show only installed applications --- svx/source/cui/optsave.cxx | 81 +++++++++++++++++++++++++++++----------------- 1 file changed, 52 insertions(+), 29 deletions(-) (limited to 'svx') diff --git a/svx/source/cui/optsave.cxx b/svx/source/cui/optsave.cxx index 294f9cd041da..29708444fe93 100644 --- a/svx/source/cui/optsave.cxx +++ b/svx/source/cui/optsave.cxx @@ -245,38 +245,57 @@ SfxSaveTabPage::SfxSaveTabPage( Window* pParent, const SfxItemSet& rCoreSet ) : SvtModuleOptions aModuleOpt; if ( !aModuleOpt.IsModuleInstalled( SvtModuleOptions::E_SMATH ) ) + { aSaveAsLB.RemoveEntry(aSaveAsLB.GetEntryPos( (void*) APP_MATH )); + aDocTypeLB.RemoveEntry(aDocTypeLB.GetEntryPos( (void*) APP_MATH )); + } else { pImpl->aDefaultArr[APP_MATH] = aModuleOpt.GetFactoryDefaultFilter(SvtModuleOptions::E_MATH); pImpl->aDefaultReadonlyArr[APP_MATH] = aModuleOpt.IsDefaultFilterReadonly(SvtModuleOptions::E_MATH); } + if ( !aModuleOpt.IsModuleInstalled( SvtModuleOptions::E_SDRAW ) ) + { aSaveAsLB.RemoveEntry(aSaveAsLB.GetEntryPos( (void*) APP_DRAW )); + aDocTypeLB.RemoveEntry(aDocTypeLB.GetEntryPos( (void*) APP_DRAW )); + } else { pImpl->aDefaultArr[APP_DRAW] = aModuleOpt.GetFactoryDefaultFilter(SvtModuleOptions::E_DRAW); pImpl->aDefaultReadonlyArr[APP_DRAW] = aModuleOpt.IsDefaultFilterReadonly(SvtModuleOptions::E_DRAW); } + if ( !aModuleOpt.IsModuleInstalled( SvtModuleOptions::E_SIMPRESS ) ) + { aSaveAsLB.RemoveEntry(aSaveAsLB.GetEntryPos( (void*) APP_IMPRESS )); + aDocTypeLB.RemoveEntry(aDocTypeLB.GetEntryPos( (void*) APP_IMPRESS )); + } else { pImpl->aDefaultArr[APP_IMPRESS] = aModuleOpt.GetFactoryDefaultFilter(SvtModuleOptions::E_IMPRESS); pImpl->aDefaultReadonlyArr[APP_IMPRESS] = aModuleOpt.IsDefaultFilterReadonly(SvtModuleOptions::E_IMPRESS); } + if ( !aModuleOpt.IsModuleInstalled( SvtModuleOptions::E_SCALC ) ) + { aSaveAsLB.RemoveEntry(aSaveAsLB.GetEntryPos( (void*) APP_CALC )); + aDocTypeLB.RemoveEntry(aDocTypeLB.GetEntryPos( (void*) APP_CALC )); + } else { pImpl->aDefaultArr[APP_CALC] = aModuleOpt.GetFactoryDefaultFilter(SvtModuleOptions::E_CALC); pImpl->aDefaultReadonlyArr[APP_CALC] = aModuleOpt.IsDefaultFilterReadonly(SvtModuleOptions::E_CALC); } + if ( !aModuleOpt.IsModuleInstalled( SvtModuleOptions::E_SWRITER ) ) { aSaveAsLB.RemoveEntry(aSaveAsLB.GetEntryPos( (void*) APP_WRITER )); aSaveAsLB.RemoveEntry(aSaveAsLB.GetEntryPos( (void*) APP_WRITER_WEB )); aSaveAsLB.RemoveEntry(aSaveAsLB.GetEntryPos( (void*) APP_WRITER_GLOBAL )); + aDocTypeLB.RemoveEntry(aDocTypeLB.GetEntryPos( (void*) APP_WRITER )); + aDocTypeLB.RemoveEntry(aDocTypeLB.GetEntryPos( (void*) APP_WRITER_WEB )); + aDocTypeLB.RemoveEntry(aDocTypeLB.GetEntryPos( (void*) APP_WRITER_GLOBAL )); } else { @@ -718,18 +737,23 @@ OUString lcl_ExtracUIName(const Sequence rProperties) ---------------------------------------------------------------------------*/ IMPL_LINK( SfxSaveTabPage, FilterHdl_Impl, ListBox *, pBox ) { - if(&aDocTypeLB == pBox) + USHORT nCurPos = aDocTypeLB.GetSelectEntryPos(); + + long nData = -1; + if(nCurPos < APP_COUNT) + nData = (long) aDocTypeLB.GetEntryData(nCurPos); + + if ( nData >= 0 && nData < APP_COUNT ) { - USHORT nAppPos = pBox->GetSelectEntryPos(); - if ( nAppPos < APP_COUNT ) + if(&aDocTypeLB == pBox) { aSaveAsLB.Clear(); - const OUString* pFilters = pImpl->aFilterArr[nAppPos].getConstArray(); - if(!pImpl->aUIFilterArr[nAppPos].getLength()) + const OUString* pFilters = pImpl->aFilterArr[nData].getConstArray(); + if(!pImpl->aUIFilterArr[nData].getLength()) { - pImpl->aUIFilterArr[nAppPos].realloc(pImpl->aFilterArr[nAppPos].getLength()); - OUString* pUIFilters = pImpl->aUIFilterArr[nAppPos].getArray(); - for(int nFilter = 0; nFilter < pImpl->aFilterArr[nAppPos].getLength(); nFilter++) + pImpl->aUIFilterArr[nData].realloc(pImpl->aFilterArr[nData].getLength()); + OUString* pUIFilters = pImpl->aUIFilterArr[nData].getArray(); + for(int nFilter = 0; nFilter < pImpl->aFilterArr[nData].getLength(); nFilter++) { Any aProps = pImpl->xFact->getByName(pFilters[nFilter]); Sequence aProperties; @@ -737,37 +761,36 @@ IMPL_LINK( SfxSaveTabPage, FilterHdl_Impl, ListBox *, pBox ) pUIFilters[nFilter] = lcl_ExtracUIName(aProperties); } } - const OUString* pUIFilters = pImpl->aUIFilterArr[nAppPos].getConstArray(); + const OUString* pUIFilters = pImpl->aUIFilterArr[nData].getConstArray(); OUString sSelect; - for(int i = 0; i < pImpl->aUIFilterArr[nAppPos].getLength(); i++) + for(int i = 0; i < pImpl->aUIFilterArr[nData].getLength(); i++) { USHORT nEntryPos = aSaveAsLB.InsertEntry(pUIFilters[i]); - if ( pImpl->aODFArr[nAppPos][i] ) + if ( pImpl->aODFArr[nData][i] ) aSaveAsLB.SetEntryData( nEntryPos, (void*)pImpl ); - if(pFilters[i] == pImpl->aDefaultArr[nAppPos]) + if(pFilters[i] == pImpl->aDefaultArr[nData]) sSelect = pUIFilters[i]; } if(sSelect.getLength()) aSaveAsLB.SelectEntry(sSelect); - aSaveAsFI.Show(pImpl->aDefaultReadonlyArr[nAppPos]); - aSaveAsFT.Enable(!pImpl->aDefaultReadonlyArr[nAppPos]); - aSaveAsLB.Enable(!pImpl->aDefaultReadonlyArr[nAppPos]); + aSaveAsFI.Show(pImpl->aDefaultReadonlyArr[nData]); + aSaveAsFT.Enable(!pImpl->aDefaultReadonlyArr[nData]); + aSaveAsLB.Enable(!pImpl->aDefaultReadonlyArr[nData]); } - } - else - { - OUString sSelect = pBox->GetSelectEntry(); - USHORT nPos = aDocTypeLB.GetSelectEntryPos(); - const OUString* pFilters = pImpl->aFilterArr[nPos].getConstArray(); - OUString* pUIFilters = pImpl->aUIFilterArr[nPos].getArray(); - for(int i = 0; i < pImpl->aUIFilterArr[nPos].getLength(); i++) - if(pUIFilters[i] == sSelect) - { - sSelect = pFilters[i]; - break; - } + else + { + OUString sSelect = pBox->GetSelectEntry(); + const OUString* pFilters = pImpl->aFilterArr[nData].getConstArray(); + OUString* pUIFilters = pImpl->aUIFilterArr[nData].getArray(); + for(int i = 0; i < pImpl->aUIFilterArr[nData].getLength(); i++) + if(pUIFilters[i] == sSelect) + { + sSelect = pFilters[i]; + break; + } - pImpl->aDefaultArr[nPos] = sSelect; + pImpl->aDefaultArr[nData] = sSelect; + } } ODFVersionHdl_Impl( &aSaveAsLB ); -- cgit From 4e5d76b3cef5a863d5961e33a0c08c26b0b6dc2d Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Thu, 17 Sep 2009 10:11:42 +0000 Subject: CWS-TOOLING: integrate CWS boost134 2009-09-09 10:30:24 +0200 fs r275970 : #i100127# provided by rene: check whether system-boost's function.hpp compiles without exception support 2009-09-04 21:58:00 +0200 fs r275832 : indention 2009-09-04 21:57:10 +0200 fs r275831 : #i10000# type in boost/spirit check. Thanks to thb 2009-09-04 10:58:54 +0200 fs r275787 : #i100127# provided by tono@openoffice.org: mingw needs using directives for std::min/max 2009-09-04 10:31:54 +0200 fs r275782 : #i100127# (approved by hjs) on Solaris, set GNUTAR to /usr/sfw/bin/gtar, this is available on baseline machines (Solaris 10.x), but not necessarily available in LD_LIBRARY_PATH 2009-08-19 21:47:55 +0200 rene r275161 : #i10000# check for the header actually used now 2009-08-17 21:55:31 +0200 fs r275073 : CWS-TOOLING: rebase CWS boost134 to trunk@275001 (milestone: DEV300:m55) 2009-07-16 09:39:25 +0200 fs r274031 : #i100127# extract download/% with GNUTAR instead of TAR 2009-07-14 09:18:15 +0200 fs r273960 : CWS-TOOLING: rebase CWS boost134 to trunk@273858 (milestone: DEV300:m52) 2009-07-13 09:55:14 +0200 fs r273919 : #i100127# use boost 1.39, not 1.34 2009-07-13 09:45:57 +0200 fs r273918 : use GNUTAR when extracting download/%.tar.gz, not TAR (necessary with boost 1.39 tarball) 2009-07-10 21:10:52 +0200 fs r273905 : #i100127# spirit now part of boost 2009-07-06 12:12:13 +0200 fs r273732 : #i10000# lngconvex, used in src/wizards, is built in shell => added missing module dependency 2009-07-02 15:34:51 +0200 fs r273660 : #i100127# 2009-07-02 13:35:24 +0200 fs r273645 : #i100127# MSVC needs some hinting when using boost::bind on (some) member functions 2009-07-02 10:33:59 +0200 fs r273625 : removed unused include (lead to an internal compiler error with MSVC and boost 1.34+) 2009-07-02 09:44:35 +0200 fs r273619 : change some include orders, prevents 'internal compiler errors' with MSVC 2009-07-01 09:19:25 +0200 fs r273547 : #i100127# who the heck is defining max as something unusable? 2009-07-01 09:17:28 +0200 fs r273546 : #i100127# defining min/max is causing trouble now 2009-07-01 09:15:40 +0200 fs r273545 : #i100127# reverted previous patch, and properly fixed the problem by defining BOOST_MEM_FN_ENABLE_CDECL, and disabling warning 4180 2009-07-01 09:14:23 +0200 fs r273544 : #i100127# re-disable warning 4180, still needed for some files 2009-07-01 09:07:33 +0200 fs r273543 : #i100127# reverted previous patch, and properly fixed the problem by defining BOOST_MEM_FN_ENABLE_CDECL 2009-06-24 11:00:32 +0200 fs r273319 : oops, re-introduced some inc locations 2009-06-23 22:10:02 +0200 fs r273304 : #i100127# disable warning C4180 2009-06-23 22:08:36 +0200 fs r273303 : #i100127# disable warning C4180 2009-06-16 12:26:49 +0200 fs r273015 : #i10000# (provided by mst@openoffice.org) 2009-06-15 09:10:27 +0200 fs r272962 : #i10000# use -r instead of -a when copying the include files, this prevents the spurious 'failed to preserve ownership' errors 2009-06-11 23:55:06 +0200 fs r272902 : #i100127# 2009-06-11 23:54:47 +0200 fs r272901 : #i100127# 2009-06-11 23:54:05 +0200 fs r272900 : make compile on unxsol[i|s]4 2009-06-10 10:12:22 +0200 fs r272798 : #i100127# don't deliver from within unxlngi6/misc/build/boost, but from a 'normalized' location unxlngi6/inc 2009-06-10 09:48:00 +0200 fs r272795 : #i100127# use 1.34.1 unconditionally on all platforms --- svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx | 2 +- svx/source/customshapes/makefile.mk | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'svx') diff --git a/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx b/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx index 8f447de5b51c..022b7505cb44 100644 --- a/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx +++ b/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx @@ -44,7 +44,7 @@ #include #define BOOST_SPIRIT_DEBUG #endif -#include +#include #if (OSL_DEBUG_LEVEL > 0) #include diff --git a/svx/source/customshapes/makefile.mk b/svx/source/customshapes/makefile.mk index 9940a9bb21bc..edd6f7d33ed0 100644 --- a/svx/source/customshapes/makefile.mk +++ b/svx/source/customshapes/makefile.mk @@ -49,6 +49,8 @@ ENABLE_EXCEPTIONS=TRUE NOOPTFILES= $(SLO)$/EnhancedCustomShapeFunctionParser.obj .ENDIF +ENVCFLAGS += -DBOOST_SPIRIT_USE_OLD_NAMESPACE + # --- Files ------------------------------------- LIB1TARGET= $(SLB)$/$(TARGET)-core.lib -- cgit From 762181f6f1168e0eb54009990222d7cb4cebebd5 Mon Sep 17 00:00:00 2001 From: Jens-Heiner Rechtien Date: Thu, 17 Sep 2009 10:29:02 +0000 Subject: CWS-TOOLING: integrate CWS aw077 2009-09-17 Armin Le Grand #resolved conflicts for integration 2009-09-07 Armin Le Grand #i103058# re-added handling of StatusBar texts for DrawObject creation, added FullDrag for circle-similar shapes (all in the ellipse toolbar) 2009-09-03 Armin Le Grand #i100514# extended TextAttributes and handling, adapted for super/subscript, adapted WordBreaking (again) 2009-09-02 Armin Le Grand #i104432# secured TextLayouterDevice::getTextBoundRect implementation and usage 2009-09-02 Armin Le Grand #i104232#, #i100514# Mainly solved 1st one, no more local SpellCheck remembering, but adding to compare op's where needed 2009-08-19 Armin Le Grand #i100514# commited in-between version due to 2week holiday 2009-08-13 Armin Le Grand #i99157# applied changes to BitmapEx and SdrHdlBitmapSet 2009-08-06 Armin Le Grand #i100357# added clipping for too big MetaFiles --- svx/inc/svx/sdr/attribute/sdrtextattribute.hxx | 14 ++- svx/inc/svx/sdr/primitive2d/sdrtextprimitive2d.hxx | 27 ++++-- svx/inc/svx/svdhdl.hxx | 7 -- svx/inc/svx/svdotext.hxx | 9 +- svx/source/sdr/attribute/sdrtextattribute.cxx | 36 ++++++- svx/source/sdr/contact/viewcontactofgraphic.cxx | 3 + svx/source/sdr/overlay/overlaymanagerbuffered.cxx | 57 ++++------- svx/source/sdr/primitive2d/sdrattributecreator.cxx | 8 +- .../sdr/primitive2d/sdrdecompositiontools.cxx | 6 +- .../sdr/primitive2d/sdrmeasureprimitive2d.cxx | 3 + svx/source/sdr/primitive2d/sdrprimitivetools.cxx | 25 +++-- svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx | 81 +++++++--------- svx/source/svdraw/svdcrtv.cxx | 6 +- svx/source/svdraw/svddrgmt.cxx | 17 +++- svx/source/svdraw/svdhdl.cxx | 51 ++++------ svx/source/svdraw/svdocapt.cxx | 27 ++++-- svx/source/svdraw/svdocirc.cxx | 57 +++++++++-- svx/source/svdraw/svdoedge.cxx | 18 +++- svx/source/svdraw/svdopath.cxx | 106 +++++++++++++++++---- svx/source/svdraw/svdorect.cxx | 47 +++++---- svx/source/svdraw/svdotextdecomposition.cxx | 73 ++++++-------- svx/source/svdraw/svdotextpathdecomposition.cxx | 57 +++++------ 22 files changed, 436 insertions(+), 299 deletions(-) (limited to 'svx') diff --git a/svx/inc/svx/sdr/attribute/sdrtextattribute.hxx b/svx/inc/svx/sdr/attribute/sdrtextattribute.hxx index e0dcb51e9460..1759eb18d319 100644 --- a/svx/inc/svx/sdr/attribute/sdrtextattribute.hxx +++ b/svx/inc/svx/sdr/attribute/sdrtextattribute.hxx @@ -35,6 +35,7 @@ #include #include #include +#include ////////////////////////////////////////////////////////////////////////////// // predefines @@ -68,6 +69,10 @@ namespace drawinglayer // #i101556# use versioning from text attributes to detect changes sal_uInt32 maPropertiesVersion; + // text alignments + SdrTextHorzAdjust maSdrTextHorzAdjust; + SdrTextVertAdjust maSdrTextVertAdjust; + // bitfield unsigned mbContour : 1; unsigned mbFitToSize : 1; @@ -75,6 +80,7 @@ namespace drawinglayer unsigned mbBlink : 1; unsigned mbScroll : 1; unsigned mbInEditMode : 1; + unsigned mbFixedCellHeight : 1; public: SdrTextAttribute( @@ -85,12 +91,15 @@ namespace drawinglayer sal_Int32 aTextUpperDistance, sal_Int32 aTextRightDistance, sal_Int32 aTextLowerDistance, + SdrTextHorzAdjust aSdrTextHorzAdjust, + SdrTextVertAdjust aSdrTextVertAdjust, bool bContour, bool bFitToSize, bool bHideContour, bool bBlink, bool bScroll, - bool bInEditMode); + bool bInEditMode, + bool bFixedCellHeight); ~SdrTextAttribute(); // copy constructor and assigment operator @@ -109,12 +118,15 @@ namespace drawinglayer bool isBlink() const { return mbBlink; } bool isScroll() const { return mbScroll; } bool isInEditMode() const { return mbInEditMode; } + bool isFixedCellHeight() const { return mbFixedCellHeight; } const SdrFormTextAttribute* getSdrFormTextAttribute() const { return mpSdrFormTextAttribute; } sal_Int32 getTextLeftDistance() const { return maTextLeftDistance; } sal_Int32 getTextUpperDistance() const { return maTextUpperDistance; } sal_Int32 getTextRightDistance() const { return maTextRightDistance; } sal_Int32 getTextLowerDistance() const { return maTextLowerDistance; } sal_uInt32 getPropertiesVersion() const { return maPropertiesVersion; } + SdrTextHorzAdjust getSdrTextHorzAdjust() const { return maSdrTextHorzAdjust; } + SdrTextVertAdjust getSdrTextVertAdjust() const { return maSdrTextVertAdjust; } // animation timing generation void getBlinkTextTiming(drawinglayer::animation::AnimationEntryList& rAnimList) const; diff --git a/svx/inc/svx/sdr/primitive2d/sdrtextprimitive2d.hxx b/svx/inc/svx/sdr/primitive2d/sdrtextprimitive2d.hxx index 6dd60b45d2d5..132a3ecc2538 100644 --- a/svx/inc/svx/sdr/primitive2d/sdrtextprimitive2d.hxx +++ b/svx/inc/svx/sdr/primitive2d/sdrtextprimitive2d.hxx @@ -40,6 +40,7 @@ #include #include #include +#include ////////////////////////////////////////////////////////////////////////////// // predefines @@ -82,11 +83,6 @@ namespace drawinglayer Color maLastTextBackgroundColor; // bitfield - // remember if last decomposition was with or without spell checker. In this special - // case the get2DDecomposition implementation has to take care of this aspect. This is - // needed since different views do different text decompositons regarding spell checking. - unsigned mbLastSpellCheck : 1; - // is there a PageNumber, Header, Footer or DateTimeField used? Evaluated at construction unsigned mbContainsPageField : 1; unsigned mbContainsPageCountField : 1; @@ -96,9 +92,6 @@ namespace drawinglayer // support for XTEXT_PAINTSHAPE_BEGIN/XTEXT_PAINTSHAPE_END Metafile comments Primitive2DSequence encapsulateWithTextHierarchyBlockPrimitive2D(const Primitive2DSequence& rCandidate) const; - bool getLastSpellCheck() const { return (bool)mbLastSpellCheck; } - void setLastSpellCheck(bool bNew) { mbLastSpellCheck = bNew; } - public: SdrTextPrimitive2D( const SdrText* pSdrText, @@ -217,7 +210,12 @@ namespace drawinglayer // text range transformation from unit range ([0.0 .. 1.0]) to text range basegfx::B2DHomMatrix maTextRangeTransform; + // text alignments + SdrTextHorzAdjust maSdrTextHorzAdjust; + SdrTextVertAdjust maSdrTextVertAdjust; + // bitfield + unsigned mbFixedCellHeight : 1; unsigned mbUnlimitedPage : 1; // force layout with no text break unsigned mbCellText : 1; // this is a cell text as block text unsigned mbWordWrap : 1; // for CustomShapes text layout @@ -231,12 +229,18 @@ namespace drawinglayer const SdrText* pSdrText, const OutlinerParaObject& rOutlinerParaObjectPtr, const basegfx::B2DHomMatrix& rTextRangeTransform, + SdrTextHorzAdjust aSdrTextHorzAdjust, + SdrTextVertAdjust aSdrTextVertAdjust, + bool bFixedCellHeight, bool bUnlimitedPage, bool bCellText, bool bWordWrap); // get data const basegfx::B2DHomMatrix& getTextRangeTransform() const { return maTextRangeTransform; } + SdrTextHorzAdjust getSdrTextHorzAdjust() const { return maSdrTextHorzAdjust; } + SdrTextVertAdjust getSdrTextVertAdjust() const { return maSdrTextVertAdjust; } + bool isFixedCellHeight() const { return mbFixedCellHeight; } bool getUnlimitedPage() const { return mbUnlimitedPage; } bool getCellText() const { return mbCellText; } bool getWordWrap() const { return mbWordWrap; } @@ -265,6 +269,9 @@ namespace drawinglayer // text range transformation from unit range ([0.0 .. 1.0]) to text range basegfx::B2DHomMatrix maTextRangeTransform; + // bitfield + unsigned mbFixedCellHeight : 1; + protected: // local decomposition. virtual Primitive2DSequence createLocalDecomposition(const geometry::ViewInformation2D& aViewInformation) const; @@ -273,10 +280,12 @@ namespace drawinglayer SdrStretchTextPrimitive2D( const SdrText* pSdrText, const OutlinerParaObject& rOutlinerParaObjectPtr, - const basegfx::B2DHomMatrix& rTextRangeTransform); + const basegfx::B2DHomMatrix& rTextRangeTransform, + bool bFixedCellHeight); // get data const basegfx::B2DHomMatrix& getTextRangeTransform() const { return maTextRangeTransform; } + bool isFixedCellHeight() const { return mbFixedCellHeight; } // compare operator virtual bool operator==(const BasePrimitive2D& rPrimitive) const; diff --git a/svx/inc/svx/svdhdl.hxx b/svx/inc/svx/svdhdl.hxx index 11d400b85b8a..4960323feeb7 100644 --- a/svx/inc/svx/svdhdl.hxx +++ b/svx/inc/svx/svdhdl.hxx @@ -58,7 +58,6 @@ class SdrHdlList; class SdrMarkView; class SdrObject; class SdrPageView; -class SdrHdlBitmapSet; //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -155,12 +154,6 @@ class SVX_DLLPUBLIC SdrHdl friend class SdrMarkView; // fuer den Zugriff auf nObjHdlNum friend class SdrHdlList; - static SdrHdlBitmapSet* pSimpleSet; - static SdrHdlBitmapSet* pModernSet; - - // #101928# - static SdrHdlBitmapSet* pHighContrastSet; - // #101928# BitmapEx ImpGetBitmapEx(BitmapMarkerKind eKindOfMarker, sal_uInt16 nInd, sal_Bool bFine, sal_Bool bIsHighContrast); diff --git a/svx/inc/svx/svdotext.hxx b/svx/inc/svx/svdotext.hxx index 5298fc2dd79b..6ffa4ab5bd22 100644 --- a/svx/inc/svx/svdotext.hxx +++ b/svx/inc/svx/svdotext.hxx @@ -575,20 +575,19 @@ public: public: ////////////////////////////////////////////////////////////////////////////// // text primitive decomposition helpers - bool impCheckSpellCheckForDecomposeTextPrimitive() const; - bool impDecomposeContourTextPrimitive( + void impDecomposeContourTextPrimitive( drawinglayer::primitive2d::Primitive2DSequence& rTarget, const drawinglayer::primitive2d::SdrContourTextPrimitive2D& rSdrContourTextPrimitive, const drawinglayer::geometry::ViewInformation2D& aViewInformation) const; - bool impDecomposePathTextPrimitive( + void impDecomposePathTextPrimitive( drawinglayer::primitive2d::Primitive2DSequence& rTarget, const drawinglayer::primitive2d::SdrPathTextPrimitive2D& rSdrPathTextPrimitive, const drawinglayer::geometry::ViewInformation2D& aViewInformation) const; - bool impDecomposeBlockTextPrimitive( + void impDecomposeBlockTextPrimitive( drawinglayer::primitive2d::Primitive2DSequence& rTarget, const drawinglayer::primitive2d::SdrBlockTextPrimitive2D& rSdrBlockTextPrimitive, const drawinglayer::geometry::ViewInformation2D& aViewInformation) const; - bool impDecomposeStretchTextPrimitive( + void impDecomposeStretchTextPrimitive( drawinglayer::primitive2d::Primitive2DSequence& rTarget, const drawinglayer::primitive2d::SdrStretchTextPrimitive2D& rSdrStretchTextPrimitive, const drawinglayer::geometry::ViewInformation2D& aViewInformation) const; diff --git a/svx/source/sdr/attribute/sdrtextattribute.cxx b/svx/source/sdr/attribute/sdrtextattribute.cxx index 33c958fa6268..ae6204d15bef 100644 --- a/svx/source/sdr/attribute/sdrtextattribute.cxx +++ b/svx/source/sdr/attribute/sdrtextattribute.cxx @@ -57,12 +57,15 @@ namespace drawinglayer sal_Int32 aTextUpperDistance, sal_Int32 aTextRightDistance, sal_Int32 aTextLowerDistance, + SdrTextHorzAdjust aSdrTextHorzAdjust, + SdrTextVertAdjust aSdrTextVertAdjust, bool bContour, bool bFitToSize, bool bHideContour, bool bBlink, bool bScroll, - bool bInEditMode) + bool bInEditMode, + bool bFixedCellHeight) : mpSdrText(&rSdrText), maOutlinerParaObject(rOutlinerParaObject), mpSdrFormTextAttribute(0), @@ -71,12 +74,15 @@ namespace drawinglayer maTextRightDistance(aTextRightDistance), maTextLowerDistance(aTextLowerDistance), maPropertiesVersion(0), + maSdrTextHorzAdjust(aSdrTextHorzAdjust), + maSdrTextVertAdjust(aSdrTextVertAdjust), mbContour(bContour), mbFitToSize(bFitToSize), mbHideContour(bHideContour), mbBlink(bBlink), mbScroll(bScroll), - mbInEditMode(bInEditMode) + mbInEditMode(bInEditMode), + mbFixedCellHeight(bFixedCellHeight) { if(XFT_NONE != eFormTextStyle) { @@ -108,12 +114,16 @@ namespace drawinglayer maTextUpperDistance(rCandidate.getTextUpperDistance()), maTextRightDistance(rCandidate.getTextRightDistance()), maTextLowerDistance(rCandidate.getTextLowerDistance()), + maPropertiesVersion(rCandidate.getPropertiesVersion()), + maSdrTextHorzAdjust(rCandidate.getSdrTextHorzAdjust()), + maSdrTextVertAdjust(rCandidate.getSdrTextVertAdjust()), mbContour(rCandidate.isContour()), mbFitToSize(rCandidate.isFitToSize()), mbHideContour(rCandidate.isHideContour()), mbBlink(rCandidate.isBlink()), mbScroll(rCandidate.isScroll()), - mbInEditMode(rCandidate.isInEditMode()) + mbInEditMode(rCandidate.isInEditMode()), + mbFixedCellHeight(rCandidate.isFixedCellHeight()) { if(rCandidate.getSdrFormTextAttribute()) { @@ -142,36 +152,52 @@ namespace drawinglayer maTextUpperDistance = rCandidate.getTextUpperDistance(); maTextRightDistance = rCandidate.getTextRightDistance(); maTextLowerDistance = rCandidate.getTextLowerDistance(); + maPropertiesVersion = rCandidate.getPropertiesVersion(); + + maSdrTextHorzAdjust = rCandidate.getSdrTextHorzAdjust(); + maSdrTextVertAdjust = rCandidate.getSdrTextVertAdjust(); + mbContour = rCandidate.isContour(); mbFitToSize = rCandidate.isFitToSize(); mbHideContour = rCandidate.isHideContour(); mbBlink = rCandidate.isBlink(); mbScroll = rCandidate.isScroll(); mbInEditMode = rCandidate.isInEditMode(); + mbFixedCellHeight = rCandidate.isFixedCellHeight(); return *this; } bool SdrTextAttribute::operator==(const SdrTextAttribute& rCandidate) const { - return (getOutlinerParaObject() == rCandidate.getOutlinerParaObject() + return ( + // compares OPO and it's contents, but traditionally not the RedLining + // which is not seen as model, but as temporary information + getOutlinerParaObject() == rCandidate.getOutlinerParaObject() + // #i102062# for primitive visualisation, the WrongList (SpellChecking) // is important, too, so use isWrongListEqual since there is no WrongList // comparison in the regular OutlinerParaObject compare (since it's // not-persistent data) && getOutlinerParaObject().isWrongListEqual(rCandidate.getOutlinerParaObject()) + && pointerOrContentEqual(getSdrFormTextAttribute(), rCandidate.getSdrFormTextAttribute()) && getTextLeftDistance() == rCandidate.getTextLeftDistance() && getTextUpperDistance() == rCandidate.getTextUpperDistance() && getTextRightDistance() == rCandidate.getTextRightDistance() && getTextLowerDistance() == rCandidate.getTextLowerDistance() && getPropertiesVersion() == rCandidate.getPropertiesVersion() + + && getSdrTextHorzAdjust() == rCandidate.getSdrTextHorzAdjust() + && getSdrTextVertAdjust() == rCandidate.getSdrTextVertAdjust() + && isContour() == rCandidate.isContour() && isFitToSize() == rCandidate.isFitToSize() && isHideContour() == rCandidate.isHideContour() && isBlink() == rCandidate.isBlink() && isScroll() == rCandidate.isScroll() - && isInEditMode() == rCandidate.isInEditMode()); + && isInEditMode() == rCandidate.isInEditMode() + && isFixedCellHeight() == rCandidate.isFixedCellHeight()); } void SdrTextAttribute::getBlinkTextTiming(drawinglayer::animation::AnimationEntryList& rAnimList) const diff --git a/svx/source/sdr/contact/viewcontactofgraphic.cxx b/svx/source/sdr/contact/viewcontactofgraphic.cxx index b083a1014299..6a92cb27ff8c 100644 --- a/svx/source/sdr/contact/viewcontactofgraphic.cxx +++ b/svx/source/sdr/contact/viewcontactofgraphic.cxx @@ -305,6 +305,9 @@ namespace sdr pSdrText, *pOPO, aTextRangeTransform, + SDRTEXTHORZADJUST_LEFT, + SDRTEXTVERTADJUST_TOP, + false, false, false, false); diff --git a/svx/source/sdr/overlay/overlaymanagerbuffered.cxx b/svx/source/sdr/overlay/overlaymanagerbuffered.cxx index 2b664e816d42..3fedc40f37cf 100644 --- a/svx/source/sdr/overlay/overlaymanagerbuffered.cxx +++ b/svx/source/sdr/overlay/overlaymanagerbuffered.cxx @@ -39,6 +39,7 @@ #include #include #include +#include ////////////////////////////////////////////////////////////////////////////// @@ -255,15 +256,21 @@ namespace sdr maBufferRememberedRangePixel.getMaxX(), maBufferRememberedRangePixel.getMaxY()); aBufferRememberedRangeLogic.transform(getOutputDevice().GetInverseViewTransformation()); + // prepare cursor handling const bool bTargetIsWindow(OUTDEV_WINDOW == rmOutputDevice.GetOutDevType()); - Cursor* pCursor = 0; + bool bCursorWasEnabled(false); - // #i75172# switch off VCL cursor during overlay refresh + // #i80730# switch off VCL cursor during overlay refresh if(bTargetIsWindow) { Window& rWindow = static_cast< Window& >(rmOutputDevice); - pCursor = rWindow.GetCursor(); - rWindow.SetCursor(0); + Cursor* pCursor = rWindow.GetCursor(); + + if(pCursor && pCursor->IsVisible()) + { + pCursor->Hide(); + bCursorWasEnabled = true; + } } if(DoRefreshWithPreRendering()) @@ -363,49 +370,19 @@ namespace sdr OverlayManager::ImpDrawMembers(aBufferRememberedRangeLogic, getOutputDevice()); } - // VCL hack for transparent child windows - // Problem is e.g. a radiobuttion form control in life mode. The used window - // is a transparence vcl childwindow. This flag only allows the parent window to - // paint into the child windows area, but there is no mechanism which takes - // care for a repaint of the child window. A transparent child window is NOT - // a window which always keeps it's content consistent over the parent, but it's - // more like just a paint flag for the parent. - // To get the update, the windows in question are updated manulally here. - if(bTargetIsWindow) + // #i80730# restore visibility of VCL cursor + if(bCursorWasEnabled) { Window& rWindow = static_cast< Window& >(rmOutputDevice); + Cursor* pCursor = rWindow.GetCursor(); - if(rWindow.IsChildTransparentModeEnabled() && rWindow.GetChildCount()) + if(pCursor) { - const Rectangle aRegionRectanglePixel( - maBufferRememberedRangePixel.getMinX(), maBufferRememberedRangePixel.getMinY(), - maBufferRememberedRangePixel.getMaxX(), maBufferRememberedRangePixel.getMaxY()); - - for(sal_uInt16 a(0); a < rWindow.GetChildCount(); a++) - { - Window* pCandidate = rWindow.GetChild(a); - - if(pCandidate && pCandidate->IsPaintTransparent()) - { - const Rectangle aCandidatePosSizePixel(pCandidate->GetPosPixel(), pCandidate->GetSizePixel()); - - if(aCandidatePosSizePixel.IsOver(aRegionRectanglePixel)) - { - pCandidate->Invalidate(INVALIDATE_NOTRANSPARENT|INVALIDATE_CHILDREN); - pCandidate->Update(); - } - } - } + // check if cursor still exists. It may have been deleted from someone + pCursor->Show(); } } - // #i75172# restore VCL cursor - if(bTargetIsWindow) - { - Window& rWindow = static_cast< Window& >(rmOutputDevice); - rWindow.SetCursor(pCursor); - } - // forget remembered Region maBufferRememberedRangePixel.reset(); } diff --git a/svx/source/sdr/primitive2d/sdrattributecreator.cxx b/svx/source/sdr/primitive2d/sdrattributecreator.cxx index 277ee70f82ca..4e57166b4723 100644 --- a/svx/source/sdr/primitive2d/sdrattributecreator.cxx +++ b/svx/source/sdr/primitive2d/sdrattributecreator.cxx @@ -76,6 +76,7 @@ #include #include #include +#include ////////////////////////////////////////////////////////////////////////////// @@ -519,7 +520,7 @@ namespace drawinglayer } } - const SdrFitToSizeType eFit = rTextObj.GetFitToSize(); + const SdrFitToSizeType eFit(rTextObj.GetFitToSize()); const SdrTextAniKind eAniKind(rTextObj.GetTextAniKind()); pRetval = new attribute::SdrTextAttribute( @@ -530,12 +531,15 @@ namespace drawinglayer pUpper ? *pUpper : rTextObj.GetTextUpperDistance(), pRight ? *pRight : rTextObj.GetTextRightDistance(), pLower ? *pLower : rTextObj.GetTextLowerDistance(), + rTextObj.GetTextHorizontalAdjust(rSet), + rTextObj.GetTextVerticalAdjust(rSet), ((const SdrTextContourFrameItem&)rSet.Get(SDRATTR_TEXT_CONTOURFRAME)).GetValue(), (SDRTEXTFIT_PROPORTIONAL == eFit || SDRTEXTFIT_ALLLINES == eFit), ((const XFormTextHideFormItem&)rSet.Get(XATTR_FORMTXTHIDEFORM)).GetValue(), SDRTEXTANI_BLINK == eAniKind, SDRTEXTANI_SCROLL == eAniKind || SDRTEXTANI_ALTERNATE == eAniKind || SDRTEXTANI_SLIDE == eAniKind, - bInEditMode); + bInEditMode, + ((const SdrTextFixedCellHeightItem&)rSet.Get(SDRATTR_TEXT_USEFIXEDCELLHEIGHT)).GetValue()); } return pRetval; diff --git a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx index 9666bd2c1ac1..09769a2a013e 100644 --- a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx +++ b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx @@ -282,7 +282,8 @@ namespace drawinglayer pNew = new SdrStretchTextPrimitive2D( &rText.getSdrText(), rText.getOutlinerParaObject(), - aAnchorTransform); + aAnchorTransform, + rText.isFixedCellHeight()); } else // text in range { @@ -291,6 +292,9 @@ namespace drawinglayer &rText.getSdrText(), rText.getOutlinerParaObject(), aAnchorTransform, + rText.getSdrTextHorzAdjust(), + rText.getSdrTextVertAdjust(), + rText.isFixedCellHeight(), rText.isScroll(), bCellText, bWordWrap); diff --git a/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx index f515b9b6a5e9..94e59f79c3de 100644 --- a/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx @@ -129,8 +129,11 @@ namespace drawinglayer &pTextAttribute->getSdrText(), pTextAttribute->getOutlinerParaObject(), aTextMatrix, + SDRTEXTHORZADJUST_CENTER, + SDRTEXTVERTADJUST_CENTER, pTextAttribute->isScroll(), false, + false, false); aTextRange = pBlockText->getB2DRange(aViewInformation); } diff --git a/svx/source/sdr/primitive2d/sdrprimitivetools.cxx b/svx/source/sdr/primitive2d/sdrprimitivetools.cxx index 6c665cbef4c9..25b39ebb07d5 100644 --- a/svx/source/sdr/primitive2d/sdrprimitivetools.cxx +++ b/svx/source/sdr/primitive2d/sdrprimitivetools.cxx @@ -37,6 +37,7 @@ #include #include #include +#include ////////////////////////////////////////////////////////////////////////////// // helper methods @@ -47,11 +48,11 @@ namespace drawinglayer { BitmapEx createDefaultCross_3x3(const basegfx::BColor& rBColor) { - static BitmapEx* pRetVal = NULL; + static vcl::DeleteOnDeinit< BitmapEx > aRetVal(0); static basegfx::BColor aColor; ::osl::Mutex m_mutex; - if(pRetVal == NULL || rBColor != aColor) + if(!aRetVal.get() || rBColor != aColor) { // copy values aColor = rBColor; @@ -81,23 +82,21 @@ namespace drawinglayer aContent.ReleaseAccess(pWContent); aMask.ReleaseAccess(pWMask); - if( pRetVal ) - delete pRetVal; - - pRetVal = new BitmapEx(aContent, aMask); + // create and exchange at aRetVal + delete aRetVal.set(new BitmapEx(aContent, aMask)); } - return *pRetVal; + return aRetVal.get() ? *aRetVal.get() : BitmapEx(); } BitmapEx createDefaultGluepoint_7x7(const basegfx::BColor& rBColorA, const basegfx::BColor& rBColorB) { - static BitmapEx* pRetVal = NULL; + static vcl::DeleteOnDeinit< BitmapEx > aRetVal(0); static basegfx::BColor aColorA; static basegfx::BColor aColorB; ::osl::Mutex m_mutex; - if(pRetVal == NULL || rBColorA != aColorA || rBColorB != aColorB) + if(!aRetVal.get() || rBColorA != aColorA || rBColorB != aColorB) { // copy values aColorA = rBColorA; @@ -171,13 +170,11 @@ namespace drawinglayer aContent.ReleaseAccess(pWContent); aMask.ReleaseAccess(pWMask); - if( pRetVal ) - delete pRetVal; - - pRetVal = new BitmapEx(aContent, aMask); + // create and exchange at aRetVal + delete aRetVal.set(new BitmapEx(aContent, aMask)); } - return *pRetVal; + return aRetVal.get() ? *aRetVal.get() : BitmapEx(); } // #i99123# diff --git a/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx index 0cad266f69d1..748270c36977 100644 --- a/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx @@ -116,7 +116,6 @@ namespace drawinglayer mnLastPageNumber(0), mnLastPageCount(0), maLastTextBackgroundColor(), - mbLastSpellCheck(false), mbContainsPageField(false), mbContainsPageCountField(false), mbContainsOtherFields(false) @@ -137,7 +136,13 @@ namespace drawinglayer { const SdrTextPrimitive2D& rCompare = (SdrTextPrimitive2D&)rPrimitive; - return (getOutlinerParaObject() == rCompare.getOutlinerParaObject()); + return ( + + // compare OPO and content, but not WrongList + getOutlinerParaObject() == rCompare.getOutlinerParaObject() + + // also compare WrongList (not-persistent data, but visualized) + && getOutlinerParaObject().isWrongListEqual(rCompare.getOutlinerParaObject())); } return false; @@ -145,9 +150,6 @@ namespace drawinglayer Primitive2DSequence SdrTextPrimitive2D::get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const { - const bool bCurrentSpellCheck(getSdrText() - ? getSdrText()->GetObject().impCheckSpellCheckForDecomposeTextPrimitive() - : false); uno::Reference< drawing::XDrawPage > xCurrentlyVisualizingPage; bool bCurrentlyVisualizingPageIsSet(false); Color aNewTextBackgroundColor; @@ -157,10 +159,10 @@ namespace drawinglayer if(getLocalDecomposition().hasElements()) { - bool bDoDelete(getLastSpellCheck() != bCurrentSpellCheck); + bool bDoDelete(false); // check visualized page - if(!bDoDelete && (mbContainsPageField || mbContainsPageCountField || mbContainsOtherFields)) + if(mbContainsPageField || mbContainsPageCountField || mbContainsOtherFields) { // get visualized page and remember xCurrentlyVisualizingPage = rViewInformation.getVisualizedPage(); @@ -236,7 +238,6 @@ namespace drawinglayer aNewTextBackgroundColor = rDrawOutliner.GetBackgroundColor(); } - const_cast< SdrTextPrimitive2D* >(this)->setLastSpellCheck(bCurrentSpellCheck); const_cast< SdrTextPrimitive2D* >(this)->mxLastVisualizingPage = xCurrentlyVisualizingPage; const_cast< SdrTextPrimitive2D* >(this)->mnLastPageNumber = nCurrentlyValidPageNumber; const_cast< SdrTextPrimitive2D* >(this)->mnLastPageCount = nCurrentlyValidPageCount; @@ -258,15 +259,7 @@ namespace drawinglayer Primitive2DSequence SdrContourTextPrimitive2D::createLocalDecomposition(const geometry::ViewInformation2D& aViewInformation) const { Primitive2DSequence aRetval; - const bool bCurrentSpellCheck(getSdrText() - ? getSdrText()->GetObject().impDecomposeContourTextPrimitive(aRetval, *this, aViewInformation) - : false); - - if(getLastSpellCheck() != bCurrentSpellCheck) - { - // remember last spell check state; this is part of the decomposition source data definition - const_cast< SdrContourTextPrimitive2D* >(this)->setLastSpellCheck(bCurrentSpellCheck); - } + getSdrText()->GetObject().impDecomposeContourTextPrimitive(aRetval, *this, aViewInformation); return encapsulateWithTextHierarchyBlockPrimitive2D(aRetval); } @@ -319,15 +312,7 @@ namespace drawinglayer Primitive2DSequence SdrPathTextPrimitive2D::createLocalDecomposition(const geometry::ViewInformation2D& aViewInformation) const { Primitive2DSequence aRetval; - const bool bCurrentSpellCheck(getSdrText() - ? getSdrText()->GetObject().impDecomposePathTextPrimitive(aRetval, *this, aViewInformation) - : false); - - if(getLastSpellCheck() != bCurrentSpellCheck) - { - // remember last spell check state; this is part of the decomposition source data definition - const_cast< SdrPathTextPrimitive2D* >(this)->setLastSpellCheck(bCurrentSpellCheck); - } + getSdrText()->GetObject().impDecomposePathTextPrimitive(aRetval, *this, aViewInformation); return encapsulateWithTextHierarchyBlockPrimitive2D(aRetval); } @@ -383,15 +368,7 @@ namespace drawinglayer Primitive2DSequence SdrBlockTextPrimitive2D::createLocalDecomposition(const geometry::ViewInformation2D& aViewInformation) const { Primitive2DSequence aRetval; - const bool bCurrentSpellCheck(getSdrText() - ? getSdrText()->GetObject().impDecomposeBlockTextPrimitive(aRetval, *this, aViewInformation) - : false); - - if(getLastSpellCheck() != bCurrentSpellCheck) - { - // remember last spell check state; this is part of the decomposition source data definition - const_cast< SdrBlockTextPrimitive2D* >(this)->setLastSpellCheck(bCurrentSpellCheck); - } + getSdrText()->GetObject().impDecomposeBlockTextPrimitive(aRetval, *this, aViewInformation); return encapsulateWithTextHierarchyBlockPrimitive2D(aRetval); } @@ -400,11 +377,17 @@ namespace drawinglayer const SdrText* pSdrText, const OutlinerParaObject& rOutlinerParaObject, const basegfx::B2DHomMatrix& rTextRangeTransform, + SdrTextHorzAdjust aSdrTextHorzAdjust, + SdrTextVertAdjust aSdrTextVertAdjust, + bool bFixedCellHeight, bool bUnlimitedPage, bool bCellText, bool bWordWrap) : SdrTextPrimitive2D(pSdrText, rOutlinerParaObject), maTextRangeTransform(rTextRangeTransform), + maSdrTextHorzAdjust(aSdrTextHorzAdjust), + maSdrTextVertAdjust(aSdrTextVertAdjust), + mbFixedCellHeight(bFixedCellHeight), mbUnlimitedPage(bUnlimitedPage), mbCellText(bCellText), mbWordWrap(bWordWrap) @@ -418,6 +401,9 @@ namespace drawinglayer const SdrBlockTextPrimitive2D& rCompare = (SdrBlockTextPrimitive2D&)rPrimitive; return (getTextRangeTransform() == rCompare.getTextRangeTransform() + && getSdrTextHorzAdjust() == rCompare.getSdrTextHorzAdjust() + && getSdrTextVertAdjust() == rCompare.getSdrTextVertAdjust() + && isFixedCellHeight() == rCompare.isFixedCellHeight() && getUnlimitedPage() == rCompare.getUnlimitedPage() && getCellText() == rCompare.getCellText() && getWordWrap() == rCompare.getWordWrap()); @@ -432,6 +418,9 @@ namespace drawinglayer getSdrText(), getOutlinerParaObject(), rTransform * getTextRangeTransform(), + getSdrTextHorzAdjust(), + getSdrTextVertAdjust(), + isFixedCellHeight(), getUnlimitedPage(), getCellText(), getWordWrap()); @@ -452,15 +441,7 @@ namespace drawinglayer Primitive2DSequence SdrStretchTextPrimitive2D::createLocalDecomposition(const geometry::ViewInformation2D& aViewInformation) const { Primitive2DSequence aRetval; - const bool bCurrentSpellCheck(getSdrText() - ? getSdrText()->GetObject().impDecomposeStretchTextPrimitive(aRetval, *this, aViewInformation) - : false); - - if(getLastSpellCheck() != bCurrentSpellCheck) - { - // remember last spell check state; this is part of the decomposition source data definition - const_cast< SdrStretchTextPrimitive2D* >(this)->setLastSpellCheck(bCurrentSpellCheck); - } + getSdrText()->GetObject().impDecomposeStretchTextPrimitive(aRetval, *this, aViewInformation); return encapsulateWithTextHierarchyBlockPrimitive2D(aRetval); } @@ -468,9 +449,11 @@ namespace drawinglayer SdrStretchTextPrimitive2D::SdrStretchTextPrimitive2D( const SdrText* pSdrText, const OutlinerParaObject& rOutlinerParaObject, - const basegfx::B2DHomMatrix& rTextRangeTransform) + const basegfx::B2DHomMatrix& rTextRangeTransform, + bool bFixedCellHeight) : SdrTextPrimitive2D(pSdrText, rOutlinerParaObject), - maTextRangeTransform(rTextRangeTransform) + maTextRangeTransform(rTextRangeTransform), + mbFixedCellHeight(bFixedCellHeight) { } @@ -480,7 +463,8 @@ namespace drawinglayer { const SdrStretchTextPrimitive2D& rCompare = (SdrStretchTextPrimitive2D&)rPrimitive; - return (getTextRangeTransform() == rCompare.getTextRangeTransform()); + return (getTextRangeTransform() == rCompare.getTextRangeTransform() + && isFixedCellHeight() == rCompare.isFixedCellHeight()); } return false; @@ -491,7 +475,8 @@ namespace drawinglayer return new SdrStretchTextPrimitive2D( getSdrText(), getOutlinerParaObject(), - rTransform * getTextRangeTransform()); + rTransform * getTextRangeTransform(), + isFixedCellHeight()); } // provide unique ID diff --git a/svx/source/svdraw/svdcrtv.cxx b/svx/source/svdraw/svdcrtv.cxx index 341ce6dd90c0..6773b8edf6f5 100644 --- a/svx/source/svdraw/svdcrtv.cxx +++ b/svx/source/svdraw/svdcrtv.cxx @@ -831,7 +831,11 @@ void SdrCreateView::ShowCreateObj(/*OutputDevice* pOut, BOOL bFull*/) if(pCircObj && OBJ_CIRC != pCircObj->GetObjIdentifier()) { - bUseSolidDragging = false; + // #i103058# Allow SolidDragging with four points + if(aDragStat.GetPointAnz() < 4) + { + bUseSolidDragging = false; + } } } diff --git a/svx/source/svdraw/svddrgmt.cxx b/svx/source/svdraw/svddrgmt.cxx index e427e42d80ab..eb6412b20259 100644 --- a/svx/source/svdraw/svddrgmt.cxx +++ b/svx/source/svdraw/svddrgmt.cxx @@ -1135,11 +1135,20 @@ void SdrDragObjOwn::createSdrDragEntries() void SdrDragObjOwn::TakeSdrDragComment(XubString& rStr) const { - const SdrObject* pObj = GetDragObj(); - - if(pObj) + // #i103058# get info string from the clone preferred, the original will + // not be changed. For security, use original as fallback + if(mpClone) { - rStr = pObj->getSpecialDragComment(DragStat()); + rStr = mpClone->getSpecialDragComment(DragStat()); + } + else + { + const SdrObject* pObj = GetDragObj(); + + if(pObj) + { + rStr = pObj->getSpecialDragComment(DragStat()); + } } } diff --git a/svx/source/svdraw/svdhdl.cxx b/svx/source/svdraw/svdhdl.cxx index 727e7f0bafcc..936c073f6e84 100644 --- a/svx/source/svdraw/svdhdl.cxx +++ b/svx/source/svdraw/svdhdl.cxx @@ -68,6 +68,7 @@ #include #include #include +#include //////////////////////////////////////////////////////////////////////////////////////////////////// // #i15222# @@ -275,9 +276,23 @@ const BitmapEx& SdrHdlBitmapSet::GetBitmapEx(BitmapMarkerKind eKindOfMarker, UIN //////////////////////////////////////////////////////////////////////////////////////////////////// -SdrHdlBitmapSet* SdrHdl::pSimpleSet = NULL; -SdrHdlBitmapSet* SdrHdl::pModernSet = NULL; -SdrHdlBitmapSet* SdrHdl::pHighContrastSet = NULL; +SdrHdlBitmapSet& getSimpleSet() +{ + static vcl::DeleteOnDeinit< SdrHdlBitmapSet > aSimpleSet(new SdrHdlBitmapSet(SIP_SA_MARKERS)); + return *aSimpleSet.get(); +} + +SdrHdlBitmapSet& getModernSet() +{ + static vcl::DeleteOnDeinit< SdrHdlBitmapSet > aModernSet(new SdrHdlBitmapSet(SIP_SA_MARKERS)); + return *aModernSet.get(); +} + +SdrHdlBitmapSet& getHighContrastSet() +{ + static vcl::DeleteOnDeinit< SdrHdlBitmapSet > aHighContrastSet(new SdrHdlBitmapSet(SIP_SA_MARKERS)); + return *aHighContrastSet.get(); +} //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -296,18 +311,6 @@ SdrHdl::SdrHdl(): bPlusHdl(FALSE), mbMoveOutside(false) { - if(!pSimpleSet) - pSimpleSet = new SdrHdlBitmapSet(SIP_SA_MARKERS); - DBG_ASSERT(pSimpleSet, "Could not construct SdrHdlBitmapSet()!"); - - if(!pModernSet) - pModernSet = new SdrHdlBitmapSet(SIP_SA_FINE_MARKERS); - DBG_ASSERT(pModernSet, "Could not construct SdrHdlBitmapSet()!"); - - // #101928# - if(!pHighContrastSet) - pHighContrastSet = new SdrHdlBitmapSet(SIP_SA_ACCESSIBILITY_MARKERS); - DBG_ASSERT(pHighContrastSet, "Could not construct SdrHdlBitmapSet()!"); } SdrHdl::SdrHdl(const Point& rPnt, SdrHdlKind eNewKind): @@ -326,18 +329,6 @@ SdrHdl::SdrHdl(const Point& rPnt, SdrHdlKind eNewKind): bPlusHdl(FALSE), mbMoveOutside(false) { - if(!pSimpleSet) - pSimpleSet = new SdrHdlBitmapSet(SIP_SA_MARKERS); - DBG_ASSERT(pSimpleSet, "Could not construct SdrHdlBitmapSet()!"); - - if(!pModernSet) - pModernSet = new SdrHdlBitmapSet(SIP_SA_FINE_MARKERS); - DBG_ASSERT(pModernSet, "Could not construct SdrHdlBitmapSet()!"); - - // #101928# - if(!pHighContrastSet) - pHighContrastSet = new SdrHdlBitmapSet(SIP_SA_ACCESSIBILITY_MARKERS); - DBG_ASSERT(pHighContrastSet, "Could not construct SdrHdlBitmapSet()!"); } SdrHdl::~SdrHdl() @@ -670,17 +661,17 @@ BitmapEx SdrHdl::ImpGetBitmapEx(BitmapMarkerKind eKindOfMarker, sal_uInt16 nInd, { if(bIsHighContrast) { - return pHighContrastSet->GetBitmapEx(eKindOfMarker, nInd); + return getHighContrastSet().GetBitmapEx(eKindOfMarker, nInd); } else { if(bFine) { - return pModernSet->GetBitmapEx(eKindOfMarker, nInd); + return getModernSet().GetBitmapEx(eKindOfMarker, nInd); } else { - return pSimpleSet->GetBitmapEx(eKindOfMarker, nInd); + return getSimpleSet().GetBitmapEx(eKindOfMarker, nInd); } } } diff --git a/svx/source/svdraw/svdocapt.cxx b/svx/source/svdraw/svdocapt.cxx index 7d41191c99a9..102b5b1eb824 100644 --- a/svx/source/svdraw/svdocapt.cxx +++ b/svx/source/svdraw/svdocapt.cxx @@ -401,26 +401,35 @@ bool SdrCaptionObj::applySpecialDrag(SdrDragStat& rDrag) String SdrCaptionObj::getSpecialDragComment(const SdrDragStat& rDrag) const { - const SdrHdl* pHdl = rDrag.GetHdl(); + const bool bCreateComment(rDrag.GetView() && this == rDrag.GetView()->GetCreateObj()); - if(pHdl && 0 == pHdl->GetPolyNum()) + if(bCreateComment) { - return SdrRectObj::getSpecialDragComment(rDrag); + return String(); } else { - XubString aStr; + const SdrHdl* pHdl = rDrag.GetHdl(); - if(!pHdl) + if(pHdl && 0 == pHdl->GetPolyNum()) { - ImpTakeDescriptionStr(STR_DragCaptFram, aStr); + return SdrRectObj::getSpecialDragComment(rDrag); } else { - ImpTakeDescriptionStr(STR_DragCaptTail, aStr); - } + XubString aStr; + + if(!pHdl) + { + ImpTakeDescriptionStr(STR_DragCaptFram, aStr); + } + else + { + ImpTakeDescriptionStr(STR_DragCaptTail, aStr); + } - return aStr; + return aStr; + } } } diff --git a/svx/source/svdraw/svdocirc.cxx b/svx/source/svdraw/svdocirc.cxx index 6af31224ee45..b3175566d561 100644 --- a/svx/source/svdraw/svdocirc.cxx +++ b/svx/source/svdraw/svdocirc.cxx @@ -589,23 +589,56 @@ bool SdrCircObj::applySpecialDrag(SdrDragStat& rDrag) String SdrCircObj::getSpecialDragComment(const SdrDragStat& rDrag) const { - const bool bWink(rDrag.GetHdl() && HDL_CIRC == rDrag.GetHdl()->GetKind()); + const bool bCreateComment(rDrag.GetView() && this == rDrag.GetView()->GetCreateObj()); - if(bWink) + if(bCreateComment) { XubString aStr; - const sal_Int32 nWink(1 == rDrag.GetHdl()->GetPointNum() ? nStartWink : nEndWink); + ImpTakeDescriptionStr(STR_ViewCreateObj, aStr); + const sal_uInt32 nPntAnz(rDrag.GetPointAnz()); + + if(OBJ_CIRC != meCircleKind && nPntAnz > 2) + { + ImpCircUser* pU = (ImpCircUser*)rDrag.GetUser(); + sal_Int32 nWink; + + aStr.AppendAscii(" ("); + + if(3 == nPntAnz) + { + nWink = pU->nStart; + } + else + { + nWink = pU->nEnd; + } - ImpTakeDescriptionStr(STR_DragCircAngle, aStr); - aStr.AppendAscii(" ("); - aStr += GetWinkStr(nWink,FALSE); - aStr += sal_Unicode(')'); + aStr += GetWinkStr(nWink,FALSE); + aStr += sal_Unicode(')'); + } return aStr; } else { - return SdrTextObj::getSpecialDragComment(rDrag); + const bool bWink(rDrag.GetHdl() && HDL_CIRC == rDrag.GetHdl()->GetKind()); + + if(bWink) + { + XubString aStr; + const sal_Int32 nWink(1 == rDrag.GetHdl()->GetPointNum() ? nStartWink : nEndWink); + + ImpTakeDescriptionStr(STR_DragCircAngle, aStr); + aStr.AppendAscii(" ("); + aStr += GetWinkStr(nWink,FALSE); + aStr += sal_Unicode(')'); + + return aStr; + } + else + { + return SdrTextObj::getSpecialDragComment(rDrag); + } } } @@ -698,6 +731,14 @@ FASTBOOL SdrCircObj::MovCreate(SdrDragStat& rStat) SetBoundRectDirty(); bSnapRectDirty=TRUE; SetXPolyDirty(); + + // #i103058# push current angle settings to ItemSet to + // allow FullDrag visualisation + if(rStat.GetPointAnz() >= 4) + { + ImpSetCircInfoToAttr(); + } + return TRUE; } diff --git a/svx/source/svdraw/svdoedge.cxx b/svx/source/svdraw/svdoedge.cxx index abadbf094981..e55eeaae42b7 100644 --- a/svx/source/svdraw/svdoedge.cxx +++ b/svx/source/svdraw/svdoedge.cxx @@ -1920,11 +1920,21 @@ bool SdrEdgeObj::applySpecialDrag(SdrDragStat& rDragStat) return true; } -String SdrEdgeObj::getSpecialDragComment(const SdrDragStat& /*rDrag*/) const +String SdrEdgeObj::getSpecialDragComment(const SdrDragStat& rDrag) const { - XubString aStr; - ImpTakeDescriptionStr(STR_DragEdgeTail,aStr); - return aStr; + const bool bCreateComment(rDrag.GetView() && this == rDrag.GetView()->GetCreateObj()); + + if(bCreateComment) + { + return String(); + } + else + { + XubString aStr; + ImpTakeDescriptionStr(STR_DragEdgeTail, aStr); + + return aStr; + } } //////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/svx/source/svdraw/svdopath.cxx b/svx/source/svdraw/svdopath.cxx index 1e9c9b57c52d..f44efe3c5dfa 100644 --- a/svx/source/svdraw/svdopath.cxx +++ b/svx/source/svdraw/svdopath.cxx @@ -951,32 +951,86 @@ bool ImpPathForDragAndCreate::endPathDrag(SdrDragStat& rDrag) String ImpPathForDragAndCreate::getSpecialDragComment(const SdrDragStat& rDrag) const { - ImpSdrPathDragData* pDragData = mpSdrPathDragData; + XubString aStr; + const SdrHdl* pHdl = rDrag.GetHdl(); + const bool bCreateComment(rDrag.GetView() && &mrSdrPathObject == rDrag.GetView()->GetCreateObj()); - if(!pDragData) + if(bCreateComment && rDrag.GetUser()) { - // getSpecialDragComment is also used from create, so fallback to GetUser() - // when mpSdrPathDragData is not set - pDragData = (ImpSdrPathDragData*)rDrag.GetUser(); - } + // #i103058# re-add old creation comment mode + ImpPathCreateUser* pU = (ImpPathCreateUser*)rDrag.GetUser(); + const SdrObjKind eKindMerk(meObjectKind); + mrSdrPathObject.meKind = pU->eAktKind; + mrSdrPathObject.ImpTakeDescriptionStr(STR_ViewCreateObj, aStr); + mrSdrPathObject.meKind = eKindMerk; - if(!pDragData) - { - DBG_ERROR("ImpPathForDragAndCreate::MovDrag(): ImpSdrPathDragData ist ungueltig"); - return String(); - } + Point aPrev(rDrag.GetPrev()); + Point aNow(rDrag.GetNow()); - // Hier auch mal pDragData verwenden !!! - XubString aStr; + if(pU->bLine) + aNow = pU->aLineEnd; - const SdrHdl* pHdl = rDrag.GetHdl(); + aNow -= aPrev; + aStr.AppendAscii(" ("); - if(!mrSdrPathObject.GetModel() || !pHdl) + XubString aMetr; + + if(pU->bCircle) + { + mrSdrPathObject.GetModel()->TakeWinkStr(Abs(pU->nCircRelWink), aMetr); + aStr += aMetr; + aStr.AppendAscii(" r="); + mrSdrPathObject.GetModel()->TakeMetricStr(pU->nCircRadius, aMetr, TRUE); + aStr += aMetr; + } + + aStr.AppendAscii("dx="); + mrSdrPathObject.GetModel()->TakeMetricStr(aNow.X(), aMetr, TRUE); + aStr += aMetr; + + aStr.AppendAscii(" dy="); + mrSdrPathObject.GetModel()->TakeMetricStr(aNow.Y(), aMetr, TRUE); + aStr += aMetr; + + if(!IsFreeHand(meObjectKind)) + { + INT32 nLen(GetLen(aNow)); + aStr.AppendAscii(" l="); + mrSdrPathObject.GetModel()->TakeMetricStr(nLen, aMetr, TRUE); + aStr += aMetr; + + INT32 nWink(GetAngle(aNow)); + aStr += sal_Unicode(' '); + mrSdrPathObject.GetModel()->TakeWinkStr(nWink, aMetr); + aStr += aMetr; + } + + aStr += sal_Unicode(')'); + } + else if(!mrSdrPathObject.GetModel() || !pHdl) { + // #i103058# fallback when no model and/or Handle, both needed + // for else-path mrSdrPathObject.ImpTakeDescriptionStr(STR_DragPathObj, aStr); } else { + // #i103058# standard for modification; model and handle needed + ImpSdrPathDragData* pDragData = mpSdrPathDragData; + + if(!pDragData) + { + // getSpecialDragComment is also used from create, so fallback to GetUser() + // when mpSdrPathDragData is not set + pDragData = (ImpSdrPathDragData*)rDrag.GetUser(); + } + + if(!pDragData) + { + DBG_ERROR("ImpPathForDragAndCreate::MovDrag(): ImpSdrPathDragData ist ungueltig"); + return String(); + } + if(!pDragData->IsMultiPointDrag() && pDragData->bEliminate) { // Punkt von ... @@ -2150,12 +2204,26 @@ bool SdrPathObj::applySpecialDrag(SdrDragStat& rDrag) String SdrPathObj::getSpecialDragComment(const SdrDragStat& rDrag) const { String aRetval; - ImpPathForDragAndCreate aDragAndCreate(*((SdrPathObj*)this)); - bool bDidWork(aDragAndCreate.beginPathDrag((SdrDragStat&)rDrag)); - if(bDidWork) + if(mpDAC) { - aRetval = aDragAndCreate.getSpecialDragComment(rDrag); + // #i103058# also get a comment when in creation + const bool bCreateComment(rDrag.GetView() && this == rDrag.GetView()->GetCreateObj()); + + if(bCreateComment) + { + aRetval = mpDAC->getSpecialDragComment(rDrag); + } + } + else + { + ImpPathForDragAndCreate aDragAndCreate(*((SdrPathObj*)this)); + bool bDidWork(aDragAndCreate.beginPathDrag((SdrDragStat&)rDrag)); + + if(bDidWork) + { + aRetval = aDragAndCreate.getSpecialDragComment(rDrag); + } } return aRetval; diff --git a/svx/source/svdraw/svdorect.cxx b/svx/source/svdraw/svdorect.cxx index 837b75bcf849..7d69955ec441 100644 --- a/svx/source/svdraw/svdorect.cxx +++ b/svx/source/svdraw/svdorect.cxx @@ -419,33 +419,42 @@ bool SdrRectObj::applySpecialDrag(SdrDragStat& rDrag) String SdrRectObj::getSpecialDragComment(const SdrDragStat& rDrag) const { - const bool bRad(rDrag.GetHdl() && HDL_CIRC == rDrag.GetHdl()->GetKind()); + const bool bCreateComment(rDrag.GetView() && this == rDrag.GetView()->GetCreateObj()); - if(bRad) + if(bCreateComment) { - Point aPt(rDrag.GetNow()); + return String(); + } + else + { + const bool bRad(rDrag.GetHdl() && HDL_CIRC == rDrag.GetHdl()->GetKind()); - // -sin fuer Umkehrung - if(aGeo.nDrehWink) - RotatePoint(aPt, aRect.TopLeft(), -aGeo.nSin, aGeo.nCos); + if(bRad) + { + Point aPt(rDrag.GetNow()); - sal_Int32 nRad(aPt.X() - aRect.Left()); + // -sin fuer Umkehrung + if(aGeo.nDrehWink) + RotatePoint(aPt, aRect.TopLeft(), -aGeo.nSin, aGeo.nCos); - if(nRad < 0) - nRad = 0; + sal_Int32 nRad(aPt.X() - aRect.Left()); - XubString aStr; + if(nRad < 0) + nRad = 0; - ImpTakeDescriptionStr(STR_DragRectEckRad, aStr); - aStr.AppendAscii(" ("); - aStr += GetMetrStr(nRad); - aStr += sal_Unicode(')'); + XubString aStr; - return aStr; - } - else - { - return SdrTextObj::getSpecialDragComment(rDrag); + ImpTakeDescriptionStr(STR_DragRectEckRad, aStr); + aStr.AppendAscii(" ("); + aStr += GetMetrStr(nRad); + aStr += sal_Unicode(')'); + + return aStr; + } + else + { + return SdrTextObj::getSpecialDragComment(rDrag); + } } } diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx index 8ce4390ad6ac..93d3651e3f01 100644 --- a/svx/source/svdraw/svdotextdecomposition.cxx +++ b/svx/source/svdraw/svdotextdecomposition.cxx @@ -215,30 +215,23 @@ namespace { if(rInfo.mrText.Len() && rInfo.mnTextLen) { - basegfx::B2DVector aSize; - drawinglayer::primitive2d::FontAttributes aFontAttributes(drawinglayer::primitive2d::getFontAttributesFromVclFont( - aSize, - rInfo.mrFont, - rInfo.IsRTL(), - false)); + basegfx::B2DVector aFontScaling; + drawinglayer::primitive2d::FontAttributes aFontAttributes( + drawinglayer::primitive2d::getFontAttributesFromVclFont( + aFontScaling, + rInfo.mrFont, + rInfo.IsRTL(), + false)); basegfx::B2DHomMatrix aNewTransform; - // #i100489# need extra scale factor for DXArray which collects all scalings - // which are needed to get the DXArray to unit coordinates - double fDXArrayScaleFactor(aSize.getX()); - // add font scale to new transform - aNewTransform.scale(aSize.getX(), aSize.getY()); + aNewTransform.scale(aFontScaling.getX(), aFontScaling.getY()); // look for proportional font scaling, evtl scale accordingly if(100 != rInfo.mrFont.GetPropr()) { const double fFactor(rInfo.mrFont.GetPropr() / 100.0); aNewTransform.scale(fFactor, fFactor); - - // #i100489# proportional font scaling influences the DXArray, - // add to factor - fDXArrayScaleFactor *= fFactor; } // apply font rotate @@ -271,7 +264,7 @@ namespace } const double fEscapement(nEsc / -100.0); - aNewTransform.translate(0.0, fEscapement * aSize.getY()); + aNewTransform.translate(0.0, fEscapement * aFontScaling.getY()); } // apply transformA @@ -290,13 +283,11 @@ namespace if(!bDisableTextArray && rInfo.mpDXArray && rInfo.mnTextLen) { - // #i100489# use fDXArrayScaleFactor here - const double fScaleFactor(basegfx::fTools::equalZero(fDXArrayScaleFactor) ? 1.0 : 1.0 / fDXArrayScaleFactor); aDXArray.reserve(rInfo.mnTextLen); for(xub_StrLen a(0); a < rInfo.mnTextLen; a++) { - aDXArray.push_back((double)rInfo.mpDXArray[a] * fScaleFactor); + aDXArray.push_back((double)rInfo.mpDXArray[a]); } } @@ -472,6 +463,17 @@ namespace fEnd = fTextWidth - fEnd; } + // need to take FontScaling out of values; it's already part of + // aNewTransform and would be double applied + const double fFontScaleX(aFontScaling.getX()); + + if(!basegfx::fTools::equal(fFontScaleX, 1.0) + && !basegfx::fTools::equalZero(fFontScaleX)) + { + fStart /= fFontScaleX; + fEnd /= fFontScaleX; + } + maTextPortionPrimitives.push_back(new drawinglayer::primitive2d::WrongSpellPrimitive2D( aNewTransform, fStart, @@ -709,16 +711,7 @@ namespace ////////////////////////////////////////////////////////////////////////////// // primitive decompositions -bool SdrTextObj::impCheckSpellCheckForDecomposeTextPrimitive() const -{ - // #i102062# asked TL who killed this feature (CWS tl56). Obviously, there - // is no more support for EE_CNTRL_NOREDLINES anymore; redlining is always - // on nowadays. Unfortunately, not false, but true should be returned then. - // Trying if this is all... - return true; -} - -bool SdrTextObj::impDecomposeContourTextPrimitive( +void SdrTextObj::impDecomposeContourTextPrimitive( drawinglayer::primitive2d::Primitive2DSequence& rTarget, const drawinglayer::primitive2d::SdrContourTextPrimitive2D& rSdrContourTextPrimitive, const drawinglayer::geometry::ViewInformation2D& aViewInformation) const @@ -770,10 +763,9 @@ bool SdrTextObj::impDecomposeContourTextPrimitive( rOutliner.setVisualizedPage(0); rTarget = aConverter.getPrimitive2DSequence(); - return false; } -bool SdrTextObj::impDecomposeBlockTextPrimitive( +void SdrTextObj::impDecomposeBlockTextPrimitive( drawinglayer::primitive2d::Primitive2DSequence& rTarget, const drawinglayer::primitive2d::SdrBlockTextPrimitive2D& rSdrBlockTextPrimitive, const drawinglayer::geometry::ViewInformation2D& aViewInformation) const @@ -789,19 +781,15 @@ bool SdrTextObj::impDecomposeBlockTextPrimitive( // prepare outliner const bool bIsCell(rSdrBlockTextPrimitive.getCellText()); - const SfxItemSet& rTextItemSet = rSdrBlockTextPrimitive.getSdrText() - ? rSdrBlockTextPrimitive.getSdrText()->GetItemSet() - : GetObjectItemSet(); SdrOutliner& rOutliner = ImpGetDrawOutliner(); - SdrTextVertAdjust eVAdj = GetTextVerticalAdjust(rTextItemSet); - SdrTextHorzAdjust eHAdj = GetTextHorizontalAdjust(rTextItemSet); + SdrTextHorzAdjust eHAdj = rSdrBlockTextPrimitive.getSdrTextHorzAdjust(); + SdrTextVertAdjust eVAdj = rSdrBlockTextPrimitive.getSdrTextVertAdjust(); const sal_uInt32 nOriginalControlWord(rOutliner.GetControlWord()); const Size aNullSize; // set visualizing page at Outliner; needed e.g. for PageNumberField decomposition rOutliner.setVisualizedPage(GetSdrPageFromXDrawPage(aViewInformation.getVisualizedPage())); - - rOutliner.SetFixedCellHeight(((const SdrTextFixedCellHeightItem&)rTextItemSet.Get(SDRATTR_TEXT_USEFIXEDCELLHEIGHT)).GetValue()); + rOutliner.SetFixedCellHeight(rSdrBlockTextPrimitive.isFixedCellHeight()); rOutliner.SetControlWord(nOriginalControlWord|EE_CNTRL_AUTOPAGESIZE); rOutliner.SetMinAutoPaperSize(aNullSize); rOutliner.SetMaxAutoPaperSize(Size(1000000,1000000)); @@ -975,10 +963,9 @@ bool SdrTextObj::impDecomposeBlockTextPrimitive( rOutliner.setVisualizedPage(0); rTarget = aConverter.getPrimitive2DSequence(); - return false; } -bool SdrTextObj::impDecomposeStretchTextPrimitive( +void SdrTextObj::impDecomposeStretchTextPrimitive( drawinglayer::primitive2d::Primitive2DSequence& rTarget, const drawinglayer::primitive2d::SdrStretchTextPrimitive2D& rSdrStretchTextPrimitive, const drawinglayer::geometry::ViewInformation2D& aViewInformation) const @@ -995,13 +982,10 @@ bool SdrTextObj::impDecomposeStretchTextPrimitive( // prepare outliner SdrOutliner& rOutliner = ImpGetDrawOutliner(); const sal_uInt32 nOriginalControlWord(rOutliner.GetControlWord()); - const SfxItemSet& rTextItemSet = rSdrStretchTextPrimitive.getSdrText() - ? rSdrStretchTextPrimitive.getSdrText()->GetItemSet() - : GetObjectItemSet(); const Size aNullSize; rOutliner.SetControlWord(nOriginalControlWord|EE_CNTRL_STRETCHING|EE_CNTRL_AUTOPAGESIZE); - rOutliner.SetFixedCellHeight(((const SdrTextFixedCellHeightItem&)rTextItemSet.Get(SDRATTR_TEXT_USEFIXEDCELLHEIGHT)).GetValue()); + rOutliner.SetFixedCellHeight(rSdrStretchTextPrimitive.isFixedCellHeight()); rOutliner.SetMinAutoPaperSize(aNullSize); rOutliner.SetMaxAutoPaperSize(Size(1000000,1000000)); rOutliner.SetPaperSize(aNullSize); @@ -1059,7 +1043,6 @@ bool SdrTextObj::impDecomposeStretchTextPrimitive( rOutliner.setVisualizedPage(0); rTarget = aConverter.getPrimitive2DSequence(); - return false; } ////////////////////////////////////////////////////////////////////////////// diff --git a/svx/source/svdraw/svdotextpathdecomposition.cxx b/svx/source/svdraw/svdotextpathdecomposition.cxx index f3bdeeb4811c..f6a30d40b3d5 100644 --- a/svx/source/svdraw/svdotextpathdecomposition.cxx +++ b/svx/source/svdraw/svdotextpathdecomposition.cxx @@ -365,12 +365,13 @@ namespace for(sal_uInt32 a(0L); a < rTextPortions.size() && fPolyStart < fPolyEnd; a++) { const impPathTextPortion* pCandidate = rTextPortions[a]; - basegfx::B2DVector aSize; - const drawinglayer::primitive2d::FontAttributes aCandidateFontAttributes(drawinglayer::primitive2d::getFontAttributesFromVclFont( - aSize, - pCandidate->getFont(), - pCandidate->isRTL(), - false)); + basegfx::B2DVector aFontScaling; + const drawinglayer::primitive2d::FontAttributes aCandidateFontAttributes( + drawinglayer::primitive2d::getFontAttributesFromVclFont( + aFontScaling, + pCandidate->getFont(), + pCandidate->isRTL(), + false)); if(pCandidate && pCandidate->getTextLength()) { @@ -397,7 +398,7 @@ namespace basegfx::B2DPoint aEndPos(aStartPos); // add font scaling - aNewTransformA.scale(aSize.getX(), aSize.getY()); + aNewTransformA.scale(aFontScaling.getX(), aFontScaling.getY()); // prepare scaling of text primitive if(XFT_AUTOSIZE == mrSdrFormTextAttribute.getFormTextAdjust()) @@ -512,15 +513,16 @@ namespace pCandidate->getDoubleDXArray().begin() + nPortionIndex, pCandidate->getDoubleDXArray().begin() + nPortionIndex + nNextGlyphLen); - drawinglayer::primitive2d::TextSimplePortionPrimitive2D* pNew = new drawinglayer::primitive2d::TextSimplePortionPrimitive2D( - aNewTransformB * aNewShadowTransform * aNewTransformA, - pCandidate->getText(), - nPortionIndex, - nNextGlyphLen, - aNewDXArray, - aCandidateFontAttributes, - pCandidate->getLocale(), - aRGBShadowColor); + drawinglayer::primitive2d::TextSimplePortionPrimitive2D* pNew = + new drawinglayer::primitive2d::TextSimplePortionPrimitive2D( + aNewTransformB * aNewShadowTransform * aNewTransformA, + pCandidate->getText(), + nPortionIndex, + nNextGlyphLen, + aNewDXArray, + aCandidateFontAttributes, + pCandidate->getLocale(), + aRGBShadowColor); mrShadowDecomposition.push_back(pNew); } @@ -536,15 +538,16 @@ namespace pCandidate->getDoubleDXArray().begin() + nPortionIndex, pCandidate->getDoubleDXArray().begin() + nPortionIndex + nNextGlyphLen); - drawinglayer::primitive2d::TextSimplePortionPrimitive2D* pNew = new drawinglayer::primitive2d::TextSimplePortionPrimitive2D( - aNewTransformB * aNewTransformA, - pCandidate->getText(), - nPortionIndex, - nNextGlyphLen, - aNewDXArray, - aCandidateFontAttributes, - pCandidate->getLocale(), - aRGBColor); + drawinglayer::primitive2d::TextSimplePortionPrimitive2D* pNew = + new drawinglayer::primitive2d::TextSimplePortionPrimitive2D( + aNewTransformB * aNewTransformA, + pCandidate->getText(), + nPortionIndex, + nNextGlyphLen, + aNewDXArray, + aCandidateFontAttributes, + pCandidate->getLocale(), + aRGBColor); mrDecomposition.push_back(pNew); } @@ -671,7 +674,7 @@ namespace ////////////////////////////////////////////////////////////////////////////// // primitive decomposition -bool SdrTextObj::impDecomposePathTextPrimitive( +void SdrTextObj::impDecomposePathTextPrimitive( drawinglayer::primitive2d::Primitive2DSequence& rTarget, const drawinglayer::primitive2d::SdrPathTextPrimitive2D& rSdrPathTextPrimitive, const drawinglayer::geometry::ViewInformation2D& aViewInformation) const @@ -789,8 +792,6 @@ bool SdrTextObj::impDecomposePathTextPrimitive( // concatenate all results drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(rTarget, aRetvalA); drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(rTarget, aRetvalB); - - return false; } ////////////////////////////////////////////////////////////////////////////// -- cgit From 79a0747e1d7bd867e5cad9ce76fd98669489c9db Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Thu, 17 Sep 2009 11:26:03 +0000 Subject: CWS-TOOLING: integrate CWS defaultdoclang 2009-08-21 14:44:21 +0200 cmc r275260 : CWS-TOOLING: rebase CWS defaultdoclang to trunk@275001 (milestone: DEV300:m55) 2009-08-10 17:43:32 +0200 cmc r274833 : CWS-TOOLING: rebase CWS defaultdoclang to trunk@274622 (milestone: DEV300:m54) 2009-07-24 11:46:58 +0200 cmc r274297 : CWS-TOOLING: rebase CWS defaultdoclang to trunk@274203 (milestone: DEV300:m53) 2009-07-10 12:22:16 +0200 cmc r273884 : #i99577# tweak the widths a bit 2009-07-08 15:17:58 +0200 cmc r273834 : #i99577 tidy up indentation 2009-07-04 16:09:18 +0200 cmc r273721 : #i99577# a "default" document language that reflects what the locale language is --- svx/inc/svx/langbox.hxx | 2 ++ svx/source/cui/optgdlg.cxx | 74 +++++++++++++++++++++++++++++++------------ svx/source/cui/optgdlg.src | 46 +++++++++++++-------------- svx/source/dialog/langbox.cxx | 28 ++++++++++++++-- 4 files changed, 105 insertions(+), 45 deletions(-) (limited to 'svx') diff --git a/svx/inc/svx/langbox.hxx b/svx/inc/svx/langbox.hxx index 8aebc88e380e..476d78c53d03 100644 --- a/svx/inc/svx/langbox.hxx +++ b/svx/inc/svx/langbox.hxx @@ -78,6 +78,7 @@ private: SVX_DLLPRIVATE void Init(); SVX_DLLPRIVATE USHORT ImplInsertImgEntry( const String& rEntry, USHORT nPos, bool bChecked ); + SVX_DLLPRIVATE USHORT ImplInsertLanguage(LanguageType, USHORT, sal_Int16 ); public: SvxLanguageBox( Window* pParent, WinBits nWinStyle, BOOL bCheck = FALSE); @@ -89,6 +90,7 @@ public: BOOL bCheckSpellAvail = FALSE ); USHORT InsertLanguage( const LanguageType eLangType, USHORT nPos = LISTBOX_APPEND ); + USHORT InsertDefaultLanguage( sal_Int16 nType, USHORT nPos = LISTBOX_APPEND ); USHORT InsertLanguage( const LanguageType eLangType, BOOL bCheckEntry, USHORT nPos = LISTBOX_APPEND ); void RemoveLanguage( const LanguageType eLangType ); diff --git a/svx/source/cui/optgdlg.cxx b/svx/source/cui/optgdlg.cxx index 31fcff220f8a..9a53de6bea72 100644 --- a/svx/source/cui/optgdlg.cxx +++ b/svx/source/cui/optgdlg.cxx @@ -103,6 +103,7 @@ #include #include #include +#include #include @@ -1277,8 +1278,13 @@ OfaLanguagesTabPage::OfaLanguagesTabPage( Window* pParent, const SfxItemSet& rSe // initialize user interface language selection SvtLanguageTable* pLanguageTable = new SvtLanguageTable; - String aStr( pLanguageTable->GetString( LANGUAGE_SYSTEM ) ); - aUserInterfaceLB.InsertEntry(aStr); + const String aStr( pLanguageTable->GetString( LANGUAGE_SYSTEM ) ); + + String aUILang(aStr); + aUILang += String::CreateFromAscii(" - "); + aUILang += pLanguageTable->GetString( Application::GetSettings().GetUILanguage() ); + + aUserInterfaceLB.InsertEntry(aUILang); aUserInterfaceLB.SetEntryData(0, 0); aUserInterfaceLB.SelectEntryPos(0); try @@ -1340,16 +1346,24 @@ OfaLanguagesTabPage::OfaLanguagesTabPage( Window* pParent, const SfxItemSet& rSe } aWesternLanguageLB.SetLanguageList( LANG_LIST_WESTERN | LANG_LIST_ONLY_KNOWN, TRUE, FALSE, TRUE ); - aAsianLanguageLB .SetLanguageList( LANG_LIST_CJK | LANG_LIST_ONLY_KNOWN, TRUE, FALSE, TRUE ); + aWesternLanguageLB.InsertDefaultLanguage( ::com::sun::star::i18n::ScriptType::LATIN ); + aAsianLanguageLB.SetLanguageList( LANG_LIST_CJK | LANG_LIST_ONLY_KNOWN, TRUE, FALSE, TRUE ); + aAsianLanguageLB.InsertDefaultLanguage( ::com::sun::star::i18n::ScriptType::ASIAN ); aComplexLanguageLB.SetLanguageList( LANG_LIST_CTL | LANG_LIST_ONLY_KNOWN, TRUE, FALSE, TRUE ); - aLocaleSettingLB .SetLanguageList( LANG_LIST_ALL | LANG_LIST_ONLY_KNOWN, FALSE, FALSE, FALSE); - aLocaleSettingLB.InsertLanguage( LANGUAGE_SYSTEM ); + aComplexLanguageLB.InsertDefaultLanguage( ::com::sun::star::i18n::ScriptType::COMPLEX ); - // insert SYSTEM entry, no specific currency - aCurrencyLB.InsertEntry( aStr ); + aLocaleSettingLB.SetLanguageList( LANG_LIST_ALL | LANG_LIST_ONLY_KNOWN, FALSE, FALSE, FALSE); + aLocaleSettingLB.InsertDefaultLanguage( ::com::sun::star::i18n::ScriptType::WEAK ); + + const NfCurrencyTable& rCurrTab = SvNumberFormatter::GetTheCurrencyTable(); + const NfCurrencyEntry& rCurr = SvNumberFormatter::GetCurrencyEntry( LANGUAGE_SYSTEM ); + // insert SYSTEM entry + String aDefaultCurr(aStr); + aDefaultCurr += String::CreateFromAscii(" - "); + aDefaultCurr += rCurr.GetBankSymbol(); + aCurrencyLB.InsertEntry( aDefaultCurr ); // all currencies String aTwoSpace( RTL_CONSTASCII_USTRINGPARAM( " " ) ); - const NfCurrencyTable& rCurrTab = SvNumberFormatter::GetTheCurrencyTable(); USHORT nCurrCount = rCurrTab.Count(); // first entry is SYSTEM, skip it for ( USHORT j=1; j < nCurrCount; ++j ) @@ -1572,7 +1586,7 @@ BOOL OfaLanguagesTabPage::FillItemSet( SfxItemSet& rSet ) if(!bCurrentDocCBChecked) { Any aValue; - Locale aLocale = SvxCreateLocale( eSelectLang ); + Locale aLocale = MsLangId::convertLanguageToLocale( eSelectLang, false ); aValue <<= aLocale; OUString aPropName( C2U("DefaultLocale") ); pLangConfig->aLinguConfig.SetProperty( aPropName, aValue ); @@ -1581,7 +1595,8 @@ BOOL OfaLanguagesTabPage::FillItemSet( SfxItemSet& rSet ) } if(pCurrentDocShell) { - rSet.Put(SvxLanguageItem(eSelectLang, SID_ATTR_LANGUAGE)); + rSet.Put(SvxLanguageItem(MsLangId::resolveSystemLanguageByScriptType(eSelectLang, ::com::sun::star::i18n::ScriptType::LATIN), + SID_ATTR_LANGUAGE)); bRet = TRUE; } } @@ -1592,7 +1607,7 @@ BOOL OfaLanguagesTabPage::FillItemSet( SfxItemSet& rSet ) if(!bCurrentDocCBChecked) { Any aValue; - Locale aLocale = SvxCreateLocale( eSelectLang ); + Locale aLocale = MsLangId::convertLanguageToLocale( eSelectLang, false ); aValue <<= aLocale; OUString aPropName( C2U("DefaultLocale_CJK") ); pLangConfig->aLinguConfig.SetProperty( aPropName, aValue ); @@ -1601,7 +1616,8 @@ BOOL OfaLanguagesTabPage::FillItemSet( SfxItemSet& rSet ) } if(pCurrentDocShell) { - rSet.Put(SvxLanguageItem(eSelectLang, SID_ATTR_CHAR_CJK_LANGUAGE)); + rSet.Put(SvxLanguageItem(MsLangId::resolveSystemLanguageByScriptType(eSelectLang, ::com::sun::star::i18n::ScriptType::ASIAN), + SID_ATTR_CHAR_CJK_LANGUAGE)); bRet = TRUE; } } @@ -1612,7 +1628,7 @@ BOOL OfaLanguagesTabPage::FillItemSet( SfxItemSet& rSet ) if(!bCurrentDocCBChecked) { Any aValue; - Locale aLocale = SvxCreateLocale( eSelectLang ); + Locale aLocale = MsLangId::convertLanguageToLocale( eSelectLang, false ); aValue <<= aLocale; OUString aPropName( C2U("DefaultLocale_CTL") ); pLangConfig->aLinguConfig.SetProperty( aPropName, aValue ); @@ -1621,7 +1637,8 @@ BOOL OfaLanguagesTabPage::FillItemSet( SfxItemSet& rSet ) } if(pCurrentDocShell) { - rSet.Put(SvxLanguageItem(eSelectLang, SID_ATTR_CHAR_CTL_LANGUAGE)); + rSet.Put(SvxLanguageItem(MsLangId::resolveSystemLanguageByScriptType(eSelectLang, ::com::sun::star::i18n::ScriptType::COMPLEX), + SID_ATTR_CHAR_CTL_LANGUAGE)); bRet = TRUE; } } @@ -1721,13 +1738,18 @@ void OfaLanguagesTabPage::Reset( const SfxItemSet& rSet ) aWestLang = pLangConfig->aLinguConfig.GetProperty(C2U("DefaultLocale")); Locale aLocale; aWestLang >>= aLocale; - eCurLang = SvxLocaleToLanguage( aLocale ); + + eCurLang = MsLangId::convertLocaleToLanguage( aLocale ); + aCJKLang = pLangConfig->aLinguConfig.GetProperty(C2U("DefaultLocale_CJK")); + aLocale = Locale(); aCJKLang >>= aLocale; - eCurLangCJK = SvxLocaleToLanguage( aLocale ); + eCurLangCJK = MsLangId::convertLocaleToLanguage( aLocale ); + aCTLLang = pLangConfig->aLinguConfig.GetProperty(C2U("DefaultLocale_CTL")); + aLocale = Locale(); aCTLLang >>= aLocale; - eCurLangCTL = SvxLocaleToLanguage( aLocale ); + eCurLangCTL = MsLangId::convertLocaleToLanguage( aLocale ); } catch(Exception&) { @@ -1739,13 +1761,25 @@ void OfaLanguagesTabPage::Reset( const SfxItemSet& rSet ) aCurrentDocCB.Check(bLanguageCurrentDoc_Impl); const SfxPoolItem* pLang; if( SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_LANGUAGE, FALSE, &pLang)) - eCurLang = ((const SvxLanguageItem*)pLang)->GetValue(); + { + LanguageType eTempCurLang = ((const SvxLanguageItem*)pLang)->GetValue(); + if (MsLangId::resolveSystemLanguageByScriptType(eCurLang, ::com::sun::star::i18n::ScriptType::LATIN) != eTempCurLang) + eCurLang = eTempCurLang; + } if( SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_CHAR_CJK_LANGUAGE, FALSE, &pLang)) - eCurLangCJK = ((const SvxLanguageItem*)pLang)->GetValue(); + { + LanguageType eTempCurLang = ((const SvxLanguageItem*)pLang)->GetValue(); + if (MsLangId::resolveSystemLanguageByScriptType(eCurLangCJK, ::com::sun::star::i18n::ScriptType::ASIAN) != eTempCurLang) + eCurLangCJK = eTempCurLang; + } if( SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_CHAR_CTL_LANGUAGE, FALSE, &pLang)) - eCurLangCTL = ((const SvxLanguageItem*)pLang)->GetValue(); + { + LanguageType eTempCurLang = ((const SvxLanguageItem*)pLang)->GetValue(); + if (MsLangId::resolveSystemLanguageByScriptType(eCurLangCTL, ::com::sun::star::i18n::ScriptType::COMPLEX) != eTempCurLang) + eCurLangCTL = eTempCurLang; + } } if(LANGUAGE_NONE == eCurLang || LANGUAGE_DONTKNOW == eCurLang) aWesternLanguageLB.SelectLanguage(LANGUAGE_NONE); diff --git a/svx/source/cui/optgdlg.src b/svx/source/cui/optgdlg.src index a711be6bf0fc..f663a7ed44ef 100644 --- a/svx/source/cui/optgdlg.src +++ b/svx/source/cui/optgdlg.src @@ -460,13 +460,13 @@ TabPage OFA_TP_LANGUAGES FixedText FT_USERINTERFACE { Pos = MAP_APPFONT ( 12 , 16 ) ; - Size = MAP_APPFONT ( 120 , 8 ) ; + Size = MAP_APPFONT ( 108 , 8 ) ; Text [ en-US ] = "~User interface"; }; ListBox LB_USERINTERFACE { - Pos = MAP_APPFONT ( 135 , 14 ) ; - Size = MAP_APPFONT ( 113 , 60 ) ; + Pos = MAP_APPFONT ( 123 , 14 ) ; + Size = MAP_APPFONT ( 125 , 60 ) ; DropDown = TRUE ; Border = TRUE ; TabStop = TRUE ; @@ -481,13 +481,13 @@ TabPage OFA_TP_LANGUAGES FixedText FT_LOCALESETTING { Pos = MAP_APPFONT ( 12 , 31 ) ; - Size = MAP_APPFONT ( 120 , 8 ) ; + Size = MAP_APPFONT ( 108 , 8 ) ; Text [ en-US ] = "Locale setting"; }; ListBox LB_LOCALESETTING { - Pos = MAP_APPFONT ( 135 , 30 ) ; - Size = MAP_APPFONT ( 113 , 60 ) ; + Pos = MAP_APPFONT ( 123 , 30 ) ; + Size = MAP_APPFONT ( 125 , 60 ) ; DropDown = TRUE ; Border = TRUE ; TabStop = TRUE ; @@ -496,13 +496,13 @@ TabPage OFA_TP_LANGUAGES FixedText FT_DECIMALSEPARATOR { Pos = MAP_APPFONT ( 12 , 46 ) ; - Size = MAP_APPFONT ( 120 , 8 ) ; + Size = MAP_APPFONT ( 108 , 8 ) ; Text [ en-US ] = "Decimal separator key"; }; CheckBox CB_DECIMALSEPARATOR { - Pos = MAP_APPFONT ( 135 , 46) ; - Size = MAP_APPFONT ( 119 , RSC_CD_CHECKBOX_HEIGHT ) ; + Pos = MAP_APPFONT ( 123 , 46) ; + Size = MAP_APPFONT ( 125 , RSC_CD_CHECKBOX_HEIGHT ) ; Text [ en-US ] = "~Same as locale setting ( %1 )"; }; FixedImage FI_CURRENCY @@ -514,13 +514,13 @@ TabPage OFA_TP_LANGUAGES FixedText FT_CURRENCY { Pos = MAP_APPFONT ( 12 , 61 ) ; - Size = MAP_APPFONT ( 120 , 8 ) ; + Size = MAP_APPFONT ( 108 , 8 ) ; Text [ en-US ] = "~Default currency"; }; ListBox LB_CURRENCY { - Pos = MAP_APPFONT ( 135 , 59 ) ; - Size = MAP_APPFONT ( 113 , 60 ) ; + Pos = MAP_APPFONT ( 123 , 59 ) ; + Size = MAP_APPFONT ( 125 , 60 ) ; DropDown = TRUE ; Border = TRUE ; TabStop = TRUE ; @@ -541,14 +541,14 @@ TabPage OFA_TP_LANGUAGES FixedText FT_WEST_LANG { Pos = MAP_APPFONT ( 12 , 90 ) ; - Size = MAP_APPFONT ( 120 , 8 ) ; + Size = MAP_APPFONT ( 108 , 8 ) ; Text [ en-US ] = "Western"; }; ListBox LB_WEST_LANG { - Pos = MAP_APPFONT ( 135 , 88 ) ; - Size = MAP_APPFONT ( 113 , 60 ) ; + Pos = MAP_APPFONT ( 123 , 88 ) ; + Size = MAP_APPFONT ( 125 , 60 ) ; DropDown = TRUE ; Border = TRUE ; TabStop = TRUE ; @@ -563,13 +563,13 @@ TabPage OFA_TP_LANGUAGES FixedText FT_ASIAN_LANG { Pos = MAP_APPFONT ( 12 , 106 ) ; - Size = MAP_APPFONT ( 120 , 8 ) ; + Size = MAP_APPFONT ( 108 , 8 ) ; Text [ en-US ] = "Asian"; }; ListBox LB_ASIAN_LANG { - Pos = MAP_APPFONT ( 135 , 104 ) ; - Size = MAP_APPFONT ( 113 , 60 ) ; + Pos = MAP_APPFONT ( 123 , 104 ) ; + Size = MAP_APPFONT ( 125 , 60 ) ; DropDown = TRUE ; Border = TRUE ; TabStop = TRUE ; @@ -584,13 +584,13 @@ TabPage OFA_TP_LANGUAGES FixedText FT_COMPLEX_LANG { Pos = MAP_APPFONT ( 12 , 122 ) ; - Size = MAP_APPFONT ( 120 , 8 ) ; + Size = MAP_APPFONT ( 108 , 8 ) ; Text [ en-US ] = "C~TL"; }; ListBox LB_COMPLEX_LANG { - Pos = MAP_APPFONT ( 135 , 120 ) ; - Size = MAP_APPFONT ( 113 , 60 ) ; + Pos = MAP_APPFONT ( 123 , 120 ) ; + Size = MAP_APPFONT ( 125 , 60 ) ; DropDown = TRUE ; Border = TRUE ; TabStop = TRUE ; @@ -598,8 +598,8 @@ TabPage OFA_TP_LANGUAGES }; CheckBox CB_CURRENT_DOC { - Pos = MAP_APPFONT ( 135 , 135 ) ; - Size = MAP_APPFONT ( 113 , RSC_CD_CHECKBOX_HEIGHT ) ; + Pos = MAP_APPFONT ( 123 , 135 ) ; + Size = MAP_APPFONT ( 125 , RSC_CD_CHECKBOX_HEIGHT ) ; Text [ en-US ] = "For the current document only"; }; FixedLine FL_ENHANCED diff --git a/svx/source/dialog/langbox.cxx b/svx/source/dialog/langbox.cxx index 16e04efeefbe..c196178a4d16 100644 --- a/svx/source/dialog/langbox.cxx +++ b/svx/source/dialog/langbox.cxx @@ -37,8 +37,9 @@ #include #endif #include +#include #include -#include +#include #include #include @@ -314,6 +315,13 @@ void SvxLanguageBox::SetLanguageList( INT16 nLangList, //------------------------------------------------------------------------ USHORT SvxLanguageBox::InsertLanguage( const LanguageType nLangType, USHORT nPos ) +{ + return ImplInsertLanguage( nLangType, nPos, ::com::sun::star::i18n::ScriptType::WEAK ); +} + +//------------------------------------------------------------------------ + +USHORT SvxLanguageBox::ImplInsertLanguage( const LanguageType nLangType, USHORT nPos, sal_Int16 nType ) { LanguageType nLang = MsLangId::getReplacementForObsoleteLanguage( nLangType); // For obsolete and to be replaced languages check whether an entry of the @@ -329,6 +337,15 @@ USHORT SvxLanguageBox::InsertLanguage( const LanguageType nLangType, USHORT nPos String aStrEntry = m_pLangTable->GetString( nLang ); if (LANGUAGE_NONE == nLang && m_bHasLangNone && m_bLangNoneIsLangAll) aStrEntry = m_aAllString; + + LanguageType nRealLang = nLang; + if (nRealLang == LANGUAGE_SYSTEM) + { + nRealLang = MsLangId::resolveSystemLanguageByScriptType(nRealLang, nType); + aStrEntry.AppendAscii(" - "); + aStrEntry.Append(m_pLangTable->GetString( nRealLang )); + } + aStrEntry = ApplyLreOrRleEmbedding( aStrEntry ); USHORT nAt = 0; @@ -343,7 +360,7 @@ USHORT SvxLanguageBox::InsertLanguage( const LanguageType nLangType, USHORT nPos m_pSpellUsedLang = new Sequence< INT16 >( xSpell->getLanguages() ); } bFound = m_pSpellUsedLang ? - lcl_SeqHasLang( *m_pSpellUsedLang, nLang ) : FALSE; + lcl_SeqHasLang( *m_pSpellUsedLang, nRealLang ) : FALSE; nAt = ImplInsertImgEntry( aStrEntry, nPos, bFound ); } @@ -356,6 +373,13 @@ USHORT SvxLanguageBox::InsertLanguage( const LanguageType nLangType, USHORT nPos //------------------------------------------------------------------------ +USHORT SvxLanguageBox::InsertDefaultLanguage( sal_Int16 nType, USHORT nPos ) +{ + return ImplInsertLanguage( LANGUAGE_SYSTEM, nPos, nType ); +} + +//------------------------------------------------------------------------ + USHORT SvxLanguageBox::InsertLanguage( const LanguageType nLangType, BOOL bCheckEntry, USHORT nPos ) { -- cgit From ac49eeddaf88a0002901b078ca64a7d6a4068c30 Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Thu, 17 Sep 2009 13:53:54 +0000 Subject: CWS-TOOLING: integrate CWS encsig09 2009-09-14 15:11:29 +0200 oc r276125 : #i105049# MacroSignatur needs Macro 2009-09-09 17:09:46 +0200 jl r276005 : #i103989# could not signe encrypted doc containing a formular object 2009-09-09 13:11:24 +0200 jl r275985 : #i103989# could not signe encrypted doc containing a formular object 2009-09-08 15:54:02 +0200 mav r275934 : #i103906# fix the automation test scenario ( tempfile should be writable for the user ) 2009-09-07 14:01:39 +0200 mav r275895 : #i103906# fix the problem with reload 2009-09-07 09:34:48 +0200 mav r275871 : #i104786# do the ODF version check only for ODF documents 2009-09-07 08:19:06 +0200 mav r275870 : #i104389# fix text 2009-09-06 22:24:21 +0200 mav r275867 : #i104786# check the consistency of ODF version 2009-09-06 22:23:24 +0200 mav r275866 : #i104786# check the consistency of ODF version 2009-09-06 22:23:00 +0200 mav r275865 : #i104786# check the consistency of ODF version 2009-09-06 22:22:36 +0200 mav r275864 : #i104786# check the consistency of ODF version 2009-09-06 22:22:03 +0200 mav r275863 : #i104786# check the consistency of ODF version 2009-09-02 17:09:30 +0200 mav r275722 : #i104715# let repairing mechanics use the streams correctly 2009-09-01 16:52:49 +0200 mav r275670 : #i104389# notify user not to trust the corrupted document 2009-09-01 16:31:37 +0200 mav r275668 : #i104389# use vnd.sun.star.zip: protocol to access zip files 2009-09-01 16:30:32 +0200 mav r275667 : #i104389# use vnd.sun.star.zip: protocol to access zip files 2009-09-01 16:22:13 +0200 jl r275666 : #i104339# small content change 2009-09-01 14:20:42 +0200 jl r275660 : #i103519# remove some debug output 2009-09-01 13:51:52 +0200 jl r275659 : #i103519# NSS uses '\' for escaping in distinguished names 2009-09-01 12:49:47 +0200 mav r275655 : #i104389# use zip-mode to read from jar files 2009-09-01 12:40:22 +0200 mav r275653 : #i104389# use zip-mode to read from jar files 2009-09-01 12:32:29 +0200 mav r275652 : #i104389# use constants 2009-08-31 21:58:00 +0200 mav r275637 : #i10000# fix warning 2009-08-31 21:11:17 +0200 mav r275636 : #i104227# adding of scripting signature removes the document signature 2009-08-31 20:55:05 +0200 mav r275635 : #i103905# ZipStorage supports Compressed property 2009-08-31 20:53:55 +0200 mav r275634 : #i103905# adjust macro signature transfer to usage of ZipStorage 2009-08-31 15:30:49 +0200 jl r275609 : #i103989# warning is shown as long the user does not click 'OK' 2009-08-31 14:36:10 +0200 jl r275608 : #i103989# changed warning text when signing macro and there is a document signature. This warning is only displayed once 2009-08-31 13:34:41 +0200 mav r275603 : #i104452# disable macros in repaired documents 2009-08-31 13:33:42 +0200 mav r275602 : #i104452# disable macros in repaired documents 2009-08-31 13:03:56 +0200 jl r275600 : #i45212# signature dialog could not be started when using read-only documents 2009-08-31 09:26:13 +0200 mav r275583 : #i104578# store the additional entry as the last one to workaround parsing problem in OOo3.1 and later 2009-08-30 20:54:25 +0200 mav r275562 : #i10000# adopt for unix 2009-08-30 10:56:00 +0200 mav r275561 : CWS-TOOLING: rebase CWS encsig09 to trunk@275331 (milestone: DEV300:m56) 2009-08-28 16:34:00 +0200 mav r275539 : #i104578# write necessary info in manifest.xml for ODF1.2 encrypted document 2009-08-28 14:04:22 +0200 mav r275533 : #104587# fix handling of readonly streams 2009-08-28 13:58:10 +0200 mav r275531 : #i104389# fix the broken document handling 2009-08-28 11:40:39 +0200 mav r275522 : #i104389# fix the signature streams check 2009-08-27 21:48:12 +0200 mav r275509 : #i103927# show the warning 2009-08-27 21:47:48 +0200 mav r275508 : #i103927# show the warning 2009-08-27 16:45:59 +0200 jl r275495 : #i45212# remove unused variable 2009-08-27 16:34:00 +0200 jl r275494 : #i103989# 2009-08-27 13:54:28 +0200 jl r275482 : #i103519# fixed replacement of 'S' by 'ST' 2009-08-27 12:32:21 +0200 mav r275472 : #i10000# fix warning 2009-08-27 11:58:11 +0200 mav r275467 : #i104389# handle the entry path correctly 2009-08-26 17:18:35 +0200 jl r275438 : #i103519# subject and issuer distinguished names were not properly displayed. The strings were obtained by system functions (Windows, NSS), which use quotes to escape the values, when they contain special characters 2009-08-26 11:00:20 +0200 mav r275403 : #i10000# fix warnings 2009-08-26 08:25:45 +0200 mav r275392 : #i10000# fix warning 2009-08-26 08:02:22 +0200 mav r275391 : #i10000# adopt for linux 2009-08-26 07:40:30 +0200 mav r275390 : #i10000# fix warning 2009-08-26 07:35:28 +0200 mav r275389 : #i10000# use correct include file name 2009-08-25 15:01:41 +0200 jl r275356 : #i103989# better check for mimetype of streams 2009-08-25 09:07:09 +0200 mav r275335 : CWS-TOOLING: rebase CWS encsig09 to trunk@274622 (milestone: DEV300:m54) 2009-08-24 18:17:02 +0200 mav r275329 : #i103927# check the nonencrypted streams 2009-08-24 18:14:14 +0200 mav r275328 : #i103927# check the nonencrypted streams 2009-08-24 17:59:34 +0200 mav r275327 : #i103927#,#i104389# check the package consistency and nonencrypted streams 2009-08-24 16:18:28 +0200 jl r275323 : #i103989# added comment 2009-08-24 13:08:47 +0200 jl r275305 : #i45212# #i66276# only write the X509Certificate element once and allow to add remove several certificates at a time 2009-08-21 12:57:28 +0200 ufi r275239 : 104339 2009-08-21 08:39:05 +0200 jl r275213 : #i10398# comparing URIs of signed files with the 'element list' 2009-08-20 13:39:47 +0200 jl r275178 : #i10398# displaying 'new partially signed' status in the status bar 2009-08-20 13:35:39 +0200 jl r275177 : #i10398# displaying 'new partially signed' status in the status bar 2009-08-20 13:29:06 +0200 jl r275176 : #i10398# displaying 'new partially signed' status in the status bar 2009-08-20 13:26:21 +0200 jl r275175 : #i10398# displaying 'new partially signed' status in the status bar 2009-08-20 12:05:09 +0200 ufi r275170 : i104339 2009-08-19 12:24:54 +0200 jl r275146 : #i10398# displaying 'old signature' icon and status in signature dialog 2009-08-18 15:18:48 +0200 jl r275111 : #i103989# document signatures containing manifest.xml are now validated according to the final ODF1.2 spec 2009-08-18 11:41:06 +0200 mav r275087 : #i103927# detect if encrypted ODF1.2 document contains nonencrypted streams 2009-08-18 11:35:13 +0200 mav r275085 : #i103927# detect if encrypted ODF1.2 document contains nonencrypted streams 2009-08-14 17:32:41 +0200 jl r274999 : #i103989# using c14n tranformation for XML streams 2009-08-14 15:27:43 +0200 jl r274987 : #i103989# remove special handling for encrypted document streams in UriBindingHelper::OpenInputStream, since we use zip storage this is not necessary anymore 2009-08-14 15:08:10 +0200 jl r274983 : #i103989# Showing a message when adding or removing a macro signature, that the document signature will be removed 2009-08-14 14:57:27 +0200 jl r274982 : #i103989# accesing Sequence at invalid index 2009-08-11 08:55:02 +0200 mav r274846 : #i103905# let signing service know if there is already a valid document signature 2009-08-10 11:33:37 +0200 jl r274799 : #i103905# do not truncate the stream 2009-08-10 10:43:47 +0200 mav r274797 : #i103905# provide the storage version 2009-08-07 16:58:46 +0200 jl r274780 : #i103989# 2009-08-07 16:56:19 +0200 jl r274779 : #i103989# using odf version string etc. 2009-08-07 15:20:53 +0200 mav r274771 : #i103905# provide the storage version 2009-08-07 15:19:12 +0200 mav r274770 : #i103905# provide the storage version 2009-08-07 12:41:45 +0200 mav r274758 : #103930# do not store thumbnail in case of encrypted document 2009-08-07 12:36:52 +0200 mav r274757 : #i103905# provide the storage version 2009-08-07 12:15:54 +0200 mav r274754 : #i103760# the signed state is not lost on saving 2009-08-07 12:06:19 +0200 mav r274753 : #i103760# avoid warning regarding signature removal on export 2009-08-07 12:06:01 +0200 mav r274752 : #i103760# avoid warning regarding signature removal on export 2009-08-06 08:47:34 +0200 mav r274703 : #i103905# allow to transport ODF version to the signing component 2009-08-05 21:34:42 +0200 mav r274701 : #i103905# allow to transport ODF version to the signing component 2009-08-05 15:48:17 +0200 mav r274683 : #i103905# allow to transport ODF version to the signing component 2009-08-05 14:58:12 +0200 jl r274673 : #i103989# documentsignature now signes all streams except documentsignatures.xml, all streams are processed as binary files 2009-08-05 12:00:32 +0200 mav r274648 : #i103905# allow to transport ODF version to the signing component 2009-08-04 10:57:04 +0200 jl r274612 : #i103989# added XInitialization 2009-07-31 10:32:27 +0200 mav r274516 : #i103905# use zip storage to sign documents 2009-07-30 14:01:33 +0200 mav r274489 : #i103906# optimize the usage of temporary medium 2009-07-30 14:00:28 +0200 mav r274488 : #i103906# optimize the usage of temporary medium 2009-07-30 13:59:09 +0200 mav r274487 : #i103906# optimize the usage of temporary medium 2009-07-30 13:50:44 +0200 mav r274485 : #i103906# optimize the usage of temporary medium 2009-07-30 13:49:53 +0200 mav r274484 : #i103906# optimize the usage of temporary medium 2009-07-30 13:49:13 +0200 mav r274483 : #i103906# optimize the usage of temporary medium 2009-07-30 13:47:09 +0200 mav r274482 : #i103905#,#i103906# let the signing process use zip-storage; optimize the usage of temporary medium 2009-07-21 09:10:31 +0200 mav r274159 : CWS-TOOLING: rebase CWS encsig09 to trunk@273468 (milestone: DEV300:m51) 2009-05-05 08:39:01 +0200 mav r271496 : #i100832# allow to sign macros only when there are any --- svx/inc/svx/dialogs.hrc | 1 + svx/source/stbctrls/stbctrls.src | 7 ++++++- svx/source/stbctrls/xmlsecctrl.cxx | 6 +++++- svx/source/svxlink/fileobj.cxx | 31 ------------------------------- svx/source/xml/xmlxtimp.cxx | 2 +- 5 files changed, 13 insertions(+), 34 deletions(-) (limited to 'svx') diff --git a/svx/inc/svx/dialogs.hrc b/svx/inc/svx/dialogs.hrc index 1d78c5e6396e..b21785855a96 100644 --- a/svx/inc/svx/dialogs.hrc +++ b/svx/inc/svx/dialogs.hrc @@ -600,6 +600,7 @@ #define RID_SVXSTR_XMLSEC_SIG_OK_NO_VERIFY (RID_SVX_START + 223) #define RID_SVXSTR_XMLSEC_SIG_NOT_OK (RID_SVX_START + 224) #define RID_SVXSTR_XMLSEC_NO_SIG (RID_SVX_START + 225) +#define RID_SVXSTR_XMLSEC_SIG_CERT_OK_PARTIAL_SIG (RID_SVX_START + 226) // Strings von der Hatch-Tabpage #define RID_SVXSTR_WRITE_DATA_ERROR (RID_SVX_START + 229) diff --git a/svx/source/stbctrls/stbctrls.src b/svx/source/stbctrls/stbctrls.src index 2d9b875d6c2a..74c7c78bc897 100644 --- a/svx/source/stbctrls/stbctrls.src +++ b/svx/source/stbctrls/stbctrls.src @@ -1,4 +1,4 @@ -/************************************************************************* +/************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -87,6 +87,11 @@ String RID_SVXSTR_XMLSEC_NO_SIG Text [ en-US ] = "Digital Signature: The document is not signed."; }; +String RID_SVXSTR_XMLSEC_SIG_CERT_OK_PARTIAL_SIG +{ + Text [ en-US ] = "Digital Signature: The document signature and the certificate are OK, but not all parts of the document are signed."; +}; + // PopupMenu ------------------------------------------------------------- Menu RID_SVXMNU_ZOOM { diff --git a/svx/source/stbctrls/xmlsecctrl.cxx b/svx/source/stbctrls/xmlsecctrl.cxx index a994df0900a6..890cde02e428 100644 --- a/svx/source/stbctrls/xmlsecctrl.cxx +++ b/svx/source/stbctrls/xmlsecctrl.cxx @@ -143,6 +143,9 @@ void XmlSecStatusBarControl::StateChanged( USHORT nSID, SfxItemState eState, con nResId = RID_SVXSTR_XMLSEC_SIG_NOT_OK; else if ( mpImpl->mnState == SIGNATURESTATE_SIGNATURES_NOTVALIDATED ) nResId = RID_SVXSTR_XMLSEC_SIG_OK_NO_VERIFY; + else if ( mpImpl->mnState == SIGNATURESTATE_SIGNATURES_PARTIAL_OK ) + nResId = RID_SVXSTR_XMLSEC_SIG_CERT_OK_PARTIAL_SIG; + GetStatusBar().SetQuickHelpText( GetId(), SVX_RESSTR( nResId ) ); } @@ -192,7 +195,8 @@ void XmlSecStatusBarControl::Paint( const UserDrawEvent& rUsrEvt ) ++aRect.Top(); pDev->DrawImage( aRect.TopLeft(), mpImpl->maImageBroken ); } - else if( mpImpl->mnState == SIGNATURESTATE_SIGNATURES_NOTVALIDATED ) + else if( mpImpl->mnState == SIGNATURESTATE_SIGNATURES_NOTVALIDATED + || mpImpl->mnState == SIGNATURESTATE_SIGNATURES_PARTIAL_OK) { ++aRect.Top(); pDev->DrawImage( aRect.TopLeft(), mpImpl->maImageNotValidated ); diff --git a/svx/source/svxlink/fileobj.cxx b/svx/source/svxlink/fileobj.cxx index f2628f181d31..d159c7f78abe 100644 --- a/svx/source/svxlink/fileobj.cxx +++ b/svx/source/svxlink/fileobj.cxx @@ -121,37 +121,6 @@ BOOL SvFileObject::GetData( ::com::sun::star::uno::Any & rData, // relativen Datei Links aufzuloesen!!!! Wird ueber den // LinkManager und damit von dessen Storage erledigt. rData <<= rtl::OUString( sFileNm ); - -/* -=========================================================================== -JP 28.02.96: noch eine Baustelle: - Idee: hier das Medium und die DocShell anlegen, Doc laden - und ueber OLE-SS (GetObj(...)) den Bereich als - PseudoObject erfragen. Dieses mit den Daten oder - dessen Daten verschicken. - -=========================================================================== - - SfxMedium aMed( aFileNm.GetFull(), STREAM_READ, TRUE ); - aMed.DownLoad(); // nur mal das Medium anfassen (DownLoaden) - - if( aMed.IsStorage() ) - pSvData->SetData( SvStorageRef( aMed.GetStorage() ), - TRANSFER_COPY ); - else - { - SvStream* pStream = aMed.GetInStream(); - if( !pStream ) - return FALSE; - - UINT32 nLen = pStream->Seek( STREAM_SEEK_TO_END ); - pStream->Seek( STREAM_SEEK_TO_BEGIN ); - - void* pData = SvMemAlloc( nLen ); - pStream->Read( pData, nLen ); - pSvData->SetData( pData, nLen, TRANSFER_MOVE ); - } -*/ } break; diff --git a/svx/source/xml/xmlxtimp.cxx b/svx/source/xml/xmlxtimp.cxx index e211c98f6834..70e8af36c838 100644 --- a/svx/source/xml/xmlxtimp.cxx +++ b/svx/source/xml/xmlxtimp.cxx @@ -394,7 +394,7 @@ sal_Bool SvxXMLXTableImport::load( const OUString& rUrl, const uno::Reference< X if( aMedium.IsStorage() ) { - uno::Reference < embed::XStorage > xStorage( aMedium.GetStorage(), uno::UNO_QUERY_THROW ); + uno::Reference < embed::XStorage > xStorage( aMedium.GetStorage( sal_False ), uno::UNO_QUERY_THROW ); const String aContentStmName( RTL_CONSTASCII_USTRINGPARAM( "Content.xml" ) ); xIStm.set( xStorage->openStreamElement( aContentStmName, embed::ElementModes::READ ), uno::UNO_QUERY_THROW ); -- cgit From 49c5701fbbc6a93ca0410719564ee22b5166ee48 Mon Sep 17 00:00:00 2001 From: Jens-Heiner Rechtien Date: Thu, 17 Sep 2009 14:41:33 +0000 Subject: CWS-TOOLING: integrate CWS kso32fixes2 2009-09-14 kso #i104767# - 64 bit build breaker 2009-09-14 kso #i14767# - compiler warning 2009-09-08 kso i104767# - Removed obsolete header. 2009-09-08 kso i104767# - Removed obsolete header include. 2009-09-08 kso #i104767# - Fixed build breaker. 2009-09-07 kso #i104767# - merged in dev300 m57. 2009-09-07 kso #i104767# - support for system credentials usage 2009-09-07 kso #i104767# - support for system credentials usage 2009-09-07 kso #i104767# - support for system credentials usage 2009-09-07 kso #i104767# - support for system credentials usage 2009-09-07 kso #i104767# - support for system credentials usage 2009-09-07 Kai Sommerfeld #i104767# - support for system credentials usage 2009-09-07 Kai Sommerfeld #i104767# - support for system credentials usage 2009-09-07 ks93798 #i104767# - adaptions for NTLM SSO --- svx/source/cui/webconninfo.cxx | 103 +++++++++++++++++++++++++++++------------ svx/source/cui/webconninfo.hxx | 1 + 2 files changed, 75 insertions(+), 29 deletions(-) (limited to 'svx') diff --git a/svx/source/cui/webconninfo.cxx b/svx/source/cui/webconninfo.cxx index 0298a8fc7e93..997c246abf1e 100644 --- a/svx/source/cui/webconninfo.cxx +++ b/svx/source/cui/webconninfo.cxx @@ -44,6 +44,7 @@ #include #include #include +#include "com/sun/star/task/XUrlContainer.hpp" #include #include @@ -116,7 +117,7 @@ WebConnectionInfoDialog::WebConnectionInfoDialog( Window* pParent ) : ,m_aButtonsFL ( this, SVX_RES( FL_BUTTONS ) ) ,m_aCloseBtn ( this, SVX_RES( PB_CLOSE ) ) ,m_aHelpBtn ( this, SVX_RES( PB_HELP ) ) - + ,m_nPos ( -1 ) { static long aStaticTabs[]= { 3, 0, 150, 250 }; m_aPasswordsLB.SetTabs( aStaticTabs ); @@ -211,6 +212,7 @@ void WebConnectionInfoDialog::FillPasswordList() uno::Sequence< task::UrlRecord > aURLEntries = xPasswdContainer->getAllPersistent( xInteractionHandler ); sal_Int32 nCount = 0; for ( sal_Int32 nURLInd = 0; nURLInd < aURLEntries.getLength(); nURLInd++ ) + { for ( sal_Int32 nUserInd = 0; nUserInd < aURLEntries[nURLInd].UserList.getLength(); nUserInd++ ) { ::rtl::OUString aUIEntry( aURLEntries[nURLInd].Url ); @@ -219,6 +221,25 @@ void WebConnectionInfoDialog::FillPasswordList() SvLBoxEntry* pEntry = m_aPasswordsLB.InsertEntry( aUIEntry ); pEntry->SetUserData( (void*)(nCount++) ); } + } + + // remember pos of first url container entry. + m_nPos = nCount; + + uno::Reference< task::XUrlContainer > xUrlContainer( + xPasswdContainer, uno::UNO_QUERY_THROW ); + + uno::Sequence< rtl::OUString > aUrls + = xUrlContainer->getUrls( sal_True /* OnlyPersistent */ ); + + for ( sal_Int32 nURLIdx = 0; nURLIdx < aUrls.getLength(); nURLIdx++ ) + { + ::rtl::OUString aUIEntry( aUrls[ nURLIdx ] ); + aUIEntry += ::rtl::OUString::valueOf( (sal_Unicode)'\t' ); + aUIEntry += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "*" ) ); + SvLBoxEntry* pEntry = m_aPasswordsLB.InsertEntry( aUIEntry ); + pEntry->SetUserData( (void*)(nCount++) ); + } } } catch( uno::Exception& ) @@ -230,22 +251,29 @@ IMPL_LINK( WebConnectionInfoDialog, RemovePasswordHdl, PushButton*, EMPTYARG ) { try { - uno::Reference< task::XPasswordContainer > xPasswdContainer( - comphelper::getProcessServiceFactory()->createInstance( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.task.PasswordContainer" ) ) ), - uno::UNO_QUERY_THROW ); - - uno::Reference< task::XInteractionHandler > xInteractionHandler( - comphelper::getProcessServiceFactory()->createInstance( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.task.InteractionHandler" ) ) ), - uno::UNO_QUERY_THROW ); - SvLBoxEntry* pEntry = m_aPasswordsLB.GetCurEntry(); if ( pEntry ) { ::rtl::OUString aURL = m_aPasswordsLB.GetEntryText( pEntry, 0 ); ::rtl::OUString aUserName = m_aPasswordsLB.GetEntryText( pEntry, 1 ); - xPasswdContainer->removePersistent( aURL, aUserName ); + + uno::Reference< task::XPasswordContainer > xPasswdContainer( + comphelper::getProcessServiceFactory()->createInstance( + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.task.PasswordContainer" ) ) ), + uno::UNO_QUERY_THROW ); + + sal_Int32 nPos = (sal_Int32)(sal_IntPtr)pEntry->GetUserData(); + if ( nPos < m_nPos ) + { + xPasswdContainer->removePersistent( aURL, aUserName ); + } + else + { + uno::Reference< task::XUrlContainer > xUrlContainer( + xPasswdContainer, uno::UNO_QUERY_THROW ); + xUrlContainer->removeUrl( aURL ); + } m_aPasswordsLB.RemoveEntry( pEntry ); } } @@ -262,11 +290,20 @@ IMPL_LINK( WebConnectionInfoDialog, RemoveAllPasswordsHdl, PushButton*, EMPTYARG { uno::Reference< task::XPasswordContainer > xPasswdContainer( comphelper::getProcessServiceFactory()->createInstance( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.task.PasswordContainer" ) ) ), + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.task.PasswordContainer" ) ) ), uno::UNO_QUERY_THROW ); // should the master password be requested before? xPasswdContainer->removeAllPersistent(); + + uno::Reference< task::XUrlContainer > xUrlContainer( + xPasswdContainer, uno::UNO_QUERY_THROW ); + uno::Sequence< rtl::OUString > aUrls + = xUrlContainer->getUrls( sal_True /* OnlyPersistent */ ); + for ( sal_Int32 nURLIdx = 0; nURLIdx < aUrls.getLength(); nURLIdx++ ) + xUrlContainer->removeUrl( aUrls[ nURLIdx ] ); + m_aPasswordsLB.Clear(); } catch( uno::Exception& ) @@ -280,34 +317,38 @@ IMPL_LINK( WebConnectionInfoDialog, ChangePasswordHdl, PushButton*, EMPTYARG ) { try { - uno::Reference< task::XPasswordContainer > xPasswdContainer( - comphelper::getProcessServiceFactory()->createInstance( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.task.PasswordContainer" ) ) ), - uno::UNO_QUERY_THROW ); - - uno::Reference< task::XInteractionHandler > xInteractionHandler( - comphelper::getProcessServiceFactory()->createInstance( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.task.InteractionHandler" ) ) ), - uno::UNO_QUERY_THROW ); - - SvLBoxEntry* pEntry = m_aPasswordsLB.GetCurEntry(); if ( pEntry ) { ::rtl::OUString aURL = m_aPasswordsLB.GetEntryText( pEntry, 0 ); ::rtl::OUString aUserName = m_aPasswordsLB.GetEntryText( pEntry, 1 ); - ::comphelper::DocPasswordRequest* pPasswordRequest = new ::comphelper::DocPasswordRequest( - ::comphelper::DocPasswordRequestType_STANDARD, task::PasswordRequestMode_PASSWORD_CREATE, aURL ); - + ::comphelper::DocPasswordRequest* pPasswordRequest + = new ::comphelper::DocPasswordRequest( + ::comphelper::DocPasswordRequestType_STANDARD, + task::PasswordRequestMode_PASSWORD_CREATE, aURL ); uno::Reference< task::XInteractionRequest > rRequest( pPasswordRequest ); + + uno::Reference< task::XInteractionHandler > xInteractionHandler( + comphelper::getProcessServiceFactory()->createInstance( + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.task.InteractionHandler" ) ) ), + uno::UNO_QUERY_THROW ); xInteractionHandler->handle( rRequest ); + if ( pPasswordRequest->isPassword() ) { String aNewPass = pPasswordRequest->getPassword(); uno::Sequence< ::rtl::OUString > aPasswd( 1 ); aPasswd[0] = aNewPass; - xPasswdContainer->addPersistent( aURL, aUserName, aPasswd, xInteractionHandler ); + + uno::Reference< task::XPasswordContainer > xPasswdContainer( + comphelper::getProcessServiceFactory()->createInstance( + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.task.PasswordContainer" ) ) ), + uno::UNO_QUERY_THROW ); + xPasswdContainer->addPersistent( + aURL, aUserName, aPasswd, xInteractionHandler ); } } } @@ -329,7 +370,11 @@ IMPL_LINK( WebConnectionInfoDialog, EntrySelectedHdl, void*, EMPTYARG ) else { m_aRemoveBtn.Enable( TRUE ); - m_aChangeBtn.Enable( TRUE ); + + // url container entries (-> use system credentials) have + // no password + sal_Int32 nPos = (sal_Int32)(sal_IntPtr)pEntry->GetUserData(); + m_aChangeBtn.Enable( nPos < m_nPos ); } return 0; diff --git a/svx/source/cui/webconninfo.hxx b/svx/source/cui/webconninfo.hxx index 775d5072393c..f24b9f0dd4c8 100644 --- a/svx/source/cui/webconninfo.hxx +++ b/svx/source/cui/webconninfo.hxx @@ -65,6 +65,7 @@ namespace svx FixedLine m_aButtonsFL; CancelButton m_aCloseBtn; HelpButton m_aHelpBtn; + sal_Int32 m_nPos; DECL_LINK( HeaderBarClickedHdl, SvxSimpleTable* ); DECL_LINK( RemovePasswordHdl, PushButton* ); -- cgit From c7e172b2d9036c788fe00552ded841340d115033 Mon Sep 17 00:00:00 2001 From: Jens-Heiner Rechtien Date: Fri, 18 Sep 2009 10:15:03 +0000 Subject: CWS-TOOLING: integrate CWS mba32issues02 2009-09-17 mb93783 merge commit 2009-09-03 tb121644 #i104748 - slot unification to .uno:PasteSpecial 2009-09-01 mba #101455#: code simplification 2009-08-31 mb93783 iso locales for norwegian builds are nb and nn, not no 2009-08-25 mba merge to m55 2009-07-29 mba cleanup after rebase 2009-07-29 mba #i103200#: wrong order of first and last name in CJK UI 2009-07-27 mba adding dictionary changes from broken svn CWS 2009-07-27 mba adding dictionary changes from broken svn CWS 2009-07-27 mba apply patch from broken svn CWS --- svx/inc/optgenrl.hrc | 1 + svx/inc/svx/dialogs.hrc | 23 ++++++++- svx/inc/svx/svxids.hrc | 2 +- svx/sdi/svx.sdi | 44 +++-------------- svx/sdi/svxitems.sdi | 1 - svx/source/cui/cuioptgenrl.hxx | 1 + svx/source/cui/macropg.cxx | 35 +++++++++++-- svx/source/cui/macropg.src | 95 ++++++++++++++++++++++++++++++++++-- svx/source/cui/optgenrl.cxx | 18 +++++++ svx/source/intro/intro_tmpl.hrc | 2 +- svx/source/mnuctrls/clipboardctl.cxx | 10 ---- svx/source/options/optgenrl.src | 8 +++ 12 files changed, 180 insertions(+), 60 deletions(-) (limited to 'svx') diff --git a/svx/inc/optgenrl.hrc b/svx/inc/optgenrl.hrc index b6f191aaea07..4c519d5ebb70 100644 --- a/svx/inc/optgenrl.hrc +++ b/svx/inc/optgenrl.hrc @@ -63,6 +63,7 @@ #define ED_EMAIL 38 #define GB_ADDRESS 39 #define CB_USEDATA 40 +#define FT_NAME_EASTERN 41 #define STR_US_STATE 10 #define STR_QUERY_REG 11 diff --git a/svx/inc/svx/dialogs.hrc b/svx/inc/svx/dialogs.hrc index b21785855a96..6e6162ef61f2 100644 --- a/svx/inc/svx/dialogs.hrc +++ b/svx/inc/svx/dialogs.hrc @@ -1239,7 +1239,7 @@ #define RID_SVXSTR_MENU_ADDCOMMANDS_DESCRIPTION (RID_SVX_START + 1050) #define RID_SVXSTR_EVENT_STARTAPP (RID_SVX_START + 1051) #define RID_SVXSTR_EVENT_CLOSEAPP (RID_SVX_START + 1052) -#define RID_SVXSTR_EVENT_CREATEDOC (RID_SVX_START + 1053) +#define RID_SVXSTR_EVENT_NEWDOC (RID_SVX_START + 1053) #define RID_SVXSTR_EVENT_CLOSEDOC (RID_SVX_START + 1054) #define RID_SVXSTR_EVENT_PREPARECLOSEDOC (RID_SVX_START + 1055) #define RID_SVXSTR_EVENT_OPENDOC (RID_SVX_START + 1056) @@ -1370,9 +1370,28 @@ #define STR_LINKEDDOC_NO_SYSTEM_FILE (RID_SVX_START + 1169) #define RID_SVXSTR_EVENT_SUBCOMPONENT_OPENED (RID_SVX_START + 1170) #define RID_SVXSTR_EVENT_SUBCOMPONENT_CLOSED (RID_SVX_START + 1171) + +#define RID_SVXSTR_EVENT_CREATEDOC (RID_SVX_START + 1172) +#define RID_SVXSTR_EVENT_LOADDOCFINISHED (RID_SVX_START + 1173) +#define RID_SVXSTR_EVENT_SAVEDOCFAILED (RID_SVX_START + 1174) +#define RID_SVXSTR_EVENT_SAVEASDOCFAILED (RID_SVX_START + 1175) +#define RID_SVXSTR_EVENT_COPYTODOC (RID_SVX_START + 1176) +#define RID_SVXSTR_EVENT_COPYTODOCDONE (RID_SVX_START + 1177) +#define RID_SVXSTR_EVENT_COPYTODOCFAILED (RID_SVX_START + 1178) +#define RID_SVXSTR_EVENT_VIEWCREATED (RID_SVX_START + 1179) +#define RID_SVXSTR_EVENT_PREPARECLOSEVIEW (RID_SVX_START + 1180) +#define RID_SVXSTR_EVENT_CLOSEVIEW (RID_SVX_START + 1181) +#define RID_SVXSTR_EVENT_TITLECHANGED (RID_SVX_START + 1182) +#define RID_SVXSTR_EVENT_MODECHANGED (RID_SVX_START + 1183) +#define RID_SVXSTR_EVENT_VISAREACHANGED (RID_SVX_START + 1184) +#define RID_SVXSTR_EVENT_STORAGECHANGED (RID_SVX_START + 1185) +#define RID_SVXSTR_EVENT_MAILMERGE_END (RID_SVX_START + 1186) +#define RID_SVXSTR_EVENT_FIELDMERGE (RID_SVX_START + 1187) +#define RID_SVXSTR_EVENT_FIELDMERGE_FINISHED (RID_SVX_START + 1188) +#define RID_SVXSTR_EVENT_LAYOUT_FINISHED (RID_SVX_START + 1189) // if you add here, remember to adjust RID_SVXSTR_NEXTFREE -#define RID_SVXSTR_NEXTFREE (RID_SVX_START + 1172) +#define RID_SVXSTR_NEXTFREE (RID_SVX_START + 1190) // ---------------------------------------------------------------------------- // if we have _a_lot_ time, we should group the resource ids by type, instead diff --git a/svx/inc/svx/svxids.hrc b/svx/inc/svx/svxids.hrc index 5d37c1ee87f3..a4b0d8736618 100644 --- a/svx/inc/svx/svxids.hrc +++ b/svx/inc/svx/svxids.hrc @@ -1177,7 +1177,6 @@ #define SID_ATTR_CHAR_WIDTH_FIT_TO_LINE ( SID_SVX_START + 919 ) #define SID_ATTR_CHAR_RELIEF ( SID_SVX_START + 920 ) #define SID_LANGUAGE_OPTIONS ( SID_SVX_START + 921 ) -#define SID_CLIPBOARD_FORMAT_ITEMS ( SID_SVX_START + 922 ) #define SID_GETUNDOSTRINGS ( SID_SVX_START + 923 ) #define SID_GETREDOSTRINGS ( SID_SVX_START + 924 ) #define SID_PARA_VERTALIGN ( SID_SVX_START + 925 ) @@ -1350,6 +1349,7 @@ #define SID_CHAR_DLG_PREVIEW_STRING (SID_SVX_START+1090) #define SID_RECHECK_DOCUMENT (SID_SVX_START+1091) #define SID_ATTR_PARA_OUTLINE_LEVEL (SID_SVX_START+1092) +#define SID_OBJECT_MIRROR (SID_SVX_START+1093) #define SID_INSERT_POSTIT (SID_SVX_START+1093) #define SID_DELETE_POSTIT (SID_SVX_START+1094) diff --git a/svx/sdi/svx.sdi b/svx/sdi/svx.sdi index dc303bad5732..28f50ef89b5c 100644 --- a/svx/sdi/svx.sdi +++ b/svx/sdi/svx.sdi @@ -1973,34 +1973,6 @@ SfxVoidItem ClearOutline SID_OUTLINE_DELETEALL GroupId = GID_DATA; ] -//-------------------------------------------------------------------------- -SfxVoidItem ClipboardFormatItems SID_CLIPBOARD_FORMAT_ITEMS -(SfxUInt32Item SelectedFormat SID_CLIPBOARD_FORMAT_ITEMS) -[ - /* flags: */ - AutoUpdate = FALSE, - Cachable = Cachable, - FastCall = TRUE, - HasCoreId = FALSE, - HasDialog = FALSE, - ReadOnlyDoc = FALSE, - Toggle = FALSE, - Container = FALSE, - RecordAbsolute = FALSE, - RecordPerSet; - Synchron; - - /* status: */ - SlotType = SvxClipboardFmtItem - - /* config: */ - AccelConfig = FALSE, - MenuConfig = FALSE, - StatusBarConfig = FALSE, - ToolBoxConfig = FALSE, - GroupId = GID_EDIT; -] - //-------------------------------------------------------------------------- SvxColorItem Color SID_ATTR_CHAR_COLOR @@ -3797,7 +3769,7 @@ SfxObjectItem FmFilterNavigatorController SID_FM_FILTER_NAVIGATOR_CONTROL [ /* flags: */ AutoUpdate = FALSE, - Cachable = Volatile, + Cachable = Cachable, FastCall = FALSE, HasCoreId = FALSE, HasDialog = FALSE, @@ -4806,7 +4778,7 @@ SfxStringListItem GetRedoStrings SID_GETREDOSTRINGS [ /* flags: */ AutoUpdate = FALSE, - Cachable = Volatile, + Cachable = Cachable, FastCall = TRUE, HasCoreId = FALSE, HasDialog = FALSE, @@ -4833,7 +4805,7 @@ SfxStringListItem GetUndoStrings SID_GETUNDOSTRINGS [ /* flags: */ AutoUpdate = FALSE, - Cachable = Volatile, + Cachable = Cachable, FastCall = TRUE, HasCoreId = FALSE, HasDialog = FALSE, @@ -7672,7 +7644,7 @@ SfxVoidItem OutlineBullet SID_OUTLINE_BULLET [ /* flags: */ AutoUpdate = FALSE, - Cachable = Volatile, + Cachable = Cachable, FastCall = FALSE, HasCoreId = FALSE, HasDialog = TRUE, @@ -8654,7 +8626,7 @@ SfxBoolItem ReadOnlyMode SID_READONLY_MODE [ /* flags: */ AutoUpdate = FALSE, - Cachable = Volatile, + Cachable = Cachable, FastCall = TRUE, HasCoreId = FALSE, HasDialog = FALSE, @@ -9526,7 +9498,7 @@ SfxVoidItem Select SID_SELECT [ /* flags: */ AutoUpdate = FALSE, - Cachable = Volatile, + Cachable = Cachable, FastCall = FALSE, HasCoreId = FALSE, HasDialog = FALSE, @@ -11130,7 +11102,7 @@ SfxBoolItem TwainSelect SID_TWAIN_SELECT [ /* flags: */ AutoUpdate = FALSE, - Cachable = Volatile, + Cachable = Cachable, FastCall = FALSE, HasCoreId = FALSE, HasDialog = TRUE, @@ -11155,7 +11127,7 @@ SfxVoidItem TwainTransfer SID_TWAIN_TRANSFER [ /* flags: */ AutoUpdate = FALSE, - Cachable = Volatile, + Cachable = Cachable, FastCall = FALSE, HasCoreId = FALSE, HasDialog = TRUE, diff --git a/svx/sdi/svxitems.sdi b/svx/sdi/svxitems.sdi index f977f24c4b0a..65a59bccf3b6 100644 --- a/svx/sdi/svxitems.sdi +++ b/svx/sdi/svxitems.sdi @@ -668,7 +668,6 @@ struct SvxCharRotate }; item SvxCharRotate SvxCharRotateItem; -item String SvxClipboardFmtItem; // dummy item String SfxSetItem; // dummy item INT16 SvxRotateModeItem; // enum item INT16 SvxOrientationItem; // enum diff --git a/svx/source/cui/cuioptgenrl.hxx b/svx/source/cui/cuioptgenrl.hxx index a19b20c16028..22ef5481651f 100644 --- a/svx/source/cui/cuioptgenrl.hxx +++ b/svx/source/cui/cuioptgenrl.hxx @@ -80,6 +80,7 @@ private: SvxUserEdit aCompanyEdit; FixedText aNameLbl; FixedText aNameLblRuss; + FixedText aNameLblEastern; SvxUserEdit aFirstName; SvxUserEdit aFatherName; SvxUserEdit aName; diff --git a/svx/source/cui/macropg.cxx b/svx/source/cui/macropg.cxx index 6eeba1b0e703..0ee76246abe3 100644 --- a/svx/source/cui/macropg.cxx +++ b/svx/source/cui/macropg.cxx @@ -271,22 +271,42 @@ void _SvxMacroTabPage::InitResources() // the event name to UI string mappings for App Events aDisplayNames.push_back( EventDisplayName( "OnStartApp", RID_SVXSTR_EVENT_STARTAPP ) ); aDisplayNames.push_back( EventDisplayName( "OnCloseApp", RID_SVXSTR_EVENT_CLOSEAPP ) ); - aDisplayNames.push_back( EventDisplayName( "OnNew", RID_SVXSTR_EVENT_CREATEDOC ) ); + aDisplayNames.push_back( EventDisplayName( "OnCreate", RID_SVXSTR_EVENT_CREATEDOC ) ); + aDisplayNames.push_back( EventDisplayName( "OnNew", RID_SVXSTR_EVENT_NEWDOC ) ); + aDisplayNames.push_back( EventDisplayName( "OnLoadFinished", RID_SVXSTR_EVENT_LOADDOCFINISHED ) ); aDisplayNames.push_back( EventDisplayName( "OnLoad", RID_SVXSTR_EVENT_OPENDOC ) ); - aDisplayNames.push_back( EventDisplayName( "OnSaveAs", RID_SVXSTR_EVENT_SAVEASDOC ) ); - aDisplayNames.push_back( EventDisplayName( "OnSaveAsDone", RID_SVXSTR_EVENT_SAVEASDOCDONE ) ); - aDisplayNames.push_back( EventDisplayName( "OnSave", RID_SVXSTR_EVENT_SAVEDOC ) ); - aDisplayNames.push_back( EventDisplayName( "OnSaveDone", RID_SVXSTR_EVENT_SAVEDOCDONE ) ); aDisplayNames.push_back( EventDisplayName( "OnPrepareUnload", RID_SVXSTR_EVENT_PREPARECLOSEDOC ) ); aDisplayNames.push_back( EventDisplayName( "OnUnload", RID_SVXSTR_EVENT_CLOSEDOC ) ) ; + aDisplayNames.push_back( EventDisplayName( "OnViewCreated", RID_SVXSTR_EVENT_VIEWCREATED ) ); + aDisplayNames.push_back( EventDisplayName( "OnPrepareViewClosing", RID_SVXSTR_EVENT_PREPARECLOSEVIEW ) ); + aDisplayNames.push_back( EventDisplayName( "OnViewClosed", RID_SVXSTR_EVENT_CLOSEVIEW ) ) ; aDisplayNames.push_back( EventDisplayName( "OnFocus", RID_SVXSTR_EVENT_ACTIVATEDOC ) ); aDisplayNames.push_back( EventDisplayName( "OnUnfocus", RID_SVXSTR_EVENT_DEACTIVATEDOC ) ); + aDisplayNames.push_back( EventDisplayName( "OnSave", RID_SVXSTR_EVENT_SAVEDOC ) ); + aDisplayNames.push_back( EventDisplayName( "OnSaveDone", RID_SVXSTR_EVENT_SAVEDOCDONE ) ); + aDisplayNames.push_back( EventDisplayName( "OnSaveFailed", RID_SVXSTR_EVENT_SAVEDOCFAILED ) ); + aDisplayNames.push_back( EventDisplayName( "OnSaveAs", RID_SVXSTR_EVENT_SAVEASDOC ) ); + aDisplayNames.push_back( EventDisplayName( "OnSaveAsDone", RID_SVXSTR_EVENT_SAVEASDOCDONE ) ); + aDisplayNames.push_back( EventDisplayName( "OnSaveAsFailed", RID_SVXSTR_EVENT_SAVEASDOCFAILED ) ); + aDisplayNames.push_back( EventDisplayName( "OnCopyTo", RID_SVXSTR_EVENT_COPYTODOC ) ); + aDisplayNames.push_back( EventDisplayName( "OnCopyToDone", RID_SVXSTR_EVENT_COPYTODOCDONE ) ); + aDisplayNames.push_back( EventDisplayName( "OnCopyToFailed", RID_SVXSTR_EVENT_COPYTODOCFAILED ) ); aDisplayNames.push_back( EventDisplayName( "OnPrint", RID_SVXSTR_EVENT_PRINTDOC ) ); aDisplayNames.push_back( EventDisplayName( "OnModifyChanged", RID_SVXSTR_EVENT_MODIFYCHANGED ) ); + aDisplayNames.push_back( EventDisplayName( "OnTitleChanged", RID_SVXSTR_EVENT_TITLECHANGED ) ); +// aDisplayNames.push_back( EventDisplayName( "OnModeChanged", RID_SVXSTR_EVENT_MODECHANGED ) ); +// aDisplayNames.push_back( EventDisplayName( "OnVisAreaChanged", RID_SVXSTR_EVENT_VISAREACHANGED ) ); +// aDisplayNames.push_back( EventDisplayName( "OnStorageChanged", RID_SVXSTR_EVENT_STORAGECHANGED ) ); + + // application specific events aDisplayNames.push_back( EventDisplayName( "OnMailMerge", RID_SVXSTR_EVENT_MAILMERGE ) ); + aDisplayNames.push_back( EventDisplayName( "OnMailMergeFinished", RID_SVXSTR_EVENT_MAILMERGE_END ) ); + aDisplayNames.push_back( EventDisplayName( "OnFieldMerge", RID_SVXSTR_EVENT_FIELDMERGE ) ); + aDisplayNames.push_back( EventDisplayName( "OnFieldMergeFinished", RID_SVXSTR_EVENT_FIELDMERGE_FINISHED ) ); aDisplayNames.push_back( EventDisplayName( "OnPageCountChange", RID_SVXSTR_EVENT_PAGECOUNTCHANGE ) ); aDisplayNames.push_back( EventDisplayName( "OnSubComponentOpened", RID_SVXSTR_EVENT_SUBCOMPONENT_OPENED ) ); aDisplayNames.push_back( EventDisplayName( "OnSubComponentClosed", RID_SVXSTR_EVENT_SUBCOMPONENT_CLOSED ) ); +// aDisplayNames.push_back( EventDisplayName( "OnLayoutFinished", RID_SVXSTR_EVENT_LAYOUT_FINISHED ) ); // the event name to UI string mappings for forms & dialogs // @@ -571,9 +591,14 @@ void _SvxMacroTabPage::DisplayAppEvents( bool appEvents) rListBox.Select( _pE ); rListBox.MakeVisible( _pE ); } + pE = rListBox.GetEntry(0); if( pE ) + { rListBox.Select( pE ); + rListBox.MakeVisible( pE ); + } + rListBox.SetUpdateMode( TRUE ); EnableButtons( String() ); } diff --git a/svx/source/cui/macropg.src b/svx/source/cui/macropg.src index e9b6c10d6014..92e1e718ba61 100644 --- a/svx/source/cui/macropg.src +++ b/svx/source/cui/macropg.src @@ -165,9 +165,9 @@ String RID_SVXSTR_EVENT_CLOSEAPP Text [ en-US ] = "Close Application" ; }; -String RID_SVXSTR_EVENT_CREATEDOC +String RID_SVXSTR_EVENT_NEWDOC { - Text [ en-US ] = "Create Document" ; + Text [ en-US ] = "New Document" ; }; String RID_SVXSTR_EVENT_CLOSEDOC @@ -177,7 +177,7 @@ String RID_SVXSTR_EVENT_CLOSEDOC String RID_SVXSTR_EVENT_PREPARECLOSEDOC { - Text [ en-US ] = "Document is closing" ; + Text [ en-US ] = "Document is going to be closed" ; }; String RID_SVXSTR_EVENT_OPENDOC @@ -226,7 +226,19 @@ String RID_SVXSTR_EVENT_MODIFYCHANGED }; String RID_SVXSTR_EVENT_MAILMERGE { - Text [ en-US ] = "Print form letters" ; + Text [ en-US ] = "Printing of form letters started" ; +}; +String RID_SVXSTR_EVENT_MAILMERGE_END +{ + Text [ en-US ] = "Printing of form letters finished" ; +}; +String RID_SVXSTR_EVENT_FIELDMERGE +{ + Text [ en-US ] = "Merging of form fields started" ; +}; +String RID_SVXSTR_EVENT_FIELDMERGE_FINISHED +{ + Text [ en-US ] = "Merging of form fields finished" ; }; String RID_SVXSTR_EVENT_PAGECOUNTCHANGE { @@ -372,3 +384,78 @@ String RID_SVXSTR_EVENT_CHANGED { Text [ en-US ] = "Changed" ; }; + +String RID_SVXSTR_EVENT_CREATEDOC +{ + Text [ en-US ] = "Document created" ; +}; + +String RID_SVXSTR_EVENT_LOADDOCFINISHED +{ + Text [ en-US ] = "Document loading finished" ; +}; + +String RID_SVXSTR_EVENT_SAVEDOCFAILED +{ + Text [ en-US ] = "Saving of document failed" ; +}; + +String RID_SVXSTR_EVENT_SAVEASDOCFAILED +{ + Text [ en-US ] = "'Save as' has failed" ; +}; + +String RID_SVXSTR_EVENT_COPYTODOC +{ + Text [ en-US ] = "Storing or exporting copy of document" ; +}; + +String RID_SVXSTR_EVENT_COPYTODOCDONE +{ + Text [ en-US ] = "Document copy has been created" ; +}; + +String RID_SVXSTR_EVENT_COPYTODOCFAILED +{ + Text [ en-US ] = "Creating of document copy failed" ; +}; + +String RID_SVXSTR_EVENT_VIEWCREATED +{ + Text [ en-US ] = "View created" ; +}; + +String RID_SVXSTR_EVENT_PREPARECLOSEVIEW +{ + Text [ en-US ] = "View is going to be closed" ; +}; + +String RID_SVXSTR_EVENT_CLOSEVIEW +{ + Text [ en-US ] = "View closed" ; +}; + +String RID_SVXSTR_EVENT_TITLECHANGED +{ + Text [ en-US ] = "Document title changed" ; +}; + +String RID_SVXSTR_EVENT_MODECHANGED +{ + Text [ en-US ] = "Document mode changed" ; +}; + +String RID_SVXSTR_EVENT_VISAREACHANGED +{ + Text [ en-US ] = "Visible area changed" ; +}; + +String RID_SVXSTR_EVENT_STORAGECHANGED +{ + Text [ en-US ] = "Document has got a new storage" ; +}; + +String RID_SVXSTR_EVENT_LAYOUT_FINISHED +{ + Text [ en-US ] = "Document layout finished" ; +}; diff --git a/svx/source/cui/optgenrl.cxx b/svx/source/cui/optgenrl.cxx index 1766dd58de72..7159cfdd7e61 100644 --- a/svx/source/cui/optgenrl.cxx +++ b/svx/source/cui/optgenrl.cxx @@ -103,6 +103,7 @@ SvxGeneralTabPage::SvxGeneralTabPage( Window* pParent, const SfxItemSet& rCoreSe aCompanyEdit ( this, SVX_RES( ED_COMPANY ), INDEX_NOTSET, &aCompanyLbl ), aNameLbl ( this, SVX_RES( FT_NAME ), true ), aNameLblRuss ( this, SVX_RES( FT_NAME_RUSS ), true ), + aNameLblEastern ( this, SVX_RES( FT_NAME_EASTERN ), true ), aFirstName ( this, SVX_RES( ED_FIRSTNAME ), 0, &aNameLbl ), aFatherName ( this, SVX_RES( ED_FATHERNAME ) ), aName ( this, SVX_RES( ED_NAME ), 1, &aNameLbl ), @@ -189,6 +190,23 @@ SvxGeneralTabPage::SvxGeneralTabPage( Window* pParent, const SfxItemSet& rCoreSe aFirstName.SetZOrder( &aName, WINDOW_ZORDER_BEHIND ); aFatherName.SetZOrder( &aFirstName, WINDOW_ZORDER_BEHIND ); } + else if ( LANGUAGE_JAPANESE == eLang || + LANGUAGE_KOREAN == eLang || + LANGUAGE_CHINESE_TRADITIONAL == eLang || + LANGUAGE_CHINESE_SIMPLIFIED == eLang) + { + aUsCityEdit.Hide(); + aUsStateEdit.Hide(); + aUsZipEdit.Hide(); + aNameLbl.Hide(); + aNameLblEastern.Show(); + + // swap "first name" field and "last name" field + Point aPosTmp = aFirstName.GetPosPixel(); + aFirstName.SetPosPixel( aName.GetPosPixel() ); + aName.SetPosPixel( aPosTmp ); + aFirstName.SetZOrder( &aName, WINDOW_ZORDER_BEHIND ); + } else { aUsCityEdit.Hide(); diff --git a/svx/source/intro/intro_tmpl.hrc b/svx/source/intro/intro_tmpl.hrc index 0f1b36e0c9f6..ad3a628213be 100644 --- a/svx/source/intro/intro_tmpl.hrc +++ b/svx/source/intro/intro_tmpl.hrc @@ -269,9 +269,9 @@ ItemList = \ < "Darin Fisher" ; > ; \ < "Nicole M. Follet-Dunn" ; > ; \ < "Kenneth Foskey" ; > ; \ - < "Peter Frandsen" ; > ; \ < "Duncan Foster" ; > ; \ < "Tim Foster" ; > ; \ + < "Peter Frandsen" ; > ; \ < "Gary Frederick" ; > ; \ < "Nils Fuhrmann" ; > ; \ < "Jan Funken" ; > ; \ diff --git a/svx/source/mnuctrls/clipboardctl.cxx b/svx/source/mnuctrls/clipboardctl.cxx index 82dc919bb729..3cd538e4c079 100644 --- a/svx/source/mnuctrls/clipboardctl.cxx +++ b/svx/source/mnuctrls/clipboardctl.cxx @@ -143,16 +143,6 @@ void SvxClipBoardControl::StateChanged( USHORT nSID, SfxItemState eState, const GetToolBox().SetItemBits( GetId(), GetToolBox().GetItemBits( GetId() ) & ~TIB_DROPDOWN ); GetToolBox().Invalidate( GetToolBox().GetItemRect( GetId() ) ); } - #ifdef UNIX - // #b6673979# enable some slots hardly, because UNIX clipboard does not notify all changes - // Can be removed if follow up task will be fixed directly within applications. - else - if ( SID_PASTE == nSID ) - { - bDisabled = false; - GetToolBox().EnableItem( GetId(), true ); - } - #endif else { // enable the item as a whole diff --git a/svx/source/options/optgenrl.src b/svx/source/options/optgenrl.src index 52e031f1099f..cff6f8d4216c 100644 --- a/svx/source/options/optgenrl.src +++ b/svx/source/options/optgenrl.src @@ -74,6 +74,14 @@ TabPage RID_SFXPAGE_GENERAL Hide = TRUE; Text [ en-US ] = "Last Name/First name/Father's name/Initials"; }; + FixedText FT_NAME_EASTERN + { + Pos = MAP_APPFONT ( LEFT , FLINE ( 1 ) ) ; + Size = MAP_APPFONT ( MID-LEFT-2 , FLINEH ) ; + LeftLabel = TRUE ; + Hide = TRUE; + Text [ en-US ] = "Last/First ~name/Initials" ; + }; Edit ED_FATHERNAME { Border = TRUE ; -- cgit From 68d26cc9d7ec389e1bbf3ac8851613f4e46b6689 Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Fri, 18 Sep 2009 12:40:04 +0000 Subject: CWS-TOOLING: integrate CWS cmcfixes63 2009-09-16 11:24:47 +0200 cmc r276193 : #i105118# remove overly const warnings for -Wall 2009-09-15 18:04:24 +0200 cmc r276183 : #i105089# fix include 2009-09-15 14:30:55 +0200 cmc r276176 : #i105090# fix includes for s390x bridge --- svx/inc/svx/sdr/overlay/overlayselection.hxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'svx') diff --git a/svx/inc/svx/sdr/overlay/overlayselection.hxx b/svx/inc/svx/sdr/overlay/overlayselection.hxx index fe725a577eec..17f32ee419e9 100644 --- a/svx/inc/svx/sdr/overlay/overlayselection.hxx +++ b/svx/inc/svx/sdr/overlay/overlayselection.hxx @@ -78,7 +78,7 @@ namespace sdr virtual ~OverlaySelection(); // data read access - const OverlayType getOverlayType() const { return meOverlayType; } + OverlayType getOverlayType() const { return meOverlayType; } const std::vector< basegfx::B2DRange >& getRanges() const { return maRanges; } bool getBorder() const { return mbBorder; } -- cgit From 8c584fe8f0548e22777ee728d16a2e36f5bd6834 Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Fri, 18 Sep 2009 15:39:21 +0000 Subject: CWS-TOOLING: integrate CWS impressaccessibility3 2009-09-18 16:10:59 +0200 af r276289 : #i102525# Fixed some minor compilation problems. 2009-09-17 14:11:23 +0200 af r276243 : #i102525# Fixed F1 shortcut for help view. 2009-09-16 16:20:58 +0200 af r276205 : #i102525# Removing const to make Solaris linker happy. 2009-09-16 16:13:25 +0200 af r276204 : #i90690# Initializing variable to avoid compilation problem. 2009-09-15 19:10:04 +0200 af r276186 : #i90825# Replace edit source proxy when an outliner object is set. 2009-09-15 11:12:07 +0200 af r276160 : #i90690# Broadcast accessibility events when the current slide is changed. 2009-09-15 09:37:48 +0200 af r276148 : #i102525# Fixed Solaris compilation problem. 2009-09-14 18:12:40 +0200 af r276142 : #i102525# Added missing implementation for some font related functions. 2009-09-14 18:02:05 +0200 af r276139 : #i102525# Added accessibility support. 2009-09-14 17:30:13 +0200 af r276136 : #i102525# Added support for interface XPane2 to panes. 2009-09-14 17:00:27 +0200 af r276133 : #i102525# Added XPane2 interface. 2009-09-14 16:13:04 +0200 af r276131 : #i50376# Make the focus indicator visible when the slide sorter has the focus. --- svx/source/accessibility/AccessibleEmptyEditSource.cxx | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'svx') diff --git a/svx/source/accessibility/AccessibleEmptyEditSource.cxx b/svx/source/accessibility/AccessibleEmptyEditSource.cxx index 6420a14c98ae..15da06a17054 100644 --- a/svx/source/accessibility/AccessibleEmptyEditSource.cxx +++ b/svx/source/accessibility/AccessibleEmptyEditSource.cxx @@ -340,6 +340,13 @@ namespace accessibility if( mbEditSourceEmpty ) Switch2ProxyEditSource(); } + else if (pSdrHint && pSdrHint->GetObject()!=NULL) + { + // When the SdrObject just got a para outliner object then + // switch the edit source. + if (pSdrHint->GetObject()->GetOutlinerParaObject() != NULL) + Switch2ProxyEditSource(); + } // forward messages Broadcast( rHint ); -- cgit From d507cdf83a74b4d468b6e5682a1434bad7f792c8 Mon Sep 17 00:00:00 2001 From: Vladimir Glazounov Date: Thu, 1 Oct 2009 10:20:24 +0000 Subject: CWS-TOOLING: integrate CWS impressnotes03 2009-09-28 16:30:17 +0200 cl r276496 : #i105382# use correct method to get master page 2009-09-28 12:23:04 +0200 cl r276486 : #i105266# also save text on close to avoid focus trouble under linux 2009-09-25 13:59:50 +0200 cl r276456 : #i105266# resolved a merge conflict 2009-09-25 13:57:24 +0200 cl r276454 : #i105266# resolved a merge conflict 2009-09-25 13:51:12 +0200 cl r276450 : #i105266# resolved a merge conflict 2009-09-25 13:40:08 +0200 cl r276447 : #i105266# resolved a merge conflict --- svx/inc/svx/svxids.hrc | 4 ++-- svx/sdi/svx.sdi | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'svx') diff --git a/svx/inc/svx/svxids.hrc b/svx/inc/svx/svxids.hrc index a4b0d8736618..4e3b1ebf4889 100644 --- a/svx/inc/svx/svxids.hrc +++ b/svx/inc/svx/svxids.hrc @@ -1351,7 +1351,6 @@ #define SID_ATTR_PARA_OUTLINE_LEVEL (SID_SVX_START+1092) #define SID_OBJECT_MIRROR (SID_SVX_START+1093) -#define SID_INSERT_POSTIT (SID_SVX_START+1093) #define SID_DELETE_POSTIT (SID_SVX_START+1094) #define SID_NEXT_POSTIT (SID_SVX_START+1095) #define SID_PREVIOUS_POSTIT (SID_SVX_START+1096) @@ -1359,9 +1358,10 @@ #define SID_SHOW_POSTIT (SID_SVX_START+1098) #define SID_REPLYTO_POSTIT (SID_SVX_START+1099) #define SID_DELETEALLBYAUTHOR_POSTIT (SID_SVX_START+1100) +#define SID_INSERT_POSTIT (SID_SVX_START+1101) // IMPORTANT NOTE: adjust SID_SVX_FIRSTFREE, when adding new slot id -#define SID_SVX_FIRSTFREE SID_DELETEALLBYAUTHOR_POSTIT + 1 +#define SID_SVX_FIRSTFREE SID_INSERT_POSTIT + 1 // -------------------------------------------------------------------------- // Overflow check for slot IDs diff --git a/svx/sdi/svx.sdi b/svx/sdi/svx.sdi index 28f50ef89b5c..e3826708c196 100644 --- a/svx/sdi/svx.sdi +++ b/svx/sdi/svx.sdi @@ -5954,7 +5954,7 @@ SfxVoidItem InsertAnnotation SID_INSERT_POSTIT ] //-------------------------------------------------------------------------- -SfxBoolItem ShowAnnotation SID_SHOW_POSTIT +SfxBoolItem ShowAnnotations SID_SHOW_POSTIT () [ /* flags: */ -- cgit From 2d5e9e410be4a8a96b37acdaff8a7f9b2758b1c8 Mon Sep 17 00:00:00 2001 From: Vladimir Glazounov Date: Thu, 1 Oct 2009 10:29:37 +0000 Subject: CWS-TOOLING: integrate CWS sw32bf04 2009-09-22 Michael Stahl galobj.hxx: do not export SgaObject methods (fixes wntmsci12 build) 2009-09-21 Michael Stahl #i105149# #i93308# svx: unofield.cxx: support field services with proper case 2009-09-21 Michael Stahl #i105149# #i102468# sc: servuno.cxx: support field services with proper case 2009-09-21 Michael Stahl #i105149# txtflde.cxx: support docinfo field services with proper case 2009-09-18 Michael Stahl #i105148# fmtatr2.cxx: SwFmtMeta::Clone(): avoid assert on clone pool default 2009-09-18 Michael Stahl #i105148# fmtatr2.cxx: SwFmtMeta::~SwFmtMeta(): check if m_pMeta != 0 2009-09-18 Michael Stahl #i105179# unocoll.cxx: SwXFrames::getByName(): add missing breaks 2009-09-18 Michael Stahl dbgoutsw.cxx: explicitly convert from SwNodeIndex to SwPosition 2009-09-18 Michael Stahl galobj.hxx: export class SgaObject from svxcore, needed by unogalitem.cxx 2009-09-17 Michael Stahl #i105149# txtflde.cxx: compare text field prefix case-insensitively 2009-09-16 Michael Stahl #i105117# docdde.cxx: fix possible NULL dereference (patch by cmc) 2009-09-16 Michael Stahl #i105124# docdde.cxx: fix use-after-free bug: make _FindItem member String --- svx/inc/galobj.hxx | 6 +++--- svx/source/unodraw/unomod.cxx | 5 ++++- svx/source/unoedit/unofield.cxx | 30 +++++++++++++++++++++++++----- svx/source/xml/xmltxtexp.cxx | 6 +++++- 4 files changed, 37 insertions(+), 10 deletions(-) (limited to 'svx') diff --git a/svx/inc/galobj.hxx b/svx/inc/galobj.hxx index ce2b481bdcdf..a33a1b5cbd81 100644 --- a/svx/inc/galobj.hxx +++ b/svx/inc/galobj.hxx @@ -85,7 +85,7 @@ enum GalSoundType // - SgaObject - // ------------- -class SgaObject +class SVX_DLLPUBLIC SgaObject { friend class GalleryTheme; @@ -122,8 +122,8 @@ public: BOOL IsValid() const { return bIsValid; } BOOL IsThumbBitmap() const { return bIsThumbBmp; } - SVX_DLLPUBLIC const String GetTitle() const; - SVX_DLLPUBLIC void SetTitle( const String& rTitle ); + const String GetTitle() const; + void SetTitle( const String& rTitle ); friend SvStream& operator<<( SvStream& rOut, const SgaObject& rObj ); friend SvStream& operator>>( SvStream& rIn, SgaObject& rObj ); diff --git a/svx/source/unodraw/unomod.cxx b/svx/source/unodraw/unomod.cxx index 7f7aedf860e9..c0e301f3792e 100644 --- a/svx/source/unodraw/unomod.cxx +++ b/svx/source/unodraw/unomod.cxx @@ -252,7 +252,10 @@ uno::Reference< uno::XInterface > SAL_CALL SvxUnoDrawMSFactory::createTextField( { nId = ID_EXT_FILEFIELD; } - else if( aFieldType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("DocInfo.Title") ) ) + else if (aFieldType.equalsAsciiL( + RTL_CONSTASCII_STRINGPARAM("docinfo.Title") ) || + aFieldType.equalsAsciiL( + RTL_CONSTASCII_STRINGPARAM("DocInfo.Title") ) ) { nId = ID_FILEFIELD; } diff --git a/svx/source/unoedit/unofield.cxx b/svx/source/unoedit/unofield.cxx index efb4226f9c12..6ff4c2aafe3e 100644 --- a/svx/source/unoedit/unofield.cxx +++ b/svx/source/unoedit/unofield.cxx @@ -1062,7 +1062,7 @@ OUString SAL_CALL SvxUnoTextField::getImplementationName() throw(uno::RuntimeExc return OUString(RTL_CONSTASCII_USTRINGPARAM("SvxUnoTextField")); } -static const sal_Char* pServiceNames[] = +static const sal_Char* pOldServiceNames[] = { "com.sun.star.text.TextField.DateTime", "com.sun.star.text.TextField.URL", @@ -1081,14 +1081,34 @@ static const sal_Char* pServiceNames[] = "com.sun.star.presentation.TextField.DateTime" }; +static const sal_Char* pNewServiceNames[] = +{ + "com.sun.star.text.textfield.DateTime", + "com.sun.star.text.textfield.URL", + "com.sun.star.text.textfield.PageNumber", + "com.sun.star.text.textfield.PageCount", + "com.sun.star.text.textfield.DateTime", + "com.sun.star.text.textfield.docinfo.Title", // SvxFileField is used for title + "com.sun.star.text.textfield.SheetName", + "com.sun.star.text.textfield.DateTime", + "com.sun.star.text.textfield.FileName", + "com.sun.star.text.textfield.Author", + "com.sun.star.text.textfield.Measure", + "com.sun.star.text.textfield.DateTime", + "com.sun.star.presentation.textfield.Header", + "com.sun.star.presentation.textfield.Footer", + "com.sun.star.presentation.textfield.DateTime" +}; + uno::Sequence< OUString > SAL_CALL SvxUnoTextField::getSupportedServiceNames() throw(uno::RuntimeException) { - uno::Sequence< OUString > aSeq( 3 ); + uno::Sequence< OUString > aSeq( 4 ); OUString* pServices = aSeq.getArray(); - pServices[0] = OUString::createFromAscii( pServiceNames[mnServiceId] ); - pServices[1] = OUString::createFromAscii( "com.sun.star.text.TextContent" ), - pServices[2] = OUString::createFromAscii( "com.sun.star.text.TextField" ); + pServices[0] = OUString::createFromAscii( pNewServiceNames[mnServiceId] ); + pServices[1] = OUString::createFromAscii( pOldServiceNames[mnServiceId] ); + pServices[2] = OUString::createFromAscii( "com.sun.star.text.TextContent" ), + pServices[3] = OUString::createFromAscii( "com.sun.star.text.TextField" ); return aSeq; } diff --git a/svx/source/xml/xmltxtexp.cxx b/svx/source/xml/xmltxtexp.cxx index 4f034b098db7..5db6cc809bce 100644 --- a/svx/source/xml/xmltxtexp.cxx +++ b/svx/source/xml/xmltxtexp.cxx @@ -247,7 +247,11 @@ uno::Reference< uno::XInterface > SAL_CALL SvxSimpleUnoModel::createInstance( co return uno::Reference< uno::XInterface >( SvxCreateNumRule( (SdrModel*)NULL ), uno::UNO_QUERY ); } - if( 0 == aServiceSpecifier.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.TextField.DateTime") ) ) + if ( (0 == aServiceSpecifier.reverseCompareToAsciiL( + RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.textfield.DateTime"))) + || (0 == aServiceSpecifier.reverseCompareToAsciiL( + RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.TextField.DateTime"))) + ) { return (::cppu::OWeakObject * )new SvxUnoTextField( ID_EXT_DATEFIELD ); } -- cgit