From e7638a7e6461f971cfde4b99fd9e246537a2f222 Mon Sep 17 00:00:00 2001 From: Gregor Hartmann Date: Fri, 4 Jun 2010 13:26:01 +0200 Subject: #i111784# call hooks after selecting in tabelcontrol --- automation/source/server/statemnt.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/automation/source/server/statemnt.cxx b/automation/source/server/statemnt.cxx index 2d1cccd9fc51..6a04c85c66de 100644 --- a/automation/source/server/statemnt.cxx +++ b/automation/source/server/statemnt.cxx @@ -6282,6 +6282,8 @@ protected: MouseEvent aMEvnt(aPos,1,MOUSE_SIMPLECLICK|MOUSE_SELECT,MOUSE_LEFT,KEY_MOD1); pTC->getSelEngine()->SelMouseButtonDown( aMEvnt ); pTC->getSelEngine()->SelMouseButtonUp( aMEvnt ); + if ( pTC->IsRowSelected( nNr1-1 ) ) + pTC->Select(); } else ReportError( aUId, GEN_RES_STR2c2( S_METHOD_FAILED, MethodString( nMethodId ), "find pos" ) ); -- cgit v1.2.3 From 7c367ef0a8380cb55104f6a7d76fa7709ae07dd7 Mon Sep 17 00:00:00 2001 From: Gregor Hartmann Date: Fri, 4 Jun 2010 15:45:26 +0200 Subject: fix inconsistency with direct calling of buttons on a toolbox --- automation/source/server/statemnt.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/automation/source/server/statemnt.cxx b/automation/source/server/statemnt.cxx index 6a04c85c66de..87f479d67512 100644 --- a/automation/source/server/statemnt.cxx +++ b/automation/source/server/statemnt.cxx @@ -5311,13 +5311,13 @@ BOOL StatementControl::Execute() { // Wir flschen einen Parameter if ( aUId.HasNumeric() ) { - nParams = PARAM_ULONG_1; + nParams |= PARAM_ULONG_1; nLNr1 = USHORT( aUId.GetNum() ); DBG_ASSERT( nLNr1 <= 0xFFFF, "ID on ToolBox > 0xFFFF" ); } else { - nParams = PARAM_STR_1; + nParams |= PARAM_STR_1; aString1 = aUId.GetStr(); } } @@ -5330,9 +5330,9 @@ BOOL StatementControl::Execute() BOOL bItemFound = FALSE;\ {\ SmartId aButtonId;\ - if( nParams == PARAM_STR_1 )\ + if( nParams & PARAM_STR_1 )\ aButtonId = SmartId( aString1 );\ - if( nParams == PARAM_ULONG_1 )\ + if( nParams & PARAM_ULONG_1 )\ aButtonId = SmartId( nLNr1 );\ for ( nItemPos = 0; nItemPos < pTB->GetItemCount() && !aButtonId.Matches(pTB->GetItemCommand(pTB->GetItemId(nItemPos))) &&\ !aButtonId.Matches(pTB->GetHelpId(pTB->GetItemId(nItemPos))) ; nItemPos++ ) {}\ -- cgit v1.2.3 From b6103ae98b92524b04d3fe261c445135002a65c2 Mon Sep 17 00:00:00 2001 From: Dirk Völzke Date: Mon, 24 Aug 2009 07:40:00 +0000 Subject: #i88957# Improved handling of already downloaded updates --- extensions/source/update/check/download.cxx | 48 ++++++++++++-- extensions/source/update/check/download.hxx | 2 + extensions/source/update/check/updatecheck.cxx | 69 +++++++++++++++++---- extensions/source/update/check/updatecheck.hxx | 2 + extensions/source/update/check/updatehdl.cxx | 86 ++++++++++++++++++++++++++ extensions/source/update/check/updatehdl.hrc | 3 + extensions/source/update/check/updatehdl.hxx | 5 ++ extensions/source/update/check/updatehdl.src | 15 +++++ 8 files changed, 213 insertions(+), 17 deletions(-) diff --git a/extensions/source/update/check/download.cxx b/extensions/source/update/check/download.cxx index eaa16a9f9368..8c64c037da7e 100644 --- a/extensions/source/update/check/download.cxx +++ b/extensions/source/update/check/download.cxx @@ -172,7 +172,9 @@ progress_callback( void *clientp, double dltotal, double dlnow, double ultotal, if( ! out->StopCondition.check() ) { - double fPercent = (dlnow + out->Offset) * 100 / (dltotal + out->Offset); + double fPercent = 0; + if ( dltotal + out->Offset ) + fPercent = (dlnow + out->Offset) * 100 / (dltotal + out->Offset); if( fPercent < 0 ) fPercent = 0; @@ -333,14 +335,52 @@ Download::start(const rtl::OUString& rURL, const rtl::OUString& rFile, const rtl OSL_ASSERT( m_aHandler.is() ); OutData out(m_aCondition); + rtl::OUString aFile( rFile ); - out.File = rFile; + // when rFile is empty, there is no remembered file name. If there is already a file with the + // same name ask the user if she wants to resume a download or restart the download + if ( !aFile.getLength() ) + { + // GetFileName() + rtl::OUString aURL( rURL ); + // ensure no trailing '/' + sal_Int32 nLen = aURL.getLength(); + while( (nLen > 0) && ('/' == aURL[ nLen-1 ]) ) + aURL = aURL.copy( 0, --nLen ); + + // extract file name last '/' + sal_Int32 nIndex = aURL.lastIndexOf('/'); + aFile = rDestinationDir + aURL.copy( nIndex ); + + // check for existing file + oslFileError rc = osl_openFile( aFile.pData, &out.FileHandle, osl_File_OpenFlag_Write | osl_File_OpenFlag_Create ); + osl_closeFile(out.FileHandle); + out.FileHandle = NULL; + + if( osl_File_E_EXIST == rc ) + { + if ( m_aHandler->checkDownloadDestination( aURL.copy( nIndex+1 ) ) ) + { + osl_removeFile( aFile.pData ); + aFile = rtl::OUString(); + } + else + m_aHandler->downloadStarted( aFile, 1 ); + } + else + { + osl_removeFile( aFile.pData ); + aFile = rtl::OUString(); + } + } + + out.File = aFile; out.DestinationDir = rDestinationDir; out.Handler = m_aHandler; - if( rFile.getLength() > 0 ) + if( aFile.getLength() > 0 ) { - oslFileError rc = osl_openFile(rFile.pData, &out.FileHandle, osl_File_OpenFlag_Write); + oslFileError rc = osl_openFile(aFile.pData, &out.FileHandle, osl_File_OpenFlag_Write); if( osl_File_E_None == rc ) { diff --git a/extensions/source/update/check/download.hxx b/extensions/source/update/check/download.hxx index 24c2842a709d..034f39dbe733 100644 --- a/extensions/source/update/check/download.hxx +++ b/extensions/source/update/check/download.hxx @@ -38,6 +38,8 @@ struct DownloadInteractionHandler : public rtl::IReference { + virtual bool checkDownloadDestination(const rtl::OUString& rFileName) = 0; + // called if the destination file already exists, but resume is false virtual bool downloadTargetExists(const rtl::OUString& rFileName) = 0; diff --git a/extensions/source/update/check/updatecheck.cxx b/extensions/source/update/check/updatecheck.cxx index 23d4da29a41f..09776f1fc1c4 100644 --- a/extensions/source/update/check/updatecheck.cxx +++ b/extensions/source/update/check/updatecheck.cxx @@ -785,6 +785,8 @@ UpdateCheck::initialize(const uno::Sequence< beans::NamedValue >& rValues, aModel.getUpdateEntry(m_aUpdateInfo); bool obsoleteUpdateInfo = isObsoleteUpdateInfo(aUpdateEntryVersion); + bool bContinueDownload = false; + bool bDownloadAvailable = false; m_bHasExtensionUpdate = checkForPendingUpdates( xContext ); m_bShowExtUpdDlg = false; @@ -793,10 +795,7 @@ UpdateCheck::initialize(const uno::Sequence< beans::NamedValue >& rValues, if( aLocalFileName.getLength() > 0 ) { - bool downloadPaused = aModel.isDownloadPaused(); - - enableDownload(true, downloadPaused); - setUIState(downloadPaused ? UPDATESTATE_DOWNLOAD_PAUSED : UPDATESTATE_DOWNLOADING); + bContinueDownload = true; // Try to get the number of bytes already on disk osl::DirectoryItem aDirectoryItem; @@ -805,16 +804,36 @@ UpdateCheck::initialize(const uno::Sequence< beans::NamedValue >& rValues, osl::FileStatus aFileStatus(FileStatusMask_FileSize); if( osl::DirectoryItem::E_None == aDirectoryItem.getFileStatus(aFileStatus) ) { - // Calculate initial percent value. - if( aModel.getDownloadSize() > 0 ) + sal_Int64 nDownloadSize = aModel.getDownloadSize(); + sal_Int64 nFileSize = aFileStatus.getFileSize(); + + if( nDownloadSize > 0 ) { - sal_Int32 nPercent = (sal_Int32) (100 * aFileStatus.getFileSize() / aModel.getDownloadSize()); - getUpdateHandler()->setProgress(nPercent); + if ( nDownloadSize == nFileSize ) // we have already downloaded everthing + { + bContinueDownload = false; + bDownloadAvailable = true; + m_aImageName = getImageFromFileName( aLocalFileName ); + } + else // Calculate initial percent value. + { + sal_Int32 nPercent = (sal_Int32) (100 * nFileSize / nDownloadSize); + getUpdateHandler()->setProgress( nPercent ); + } } } } + + if ( bContinueDownload ) + { + bool downloadPaused = aModel.isDownloadPaused(); + + enableDownload(true, downloadPaused); + setUIState(downloadPaused ? UPDATESTATE_DOWNLOAD_PAUSED : UPDATESTATE_DOWNLOADING); + } + } - else + if ( !bContinueDownload ) { // We do this intentionally only if no download is in progress .. if( obsoleteUpdateInfo ) @@ -827,13 +846,18 @@ UpdateCheck::initialize(const uno::Sequence< beans::NamedValue >& rValues, // Data is outdated, probably due to installed update rtl::Reference< UpdateCheckConfig > aConfig = UpdateCheckConfig::get( xContext, *this ); aConfig->clearUpdateFound(); + aConfig->clearLocalFileName(); + m_aUpdateInfo = UpdateInfo(); } else { enableAutoCheck(aModel.isAutoCheckEnabled()); - setUIState(getUIState(m_aUpdateInfo)); + if ( bDownloadAvailable ) + setUIState( UPDATESTATE_DOWNLOAD_AVAIL ); + else + setUIState(getUIState(m_aUpdateInfo)); } } } @@ -922,6 +946,10 @@ UpdateCheck::install() aParameter += UNISTRING(" &"); #endif + + rtl::Reference< UpdateCheckConfig > rModel = UpdateCheckConfig::get( m_xContext ); + rModel->clearLocalFileName(); + xShellExecute->execute(aInstallImage, aParameter, nFlags); ShutdownThread *pShutdownThread = new ShutdownThread( m_xContext ); (void) pShutdownThread; @@ -1086,6 +1114,23 @@ UpdateCheck::downloadTargetExists(const rtl::OUString& rFileName) return cont; } +//------------------------------------------------------------------------------ +bool UpdateCheck::checkDownloadDestination( const rtl::OUString& rFileName ) +{ + osl::ClearableMutexGuard aGuard(m_aMutex); + + rtl::Reference< UpdateHandler > aUpdateHandler( getUpdateHandler() ); + + bool bReload = false; + + if( aUpdateHandler->isVisible() ) + { + bReload = aUpdateHandler->showOverwriteWarning( rFileName ); + } + + return bReload; +} + //------------------------------------------------------------------------------ void @@ -1138,9 +1183,6 @@ UpdateCheck::downloadFinished(const rtl::OUString& rLocalFileName) // no more retries m_pThread->terminate(); - rtl::Reference< UpdateCheckConfig > rModel = UpdateCheckConfig::get(m_xContext); - rModel->clearLocalFileName(); - m_aImageName = getImageFromFileName(rLocalFileName); UpdateInfo aUpdateInfo(m_aUpdateInfo); @@ -1148,6 +1190,7 @@ UpdateCheck::downloadFinished(const rtl::OUString& rLocalFileName) setUIState(UPDATESTATE_DOWNLOAD_AVAIL); // Bring-up release note for position 2 .. + rtl::Reference< UpdateCheckConfig > rModel = UpdateCheckConfig::get( m_xContext ); const rtl::OUString aURL(getReleaseNote(aUpdateInfo, 2, rModel->isAutoDownloadEnabled())); if( aURL.getLength() > 0 ) showReleaseNote(aURL); diff --git a/extensions/source/update/check/updatecheck.hxx b/extensions/source/update/check/updatecheck.hxx index c3a088897860..ff16fc3ed95b 100644 --- a/extensions/source/update/check/updatecheck.hxx +++ b/extensions/source/update/check/updatecheck.hxx @@ -114,6 +114,8 @@ public: virtual void downloadProgressAt(sal_Int8 nProcent); virtual void downloadStarted(const rtl::OUString& rLocalFileName, sal_Int64 nFileSize); virtual void downloadFinished(const rtl::OUString& rLocalFileName); + // checks if the download target already exists and asks user what to do next + virtual bool checkDownloadDestination( const rtl::OUString& rFile ); // Cancels the download action (and resumes checking if enabled) void cancelDownload(); diff --git a/extensions/source/update/check/updatehdl.cxx b/extensions/source/update/check/updatehdl.cxx index 19ca5588c09c..e94b91c4126d 100644 --- a/extensions/source/update/check/updatehdl.cxx +++ b/extensions/source/update/check/updatehdl.cxx @@ -54,6 +54,7 @@ #include "com/sun/star/awt/XThrobber.hpp" #include "com/sun/star/awt/XTopWindow.hpp" #include "com/sun/star/awt/XVclWindowPeer.hpp" +#include "com/sun/star/awt/XVclContainer.hpp" #include "com/sun/star/awt/XWindow.hpp" #include "com/sun/star/awt/XWindow2.hpp" @@ -230,6 +231,11 @@ void UpdateHandler::setVisible( bool bVisible ) //-------------------------------------------------------------------- void UpdateHandler::setProgress( sal_Int32 nPercent ) { + if ( nPercent > 100 ) + nPercent = 100; + else if ( nPercent < 0 ) + nPercent = 0; + if ( nPercent != mnPercent ) { osl::MutexGuard aGuard( maMutex ); @@ -705,6 +711,9 @@ void UpdateHandler::loadStrings() msInstallError = loadString( xBundle, RID_UPDATE_STR_INSTALL_ERROR ); msOverwriteWarning = loadString( xBundle, RID_UPDATE_STR_OVERWRITE_WARNING ); msPercent = loadString( xBundle, RID_UPDATE_STR_PERCENT ); + msReloadWarning = loadString( xBundle, RID_UPDATE_STR_RELOAD_WARNING ); + msReloadReload = loadString( xBundle, RID_UPDATE_STR_RELOAD_RELOAD ); + msReloadContinue = loadString( xBundle, RID_UPDATE_STR_RELOAD_CONTINUE ); msStatusFL = loadString( xBundle, RID_UPDATE_FT_STATUS ); msDescription = loadString( xBundle, RID_UPDATE_FT_DESCRIPTION ); @@ -956,6 +965,83 @@ bool UpdateHandler::showWarning( const rtl::OUString &rWarningText ) const return bRet; } +//-------------------------------------------------------------------- +bool UpdateHandler::showWarning( const rtl::OUString &rWarningText, + const rtl::OUString &rBtnText_1, + const rtl::OUString &rBtnText_2 ) const +{ + bool bRet = false; + + uno::Reference< awt::XControl > xControl( mxUpdDlg, uno::UNO_QUERY ); + if ( !xControl.is() ) return bRet; + + uno::Reference< awt::XWindowPeer > xPeer = xControl->getPeer(); + if ( !xPeer.is() ) return bRet; + + uno::Reference< awt::XToolkit > xToolkit = xPeer->getToolkit(); + if ( !xToolkit.is() ) return bRet; + + awt::WindowDescriptor aDescriptor; + + sal_Int32 nWindowAttributes = awt::WindowAttribute::BORDER | awt::WindowAttribute::MOVEABLE | awt::WindowAttribute::CLOSEABLE; + nWindowAttributes |= awt::VclWindowPeerAttribute::YES_NO; + nWindowAttributes |= awt::VclWindowPeerAttribute::DEF_NO; + + aDescriptor.Type = awt::WindowClass_MODALTOP; + aDescriptor.WindowServiceName = UNISTRING( "warningbox" ); + aDescriptor.ParentIndex = -1; + aDescriptor.Parent = xPeer; + aDescriptor.Bounds = awt::Rectangle( 10, 10, 250, 150 ); + aDescriptor.WindowAttributes = nWindowAttributes; + + uno::Reference< awt::XMessageBox > xMsgBox( xToolkit->createWindow( aDescriptor ), uno::UNO_QUERY ); + if ( xMsgBox.is() ) + { + uno::Reference< awt::XVclContainer > xMsgBoxCtrls( xMsgBox, uno::UNO_QUERY ); + if ( xMsgBoxCtrls.is() ) + { + uno::Sequence< uno::Reference< awt::XWindow > > xChildren = xMsgBoxCtrls->getWindows(); + + for ( long i=0; i < xChildren.getLength(); i++ ) + { + uno::Reference< awt::XVclWindowPeer > xMsgBoxCtrl( xChildren[i], uno::UNO_QUERY ); + if ( xMsgBoxCtrl.is() ) + { + bool bIsDefault; + uno::Any aValue = xMsgBoxCtrl->getProperty( UNISTRING("DefaultButton") ); + aValue >>= bIsDefault; + if ( bIsDefault ) + xMsgBoxCtrl->setProperty( UNISTRING("Text"), uno::Any( rBtnText_1 ) ); + else + xMsgBoxCtrl->setProperty( UNISTRING("Text"), uno::Any( rBtnText_2 ) ); + } + } + } + + sal_Int16 nRet; + // xMsgBox->setCaptionText( msCancelTitle ); + xMsgBox->setMessageText( rWarningText ); + nRet = xMsgBox->execute(); + if ( nRet == 2 ) // RET_YES == 2 + bRet = true; + } + + uno::Reference< lang::XComponent > xComponent( xMsgBox, uno::UNO_QUERY ); + if ( xComponent.is() ) + xComponent->dispose(); + + return bRet; +} + +//-------------------------------------------------------------------- +bool UpdateHandler::showOverwriteWarning( const rtl::OUString& rFileName ) const +{ + rtl::OUString aMsg( msReloadWarning ); + searchAndReplaceAll( aMsg, UNISTRING( "%FILENAME" ), rFileName ); + searchAndReplaceAll( aMsg, UNISTRING( "%DOWNLOAD_PATH" ), msDownloadPath ); + return showWarning( aMsg, msReloadContinue, msReloadReload ); +} + //-------------------------------------------------------------------- bool UpdateHandler::showOverwriteWarning() const { diff --git a/extensions/source/update/check/updatehdl.hrc b/extensions/source/update/check/updatehdl.hrc index 906a2e2a5db7..567269f97e52 100644 --- a/extensions/source/update/check/updatehdl.hrc +++ b/extensions/source/update/check/updatehdl.hrc @@ -50,6 +50,9 @@ #define RID_UPDATE_STR_PERCENT RID_UPDATE_HDL_START + 18 #define RID_UPDATE_STR_DOWNLOAD_DESCR RID_UPDATE_HDL_START + 19 #define RID_UPDATE_STR_INSTALL_ERROR RID_UPDATE_HDL_START + 20 + #define RID_UPDATE_STR_RELOAD_WARNING RID_UPDATE_HDL_START + 21 + #define RID_UPDATE_STR_RELOAD_RELOAD RID_UPDATE_HDL_START + 22 + #define RID_UPDATE_STR_RELOAD_CONTINUE RID_UPDATE_HDL_START + 23 #define RID_UPDATE_FT_DESCRIPTION RID_UPDATE_HDL_START + 25 #define RID_UPDATE_FT_STATUS RID_UPDATE_HDL_START + 26 diff --git a/extensions/source/update/check/updatehdl.hxx b/extensions/source/update/check/updatehdl.hxx index 9b33098f30f1..f54eca5008b8 100644 --- a/extensions/source/update/check/updatehdl.hxx +++ b/extensions/source/update/check/updatehdl.hxx @@ -128,6 +128,9 @@ private: rtl::OUString msInstallError; // RID_UPDATE_STR_INSTALL_ERROR rtl::OUString msOverwriteWarning; // RID_UPDATE_STR_OVERWRITE_WARNING rtl::OUString msPercent; // RID_UPDATE_STR_PERCENT + rtl::OUString msReloadWarning; // RID_UPDATE_STR_OVERWRITE_WARNING + rtl::OUString msReloadReload; // RID_UPDATE_STR_OVERWRITE_WARNING + rtl::OUString msReloadContinue; // RID_UPDATE_STR_OVERWRITE_WARNING rtl::OUString msStatusFL; // RID_UPDATE_FT_STATUS rtl::OUString msDescription; // RID_UPDATE_FT_DESCRIPTION rtl::OUString msClose; // RID_UPDATE_BTN_CLOSE @@ -187,6 +190,8 @@ public: rtl::OUString getBubbleTitle( UpdateState eState ); rtl::OUString getDefaultInstErrMsg(); bool showWarning( const rtl::OUString &rWarning ) const; + bool showWarning( const rtl::OUString &rWarning, const rtl::OUString& rBtnText_1, const rtl::OUString& rBtnText_2 ) const; + bool showOverwriteWarning( const rtl::OUString &rFileName ) const; bool showOverwriteWarning() const; // Allows runtime exceptions to be thrown by const methods diff --git a/extensions/source/update/check/updatehdl.src b/extensions/source/update/check/updatehdl.src index 7e846d3d9185..99e4a6dcbf59 100644 --- a/extensions/source/update/check/updatehdl.src +++ b/extensions/source/update/check/updatehdl.src @@ -125,6 +125,21 @@ String RID_UPDATE_STR_OVERWRITE_WARNING Text [ en-US ] = "A file with that name already exists! Do you want to overwrite the existing file?"; }; +String RID_UPDATE_STR_RELOAD_WARNING +{ + Text [ en-US ] = "A file with the name '%FILENAME' already exists in '%DOWNLOAD_PATH'! Do you want to continue with the download or delete and reload the file?"; +}; + +String RID_UPDATE_STR_RELOAD_RELOAD +{ + Text [ en-US ] = "Reload File"; +}; + +String RID_UPDATE_STR_RELOAD_CONTINUE +{ + Text [ en-US ] = "Continue"; +}; + String RID_UPDATE_STR_PERCENT { Text [ en-US ] = "%PERCENT%"; -- cgit v1.2.3 From 02e47dac20beb7d9d9d96942a77087c4215a944f Mon Sep 17 00:00:00 2001 From: Dirk Völzke Date: Tue, 25 Aug 2009 10:52:54 +0000 Subject: #i88957# Improved handling of already downloaded updates --- extensions/source/update/check/updatehdl.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/source/update/check/updatehdl.cxx b/extensions/source/update/check/updatehdl.cxx index e94b91c4126d..01a404465e12 100644 --- a/extensions/source/update/check/updatehdl.cxx +++ b/extensions/source/update/check/updatehdl.cxx @@ -1007,7 +1007,7 @@ bool UpdateHandler::showWarning( const rtl::OUString &rWarningText, uno::Reference< awt::XVclWindowPeer > xMsgBoxCtrl( xChildren[i], uno::UNO_QUERY ); if ( xMsgBoxCtrl.is() ) { - bool bIsDefault; + bool bIsDefault = true; uno::Any aValue = xMsgBoxCtrl->getProperty( UNISTRING("DefaultButton") ); aValue >>= bIsDefault; if ( bIsDefault ) -- cgit v1.2.3 From 4496e7dc73caf6070ccf7d4a170cbdbbefa0d817 Mon Sep 17 00:00:00 2001 From: Dirk Völzke Date: Mon, 21 Sep 2009 11:58:50 +0000 Subject: #i105165# Don't allow quitting the application while modal dialog is shown --- extensions/source/update/check/updatehdl.cxx | 21 +++++++++++++++++++-- extensions/source/update/check/updatehdl.hxx | 1 + 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/extensions/source/update/check/updatehdl.cxx b/extensions/source/update/check/updatehdl.cxx index 01a404465e12..ca9da74d3525 100644 --- a/extensions/source/update/check/updatehdl.cxx +++ b/extensions/source/update/check/updatehdl.cxx @@ -104,7 +104,8 @@ UpdateHandler::UpdateHandler( const uno::Reference< uno::XComponentContext > & r mbVisible( false ), mbStringsLoaded( false ), mbMinimized( false ), - mbListenerAdded(false) + mbListenerAdded(false), + mbShowsMessageBox(false) { } @@ -482,7 +483,18 @@ void SAL_CALL UpdateHandler::handle( uno::Reference< task::XInteractionRequest > void SAL_CALL UpdateHandler::queryTermination( const lang::EventObject& ) throw ( frame::TerminationVetoException, uno::RuntimeException ) { - setVisible( false ); + if ( mbShowsMessageBox ) + { + uno::Reference< awt::XTopWindow > xTopWindow( mxUpdDlg, uno::UNO_QUERY ); + if ( xTopWindow.is() ) + xTopWindow->toFront(); + + throw frame::TerminationVetoException( + UNISTRING("The office cannot be closed while displaying a warning!"), + uno::Reference(static_cast(this), uno::UNO_QUERY)); + } + else + setVisible( false ); } //------------------------------------------------------------------------------ @@ -950,12 +962,14 @@ bool UpdateHandler::showWarning( const rtl::OUString &rWarningText ) const uno::Reference< awt::XMessageBox > xMsgBox( xToolkit->createWindow( aDescriptor ), uno::UNO_QUERY ); if ( xMsgBox.is() ) { + mbShowsMessageBox = true; sal_Int16 nRet; // xMsgBox->setCaptionText( msCancelTitle ); xMsgBox->setMessageText( rWarningText ); nRet = xMsgBox->execute(); if ( nRet == 2 ) // RET_YES == 2 bRet = true; + mbShowsMessageBox = false; } uno::Reference< lang::XComponent > xComponent( xMsgBox, uno::UNO_QUERY ); @@ -1020,10 +1034,13 @@ bool UpdateHandler::showWarning( const rtl::OUString &rWarningText, sal_Int16 nRet; // xMsgBox->setCaptionText( msCancelTitle ); + mbShowsMessageBox = true; xMsgBox->setMessageText( rWarningText ); nRet = xMsgBox->execute(); if ( nRet == 2 ) // RET_YES == 2 bRet = true; + + mbShowsMessageBox = false; } uno::Reference< lang::XComponent > xComponent( xMsgBox, uno::UNO_QUERY ); diff --git a/extensions/source/update/check/updatehdl.hxx b/extensions/source/update/check/updatehdl.hxx index f54eca5008b8..5a980228b9e2 100644 --- a/extensions/source/update/check/updatehdl.hxx +++ b/extensions/source/update/check/updatehdl.hxx @@ -101,6 +101,7 @@ private: bool mbStringsLoaded; bool mbMinimized; bool mbListenerAdded; + mutable bool mbShowsMessageBox; osl::Mutex maMutex; -- cgit v1.2.3 From e003229da551f71c34297e8824fb1fcb4afa1dd2 Mon Sep 17 00:00:00 2001 From: Dirk Völzke Date: Tue, 22 Sep 2009 09:01:35 +0000 Subject: #i105255# Use different icons for shared and for locked extensions --- desktop/source/deployment/gui/dp_gui.hrc | 2 ++ desktop/source/deployment/gui/dp_gui_dialog2.src | 10 ++++++++++ desktop/source/deployment/gui/dp_gui_extlistbox.cxx | 7 ++++++- desktop/source/deployment/gui/dp_gui_extlistbox.hxx | 2 ++ 4 files changed, 20 insertions(+), 1 deletion(-) diff --git a/desktop/source/deployment/gui/dp_gui.hrc b/desktop/source/deployment/gui/dp_gui.hrc index 387072c98618..4de86c10cf9a 100644 --- a/desktop/source/deployment/gui/dp_gui.hrc +++ b/desktop/source/deployment/gui/dp_gui.hrc @@ -138,6 +138,8 @@ #define RID_IMG_LOCKED_HC (RID_DEPLOYMENT_GUI_START+59) #define RID_IMG_EXTENSION (RID_DEPLOYMENT_GUI_START+60) #define RID_IMG_EXTENSION_HC (RID_DEPLOYMENT_GUI_START+61) +#define RID_IMG_SHARED (RID_DEPLOYMENT_GUI_START+62) +#define RID_IMG_SHARED_HC (RID_DEPLOYMENT_GUI_START+63) #define RID_STR_ADD_PACKAGES (RID_DEPLOYMENT_GUI_START+70) diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.src b/desktop/source/deployment/gui/dp_gui_dialog2.src index 0ca9f9e74362..ee4117bd2348 100644 --- a/desktop/source/deployment/gui/dp_gui_dialog2.src +++ b/desktop/source/deployment/gui/dp_gui_dialog2.src @@ -177,6 +177,16 @@ Image RID_IMG_LOCKED_HC ImageBitmap = Bitmap { File = "lock_16_h.png"; }; }; +Image RID_IMG_SHARED +{ + ImageBitmap = Bitmap { File = "shared_16.png"; }; +}; + +Image RID_IMG_SHARED_HC +{ + ImageBitmap = Bitmap { File = "shared_16_h.png"; }; +}; + Image RID_IMG_EXTENSION { ImageBitmap = Bitmap { File = "extension_32.png"; }; diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx index f4473c2c6fd8..b7742abcb171 100644 --- a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx +++ b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx @@ -177,6 +177,8 @@ ExtensionBox_Impl::ExtensionBox_Impl( Dialog* pParent, TheExtensionManager *pMan m_nTopIndex( 0 ), m_nActiveHeight( 0 ), m_nExtraHeight( 2 ), + m_aSharedImage( DialogHelper::getResId( RID_IMG_SHARED ) ), + m_aSharedImageHC( DialogHelper::getResId( RID_IMG_SHARED_HC ) ), m_aLockedImage( DialogHelper::getResId( RID_IMG_LOCKED ) ), m_aLockedImageHC( DialogHelper::getResId( RID_IMG_LOCKED_HC ) ), m_aWarningImage( DialogHelper::getResId( RID_IMG_WARNING ) ), @@ -618,7 +620,10 @@ void ExtensionBox_Impl::DrawRow( const Rectangle& rRect, const TEntry_Impl pEntr if ( pEntry->m_bShared ) { aPos = rRect.TopRight() + Point( -(RIGHT_ICON_OFFSET + SMALL_ICON_SIZE), TOP_OFFSET ); - DrawImage( aPos, Size( SMALL_ICON_SIZE, SMALL_ICON_SIZE ), isHCMode() ? m_aLockedImageHC : m_aLockedImage ); + if ( pEntry->m_bLocked ) + DrawImage( aPos, Size( SMALL_ICON_SIZE, SMALL_ICON_SIZE ), isHCMode() ? m_aLockedImageHC : m_aLockedImage ); + else + DrawImage( aPos, Size( SMALL_ICON_SIZE, SMALL_ICON_SIZE ), isHCMode() ? m_aSharedImageHC : m_aSharedImage ); } if ( ( pEntry->m_eState == AMBIGUOUS ) || pEntry->m_bMissingDeps ) { diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.hxx b/desktop/source/deployment/gui/dp_gui_extlistbox.hxx index e1a17bb06dc9..6ef3607b6410 100644 --- a/desktop/source/deployment/gui/dp_gui_extlistbox.hxx +++ b/desktop/source/deployment/gui/dp_gui_extlistbox.hxx @@ -138,6 +138,8 @@ class ExtensionBox_Impl : public ::svt::IExtensionListBox long m_nActiveHeight; long m_nExtraHeight; Size m_aOutputSize; + Image m_aSharedImage; + Image m_aSharedImageHC; Image m_aLockedImage; Image m_aLockedImageHC; Image m_aWarningImage; -- cgit v1.2.3 From 9a57c3de06263eeaa28a4644d53248bdfca6df0f Mon Sep 17 00:00:00 2001 From: Dirk Völzke Date: Fri, 25 Sep 2009 11:13:49 +0000 Subject: #i88957# Handle some http errors --- extensions/source/update/check/download.cxx | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/extensions/source/update/check/download.cxx b/extensions/source/update/check/download.cxx index 8c64c037da7e..1d50ddad7305 100644 --- a/extensions/source/update/check/download.cxx +++ b/extensions/source/update/check/download.cxx @@ -267,6 +267,9 @@ bool curl_run(const rtl::OUString& rURL, OutData& out, const rtl::OString& aProx rtl::OString aURL(rtl::OUStringToOString(rURL, RTL_TEXTENCODING_UTF8)); curl_easy_setopt(pCURL, CURLOPT_URL, aURL.getStr()); + // abort on http errors + curl_easy_setopt(pCURL, CURLOPT_FAILONERROR, 1); + // enable redirection curl_easy_setopt(pCURL, CURLOPT_FOLLOWLOCATION, 1); @@ -318,7 +321,30 @@ bool curl_run(const rtl::OUString& rURL, OutData& out, const rtl::OString& aProx if( NULL != error_message ) aMessage = error_message; - out.Handler->downloadStalled( rtl::OStringToOUString(aMessage, RTL_TEXTENCODING_UTF8) ); + if ( CURLE_HTTP_RETURNED_ERROR == cc ) + { + long nError; + curl_easy_getinfo( pCURL, CURLINFO_RESPONSE_CODE, &nError ); + + if ( 403 == nError ) + aMessage += RTL_CONSTASCII_STRINGPARAM( " 403: Access denied!" ); + else if ( 404 == nError ) + aMessage += RTL_CONSTASCII_STRINGPARAM( " 404: File not found!" ); + else if ( 416 == nError ) + { + // we got this error probably, because we already downloaded the file + out.Handler->downloadFinished(out.File); + ret = true; + } + else + { + aMessage += RTL_CONSTASCII_STRINGPARAM( ":error code = " ); + aMessage += aMessage.valueOf( nError ); + aMessage += RTL_CONSTASCII_STRINGPARAM( " !" ); + } + } + if ( !ret ) + out.Handler->downloadStalled( rtl::OStringToOUString(aMessage, RTL_TEXTENCODING_UTF8) ); } curl_easy_cleanup(pCURL); -- cgit v1.2.3 From e969fe977e80c2c4f085fb974ba26bb57b9fb54b Mon Sep 17 00:00:00 2001 From: Dirk Völzke Date: Fri, 25 Sep 2009 11:15:26 +0000 Subject: Added NULL character at end of debug string --- sal/osl/w32/diagnose.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sal/osl/w32/diagnose.c b/sal/osl/w32/diagnose.c index 6a67c1aa5b0f..d038f8726740 100644 --- a/sal/osl/w32/diagnose.c +++ b/sal/osl/w32/diagnose.c @@ -90,9 +90,13 @@ void SAL_CALL osl_trace(const sal_Char* lpszFormat, ...) if ( IsDebuggerPresent() ) { sal_Char szMessage[512]; - szMessage[sizeof(szMessage)-1] = 0; written = _vsnprintf( szMessage, sizeof(szMessage) - 2, lpszFormat, args ); - szMessage[ written == -1 ? sizeof(szMessage) - 2 : written ] = '\n'; + if (written == -1) + { + written = sizeof(szMessage) - 2; + } + szMessage[written] = '\n'; + szMessage[written + 1] = '\0'; OutputDebugString( szMessage ); } -- cgit v1.2.3 From ea69598127b41c0b87f1fc3359f7fa3887e91d54 Mon Sep 17 00:00:00 2001 From: Dirk Völzke Date: Fri, 25 Sep 2009 11:52:58 +0000 Subject: #i88957# Use UNISTRING macro --- extensions/source/update/check/download.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/extensions/source/update/check/download.cxx b/extensions/source/update/check/download.cxx index 1d50ddad7305..2936d6078d93 100644 --- a/extensions/source/update/check/download.cxx +++ b/extensions/source/update/check/download.cxx @@ -327,9 +327,9 @@ bool curl_run(const rtl::OUString& rURL, OutData& out, const rtl::OString& aProx curl_easy_getinfo( pCURL, CURLINFO_RESPONSE_CODE, &nError ); if ( 403 == nError ) - aMessage += RTL_CONSTASCII_STRINGPARAM( " 403: Access denied!" ); + aMessage += UNISTRING( " 403: Access denied!" ); else if ( 404 == nError ) - aMessage += RTL_CONSTASCII_STRINGPARAM( " 404: File not found!" ); + aMessage += UNISTRING( " 404: File not found!" ); else if ( 416 == nError ) { // we got this error probably, because we already downloaded the file @@ -338,9 +338,9 @@ bool curl_run(const rtl::OUString& rURL, OutData& out, const rtl::OString& aProx } else { - aMessage += RTL_CONSTASCII_STRINGPARAM( ":error code = " ); + aMessage += UNISTRING( ":error code = " ); aMessage += aMessage.valueOf( nError ); - aMessage += RTL_CONSTASCII_STRINGPARAM( " !" ); + aMessage += UNISTRING( " !" ); } } if ( !ret ) -- cgit v1.2.3 From 7d22694d5186484a470947c395cb19a7b7ed079b Mon Sep 17 00:00:00 2001 From: Dirk Völzke Date: Fri, 25 Sep 2009 11:56:17 +0000 Subject: #i88957# second try to remove warnings --- extensions/source/update/check/download.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/extensions/source/update/check/download.cxx b/extensions/source/update/check/download.cxx index 2936d6078d93..76d4b373a329 100644 --- a/extensions/source/update/check/download.cxx +++ b/extensions/source/update/check/download.cxx @@ -327,9 +327,9 @@ bool curl_run(const rtl::OUString& rURL, OutData& out, const rtl::OString& aProx curl_easy_getinfo( pCURL, CURLINFO_RESPONSE_CODE, &nError ); if ( 403 == nError ) - aMessage += UNISTRING( " 403: Access denied!" ); + aMessage += rtl::OString( RTL_CONSTASCII_STRINGPARAM( " 403: Access denied!" ) ); else if ( 404 == nError ) - aMessage += UNISTRING( " 404: File not found!" ); + aMessage += rtl::OString( RTL_CONSTASCII_STRINGPARAM( " 404: File not found!" ) ); else if ( 416 == nError ) { // we got this error probably, because we already downloaded the file @@ -338,9 +338,9 @@ bool curl_run(const rtl::OUString& rURL, OutData& out, const rtl::OString& aProx } else { - aMessage += UNISTRING( ":error code = " ); + aMessage += rtl::OString( RTL_CONSTASCII_STRINGPARAM( ":error code = " ) ); aMessage += aMessage.valueOf( nError ); - aMessage += UNISTRING( " !" ); + aMessage += rtl::OString( RTL_CONSTASCII_STRINGPARAM( " !" ) ); } } if ( !ret ) -- cgit v1.2.3 From 6bff4346455e0ad326e5fa80ddd780bd6f54319f Mon Sep 17 00:00:00 2001 From: Dirk Völzke Date: Thu, 1 Oct 2009 11:48:27 +0000 Subject: #i102123# Don't use vcl when not in main thread --- desktop/source/deployment/gui/dp_gui_dialog2.cxx | 18 +++--------------- desktop/source/deployment/gui/dp_gui_extlistbox.cxx | 4 +++- 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx index f09d906a840e..600e09a99b80 100644 --- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx +++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx @@ -244,7 +244,10 @@ void ExtBoxWithBtns_Impl::RecalcAll() const sal_Int32 nActive = getSelIndex(); if ( nActive != EXTENSION_LISTBOX_ENTRY_NOTFOUND ) + { SetButtonPos( GetEntryRect( nActive ) ); + SetButtonStatus( GetEntryData( nActive) ); + } else { m_pOptionsBtn->Hide(); @@ -262,21 +265,6 @@ void ExtBoxWithBtns_Impl::selectEntry( const long nPos ) return; ExtensionBox_Impl::selectEntry( nPos ); - - if ( ( nPos >= 0 ) && ( nPos < GetEntryCount() ) ) - { - if ( IsReallyVisible() ) - { - SetButtonPos( GetEntryRect( nPos ) ); - } - SetButtonStatus( GetEntryData( nPos) ); - } - else - { - m_pOptionsBtn->Hide(); - m_pEnableBtn->Hide(); - m_pRemoveBtn->Hide(); - } } // ----------------------------------------------------------------------- diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx index b7742abcb171..16b2ab61ceaf 100644 --- a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx +++ b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx @@ -471,13 +471,15 @@ void ExtensionBox_Impl::selectEntry( const long nPos ) if ( IsReallyVisible() ) { - m_bNeedsRecalc = true; m_bAdjustActive = true; } } if ( IsReallyVisible() ) + { + m_bNeedsRecalc = true; Invalidate(); + } guard.clear(); } -- cgit v1.2.3 From 6d046e40834d8c0abb7aa97dabc096d721321883 Mon Sep 17 00:00:00 2001 From: Dirk Völzke Date: Wed, 7 Oct 2009 14:11:28 +0000 Subject: #i105452# Added 'since' tag and published throbber service --- offapi/com/sun/star/awt/UnoControlSimpleAnimation.idl | 6 ++++-- offapi/com/sun/star/awt/UnoControlSimpleAnimationModel.idl | 3 ++- offapi/com/sun/star/awt/UnoControlThrobber.idl | 6 ++++-- offapi/com/sun/star/awt/UnoControlThrobberModel.idl | 3 ++- offapi/com/sun/star/awt/XSimpleAnimation.idl | 2 +- offapi/com/sun/star/awt/XThrobber.idl | 2 +- 6 files changed, 14 insertions(+), 8 deletions(-) diff --git a/offapi/com/sun/star/awt/UnoControlSimpleAnimation.idl b/offapi/com/sun/star/awt/UnoControlSimpleAnimation.idl index 83cf1ed0963e..b8f553e5920c 100644 --- a/offapi/com/sun/star/awt/UnoControlSimpleAnimation.idl +++ b/offapi/com/sun/star/awt/UnoControlSimpleAnimation.idl @@ -48,9 +48,11 @@ /** specifies a simple animation control.

The model of an UnoControlSimpleAnimation control must support - the UnoControlSimpleAnimationModel service. + the UnoControlSimpleAnimationModel service.

+ + @since OOo 2.2 */ -service UnoControlSimpleAnimation +published service UnoControlSimpleAnimation { service com::sun::star::awt::UnoControl; diff --git a/offapi/com/sun/star/awt/UnoControlSimpleAnimationModel.idl b/offapi/com/sun/star/awt/UnoControlSimpleAnimationModel.idl index 4b8b465590ac..3169aa1069e2 100644 --- a/offapi/com/sun/star/awt/UnoControlSimpleAnimationModel.idl +++ b/offapi/com/sun/star/awt/UnoControlSimpleAnimationModel.idl @@ -48,9 +48,10 @@

@see UnoControlScrollBarModel + @since OOo 2.2 */ -service UnoControlSimpleAnimationModel +published service UnoControlSimpleAnimationModel { service com::sun::star::awt::UnoControlModel; diff --git a/offapi/com/sun/star/awt/UnoControlThrobber.idl b/offapi/com/sun/star/awt/UnoControlThrobber.idl index 85b08efc77a2..9faffd85d8e8 100644 --- a/offapi/com/sun/star/awt/UnoControlThrobber.idl +++ b/offapi/com/sun/star/awt/UnoControlThrobber.idl @@ -48,9 +48,11 @@ /** specifies a simple animation control.

The model of an UnoControlThrobber control must support - the UnoControlThrobberModel service. + the UnoControlThrobberModel service.

+ + @since OOo 2.2 */ -service UnoControlThrobber +published service UnoControlThrobber { service com::sun::star::awt::UnoControl; diff --git a/offapi/com/sun/star/awt/UnoControlThrobberModel.idl b/offapi/com/sun/star/awt/UnoControlThrobberModel.idl index a3922d757a3c..c07efea1cb57 100644 --- a/offapi/com/sun/star/awt/UnoControlThrobberModel.idl +++ b/offapi/com/sun/star/awt/UnoControlThrobberModel.idl @@ -48,9 +48,10 @@

@see UnoControlScrollBarModel + @since OOo 2.2 */ -service UnoControlThrobberModel +published service UnoControlThrobberModel { service com::sun::star::awt::UnoControlModel; }; diff --git a/offapi/com/sun/star/awt/XSimpleAnimation.idl b/offapi/com/sun/star/awt/XSimpleAnimation.idl index 816a508e230f..0a8d34eb94bb 100644 --- a/offapi/com/sun/star/awt/XSimpleAnimation.idl +++ b/offapi/com/sun/star/awt/XSimpleAnimation.idl @@ -46,7 +46,7 @@ /** Controls the animation control. */ -interface XSimpleAnimation: com::sun::star::uno::XInterface +published interface XSimpleAnimation: com::sun::star::uno::XInterface { //------------------------------------------------------------------------- diff --git a/offapi/com/sun/star/awt/XThrobber.idl b/offapi/com/sun/star/awt/XThrobber.idl index b1cb80beb5e2..0687920ccf94 100644 --- a/offapi/com/sun/star/awt/XThrobber.idl +++ b/offapi/com/sun/star/awt/XThrobber.idl @@ -46,7 +46,7 @@ /** Controls the animation control. */ -interface XThrobber: com::sun::star::uno::XInterface +published interface XThrobber: com::sun::star::uno::XInterface { //------------------------------------------------------------------------- -- cgit v1.2.3 From ee395cc711f6edcdc1d5a81aaa7c57cc9ef7255a Mon Sep 17 00:00:00 2001 From: Dirk Völzke Date: Wed, 7 Oct 2009 14:13:55 +0000 Subject: #i105452# Added alternative service names for the throbber --- toolkit/inc/toolkit/helper/servicenames.hxx | 6 ++++-- toolkit/source/controls/tksimpleanimation.cxx | 5 +++-- toolkit/source/controls/tkthrobber.cxx | 10 ++++++---- toolkit/source/helper/registerservices.cxx | 16 ++++++++-------- toolkit/source/helper/servicenames.cxx | 8 ++++---- 5 files changed, 25 insertions(+), 20 deletions(-) diff --git a/toolkit/inc/toolkit/helper/servicenames.hxx b/toolkit/inc/toolkit/helper/servicenames.hxx index 31513f0f2358..a6573fff6966 100644 --- a/toolkit/inc/toolkit/helper/servicenames.hxx +++ b/toolkit/inc/toolkit/helper/servicenames.hxx @@ -95,8 +95,10 @@ extern const sal_Char __FAR_DATA szServiceName_TreeControl[]; extern const sal_Char __FAR_DATA szServiceName_TreeControlModel[]; extern const sal_Char __FAR_DATA szServiceName_MutableTreeDataModel[]; -extern const sal_Char __FAR_DATA szServiceName_UnoSimpleAnimationControl[], szServiceName_UnoSimpleAnimationControlModel[]; -extern const sal_Char __FAR_DATA szServiceName_UnoThrobberControl[], szServiceName_UnoThrobberControlModel[]; +extern const sal_Char __FAR_DATA szServiceName_UnoSimpleAnimationControl[], szServiceName2_UnoSimpleAnimationControl[]; +extern const sal_Char __FAR_DATA szServiceName_UnoSimpleAnimationControlModel[], szServiceName2_UnoSimpleAnimationControlModel[]; +extern const sal_Char __FAR_DATA szServiceName_UnoThrobberControl[], szServiceName2_UnoThrobberControl[]; +extern const sal_Char __FAR_DATA szServiceName_UnoThrobberControlModel[], szServiceName2_UnoThrobberControlModel[]; extern const sal_Char __FAR_DATA szServiceName_UnoControlFixedHyperlink[], szServiceName_UnoControlFixedHyperlinkModel[]; // ExtUnoWrapper: diff --git a/toolkit/source/controls/tksimpleanimation.cxx b/toolkit/source/controls/tksimpleanimation.cxx index 8d83b3a953d9..15d20a557396 100644 --- a/toolkit/source/controls/tksimpleanimation.cxx +++ b/toolkit/source/controls/tksimpleanimation.cxx @@ -112,8 +112,9 @@ namespace toolkit throw( uno::RuntimeException ) { uno::Sequence< ::rtl::OUString > aServices( UnoControlModel::getSupportedServiceNames() ); - aServices.realloc( aServices.getLength() + 1 ); - aServices[ aServices.getLength() - 1 ] = ::rtl::OUString::createFromAscii( szServiceName_UnoSimpleAnimationControlModel ); + aServices.realloc( aServices.getLength() + 2 ); + aServices[ aServices.getLength() - 2 ] = ::rtl::OUString::createFromAscii( szServiceName_UnoSimpleAnimationControlModel ); + aServices[ aServices.getLength() - 1 ] = ::rtl::OUString::createFromAscii( szServiceName2_UnoSimpleAnimationControlModel ); return aServices; } diff --git a/toolkit/source/controls/tkthrobber.cxx b/toolkit/source/controls/tkthrobber.cxx index 153a19bf38c9..bea8f90a8b17 100644 --- a/toolkit/source/controls/tkthrobber.cxx +++ b/toolkit/source/controls/tkthrobber.cxx @@ -103,8 +103,9 @@ namespace toolkit throw( uno::RuntimeException ) { uno::Sequence< ::rtl::OUString > aServices( UnoControlModel::getSupportedServiceNames() ); - aServices.realloc( aServices.getLength() + 1 ); - aServices[ aServices.getLength() - 1 ] = ::rtl::OUString::createFromAscii( szServiceName_UnoThrobberControlModel ); + aServices.realloc( aServices.getLength() + 2 ); + aServices[ aServices.getLength() - 2 ] = ::rtl::OUString::createFromAscii( szServiceName_UnoThrobberControlModel ); + aServices[ aServices.getLength() - 1 ] = ::rtl::OUString::createFromAscii( szServiceName2_UnoThrobberControlModel ); return aServices; } @@ -154,8 +155,9 @@ namespace toolkit throw( uno::RuntimeException ) { uno::Sequence< ::rtl::OUString > aServices( UnoControlBase::getSupportedServiceNames() ); - aServices.realloc( aServices.getLength() + 1 ); - aServices[ aServices.getLength() - 1 ] = ::rtl::OUString::createFromAscii( szServiceName_UnoThrobberControl ); + aServices.realloc( aServices.getLength() + 2 ); + aServices[ aServices.getLength() - 2 ] = ::rtl::OUString::createFromAscii( szServiceName_UnoThrobberControl ); + aServices[ aServices.getLength() - 1 ] = ::rtl::OUString::createFromAscii( szServiceName2_UnoThrobberControl ); return aServices; } diff --git a/toolkit/source/helper/registerservices.cxx b/toolkit/source/helper/registerservices.cxx index d9264f22cb51..d66ff3dd3610 100644 --- a/toolkit/source/helper/registerservices.cxx +++ b/toolkit/source/helper/registerservices.cxx @@ -281,10 +281,10 @@ TOOLKIT_DLLPUBLIC sal_Bool SAL_CALL component_writeInfo( void* _pServiceManager, registerServices( xRegistryKey, "TreeControl", szServiceName_TreeControl ); registerServices( xRegistryKey, "TreeControlModel", szServiceName_TreeControlModel ); registerServices( xRegistryKey, "MutableTreeDataModel", szServiceName_MutableTreeDataModel ); - registerServices( xRegistryKey, "UnoSimpleAnimationControlModel", szServiceName_UnoSimpleAnimationControlModel ); - registerServices( xRegistryKey, "UnoSimpleAnimationControl", szServiceName_UnoSimpleAnimationControl ); - registerServices( xRegistryKey, "UnoThrobberControlModel", szServiceName_UnoThrobberControlModel ); - registerServices( xRegistryKey, "UnoThrobberControl", szServiceName_UnoThrobberControl ); + registerServices( xRegistryKey, "UnoSimpleAnimationControlModel", szServiceName_UnoSimpleAnimationControlModel, szServiceName2_UnoSimpleAnimationControlModel ); + registerServices( xRegistryKey, "UnoSimpleAnimationControl", szServiceName_UnoSimpleAnimationControl, szServiceName2_UnoSimpleAnimationControl ); + registerServices( xRegistryKey, "UnoThrobberControlModel", szServiceName_UnoThrobberControlModel, szServiceName2_UnoThrobberControlModel ); + registerServices( xRegistryKey, "UnoThrobberControl", szServiceName_UnoThrobberControl, szServiceName2_UnoThrobberControl ); registerServices( xRegistryKey, "UnoFixedHyperlinkControl", szServiceName_UnoControlFixedHyperlink ); registerServices( xRegistryKey, "UnoControlFixedHyperlinkModel", szServiceName_UnoControlFixedHyperlinkModel ); @@ -363,10 +363,10 @@ TOOLKIT_DLLPUBLIC void* SAL_CALL component_getFactory( const sal_Char* sImplemen CHECKANDCREATEFACTORY( TreeControl, szServiceName_TreeControl, NULL ) CHECKANDCREATEFACTORY( TreeControlModel, szServiceName_TreeControlModel, NULL ) CHECKANDCREATEFACTORY( MutableTreeDataModel, szServiceName_MutableTreeDataModel, NULL ) - CHECKANDCREATEFACTORY( UnoSimpleAnimationControlModel, szServiceName_UnoSimpleAnimationControlModel, NULL ) - CHECKANDCREATEFACTORY( UnoSimpleAnimationControl, szServiceName_UnoSimpleAnimationControl, NULL ) - CHECKANDCREATEFACTORY( UnoThrobberControlModel, szServiceName_UnoThrobberControlModel, NULL ) - CHECKANDCREATEFACTORY( UnoThrobberControl, szServiceName_UnoThrobberControl, NULL ) + CHECKANDCREATEFACTORY( UnoSimpleAnimationControlModel, szServiceName_UnoSimpleAnimationControlModel, szServiceName2_UnoSimpleAnimationControlModel ) + CHECKANDCREATEFACTORY( UnoSimpleAnimationControl, szServiceName_UnoSimpleAnimationControl, szServiceName2_UnoSimpleAnimationControl ) + CHECKANDCREATEFACTORY( UnoThrobberControlModel, szServiceName_UnoThrobberControlModel, szServiceName2_UnoThrobberControlModel ) + CHECKANDCREATEFACTORY( UnoThrobberControl, szServiceName_UnoThrobberControl, szServiceName2_UnoThrobberControl ) CHECKANDCREATEFACTORY( UnoFixedHyperlinkControl, szServiceName_UnoControlFixedHyperlink, NULL ) CHECKANDCREATEFACTORY( UnoControlFixedHyperlinkModel, szServiceName_UnoControlFixedHyperlinkModel, NULL ) diff --git a/toolkit/source/helper/servicenames.cxx b/toolkit/source/helper/servicenames.cxx index 903f18f95eae..f05540334e7e 100644 --- a/toolkit/source/helper/servicenames.cxx +++ b/toolkit/source/helper/servicenames.cxx @@ -95,10 +95,10 @@ const sal_Char __FAR_DATA szServiceName_UnoSpinButtonModel[] = "com.sun.star.awt const sal_Char __FAR_DATA szServiceName_TreeControl[] = "com.sun.star.awt.tree.TreeControl"; const sal_Char __FAR_DATA szServiceName_TreeControlModel[] = "com.sun.star.awt.tree.TreeControlModel"; const sal_Char __FAR_DATA szServiceName_MutableTreeDataModel[] = "com.sun.star.awt.tree.MutableTreeDataModel"; -const sal_Char __FAR_DATA szServiceName_UnoSimpleAnimationControlModel[] = "com.sun.star.awt.UnoSimpleAnimationControlModel"; -const sal_Char __FAR_DATA szServiceName_UnoSimpleAnimationControl[] = "com.sun.star.awt.UnoSimpleAnimationControl"; -const sal_Char __FAR_DATA szServiceName_UnoThrobberControlModel[] = "com.sun.star.awt.UnoThrobberControlModel"; -const sal_Char __FAR_DATA szServiceName_UnoThrobberControl[] = "com.sun.star.awt.UnoThrobberControl"; +const sal_Char __FAR_DATA szServiceName_UnoSimpleAnimationControlModel[] = "com.sun.star.awt.UnoSimpleAnimationControlModel", szServiceName2_UnoSimpleAnimationControlModel[] = "com.sun.star.awt.UnoControlSimpleAnimationModel"; +const sal_Char __FAR_DATA szServiceName_UnoSimpleAnimationControl[] = "com.sun.star.awt.UnoSimpleAnimationControl", szServiceName2_UnoSimpleAnimationControl[] = "com.sun.star.awt.UnoControlSimpleAnimation"; +const sal_Char __FAR_DATA szServiceName_UnoThrobberControlModel[] = "com.sun.star.awt.UnoThrobberControlModel", szServiceName2_UnoThrobberControlModel[] = "com.sun.star.awt.UnoControlThrobberModel"; +const sal_Char __FAR_DATA szServiceName_UnoThrobberControl[] = "com.sun.star.awt.UnoThrobberControl", szServiceName2_UnoThrobberControl[] = "com.sun.star.awt.UnoControlThrobber"; const sal_Char __FAR_DATA szServiceName_UnoControlFixedHyperlink[] = "com.sun.star.awt.UnoControlFixedHyperlink"; const sal_Char __FAR_DATA szServiceName_UnoControlFixedHyperlinkModel[] = "com.sun.star.awt.UnoControlFixedHyperlinkModel"; -- cgit v1.2.3 From 9468be6f6fe2d0cd1d72df87537d68e5cf76e946 Mon Sep 17 00:00:00 2001 From: Dirk Völzke Date: Tue, 3 Nov 2009 05:54:43 +0000 Subject: Fixed merge problem --- sal/osl/w32/diagnose.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/sal/osl/w32/diagnose.c b/sal/osl/w32/diagnose.c index a41fb5d1d60e..92560a35cfa0 100644 --- a/sal/osl/w32/diagnose.c +++ b/sal/osl/w32/diagnose.c @@ -91,23 +91,12 @@ void SAL_CALL osl_trace(const sal_Char* lpszFormat, ...) { sal_Char szMessage[512]; written = _vsnprintf( szMessage, sizeof(szMessage) - 2, lpszFormat, args ); -<<<<<<< .working - if (written == -1) - { - written = sizeof(szMessage) - 2; - } - szMessage[written] = '\n'; - szMessage[written + 1] = '\0'; - OutputDebugString( szMessage ); - } -======= if ( written == -1 ) written = sizeof(szMessage) - 2; szMessage[ written++ ] = '\n'; szMessage[ written ] = 0; OutputDebugString( szMessage ); } ->>>>>>> .merge-right.r277194 vfprintf(stderr,lpszFormat, args); -- cgit v1.2.3 From 975d4e7e486714b4111fb69f8c1fa43dad97ef1e Mon Sep 17 00:00:00 2001 From: Dirk Völzke Date: Wed, 4 Nov 2009 13:45:04 +0000 Subject: #i105452# Added Throbber to list of available service names of the dialog --- toolkit/source/controls/dialogcontrol.cxx | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/toolkit/source/controls/dialogcontrol.cxx b/toolkit/source/controls/dialogcontrol.cxx index 07d459a6111a..e15267d5b258 100644 --- a/toolkit/source/controls/dialogcontrol.cxx +++ b/toolkit/source/controls/dialogcontrol.cxx @@ -46,6 +46,9 @@ #include "toolkit/controls/tkscrollbar.hxx" #endif #include +#include +#include + #include #include #include @@ -456,6 +459,10 @@ Reference< XInterface > UnoControlDialogModel::createInstance( const ::rtl::OUSt pNewModel = new OGeometryControlModel< UnoTreeModel >; else if ( aServiceSpecifier.compareToAscii( szServiceName_GridControlModel ) == 0 ) pNewModel = new OGeometryControlModel< UnoGridModel >; + else if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoSimpleAnimationControlModel ) == 0 ) + pNewModel = new OGeometryControlModel< UnoSimpleAnimationControlModel >; + else if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoThrobberControlModel ) == 0 ) + pNewModel = new OGeometryControlModel< UnoThrobberControlModel >; if ( !pNewModel ) { @@ -495,7 +502,7 @@ Sequence< ::rtl::OUString > UnoControlDialogModel::getAvailableServiceNames() th static Sequence< ::rtl::OUString >* pNamesSeq = NULL; if ( !pNamesSeq ) { - pNamesSeq = new Sequence< ::rtl::OUString >( 21 ); + pNamesSeq = new Sequence< ::rtl::OUString >( 24 ); ::rtl::OUString* pNames = pNamesSeq->getArray(); pNames[0] = ::rtl::OUString::createFromAscii( szServiceName2_UnoControlEditModel ); pNames[1] = ::rtl::OUString::createFromAscii( szServiceName2_UnoControlFormattedFieldModel ); @@ -518,8 +525,9 @@ Sequence< ::rtl::OUString > UnoControlDialogModel::getAvailableServiceNames() th pNames[18] = ::rtl::OUString::createFromAscii( szServiceName2_UnoControlFixedLineModel ); pNames[19] = ::rtl::OUString::createFromAscii( szServiceName2_UnoControlRoadmapModel ); pNames[20] = ::rtl::OUString::createFromAscii( szServiceName_TreeControlModel ); - pNames[20] = ::rtl::OUString::createFromAscii( szServiceName_GridControlModel ); - + pNames[21] = ::rtl::OUString::createFromAscii( szServiceName_GridControlModel ); + pNames[22] = ::rtl::OUString::createFromAscii( szServiceName2_UnoSimpleAnimationControlModel ); + pNames[23] = ::rtl::OUString::createFromAscii( szServiceName2_UnoThrobberControlModel ); } return *pNamesSeq; } -- cgit v1.2.3 From 34e224f6783d92e0a75d070a0e5b5fa65822462b Mon Sep 17 00:00:00 2001 From: Dirk Völzke Date: Mon, 23 Nov 2009 13:51:12 +0000 Subject: #i106373# Removed unused code --- uui/source/iahndl.cxx | 3 +++ uui/source/iahndl.hxx | 3 +++ 2 files changed, 6 insertions(+) diff --git a/uui/source/iahndl.cxx b/uui/source/iahndl.cxx index 996fd24e531d..4fbbb7f75c26 100644 --- a/uui/source/iahndl.cxx +++ b/uui/source/iahndl.cxx @@ -2630,6 +2630,8 @@ UUIInteractionHelper::handleCertificateValidationRequest( */ } +// @@@ Todo #i29340#: activate! +#if 0 namespace { enum NameClashResolveDialogResult { ABORT, RENAME, OVERWRITE }; @@ -2729,6 +2731,7 @@ UUIInteractionHelper::handleNameClashResolveRequest( break; } } +#endif void UUIInteractionHelper::handleMasterPasswordRequest( diff --git a/uui/source/iahndl.hxx b/uui/source/iahndl.hxx index bea53e436c6d..6c16769406c5 100644 --- a/uui/source/iahndl.hxx +++ b/uui/source/iahndl.hxx @@ -267,6 +267,8 @@ private: rContinuations) SAL_THROW((com::sun::star::uno::RuntimeException)); +// @@@ Todo #i29340#: activate! +#if 0 void handleNameClashResolveRequest( com::sun::star::ucb::NameClashResolveRequest const & rRequest, @@ -274,6 +276,7 @@ private: com::sun::star::task::XInteractionContinuation > > const & rContinuations) SAL_THROW((com::sun::star::uno::RuntimeException)); +#endif void handleMasterPasswordRequest( -- cgit v1.2.3 From 46e584010539eef2999cbe9285d8beb8feed42b9 Mon Sep 17 00:00:00 2001 From: os Date: Fri, 8 Jan 2010 15:26:54 +0100 Subject: #i105734# patch applied (cmc) --- sw/source/core/swg/SwXMLSectionList.cxx | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/sw/source/core/swg/SwXMLSectionList.cxx b/sw/source/core/swg/SwXMLSectionList.cxx index 36a501c482a7..767bb4aab1c0 100644 --- a/sw/source/core/swg/SwXMLSectionList.cxx +++ b/sw/source/core/swg/SwXMLSectionList.cxx @@ -71,18 +71,22 @@ SvXMLImportContext *SwXMLSectionList::CreateContext( { SvXMLImportContext *pContext = 0; - if (nPrefix == XML_NAMESPACE_OFFICE && IsXMLToken ( rLocalName, XML_BODY ) || - nPrefix == XML_NAMESPACE_TEXT && - (IsXMLToken ( rLocalName, XML_P ) || - IsXMLToken ( rLocalName, XML_H ) || - IsXMLToken ( rLocalName, XML_A ) || - IsXMLToken ( rLocalName, XML_SPAN ) || - IsXMLToken ( rLocalName, XML_SECTION ) || - IsXMLToken ( rLocalName, XML_INDEX_BODY ) || - IsXMLToken ( rLocalName, XML_INDEX_TITLE )|| - IsXMLToken ( rLocalName, XML_INSERTION ) || - IsXMLToken ( rLocalName, XML_DELETION ) ) ) + if(( nPrefix == XML_NAMESPACE_OFFICE && IsXMLToken ( rLocalName, XML_BODY )) || + ( nPrefix == XML_NAMESPACE_TEXT && + (IsXMLToken ( rLocalName, XML_P ) || + IsXMLToken ( rLocalName, XML_H ) || + IsXMLToken ( rLocalName, XML_A ) || + IsXMLToken ( rLocalName, XML_SPAN ) || + IsXMLToken ( rLocalName, XML_SECTION ) || + IsXMLToken ( rLocalName, XML_INDEX_BODY ) || + IsXMLToken ( rLocalName, XML_INDEX_TITLE )|| + IsXMLToken ( rLocalName, XML_INSERTION ) || + IsXMLToken ( rLocalName, XML_DELETION ) ) + ) + ) + { pContext = new SvXMLSectionListContext (*this, nPrefix, rLocalName, xAttrList); + } else pContext = SvXMLImport::CreateContext( nPrefix, rLocalName, xAttrList ); return pContext; -- cgit v1.2.3 From 2ac42e9f9636c575169cc4db9ac8c03c33eb6305 Mon Sep 17 00:00:00 2001 From: os Date: Mon, 11 Jan 2010 15:11:11 +0100 Subject: #i105646# unused code removed --- sw/inc/PostItMgr.hxx | 5 +- sw/inc/SwNumberTree.hxx | 7 --- sw/inc/crsrsh.hxx | 2 - sw/inc/postit.hxx | 4 +- sw/inc/postithelper.hxx | 1 - sw/inc/undobj.hxx | 11 ---- sw/inc/viewsh.hxx | 3 - sw/inc/viscrs.hxx | 2 - sw/inc/warnpassword.hxx | 50 ---------------- sw/source/core/SwNumberTree/SwNumberTree.cxx | 13 ---- sw/source/core/access/accportions.cxx | 6 -- sw/source/core/access/accportions.hxx | 1 - sw/source/core/crsr/crsrsh.cxx | 13 ---- sw/source/core/crsr/viscrs.cxx | 10 ---- sw/source/core/fields/postithelper.cxx | 16 ----- sw/source/core/inc/SwGrammarMarkUp.hxx | 2 - sw/source/core/text/SwGrammarMarkUp.cxx | 15 ----- sw/source/core/text/inftxt.cxx | 4 +- sw/source/core/text/inftxt.hxx | 2 + sw/source/core/text/porlay.cxx | 5 -- sw/source/core/undo/unbkmk.cxx | 17 ------ sw/source/core/undo/unins.cxx | 15 ----- sw/source/core/undo/unmove.cxx | 10 ---- sw/source/core/unocore/unotbl.cxx | 35 ----------- sw/source/core/view/viewsh.cxx | 15 ----- sw/source/filter/rtf/swparrtf.cxx | 73 ----------------------- sw/source/filter/ww8/WW8TableInfo.cxx | 8 +-- sw/source/filter/ww8/WW8TableInfo.hxx | 4 ++ sw/source/filter/ww8/writerhelper.cxx | 3 +- sw/source/filter/ww8/writerhelper.hxx | 3 +- sw/source/filter/ww8/ww8par.hxx | 4 +- sw/source/filter/ww8/ww8par2.hxx | 1 - sw/source/filter/ww8/ww8par3.cxx | 10 +--- sw/source/filter/ww8/ww8par6.cxx | 6 -- sw/source/ui/app/docsh.cxx | 1 - sw/source/ui/docvw/PostItMgr.cxx | 38 +----------- sw/source/ui/docvw/postit.cxx | 3 +- sw/source/ui/uno/makefile.mk | 3 +- sw/source/ui/uno/warnpassword.cxx | 89 ---------------------------- 39 files changed, 29 insertions(+), 481 deletions(-) delete mode 100644 sw/inc/warnpassword.hxx delete mode 100644 sw/source/ui/uno/warnpassword.cxx diff --git a/sw/inc/PostItMgr.hxx b/sw/inc/PostItMgr.hxx index 36e9bdd08639..3b10a872d3a7 100644 --- a/sw/inc/PostItMgr.hxx +++ b/sw/inc/PostItMgr.hxx @@ -222,7 +222,9 @@ class SwPostItMgr: public SfxListener void Delete(String aAuthor); void Delete(); +#if 0 void Hide( SwPostItField* pPostItField ); +#endif void Hide( const String& rAuthor ); void Hide(); void Show(); @@ -245,7 +247,6 @@ class SwPostItMgr: public SfxListener SwMarginWin* GetPostIt(const SfxBroadcaster* pBroadcaster) const; SwMarginWin* GetPostIt(SfxBroadcaster* pBroadcaster) const; SwPostIt* GetPostIt(const SwPostItField* pFld) const; - SwPostIt* GetPostIt(SwPostItField* pFld) const; void SetShadowState(const SwPostItField* pFld,bool bCursor = true); @@ -255,8 +256,6 @@ class SwPostItMgr: public SfxListener Color GetColorLight(sal_uInt16 aAuthorIndex); Color GetColorAnkor(sal_uInt16 aAuthorIndex); - bool ShowPreview(const SwField* pFld,SwFmtFld*& pFmtFld) const; - void RegisterAnswer(OutlinerParaObject* pAnswer) { mpAnswer = pAnswer;} OutlinerParaObject* IsAnswer() {return mpAnswer;} void CheckMetaText(); diff --git a/sw/inc/SwNumberTree.hxx b/sw/inc/SwNumberTree.hxx index 7f4c88b6081c..cf546f354721 100644 --- a/sw/inc/SwNumberTree.hxx +++ b/sw/inc/SwNumberTree.hxx @@ -167,13 +167,6 @@ public: return mpParent; } - /** - Returns the first child of this node. - - @return the child - */ - SwNumberTreeNode* GetFirstChild() const; - /** Returns number of this node. diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx index b0c8a54125f0..c85dcd9e1d9a 100644 --- a/sw/inc/crsrsh.hxx +++ b/sw/inc/crsrsh.hxx @@ -877,8 +877,6 @@ public: @return the textual description of the current selection */ String GetCrsrDescr() const; - - SwRect GetRectOfCurrentChar(); }; diff --git a/sw/inc/postit.hxx b/sw/inc/postit.hxx index 5ddf9c1458fb..c8890136924d 100644 --- a/sw/inc/postit.hxx +++ b/sw/inc/postit.hxx @@ -324,7 +324,9 @@ class SwMarginWin : public Window virtual bool CalcFollow(); SwMarginWin* GetTopReplyNote(); - bool IsAnyStackParentVisible(); +#if 0 + bool IsAnyStackParentVisible(); +#endif sal_Int32 GetMetaHeight(); sal_Int32 GetMinimumSizeWithMeta(); diff --git a/sw/inc/postithelper.hxx b/sw/inc/postithelper.hxx index 19ec6ed6084f..654ed121d22c 100644 --- a/sw/inc/postithelper.hxx +++ b/sw/inc/postithelper.hxx @@ -66,7 +66,6 @@ namespace SwPostItHelper }; SwLayoutStatus getLayoutInfos( std::vector< SwLayoutInfo >&, SwPosition& ); - SwLayoutStatus getLayoutInfos( std::vector< SwLayoutInfo >&, SwTxtFld* ); long getLayoutHeight( const SwRootFrm* pRoot ); void setSidebarChanged( SwRootFrm* pRoot, bool bBrowseMode ); unsigned long getPageInfo( SwRect& rPageFrm, const SwRootFrm* , const Point& ); diff --git a/sw/inc/undobj.hxx b/sw/inc/undobj.hxx index 5b08b496a360..0d524791deb6 100644 --- a/sw/inc/undobj.hxx +++ b/sw/inc/undobj.hxx @@ -404,7 +404,6 @@ public: */ virtual SwRewriter GetRewriter() const; - BOOL CanGrouping( const SwPosition&, sal_Unicode cIns ); OUT_UNDOBJ( Insert ) DECL_FIXEDMEMPOOL_NEWDEL(SwUndoInsert) @@ -566,7 +565,6 @@ public: ULONG GetEndNode() const { return nEndNode; } ULONG GetDestSttNode() const { return nDestSttNode; } xub_StrLen GetDestSttCntnt() const { return nDestSttCntnt; } - void AddTblMrgFlyHstry( SwHistory& rHstr ); void SetMoveRedlines( bool b ) { bMoveRedlines = b; } @@ -1143,15 +1141,6 @@ public: }; -class SwUndoDelBookmark : public SwUndoBookmark -{ -public: - SwUndoDelBookmark( const ::sw::mark::IMark& ); - virtual void Undo( SwUndoIter& ); - virtual void Redo( SwUndoIter& ); - OUT_UNDOBJ( DelBookmark ) -}; - class SwUndoInsBookmark : public SwUndoBookmark { public: diff --git a/sw/inc/viewsh.hxx b/sw/inc/viewsh.hxx index f12b3ecbe9bc..42325bc7098e 100644 --- a/sw/inc/viewsh.hxx +++ b/sw/inc/viewsh.hxx @@ -398,9 +398,6 @@ public: // compatible behaviour of tabs void SetTabCompat( bool bNew ); - //#i24363# tab stops relative to indent - void SetTabsRelativeToIndent( bool bNew ); - // font metric attribute "External Leading" should be considered void SetAddExtLeading( bool bNew ); diff --git a/sw/inc/viscrs.hxx b/sw/inc/viscrs.hxx index f1fd0abb4ae4..906f29c3cb93 100644 --- a/sw/inc/viscrs.hxx +++ b/sw/inc/viscrs.hxx @@ -95,8 +95,6 @@ class SwSelPaintRects : public SwRects // die Shell const SwCrsrShell* pCShell; - void Paint( const SwRect& rRect ); - virtual void Paint( const Rectangle& rRect ); virtual void FillRects() = 0; diff --git a/sw/inc/warnpassword.hxx b/sw/inc/warnpassword.hxx deleted file mode 100644 index fa6adc89b968..000000000000 --- a/sw/inc/warnpassword.hxx +++ /dev/null @@ -1,50 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * $RCSfile: warnpassword.hxx,v $ - * $Revision: 1.4 $ - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef SW_WARNPASSWORD_HXX -#define SW_WARNPASSWORD_HXX - - - -class SfxMedium; -/** Static API helper functions. */ -class SwWarnPassword -{ -public: - /** Opens a query warning dialog. - @descr Pop up Query on export with a choice of yes/no if a - an encrypted password is imported. - @return true if yes and false if no. default to true. - */ - static bool WarningOnPassword( SfxMedium& rMedium ); -}; - - -#endif diff --git a/sw/source/core/SwNumberTree/SwNumberTree.cxx b/sw/source/core/SwNumberTree/SwNumberTree.cxx index 8f9caf5f022b..7a1a18b88501 100644 --- a/sw/source/core/SwNumberTree/SwNumberTree.cxx +++ b/sw/source/core/SwNumberTree/SwNumberTree.cxx @@ -130,19 +130,6 @@ SwNumberTreeNode * SwNumberTreeNode::GetRoot() const return pResult; } -SwNumberTreeNode * SwNumberTreeNode::GetFirstChild() const -{ - SwNumberTreeNode * pResult = 0; - - tSwNumberTreeChildren::iterator aIt = mChildren.begin(); - - if (aIt != mChildren.end() ) - pResult = *aIt; - - return pResult; -} - - void SwNumberTreeNode::ClearObsoletePhantoms() { tSwNumberTreeChildren::iterator aIt = mChildren.begin(); diff --git a/sw/source/core/access/accportions.cxx b/sw/source/core/access/accportions.cxx index 48f4b23136b9..973ed07ded50 100644 --- a/sw/source/core/access/accportions.cxx +++ b/sw/source/core/access/accportions.cxx @@ -262,12 +262,6 @@ sal_Bool SwAccessiblePortionData::IsReadOnlyPortion( size_t nPortionNo ) const return IsPortionAttrSet(nPortionNo, PORATTR_READONLY); } -sal_Bool SwAccessiblePortionData::IsGrayPortion( size_t nPortionNo ) const -{ - return IsPortionAttrSet(nPortionNo, PORATTR_GRAY); -} - - sal_Bool SwAccessiblePortionData::IsGrayPortionType( USHORT nType ) const { // gray portions? diff --git a/sw/source/core/access/accportions.hxx b/sw/source/core/access/accportions.hxx index ab866dbc3701..a281a40f0f2e 100644 --- a/sw/source/core/access/accportions.hxx +++ b/sw/source/core/access/accportions.hxx @@ -93,7 +93,6 @@ class SwAccessiblePortionData : public SwPortionHandler sal_Bool IsPortionAttrSet( size_t nPortionNo, sal_uInt8 nAttr ) const; sal_Bool IsSpecialPortion( size_t nPortionNo ) const; sal_Bool IsReadOnlyPortion( size_t nPortionNo ) const; - sal_Bool IsGrayPortion( size_t nPortionNo ) const; sal_Bool IsGrayPortionType( USHORT nType ) const; // helper method for GetEditableRange(...): diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index 3637cc19354d..1433acb46628 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -3305,19 +3305,6 @@ String SwCrsrShell::GetCrsrDescr() const return aResult; } -SwRect SwCrsrShell::GetRectOfCurrentChar() -{ - SwCntntFrm* pFrm = pCurCrsr->GetCntntNode()->GetFrm( 0, pCurCrsr->GetPoint(), FALSE ); - SwRect aRet; - SwCrsrMoveState aTmpState( MV_NONE ); - aTmpState.bRealHeight = TRUE; - pFrm->GetCharRect( aRet, *pCurCrsr->GetPoint(), &aTmpState ); - //const SwTwips nRealHeight = aTmpState.aRealHeight.Y(); - if (aTmpState.aRealHeight.X() != 0) - aRet.Top(aRet.Top() + aTmpState.aRealHeight.X()); - return aRet; -} - // SMARTTAGS void lcl_FillRecognizerData( uno::Sequence< rtl::OUString >& rSmartTagTypes, diff --git a/sw/source/core/crsr/viscrs.cxx b/sw/source/core/crsr/viscrs.cxx index 8a9dc3c0a458..608abeb21c47 100644 --- a/sw/source/core/crsr/viscrs.cxx +++ b/sw/source/core/crsr/viscrs.cxx @@ -669,16 +669,6 @@ void SwSelPaintRects::Paint( const Rectangle& /*rRect*/ ) // nothing to do with overlays } -/* - * Rectangle ist in Dokument-Koordianten !! - * pWin != 0 -> auch wirklich malen - * == 0 -> nur testen, ob es gemalt werden kann - */ - -void SwSelPaintRects::Paint( const SwRect& /*rRect*/ ) -{ - // nothing to do with overlays -} // check current MapMode of the shell and set possibly the static members. // Optional set the parameters pX, pY diff --git a/sw/source/core/fields/postithelper.cxx b/sw/source/core/fields/postithelper.cxx index 596a390cd2ae..7750981c7a7b 100644 --- a/sw/source/core/fields/postithelper.cxx +++ b/sw/source/core/fields/postithelper.cxx @@ -129,22 +129,6 @@ unsigned long SwPostItHelper::getPageInfo( SwRect& rPageFrm, const SwRootFrm* pR return nRet; } -SwPostItHelper::SwLayoutStatus SwPostItHelper::getLayoutInfos( std::vector< SwLayoutInfo >& rInfo, SwTxtFld* pFld ) -{ - SwLayoutStatus aRet = SwPostItHelper::INVISIBLE; - if( pFld ) - { - SwTxtNode* pTNd = pFld->GetpTxtNode(); - if( pTNd ) - { - SwPosition aPos( *pTNd ); - aPos.nContent.Assign( pTNd, *pFld->GetStart() ); - aRet = getLayoutInfos( rInfo, aPos ); - } - } - return aRet; -} - SwPosition SwPostItItem::GetPosition() { SwTxtFld* pFld = pFmtFld->GetTxtFld(); diff --git a/sw/source/core/inc/SwGrammarMarkUp.hxx b/sw/source/core/inc/SwGrammarMarkUp.hxx index bb8ccc96905e..e953408c1daf 100644 --- a/sw/source/core/inc/SwGrammarMarkUp.hxx +++ b/sw/source/core/inc/SwGrammarMarkUp.hxx @@ -72,8 +72,6 @@ public: /* getSentenceEnd returns the first start position of a sentence which is greater than the given parameter */ xub_StrLen getSentenceEnd( xub_StrLen nPos ); - /* removeSentence removes all start positions in the given range */ - void removeSentence(xub_StrLen nStart, xub_StrLen nLength ); }; #endif diff --git a/sw/source/core/text/SwGrammarMarkUp.cxx b/sw/source/core/text/SwGrammarMarkUp.cxx index 74e6dbf27b30..4514f3fe64ac 100644 --- a/sw/source/core/text/SwGrammarMarkUp.cxx +++ b/sw/source/core/text/SwGrammarMarkUp.cxx @@ -139,21 +139,6 @@ void SwGrammarMarkUp::setSentence( xub_StrLen nStart ) maSentence.insert( pIter, nStart ); } -void SwGrammarMarkUp::removeSentence(xub_StrLen nStart, xub_StrLen nLength ) -{ - std::vector< xub_StrLen >::iterator pIter = maSentence.begin(); - while( pIter != maSentence.end() && *pIter < nStart ) - ++pIter; - if( nLength == STRING_LEN ) - nStart = STRING_LEN; - else - nStart += nLength; - std::vector< xub_StrLen >::iterator pLast = pIter; - while( pLast != maSentence.end() && *pLast < nStart ) - ++pLast; - maSentence.erase( pIter, pLast ); -} - xub_StrLen SwGrammarMarkUp::getSentenceStart( xub_StrLen nPos ) { if( !maSentence.size() ) diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx index 2448b061bc1d..c96cf90ea8c9 100644 --- a/sw/source/core/text/inftxt.cxx +++ b/sw/source/core/text/inftxt.cxx @@ -1140,7 +1140,7 @@ void SwTxtPaintInfo::DrawPostIts( const SwLinePortion&, sal_Bool bScript ) const } } - +#if 0 void SwTxtPaintInfo::DrawCheckBox( const SwFieldFormPortion &rPor, bool checked) const { SwRect aIntersect; @@ -1167,7 +1167,7 @@ void SwTxtPaintInfo::DrawCheckBox( const SwFieldFormPortion &rPor, bool checked) } } } - +#endif /************************************************************************* * SwTxtPaintInfo::DrawBackGround() *************************************************************************/ diff --git a/sw/source/core/text/inftxt.hxx b/sw/source/core/text/inftxt.hxx index 77b6e03d4f26..6ee02e1dafd1 100644 --- a/sw/source/core/text/inftxt.hxx +++ b/sw/source/core/text/inftxt.hxx @@ -473,7 +473,9 @@ public: inline void DrawBackBrush( const SwLinePortion &rPor ) const { /* if( pFnt->GetBackColor() ) */ _DrawBackBrush( rPor ); } +#if 0 void DrawCheckBox( const SwFieldFormPortion &rPor, bool checked) const; +#endif inline void NotifyURL( const SwLinePortion &rPor ) const { if( URLNotify() ) _NotifyURL( rPor ); } diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx index 7b3d381929e2..02e003e1e9b1 100644 --- a/sw/source/core/text/porlay.cxx +++ b/sw/source/core/text/porlay.cxx @@ -125,11 +125,6 @@ sal_Bool isHahChar ( xub_Unicode cCh ) || cCh == 0x6BF ); } -sal_Bool isTahChar ( xub_Unicode cCh ) -{ - return ( cCh == 0x637 || cCh == 0x638 || cCh == 0x69F ); -} - sal_Bool isAinChar ( xub_Unicode cCh ) { return ( cCh == 0x639 || cCh == 0x63A || cCh == 0x6A0 || cCh == 0x6FC ); diff --git a/sw/source/core/undo/unbkmk.cxx b/sw/source/core/undo/unbkmk.cxx index f49cea5ac7d3..d583e2135910 100644 --- a/sw/source/core/undo/unbkmk.cxx +++ b/sw/source/core/undo/unbkmk.cxx @@ -91,23 +91,6 @@ SwRewriter SwUndoBookmark::GetRewriter() const //---------------------------------------------------------------------- -SwUndoDelBookmark::SwUndoDelBookmark( const ::sw::mark::IMark& rBkmk ) - : SwUndoBookmark( UNDO_DELBOOKMARK, rBkmk ) -{ -} - - -void SwUndoDelBookmark::Undo( SwUndoIter& rUndoIter ) -{ - SetInDoc( &rUndoIter.GetDoc() ); -} - - -void SwUndoDelBookmark::Redo( SwUndoIter& rUndoIter ) -{ - ResetInDoc( &rUndoIter.GetDoc() ); -} - SwUndoInsBookmark::SwUndoInsBookmark( const ::sw::mark::IMark& rBkmk ) : SwUndoBookmark( UNDO_INSBOOKMARK, rBkmk ) diff --git a/sw/source/core/undo/unins.cxx b/sw/source/core/undo/unins.cxx index 85db90c85701..f99bfbebf432 100644 --- a/sw/source/core/undo/unins.cxx +++ b/sw/source/core/undo/unins.cxx @@ -167,21 +167,6 @@ SwUndoInsert::SwUndoInsert( const SwNodeIndex& rNd ) // werden kann. Wenn ja, dann aender die Laenge und die InsPos. // Dann wird von SwDoc::Insert kein neues Object in die Undoliste gestellt. -BOOL SwUndoInsert::CanGrouping( const SwPosition& rInsPos, sal_Unicode cIns ) -{ - BOOL bRet = FALSE; - if( !bIsAppend ) - { - ++nCntnt; - bRet = CanGrouping( rInsPos ); - --nCntnt; - if( bRet ) - bRet = CanGrouping( cIns ); - } - return bRet; -} - - BOOL SwUndoInsert::CanGrouping( sal_Unicode cIns ) { if( !bIsAppend && bIsWordDelim == diff --git a/sw/source/core/undo/unmove.cxx b/sw/source/core/undo/unmove.cxx index ac318b2aab6d..a16bbc47be75 100644 --- a/sw/source/core/undo/unmove.cxx +++ b/sw/source/core/undo/unmove.cxx @@ -357,13 +357,3 @@ void SwUndoMove::DelFtn( const SwPaM& rRange ) } } -void SwUndoMove::AddTblMrgFlyHstry( SwHistory& rHstr ) -{ - if( !pHistory ) - pHistory = new SwHistory; - - USHORT nInsPos = nFtnStt; - nFtnStt = nFtnStt + rHstr.Count(); - pHistory->Move( nInsPos, &rHstr ); -} - diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx index 36a8808fd351..2e1dd7e8abee 100644 --- a/sw/source/core/unocore/unotbl.cxx +++ b/sw/source/core/unocore/unotbl.cxx @@ -4429,41 +4429,6 @@ void SwXCellRange::GetDataSequence( pDblSeq->realloc( nDtaCnt ); } -/*-- 04.06.04 11:42:47--------------------------------------------------- - - -----------------------------------------------------------------------*/ - -SwUnoCrsr * lcl_CreateCursor( SwFrmFmt &rTblFmt, - SwTableBox *pStartBox, // should be top-left cell of cell range - SwTableBox *pEndBox ) // should be bottom right-cell cell range -{ - // create a *new* UNO cursor spanning the cell range defined by - // the start and end box. Both boxes must be belong to the same table! - - SwUnoCrsr *pUnoCrsr = 0; - if (pStartBox && pEndBox) - { - // hier muessen die Actions aufgehoben werden um - // (zB dem Layout zu ermglichen die Tabelle zu formatieren, da - // sonst kein Tabellen Cursor aufgespannt werden kann.) - UnoActionRemoveContext aRemoveContext(rTblFmt.GetDoc()); - - // set point of cursor to top left box of range - const SwStartNode* pSttNd = pStartBox->GetSttNd(); - SwPosition aPos(*pSttNd); - pUnoCrsr = rTblFmt.GetDoc()->CreateUnoCrsr(aPos, sal_True); - pUnoCrsr->Move( fnMoveForward, fnGoNode ); - pUnoCrsr->SetRemainInSection( sal_False ); - pUnoCrsr->SetMark(); - pUnoCrsr->GetPoint()->nNode = *pEndBox->GetSttNd(); - pUnoCrsr->Move( fnMoveForward, fnGoNode ); - SwUnoTableCrsr *pCrsr = dynamic_cast(pUnoCrsr); - pCrsr->MakeBoxSels(); - } - return pUnoCrsr; -} - - /*-- 29.04.02 11:42:47--------------------------------------------------- -----------------------------------------------------------------------*/ diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index cd80439877f6..2f6483e632f3 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -884,21 +884,6 @@ void ViewShell::SetTabCompat( bool bNew ) } } -/*-- 29.11.2007 09:03:18--------------------------------------------------- - //#i24363# tab stops relative to indent - -----------------------------------------------------------------------*/ -void ViewShell::SetTabsRelativeToIndent(bool bNew) -{ - IDocumentSettingAccess* pIDSA = getIDocumentSettingAccess(); - if( pIDSA->get(IDocumentSettingAccess::TABS_RELATIVE_TO_INDENT) != bNew ) - { - SwWait aWait( *GetDoc()->GetDocShell(), TRUE ); - pIDSA->set(IDocumentSettingAccess::TABS_RELATIVE_TO_INDENT, bNew ); - const BYTE nInv = INV_PRTAREA | INV_SIZE | INV_TABLE | INV_SECTION; - lcl_InvalidateAllCntnt( *this, nInv ); - } -} - void ViewShell::SetAddExtLeading( bool bNew ) { IDocumentSettingAccess* pIDSA = getIDocumentSettingAccess(); diff --git a/sw/source/filter/rtf/swparrtf.cxx b/sw/source/filter/rtf/swparrtf.cxx index 0b2bd344ccc4..60796e43d93a 100644 --- a/sw/source/filter/rtf/swparrtf.cxx +++ b/sw/source/filter/rtf/swparrtf.cxx @@ -1618,79 +1618,6 @@ USHORT SwRTFParser::ReadRevTbl() return nAuthorTableIndex; } -// #117910# simulate words behaviour of \keepn in table rows -void fixKeepAndSplitAttributes(SwTableNode *pTableNode) -{ - ASSERT(pTableNode!=NULL, "no table node!"); - if (!pTableNode) return; - SwDoc *pDoc=pTableNode->GetDoc(); - if (pTableNode==NULL) return; - SwTable& rTable=pTableNode->GetTable(); - SwTableLines& rLns = rTable.GetTabLines(); - USHORT nLines=rLns.Count(); - if (nLines==0) return; - // get first paragaph in left down-most box - SwTableLine* pLastLine = rLns[ nLines-1 ]; - SwTableBox* pBox = pLastLine->GetTabBoxes()[ 0 ]; - ULONG iFirstParagraph=pBox->GetSttIdx()+1; - SwTxtNode *pTxtNode=(SwTxtNode *)pDoc->GetNodes()[iFirstParagraph]; - SwFrmFmt* pFmt=rTable.GetFrmFmt(); - - SwFmtLayoutSplit *pTableSplit=(SwFmtLayoutSplit *)pFmt->GetAttrSet().GetItem(RES_LAYOUT_SPLIT); - BOOL isTableKeep = pTableSplit!=NULL && !pTableSplit->GetValue(); - SvxFmtKeepItem *pTableKeep=(SvxFmtKeepItem *)pFmt->GetAttrSet().GetItem(RES_KEEP); - BOOL isTableKeepNext = pTableKeep!=NULL && pTableKeep->GetValue(); - SvxFmtKeepItem *pKeepNext = (SvxFmtKeepItem *)pTxtNode->GetSwAttrSet().GetItem(RES_KEEP); - - if (isTableKeepNext) - { - if (nLines>2 && !isTableKeep) - { // split - SwTableLine* pSplitLine = rLns[ nLines-2 ]; - SwTableBox* pSplitBox = pSplitLine->GetTabBoxes()[ 0 ]; - SwNodeIndex aSplitIdx( *pSplitBox->GetSttNd() ); - pDoc->SplitTable( SwPosition(aSplitIdx), HEADLINE_NONE, - !isTableKeep ); - SwTable& rSplitTable=aSplitIdx.GetNode().FindTableNode()->GetTable(); - aSplitIdx-=2; - pDoc->GetNodes().Delete(aSplitIdx); - pFmt=rSplitTable.GetFrmFmt(); - pFmt->ResetFmtAttr(RES_PAGEDESC); - } - // set keep=1(i.e. split=0) attribut - SwFmtLayoutSplit aSplit(0); - SwAttrSet aNewSet(pFmt->GetAttrSet()); - aNewSet.Put(aSplit); - pFmt->SetFmtAttr(aNewSet); - } - else // !isTableKeepNext - { - if (isTableKeep) - { - SwNodeIndex aTmpIdx( *pBox->GetSttNd() ); - pDoc->SplitTable( SwPosition(aTmpIdx), HEADLINE_NONE, FALSE ); - SwTable& rSplitTable=aTmpIdx.GetNode().FindTableNode()->GetTable(); - aTmpIdx-=2; - pDoc->GetNodes().Delete(aTmpIdx); - pFmt=rSplitTable.GetFrmFmt(); - pFmt->ResetFmtAttr(RES_PAGEDESC); - } - // set keep=0(i.e. split=1) attribut - SwFmtLayoutSplit aSplit(1); - SwAttrSet aNewSet(pFmt->GetAttrSet()); - aNewSet.Put(aSplit); - pFmt->SetFmtAttr(aNewSet); - } - // move keepnext attribtue from last paragraph to table - if (pKeepNext!=NULL) - { - SvxFmtKeepItem aNewKeepItem(pKeepNext->GetValue(), RES_KEEP); - SwAttrSet aNewSet(pFmt->GetAttrSet()); - aNewSet.Put(aNewKeepItem); - pFmt->SetFmtAttr(aNewSet); - } -} - void SwRTFParser::NextToken( int nToken ) { USHORT eDateFmt; diff --git a/sw/source/filter/ww8/WW8TableInfo.cxx b/sw/source/filter/ww8/WW8TableInfo.cxx index 021bbea5f380..a4e7fb9a1517 100644 --- a/sw/source/filter/ww8/WW8TableInfo.cxx +++ b/sw/source/filter/ww8/WW8TableInfo.cxx @@ -139,6 +139,7 @@ const SwTable * WW8TableNodeInfoInner::getTable() const return mpTable; } +#ifdef DEBUG string WW8TableNodeInfoInner::toString() const { static char buffer[256]; @@ -154,7 +155,7 @@ string WW8TableNodeInfoInner::toString() const return string(buffer); } - +#endif // WW8TableTextNodeInfo WW8TableNodeInfo::WW8TableNodeInfo(const SwNode * pNode) @@ -170,6 +171,7 @@ WW8TableNodeInfo::~WW8TableNodeInfo() { } +#ifdef DEBUG ::std::string WW8TableNodeInfo::toString() const { static char buffer[1024]; @@ -190,15 +192,13 @@ WW8TableNodeInfo::~WW8TableNodeInfo() aIt++; } -#ifdef DEBUG sResult += dbg_out(*mpNode); -#endif sResult +=""; return sResult; } - +#endif void WW8TableNodeInfo::setDepth(sal_uInt32 nDepth) { mnDepth = nDepth; diff --git a/sw/source/filter/ww8/WW8TableInfo.hxx b/sw/source/filter/ww8/WW8TableInfo.hxx index 035464fb751b..7d5babc9bbfa 100644 --- a/sw/source/filter/ww8/WW8TableInfo.hxx +++ b/sw/source/filter/ww8/WW8TableInfo.hxx @@ -84,7 +84,9 @@ public: const SwNode * getNode() const; +#ifdef DEBUG string toString() const; +#endif }; class WW8TableNodeInfo @@ -131,7 +133,9 @@ public: sal_uInt32 getCell() const; sal_uInt32 getRow() const; +#ifdef DEBUG ::std::string toString() const; +#endif }; struct hashNode diff --git a/sw/source/filter/ww8/writerhelper.cxx b/sw/source/filter/ww8/writerhelper.cxx index b68f321d35b6..1da4d59e7ec2 100644 --- a/sw/source/filter/ww8/writerhelper.cxx +++ b/sw/source/filter/ww8/writerhelper.cxx @@ -570,6 +570,7 @@ namespace sw return aRet; } +#if 0 Frames GetFramesBetweenNodes(const Frames &rFrames, const SwNode &rStart, const SwNode &rEnd) { @@ -583,7 +584,7 @@ namespace sw return aRet; } - +#endif Frames GetFramesInNode(const Frames &rFrames, const SwNode &rNode) { Frames aRet; diff --git a/sw/source/filter/ww8/writerhelper.hxx b/sw/source/filter/ww8/writerhelper.hxx index 68a474b227d5..6c8721df214f 100644 --- a/sw/source/filter/ww8/writerhelper.hxx +++ b/sw/source/filter/ww8/writerhelper.hxx @@ -666,6 +666,7 @@ namespace sw */ Frames GetFramesInNode(const Frames &rFrames, const SwNode &rNode); +#if 0 /** Get the Frames anchored for all nodes between two points Given a container of frames, find the ones anchored to the nodes @@ -688,7 +689,7 @@ namespace sw */ Frames GetFramesBetweenNodes(const Frames &rFrames, const SwNode &rStart, const SwNode &rEnd); - +#endif /** Get the Numbering Format used on a paragraph There are two differing types of numbering formats that may be on a diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx index 98006fb5d267..b4a536839829 100644 --- a/sw/source/filter/ww8/ww8par.hxx +++ b/sw/source/filter/ww8/ww8par.hxx @@ -383,20 +383,18 @@ private: SwNodeIndex maPtNode; xub_StrLen mnPtCntnt; ::rtl::OUString msBookmarkName; - ::rtl::OUString msMarkType; typedef ::std::pair< ::rtl::OUString, ::rtl::OUString> Param_t; typedef ::std::vector< Param_t > Params_t; Params_t maParams; SwPaM * mpPaM; public: - WW8NewFieldCtx(SwPosition &aStartPos, ::rtl::OUString sBookmarkName, ::rtl::OUString sMarkType); + WW8NewFieldCtx(SwPosition &aStartPos, ::rtl::OUString sBookmarkName); ~WW8NewFieldCtx(); SwNodeIndex GetPtNode() { return maPtNode; }; xub_StrLen GetPtCntnt() { return mnPtCntnt; }; ::rtl::OUString GetBookmarkName(); - ::rtl::OUString GetMarkType(); void AddParam(::rtl::OUString name, ::rtl::OUString value); void SetCurrentFieldParamsTo(::sw::mark::IFieldmark* pFieldmark); }; diff --git a/sw/source/filter/ww8/ww8par2.hxx b/sw/source/filter/ww8/ww8par2.hxx index 302227fca0fe..a9879d509627 100644 --- a/sw/source/filter/ww8/ww8par2.hxx +++ b/sw/source/filter/ww8/ww8par2.hxx @@ -288,7 +288,6 @@ public: const WW8SwFlyPara* pFS, bool bGraf); WW8FlySet(SwWW8ImplReader& rReader, const SwPaM* pPaM, const WW8_PIC& rPic, long nWidth, long nHeight); - WW8FlySet(const SwWW8ImplReader& rReader, const SwPaM* pPaM); }; enum WW8LvlType {WW8_None, WW8_Outline, WW8_Numbering, WW8_Sequence, WW8_Pause}; diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx index b6b91459fc10..ba35fd2bfdb6 100644 --- a/sw/source/filter/ww8/ww8par3.cxx +++ b/sw/source/filter/ww8/ww8par3.cxx @@ -103,11 +103,10 @@ using namespace com::sun::star; using namespace sw::util; using namespace sw::types; -WW8NewFieldCtx::WW8NewFieldCtx(SwPosition &aStartPos, ::rtl::OUString sBookmarkName, ::rtl::OUString sMarkType) +WW8NewFieldCtx::WW8NewFieldCtx(SwPosition &aStartPos, ::rtl::OUString sBookmarkName) : maPtNode(aStartPos.nNode) , mnPtCntnt(aStartPos.nContent.GetIndex()) , msBookmarkName(sBookmarkName) - , msMarkType(sMarkType) , mpPaM(NULL) { } @@ -123,11 +122,6 @@ WW8NewFieldCtx::~WW8NewFieldCtx() return msBookmarkName; } -::rtl::OUString WW8NewFieldCtx::GetMarkType() -{ - return msMarkType; -} - void WW8NewFieldCtx::AddParam(::rtl::OUString name, ::rtl::OUString value) { maParams.push_back( Param_t(name, value) ); @@ -233,7 +227,7 @@ eF_ResT SwWW8ImplReader::Read_F_FormTextBox( WW8FieldDesc* pF, String& rStr ) if (aBookmarkName.Len()>0) { - WW8NewFieldCtx *pFieldCtx=new WW8NewFieldCtx(*pPaM->GetPoint(), aBookmarkName, ::rtl::OUString::createFromAscii("ecma.office-open-xml.field.FORMTEXT")); + WW8NewFieldCtx *pFieldCtx=new WW8NewFieldCtx(*pPaM->GetPoint(), aBookmarkName/*, ::rtl::OUString::createFromAscii("ecma.office-open-xml.field.FORMTEXT"*/); maNewFieldCtxStack.push_back(pFieldCtx); pFieldCtx->AddParam(::rtl::OUString::createFromAscii("Description"), aFormula.sToolTip); pFieldCtx->AddParam(::rtl::OUString::createFromAscii("Name"), aFormula.sTitle); diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx index 82e2192b52ed..c5cdac8b6d8a 100644 --- a/sw/source/filter/ww8/ww8par6.cxx +++ b/sw/source/filter/ww8/ww8par6.cxx @@ -2275,12 +2275,6 @@ WW8FlySet::WW8FlySet( SwWW8ImplReader& rReader, const SwPaM* pPaM, + aSizeArray[WW8_BOT]) ); } -WW8FlySet::WW8FlySet(const SwWW8ImplReader& rReader, const SwPaM* pPaM) - : SfxItemSet(rReader.rDoc.GetAttrPool(),RES_FRMATR_BEGIN,RES_FRMATR_END-1) -{ - Init(rReader, pPaM); -} - void WW8FlySet::Init(const SwWW8ImplReader& rReader, const SwPaM* pPaM) { if (!rReader.mbNewDoc) diff --git a/sw/source/ui/app/docsh.cxx b/sw/source/ui/app/docsh.cxx index 8a119ddd5140..2fcfe185921c 100644 --- a/sw/source/ui/app/docsh.cxx +++ b/sw/source/ui/app/docsh.cxx @@ -106,7 +106,6 @@ #include #include #include -#include "warnpassword.hxx" #include #include diff --git a/sw/source/ui/docvw/PostItMgr.cxx b/sw/source/ui/docvw/PostItMgr.cxx index 8b275c0a6447..c249c2cbc85f 100644 --- a/sw/source/ui/docvw/PostItMgr.cxx +++ b/sw/source/ui/docvw/PostItMgr.cxx @@ -1295,7 +1295,7 @@ void SwPostItMgr::Delete() CalcRects(); LayoutPostIts(); } - +#if 0 void SwPostItMgr::Hide(SwPostItField* pPostItField ) { for(std::list::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++) @@ -1314,7 +1314,7 @@ void SwPostItMgr::Hide(SwPostItField* pPostItField ) LayoutPostIts(); } - +#endif void SwPostItMgr::Hide( const String& rAuthor ) { for(SwMarginItem_iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++) @@ -1379,16 +1379,6 @@ SwMarginWin* SwPostItMgr::GetPostIt(SfxBroadcaster* pBroadcaster) const return NULL; } -SwPostIt* SwPostItMgr::GetPostIt(SwPostItField* pFld) const -{ - for(const_iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++) - { - if ( (*i)->GetFmtFld() && ((*i)->GetFmtFld()->GetFld() == pFld) ) - return static_cast((*i)->pPostIt); - } - return NULL; -} - SwMarginWin* SwPostItMgr::GetPostIt( const SfxBroadcaster* pBroadcaster) const { for(const_iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++) @@ -1409,30 +1399,6 @@ SwPostIt* SwPostItMgr::GetPostIt(const SwPostItField* pFld) const return NULL; } -bool SwPostItMgr::ShowPreview(const SwField* pFld, SwFmtFld*& pFmtFld) const -{ - for (unsigned long n=0;nmList->size()>0) - { - for(const_iterator i = mPages[n]->mList->begin(); i!= mPages[n]->mList->end(); i++) - { - if ( (*i)->GetFmtFld() && ((*i)->GetFmtFld()->GetFld()==pFld) ) - { - pFmtFld = (*i)->GetFmtFld(); - const long aSidebarheight = mPages[n]->bScrollbar ? mpEditWin->PixelToLogic(Size(0,GetSidebarScrollerHeight())).Height() : 0; - bool bTopPage = mpEditWin->PixelToLogic(Point(0,(*i)->pPostIt->GetPosPixel().Y())).Y() >= (mPages[n]->mPageRect.Top()+aSidebarheight); - bool bBottomPage = mpEditWin->PixelToLogic(Point(0,(*i)->pPostIt->GetPosPixel().Y()+(*i)->pPostIt->GetSizePixel().Height())).Y() <= (mPages[n]->mPageRect.Bottom()-aSidebarheight); - const bool bTopVis = mpEditWin->PixelToLogic(Point(0,(*i)->pPostIt->GetPosPixel().Y())).Y() > mpView->GetVisArea().Top(); - const bool bBottomVis = mpEditWin->PixelToLogic(Point(0,(*i)->pPostIt->GetPosPixel().Y()/*+(*i)->pPostIt->GetSizePixel().Height()*/)).Y() <= mpView->GetVisArea().Bottom(); - return !(bBottomPage && bTopPage && bBottomVis && bTopVis); - } - } - } - } - return false; -} - SwMarginWin* SwPostItMgr::GetNextPostIt(USHORT aDirection, SwMarginWin* aPostIt) { if (mvPostItFlds.size()>1) diff --git a/sw/source/ui/docvw/postit.cxx b/sw/source/ui/docvw/postit.cxx index 3079cc855c50..ee7d4f87f049 100644 --- a/sw/source/ui/docvw/postit.cxx +++ b/sw/source/ui/docvw/postit.cxx @@ -1517,6 +1517,7 @@ void SwMarginWin::SetViewState(ShadowState bState) } } +#if 0 bool SwMarginWin::IsAnyStackParentVisible() { SwMarginWin* pMarginWin = mpMgr->GetNextPostIt(KEY_PAGEUP, this); @@ -1533,7 +1534,7 @@ bool SwMarginWin::IsAnyStackParentVisible() } return false; } - +#endif SwMarginWin* SwMarginWin::GetTopReplyNote() { SwMarginWin* pTopNote = 0; diff --git a/sw/source/ui/uno/makefile.mk b/sw/source/ui/uno/makefile.mk index 41b2cc73ca78..2632db2e89c8 100644 --- a/sw/source/ui/uno/makefile.mk +++ b/sw/source/ui/uno/makefile.mk @@ -63,8 +63,7 @@ SLO1FILES = \ $(SLO)$/SwXFilterOptions.obj\ $(SLO)$/RefreshListenerContainer.obj \ $(SLO)$/unomodule.obj \ - $(SLO)$/unodoc.obj \ - $(SLO)$/warnpassword.obj + $(SLO)$/unodoc.obj SLO2FILES = \ $(SLO)$/swdetect.obj \ diff --git a/sw/source/ui/uno/warnpassword.cxx b/sw/source/ui/uno/warnpassword.cxx deleted file mode 100644 index 600256cf05db..000000000000 --- a/sw/source/ui/uno/warnpassword.cxx +++ /dev/null @@ -1,89 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * $RCSfile: warnpassword.cxx,v $ - * $Revision: 1.7 $ - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * -+ ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_sw.hxx" -// ============================================================================ -#include "warnpassword.hxx" -#include -#include -#include -#include -#include -#include -#include - -using ::rtl::OUString; - -using namespace ::com::sun::star; -using namespace ::com::sun::star::uno; -using namespace ::com::sun::star::ucb; -using namespace ::com::sun::star::task; - -bool SwWarnPassword::WarningOnPassword( SfxMedium& rMedium ) -{ - bool bReturn = true; - uno::Reference< task::XInteractionHandler > xHandler( rMedium.GetInteractionHandler()); - if( xHandler.is() ) - { - - OUString empty; - uno::Any xException( makeAny(InteractiveAppException(empty, - uno::Reference (), - InteractionClassification_QUERY, - ERRCODE_SVX_EXPORT_FILTER_CRYPT))); - - uno::Reference< ucbhelper::SimpleInteractionRequest > xRequest - = new ucbhelper::SimpleInteractionRequest( - xException, - ucbhelper::CONTINUATION_APPROVE - | ucbhelper::CONTINUATION_DISAPPROVE ); - - xHandler->handle( xRequest.get() ); - - const sal_Int32 nResp = xRequest->getResponse(); - - switch ( nResp ) - { - case ucbhelper::CONTINUATION_UNKNOWN: - break; - - case ucbhelper::CONTINUATION_APPROVE: - // Continue - break; - - case ucbhelper::CONTINUATION_DISAPPROVE: - bReturn = false; - break; - } - } - return bReturn; -} - -- cgit v1.2.3 From 7a2fef737c448a529383aee7e1ac4706543b0891 Mon Sep 17 00:00:00 2001 From: os Date: Wed, 13 Jan 2010 15:51:18 +0100 Subject: #i108288# IS_TEMPLATE and VBA_DOCOBJ removed --- sw/inc/unoprnms.hxx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sw/inc/unoprnms.hxx b/sw/inc/unoprnms.hxx index 60b77d65061d..56360281915d 100644 --- a/sw/inc/unoprnms.hxx +++ b/sw/inc/unoprnms.hxx @@ -808,9 +808,7 @@ enum SwPropNameIds /* 0737 */ UNO_NAME_DESCRIPTION, // <-- /* 0738 */ UNO_NAME_META, // #i91565# -/* 0739 */ UNO_NAME_IS_TEMPLATE, -/* 0740 */ UNO_NAME_VBA_DOCOBJ, -/* 0741 */ SW_PROPNAME_END +/* 0739 */ SW_PROPNAME_END }; -- cgit v1.2.3 From 4229957bee7e7a80daacc7a5566014cb2b57c5fe Mon Sep 17 00:00:00 2001 From: os Date: Mon, 18 Jan 2010 16:38:57 +0100 Subject: #i108426# missing increment added --- sw/source/core/unocore/unostyle.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx index 4f40e12c2326..f362e3ee30ce 100644 --- a/sw/source/core/unocore/unostyle.cxx +++ b/sw/source/core/unocore/unostyle.cxx @@ -1266,6 +1266,7 @@ sal_Bool SwStyleProperties_Impl::GetProperty(const ::rtl::OUString& rName, uno:: bRet = sal_True; break; } + ++nPos; ++aIt; } -- cgit v1.2.3 From 0f70785f936bcee22c04cb4490c756a99302faa8 Mon Sep 17 00:00:00 2001 From: os Date: Wed, 20 Jan 2010 15:33:56 +0100 Subject: #i108455# check configuration pointers before call of RemoveListener() --- sw/source/ui/app/apphdl.cxx | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/sw/source/ui/app/apphdl.cxx b/sw/source/ui/app/apphdl.cxx index 2d4615bba585..e1cdfb8f7f7d 100644 --- a/sw/source/ui/app/apphdl.cxx +++ b/sw/source/ui/app/apphdl.cxx @@ -768,15 +768,20 @@ void SwModule::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint ) DELETEZ(pWebToolbarConfig) ; DELETEZ(pAuthorNames) ; DELETEZ(pDBConfig); - pColorConfig->RemoveListener(this); + if( pColorConfig ) + pColorConfig->RemoveListener(this); DELETEZ(pColorConfig); - pAccessibilityOptions->RemoveListener(this); + if( pAccessibilityOptions ) + pAccessibilityOptions->RemoveListener(this); DELETEZ(pAccessibilityOptions); - pCTLOptions->RemoveListener(this); + if(pCTLOptions) + pCTLOptions->RemoveListener(this); DELETEZ(pCTLOptions); - pUserOptions->RemoveListener(this); + if(pUserOptions) + pUserOptions->RemoveListener(this); DELETEZ(pUserOptions); - pUndoOptions->RemoveListener(this); + if(pUndoOptions) + pUndoOptions->RemoveListener(this); DELETEZ(pUndoOptions); } } -- cgit v1.2.3 From 260a7ed5586a2a39dbf141b0cb4ed22ee6bf7ff9 Mon Sep 17 00:00:00 2001 From: os Date: Wed, 20 Jan 2010 15:50:24 +0100 Subject: #i108081# take care of OLE objects in mail merge --- sw/inc/doc.hxx | 2 +- sw/source/core/doc/docnew.cxx | 233 ++---------------------------------------- sw/source/ui/dbui/dbmgr.cxx | 7 +- sw/source/ui/uno/unotxdoc.cxx | 15 ++- 4 files changed, 20 insertions(+), 237 deletions(-) diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx index df81a13dab12..e2d67750c144 100644 --- a/sw/inc/doc.hxx +++ b/sw/inc/doc.hxx @@ -2115,7 +2115,7 @@ public: ::sfx2::IXmlIdRegistry& GetXmlIdRegistry(); ::sw::MetaFieldManager & GetMetaFieldManager(); - SwDoc* CreateCopy() const; + SfxObjectShell* CreateCopy(bool bCallInitNew) const; }; diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx index 57d017bd050e..25d64568e8b3 100644 --- a/sw/source/core/doc/docnew.cxx +++ b/sw/source/core/doc/docnew.cxx @@ -1069,14 +1069,10 @@ void SwDoc::InitTOXTypes() /*-- 08.05.2009 10:07:57--------------------------------------------------- -----------------------------------------------------------------------*/ -SwDoc* SwDoc::CreateCopy() const +SfxObjectShell* SwDoc::CreateCopy(bool bCallInitNew ) const { SwDoc* pRet = new SwDoc; //copy settings -/* - //aNodes( this ), - //aUndoNodes( this ), - mpAttrPool(new SwAttrPool(this)),*/ USHORT __FAR_DATA aRangeOfDefaults[] = { RES_FRMATR_BEGIN, RES_FRMATR_END-1, RES_CHRATR_BEGIN, RES_CHRATR_END-1, @@ -1105,143 +1101,8 @@ SwDoc* SwDoc::CreateCopy() const if( aNewDefaults.Count() ) pRet->SetDefault( aNewDefaults ); - /* - pDfltFrmFmt( new SwFrmFmt( GetAttrPool(), sFrmFmtStr, 0 ) ), - pEmptyPageFmt( new SwFrmFmt( GetAttrPool(), sEmptyPageStr, pDfltFrmFmt ) ), - pColumnContFmt( new SwFrmFmt( GetAttrPool(), sColumnCntStr, pDfltFrmFmt ) ), - pDfltCharFmt( new SwCharFmt( GetAttrPool(), sCharFmtStr, 0 ) ), - pDfltTxtFmtColl( new SwTxtFmtColl( GetAttrPool(), sTxtCollStr ) ), - pDfltGrfFmtColl( new SwGrfFmtColl( GetAttrPool(), sGrfCollStr ) ), - pFrmFmtTbl( new SwFrmFmts() ), - pCharFmtTbl( new SwCharFmts() ), - pSpzFrmFmtTbl( new SwSpzFrmFmts() ), - pSectionFmtTbl( new SwSectionFmts() ), - pTblFrmFmtTbl( new SwFrmFmts() ), - pTxtFmtCollTbl( new SwTxtFmtColls() ), - pGrfFmtCollTbl( new SwGrfFmtColls() ), - pBookmarkTbl( new SwBookmarks( 0, 16 ) ), - pTOXTypes( new SwTOXTypes() ), - pDefTOXBases( new SwDefTOXBase_Impl() ), - pLayout( 0 ), // Rootframe des spezifischen Layouts. - pDrawModel( 0 ), - pUndos( new SwUndos( 0, 20 ) ), - pUpdtFlds( new SwDocUpdtFld() ), - pFldTypes( new SwFldTypes() ), - pVirDev( 0 ), - pPrt( 0 ), - pPrtData( 0 ), - pGlossaryDoc( 0 ), - pOutlineRule( 0 ), - pFtnInfo( new SwFtnInfo ), - pEndNoteInfo( new SwEndNoteInfo ), - pLineNumberInfo( new SwLineNumberInfo ), - pFtnIdxs( new SwFtnIdxs ), - pDocStat( new SwDocStat ), - pDocShell( 0 ), - pDocShRef( 0 ), - pLinkMgr( new SvxLinkManager( 0 ) ), - pACEWord( 0 ), - pURLStateChgd( 0 ), - pNumberFormatter( 0 ), - pNumRuleTbl( new SwNumRuleTbl ), - // --> OD 2008-03-26 #refactorlists# - maLists(), - maListStyleLists(), - // <-- - pRedlineTbl( new SwRedlineTbl ), - pAutoFmtRedlnComment( 0 ), - pUnoCrsrTbl( new SwUnoCrsrTbl( 0, 16 ) ), - pPgPViewPrtData( 0 ), - pExtInputRing( 0 ), - pLayouter( 0 ), - // --> OD 2008-03-07 #refactorlists# - pStyleAccess( 0 ), - // <-- - pLayoutCache( 0 ), - pUnoCallBack(new SwUnoCallBack(0)), - mpGrammarContact( 0 ), - aChartDataProviderImplRef(), - pChartControllerHelper( 0 ), - // --> OD 2007-10-31 #i83479# - mpListItemsList( new tImplSortedNodeNumList() ), - // <-- - nUndoPos( 0 ), - nUndoSavePos( 0 ), - nUndoCnt( 0 ), - nUndoSttEnd( 0 ), - nAutoFmtRedlnCommentNo( 0 ), - nLinkUpdMode( GLOBALSETTING ), - eFldUpdMode( AUTOUPD_GLOBALSETTING ), - eRedlineMode((RedlineMode_t)(nsRedlineMode_t::REDLINE_SHOW_INSERT | nsRedlineMode_t::REDLINE_SHOW_DELETE)), - eChrCmprType( CHARCOMPRESS_NONE ), - mReferenceCount(0), - mIdleBlockCount(0), - nLockExpFld( 0 ), - mbReadlineChecked(false), - mbWinEncryption(sal_False), - // --> OD 2005-02-11 #i38810# - mbLinksUpdated( sal_False ), - mbClipBoard( false ), - mbColumnSelection( false ), - // i#78591# - mbProtectForm(false),*/ pRet->n32DummyCompatabilityOptions1 = n32DummyCompatabilityOptions1; pRet->n32DummyCompatabilityOptions2 = n32DummyCompatabilityOptions2; - /* - mbStartIdleTimer(sal_False) -{ - RTL_LOGFILE_CONTEXT_AUTHOR( aLog, "SW", "JP93722", "SwDoc::SwDoc" ); - - mbGlossDoc = - mbModified = - mbDtor = - mbUndo = - mbPageNums = - mbLoaded = - mbUpdateExpFld = - mbNewDoc = - mbCopyIsMove = - mbNoDrawUndoObj = - mbBrowseMode = - mbInReading = - mbInXMLImport = - mbUpdateTOX = - mbInLoadAsynchron = - mbHTMLMode = - mbInCallModified = - mbIsGlobalDoc = - mbGlblDocSaveLinks = - mbIsLabelDoc = - mbIsAutoFmtRedline = - mbOLEPrtNotifyPending = - mbAllOLENotify = - mbIsRedlineMove = - mbInsOnlyTxtGlssry = - mbContains_MSVBasic = - mbKernAsianPunctuation = -#ifndef PRODUCT - mbXMLExport = -#endif - // --> OD 2006-03-21 #b6375613# - mbApplyWorkaroundForB6375613 = - // <-- - false; - - mbGroupUndo = - mbNewFldLst = - mbVisibleLinks = - mbPurgeOLE = - true; - - // - // COMPATIBILITY FLAGS START - // - - // Note: Any non-hidden compatibility flag should obtain its default - // by asking SvtCompatibilityOptions, see below. - // - const SvtCompatibilityOptions aOptions; - */ pRet->mbParaSpaceMax = mbParaSpaceMax ; pRet->mbParaSpaceMaxAtPages = mbParaSpaceMaxAtPages ; pRet->mbTabCompat = mbTabCompat ; @@ -1271,92 +1132,16 @@ SwDoc* SwDoc::CreateCopy() const // // COMPATIBILITY FLAGS END // - /* - pMacroTable = new SvxMacroTableDtor; - - mpGrammarContact = ::createGrammarContact(); - - // Formate - pFrmFmtTbl->Insert(pDfltFrmFmt, 0 ); - pCharFmtTbl->Insert(pDfltCharFmt, 0 ); - - // FmtColls - // TXT - pTxtFmtCollTbl->Insert(pDfltTxtFmtColl, 0 ); - // GRF - pGrfFmtCollTbl->Insert(pDfltGrfFmtColl, 0 ); - - // PageDesc, EmptyPageFmt und ColumnFmt anlegen - if ( !aPageDescs.Count() ) - GetPageDescFromPool( RES_POOLPAGE_STANDARD ); - - //Leere Seite Einstellen. - pEmptyPageFmt->SetFmtAttr( SwFmtFrmSize( ATT_FIX_SIZE ) ); - //BodyFmt fuer Spalten Einstellen. - pColumnContFmt->SetFmtAttr( SwFmtFillOrder( ATT_LEFT_TO_RIGHT ) ); - - _InitFieldTypes(); - - // lege (fuer die Filter) eine Default-OutlineNumRule an - // --> OD 2008-02-11 #newlistlevelattrs# - pOutlineRule = new SwNumRule( String::CreateFromAscii( SwNumRule::GetOutlineRuleName() ), - // --> OD 2008-06-06 #i89178# - numfunc::GetDefaultPositionAndSpaceMode(), - // <-- - OUTLINE_RULE ); - // <-- - // #115901# - AddNumRule(pOutlineRule); - // --> OD 2005-10-21 - counting of phantoms depends on - pOutlineRule->SetCountPhantoms( !get(IDocumentSettingAccess::OLD_NUMBERING) ); - // <-- - - new SwTxtNode( SwNodeIndex( aUndoNodes.GetEndOfContent() ), pDfltTxtFmtColl ); - new SwTxtNode( SwNodeIndex( aNodes.GetEndOfContent() ), - GetTxtCollFromPool( RES_POOLCOLL_STANDARD )); - - // den eigenen IdleTimer setzen - aIdleTimer.SetTimeout( 600 ); - aIdleTimer.SetTimeoutHdl( LINK(this, SwDoc, DoIdleJobs) ); - - aOLEModifiedTimer.SetTimeout( 1000 ); - aOLEModifiedTimer.SetTimeoutHdl( LINK( this, SwDoc, DoUpdateModifiedOLE )); - - // DBMgr anlegen - pNewDBMgr = new SwNewDBMgr; - - // create TOXTypes - ShellResource* pShellRes = ViewShell::GetShellRes(); - - SwTOXType * pNew = new SwTOXType(TOX_CONTENT, pShellRes->aTOXContentName ); - pTOXTypes->Insert( pNew, pTOXTypes->Count() ); - pNew = new SwTOXType(TOX_INDEX, pShellRes->aTOXIndexName ); - pTOXTypes->Insert( pNew, pTOXTypes->Count() ); - pNew = new SwTOXType(TOX_USER, pShellRes->aTOXUserName ); - pTOXTypes->Insert( pNew, pTOXTypes->Count() ); - pNew = new SwTOXType(TOX_ILLUSTRATIONS, pShellRes->aTOXIllustrationsName ); - pTOXTypes->Insert( pNew, pTOXTypes->Count() ); - pNew = new SwTOXType(TOX_OBJECTS, pShellRes->aTOXObjectsName ); - pTOXTypes->Insert( pNew, pTOXTypes->Count() ); - pNew = new SwTOXType(TOX_TABLES, pShellRes->aTOXTablesName ); - pTOXTypes->Insert( pNew, pTOXTypes->Count() ); - pNew = new SwTOXType(TOX_AUTHORITIES, pShellRes->aTOXAuthoritiesName ); - pTOXTypes->Insert( pNew, pTOXTypes->Count() ); - - { - SfxItemSet aIgnorableParagraphItems( GetAttrPool(), - RES_PARATR_LIST_BEGIN, RES_PARATR_LIST_END-1, - 0 ); - pStyleAccess = createStyleManager( &aIgnorableParagraphItems ); - } - - ResetModified(); - -*/ - pRet->ReplaceStyles( *(SwDoc*)this ); + pRet->ReplaceStyles( * const_cast< SwDoc*>( this )); + SfxObjectShellRef aDocShellRef = const_cast< SwDocShell* >( GetDocShell() ); + pRet->SetRefForDocShell( boost::addressof(aDocShellRef) ); + SfxObjectShellRef xRetShell = new SwDocShell( pRet, SFX_CREATE_MODE_STANDARD ); + if( bCallInitNew ) + xRetShell->DoInitNew(); //copy content pRet->Paste( *this ); - return pRet; + pRet->SetRefForDocShell( 0 ); + return xRetShell; } /*-- 08.05.2009 10:52:40--------------------------------------------------- copy document content - code from SwFEShell::Paste( SwDoc* , BOOL ) diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx index 329316dcb21a..03b0e09f5b34 100644 --- a/sw/source/ui/dbui/dbmgr.cxx +++ b/sw/source/ui/dbui/dbmgr.cxx @@ -3239,9 +3239,7 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig, } else { - SwDoc* pNewDoc = rSourceView.GetDocShell()->GetDoc()->CreateCopy(); - xWorkDocSh = new SwDocShell( pNewDoc, SFX_CREATE_MODE_STANDARD ); - xWorkDocSh->DoInitNew(); + xWorkDocSh = rSourceView.GetDocShell()->GetDoc()->CreateCopy(true); } //create a ViewFrame SwView* pWorkView = static_cast< SwView* >( SfxViewFrame::CreateViewFrame( *xWorkDocSh, 0, sal_True )->GetViewShell() ); @@ -3364,8 +3362,9 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig, pTargetShell->SttDoc(); // } - catch( Exception& ) + catch( Exception& rEx) { + (void)rEx; DBG_ERROR("exception caught in SwNewDBMgr::MergeDocuments"); } DELETEZ(pImpl->pMergeData); diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx index aa2712225703..4372cd35e3a7 100644 --- a/sw/source/ui/uno/unotxdoc.cxx +++ b/sw/source/ui/uno/unotxdoc.cxx @@ -107,6 +107,8 @@ #include #include #include +#include + // --> FME 2004-06-08 #i12836# enhanced pdf export #include @@ -2864,16 +2866,13 @@ uno::Reference< util::XCloneable > SwXTextDocument::createClone( ) throw (uno:: if(!IsValid()) throw RuntimeException(); //create a new document - hidden - copy the storage and return it - SwDoc* pCopyDoc = pDocShell->GetDoc()->CreateCopy(); - SfxObjectShell* pShell = new SwDocShell( pCopyDoc, SFX_CREATE_MODE_STANDARD ); - pShell->DoInitNew(); - - uno::Reference< embed::XStorage > xSourceStorage = getDocumentStorage(); + SfxObjectShell* pShell = pDocShell->GetDoc()->CreateCopy(false); uno::Reference< frame::XModel > xNewModel = pShell->GetModel(); - //copy this storage + uno::Reference< embed::XStorage > xNewStorage = ::comphelper::OStorageHelper::GetTemporaryStorage( ); + uno::Sequence< beans::PropertyValue > aTempMediaDescriptor; + storeToStorage( xNewStorage, aTempMediaDescriptor ); uno::Reference< document::XStorageBasedDocument > xStorageDoc( xNewModel, uno::UNO_QUERY ); - uno::Reference< embed::XStorage > xNewStorage = xStorageDoc->getDocumentStorage(); - xSourceStorage->copyToStorage( xNewStorage ); + xStorageDoc->loadFromStorage( xNewStorage, aTempMediaDescriptor ); return uno::Reference< util::XCloneable >( xNewModel, UNO_QUERY ); } /* -----------------------------20.06.00 09:54-------------------------------- -- cgit v1.2.3 From 97c388dc9924a6e48d6a20c5e13b212a5818b8fc Mon Sep 17 00:00:00 2001 From: os Date: Mon, 25 Jan 2010 11:36:33 +0100 Subject: #i108582# strict aliasing warning fixed (cmc) --- sw/source/ui/dbui/dbinsdlg.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx index 30e886008da7..ed3efc3bb91d 100644 --- a/sw/source/ui/dbui/dbinsdlg.cxx +++ b/sw/source/ui/dbui/dbinsdlg.cxx @@ -1937,7 +1937,7 @@ void SwInsertDBColAutoPilot::Load() SwInsDBColumn& rSet = *aDBColumns[ n ]; for( USHORT m = 0; m < pNewData->aDBColumns.Count() ; ++m ) { - const SwInsDBColumn& rGet = *pNewData->aDBColumns[ m ]; + SwInsDBColumn& rGet = *pNewData->aDBColumns[ m ]; if(rGet.sColumn == rSet.sColumn) { if( rGet.bHasFmt && !rGet.bIsDBFmt ) @@ -1949,8 +1949,10 @@ void SwInsertDBColAutoPilot::Load() { xub_StrLen nCheckPos; short nType; - rNFmtr.PutEntry( (String&)rGet.sUsrNumFmt, nCheckPos, nType, + String sTmpFmt = rGet.sUsrNumFmt; + rNFmtr.PutEntry( sTmpFmt, nCheckPos, nType, rSet.nUsrNumFmt, rGet.eUsrNumFmtLng ); + rGet.sUsrNumFmt = sTmpFmt; } } break; -- cgit v1.2.3 From 6755102f5cffec727c4481922f2ba2a1fd41e98c Mon Sep 17 00:00:00 2001 From: os Date: Tue, 2 Feb 2010 13:46:50 +0100 Subject: #i108736# acces to TableBorder: find top/left bottom/right cell --- sw/source/core/unocore/unotbl.cxx | 48 +++++++++++++++++++++++++++++++++------ 1 file changed, 41 insertions(+), 7 deletions(-) diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx index 2e1dd7e8abee..f48df5db62ef 100644 --- a/sw/source/core/unocore/unotbl.cxx +++ b/sw/source/core/unocore/unotbl.cxx @@ -498,6 +498,40 @@ String lcl_GetCellName( sal_Int32 nColumn, sal_Int32 nRow ) return sCellName; } +/** Find the top left or bottom right corner box in given table. + Consider nested lines when finding the box. + + @param i_pTable the table + + @param i_bTopLeft if true, find top left box, otherwise find bottom + right box + */ + +const SwTableBox* lcl_FindCornerTableBox(const SwTableLines& rTableLines, const bool i_bTopLeft) +{ + bool bFirst = true; + const SwTableBox* pBox = 0; + do + { + const SwTableLines& rLines(bFirst ? rTableLines : pBox->GetTabLines()); + bFirst = false; + OSL_ASSERT(rLines.Count() != 0); + if (rLines.Count() != 0) + { + const SwTableLine* pLine(rLines[i_bTopLeft ? 0 : rLines.Count() - 1]); + OSL_ASSERT(pLine); + const SwTableBoxes& rBoxes(pLine->GetTabBoxes()); + OSL_ASSERT(rBoxes.Count() != 0); + pBox = rBoxes[i_bTopLeft ? 0 : rBoxes.Count() - 1]; + OSL_ASSERT(pBox); + } + else + { + pBox = 0; + } + } while (pBox && !pBox->GetSttNd()); + return pBox; +} /* -----------------21.11.05 14:46------------------- @@ -3306,7 +3340,7 @@ void SwXTextTable::setPropertyValue(const OUString& rPropertyName, // hier muessen die Actions aufgehoben werden UnoActionRemoveContext aRemoveContext(pDoc); - SwTableBox* pTLBox = rLines[0]->GetTabBoxes()[0]; + const SwTableBox* pTLBox = lcl_FindCornerTableBox(rLines, true); const SwStartNode* pSttNd = pTLBox->GetSttNd(); SwPosition aPos(*pSttNd); // Cursor in die obere linke Zelle des Ranges setzen @@ -3316,7 +3350,7 @@ void SwXTextTable::setPropertyValue(const OUString& rPropertyName, SwTableLine* pLastLine = rLines[rLines.Count() - 1]; SwTableBoxes &rBoxes = pLastLine->GetTabBoxes(); - const SwTableBox* pBRBox = rBoxes[rBoxes.Count() -1]; + const SwTableBox* pBRBox = lcl_FindCornerTableBox(rLines, false); pUnoCrsr->SetMark(); pUnoCrsr->GetPoint()->nNode = *pBRBox->GetSttNd(); pUnoCrsr->Move( fnMoveForward, fnGoNode ); @@ -3501,7 +3535,7 @@ uno::Any SwXTextTable::getPropertyValue(const OUString& rPropertyName) throw( be // hier muessen die Actions aufgehoben werden UnoActionRemoveContext aRemoveContext(pDoc); - SwTableBox* pTLBox = rLines[0]->GetTabBoxes()[0]; + const SwTableBox* pTLBox = lcl_FindCornerTableBox(rLines, true); const SwStartNode* pSttNd = pTLBox->GetSttNd(); SwPosition aPos(*pSttNd); // Cursor in die obere linke Zelle des Ranges setzen @@ -3509,11 +3543,11 @@ uno::Any SwXTextTable::getPropertyValue(const OUString& rPropertyName) throw( be pUnoCrsr->Move( fnMoveForward, fnGoNode ); pUnoCrsr->SetRemainInSection( sal_False ); - SwTableLine* pLastLine = rLines[rLines.Count() - 1]; - SwTableBoxes &rBoxes = pLastLine->GetTabBoxes(); - const SwTableBox* pBRBox = rBoxes[rBoxes.Count() -1]; + const SwTableBox* pBRBox = lcl_FindCornerTableBox(rLines, false); pUnoCrsr->SetMark(); - pUnoCrsr->GetPoint()->nNode = *pBRBox->GetSttNd(); + const SwStartNode* pLastNd = pBRBox->GetSttNd(); + pUnoCrsr->GetPoint()->nNode = *pLastNd; + pUnoCrsr->Move( fnMoveForward, fnGoNode ); SwUnoTableCrsr* pCrsr = dynamic_cast(pUnoCrsr); pCrsr->MakeBoxSels(); -- cgit v1.2.3 From 51dbaff877254cb72714da443688a5ed8d3eff70 Mon Sep 17 00:00:00 2001 From: os Date: Tue, 2 Feb 2010 14:58:27 +0100 Subject: #i107142# crash in mail merge of single-paragraph-documents fixed --- sw/source/core/docnode/nodes.cxx | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/sw/source/core/docnode/nodes.cxx b/sw/source/core/docnode/nodes.cxx index e005326b6732..1cf95e197587 100644 --- a/sw/source/core/docnode/nodes.cxx +++ b/sw/source/core/docnode/nodes.cxx @@ -2057,11 +2057,19 @@ void SwNodes::_CopyNodes( const SwNodeRange& rRange, // falls aEnd-1 auf keinem ContentNode steht, dann suche den vorherigen aRg.aEnd--; - while( (( pAktNode = (*this)[ aRg.aEnd ])->GetStartNode() && - !pAktNode->IsSectionNode() ) || - ( pAktNode->IsEndNode() && - ND_STARTNODE == pAktNode->pStartOfSection->GetNodeType()) ) - aRg.aEnd--; + // #i107142#: if aEnd is start node of a special section, do nothing. + // Otherwise this could lead to crash: going through all previous + // special section nodes and then one before the first. + if (aRg.aEnd.GetNode().StartOfSectionIndex() != 0) + { + while( (( pAktNode = (*this)[ aRg.aEnd ])->GetStartNode() && + !pAktNode->IsSectionNode() ) || + ( pAktNode->IsEndNode() && + ND_STARTNODE == pAktNode->pStartOfSection->GetNodeType()) ) + { + aRg.aEnd--; + } + } aRg.aEnd++; // wird im selben Array's verschoben, dann ueberpruefe die Einfuegepos. -- cgit v1.2.3 From 4a460437a7953777bb3eb80837ac3fbbe3a9a599 Mon Sep 17 00:00:00 2001 From: os Date: Thu, 4 Feb 2010 12:32:20 +0100 Subject: #i108920# GotoNext/PrevMark: Check if field exists --- sw/source/ui/shells/basesh.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sw/source/ui/shells/basesh.cxx b/sw/source/ui/shells/basesh.cxx index 9b38981abbb3..6a1a415bc83e 100644 --- a/sw/source/ui/shells/basesh.cxx +++ b/sw/source/ui/shells/basesh.cxx @@ -709,8 +709,9 @@ void SwBaseShell::Execute(SfxRequest &rReq) rSh.EndSelect(); } BOOL bRet = rSh.MoveFldType(pFldType, nSlot == FN_GOTO_NEXT_MARK); - if (bRet) - rSh.ClickToField(*rSh.GetCurFld()); + SwField* pCurField = bRet ? rSh.GetCurFld() : 0; + if (pCurField) + rSh.ClickToField(*pCurField); rReq.SetReturnValue(SfxBoolItem( nSlot, bRet)); } } -- cgit v1.2.3 From 830a87f87567a467d6e32fa06f9585e6d9dd813d Mon Sep 17 00:00:00 2001 From: os Date: Mon, 8 Feb 2010 12:08:54 +0100 Subject: #i103024# display and use of tab stops fixed --- svx/source/dialog/svxruler.cxx | 40 +++++++++++++++++++++++++++++++--------- 1 file changed, 31 insertions(+), 9 deletions(-) diff --git a/svx/source/dialog/svxruler.cxx b/svx/source/dialog/svxruler.cxx index a07cf1f254d2..b76db960d526 100644 --- a/svx/source/dialog/svxruler.cxx +++ b/svx/source/dialog/svxruler.cxx @@ -1217,9 +1217,7 @@ void SvxRuler::UpdateTabs() long nRightFrameMargin = GetRightFrameMargin(); //#i24363# tab stops relative to indent - const long nParaItemTxtLeft = pRuler_Imp->bIsTabsRelativeToIndent ? - pParaItem->GetTxtLeft() : - 0; + const long nParaItemTxtLeft = pParaItem->GetTxtLeft(); const long lParaIndent = nLeftFrameMargin + nParaItemTxtLeft; @@ -1256,7 +1254,7 @@ void SvxRuler::UpdateTabs() const SvxTabStop *pTab = &(*pTabStopItem)[j]; pTabs[nTabCount+TAB_GAP].nPos = ConvertHPosPixel( - lParaIndent + pTab->GetTabPos() + lAppNullOffset); + (pRuler_Imp->bIsTabsRelativeToIndent ? lParaIndent : 0 ) + pTab->GetTabPos() + lAppNullOffset); if(bRTL) { pTabs[nTabCount+TAB_GAP].nPos = lParaIndentPix + lRightPixMargin - pTabs[nTabCount+TAB_GAP].nPos; @@ -1289,13 +1287,37 @@ void SvxRuler::UpdateTabs() { for(j = 0; j < nDefTabBuf; ++j) { - pTabs[nTabCount + TAB_GAP].nPos = + if( j == 0 ) + { + //set the first default tab stop + if(pRuler_Imp->bIsTabsRelativeToIndent) + { + pTabs[nTabCount + TAB_GAP].nPos = + (pTabs[nTabCount].nPos + nDefTabDist); + pTabs[nTabCount + TAB_GAP].nPos -= + ((pTabs[nTabCount + TAB_GAP].nPos - lParaIndentPix) + % nDefTabDist ); + } + else + { + if( pTabs[nTabCount].nPos < 0 ) + { + pTabs[nTabCount + TAB_GAP].nPos = ( pTabs[nTabCount].nPos / nDefTabDist ) * nDefTabDist; + } + else + { + pTabs[nTabCount + TAB_GAP].nPos = ( pTabs[nTabCount].nPos / nDefTabDist + 1 ) * nDefTabDist; + } + } + + } + else + { + //simply add the default distance to the last position + pTabs[nTabCount + TAB_GAP].nPos = pTabs[nTabCount].nPos + nDefTabDist; + } - if(j == 0 ) - pTabs[nTabCount + TAB_GAP].nPos -= - ((pTabs[nTabCount + TAB_GAP].nPos - lParaIndentPix) - % nDefTabDist ); if(pTabs[nTabCount+TAB_GAP].nPos >= lRightIndent) break; pTabs[nTabCount + TAB_GAP].nStyle = RULER_TAB_DEFAULT; -- cgit v1.2.3 From 06b749e598bd451fb1f4ded25c94b2c7acc401ce Mon Sep 17 00:00:00 2001 From: os Date: Mon, 8 Feb 2010 12:08:54 +0100 Subject: #i103024# display and use of tab stops fixed --- sw/source/core/text/txttab.cxx | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/sw/source/core/text/txttab.cxx b/sw/source/core/text/txttab.cxx index 434239c12b30..9f1209fb4f45 100644 --- a/sw/source/core/text/txttab.cxx +++ b/sw/source/core/text/txttab.cxx @@ -192,13 +192,8 @@ SwTabPortion *SwTxtFormatter::NewTabPortion( SwTxtFormatInfo &rInf, bool bAuto ) } SwTwips nCount = nSearchPos; - // Bei negativen Werten rundet "/" auf, "%" liefert negative Reste, - // bei positiven Werten rundet "/" ab, "%" liefert positvie Reste! - if ( nCount < 0 ) - nCount = 0; - nCount /= nDefTabDist; - nNextPos = ( nCount + 1 ) * nDefTabDist ; + nNextPos = nCount < 0 || (!nCount && nSearchPos <= 0)? nCount * nDefTabDist :( nCount + 1 ) * nDefTabDist ; // --> FME 2004-09-21 #117919 Minimum tab stop width is 1 or 51 twips: const SwTwips nMinimumTabWidth = pFrm->GetTxtNode()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::TAB_COMPAT) ? 0 : 50; // <-- -- cgit v1.2.3 From 8c72abcc29ecbfc03e2d8f908ac24f0b66cfb13d Mon Sep 17 00:00:00 2001 From: os Date: Mon, 8 Feb 2010 12:08:54 +0100 Subject: #i103024# display and use of tab stops fixed --- package/source/zippackage/ZipPackageFolder.cxx | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/package/source/zippackage/ZipPackageFolder.cxx b/package/source/zippackage/ZipPackageFolder.cxx index 5215c07579d2..23d952ef7f2b 100644 --- a/package/source/zippackage/ZipPackageFolder.cxx +++ b/package/source/zippackage/ZipPackageFolder.cxx @@ -778,11 +778,18 @@ Any SAL_CALL ZipPackageFolder::getPropertyValue( const OUString& PropertyName ) void ZipPackageFolder::doInsertByName ( ZipPackageEntry *pEntry, sal_Bool bSetParent ) throw(IllegalArgumentException, ElementExistException, WrappedTargetException, RuntimeException) { - if ( pEntry->IsFolder() ) - maContents[pEntry->getName()] = new ContentInfo ( static_cast < ZipPackageFolder *> ( pEntry ) ); - else - maContents[pEntry->getName()] = new ContentInfo ( static_cast < ZipPackageStream *> ( pEntry ) ); - + try + { + if ( pEntry->IsFolder() ) + maContents[pEntry->getName()] = new ContentInfo ( static_cast < ZipPackageFolder *> ( pEntry ) ); + else + maContents[pEntry->getName()] = new ContentInfo ( static_cast < ZipPackageStream *> ( pEntry ) ); + } + catch(const uno::Exception& rEx) + { + (void)rEx; + throw; + } if ( bSetParent ) pEntry->setParent ( *this ); } -- cgit v1.2.3 From ef09592d5ae968b7337863bb1a3538944ed1a960 Mon Sep 17 00:00:00 2001 From: os Date: Wed, 10 Feb 2010 13:23:01 +0100 Subject: #i107225# combined characters: prevent unwanted merge of consecutive fields --- xmloff/source/text/txtimp.cxx | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx index 7817fa7c4c19..cf8f6ee13e82 100644 --- a/xmloff/source/text/txtimp.cxx +++ b/xmloff/source/text/txtimp.cxx @@ -110,7 +110,7 @@ using namespace ::com::sun::star::lang; using namespace ::xmloff::token; using ::com::sun::star::util::DateTime; using namespace ::com::sun::star::ucb; - +using namespace ::com::sun::star; using ::comphelper::UStringLess; static __FAR_DATA SvXMLTokenMapEntry aTextElemTokenMap[] = @@ -1355,8 +1355,29 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( Reference xTextContent(xTmp, UNO_QUERY); if (xText.is() && xRange.is()) { - xText->insertTextContent( xRange, xTextContent, + // #i107225# the combined characters need to be inserted first + // the selected text has to be removed afterwards + xText->insertTextContent( xRange->getStart(), xTextContent, sal_True ); + + if( xRange->getString().getLength() ) + { + try + { + uno::Reference< text::XTextCursor > xCrsr = xRange->getText()->createTextCursorByRange( xRange->getStart() ); + xCrsr->goLeft( 1, true ); + uno::Reference< beans::XPropertySet> xCrsrProperties( xCrsr, uno::UNO_QUERY_THROW ); + //the hard properties of the removed text need to be applied to the combined characters field + pStyle->FillPropertySet( xCrsrProperties ); + xCrsr->collapseToEnd(); + xCrsr->gotoRange( xRange->getEnd(), true ); + xCrsr->setString( ::rtl::OUString() ); + } + catch( const uno::Exception& rEx ) + { + (void)rEx; + } + } } } } -- cgit v1.2.3 From 7e2c826eabd76afb13bee5c3231221011b388099 Mon Sep 17 00:00:00 2001 From: "Ocke Janssen [oj]" Date: Tue, 16 Mar 2010 15:38:33 +0100 Subject: os141: fix order of calls --- svtools/source/uno/treecontrolpeer.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/svtools/source/uno/treecontrolpeer.cxx b/svtools/source/uno/treecontrolpeer.cxx index e5a273bbbf6d..70ffe67b7759 100644 --- a/svtools/source/uno/treecontrolpeer.cxx +++ b/svtools/source/uno/treecontrolpeer.cxx @@ -287,14 +287,14 @@ UnoTreeListEntry* TreeControlPeer::createEntry( const Reference< XTreeNode >& xN pEntry->AddItem( pUnoItem ); + mpTreeImpl->insert( pEntry, pParent, nPos ); + if( msDefaultExpandedGraphicURL.getLength() ) mpTreeImpl->SetExpandedEntryBmp( pEntry, maDefaultExpandedImage ); if( msDefaultCollapsedGraphicURL.getLength() ) mpTreeImpl->SetCollapsedEntryBmp( pEntry, maDefaultCollapsedImage ); - mpTreeImpl->insert( pEntry, pParent, nPos ); - updateEntry( pEntry ); } return pEntry; -- cgit v1.2.3 From 73fece8b3989b7dc56fbcf50c720ab70e6ba5995 Mon Sep 17 00:00:00 2001 From: "Ocke Janssen [oj]" Date: Thu, 18 Mar 2010 08:21:26 +0100 Subject: os141: when all rows are removed clear also the current selection --- svtools/inc/svtools/table/tablecontrol.hxx | 1 + svtools/source/table/tablecontrol.cxx | 5 +++++ svtools/source/table/tablecontrol_impl.cxx | 6 ++++++ svtools/source/table/tablecontrol_impl.hxx | 1 + svtools/source/uno/svtxgridcontrol.cxx | 1 + 5 files changed, 14 insertions(+) diff --git a/svtools/inc/svtools/table/tablecontrol.hxx b/svtools/inc/svtools/table/tablecontrol.hxx index f08a1723c143..6419446d03be 100644 --- a/svtools/inc/svtools/table/tablecontrol.hxx +++ b/svtools/inc/svtools/table/tablecontrol.hxx @@ -221,6 +221,7 @@ namespace svt { namespace table ::com::sun::star::uno::Sequence< sal_Int32 >& getColumnsForTooltip(); ::com::sun::star::uno::Sequence< ::rtl::OUString >& getTextForTooltip(); void setTooltip(const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aText, const ::com::sun::star::uno::Sequence< sal_Int32 >& nCols); + void clearSelection(); void selectionChanged(bool _bChanged); protected: diff --git a/svtools/source/table/tablecontrol.cxx b/svtools/source/table/tablecontrol.cxx index 8c95fab6120b..2e7b28fd6aa4 100644 --- a/svtools/source/table/tablecontrol.cxx +++ b/svtools/source/table/tablecontrol.cxx @@ -175,6 +175,11 @@ namespace svt { namespace table return m_pImpl->goTo( _nColPos, _nRowPos ); } //-------------------------------------------------------------------- + void TableControl::clearSelection() + { + m_pImpl->clearSelection(); + } + //-------------------------------------------------------------------- void TableControl::InvalidateDataWindow(RowPos _nRowStart, RowPos _nRowEnd, bool _bRemoved) { Rectangle _rRect; diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx index 1526dbdb778d..3288ab6a4284 100644 --- a/svtools/source/table/tablecontrol_impl.cxx +++ b/svtools/source/table/tablecontrol_impl.cxx @@ -1647,6 +1647,12 @@ namespace svt { namespace table { return m_nRowSelected; } + //-------------------------------------------------------------------- + void TableControl_Impl::clearSelection() + { + m_nRowSelected.clear(); + } + //-------------------------------------------------------------------- //------------------------------------------------------------------------------- void TableControl_Impl::removeSelectedRow(RowPos _nRowPos) { diff --git a/svtools/source/table/tablecontrol_impl.hxx b/svtools/source/table/tablecontrol_impl.hxx index 0a487c77c76c..12b518aa3578 100644 --- a/svtools/source/table/tablecontrol_impl.hxx +++ b/svtools/source/table/tablecontrol_impl.hxx @@ -204,6 +204,7 @@ namespace svt { namespace table /** updates the vector, which contains the selected rows after removing the row nRowPos*/ void removeSelectedRow(RowPos _nRowPos); void invalidateRows(); + void clearSelection(); // IAbstractTableControl virtual void hideCursor(); virtual void showCursor(); diff --git a/svtools/source/uno/svtxgridcontrol.cxx b/svtools/source/uno/svtxgridcontrol.cxx index b411181c2aab..728ee17bbda2 100755 --- a/svtools/source/uno/svtxgridcontrol.cxx +++ b/svtools/source/uno/svtxgridcontrol.cxx @@ -478,6 +478,7 @@ void SAL_CALL SVTXGridControl::rowRemoved(const ::com::sun::star::awt::grid::Gri deselectAllRows(); if(m_pTableModel->hasRowHeaders()) m_pTableModel->getRowHeaderName().clear(); + pTable->clearSelection(); m_pTableModel->getCellContent().clear(); if(pTable->isAccessibleAlive()) { -- cgit v1.2.3 From f400db10eea4d9244506d671671598379437630d Mon Sep 17 00:00:00 2001 From: "Ocke Janssen [oj]" Date: Mon, 22 Mar 2010 10:18:33 +0100 Subject: os141: allow tabstop also for treecontrols --- toolkit/source/controls/tree/treecontrol.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/toolkit/source/controls/tree/treecontrol.cxx b/toolkit/source/controls/tree/treecontrol.cxx index 5655e4e10abc..f70a73c3b5eb 100644 --- a/toolkit/source/controls/tree/treecontrol.cxx +++ b/toolkit/source/controls/tree/treecontrol.cxx @@ -67,6 +67,7 @@ UnoTreeModel::UnoTreeModel() ImplRegisterProperty( BASEPROPERTY_HELPTEXT ); ImplRegisterProperty( BASEPROPERTY_HELPURL ); ImplRegisterProperty( BASEPROPERTY_PRINTABLE ); + ImplRegisterProperty( BASEPROPERTY_TABSTOP ); ImplRegisterProperty( BASEPROPERTY_TREE_SELECTIONTYPE ); ImplRegisterProperty( BASEPROPERTY_TREE_EDITABLE ); ImplRegisterProperty( BASEPROPERTY_TREE_DATAMODEL ); -- cgit v1.2.3 From 08e0e53c74d3d5019a7c510e39e8adf57145ca70 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Thu, 29 Apr 2010 10:05:04 +0200 Subject: fs33a: #i111238# add support for images to AWT's ListBoxControl/Model --- toolkit/inc/toolkit/awt/vclxwindows.hxx | 31 +- toolkit/inc/toolkit/controls/roadmapcontrol.hxx | 6 - toolkit/inc/toolkit/controls/unocontrol.hxx | 2 +- toolkit/inc/toolkit/controls/unocontrolmodel.hxx | 1 - toolkit/inc/toolkit/controls/unocontrols.hxx | 123 +++-- toolkit/source/awt/vclxwindows.cxx | 136 +++++- toolkit/source/controls/unocontrolmodel.cxx | 21 +- toolkit/source/controls/unocontrols.cxx | 558 +++++++++++++++++++++-- vcl/inc/vcl/lstbox.hxx | 1 + vcl/source/control/lstbox.cxx | 9 + 10 files changed, 759 insertions(+), 129 deletions(-) diff --git a/toolkit/inc/toolkit/awt/vclxwindows.hxx b/toolkit/inc/toolkit/awt/vclxwindows.hxx index c334e4d9af65..8efe01b526ba 100644 --- a/toolkit/inc/toolkit/awt/vclxwindows.hxx +++ b/toolkit/inc/toolkit/awt/vclxwindows.hxx @@ -83,7 +83,9 @@ #include #include #include +#include #include +#include #include #include "toolkit/awt/vclxwindow.hxx" @@ -677,9 +679,12 @@ public: // ---------------------------------------------------- // class VCLXListBox // ---------------------------------------------------- -class VCLXListBox : public ::com::sun::star::awt::XListBox, - public ::com::sun::star::awt::XTextLayoutConstrains, - public VCLXWindow +typedef ::cppu::ImplInheritanceHelper3 < VCLXWindow + , ::com::sun::star::awt::XListBox + , ::com::sun::star::awt::XTextLayoutConstrains + , ::com::sun::star::awt::XItemListListener + > VCLXListBox_Base; +class VCLXListBox : public VCLXListBox_Base { private: ActionListenerMultiplexer maActionListeners; @@ -694,16 +699,6 @@ protected: public: VCLXListBox(); - // ::com::sun::star::uno::XInterface - ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException); - void SAL_CALL acquire() throw() { OWeakObject::acquire(); } - void SAL_CALL release() throw() { OWeakObject::release(); } - - // ::com::sun::star::lang::XTypeProvider - ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw(::com::sun::star::uno::RuntimeException); - ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException); - - // ::com::sun::star::lang::XComponent void SAL_CALL dispose( ) throw(::com::sun::star::uno::RuntimeException); @@ -744,6 +739,16 @@ public: void SAL_CALL setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value ) throw(::com::sun::star::uno::RuntimeException); ::com::sun::star::uno::Any SAL_CALL getProperty( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::uno::RuntimeException); + // XItemListListener + virtual void SAL_CALL listItemInserted( const ::com::sun::star::awt::ItemListEvent& Event ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL listItemRemoved( const ::com::sun::star::awt::ItemListEvent& Event ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL listItemModified( const ::com::sun::star::awt::ItemListEvent& Event ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL allItemsRemoved( const ::com::sun::star::lang::EventObject& Event ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL itemListChanged( const ::com::sun::star::lang::EventObject& Event ) throw (::com::sun::star::uno::RuntimeException); + + // XEventListener + virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& i_rEvent ) throw (::com::sun::star::uno::RuntimeException); + static void ImplGetPropertyIds( std::list< sal_uInt16 > &aIds ); virtual void GetPropertyIds( std::list< sal_uInt16 > &aIds ) { return ImplGetPropertyIds( aIds ); } }; diff --git a/toolkit/inc/toolkit/controls/roadmapcontrol.hxx b/toolkit/inc/toolkit/controls/roadmapcontrol.hxx index 7ac858a6a7b7..46f31947b276 100644 --- a/toolkit/inc/toolkit/controls/roadmapcontrol.hxx +++ b/toolkit/inc/toolkit/controls/roadmapcontrol.hxx @@ -132,15 +132,9 @@ namespace toolkit{ // ::com::sun::star::io::XPersistObject ::rtl::OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException); - // ::com::sun::star::beans::XMultiPropertySet -// ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException); - - // ::com::sun::star::lang::XServiceInfo DECLIMPL_SERVICEINFO_DERIVED( UnoControlRoadmapModel, UnoControlModel, szServiceName2_UnoControlRoadmapModel ) -// void ImplPropertyChanged( sal_uInt16 nPropId ); - sal_Int32 SAL_CALL getCount() throw (RuntimeException); virtual Any SAL_CALL getByIndex( sal_Int32 Index ) throw (IndexOutOfBoundsException, WrappedTargetException, RuntimeException ); diff --git a/toolkit/inc/toolkit/controls/unocontrol.hxx b/toolkit/inc/toolkit/controls/unocontrol.hxx index 578b5070e8e8..19d498ef2a85 100644 --- a/toolkit/inc/toolkit/controls/unocontrol.hxx +++ b/toolkit/inc/toolkit/controls/unocontrol.hxx @@ -119,7 +119,7 @@ protected: ::osl::Mutex& GetMutex() { return maMutex; } ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > getParentPeer() const; - void updateFromModel(); + virtual void updateFromModel(); void peerCreated(); bool ImplCheckLocalize( ::rtl::OUString& _rPossiblyLocalizable ); ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > ImplGetCompatiblePeer( sal_Bool bAcceptExistingPeer ); diff --git a/toolkit/inc/toolkit/controls/unocontrolmodel.hxx b/toolkit/inc/toolkit/controls/unocontrolmodel.hxx index 2de5e36aa02c..a443cb4d2d6b 100644 --- a/toolkit/inc/toolkit/controls/unocontrolmodel.hxx +++ b/toolkit/inc/toolkit/controls/unocontrolmodel.hxx @@ -74,7 +74,6 @@ protected: void ImplRegisterProperties( const std::list< sal_uInt16 > &rIds ); void ImplRegisterProperty( sal_uInt16 nPropId, const ::com::sun::star::uno::Any& rDefault ); ::com::sun::star::uno::Sequence ImplGetPropertyIds() const; - virtual void ImplPropertyChanged( sal_uInt16 nPropId ); virtual ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const; sal_Bool ImplHasProperty( sal_uInt16 nPropId ) const; diff --git a/toolkit/inc/toolkit/controls/unocontrols.hxx b/toolkit/inc/toolkit/controls/unocontrols.hxx index a4015dfd3b44..5c612c887859 100644 --- a/toolkit/inc/toolkit/controls/unocontrols.hxx +++ b/toolkit/inc/toolkit/controls/unocontrols.hxx @@ -51,6 +51,7 @@ #include #include #include +#include #include #include #include @@ -58,12 +59,17 @@ #include #include #include +#include #include #include #include #include #include +#include + +#include +#include #define UNO_NAME_GRAPHOBJ_URLPREFIX "vnd.sun.star.GraphicObject:" #define UNO_NAME_GRAPHOBJ_URLPKGPREFIX "vnd.sun.star.Package:" @@ -751,19 +757,18 @@ public: // ---------------------------------------------------- // class UnoControlListBoxModel // ---------------------------------------------------- -class UnoControlListBoxModel : public UnoControlModel +struct UnoControlListBoxModel_Data; +typedef ::cppu::AggImplInheritanceHelper1 < UnoControlModel + , ::com::sun::star::awt::XItemList + > UnoControlListBoxModel_Base; +class UnoControlListBoxModel :public UnoControlListBoxModel_Base { -protected: - ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const; - ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); - public: UnoControlListBoxModel(); - UnoControlListBoxModel( const UnoControlListBoxModel& rModel ) : UnoControlModel( rModel ) {;} + UnoControlListBoxModel( const UnoControlListBoxModel& i_rSource ); UnoControlModel* Clone() const { return new UnoControlListBoxModel( *this ); } - void ImplPropertyChanged( sal_uInt16 nPropId ); virtual void ImplNormalizePropertySequence( const sal_Int32 _nCount, /// the number of entries in the arrays sal_Int32* _pHandles, /// the handles of the properties to set @@ -780,41 +785,85 @@ public: // ::com::sun::star::lang::XServiceInfo DECLIMPL_SERVICEINFO_DERIVED( UnoControlListBoxModel, UnoControlModel, szServiceName2_UnoControlListBoxModel ) + // ::com::sun::star::awt::XItemList + virtual ::sal_Int32 SAL_CALL getItemCount() throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL insertItem( ::sal_Int32 Position, const ::rtl::OUString& ItemText, const ::rtl::OUString& ItemImageURL ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL insertItemText( ::sal_Int32 Position, const ::rtl::OUString& ItemText ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL insertItemImage( ::sal_Int32 Position, const ::rtl::OUString& ItemImageURL ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeItem( ::sal_Int32 Position ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeAllItems( ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setItemText( ::sal_Int32 Position, const ::rtl::OUString& ItemText ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setItemImage( ::sal_Int32 Position, const ::rtl::OUString& ItemImageURL ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setItemTextAndImage( ::sal_Int32 Position, const ::rtl::OUString& ItemText, const ::rtl::OUString& ItemImageURL ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + virtual ::rtl::OUString SAL_CALL getItemText( ::sal_Int32 Position ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + virtual ::rtl::OUString SAL_CALL getItemImage( ::sal_Int32 Position ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::beans::Pair< ::rtl::OUString, ::rtl::OUString > SAL_CALL getItemTextAndImage( ::sal_Int32 Position ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Pair< ::rtl::OUString, ::rtl::OUString > > SAL_CALL getAllItems( ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addItemListListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListListener >& Listener ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeItemListListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListListener >& Listener ) throw (::com::sun::star::uno::RuntimeException); + + // OPropertySetHelper + void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const ::com::sun::star::uno::Any& rValue ) throw (::com::sun::star::uno::Exception); + +protected: + ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const; + ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); + +private: + void impl_notifyItemListEvent_nolck( + const sal_Int32 i_nItemPosition, + const ::boost::optional< ::rtl::OUString >& i_rItemText, + const ::boost::optional< ::rtl::OUString >& i_rItemImageURL, + void ( SAL_CALL ::com::sun::star::awt::XItemListListener::*NotificationMethod )( const ::com::sun::star::awt::ItemListEvent& ) + ); + + void impl_handleInsert( + const sal_Int32 i_nItemPosition, + const ::boost::optional< ::rtl::OUString >& i_rItemText, + const ::boost::optional< ::rtl::OUString >& i_rItemImageURL, + ::osl::ClearableMutexGuard& i_rClearBeforeNotify + ); + + void impl_handleRemove( + const sal_Int32 i_nItemPosition, + ::osl::ClearableMutexGuard& i_rClearBeforeNotify + ); + + void impl_handleModify( + const sal_Int32 i_nItemPosition, + const ::boost::optional< ::rtl::OUString >& i_rItemText, + const ::boost::optional< ::rtl::OUString >& i_rItemImageURL, + ::osl::ClearableMutexGuard& i_rClearBeforeNotify + ); + + void impl_getStringItemList( ::std::vector< ::rtl::OUString >& o_rStringItems ) const; + void impl_setStringItemList_nolck( const ::std::vector< ::rtl::OUString >& i_rStringItems ); + +private: + ::boost::scoped_ptr< UnoControlListBoxModel_Data > m_pData; + ::cppu::OInterfaceContainerHelper m_aItemListListeners; }; // ---------------------------------------------------- // class UnoListBoxControl // ---------------------------------------------------- -class UnoListBoxControl : public UnoControlBase, - public ::com::sun::star::awt::XListBox, - public ::com::sun::star::awt::XItemListener, - public ::com::sun::star::awt::XLayoutConstrains, - public ::com::sun::star::awt::XTextLayoutConstrains +typedef ::cppu::AggImplInheritanceHelper5 < UnoControlBase + , ::com::sun::star::awt::XListBox + , ::com::sun::star::awt::XItemListener + , ::com::sun::star::awt::XLayoutConstrains + , ::com::sun::star::awt::XTextLayoutConstrains + , ::com::sun::star::awt::XItemListListener + > UnoListBoxControl_Base; +class UnoListBoxControl : public UnoListBoxControl_Base { -private: - ActionListenerMultiplexer maActionListeners; - ItemListenerMultiplexer maItemListeners; - public: - UnoListBoxControl(); ::rtl::OUString GetComponentServiceName(); - void ImplUpdateSelectedItemsProperty(); - void ImplSetPeerProperty( const ::rtl::OUString& rPropName, const ::com::sun::star::uno::Any& rVal ); - - ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException) { return UnoControlBase::queryInterface(rType); } - ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException); - void SAL_CALL acquire() throw() { OWeakAggObject::acquire(); } - void SAL_CALL release() throw() { OWeakAggObject::release(); } void SAL_CALL createPeer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit >& Toolkit, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& Parent ) throw(::com::sun::star::uno::RuntimeException); void SAL_CALL dispose( ) throw(::com::sun::star::uno::RuntimeException); void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException) { UnoControlBase::disposing( Source ); } - // ::com::sun::star::lang::XTypeProvider - ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw(::com::sun::star::uno::RuntimeException); - ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException); - // ::com::sun::star::awt::XListBox void SAL_CALL addItemListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListener >& l ) throw(::com::sun::star::uno::RuntimeException); void SAL_CALL removeItemListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListener >& l ) throw(::com::sun::star::uno::RuntimeException); @@ -851,9 +900,27 @@ public: ::com::sun::star::awt::Size SAL_CALL getMinimumSize( sal_Int16 nCols, sal_Int16 nLines ) throw(::com::sun::star::uno::RuntimeException); void SAL_CALL getColumnsAndLines( sal_Int16& nCols, sal_Int16& nLines ) throw(::com::sun::star::uno::RuntimeException); + // XUnoControl + sal_Bool SAL_CALL setModel(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& Model) throw ( ::com::sun::star::uno::RuntimeException ); + + // XItemListListener + virtual void SAL_CALL listItemInserted( const ::com::sun::star::awt::ItemListEvent& Event ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL listItemRemoved( const ::com::sun::star::awt::ItemListEvent& Event ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL listItemModified( const ::com::sun::star::awt::ItemListEvent& Event ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL allItemsRemoved( const ::com::sun::star::lang::EventObject& Event ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL itemListChanged( const ::com::sun::star::lang::EventObject& Event ) throw (::com::sun::star::uno::RuntimeException); + // ::com::sun::star::lang::XServiceInfo DECLIMPL_SERVICEINFO_DERIVED( UnoListBoxControl, UnoControlBase, szServiceName2_UnoControlListBox ) +protected: + void ImplUpdateSelectedItemsProperty(); + virtual void ImplSetPeerProperty( const ::rtl::OUString& rPropName, const ::com::sun::star::uno::Any& rVal ); + virtual void updateFromModel(); + +private: + ActionListenerMultiplexer maActionListeners; + ItemListenerMultiplexer maItemListeners; }; // ---------------------------------------------------- diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx index e2fc78421d5e..ff4dc6fb5ec4 100644 --- a/toolkit/source/awt/vclxwindows.cxx +++ b/toolkit/source/awt/vclxwindows.cxx @@ -29,7 +29,7 @@ #include "precompiled_toolkit.hxx" #include #include -#include +#include #include #include #include @@ -43,6 +43,9 @@ #include #include #include +#include +#include +#include #include #ifndef _SV_BUTTON_HXX @@ -58,12 +61,17 @@ #include #include #include -#include +#include using ::com::sun::star::uno::Any; using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::makeAny; +using ::com::sun::star::uno::RuntimeException; +using ::com::sun::star::lang::EventObject; +using ::com::sun::star::awt::ItemListEvent; +using ::com::sun::star::awt::XItemList; using ::com::sun::star::graphic::XGraphic; +using ::com::sun::star::graphic::XGraphicProvider; using namespace ::com::sun::star; using namespace ::com::sun::star::awt::VisualEffect; @@ -1550,22 +1558,6 @@ VCLXListBox::VCLXListBox() { } -// ::com::sun::star::uno::XInterface -::com::sun::star::uno::Any VCLXListBox::queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException) -{ - ::com::sun::star::uno::Any aRet = ::cppu::queryInterface( rType, - SAL_STATIC_CAST( ::com::sun::star::awt::XListBox*, this ), - SAL_STATIC_CAST( ::com::sun::star::awt::XTextLayoutConstrains*, this ) ); - return (aRet.hasValue() ? aRet : VCLXWindow::queryInterface( rType )); -} - -// ::com::sun::star::lang::XTypeProvider -IMPL_XTYPEPROVIDER_START( VCLXListBox ) - getCppuType( ( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XListBox>* ) NULL ), - getCppuType( ( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTextLayoutConstrains>* ) NULL ), - VCLXWindow::getTypes() -IMPL_XTYPEPROVIDER_END - void VCLXListBox::dispose() throw(::com::sun::star::uno::RuntimeException) { ::vos::OGuard aGuard( GetMutex() ); @@ -2096,6 +2088,114 @@ void VCLXListBox::ImplCallItemListeners() } } +namespace +{ + Image lcl_getImageFromURL( const ::rtl::OUString& i_rImageURL ) + { + if ( !i_rImageURL.getLength() ) + return Image(); + + try + { + ::comphelper::ComponentContext aContext( ::comphelper::getProcessServiceFactory() ); + Reference< XGraphicProvider > xProvider; + if ( aContext.createComponent( "com.sun.star.graphic.GraphicProvider", xProvider ) ) + { + ::comphelper::NamedValueCollection aMediaProperties; + aMediaProperties.put( "URL", i_rImageURL ); + Reference< XGraphic > xGraphic = xProvider->queryGraphic( aMediaProperties.getPropertyValues() ); + return Image( xGraphic ); + } + } + catch( const uno::Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } + return Image(); + } +} + +void SAL_CALL VCLXListBox::listItemInserted( const ItemListEvent& i_rEvent ) throw (RuntimeException) +{ + ::vos::OGuard aGuard( GetMutex() ); + + ListBox* pListBox = dynamic_cast< ListBox* >( GetWindow() ); + + ENSURE_OR_RETURN_VOID( pListBox, "VCLXListBox::listItemInserted: no ListBox?!" ); + ENSURE_OR_RETURN_VOID( ( i_rEvent.ItemPosition >= 0 ) && ( i_rEvent.ItemPosition <= sal_Int32( pListBox->GetEntryCount() ) ), + "VCLXListBox::listItemInserted: illegal (inconsistent) item position!" ); + pListBox->InsertEntry( + i_rEvent.ItemText.IsPresent ? i_rEvent.ItemText.Value : ::rtl::OUString(), + i_rEvent.ItemImageURL.IsPresent ? lcl_getImageFromURL( i_rEvent.ItemImageURL.Value ) : Image(), + i_rEvent.ItemPosition ); +} + +void SAL_CALL VCLXListBox::listItemRemoved( const ItemListEvent& i_rEvent ) throw (RuntimeException) +{ + ::vos::OGuard aGuard( GetMutex() ); + + ListBox* pListBox = dynamic_cast< ListBox* >( GetWindow() ); + + ENSURE_OR_RETURN_VOID( pListBox, "VCLXListBox::listItemRemoved: no ListBox?!" ); + ENSURE_OR_RETURN_VOID( ( i_rEvent.ItemPosition >= 0 ) && ( i_rEvent.ItemPosition < sal_Int32( pListBox->GetEntryCount() ) ), + "VCLXListBox::listItemRemoved: illegal (inconsistent) item position!" ); + + pListBox->RemoveEntry( i_rEvent.ItemPosition ); +} + +void SAL_CALL VCLXListBox::listItemModified( const ItemListEvent& i_rEvent ) throw (RuntimeException) +{ + ::vos::OGuard aGuard( GetMutex() ); + + ListBox* pListBox = dynamic_cast< ListBox* >( GetWindow() ); + + ENSURE_OR_RETURN_VOID( pListBox, "VCLXListBox::listItemModified: no ListBox?!" ); + ENSURE_OR_RETURN_VOID( ( i_rEvent.ItemPosition >= 0 ) && ( i_rEvent.ItemPosition < sal_Int32( pListBox->GetEntryCount() ) ), + "VCLXListBox::listItemModified: illegal (inconsistent) item position!" ); + + // VCL's ListBox does not support changing an entry's text or image, so remove and re-insert + + const ::rtl::OUString sNewText = i_rEvent.ItemText.IsPresent ? i_rEvent.ItemText.Value : pListBox->GetEntry( i_rEvent.ItemPosition ); + const Image aNewImage( i_rEvent.ItemImageURL.IsPresent ? lcl_getImageFromURL( i_rEvent.ItemImageURL.Value ) : pListBox->GetEntryImage( i_rEvent.ItemPosition ) ); + + pListBox->RemoveEntry( i_rEvent.ItemPosition ); + pListBox->InsertEntry( sNewText, aNewImage, i_rEvent.ItemPosition ); +} + +void SAL_CALL VCLXListBox::allItemsRemoved( const EventObject& i_rEvent ) throw (RuntimeException) +{ + ::vos::OGuard aGuard( GetMutex() ); + + ListBox* pListBox = dynamic_cast< ListBox* >( GetWindow() ); + ENSURE_OR_RETURN_VOID( pListBox, "VCLXListBox::listItemModified: no ListBox?!" ); + + pListBox->Clear(); + + (void)i_rEvent; +} + +void SAL_CALL VCLXListBox::itemListChanged( const EventObject& i_rEvent ) throw (RuntimeException) +{ + ::vos::OGuard aGuard( GetMutex() ); + + ListBox* pListBox = dynamic_cast< ListBox* >( GetWindow() ); + ENSURE_OR_RETURN_VOID( pListBox, "VCLXListBox::listItemModified: no ListBox?!" ); + + pListBox->Clear(); + + Reference< XItemList > xItemList( i_rEvent.Source, uno::UNO_QUERY_THROW ); + uno::Sequence< beans::Pair< ::rtl::OUString, ::rtl::OUString > > aItems = xItemList->getAllItems(); + for ( sal_Int32 i=0; iInsertEntry( aItems[i].First, lcl_getImageFromURL( aItems[i].Second ) ); + } +} + +void SAL_CALL VCLXListBox::disposing( const EventObject& i_rEvent ) throw (RuntimeException) +{ + // just disambiguate + VCLXWindow::disposing( i_rEvent ); +} // ---------------------------------------------------- // class VCLXMessageBox diff --git a/toolkit/source/controls/unocontrolmodel.cxx b/toolkit/source/controls/unocontrolmodel.cxx index 29b683a5ed40..d34f5d9d9006 100644 --- a/toolkit/source/controls/unocontrolmodel.cxx +++ b/toolkit/source/controls/unocontrolmodel.cxx @@ -216,10 +216,6 @@ sal_Bool UnoControlModel::ImplHasProperty( sal_uInt16 nPropId ) const return mpData->Get( nPropId ) ? sal_True : sal_False; } -void UnoControlModel::ImplPropertyChanged( sal_uInt16 ) -{ -} - ::com::sun::star::uno::Any UnoControlModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const { ::com::sun::star::uno::Any aDefault; @@ -1259,22 +1255,13 @@ sal_Bool UnoControlModel::convertFastPropertyValue( Any & rConvertedValue, Any & void UnoControlModel::setFastPropertyValue_NoBroadcast( sal_Int32 nPropId, const ::com::sun::star::uno::Any& rValue ) throw (::com::sun::star::uno::Exception) { - ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); - // Fehlt: Die gefakten Einzelproperties des FontDescriptors... ImplControlProperty* pProp = mpData->Get( nPropId ); - if ( pProp ) - { - DBG_ASSERT( ( rValue.getValueType().getTypeClass() != ::com::sun::star::uno::TypeClass_VOID ) || ( GetPropertyAttribs( (sal_uInt16)nPropId ) & ::com::sun::star::beans::PropertyAttribute::MAYBEVOID ), "Property darf nicht VOID sein!" ); - ImplPropertyChanged( (sal_uInt16)nPropId ); - pProp->SetValue( rValue ); - } - else - { - // exception... - DBG_ERROR( "SetPropertyValues: Invalid Property!" ); - } + ENSURE_OR_RETURN_VOID( pProp, "UnoControlModel::setFastPropertyValue_NoBroadcast: invalid property id!" ); + + DBG_ASSERT( ( rValue.getValueType().getTypeClass() != ::com::sun::star::uno::TypeClass_VOID ) || ( GetPropertyAttribs( (sal_uInt16)nPropId ) & ::com::sun::star::beans::PropertyAttribute::MAYBEVOID ), "Property darf nicht VOID sein!" ); + pProp->SetValue( rValue ); } void UnoControlModel::getFastPropertyValue( ::com::sun::star::uno::Any& rValue, sal_Int32 nPropId ) const diff --git a/toolkit/source/controls/unocontrols.cxx b/toolkit/source/controls/unocontrols.cxx index ae9e59d045e7..a4b7037b3b73 100644 --- a/toolkit/source/controls/unocontrols.cxx +++ b/toolkit/source/controls/unocontrols.cxx @@ -73,8 +73,11 @@ #include #include +#include using namespace ::com::sun::star; +using ::com::sun::star::graphic::XGraphic; +using ::com::sun::star::uno::Reference; using namespace ::toolkit; @@ -1841,19 +1844,100 @@ sal_Bool UnoGroupBoxControl::isTransparent() throw(uno::RuntimeException) return sal_True; } -// ---------------------------------------------------- -// class UnoControlListBoxModel -// ---------------------------------------------------- +// ===================================================================================================================== +// = UnoControlListBoxModel_Data +// ===================================================================================================================== +typedef beans::Pair< ::rtl::OUString, ::rtl::OUString > ListItem; +struct UnoControlListBoxModel_Data +{ + UnoControlListBoxModel_Data( UnoControlListBoxModel& i_rAntiImpl ) + :m_rAntiImpl( i_rAntiImpl ) + ,m_aListItems() + ,m_bSettingLegacyProperty( false ) + { + } + + sal_Int32 getItemCount() const { return sal_Int32( m_aListItems.size() ); } + + const ListItem& getItem( const sal_Int32 i_nIndex ) const + { + if ( ( i_nIndex < 0 ) || ( i_nIndex >= sal_Int32( m_aListItems.size() ) ) ) + throw IndexOutOfBoundsException( ::rtl::OUString(), m_rAntiImpl ); + return m_aListItems[ i_nIndex ]; + } + + ListItem& getItem( const sal_Int32 i_nIndex ) + { + return const_cast< ListItem& >( static_cast< const UnoControlListBoxModel_Data* >( this )->getItem( i_nIndex ) ); + } + + ListItem& insertItem( const sal_Int32 i_nIndex ) + { + if ( ( i_nIndex < 0 ) || ( i_nIndex > sal_Int32( m_aListItems.size() ) ) ) + throw IndexOutOfBoundsException( ::rtl::OUString(), m_rAntiImpl ); + return *m_aListItems.insert( m_aListItems.begin() + i_nIndex, ListItem() ); + } + + Sequence< ListItem > getAllItems() const + { + Sequence< ListItem > aItems( sal_Int32( m_aListItems.size() ) ); + ::std::copy( m_aListItems.begin(), m_aListItems.end(), aItems.getArray() ); + return aItems; + } + + void setAllItems( const ::std::vector< ListItem >& i_rItems ) + { + m_aListItems = i_rItems; + } + + void removeItem( const sal_Int32 i_nIndex ) + { + if ( ( i_nIndex < 0 ) || ( i_nIndex >= sal_Int32( m_aListItems.size() ) ) ) + throw IndexOutOfBoundsException( ::rtl::OUString(), m_rAntiImpl ); + m_aListItems.erase( m_aListItems.begin() + i_nIndex ); + } + + void removeAllItems() + { + ::std::vector< ListItem > aEmpty; + m_aListItems.swap( aEmpty ); + } + +public: + bool m_bSettingLegacyProperty; + +private: + UnoControlListBoxModel& m_rAntiImpl; + ::std::vector< ListItem > m_aListItems; +}; + +// ===================================================================================================================== +// = UnoControlListBoxModel +// ===================================================================================================================== +// --------------------------------------------------------------------------------------------------------------------- UnoControlListBoxModel::UnoControlListBoxModel() + :UnoControlListBoxModel_Base() + ,m_pData( new UnoControlListBoxModel_Data( *this ) ) + ,m_aItemListListeners( GetMutex() ) { UNO_CONTROL_MODEL_REGISTER_PROPERTIES( VCLXListBox ); } +// --------------------------------------------------------------------------------------------------------------------- +UnoControlListBoxModel::UnoControlListBoxModel( const UnoControlListBoxModel& i_rSource ) + :UnoControlListBoxModel_Base( i_rSource ) + ,m_pData( new UnoControlListBoxModel_Data( *this ) ) + ,m_aItemListListeners( GetMutex() ) +{ +} + +// --------------------------------------------------------------------------------------------------------------------- ::rtl::OUString UnoControlListBoxModel::getServiceName() throw(::com::sun::star::uno::RuntimeException) { return ::rtl::OUString::createFromAscii( szServiceName_UnoControlListBoxModel ); } +// --------------------------------------------------------------------------------------------------------------------- uno::Any UnoControlListBoxModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const { if ( nPropId == BASEPROPERTY_DEFAULTCONTROL ) @@ -1865,6 +1949,7 @@ uno::Any UnoControlListBoxModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const return UnoControlModel::ImplGetDefaultValue( nPropId ); } +// --------------------------------------------------------------------------------------------------------------------- ::cppu::IPropertyArrayHelper& UnoControlListBoxModel::getInfoHelper() { static UnoPropertyArrayHelper* pHelper = NULL; @@ -1876,6 +1961,7 @@ uno::Any UnoControlListBoxModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const return *pHelper; } +// --------------------------------------------------------------------------------------------------------------------- // beans::XMultiPropertySet uno::Reference< beans::XPropertySetInfo > UnoControlListBoxModel::getPropertySetInfo( ) throw(uno::RuntimeException) { @@ -1883,19 +1969,61 @@ uno::Reference< beans::XPropertySetInfo > UnoControlListBoxModel::getPropertySet return xInfo; } -void UnoControlListBoxModel::ImplPropertyChanged( sal_uInt16 nPropId ) +// --------------------------------------------------------------------------------------------------------------------- +namespace +{ + struct CreateListItem : public ::std::unary_function< ::rtl::OUString, ListItem > + { + ListItem operator()( const ::rtl::OUString& i_rItemText ) + { + return ListItem( i_rItemText, ::rtl::OUString() ); + } + }; +} + +// --------------------------------------------------------------------------------------------------------------------- +void SAL_CALL UnoControlListBoxModel::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const uno::Any& rValue ) throw (uno::Exception) { - if ( nPropId == BASEPROPERTY_STRINGITEMLIST ) + UnoControlModel::setFastPropertyValue_NoBroadcast( nHandle, rValue ); + + if ( nHandle == BASEPROPERTY_STRINGITEMLIST ) { + // reset selection uno::Sequence aSeq; uno::Any aAny; aAny <<= aSeq; setPropertyValue( GetPropertyName( BASEPROPERTY_SELECTEDITEMS ), aAny ); - } - UnoControlModel::ImplPropertyChanged( nPropId ); + if ( !m_pData->m_bSettingLegacyProperty ) + { + // synchronize the legacy StringItemList property with our list items + Sequence< ::rtl::OUString > aStringItemList; + Any aPropValue; + getFastPropertyValue( aPropValue, BASEPROPERTY_STRINGITEMLIST ); + OSL_VERIFY( aPropValue >>= aStringItemList ); + + ::std::vector< ListItem > aItems( aStringItemList.getLength() ); + ::std::transform( + aStringItemList.getConstArray(), + aStringItemList.getConstArray() + aStringItemList.getLength(), + aItems.begin(), + CreateListItem() + ); + m_pData->setAllItems( aItems ); + + // since an XItemListListener does not have a "all items modified" or some such method, + // we simulate this by notifying removal of all items, followed by insertion of all new + // items + lang::EventObject aEvent; + aEvent.Source = *this; + m_aItemListListeners.notifyEach( &XItemListListener::itemListChanged, aEvent ); + // TODO: OPropertySetHelper calls into this method with the mutex locked ... + // which is wrong for the above notifications ... + } + } } +// --------------------------------------------------------------------------------------------------------------------- void UnoControlListBoxModel::ImplNormalizePropertySequence( const sal_Int32 _nCount, sal_Int32* _pHandles, uno::Any* _pValues, sal_Int32* _pValidHandles ) const SAL_THROW(()) { @@ -1906,12 +2034,311 @@ void UnoControlListBoxModel::ImplNormalizePropertySequence( const sal_Int32 _nCo UnoControlModel::ImplNormalizePropertySequence( _nCount, _pHandles, _pValues, _pValidHandles ); } +// --------------------------------------------------------------------------------------------------------------------- +::sal_Int32 SAL_CALL UnoControlListBoxModel::getItemCount() throw (RuntimeException) +{ + ::osl::MutexGuard aGuard( GetMutex() ); + return m_pData->getItemCount(); +} + +// --------------------------------------------------------------------------------------------------------------------- +void SAL_CALL UnoControlListBoxModel::insertItem( ::sal_Int32 i_nPosition, const ::rtl::OUString& i_rItemText, const ::rtl::OUString& i_rItemImageURL ) throw (IndexOutOfBoundsException, RuntimeException) +{ + ::osl::ClearableMutexGuard aGuard( GetMutex() ); + // SYNCHRONIZED -----> + ListItem& rItem( m_pData->insertItem( i_nPosition ) ); + rItem.First = i_rItemText; + rItem.Second = i_rItemImageURL; + + impl_handleInsert( i_nPosition, i_rItemText, i_rItemImageURL, aGuard ); + // <----- SYNCHRONIZED +} + +// --------------------------------------------------------------------------------------------------------------------- +void SAL_CALL UnoControlListBoxModel::insertItemText( ::sal_Int32 i_nPosition, const ::rtl::OUString& i_rItemText ) throw (IndexOutOfBoundsException, RuntimeException) +{ + ::osl::ClearableMutexGuard aGuard( GetMutex() ); + // SYNCHRONIZED -----> + ListItem& rItem( m_pData->insertItem( i_nPosition ) ); + rItem.First = i_rItemText; + + impl_handleInsert( i_nPosition, i_rItemText, ::boost::optional< ::rtl::OUString >(), aGuard ); + // <----- SYNCHRONIZED +} + +// --------------------------------------------------------------------------------------------------------------------- +void SAL_CALL UnoControlListBoxModel::insertItemImage( ::sal_Int32 i_nPosition, const ::rtl::OUString& i_rItemImageURL ) throw (IndexOutOfBoundsException, RuntimeException) +{ + ::osl::ClearableMutexGuard aGuard( GetMutex() ); + // SYNCHRONIZED -----> + ListItem& rItem( m_pData->insertItem( i_nPosition ) ); + rItem.Second = i_rItemImageURL; + + impl_handleInsert( i_nPosition, ::boost::optional< ::rtl::OUString >(), i_rItemImageURL, aGuard ); + // <----- SYNCHRONIZED +} + +// --------------------------------------------------------------------------------------------------------------------- +void SAL_CALL UnoControlListBoxModel::removeItem( ::sal_Int32 i_nPosition ) throw (IndexOutOfBoundsException, RuntimeException) +{ + ::osl::ClearableMutexGuard aGuard( GetMutex() ); + // SYNCHRONIZED -----> + m_pData->removeItem( i_nPosition ); + + impl_handleRemove( i_nPosition, aGuard ); + // <----- SYNCHRONIZED +} + +// --------------------------------------------------------------------------------------------------------------------- +void SAL_CALL UnoControlListBoxModel::removeAllItems( ) throw (::com::sun::star::uno::RuntimeException) +{ + ::osl::ClearableMutexGuard aGuard( GetMutex() ); + // SYNCHRONIZED -----> + m_pData->removeAllItems(); + + impl_handleRemove( -1, aGuard ); + // <----- SYNCHRONIZED +} + +// --------------------------------------------------------------------------------------------------------------------- +void SAL_CALL UnoControlListBoxModel::setItemText( ::sal_Int32 i_nPosition, const ::rtl::OUString& i_rItemText ) throw (IndexOutOfBoundsException, RuntimeException) +{ + ::osl::ClearableMutexGuard aGuard( GetMutex() ); + // SYNCHRONIZED -----> + ListItem& rItem( m_pData->getItem( i_nPosition ) ); + rItem.First = i_rItemText; + + impl_handleModify( i_nPosition, i_rItemText, ::boost::optional< ::rtl::OUString >(), aGuard ); + // <----- SYNCHRONIZED +} + +// --------------------------------------------------------------------------------------------------------------------- +void SAL_CALL UnoControlListBoxModel::setItemImage( ::sal_Int32 i_nPosition, const ::rtl::OUString& i_rItemImageURL ) throw (IndexOutOfBoundsException, RuntimeException) +{ + ::osl::ClearableMutexGuard aGuard( GetMutex() ); + // SYNCHRONIZED -----> + ListItem& rItem( m_pData->getItem( i_nPosition ) ); + rItem.Second = i_rItemImageURL; + + impl_handleModify( i_nPosition, ::boost::optional< ::rtl::OUString >(), i_rItemImageURL, aGuard ); + // <----- SYNCHRONIZED +} + +// --------------------------------------------------------------------------------------------------------------------- +void SAL_CALL UnoControlListBoxModel::setItemTextAndImage( ::sal_Int32 i_nPosition, const ::rtl::OUString& i_rItemText, const ::rtl::OUString& i_rItemImageURL ) throw (IndexOutOfBoundsException, RuntimeException) +{ + ::osl::ClearableMutexGuard aGuard( GetMutex() ); + // SYNCHRONIZED -----> + ListItem& rItem( m_pData->getItem( i_nPosition ) ); + rItem.First = i_rItemText; + rItem.Second = i_rItemImageURL; + + impl_handleModify( i_nPosition, i_rItemText, i_rItemImageURL, aGuard ); + // <----- SYNCHRONIZED +} + +// --------------------------------------------------------------------------------------------------------------------- +::rtl::OUString SAL_CALL UnoControlListBoxModel::getItemText( ::sal_Int32 i_nPosition ) throw (IndexOutOfBoundsException, RuntimeException) +{ + ::osl::MutexGuard aGuard( GetMutex() ); + ListItem& rItem( m_pData->getItem( i_nPosition ) ); + return rItem.First; +} + +// --------------------------------------------------------------------------------------------------------------------- +::rtl::OUString SAL_CALL UnoControlListBoxModel::getItemImage( ::sal_Int32 i_nPosition ) throw (IndexOutOfBoundsException, RuntimeException) +{ + ::osl::MutexGuard aGuard( GetMutex() ); + ListItem& rItem( m_pData->getItem( i_nPosition ) ); + return rItem.Second; +} + +// --------------------------------------------------------------------------------------------------------------------- +beans::Pair< ::rtl::OUString, ::rtl::OUString > SAL_CALL UnoControlListBoxModel::getItemTextAndImage( ::sal_Int32 i_nPosition ) throw (IndexOutOfBoundsException, RuntimeException) +{ + ::osl::MutexGuard aGuard( GetMutex() ); + ListItem& rItem( m_pData->getItem( i_nPosition ) ); + return rItem; +} + +// --------------------------------------------------------------------------------------------------------------------- +Sequence< beans::Pair< ::rtl::OUString, ::rtl::OUString > > SAL_CALL UnoControlListBoxModel::getAllItems( ) throw (RuntimeException) +{ + ::osl::MutexGuard aGuard( GetMutex() ); + return m_pData->getAllItems(); +} + +// --------------------------------------------------------------------------------------------------------------------- +void SAL_CALL UnoControlListBoxModel::addItemListListener( const uno::Reference< awt::XItemListListener >& i_Listener ) throw (uno::RuntimeException) +{ + if ( i_Listener.is() ) + m_aItemListListeners.addInterface( i_Listener ); +} + +// --------------------------------------------------------------------------------------------------------------------- +void SAL_CALL UnoControlListBoxModel::removeItemListListener( const uno::Reference< awt::XItemListListener >& i_Listener ) throw (uno::RuntimeException) +{ + if ( i_Listener.is() ) + m_aItemListListeners.removeInterface( i_Listener ); +} + +// --------------------------------------------------------------------------------------------------------------------- +void UnoControlListBoxModel::impl_getStringItemList( ::std::vector< ::rtl::OUString >& o_rStringItems ) const +{ + Sequence< ::rtl::OUString > aStringItemList; + Any aPropValue; + getFastPropertyValue( aPropValue, BASEPROPERTY_STRINGITEMLIST ); + OSL_VERIFY( aPropValue >>= aStringItemList ); + + o_rStringItems.resize( size_t( aStringItemList.getLength() ) ); + ::std::copy( + aStringItemList.getConstArray(), + aStringItemList.getConstArray() + aStringItemList.getLength(), + o_rStringItems.begin() + ); +} + +// --------------------------------------------------------------------------------------------------------------------- +void UnoControlListBoxModel::impl_setStringItemList_nolck( const ::std::vector< ::rtl::OUString >& i_rStringItems ) +{ + Sequence< ::rtl::OUString > aStringItems( i_rStringItems.size() ); + ::std::copy( + i_rStringItems.begin(), + i_rStringItems.end(), + aStringItems.getArray() + ); + m_pData->m_bSettingLegacyProperty = true; + try + { + setFastPropertyValue( BASEPROPERTY_STRINGITEMLIST, uno::makeAny( aStringItems ) ); + } + catch( const Exception& ) + { + m_pData->m_bSettingLegacyProperty = false; + throw; + } + m_pData->m_bSettingLegacyProperty = false; +} + +// --------------------------------------------------------------------------------------------------------------------- +void UnoControlListBoxModel::impl_handleInsert( const sal_Int32 i_nItemPosition, const ::boost::optional< ::rtl::OUString >& i_rItemText, + const ::boost::optional< ::rtl::OUString >& i_rItemImageURL, ::osl::ClearableMutexGuard& i_rClearBeforeNotify ) +{ + // SYNCHRONIZED -----> + // sync with legacy StringItemList property + ::std::vector< ::rtl::OUString > aStringItems; + impl_getStringItemList( aStringItems ); + OSL_ENSURE( size_t( i_nItemPosition ) <= aStringItems.size(), "UnoControlListBoxModel::impl_handleInsert" ); + if ( size_t( i_nItemPosition ) <= aStringItems.size() ) + { + const ::rtl::OUString sItemText( !!i_rItemText ? *i_rItemText : ::rtl::OUString() ); + aStringItems.insert( aStringItems.begin() + i_nItemPosition, sItemText ); + } + + i_rClearBeforeNotify.clear(); + // <----- SYNCHRONIZED + impl_setStringItemList_nolck( aStringItems ); + + // notify ItemListListeners + impl_notifyItemListEvent_nolck( i_nItemPosition, i_rItemText, i_rItemImageURL, &XItemListListener::listItemInserted ); +} + +// --------------------------------------------------------------------------------------------------------------------- +void UnoControlListBoxModel::impl_handleRemove( const sal_Int32 i_nItemPosition, ::osl::ClearableMutexGuard& i_rClearBeforeNotify ) +{ + // SYNCHRONIZED -----> + const bool bAllItems = ( i_nItemPosition < 0 ); + // sync with legacy StringItemList property + ::std::vector< ::rtl::OUString > aStringItems; + impl_getStringItemList( aStringItems ); + if ( !bAllItems ) + { + OSL_ENSURE( size_t( i_nItemPosition ) < aStringItems.size(), "UnoControlListBoxModel::impl_handleRemove" ); + if ( size_t( i_nItemPosition ) < aStringItems.size() ) + { + aStringItems.erase( aStringItems.begin() + i_nItemPosition ); + } + } + else + { + aStringItems.resize(0); + } + + i_rClearBeforeNotify.clear(); + // <----- SYNCHRONIZED + impl_setStringItemList_nolck( aStringItems ); + + // notify ItemListListeners + if ( bAllItems ) + { + EventObject aEvent( *this ); + m_aItemListListeners.notifyEach( &XItemListListener::allItemsRemoved, aEvent ); + } + else + { + impl_notifyItemListEvent_nolck( i_nItemPosition, ::boost::optional< ::rtl::OUString >(), ::boost::optional< ::rtl::OUString >(), + &XItemListListener::listItemRemoved ); + } +} + +// --------------------------------------------------------------------------------------------------------------------- +void UnoControlListBoxModel::impl_handleModify( const sal_Int32 i_nItemPosition, const ::boost::optional< ::rtl::OUString >& i_rItemText, + const ::boost::optional< ::rtl::OUString >& i_rItemImageURL, ::osl::ClearableMutexGuard& i_rClearBeforeNotify ) +{ + // SYNCHRONIZED -----> + if ( !!i_rItemText ) + { + // sync with legacy StringItemList property + ::std::vector< ::rtl::OUString > aStringItems; + impl_getStringItemList( aStringItems ); + OSL_ENSURE( size_t( i_nItemPosition ) < aStringItems.size(), "UnoControlListBoxModel::impl_handleModify" ); + if ( size_t( i_nItemPosition ) < aStringItems.size() ) + { + aStringItems[ i_nItemPosition] = *i_rItemText; + } + + i_rClearBeforeNotify.clear(); + // <----- SYNCHRONIZED + impl_setStringItemList_nolck( aStringItems ); + } + else + { + i_rClearBeforeNotify.clear(); + // <----- SYNCHRONIZED + } + + // notify ItemListListeners + impl_notifyItemListEvent_nolck( i_nItemPosition, i_rItemText, i_rItemImageURL, &XItemListListener::listItemModified ); +} + +// --------------------------------------------------------------------------------------------------------------------- +void UnoControlListBoxModel::impl_notifyItemListEvent_nolck( const sal_Int32 i_nItemPosition, const ::boost::optional< ::rtl::OUString >& i_rItemText, + const ::boost::optional< ::rtl::OUString >& i_rItemImageURL, + void ( SAL_CALL XItemListListener::*NotificationMethod )( const ItemListEvent& ) ) +{ + ItemListEvent aEvent; + aEvent.Source = *this; + aEvent.ItemPosition = i_nItemPosition; + if ( !!i_rItemText ) + { + aEvent.ItemText.IsPresent = sal_True; + aEvent.ItemText.Value = *i_rItemText; + } + if ( !!i_rItemImageURL ) + { + aEvent.ItemImageURL.IsPresent = sal_True; + aEvent.ItemImageURL.Value = *i_rItemImageURL; + } + + m_aItemListListeners.notifyEach( NotificationMethod, aEvent ); +} + // ---------------------------------------------------- // class UnoListBoxControl // ---------------------------------------------------- UnoListBoxControl::UnoListBoxControl() - : maActionListeners( *this ), - maItemListeners( *this ) + :maActionListeners( *this ) + ,maItemListeners( *this ) { maComponentInfos.nWidth = 100; maComponentInfos.nHeight = 12; @@ -1922,27 +2349,6 @@ UnoListBoxControl::UnoListBoxControl() return ::rtl::OUString::createFromAscii( "listbox" ); } -// uno::XInterface -uno::Any UnoListBoxControl::queryAggregation( const uno::Type & rType ) throw(uno::RuntimeException) -{ - uno::Any aRet = ::cppu::queryInterface( rType, - SAL_STATIC_CAST( awt::XListBox*, this ), - SAL_STATIC_CAST( awt::XItemListener*, this ), - SAL_STATIC_CAST( lang::XEventListener*, SAL_STATIC_CAST( awt::XItemListener*, this ) ), - SAL_STATIC_CAST( awt::XLayoutConstrains*, this ), - SAL_STATIC_CAST( awt::XTextLayoutConstrains*, this ) ); - return (aRet.hasValue() ? aRet : UnoControlBase::queryAggregation( rType )); -} - -// lang::XTypeProvider -IMPL_XTYPEPROVIDER_START( UnoListBoxControl ) - getCppuType( ( uno::Reference< awt::XListBox>* ) NULL ), - getCppuType( ( uno::Reference< awt::XItemListener>* ) NULL ), - getCppuType( ( uno::Reference< awt::XLayoutConstrains>* ) NULL ), - getCppuType( ( uno::Reference< awt::XTextLayoutConstrains>* ) NULL ), - UnoControlBase::getTypes() -IMPL_XTYPEPROVIDER_END - void UnoListBoxControl::dispose() throw(uno::RuntimeException) { lang::EventObject aEvt; @@ -1966,24 +2372,26 @@ void UnoListBoxControl::ImplUpdateSelectedItemsProperty() } } -void UnoListBoxControl::ImplSetPeerProperty( const ::rtl::OUString& rPropName, const uno::Any& rVal ) +void UnoListBoxControl::updateFromModel() { - UnoControl::ImplSetPeerProperty( rPropName, rVal ); + UnoControlBase::updateFromModel(); + + Reference< XItemListListener > xItemListListener( getPeer(), UNO_QUERY ); + ENSURE_OR_RETURN_VOID( xItemListListener.is(), "UnoListBoxControl::updateFromModel: a peer which is no ItemListListener?!" ); + + EventObject aEvent( getModel() ); + xItemListListener->itemListChanged( aEvent ); +} - // Wenn die SelectedItems vor der StringItemList gesetzt werden, - // hat das keine Auswirkung... +void UnoListBoxControl::ImplSetPeerProperty( const ::rtl::OUString& rPropName, const uno::Any& rVal ) +{ if ( rPropName == GetPropertyName( BASEPROPERTY_STRINGITEMLIST ) ) - { - ::rtl::OUString aSelPropName = GetPropertyName( BASEPROPERTY_SELECTEDITEMS ); - uno::Any aVal = ImplGetPropertyValue( aSelPropName ); - if ( !( aVal.getValueType().getTypeClass() == uno::TypeClass_VOID ) ) - { - uno::Reference< awt::XVclWindowPeer > xW( getPeer(), uno::UNO_QUERY ); - if (xW.is()) - // same comment as in UnoControl::ImplSetPeerProperty - see there - xW->setProperty( aSelPropName, aVal ); - } - } + // do not forward this to our peer. We are a XItemListListener at our model, and changes in the string item + // list (which is a legacy property) will, later, arrive as changes in the ItemList. Those latter changes + // will be forwarded to the peer, which will update itself accordingly. + return; + + UnoControl::ImplSetPeerProperty( rPropName, rVal ); } void UnoListBoxControl::createPeer( const uno::Reference< awt::XToolkit > & rxToolkit, const uno::Reference< awt::XWindowPeer > & rParentPeer ) throw(uno::RuntimeException) @@ -2281,6 +2689,66 @@ void UnoListBoxControl::getColumnsAndLines( sal_Int16& nCols, sal_Int16& nLines Impl_getColumnsAndLines( nCols, nLines ); } +sal_Bool SAL_CALL UnoListBoxControl::setModel( const uno::Reference< awt::XControlModel >& i_rModel ) throw ( uno::RuntimeException ) +{ + ::osl::MutexGuard aGuard( GetMutex() ); + + const Reference< XItemList > xOldItems( getModel(), UNO_QUERY ); + OSL_ENSURE( xOldItems.is() || !getModel().is(), "UnoListBoxControl::setModel: illegal old model!" ); + const Reference< XItemList > xNewItems( i_rModel, UNO_QUERY ); + OSL_ENSURE( xNewItems.is() || !i_rModel.is(), "UnoListBoxControl::setModel: illegal new model!" ); + + if ( !UnoListBoxControl_Base::setModel( i_rModel ) ) + return sal_False; + + if ( xOldItems.is() ) + xOldItems->removeItemListListener( this ); + if ( xNewItems.is() ) + xNewItems->addItemListListener( this ); + + return sal_True; +} + +void SAL_CALL UnoListBoxControl::listItemInserted( const awt::ItemListEvent& i_rEvent ) throw (uno::RuntimeException) +{ + const Reference< XItemListListener > xPeerListener( getPeer(), UNO_QUERY ); + OSL_ENSURE( xPeerListener.is() || !getPeer().is(), "UnoListBoxControl::listItemInserted: invalid peer!" ); + if ( xPeerListener.is() ) + xPeerListener->listItemInserted( i_rEvent ); +} + +void SAL_CALL UnoListBoxControl::listItemRemoved( const awt::ItemListEvent& i_rEvent ) throw (uno::RuntimeException) +{ + const Reference< XItemListListener > xPeerListener( getPeer(), UNO_QUERY ); + OSL_ENSURE( xPeerListener.is() || !getPeer().is(), "UnoListBoxControl::listItemRemoved: invalid peer!" ); + if ( xPeerListener.is() ) + xPeerListener->listItemRemoved( i_rEvent ); +} + +void SAL_CALL UnoListBoxControl::listItemModified( const awt::ItemListEvent& i_rEvent ) throw (uno::RuntimeException) +{ + const Reference< XItemListListener > xPeerListener( getPeer(), UNO_QUERY ); + OSL_ENSURE( xPeerListener.is() || !getPeer().is(), "UnoListBoxControl::listItemModified: invalid peer!" ); + if ( xPeerListener.is() ) + xPeerListener->listItemModified( i_rEvent ); +} + +void SAL_CALL UnoListBoxControl::allItemsRemoved( const lang::EventObject& i_rEvent ) throw (uno::RuntimeException) +{ + const Reference< XItemListListener > xPeerListener( getPeer(), UNO_QUERY ); + OSL_ENSURE( xPeerListener.is() || !getPeer().is(), "UnoListBoxControl::allItemsRemoved: invalid peer!" ); + if ( xPeerListener.is() ) + xPeerListener->allItemsRemoved( i_rEvent ); +} + +void SAL_CALL UnoListBoxControl::itemListChanged( const lang::EventObject& i_rEvent ) throw (uno::RuntimeException) +{ + const Reference< XItemListListener > xPeerListener( getPeer(), UNO_QUERY ); + OSL_ENSURE( xPeerListener.is() || !getPeer().is(), "UnoListBoxControl::itemListChanged: invalid peer!" ); + if ( xPeerListener.is() ) + xPeerListener->itemListChanged( i_rEvent ); +} + // ---------------------------------------------------- // class UnoControlComboBoxModel // ---------------------------------------------------- diff --git a/vcl/inc/vcl/lstbox.hxx b/vcl/inc/vcl/lstbox.hxx index 98cd05d999dd..3659e5aee485 100644 --- a/vcl/inc/vcl/lstbox.hxx +++ b/vcl/inc/vcl/lstbox.hxx @@ -130,6 +130,7 @@ public: virtual USHORT GetEntryPos( const XubString& rStr ) const; virtual USHORT GetEntryPos( const void* pData ) const; + Image GetEntryImage( USHORT nPos ) const; virtual XubString GetEntry( USHORT nPos ) const; virtual USHORT GetEntryCount() const; diff --git a/vcl/source/control/lstbox.cxx b/vcl/source/control/lstbox.cxx index 70b67c0a3d57..dde34d52806c 100644 --- a/vcl/source/control/lstbox.cxx +++ b/vcl/source/control/lstbox.cxx @@ -1081,6 +1081,15 @@ void ListBox::RemoveEntry( USHORT nPos ) // ----------------------------------------------------------------------- +Image ListBox::GetEntryImage( USHORT nPos ) const +{ + if ( mpImplLB->GetEntryList()->HasEntryImage( nPos ) ) + return mpImplLB->GetEntryList()->GetEntryImage( nPos ); + return Image(); +} + +// ----------------------------------------------------------------------- + USHORT ListBox::GetEntryPos( const XubString& rStr ) const { USHORT nPos = mpImplLB->GetEntryList()->FindEntry( rStr ); -- cgit v1.2.3 From 7878b4f9db37a25be146c36438422ad1a2c9141f Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Thu, 29 Apr 2010 14:10:03 +0200 Subject: fs33a: #i111238# now with UserData support --- toolkit/inc/toolkit/controls/unocontrols.hxx | 2 + toolkit/source/controls/unocontrols.cxx | 84 +++++++++++++++++++++------- 2 files changed, 67 insertions(+), 19 deletions(-) diff --git a/toolkit/inc/toolkit/controls/unocontrols.hxx b/toolkit/inc/toolkit/controls/unocontrols.hxx index 5c612c887859..71e0a915788d 100644 --- a/toolkit/inc/toolkit/controls/unocontrols.hxx +++ b/toolkit/inc/toolkit/controls/unocontrols.hxx @@ -795,9 +795,11 @@ public: virtual void SAL_CALL setItemText( ::sal_Int32 Position, const ::rtl::OUString& ItemText ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL setItemImage( ::sal_Int32 Position, const ::rtl::OUString& ItemImageURL ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL setItemTextAndImage( ::sal_Int32 Position, const ::rtl::OUString& ItemText, const ::rtl::OUString& ItemImageURL ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setUserData( ::sal_Int32 Position, const ::com::sun::star::uno::Any& DataValue ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); virtual ::rtl::OUString SAL_CALL getItemText( ::sal_Int32 Position ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); virtual ::rtl::OUString SAL_CALL getItemImage( ::sal_Int32 Position ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::beans::Pair< ::rtl::OUString, ::rtl::OUString > SAL_CALL getItemTextAndImage( ::sal_Int32 Position ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getUserData( ::sal_Int32 Position ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Pair< ::rtl::OUString, ::rtl::OUString > > SAL_CALL getAllItems( ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL addItemListListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListListener >& Listener ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL removeItemListListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListListener >& Listener ) throw (::com::sun::star::uno::RuntimeException); diff --git a/toolkit/source/controls/unocontrols.cxx b/toolkit/source/controls/unocontrols.cxx index a4b7037b3b73..975040ca9070 100644 --- a/toolkit/source/controls/unocontrols.cxx +++ b/toolkit/source/controls/unocontrols.cxx @@ -1847,7 +1847,37 @@ sal_Bool UnoGroupBoxControl::isTransparent() throw(uno::RuntimeException) // ===================================================================================================================== // = UnoControlListBoxModel_Data // ===================================================================================================================== -typedef beans::Pair< ::rtl::OUString, ::rtl::OUString > ListItem; +struct ListItem +{ + ::rtl::OUString ItemText; + ::rtl::OUString ItemImageURL; + Any ItemUserData; + + ListItem() + :ItemText() + ,ItemImageURL() + ,ItemUserData() + { + } + + ListItem( const ::rtl::OUString& i_rItemText ) + :ItemText( i_rItemText ) + ,ItemImageURL() + ,ItemUserData() + { + } +}; + +typedef beans::Pair< ::rtl::OUString, ::rtl::OUString > UnoListItem; + +struct StripItemData : public ::std::unary_function< ListItem, UnoListItem > +{ + UnoListItem operator()( const ListItem& i_rItem ) + { + return UnoListItem( i_rItem.ItemText, i_rItem.ItemImageURL ); + } +}; + struct UnoControlListBoxModel_Data { UnoControlListBoxModel_Data( UnoControlListBoxModel& i_rAntiImpl ) @@ -1878,10 +1908,10 @@ struct UnoControlListBoxModel_Data return *m_aListItems.insert( m_aListItems.begin() + i_nIndex, ListItem() ); } - Sequence< ListItem > getAllItems() const + Sequence< UnoListItem > getAllItems() const { - Sequence< ListItem > aItems( sal_Int32( m_aListItems.size() ) ); - ::std::copy( m_aListItems.begin(), m_aListItems.end(), aItems.getArray() ); + Sequence< UnoListItem > aItems( sal_Int32( m_aListItems.size() ) ); + ::std::transform( m_aListItems.begin(), m_aListItems.end(), aItems.getArray(), StripItemData() ); return aItems; } @@ -1976,7 +2006,7 @@ namespace { ListItem operator()( const ::rtl::OUString& i_rItemText ) { - return ListItem( i_rItemText, ::rtl::OUString() ); + return ListItem( i_rItemText ); } }; } @@ -2047,8 +2077,8 @@ void SAL_CALL UnoControlListBoxModel::insertItem( ::sal_Int32 i_nPosition, const ::osl::ClearableMutexGuard aGuard( GetMutex() ); // SYNCHRONIZED -----> ListItem& rItem( m_pData->insertItem( i_nPosition ) ); - rItem.First = i_rItemText; - rItem.Second = i_rItemImageURL; + rItem.ItemText = i_rItemText; + rItem.ItemImageURL = i_rItemImageURL; impl_handleInsert( i_nPosition, i_rItemText, i_rItemImageURL, aGuard ); // <----- SYNCHRONIZED @@ -2060,7 +2090,7 @@ void SAL_CALL UnoControlListBoxModel::insertItemText( ::sal_Int32 i_nPosition, c ::osl::ClearableMutexGuard aGuard( GetMutex() ); // SYNCHRONIZED -----> ListItem& rItem( m_pData->insertItem( i_nPosition ) ); - rItem.First = i_rItemText; + rItem.ItemText = i_rItemText; impl_handleInsert( i_nPosition, i_rItemText, ::boost::optional< ::rtl::OUString >(), aGuard ); // <----- SYNCHRONIZED @@ -2072,7 +2102,7 @@ void SAL_CALL UnoControlListBoxModel::insertItemImage( ::sal_Int32 i_nPosition, ::osl::ClearableMutexGuard aGuard( GetMutex() ); // SYNCHRONIZED -----> ListItem& rItem( m_pData->insertItem( i_nPosition ) ); - rItem.Second = i_rItemImageURL; + rItem.ItemImageURL = i_rItemImageURL; impl_handleInsert( i_nPosition, ::boost::optional< ::rtl::OUString >(), i_rItemImageURL, aGuard ); // <----- SYNCHRONIZED @@ -2106,7 +2136,7 @@ void SAL_CALL UnoControlListBoxModel::setItemText( ::sal_Int32 i_nPosition, cons ::osl::ClearableMutexGuard aGuard( GetMutex() ); // SYNCHRONIZED -----> ListItem& rItem( m_pData->getItem( i_nPosition ) ); - rItem.First = i_rItemText; + rItem.ItemText = i_rItemText; impl_handleModify( i_nPosition, i_rItemText, ::boost::optional< ::rtl::OUString >(), aGuard ); // <----- SYNCHRONIZED @@ -2118,7 +2148,7 @@ void SAL_CALL UnoControlListBoxModel::setItemImage( ::sal_Int32 i_nPosition, con ::osl::ClearableMutexGuard aGuard( GetMutex() ); // SYNCHRONIZED -----> ListItem& rItem( m_pData->getItem( i_nPosition ) ); - rItem.Second = i_rItemImageURL; + rItem.ItemImageURL = i_rItemImageURL; impl_handleModify( i_nPosition, ::boost::optional< ::rtl::OUString >(), i_rItemImageURL, aGuard ); // <----- SYNCHRONIZED @@ -2130,35 +2160,51 @@ void SAL_CALL UnoControlListBoxModel::setItemTextAndImage( ::sal_Int32 i_nPositi ::osl::ClearableMutexGuard aGuard( GetMutex() ); // SYNCHRONIZED -----> ListItem& rItem( m_pData->getItem( i_nPosition ) ); - rItem.First = i_rItemText; - rItem.Second = i_rItemImageURL; + rItem.ItemText = i_rItemText; + rItem.ItemImageURL = i_rItemImageURL; impl_handleModify( i_nPosition, i_rItemText, i_rItemImageURL, aGuard ); // <----- SYNCHRONIZED } +// --------------------------------------------------------------------------------------------------------------------- +void SAL_CALL UnoControlListBoxModel::setUserData( ::sal_Int32 i_nPosition, const Any& i_rDataValue ) throw (IndexOutOfBoundsException, RuntimeException) +{ + ::osl::ClearableMutexGuard aGuard( GetMutex() ); + ListItem& rItem( m_pData->getItem( i_nPosition ) ); + rItem.ItemUserData = i_rDataValue; +} + // --------------------------------------------------------------------------------------------------------------------- ::rtl::OUString SAL_CALL UnoControlListBoxModel::getItemText( ::sal_Int32 i_nPosition ) throw (IndexOutOfBoundsException, RuntimeException) { ::osl::MutexGuard aGuard( GetMutex() ); - ListItem& rItem( m_pData->getItem( i_nPosition ) ); - return rItem.First; + const ListItem& rItem( m_pData->getItem( i_nPosition ) ); + return rItem.ItemText; } // --------------------------------------------------------------------------------------------------------------------- ::rtl::OUString SAL_CALL UnoControlListBoxModel::getItemImage( ::sal_Int32 i_nPosition ) throw (IndexOutOfBoundsException, RuntimeException) { ::osl::MutexGuard aGuard( GetMutex() ); - ListItem& rItem( m_pData->getItem( i_nPosition ) ); - return rItem.Second; + const ListItem& rItem( m_pData->getItem( i_nPosition ) ); + return rItem.ItemImageURL; } // --------------------------------------------------------------------------------------------------------------------- beans::Pair< ::rtl::OUString, ::rtl::OUString > SAL_CALL UnoControlListBoxModel::getItemTextAndImage( ::sal_Int32 i_nPosition ) throw (IndexOutOfBoundsException, RuntimeException) { ::osl::MutexGuard aGuard( GetMutex() ); - ListItem& rItem( m_pData->getItem( i_nPosition ) ); - return rItem; + const ListItem& rItem( m_pData->getItem( i_nPosition ) ); + return beans::Pair< ::rtl::OUString, ::rtl::OUString >( rItem.ItemText, rItem.ItemImageURL ); +} + +// --------------------------------------------------------------------------------------------------------------------- +Any SAL_CALL UnoControlListBoxModel::getUserData( ::sal_Int32 i_nPosition ) throw (IndexOutOfBoundsException, RuntimeException) +{ + ::osl::ClearableMutexGuard aGuard( GetMutex() ); + const ListItem& rItem( m_pData->getItem( i_nPosition ) ); + return rItem.ItemUserData; } // --------------------------------------------------------------------------------------------------------------------- -- cgit v1.2.3 From 4de89c5b78184fb74e5c907df3d911379fa018be Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 12 Feb 2010 10:45:01 +0100 Subject: autorecovery: +ENSURE_OR_RETURN_VOID --- tools/inc/tools/diagnose_ex.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tools/inc/tools/diagnose_ex.h b/tools/inc/tools/diagnose_ex.h index 6833fd6632ce..b244d11dc305 100644 --- a/tools/inc/tools/diagnose_ex.h +++ b/tools/inc/tools/diagnose_ex.h @@ -130,6 +130,17 @@ #define ENSURE_OR_RETURN_FALSE(c, m) \ ENSURE_OR_RETURN(c, m, false) +/** This macro asserts the given condition (in debug mode), and + returns afterwards, without return value "void". + */ +#define ENSURE_OR_RETURN_VOID( c, m ) \ + if( !(c) ) \ + { \ + OSL_ENSURE( c, m ); \ + return; \ + } + + /** This macro asserts the given condition (in debug mode), and returns afterwards, without return value "void". -- cgit v1.2.3 From 27e5fae0093be37aa9fd2a6f2c2539591ac82835 Mon Sep 17 00:00:00 2001 From: os Date: Mon, 15 Feb 2010 09:51:03 +0100 Subject: unused code removed --- sw/source/core/unocore/unotbl.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx index 635e298071cc..f6dee5bda958 100644 --- a/sw/source/core/unocore/unotbl.cxx +++ b/sw/source/core/unocore/unotbl.cxx @@ -3362,8 +3362,8 @@ void SwXTextTable::setPropertyValue(const OUString& rPropertyName, pUnoCrsr->Move( fnMoveForward, fnGoNode ); pUnoCrsr->SetRemainInSection( sal_False ); - SwTableLine* pLastLine = rLines[rLines.Count() - 1]; - SwTableBoxes &rBoxes = pLastLine->GetTabBoxes(); + + const SwTableBox* pBRBox = lcl_FindCornerTableBox(rLines, false); pUnoCrsr->SetMark(); pUnoCrsr->GetPoint()->nNode = *pBRBox->GetSttNd(); -- cgit v1.2.3 From 40db8a7bf4ecb4e85957e98466a7d8a3bbd4696b Mon Sep 17 00:00:00 2001 From: Henning Brinkmann Date: Tue, 16 Feb 2010 17:26:41 +0100 Subject: hb33issues01: #i109284# SwRTFWriter::OutBookmarks: Do not read name of NULL bookmark pointer --- sw/source/filter/rtf/wrtrtf.cxx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/sw/source/filter/rtf/wrtrtf.cxx b/sw/source/filter/rtf/wrtrtf.cxx index 9975ee3abf23..f143d12cc765 100644 --- a/sw/source/filter/rtf/wrtrtf.cxx +++ b/sw/source/filter/rtf/wrtrtf.cxx @@ -1305,8 +1305,17 @@ void SwRTFWriter::OutBookmarks( xub_StrLen nCntntPos) Strm() << '}'; } OutComment( *this, OOO_STRING_SVTOOLS_RTF_BKMKEND ) << ' '; - RTFOutFuncs::Out_String( Strm(), pAsBookmark->GetName(), + + { + ::rtl::OUString aEmpty; + ::rtl::OUString & rBookmarkName = aEmpty; + + if (pAsBookmark) + rBookmarkName = pAsBookmark->GetName(); + + RTFOutFuncs::Out_String( Strm(), rBookmarkName, eDefaultEncoding, bWriteHelpFmt ) << '}'; + } if(++nBkmkTabPos >= pMarkAccess->getMarksCount()) nBkmkTabPos = -1; -- cgit v1.2.3 From 90184195d98ef42a18d37cd925c12aed6e60913b Mon Sep 17 00:00:00 2001 From: Christian Lippka Date: Tue, 2 Mar 2010 19:50:13 +0100 Subject: added Visible property for shapes --- offapi/com/sun/star/drawing/Shape.idl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/offapi/com/sun/star/drawing/Shape.idl b/offapi/com/sun/star/drawing/Shape.idl index f57369e87f49..ecc0556411b2 100644 --- a/offapi/com/sun/star/drawing/Shape.idl +++ b/offapi/com/sun/star/drawing/Shape.idl @@ -135,6 +135,13 @@ published service Shape //------------------------------------------------------------------------- + /** If this is , the Shape is not visible + on screen outputs. + */ + [optional, property] boolean Visible; + + //------------------------------------------------------------------------- + /** If this is , the Shape is not visible on printer outputs. */ -- cgit v1.2.3 From 33ef17ed7207b82d8e6fe1fa4ddaec676092d0f1 Mon Sep 17 00:00:00 2001 From: Christian Lippka Date: Tue, 2 Mar 2010 19:50:13 +0100 Subject: added Visible property for shapes --- svx/inc/svdstr.hrc | 2 +- svx/inc/svx/svddef.hxx | 3 +- svx/inc/svx/svdobj.hxx | 11 +++--- svx/inc/svx/sxopitm.hxx | 6 ++++ svx/inc/svx/unoshprp.hxx | 1 + .../sdr/contact/viewobjectcontactofsdrobj.cxx | 13 ++++++-- .../sdr/contact/viewobjectcontactofunocontrol.cxx | 11 +++--- svx/source/svdraw/sdrhittesthelper.cxx | 2 +- svx/source/svdraw/svdattr.cxx | 2 ++ svx/source/svdraw/svdedtv1.cxx | 4 +++ svx/source/svdraw/svdmrkv.cxx | 6 +++- svx/source/svdraw/svdobj.cxx | 39 +++++++++++++++++++--- svx/source/svdraw/svdoedge.cxx | 2 +- svx/source/svdraw/svdpagv.cxx | 6 ++++ svx/source/svdraw/svdstr.src | 5 +++ svx/source/unodraw/unoshape.cxx | 18 ++++++++-- xmloff/inc/xmlnmspe.hxx | 3 +- xmloff/inc/xmloff/shapeexport.hxx | 3 ++ xmloff/inc/xmloff/xmltoken.hxx | 6 ++++ xmloff/source/core/xmlexp.cxx | 2 +- xmloff/source/core/xmlimp.cxx | 4 +++ xmloff/source/core/xmltoken.cxx | 6 ++++ xmloff/source/draw/sdxmlexp.cxx | 9 +++-- xmloff/source/draw/shapeexport.cxx | 31 +++++++++++++++++ xmloff/source/draw/ximpshap.cxx | 23 ++++++++++++- xmloff/source/draw/ximpshap.hxx | 3 ++ 26 files changed, 192 insertions(+), 29 deletions(-) diff --git a/svx/inc/svdstr.hrc b/svx/inc/svdstr.hrc index f1c19b4e0895..f1bc8cfdae19 100644 --- a/svx/inc/svdstr.hrc +++ b/svx/inc/svdstr.hrc @@ -674,7 +674,7 @@ #define SIP_SA_CIRCRESERVE1 (SIP_Begin + 177) #define SIP_SA_CIRCRESERVE2 (SIP_Begin + 178) #define SIP_SA_CIRCRESERVE3 (SIP_Begin + 179) -//BFS01#define SIP_SDRATTRSET_CIRC (SIP_Begin + 180) +#define SIP_SA_OBJVISIBLE (SIP_Begin + 180) #define SIP_SA_OBJMOVEPROTECT (SIP_Begin + 181) #define SIP_SA_OBJSIZEPROTECT (SIP_Begin + 182) #define SIP_SA_OBJPRINTABLE (SIP_Begin + 183) diff --git a/svx/inc/svx/svddef.hxx b/svx/inc/svx/svddef.hxx index a758e9c1dba7..a9e5d175680c 100644 --- a/svx/inc/svx/svddef.hxx +++ b/svx/inc/svx/svddef.hxx @@ -203,7 +203,8 @@ #define SDRATTR_TRANSFORMREF2X (SDRATTR_NOTPERSIST_FIRST+32) /* 1212 long, def=0 */ #define SDRATTR_TRANSFORMREF2Y (SDRATTR_NOTPERSIST_FIRST+33) /* 1213 long, def=0 */ #define SDRATTR_TEXTDIRECTION (SDRATTR_NOTPERSIST_FIRST+34) /* 1214 V4+++ long, def=0 */ -#define SDRATTR_NOTPERSIST_LAST (SDRATTR_TEXTDIRECTION) /* 1228 V4+++*/ /* 1213*/ /* 1085 */ /* 1040 */ /* 1123 */ /* Pool V1: 1065 */ +#define SDRATTR_OBJVISIBLE (SDRATTR_NOTPERSIST_FIRST+35) +#define SDRATTR_NOTPERSIST_LAST (SDRATTR_OBJVISIBLE) /* 1228 V4+++*/ /* 1213*/ /* 1085 */ /* 1040 */ /* 1123 */ /* Pool V1: 1065 */ // kein SetItem hierfuer #define SDRATTR_GRAF_FIRST (SDRATTR_NOTPERSIST_LAST+1) /* 1229 V4+++*/ diff --git a/svx/inc/svx/svdobj.hxx b/svx/inc/svx/svdobj.hxx index 7d2f5b483e5b..c6e6579967b6 100644 --- a/svx/inc/svx/svdobj.hxx +++ b/svx/inc/svx/svdobj.hxx @@ -283,6 +283,7 @@ public: BOOL bSizProt; BOOL bNoPrint; BOOL bClosedObj; + bool mbVisible; SdrLayerID mnLayerID; public: @@ -467,10 +468,10 @@ protected: unsigned bGrouped : 1; // Member eines GroupObjektes? // Die folgende Flags werden gestreamt - unsigned bMovProt : 1; // Position geschuetzt - unsigned bSizProt : 1; // Groesse geschuetzt - unsigned bNoPrint : 1; // Nicht drucken - + unsigned bMovProt : 1; // If true, the position is protected + unsigned bSizProt : 1; // If true, the size is protected + unsigned bNoPrint : 1; // If true, the object is not printed. + unsigned mbVisible : 1; // If false, the object is not visible on screen (but maybe on printer, depending on bNoprint // Wenn bEmptyPresObj TRUE ist, handelt es sich um ein // Praesentationsobjekt, dem noch kein Inhalt zugewiesen // wurde. Default ist das Flag auf FALSE. Die Verwaltung @@ -1010,6 +1011,8 @@ public: sal_Bool IsResizeProtect() const { return bSizProt; } void SetPrintable(sal_Bool bPrn); sal_Bool IsPrintable() const { return !bNoPrint; } + void SetVisible(sal_Bool bVisible); + sal_Bool IsVisible() const { return mbVisible; } void SetEmptyPresObj(sal_Bool bEpt) { bEmptyPresObj=bEpt; } sal_Bool IsEmptyPresObj() const { return bEmptyPresObj; } void SetNotVisibleAsMaster(sal_Bool bFlg) { bNotVisibleAsMaster=bFlg; } diff --git a/svx/inc/svx/sxopitm.hxx b/svx/inc/svx/sxopitm.hxx index 947660e71cc0..dd402c3a0915 100644 --- a/svx/inc/svx/sxopitm.hxx +++ b/svx/inc/svx/sxopitm.hxx @@ -39,4 +39,10 @@ public: SdrObjPrintableItem(SvStream& rIn): SdrYesNoItem(SDRATTR_OBJPRINTABLE,rIn) {} }; +class SdrObjVisibleItem: public SdrYesNoItem { +public: + SdrObjVisibleItem(bool bOn=true): SdrYesNoItem(SDRATTR_OBJVISIBLE,bOn) {} + SdrObjVisibleItem(SvStream& rIn): SdrYesNoItem(SDRATTR_OBJVISIBLE,rIn) {} +}; + #endif diff --git a/svx/inc/svx/unoshprp.hxx b/svx/inc/svx/unoshprp.hxx index 27196079db07..fcf86488f7a3 100755 --- a/svx/inc/svx/unoshprp.hxx +++ b/svx/inc/svx/unoshprp.hxx @@ -325,6 +325,7 @@ { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_MOVEPROTECT), SDRATTR_OBJMOVEPROTECT , &::getBooleanCppuType(), 0, 0}, \ { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_NAME), SDRATTR_OBJECTNAME , &::getCppuType((const ::rtl::OUString*)0), 0, 0}, \ { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_PRINTABLE), SDRATTR_OBJPRINTABLE , &::getBooleanCppuType(), 0, 0}, \ + { MAP_CHAR_LEN("Visible"), SDRATTR_OBJVISIBLE , &::getBooleanCppuType(), 0, 0}, \ { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_SIZEPROTECT), SDRATTR_OBJSIZEPROTECT , &::getBooleanCppuType(), 0, 0},\ { MAP_CHAR_LEN("UINameSingular"), OWN_ATTR_UINAME_SINGULAR , &::getCppuType((const ::rtl::OUString*)0), ::com::sun::star::beans::PropertyAttribute::READONLY, 0}, \ { MAP_CHAR_LEN("UINamePlural"), OWN_ATTR_UINAME_PLURAL , &::getCppuType((const ::rtl::OUString*)0), ::com::sun::star::beans::PropertyAttribute::READONLY, 0}, \ diff --git a/svx/source/sdr/contact/viewobjectcontactofsdrobj.cxx b/svx/source/sdr/contact/viewobjectcontactofsdrobj.cxx index 8447fe639a28..485afe35f9c1 100644 --- a/svx/source/sdr/contact/viewobjectcontactofsdrobj.cxx +++ b/svx/source/sdr/contact/viewobjectcontactofsdrobj.cxx @@ -68,10 +68,17 @@ namespace sdr return false; } - // Test if print output but not printable - if(GetObjectContact().isOutputToPrinter() && !rObject.IsPrintable()) + if(GetObjectContact().isOutputToPrinter() ) { - return false; + // Test if print output but not printable + if( !rObject.IsPrintable()) + return false; + } + else + { + // test is object is not visible on screen + if( !rObject.IsVisible() ) + return false; } // Test for hidden object on MasterPage diff --git a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx index 5d00418a5729..8233bd91b9f3 100644 --- a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx +++ b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx @@ -1310,12 +1310,12 @@ namespace sdr { namespace contact { { // the layer of our object SdrLayerID nObjectLayer = _rUnoObject.GetLayer(); - // is the layer we're residing in visible in this view? - bool bIsObjectLayerVisible = _rPageView.isLayerVisible( nObjectLayer ); + // is the object we're residing in visible in this view? + bool bIsObjectVisible = _rUnoObject.IsVisible() && _rPageView.isLayerVisible( nObjectLayer ); - if ( _bForce || ( bIsObjectLayerVisible != _bIsCurrentlyVisible ) ) + if ( _bForce || ( bIsObjectVisible != _bIsCurrentlyVisible ) ) { - _rControl.setVisible( bIsObjectLayerVisible ); + _rControl.setVisible( bIsObjectVisible ); } } } @@ -1863,7 +1863,8 @@ namespace sdr { namespace contact { if(pSdrPageView) { - const bool bIsLayerVisible(pSdrPageView->GetVisibleLayers().IsSet(getSdrObject().GetLayer())); + const SdrObject& rObject = getSdrObject(); + const bool bIsLayerVisible( rObject.IsVisible() && pSdrPageView->GetVisibleLayers().IsSet(rObject.GetLayer())); if(rControl.isVisible() != bIsLayerVisible) { diff --git a/svx/source/svdraw/sdrhittesthelper.cxx b/svx/source/svdraw/sdrhittesthelper.cxx index 473c09b10f5d..58eef58a9fd6 100644 --- a/svx/source/svdraw/sdrhittesthelper.cxx +++ b/svx/source/svdraw/sdrhittesthelper.cxx @@ -60,7 +60,7 @@ SdrObject* SdrObjectPrimitiveHit( } else { - if(!pVisiLayer || pVisiLayer->IsSet(rObject.GetLayer())) + if( rObject.IsVisible() && (!pVisiLayer || pVisiLayer->IsSet(rObject.GetLayer()))) { // single object, 3d object, empty scene or empty group. Check if // it's a single 3D object diff --git a/svx/source/svdraw/svdattr.cxx b/svx/source/svdraw/svdattr.cxx index d831906fa94c..3a3935f819f8 100644 --- a/svx/source/svdraw/svdattr.cxx +++ b/svx/source/svdraw/svdattr.cxx @@ -189,6 +189,7 @@ SdrItemPool::SdrItemPool( mppLocalPoolDefaults[SDRATTR_OBJMOVEPROTECT -SDRATTR_START]=new SdrObjMoveProtectItem; mppLocalPoolDefaults[SDRATTR_OBJSIZEPROTECT -SDRATTR_START]=new SdrObjSizeProtectItem; mppLocalPoolDefaults[SDRATTR_OBJPRINTABLE -SDRATTR_START]=new SdrObjPrintableItem; + mppLocalPoolDefaults[SDRATTR_OBJVISIBLE -SDRATTR_START]=new SdrObjVisibleItem; mppLocalPoolDefaults[SDRATTR_LAYERID -SDRATTR_START]=new SdrLayerIdItem; mppLocalPoolDefaults[SDRATTR_LAYERNAME -SDRATTR_START]=new SdrLayerNameItem; mppLocalPoolDefaults[SDRATTR_OBJECTNAME -SDRATTR_START]=new SdrObjectNameItem; @@ -546,6 +547,7 @@ void SdrItemPool::TakeItemName(sal_uInt16 nWhich, String& rItemName) case SDRATTR_OBJMOVEPROTECT : nResId = SIP_SA_OBJMOVEPROTECT;break; case SDRATTR_OBJSIZEPROTECT : nResId = SIP_SA_OBJSIZEPROTECT;break; case SDRATTR_OBJPRINTABLE : nResId = SIP_SA_OBJPRINTABLE;break; + case SDRATTR_OBJVISIBLE : nResId = SIP_SA_OBJVISIBLE;break; case SDRATTR_LAYERID : nResId = SIP_SA_LAYERID;break; case SDRATTR_LAYERNAME : nResId = SIP_SA_LAYERNAME;break; case SDRATTR_OBJECTNAME : nResId = SIP_SA_OBJECTNAME;break; diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx index 48870cda0e02..1ac6d0b89945 100644 --- a/svx/source/svdraw/svdedtv1.cxx +++ b/svx/source/svdraw/svdedtv1.cxx @@ -760,6 +760,7 @@ void SdrEditView::MergeNotPersistAttrFromMarked(SfxItemSet& rAttr, BOOL /*bOnlyH BOOL bMovProtect=FALSE,bMovProtectDC=FALSE; BOOL bSizProtect=FALSE,bSizProtectDC=FALSE; BOOL bPrintable =TRUE ,bPrintableDC=FALSE; + BOOL bVisible = TRUE, bVisibleDC=FALSE; SdrLayerID nLayerId=0; BOOL bLayerDC=FALSE; XubString aObjName; BOOL bObjNameDC=FALSE,bObjNameSet=FALSE; long nSnapPosX=0; BOOL bSnapPosXDC=FALSE; @@ -781,6 +782,7 @@ void SdrEditView::MergeNotPersistAttrFromMarked(SfxItemSet& rAttr, BOOL /*bOnlyH bMovProtect=pObj->IsMoveProtect(); bSizProtect=pObj->IsResizeProtect(); bPrintable =pObj->IsPrintable(); + bVisible = pObj->IsVisible(); Rectangle aSnapRect2(pObj->GetSnapRect()); Rectangle aLogicRect2(pObj->GetLogicRect()); nSnapPosX=aSnapRect2.Left(); @@ -798,6 +800,7 @@ void SdrEditView::MergeNotPersistAttrFromMarked(SfxItemSet& rAttr, BOOL /*bOnlyH if (!bMovProtectDC && bMovProtect!=pObj->IsMoveProtect()) bMovProtectDC=TRUE; if (!bSizProtectDC && bSizProtect!=pObj->IsResizeProtect()) bSizProtectDC=TRUE; if (!bPrintableDC && bPrintable !=pObj->IsPrintable()) bPrintableDC=TRUE; + if (!bVisibleDC && bVisible !=pObj->IsVisible()) bVisibleDC=TRUE; if (!bRotAngleDC && nRotAngle !=pObj->GetRotateAngle()) bRotAngleDC=TRUE; if (!bShrAngleDC && nShrAngle !=pObj->GetShearAngle()) bShrAngleDC=TRUE; if (!bSnapWdtDC || !bSnapHgtDC || !bSnapPosXDC || !bSnapPosYDC || !bLogicWdtDiff || !bLogicHgtDiff) { @@ -837,6 +840,7 @@ void SdrEditView::MergeNotPersistAttrFromMarked(SfxItemSet& rAttr, BOOL /*bOnlyH rAttr.Put(SdrRotateOneItem()); rAttr.Put(SdrHorzShearOneItem()); rAttr.Put(SdrVertShearOneItem()); + if (nMarkAnz>1) { rAttr.Put(SdrResizeXAllItem()); rAttr.Put(SdrResizeYAllItem()); diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx index b9598cef4ceb..8b3d09017f28 100644 --- a/svx/source/svdraw/svdmrkv.cxx +++ b/svx/source/svdraw/svdmrkv.cxx @@ -1188,6 +1188,10 @@ void SdrMarkView::CheckMarked() } bRaus=bRaus || pPV->GetLockedLayers().IsSet(nLay) || // Layer gesperrt? !pPV->GetVisibleLayers().IsSet(nLay); // Layer nicht sichtbar? + + if( !bRaus ) + bRaus = !pObj->IsVisible(); // not visible objects can not be marked + if (!bRaus) { // Joe am 9.3.1997: Gruppierte Objekten koennen nun auch // markiert werden. Nach EnterGroup muessen aber die Objekte @@ -1591,7 +1595,7 @@ void SdrMarkView::SetMarkHdlSizePixel(USHORT nSiz) #define SDRSEARCH_IMPISMASTER 0x80000000 /* MasterPage wird gerade durchsucht */ SdrObject* SdrMarkView::CheckSingleSdrObjectHit(const Point& rPnt, USHORT nTol, SdrObject* pObj, SdrPageView* pPV, ULONG nOptions, const SetOfByte* pMVisLay) const { - if((nOptions & SDRSEARCH_IMPISMASTER) && pObj->IsNotVisibleAsMaster()) + if(((nOptions & SDRSEARCH_IMPISMASTER) && pObj->IsNotVisibleAsMaster()) || (!pObj->IsVisible())) { return NULL; } diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx index d44b44210ca0..5ab5cb25f7a1 100644 --- a/svx/source/svdraw/svdobj.cxx +++ b/svx/source/svdraw/svdobj.cxx @@ -235,6 +235,7 @@ SdrObjGeoData::SdrObjGeoData(): bSizProt(FALSE), bNoPrint(FALSE), bClosedObj(FALSE), + mbVisible(true), mnLayerID(0) { DBG_CTOR(SdrObjGeoData,NULL); @@ -457,6 +458,7 @@ SdrObject::SdrObject() bEmptyPresObj =FALSE; bNotVisibleAsMaster=FALSE; bClosedObj =FALSE; + mbVisible = true; // #i25616# mbLineIsOutsideGeometry = sal_False; @@ -1092,6 +1094,7 @@ void SdrObject::operator=(const SdrObject& rObj) bSizProt=rObj.bSizProt; bMovProt=rObj.bMovProt; bNoPrint=rObj.bNoPrint; + mbVisible=rObj.mbVisible; bMarkProt=rObj.bMarkProt; //EmptyPresObj wird nicht kopiert: nun doch! (25-07-1995, Joe) bEmptyPresObj =rObj.bEmptyPresObj; @@ -1958,6 +1961,7 @@ void SdrObject::SaveGeoData(SdrObjGeoData& rGeo) const rGeo.bMovProt =bMovProt ; rGeo.bSizProt =bSizProt ; rGeo.bNoPrint =bNoPrint ; + rGeo.mbVisible =mbVisible ; rGeo.bClosedObj =bClosedObj ; rGeo.mnLayerID = mnLayerID; @@ -1984,6 +1988,7 @@ void SdrObject::RestGeoData(const SdrObjGeoData& rGeo) bMovProt =rGeo.bMovProt ; bSizProt =rGeo.bSizProt ; bNoPrint =rGeo.bNoPrint ; + mbVisible =rGeo.mbVisible ; bClosedObj =rGeo.bClosedObj ; mnLayerID = rGeo.mnLayerID; @@ -2191,6 +2196,11 @@ void SdrObject::NbcApplyNotPersistAttr(const SfxItemSet& rAttr) SetPrintable(b); } + if (rAttr.GetItemState(SDRATTR_OBJVISIBLE,TRUE,&pPoolItem)==SFX_ITEM_SET) { + bool b=((const SdrObjVisibleItem*)pPoolItem)->GetValue(); + SetVisible(b); + } + SdrLayerID nLayer=SDRLAYER_NOTFOUND; if (rAttr.GetItemState(SDRATTR_LAYERID,TRUE,&pPoolItem)==SFX_ITEM_SET) { nLayer=((const SdrLayerIdItem*)pPoolItem)->GetValue(); @@ -2252,6 +2262,7 @@ void SdrObject::TakeNotPersistAttr(SfxItemSet& rAttr, FASTBOOL bMerge) const lcl_SetItem(rAttr,bMerge,SdrObjMoveProtectItem(IsMoveProtect())); lcl_SetItem(rAttr,bMerge,SdrObjSizeProtectItem(IsResizeProtect())); lcl_SetItem(rAttr,bMerge,SdrObjPrintableItem(IsPrintable())); + lcl_SetItem(rAttr,bMerge,SdrObjVisibleItem(IsVisible())); lcl_SetItem(rAttr,bMerge,SdrRotateAngleItem(GetRotateAngle())); lcl_SetItem(rAttr,bMerge,SdrShearAngleItem(GetShearAngle())); lcl_SetItem(rAttr,bMerge,SdrOneSizeWidthItem(rSnap.GetWidth()-1)); @@ -2730,11 +2741,29 @@ void SdrObject::SetResizeProtect(sal_Bool bProt) void SdrObject::SetPrintable(sal_Bool bPrn) { - bNoPrint=!bPrn; - SetChanged(); - if (IsInserted() && pModel!=NULL) { - SdrHint aHint(*this); - pModel->Broadcast(aHint); + if( bPrn != bNoPrint ) + { + bNoPrint=!bPrn; + SetChanged(); + if (IsInserted() && pModel!=NULL) + { + SdrHint aHint(*this); + pModel->Broadcast(aHint); + } + } +} + +void SdrObject::SetVisible(sal_Bool bVisible) +{ + if( bVisible != mbVisible ) + { + mbVisible = bVisible; + SetChanged(); + if (IsInserted() && pModel!=NULL) + { + SdrHint aHint(*this); + pModel->Broadcast(aHint); + } } } diff --git a/svx/source/svdraw/svdoedge.cxx b/svx/source/svdraw/svdoedge.cxx index dc76855f05cc..dffdbe6966d7 100644 --- a/svx/source/svdraw/svdoedge.cxx +++ b/svx/source/svdraw/svdoedge.cxx @@ -2100,7 +2100,7 @@ FASTBOOL SdrEdgeObj::ImpFindConnector(const Point& rPt, const SdrPageView& rPV, // Problem: Gruppenobjekt mit verschiedenen Layern liefert LayerID 0 !!!! no--; SdrObject* pObj=pOL->GetObj(no); - if (rVisLayer.IsSet(pObj->GetLayer()) && // nur sichtbare Objekte + if (rVisLayer.IsSet(pObj->GetLayer()) && pObj->IsVisible() && // only visible objects (pThis==NULL || pObj!=(SdrObject*)pThis) && // nicht an mich selbst connecten pObj->IsNode()) { diff --git a/svx/source/svdraw/svdpagv.cxx b/svx/source/svdraw/svdpagv.cxx index 6239708394bd..bad1401c2305 100644 --- a/svx/source/svdraw/svdpagv.cxx +++ b/svx/source/svdraw/svdpagv.cxx @@ -754,6 +754,12 @@ sal_Bool SdrPageView::IsObjMarkable(SdrObject* pObj) const return sal_False; } + // only visible are markable + if( !pObj->IsVisible() ) + { + return sal_False; + } + // #112440# if(pObj->ISA(SdrObjGroup)) { diff --git a/svx/source/svdraw/svdstr.src b/svx/source/svdraw/svdstr.src index ee6cbaea9632..1317a0e1328d 100644 --- a/svx/source/svdraw/svdstr.src +++ b/svx/source/svdraw/svdstr.src @@ -2395,6 +2395,11 @@ String SIP_SA_OBJPRINTABLE Text [ en-US ] = "Object, printable"; }; +String SIP_SA_OBJVISIBLE +{ + Text [ en-US ] = "Object, visible"; +}; + String SIP_SA_LAYERID { Text [ en-US ] = "Level ID"; diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx index 1e79962736aa..dd5f5c527671 100644 --- a/svx/source/unodraw/unoshape.cxx +++ b/svx/source/unodraw/unoshape.cxx @@ -2699,6 +2699,16 @@ bool SvxShape::setPropertyValueImpl( const ::rtl::OUString&, const SfxItemProper } break; } + case SDRATTR_OBJVISIBLE: + { + sal_Bool bVisible = sal_Bool(); + if( rValue >>= bVisible ) + { + mpObj->SetVisible(bVisible); + return true; + } + break; + } case SDRATTR_OBJSIZEPROTECT: { sal_Bool bResizeProtect = sal_Bool(); @@ -3069,11 +3079,15 @@ bool SvxShape::getPropertyValueImpl( const ::rtl::OUString&, const SfxItemProper } case SDRATTR_OBJPRINTABLE: - rValue = uno::makeAny( (sal_Bool) mpObj->IsPrintable() ); + rValue <<= static_cast( mpObj->IsPrintable() ); + break; + + case SDRATTR_OBJVISIBLE: + rValue <<= static_cast( mpObj->IsVisible() ); break; case SDRATTR_OBJSIZEPROTECT: - rValue = uno::makeAny( (sal_Bool)mpObj->IsResizeProtect() ); + rValue <<= static_cast( mpObj->IsResizeProtect() ); break; case OWN_ATTR_PAGE_NUMBER: diff --git a/xmloff/inc/xmlnmspe.hxx b/xmloff/inc/xmlnmspe.hxx index 49c484a1ab17..3b3f75cc08c8 100644 --- a/xmloff/inc/xmlnmspe.hxx +++ b/xmloff/inc/xmlnmspe.hxx @@ -87,8 +87,9 @@ const sal_uInt16 XML_NAMESPACE_##prefix##_EXT_IDX = key; XML_NAMESPACE_EXT( OFFICE, 37U ) XML_NAMESPACE_EXT( TABLE, 38U ) +XML_NAMESPACE_EXT( DRAW, 39U ) -#define _XML_OLD_NAMESPACE_BASE 39U +#define _XML_OLD_NAMESPACE_BASE 40U // namespaces used in the technical preview (SO 5.2) XML_OLD_NAMESPACE( FO, 0U ) diff --git a/xmloff/inc/xmloff/shapeexport.hxx b/xmloff/inc/xmloff/shapeexport.hxx index 1b30658ef89c..bb24951879de 100644 --- a/xmloff/inc/xmloff/shapeexport.hxx +++ b/xmloff/inc/xmloff/shapeexport.hxx @@ -189,6 +189,9 @@ private: SAL_DLLPRIVATE UniReference< SvXMLExportPropertyMapper > GetPropertySetMapper() const { return mxPropertySetMapper; } const rtl::OUString msZIndex; + const rtl::OUString msPrintable; + const rtl::OUString msVisible; + const rtl::OUString msEmptyPres; const rtl::OUString msModel; const rtl::OUString msStartShape; diff --git a/xmloff/inc/xmloff/xmltoken.hxx b/xmloff/inc/xmloff/xmltoken.hxx index 82dc69e59ee3..b12a533c2458 100644 --- a/xmloff/inc/xmloff/xmltoken.hxx +++ b/xmloff/inc/xmloff/xmltoken.hxx @@ -148,6 +148,9 @@ namespace xmloff { namespace token { XML_NP_TABLE_EXT, XML_N_TABLE_EXT, + XML_NP_DRAW_EXT, + XML_N_DRAW_EXT, + // units XML_UNIT_MM, XML_UNIT_M, @@ -2548,6 +2551,9 @@ namespace xmloff { namespace token { XML_DIMENSION, XML_VALIDATION_NAME, + XML_SCREEN, + XML_PRINTER, + // XForms tokens // already defined: XML_ACTION, XML_VERSION, XML_ENCODING, // XML_REPLACE, XML_SEPARATOR, XML_TYPE, XML_ID diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx index 2eaaeceb444e..e3a55c93a546 100644 --- a/xmloff/source/core/xmlexp.cxx +++ b/xmloff/source/core/xmlexp.cxx @@ -320,7 +320,7 @@ void SvXMLExport::_InitCtor() mpNamespaceMap->Add( GetXMLToken(XML_NP_OOOC), GetXMLToken(XML_N_OOOC), XML_NAMESPACE_OOOC ); mpNamespaceMap->Add( GetXMLToken(XML_NP_OF), GetXMLToken(XML_N_OF), XML_NAMESPACE_OF ); - if (getDefaultVersion() == SvtSaveOptions::ODFVER_LATEST) + if (getDefaultVersion() > SvtSaveOptions::ODFVER_012) { mpNamespaceMap->Add( GetXMLToken(XML_NP_TABLE_EXT), GetXMLToken(XML_N_TABLE_EXT), XML_NAMESPACE_TABLE_EXT); diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx index 6a7dcf496722..deeb0e0a20ec 100644 --- a/xmloff/source/core/xmlimp.cxx +++ b/xmloff/source/core/xmlimp.cxx @@ -100,6 +100,7 @@ sal_Char __READONLY_DATA sXML_np__text[] = "_text"; sal_Char __READONLY_DATA sXML_np__table[] = "_table"; sal_Char __READONLY_DATA sXML_np__table_ext[] = "_table_ooo"; sal_Char __READONLY_DATA sXML_np__draw[] = "_draw"; +sal_Char __READONLY_DATA sXML_np__draw_ext[] = "_draw_ooo"; sal_Char __READONLY_DATA sXML_np__dr3d[] = "_dr3d"; sal_Char __READONLY_DATA sXML_np__fo[] = "_fo"; sal_Char __READONLY_DATA sXML_np__xlink[] = "_xlink"; @@ -263,6 +264,9 @@ void SvXMLImport::_InitCtor() mpNamespaceMap->Add( OUString( RTL_CONSTASCII_USTRINGPARAM ( sXML_np__draw ) ), GetXMLToken(XML_N_DRAW), XML_NAMESPACE_DRAW ); + mpNamespaceMap->Add( OUString( RTL_CONSTASCII_USTRINGPARAM ( sXML_np__draw_ext ) ), + GetXMLToken(XML_N_DRAW_EXT), + XML_NAMESPACE_DRAW_EXT ); mpNamespaceMap->Add( OUString( RTL_CONSTASCII_USTRINGPARAM (sXML_np__dr3d ) ), GetXMLToken(XML_N_DR3D), XML_NAMESPACE_DR3D ); diff --git a/xmloff/source/core/xmltoken.cxx b/xmloff/source/core/xmltoken.cxx index 9b2fb9eea891..aa61f3408541 100644 --- a/xmloff/source/core/xmltoken.cxx +++ b/xmloff/source/core/xmltoken.cxx @@ -156,6 +156,9 @@ namespace xmloff { namespace token { TOKEN( "tableooo", XML_NP_TABLE_EXT ), TOKEN( "http://openoffice.org/2009/table", XML_N_TABLE_EXT ), + TOKEN( "drawooo", XML_NP_DRAW_EXT ), + TOKEN( "http://openoffice.org/2010/draw", XML_N_DRAW_EXT ), + // units TOKEN( "mm", XML_UNIT_MM ), TOKEN( "m", XML_UNIT_M ), @@ -2552,6 +2555,9 @@ namespace xmloff { namespace token { TOKEN( "dimension", XML_DIMENSION ), TOKEN( "validation-name", XML_VALIDATION_NAME ), + TOKEN( "screen", XML_SCREEN ), + TOKEN( "printer", XML_PRINTER ), + // XForms token TOKEN( "model", XML_MODEL ), TOKEN( "schema", XML_SCHEMA ), diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx index bc6f72abd2b0..849a3f884714 100644 --- a/xmloff/source/draw/sdxmlexp.cxx +++ b/xmloff/source/draw/sdxmlexp.cxx @@ -641,12 +641,17 @@ void SAL_CALL SdXMLExport::setSourceDocument( const Reference< lang::XComponent GetXMLToken(XML_N_ANIMATION), XML_NAMESPACE_ANIMATION); - if( getDefaultVersion() == SvtSaveOptions::ODFVER_LATEST ) + if( getDefaultVersion() > SvtSaveOptions::ODFVER_12 ) { _GetNamespaceMap().Add( GetXMLToken(XML_NP_OFFICE_EXT), GetXMLToken(XML_N_OFFICE_EXT), XML_NAMESPACE_OFFICE_EXT); + + _GetNamespaceMap().Add( + GetXMLToken(XML_NP_DRAW_EXT), + GetXMLToken(XML_N_DRAW_EXT), + XML_NAMESPACE_DRAW_EXT); } GetShapeExport()->enableLayerExport(); @@ -2806,7 +2811,7 @@ void SdXMLExport::collectAnnotationAutoStyles( const Reference& xDraw void SdXMLExport::exportAnnotations( const Reference& xDrawPage ) { // do not export in ODF 1.2 or older - if( getDefaultVersion() != SvtSaveOptions::ODFVER_LATEST ) + if( getDefaultVersion() <= SvtSaveOptions::ODFVER_012 ) return; Reference< XAnnotationAccess > xAnnotationAccess( xDrawPage, UNO_QUERY ); diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx index 709677c6ae07..7c01d533cfd8 100644 --- a/xmloff/source/draw/shapeexport.cxx +++ b/xmloff/source/draw/shapeexport.cxx @@ -79,6 +79,8 @@ XMLShapeExport::XMLShapeExport(SvXMLExport& rExp, // #88546# init to FALSE mbHandleProgressBar( sal_False ), msZIndex( RTL_CONSTASCII_USTRINGPARAM("ZOrder") ), + msPrintable( RTL_CONSTASCII_USTRINGPARAM("Pintable") ), + msVisible( RTL_CONSTASCII_USTRINGPARAM("Visible") ), msEmptyPres( RTL_CONSTASCII_USTRINGPARAM("IsEmptyPresentationObject") ), msModel( RTL_CONSTASCII_USTRINGPARAM("Model") ), msStartShape( RTL_CONSTASCII_USTRINGPARAM("StartShape") ), @@ -666,6 +668,35 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape } } + // export draw:display (do not export in ODF 1.2 or older) + if( xSet.is() && ( mrExport.getDefaultVersion() > SvtSaveOptions::ODFVER_012 ) ) + { + try + { + sal_Bool bVisible = sal_True; + sal_Bool bPrintable = sal_True; + + xSet->getPropertyValue(msVisible) >>= bVisible; + xSet->getPropertyValue(msPrintable) >>= bPrintable; + + XMLTokenEnum eDisplayToken = XML_TOKEN_INVALID; + switch( (bVisible << 1) | bPrintable ) + { + case 0: eDisplayToken = XML_NONE; break; + case 1: eDisplayToken = XML_PRINTER; break; + case 2: eDisplayToken = XML_SCREEN; break; + // case 3: eDisplayToken = XML_ALWAYS break; this is the default + } + + if( eDisplayToken != XML_TOKEN_INVALID ) + mrExport.AddAttribute(XML_NAMESPACE_DRAW_EXT, XML_DISPLAY, eDisplayToken ); + } + catch( uno::Exception& ) + { + DBG_ERROR( "XMLShapeExport::exportShape(), exception caught!" ); + } + } + // #82003# test export count // #91587# ALWAYS increment since now ALL to be exported shapes are counted. if(mrExport.GetShapeExport()->IsHandleProgressBarEnabled()) diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx index f4e7c1466ecd..14d73153f191 100644 --- a/xmloff/source/draw/ximpshap.cxx +++ b/xmloff/source/draw/ximpshap.cxx @@ -167,6 +167,8 @@ SdXMLShapeContext::SdXMLShapeContext( , mnZOrder(-1) , maSize(1, 1) , maPosition(0, 0) +, mbVisible(true) +, mbPrintable(true) { } @@ -429,6 +431,20 @@ void SdXMLShapeContext::AddShape(uno::Reference< drawing::XShape >& xShape) xMultiPropertyStates->setAllPropertiesToDefault(); } + if( !mbVisible || !mbPrintable ) try + { + uno::Reference< beans::XPropertySet > xSet( xShape, uno::UNO_QUERY_THROW ); + if( !mbVisible ) + xSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Visible" ) ), uno::Any( sal_False ) ); + + if( !mbPrintable ) + xSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Printable" ) ), uno::Any( sal_False ) ); + } + catch( Exception& ) + { + DBG_ERROR( "SdXMLShapeContext::AddShape(), exception caught!" ); + } + // #107848# if(!mbTemporaryShape && (!GetImport().HasTextImport() || !GetImport().GetTextImport()->IsInsideDeleteContext())) @@ -761,7 +777,7 @@ void SdXMLShapeContext::SetThumbnail() // this is called from the parent group for each unparsed attribute in the attribute list void SdXMLShapeContext::processAttribute( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::rtl::OUString& rValue ) { - if( XML_NAMESPACE_DRAW == nPrefix ) + if( (XML_NAMESPACE_DRAW == nPrefix) || (XML_NAMESPACE_DRAW_EXT == nPrefix) ) { if( IsXMLToken( rLocalName, XML_ZINDEX ) ) { @@ -791,6 +807,11 @@ void SdXMLShapeContext::processAttribute( sal_uInt16 nPrefix, const ::rtl::OUStr { mnTransform.SetString(rValue, GetImport().GetMM100UnitConverter()); } + else if( IsXMLToken( rLocalName, XML_DISPLAY ) ) + { + mbVisible = IsXMLToken( rValue, XML_ALWAYS ) || IsXMLToken( rValue, XML_SCREEN ); + mbPrintable = IsXMLToken( rValue, XML_ALWAYS ) || IsXMLToken( rValue, XML_PRINTER ); + } } else if( XML_NAMESPACE_PRESENTATION == nPrefix ) { diff --git a/xmloff/source/draw/ximpshap.hxx b/xmloff/source/draw/ximpshap.hxx index 18453a8936af..bf15534fc260 100644 --- a/xmloff/source/draw/ximpshap.hxx +++ b/xmloff/source/draw/ximpshap.hxx @@ -83,6 +83,9 @@ protected: com::sun::star::awt::Size maSize; com::sun::star::awt::Point maPosition; + bool mbVisible; + bool mbPrintable; + /** if bSupportsStyle is false, auto styles will be set but not a style */ void SetStyle( bool bSupportsStyle = true ); void SetLayer(); -- cgit v1.2.3 From a69e628c5cc5ae87502c188adb8634e52283957d Mon Sep 17 00:00:00 2001 From: Christian Lippka Date: Wed, 3 Mar 2010 11:15:55 +0100 Subject: fixed compile error --- xmloff/source/draw/sdxmlexp.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx index 849a3f884714..53a2f3cc4454 100644 --- a/xmloff/source/draw/sdxmlexp.cxx +++ b/xmloff/source/draw/sdxmlexp.cxx @@ -641,7 +641,7 @@ void SAL_CALL SdXMLExport::setSourceDocument( const Reference< lang::XComponent GetXMLToken(XML_N_ANIMATION), XML_NAMESPACE_ANIMATION); - if( getDefaultVersion() > SvtSaveOptions::ODFVER_12 ) + if( getDefaultVersion() > SvtSaveOptions::ODFVER_012 ) { _GetNamespaceMap().Add( GetXMLToken(XML_NP_OFFICE_EXT), -- cgit v1.2.3 From a91a2437bb2825f9cd9bfeb0febe5921278b9ace Mon Sep 17 00:00:00 2001 From: Christian Lippka Date: Thu, 4 Mar 2010 16:37:51 +0100 Subject: #i161701# fixing documentation issue --- offapi/com/sun/star/drawing/Shape.idl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/offapi/com/sun/star/drawing/Shape.idl b/offapi/com/sun/star/drawing/Shape.idl index ecc0556411b2..3bf1c6fa15cc 100644 --- a/offapi/com/sun/star/drawing/Shape.idl +++ b/offapi/com/sun/star/drawing/Shape.idl @@ -136,7 +136,8 @@ published service Shape //------------------------------------------------------------------------- /** If this is , the Shape is not visible - on screen outputs. + on screen outputs. Please note that the Shape may still + be visible when printed, see Printable. */ [optional, property] boolean Visible; -- cgit v1.2.3 From b7792cd554c3144c1cc2b06bb7ceb467bc771230 Mon Sep 17 00:00:00 2001 From: Christian Lippka Date: Thu, 4 Mar 2010 16:38:48 +0100 Subject: #i161701# fixing typo --- .../sdr/contact/viewobjectcontactofgroup.cxx | 69 ++++++++++++---------- svx/source/svdraw/svdobj.cxx | 2 +- xmloff/source/draw/sdxmlexp.cxx | 2 +- xmloff/source/draw/shapeexport.cxx | 8 ++- 4 files changed, 45 insertions(+), 36 deletions(-) diff --git a/svx/source/sdr/contact/viewobjectcontactofgroup.cxx b/svx/source/sdr/contact/viewobjectcontactofgroup.cxx index 7c17f0bb9144..0f7b69481d8d 100644 --- a/svx/source/sdr/contact/viewobjectcontactofgroup.cxx +++ b/svx/source/sdr/contact/viewobjectcontactofgroup.cxx @@ -71,51 +71,56 @@ namespace sdr drawinglayer::primitive2d::Primitive2DSequence ViewObjectContactOfGroup::getPrimitive2DSequenceHierarchy(DisplayInfo& rDisplayInfo) const { - const sal_uInt32 nSubHierarchyCount(GetViewContact().GetObjectCount()); + drawinglayer::primitive2d::Primitive2DSequence xRetval; - if(nSubHierarchyCount) + // check model-view visibility + if(isPrimitiveVisible(rDisplayInfo)) { - const sal_Bool bDoGhostedDisplaying( - GetObjectContact().DoVisualizeEnteredGroup() - && !GetObjectContact().isOutputToPrinter() - && GetObjectContact().getActiveViewContact() == &GetViewContact()); + const sal_uInt32 nSubHierarchyCount(GetViewContact().GetObjectCount()); - if(bDoGhostedDisplaying) + if(nSubHierarchyCount) { - rDisplayInfo.ClearGhostedDrawMode(); - } + const sal_Bool bDoGhostedDisplaying( + GetObjectContact().DoVisualizeEnteredGroup() + && !GetObjectContact().isOutputToPrinter() + && GetObjectContact().getActiveViewContact() == &GetViewContact()); - // create object hierarchy - drawinglayer::primitive2d::Primitive2DSequence xRetval(getPrimitive2DSequenceSubHierarchy(rDisplayInfo)); + if(bDoGhostedDisplaying) + { + rDisplayInfo.ClearGhostedDrawMode(); + } - if(xRetval.hasElements()) - { - // get ranges - const drawinglayer::geometry::ViewInformation2D& rViewInformation2D(GetObjectContact().getViewInformation2D()); - const ::basegfx::B2DRange aObjectRange(drawinglayer::primitive2d::getB2DRangeFromPrimitive2DSequence(xRetval, rViewInformation2D)); - const basegfx::B2DRange aViewRange(rViewInformation2D.getViewport()); + // create object hierarchy + xRetval = getPrimitive2DSequenceSubHierarchy(rDisplayInfo); - // check geometrical visibility - if(!aViewRange.isEmpty() && !aViewRange.overlaps(aObjectRange)) + if(xRetval.hasElements()) { - // not visible, release - xRetval.realloc(0); + // get ranges + const drawinglayer::geometry::ViewInformation2D& rViewInformation2D(GetObjectContact().getViewInformation2D()); + const ::basegfx::B2DRange aObjectRange(drawinglayer::primitive2d::getB2DRangeFromPrimitive2DSequence(xRetval, rViewInformation2D)); + const basegfx::B2DRange aViewRange(rViewInformation2D.getViewport()); + + // check geometrical visibility + if(!aViewRange.isEmpty() && !aViewRange.overlaps(aObjectRange)) + { + // not visible, release + xRetval.realloc(0); + } } - } - if(bDoGhostedDisplaying) + if(bDoGhostedDisplaying) + { + rDisplayInfo.SetGhostedDrawMode(); + } + } + else { - rDisplayInfo.SetGhostedDrawMode(); + // draw replacement object for group. This will use ViewContactOfGroup::createViewIndependentPrimitive2DSequence + // which creates the replacement primitives for an empty group + xRetval = ViewObjectContactOfSdrObj::getPrimitive2DSequenceHierarchy(rDisplayInfo); } - - return xRetval; - } - else - { - // draw replacement object for group. This will use ViewContactOfGroup::createViewIndependentPrimitive2DSequence - // which creates the replacement primitives for an empty group - return ViewObjectContactOfSdrObj::getPrimitive2DSequenceHierarchy(rDisplayInfo); } + return xRetval; } } // end of namespace contact } // end of namespace sdr diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx index 5ab5cb25f7a1..aafb929a8e81 100644 --- a/svx/source/svdraw/svdobj.cxx +++ b/svx/source/svdraw/svdobj.cxx @@ -2741,7 +2741,7 @@ void SdrObject::SetResizeProtect(sal_Bool bProt) void SdrObject::SetPrintable(sal_Bool bPrn) { - if( bPrn != bNoPrint ) + if( bPrn == bNoPrint ) { bNoPrint=!bPrn; SetChanged(); diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx index 849a3f884714..53a2f3cc4454 100644 --- a/xmloff/source/draw/sdxmlexp.cxx +++ b/xmloff/source/draw/sdxmlexp.cxx @@ -641,7 +641,7 @@ void SAL_CALL SdXMLExport::setSourceDocument( const Reference< lang::XComponent GetXMLToken(XML_N_ANIMATION), XML_NAMESPACE_ANIMATION); - if( getDefaultVersion() > SvtSaveOptions::ODFVER_12 ) + if( getDefaultVersion() > SvtSaveOptions::ODFVER_012 ) { _GetNamespaceMap().Add( GetXMLToken(XML_NP_OFFICE_EXT), diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx index 7c01d533cfd8..f76fc87f87e1 100644 --- a/xmloff/source/draw/shapeexport.cxx +++ b/xmloff/source/draw/shapeexport.cxx @@ -79,7 +79,7 @@ XMLShapeExport::XMLShapeExport(SvXMLExport& rExp, // #88546# init to FALSE mbHandleProgressBar( sal_False ), msZIndex( RTL_CONSTASCII_USTRINGPARAM("ZOrder") ), - msPrintable( RTL_CONSTASCII_USTRINGPARAM("Pintable") ), + msPrintable( RTL_CONSTASCII_USTRINGPARAM("Printable") ), msVisible( RTL_CONSTASCII_USTRINGPARAM("Visible") ), msEmptyPres( RTL_CONSTASCII_USTRINGPARAM("IsEmptyPresentationObject") ), msModel( RTL_CONSTASCII_USTRINGPARAM("Model") ), @@ -671,6 +671,9 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape // export draw:display (do not export in ODF 1.2 or older) if( xSet.is() && ( mrExport.getDefaultVersion() > SvtSaveOptions::ODFVER_012 ) ) { + if( aShapeInfo.meShapeType != XmlShapeTypeDrawPageShape && aShapeInfo.meShapeType != XmlShapeTypePresPageShape && + aShapeInfo.meShapeType != XmlShapeTypeHandoutShape ) + try { sal_Bool bVisible = sal_True; @@ -680,7 +683,8 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape xSet->getPropertyValue(msPrintable) >>= bPrintable; XMLTokenEnum eDisplayToken = XML_TOKEN_INVALID; - switch( (bVisible << 1) | bPrintable ) + const unsigned short nDisplay = (bVisible ? 2 : 0) | (bPrintable ? 1 : 0); + switch( nDisplay ) { case 0: eDisplayToken = XML_NONE; break; case 1: eDisplayToken = XML_PRINTER; break; -- cgit v1.2.3 From 4ecad8ef6c7643e2c076373535cfa0f1d8d7a5c1 Mon Sep 17 00:00:00 2001 From: sj Date: Mon, 15 Mar 2010 17:55:35 +0100 Subject: impressbi01: #161701# now importing hidden/printable shapes --- filter/source/msfilter/msdffimp.cxx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index 28e8696a89dd..9542ff1dfb5f 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -5415,6 +5415,13 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r pRet = ProcessObj( rSt, aObjData, pClientData, aTextRect, pRet); + if ( pRet ) + { + sal_Int32 nGroupProperties( GetPropertyValue( DFF_Prop_fPrint ) ); + pRet->SetVisible( ( nGroupProperties & 2 ) == 0 ); + pRet->SetPrintable( ( nGroupProperties & 1 ) != 0 ); + } + if ( mbTracing ) mpTracer->RemoveAttribute( aObjData.nSpFlags & SP_FGROUP ? rtl::OUString::createFromAscii( "GroupShape" ) -- cgit v1.2.3 From 981fef044e2ac483f0ba689913caf5f782da7b27 Mon Sep 17 00:00:00 2001 From: sj Date: Tue, 16 Mar 2010 10:20:44 +0100 Subject: impressbi01: #161701# PPT Export, now also exporting hidden/non printable shapes --- filter/inc/filter/msfilter/escherex.hxx | 1 + filter/source/msfilter/escherex.cxx | 26 ++++++++++++++++++++++++++ filter/source/msfilter/eschesdo.cxx | 2 ++ 3 files changed, 29 insertions(+) diff --git a/filter/inc/filter/msfilter/escherex.hxx b/filter/inc/filter/msfilter/escherex.hxx index 4f1381749a55..d75c9c6245eb 100644 --- a/filter/inc/filter/msfilter/escherex.hxx +++ b/filter/inc/filter/msfilter/escherex.hxx @@ -1196,6 +1196,7 @@ class MSFILTER_DLLPUBLIC EscherPropertyContainer void Commit( SvStream& rSt, sal_uInt16 nVersion = 3, sal_uInt16 nRecType = ESCHER_OPT ); + sal_Bool CreateShapeProperties( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & rXShape ); sal_Bool CreateOLEGraphicProperties( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & rXOleObject ); /** Creates a complex ESCHER_Prop_fillBlip containing the BLIP directly (for Excel charts). */ diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx index 10e1051eba2a..70d4271517e7 100644 --- a/filter/source/msfilter/escherex.cxx +++ b/filter/source/msfilter/escherex.cxx @@ -1101,6 +1101,32 @@ void EscherPropertyContainer::ImplCreateGraphicAttributes( const ::com::sun::sta } } +sal_Bool EscherPropertyContainer::CreateShapeProperties( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & rXShape ) +{ + uno::Reference< beans::XPropertySet > aXPropSet( rXShape, uno::UNO_QUERY ); + if ( aXPropSet.is() ) + { + sal_Bool bVal; + ::com::sun::star::uno::Any aAny; + sal_uInt32 nShapeAttr = 0; + EscherPropertyValueHelper::GetPropertyValue( aAny, aXPropSet, String( RTL_CONSTASCII_USTRINGPARAM( "Visible" ) ), sal_True ); + if ( aAny >>= bVal ) + { + if ( !bVal ) + nShapeAttr |= 0x20002; // set fHidden = true + } + EscherPropertyValueHelper::GetPropertyValue( aAny, aXPropSet, String( RTL_CONSTASCII_USTRINGPARAM( "Printable" ) ), sal_True ); + if ( aAny >>= bVal ) + { + if ( !bVal ) + nShapeAttr |= 0x10000; // set fPrint = false; + } + if ( nShapeAttr ) + AddOpt( ESCHER_Prop_fPrint, nShapeAttr ); + } + return sal_True; +} + sal_Bool EscherPropertyContainer::CreateOLEGraphicProperties( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & rXShape ) { diff --git a/filter/source/msfilter/eschesdo.cxx b/filter/source/msfilter/eschesdo.cxx index b72427d78571..e8e4b036f283 100644 --- a/filter/source/msfilter/eschesdo.cxx +++ b/filter/source/msfilter/eschesdo.cxx @@ -729,6 +729,7 @@ UINT32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj, if( rObj.GetAngle() ) ImplFlipBoundingBox( rObj, aPropOpt ); + aPropOpt.CreateShapeProperties( rObj.GetShapeRef() ); mpEscherEx->Commit( aPropOpt, rObj.GetRect() ); if( mpEscherEx->GetGroupLevel() > 1 ) mpEscherEx->AddChildAnchor( rObj.GetRect() ); @@ -826,6 +827,7 @@ void ImplEESdrWriter::ImplWriteAdditionalText( ImplEESdrObject& rObj, rObj.GetRect() ); } rObj.SetAngle( nAngle ); + aPropOpt.CreateShapeProperties( rObj.GetShapeRef() ); mpEscherEx->Commit( aPropOpt, rObj.GetRect() ); // write the childanchor -- cgit v1.2.3 From f5ad28b1e4a935ec5fec92353aa402eb28de63dc Mon Sep 17 00:00:00 2001 From: sj Date: Tue, 16 Mar 2010 10:20:44 +0100 Subject: impressbi01: #161701# PPT Export, now also exporting hidden/non printable shapes --- sd/source/filter/eppt/epptso.cxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx index cda15e75831d..f97bc92265f9 100644 --- a/sd/source/filter/eppt/epptso.cxx +++ b/sd/source/filter/eppt/epptso.cxx @@ -4155,6 +4155,7 @@ sal_Bool PPTWriter::ImplCreatePresentationPlaceholder( const sal_Bool bMasterPag ImplWriteTextStyleAtom( aClientTextBox, nStyleInstance, 0, NULL, aExtBu, &aPropOpt ); aPropOpt.CreateTextProperties( mXPropSet, mnTxId += 0x60, sal_False, sal_True ); + aPropOpt.CreateShapeProperties( mXShape ); aPropOpt.Commit( *mpStrm ); mpPptEscherEx->AddAtom( 8, ESCHER_ClientAnchor ); *mpStrm << (sal_Int16)maRect.Top() << (sal_Int16)maRect.Left() << (sal_Int16)maRect.Right() << (sal_Int16)maRect.Bottom(); // oben, links, rechts, unten ???? @@ -5400,6 +5401,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a maRect.Justify(); if ( mnAngle ) ImplFlipBoundingBox( aPropOpt ); + aPropOpt.CreateShapeProperties( mXShape ); aPropOpt.Commit( *mpStrm ); mpPptEscherEx->AddClientAnchor( maRect ); @@ -5469,6 +5471,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a SvMemoryStream aExtBu( 0x200, 0x200 ); ImplWriteTextStyleAtom( *pClientTextBox, EPP_TEXTTYPE_Other, 0, NULL, aExtBu, &aPropOpt ); + aPropOpt.CreateShapeProperties( mXShape ); aPropOpt.Commit( *mpStrm ); mpPptEscherEx->AddClientAnchor( maRect ); @@ -5646,6 +5649,7 @@ void PPTWriter::ImplCreateTable( uno::Reference< drawing::XShape >& rXShape, Esc aPropOpt.AddOpt( ESCHER_Prop_LockAgainstGrouping, 0x1000100 ); aPropOpt2.AddOpt( ESCHER_Prop_tableProperties, 1 ); aPropOpt2.AddOpt( ESCHER_Prop_tableRowProperties, sal_True, aMemStrm.Tell(), static_cast< sal_uInt8* >( const_cast< void* >( aMemStrm.GetData() ) ), aMemStrm.Tell() ); + aPropOpt.CreateShapeProperties( rXShape ); aPropOpt.Commit( *mpStrm ); aPropOpt2.Commit( *mpStrm, 3, ESCHER_UDefProp ); mpPptEscherEx->AddAtom( 8, ESCHER_ClientAnchor ); -- cgit v1.2.3 From e64a54ecd1fded745db18758bbe7e9934a89f8b2 Mon Sep 17 00:00:00 2001 From: sj Date: Tue, 16 Mar 2010 15:59:04 +0100 Subject: impressbi01: #161701# oox import of hidden shapes --- oox/inc/oox/drawingml/shape.hxx | 2 ++ oox/source/drawingml/shape.cxx | 8 ++++++++ oox/source/drawingml/shapecontext.cxx | 5 +++++ 3 files changed, 15 insertions(+) diff --git a/oox/inc/oox/drawingml/shape.hxx b/oox/inc/oox/drawingml/shape.hxx index b6c015f73938..821b2f04c44c 100644 --- a/oox/inc/oox/drawingml/shape.hxx +++ b/oox/inc/oox/drawingml/shape.hxx @@ -122,6 +122,7 @@ public: void setName( const rtl::OUString& rName ) { msName = rName; } ::rtl::OUString getName( ) { return msName; } void setId( const rtl::OUString& rId ) { msId = rId; } + void setHidden( sal_Bool bHidden ) { mbHidden = bHidden; } void setSubType( sal_uInt32 nSubType ) { mnSubType = nSubType; } sal_Int32 getSubType() const { return mnSubType; } void setIndex( sal_uInt32 nIndex ) { mnIndex = nIndex; } @@ -201,6 +202,7 @@ private: sal_Int32 mnRotation; sal_Bool mbFlipH; sal_Bool mbFlipV; + sal_Bool mbHidden; }; ::rtl::OUString GetShapeType( sal_Int32 nType ); diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx index 8bbfc820fca1..9673d2e4e139 100644 --- a/oox/source/drawingml/shape.cxx +++ b/oox/source/drawingml/shape.cxx @@ -93,6 +93,7 @@ Shape::Shape( const sal_Char* pServiceName ) , mnRotation( 0 ) , mbFlipH( false ) , mbFlipV( false ) +, mbHidden( false ) { if ( pServiceName ) msServiceName = OUString::createFromAscii( pServiceName ); @@ -178,6 +179,7 @@ void Shape::applyShapeReference( const Shape& rReferencedShape ) mnRotation = rReferencedShape.mnRotation; mbFlipH = rReferencedShape.mbFlipH; mbFlipV = rReferencedShape.mbFlipV; + mbHidden = rReferencedShape.mbHidden; } // for group shapes, the following method is also adding each child @@ -365,6 +367,12 @@ Reference< XShape > Shape::createAndInsert( } rxShapes->add( mxShape ); + if ( mbHidden ) + { + const OUString sHidden( CREATE_OUSTRING( "NumberingLevel" ) ); + xSet->setPropertyValue( sHidden, Any( mbHidden ) ); + } + // sj: removing default text of placeholder objects such as SlideNumberShape or HeaderShape if ( bClearText ) { diff --git a/oox/source/drawingml/shapecontext.cxx b/oox/source/drawingml/shapecontext.cxx index 4ee664b1c66c..00332d1be0e3 100644 --- a/oox/source/drawingml/shapecontext.cxx +++ b/oox/source/drawingml/shapecontext.cxx @@ -31,6 +31,7 @@ #include #include +#include "oox/helper/attributelist.hxx" #include "oox/drawingml/shapecontext.hxx" #include "oox/drawingml/shapestylecontext.hxx" #include "oox/core/namespaces.hxx" @@ -85,9 +86,13 @@ Reference< XFastContextHandler > ShapeContext::createFastChildContext( sal_Int32 // case XML_drElemPr: // break; case XML_cNvPr: + { + AttributeList aAttribs( xAttribs ); + mpShapePtr->setHidden( aAttribs.getBool( XML_hidden, false ) ); mpShapePtr->setId( xAttribs->getOptionalValue( XML_id ) ); mpShapePtr->setName( xAttribs->getOptionalValue( XML_name ) ); break; + } case XML_ph: mpShapePtr->setSubType( xAttribs->getOptionalValueToken( XML_type, XML_obj ) ); mpShapePtr->setIndex( xAttribs->getOptionalValue( XML_idx ).toInt32() ); -- cgit v1.2.3 From f5510bd3aad40b3e0f7b699ca2bbc60dc9a67fc3 Mon Sep 17 00:00:00 2001 From: "Ocke Janssen [oj]" Date: Mon, 22 Mar 2010 10:20:40 +0100 Subject: os141: allow tabstop also for treecontrols --- xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx | 2 ++ xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx | 3 +++ 2 files changed, 5 insertions(+) diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx index 55b46edc1392..f01040bb8510 100644 --- a/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx +++ b/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx @@ -653,6 +653,8 @@ void ElementDescriptor::readTreeControlModel( StyleBag * all_styles ) // collect elements readDefaults(); + readBoolAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("Tabstop") ), + OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":tabstop") ) ); readSelectionTypeAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("SelectionType") ), OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":selectiontype") ) ); diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx index e3bce073b0b1..a0968eb007d5 100644 --- a/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx +++ b/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx @@ -930,6 +930,9 @@ void TreeControlElement::endElement() } ctx.importDefaults( _nBasePosX, _nBasePosY, _xAttributes ); + ctx.importBooleanProperty( OUString( RTL_CONSTASCII_USTRINGPARAM("Tabstop") ), + OUString( RTL_CONSTASCII_USTRINGPARAM("tabstop") ), + _xAttributes ); ctx.importSelectionTypeProperty( OUString( RTL_CONSTASCII_USTRINGPARAM("SelectionType") ), OUString( RTL_CONSTASCII_USTRINGPARAM("selectiontype") ), _xAttributes ); -- cgit v1.2.3 From 97d660c190e87d2c8e1b0ccdfd106b30486219c3 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Tue, 25 May 2010 10:17:24 +0200 Subject: unoawt: completely separated the controller functionality of a wizard page from the wizard page itself, by moving the canAdvance method from OWizardPage to the IWizardPage interface, which in this course has been renamed to IWizardPageController. This will later on allow to have implementations where the TabPage is provided by an external component (e.g. as UNO Service), but the controlling of those pages is still intercepted and handled internally. --- desktop/source/migration/pages.cxx | 16 ++++++++-------- desktop/source/migration/pages.hxx | 8 ++++---- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/desktop/source/migration/pages.cxx b/desktop/source/migration/pages.cxx index 11cc61ed84ff..53ec488c2082 100644 --- a/desktop/source/migration/pages.cxx +++ b/desktop/source/migration/pages.cxx @@ -357,9 +357,9 @@ MigrationPage::MigrationPage( m_ftBody.SetText( aText ); } -sal_Bool MigrationPage::commitPage( CommitPageReason _eReason ) +sal_Bool MigrationPage::commitPage( svt::WizardTypes::CommitPageReason _eReason ) { - if (_eReason == eTravelForward && m_cbMigration.IsChecked() && !m_bMigrationDone) + if (_eReason == svt::WizardTypes::eTravelForward && m_cbMigration.IsChecked() && !m_bMigrationDone) { GetParent()->EnterWait(); FirstStartWizard* pWizard = dynamic_cast< FirstStartWizard* >( GetParent() ); @@ -433,7 +433,7 @@ UserPage::UserPage( svt::OWizardMachine* parent, const ResId& resid) } } -sal_Bool UserPage::commitPage( CommitPageReason ) +sal_Bool UserPage::commitPage( svt::WizardTypes::CommitPageReason ) { SvtUserOptions aUserOpt; aUserOpt.SetFirstName(m_edFirst.GetText()); @@ -463,9 +463,9 @@ UpdateCheckPage::UpdateCheckPage( svt::OWizardMachine* parent, const ResId& resi _setBold(m_ftHead); } -sal_Bool UpdateCheckPage::commitPage( CommitPageReason _eReason ) +sal_Bool UpdateCheckPage::commitPage( svt::WizardTypes::CommitPageReason _eReason ) { - if ( _eReason == eTravelForward ) + if ( _eReason == svt::WizardTypes::eTravelForward ) { try { Reference < XNameReplace > xUpdateAccess; @@ -589,9 +589,9 @@ void RegistrationPage::updateButtonStates() m_rbNever.Show( m_bNeverVisible ); } -sal_Bool RegistrationPage::commitPage( CommitPageReason _eReason ) +sal_Bool RegistrationPage::commitPage( svt::WizardTypes::CommitPageReason _eReason ) { - if ( _eReason == eFinish ) + if ( _eReason == svt::WizardTypes::eFinish ) { ::utl::RegOptions aOptions; rtl::OUString aEvent; @@ -665,7 +665,7 @@ void RegistrationPage::executeSingleMode() // the registration modes "Now" and "Later" are handled by the page RegistrationPage::RegistrationMode eMode = pPage->getRegistrationMode(); if ( eMode == RegistrationPage::rmNow || eMode == RegistrationPage::rmLater ) - pPage->commitPage( IWizardPage::eFinish ); + pPage->commitPage( WizardTypes::eFinish ); if ( eMode != RegistrationPage::rmLater ) ::utl::RegOptions().removeReminder(); } diff --git a/desktop/source/migration/pages.hxx b/desktop/source/migration/pages.hxx index 9740773fe602..776268eb475c 100644 --- a/desktop/source/migration/pages.hxx +++ b/desktop/source/migration/pages.hxx @@ -125,7 +125,7 @@ private: ::com::sun::star::uno::Reference< ::com::sun::star::awt::XThrobber > m_xThrobber; public: MigrationPage( svt::OWizardMachine* parent, const ResId& resid, ::com::sun::star::uno::Reference< ::com::sun::star::awt::XThrobber > xThrobber ); - virtual sal_Bool commitPage( CommitPageReason _eReason ); + virtual sal_Bool commitPage( svt::WizardTypes::CommitPageReason _eReason ); protected: virtual void ActivatePage(); @@ -148,7 +148,7 @@ private: public: UserPage( svt::OWizardMachine* parent, const ResId& resid); - virtual sal_Bool commitPage( CommitPageReason _eReason ); + virtual sal_Bool commitPage( svt::WizardTypes::CommitPageReason _eReason ); protected: virtual void ActivatePage(); }; @@ -161,7 +161,7 @@ private: CheckBox m_cbUpdateCheck; public: UpdateCheckPage( svt::OWizardMachine* parent, const ResId& resid); - virtual sal_Bool commitPage( CommitPageReason _eReason ); + virtual sal_Bool commitPage( svt::WizardTypes::CommitPageReason _eReason ); protected: virtual void ActivatePage(); @@ -188,7 +188,7 @@ protected: virtual bool canAdvance() const; virtual void ActivatePage(); - virtual sal_Bool commitPage( CommitPageReason _eReason ); + virtual sal_Bool commitPage( svt::WizardTypes::CommitPageReason _eReason ); public: RegistrationPage( Window* parent, const ResId& resid); -- cgit v1.2.3 From 3cba76a2125eaa40e5b9fce061713190ec0469d3 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Tue, 25 May 2010 11:43:39 +0200 Subject: unoawt: onFinish does not need this parameter, it's always called with RET_OK --- desktop/source/migration/wizard.cxx | 4 ++-- desktop/source/migration/wizard.hxx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/desktop/source/migration/wizard.cxx b/desktop/source/migration/wizard.cxx index 48ee2abc71ca..0bd60f0f1454 100644 --- a/desktop/source/migration/wizard.cxx +++ b/desktop/source/migration/wizard.cxx @@ -439,10 +439,10 @@ sal_Bool FirstStartWizard::leaveState(WizardState) return sal_True; } -sal_Bool FirstStartWizard::onFinish(sal_Int32 _nResult) +sal_Bool FirstStartWizard::onFinish() { // return sal_True; - if (svt::RoadmapWizard::onFinish(_nResult)) + if ( svt::RoadmapWizard::onFinish() ) { #ifndef OS2 // cannot enable quickstart on first startup, see shutdownicon.cxx comments. enableQuickstart(); diff --git a/desktop/source/migration/wizard.hxx b/desktop/source/migration/wizard.hxx index e41bfe373cde..7919cc1c58a0 100644 --- a/desktop/source/migration/wizard.hxx +++ b/desktop/source/migration/wizard.hxx @@ -97,7 +97,7 @@ protected: virtual TabPage* createPage(WizardState _nState); virtual sal_Bool prepareLeaveCurrentState( CommitPageReason _eReason ); virtual sal_Bool leaveState(WizardState _nState ); - virtual sal_Bool onFinish(sal_Int32 _nResult); + virtual sal_Bool onFinish(); virtual void enterState(WizardState _nState); // from svt::RoadmapWizard -- cgit v1.2.3 From f931a012e6d488689893a530a4187738f6db0323 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Tue, 25 May 2010 15:06:56 +0200 Subject: unoawt: don't let undeclared exceptions escape from createDialogImpl (at least not from calling createDialogModelForBasic/createDialogModel) --- scripting/source/dlgprov/dlgprov.cxx | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/scripting/source/dlgprov/dlgprov.cxx b/scripting/source/dlgprov/dlgprov.cxx index c372e1f660af..aa6c6cfb966a 100644 --- a/scripting/source/dlgprov/dlgprov.cxx +++ b/scripting/source/dlgprov/dlgprov.cxx @@ -28,26 +28,22 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_scripting.hxx" -#ifndef SCRIPTING_DLGPROV_HXX #include "dlgprov.hxx" -#endif #include "dlgevtatt.hxx" #include #include -#ifndef _COM_SUN_STAR_IO_XINPUTSTREAMPROVIDER_HXX_ #include -#endif #include +#include #include -#ifndef _CPPUHELPER_IMPLEMENTATIONENTRY_HXX_ #include -#endif +#include #include #include #include #include #include -#include "com/sun/star/resource/XStringResourceWithLocation.hpp" +#include #include #include #include @@ -691,13 +687,22 @@ static ::rtl::OUString aResourceResolverPropName = ::rtl::OUString::createFromAs //Reference< XDialog > xDialog; Reference< XControl > xCtrl; Reference< XControlModel > xCtrlMod; - // add support for basic RTL_FUNCTION - if ( m_BasicInfo.get() ) - xCtrlMod = createDialogModelForBasic(); - else + try + { + // add support for basic RTL_FUNCTION + if ( m_BasicInfo.get() ) + xCtrlMod = createDialogModelForBasic(); + else + { + OSL_ENSURE( URL.getLength(), "DialogProviderImpl::getDialog: no URL!" ); + xCtrlMod = createDialogModel( URL ); + } + } + catch ( const RuntimeException& ) { throw; } + catch ( const Exception& ) { - OSL_ENSURE( URL.getLength(), "DialogProviderImpl::getDialog: no URL!" ); - xCtrlMod = createDialogModel( URL ); + const Any aError( ::cppu::getCaughtException() ); + throw WrappedTargetRuntimeException( ::rtl::OUString(), *this, aError ); } if ( xCtrlMod.is() ) { -- cgit v1.2.3 From ee4b7a5e46e5db850f77adfa42c0137accb65e98 Mon Sep 17 00:00:00 2001 From: sb Date: Wed, 24 Mar 2010 09:48:47 +0100 Subject: sb121: #i110258# when parsing .xcs, conservatively merge new templates/components into existing instances (to not let extension update fail) --- configmgr/source/xcsparser.cxx | 87 ++++++++++++++++++++++++++++++++++++++---- 1 file changed, 79 insertions(+), 8 deletions(-) diff --git a/configmgr/source/xcsparser.cxx b/configmgr/source/xcsparser.cxx index 15141844a276..4de9973594c1 100644 --- a/configmgr/source/xcsparser.cxx +++ b/configmgr/source/xcsparser.cxx @@ -60,6 +60,63 @@ namespace { namespace css = com::sun::star; +// Conservatively merge a template or component (and its recursive parts) into +// an existing instance: +void merge( + rtl::Reference< Node > const & original, + rtl::Reference< Node > const & update) +{ + OSL_ASSERT( + original.is() && update.is() && original->kind() == update->kind() && + update->getFinalized() == Data::NO_LAYER); + if (update->getLayer() >= original->getLayer() && + update->getLayer() <= original->getFinalized()) + { + switch (original->kind()) { + case Node::KIND_PROPERTY: + case Node::KIND_LOCALIZED_PROPERTY: + case Node::KIND_LOCALIZED_VALUE: + break; //TODO: merge certain parts? + case Node::KIND_GROUP: + if (dynamic_cast< GroupNode * >(original.get())->isExtensible()) { + for (NodeMap::iterator i2(update->getMembers().begin()); + i2 != update->getMembers().end(); ++i2) + { + NodeMap::iterator i1( + original->getMembers().find(i2->first)); + if (i1 == original->getMembers().end()) { + if (i2->second->kind() == Node::KIND_PROPERTY) { + original->getMembers().insert(*i2); + } + } else if (i2->second->kind() == i1->second->kind()) { + merge(i1->second, i2->second); + } + } + } + break; + case Node::KIND_SET: + for (NodeMap::iterator i2(update->getMembers().begin()); + i2 != update->getMembers().end(); ++i2) + { + NodeMap::iterator i1(original->getMembers().find(i2->first)); + if (i1 == original->getMembers().end()) { + if (dynamic_cast< SetNode * >(original.get())-> + isValidTemplate(i2->second->getTemplateName())) + { + original->getMembers().insert(*i2); + } + } else if (i2->second->kind() == i1->second->kind() && + (i2->second->getTemplateName() == + i1->second->getTemplateName())) + { + merge(i1->second, i2->second); + } + } + break; + } + } +} + } XcsParser::XcsParser(int layer, Data * data): @@ -218,15 +275,30 @@ void XcsParser::endElement(XmlReader const & reader) { Element top(elements_.top()); elements_.pop(); if (top.node.is()) { - NodeMap * map; if (elements_.empty()) { switch (state_) { case STATE_TEMPLATES: - map = &data_->templates; + { + NodeMap::iterator i(data_->templates.find(top.name)); + if (i == data_->templates.end()) { + data_->templates.insert( + NodeMap::value_type(top.name, top.node)); + } else { + merge(i->second, top.node); + } + } break; case STATE_COMPONENT: - map = &data_->components; - state_ = STATE_COMPONENT_DONE; + { + NodeMap::iterator i(data_->components.find(top.name)); + if (i == data_->components.end()) { + data_->components.insert( + NodeMap::value_type(top.name, top.node)); + } else { + merge(i->second, top.node); + } + state_ = STATE_COMPONENT_DONE; + } break; default: OSL_ASSERT(false); @@ -235,10 +307,9 @@ void XcsParser::endElement(XmlReader const & reader) { RTL_CONSTASCII_USTRINGPARAM("this cannot happen")), css::uno::Reference< css::uno::XInterface >()); } - } else { - map = &elements_.top().node->getMembers(); - } - if (!map->insert(NodeMap::value_type(top.name, top.node)).second) { + } else if (!elements_.top().node->getMembers().insert( + NodeMap::value_type(top.name, top.node)).second) + { throw css::uno::RuntimeException( (rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("duplicate ")) + top.name + -- cgit v1.2.3 From 2f528025b20854cf918d95f6781b5e2052ddf929 Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Thu, 25 Mar 2010 17:19:23 +0100 Subject: cws l10ntooling18: #i109622# try to auto fix bad quote --- l10ntools/inc/export.hxx | 2 ++ l10ntools/source/export.cxx | 12 ++++++------ l10ntools/source/merge.cxx | 16 ++++++++++++++++ 3 files changed, 24 insertions(+), 6 deletions(-) diff --git a/l10ntools/inc/export.hxx b/l10ntools/inc/export.hxx index 13fad506b54d..d1474503882f 100644 --- a/l10ntools/inc/export.hxx +++ b/l10ntools/inc/export.hxx @@ -461,6 +461,8 @@ public: bTitleFirst[ nId ] = true; } BOOL GetText( ByteString &rReturn, USHORT nTyp, const ByteString &nLangIndex, BOOL bDel = FALSE ); + BOOL GetTransex3Text( ByteString &rReturn, USHORT nTyp, const ByteString &nLangIndex, BOOL bDel = FALSE ); + }; // diff --git a/l10ntools/source/export.cxx b/l10ntools/source/export.cxx index a3df11c2920b..59f29525eda4 100644 --- a/l10ntools/source/export.cxx +++ b/l10ntools/source/export.cxx @@ -2096,7 +2096,7 @@ BOOL Export::PrepareTextToMerge( ByteString &rText, USHORT nTyp, } ByteString sContent; - pEntrys->GetText( sContent, nTyp, nLangIndex ); + pEntrys->GetTransex3Text( sContent, nTyp, nLangIndex ); //if ( !sContent.Len() && ( ! nLangIndex.EqualsIgnoreCaseAscii("en-US") )) { if ( !sContent.Len() && ( ! Export::isSourceLanguage( nLangIndex ) )) { rText = sOrigText; @@ -2158,7 +2158,7 @@ void Export::MergeRest( ResData *pResData, USHORT nMode ) sCur = aLanguages[ n ]; ByteString sText; - BOOL bText = pEntry->GetText( sText, STRING_TYP_TEXT, sCur , TRUE ); + BOOL bText = pEntry->GetTransex3Text( sText, STRING_TYP_TEXT, sCur , TRUE ); if ( bText && sText.Len() && sText != "-" ) { ByteString sOutput; if ( bNextMustBeDefineEOL) { @@ -2211,7 +2211,7 @@ void Export::MergeRest( ResData *pResData, USHORT nMode ) sCur = aLanguages[ n ]; ByteString sText; - BOOL bText = pEntry->GetText( sText, STRING_TYP_QUICKHELPTEXT, sCur, TRUE ); + BOOL bText = pEntry->GetTransex3Text( sText, STRING_TYP_QUICKHELPTEXT, sCur, TRUE ); if ( bText && sText.Len() && sText != "-" ) { ByteString sOutput; if ( bNextMustBeDefineEOL) { @@ -2258,7 +2258,7 @@ void Export::MergeRest( ResData *pResData, USHORT nMode ) sCur = aLanguages[ n ]; ByteString sText; - BOOL bText = pEntry->GetText( sText, STRING_TYP_TITLE, sCur, TRUE ); + BOOL bText = pEntry->GetTransex3Text( sText, STRING_TYP_TITLE, sCur, TRUE ); if ( bText && sText.Len() && sText != "-" ) { ByteString sOutput; if ( bNextMustBeDefineEOL) { @@ -2343,9 +2343,9 @@ void Export::MergeRest( ResData *pResData, USHORT nMode ) //printf("Lang %s, List Index %d\n",sCur.GetBuffer(),(int)nLIndex); ByteString sText; BOOL bText; - bText = pEntrys->GetText( sText, STRING_TYP_TEXT, sCur, TRUE ); + bText = pEntrys->GetTransex3Text( sText, STRING_TYP_TEXT, sCur, TRUE ); if( !bText ) - bText = pEntrys->GetText( sText , STRING_TYP_TEXT, SOURCE_LANGUAGE , FALSE ); + bText = pEntrys->GetTransex3Text( sText , STRING_TYP_TEXT, SOURCE_LANGUAGE , FALSE ); // Use fallback, if data is missing in sdf file //if( !bText && pResData->sResTyp.Equals( "pairedlist" ) ){ diff --git a/l10ntools/source/merge.cxx b/l10ntools/source/merge.cxx index 3284b7026107..ace119da106c 100644 --- a/l10ntools/source/merge.cxx +++ b/l10ntools/source/merge.cxx @@ -50,6 +50,22 @@ ByteString PFormEntrys::Dump(){ return sRet; } +BOOL PFormEntrys::GetTransex3Text( ByteString &rReturn, + USHORT nTyp, const ByteString &nLangIndex, BOOL bDel ) +{ + BOOL rc = GetText( rReturn , nTyp , nLangIndex , bDel ); + ByteString test( rReturn ); + for( int idx = 0; idx < rReturn.Len(); idx++ ) + { + if( rReturn.GetChar( idx ) == '\"' && ( idx-1 > 0 ) && rReturn.GetChar( idx-1 ) == '\\' ) + { + rReturn.Erase( idx-1 , 1 ); + } + } + //if( !rReturn.Equals( test ) ) + // printf("*CHANGED******************\n%s\n%s\n",test.GetBuffer(),rReturn.GetBuffer()); + return rc; +} /*****************************************************************************/ BOOL PFormEntrys::GetText( ByteString &rReturn, USHORT nTyp, const ByteString &nLangIndex, BOOL bDel ) -- cgit v1.2.3 From d7c43c9580a226008261e2b2f80a3f5c923a388c Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Thu, 25 Mar 2010 17:21:13 +0100 Subject: cws l10ntooling18: #i110394# Introduce the variable %OOOVENDOR --- desktop/source/app/app.cxx | 17 +++++++++++++++++ desktop/source/deployment/gui/dp_gui_service.cxx | 9 +++++++++ officecfg/registry/data/org/openoffice/Setup.xcu | 4 ++++ officecfg/registry/schema/org/openoffice/Setup.xcs | 10 +++++++++- svx/source/intro/makefile.mk | 4 ++++ svx/source/intro/ooo.src | 2 +- 6 files changed, 44 insertions(+), 2 deletions(-) diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index 53778534c750..cf48ede8cd8a 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -359,6 +359,8 @@ namespace : public rtl::Static< String, Version > {}; struct AboutBoxVersion : public rtl::Static< String, AboutBoxVersion > {}; + struct OOOVendor + : public rtl::Static< String, OOOVendor > {}; struct Extension : public rtl::Static< String, Extension > {}; struct XMLFileFormatName @@ -422,6 +424,21 @@ void ReplaceStringHookProc( UniString& rStr ) rStr.SearchAndReplaceAllAscii( "%PRODUCTXMLFILEFORMATNAME", rXMLFileFormatName ); rStr.SearchAndReplaceAllAscii( "%PRODUCTXMLFILEFORMATVERSION", rXMLFileFormatVersion ); } + if ( rStr.SearchAscii( "%OOOVENDOR" ) != STRING_NOTFOUND ) + { + String &rOOOVendor = OOOVendor::get(); + + if ( !rOOOVendor.Len() ) + { + rtl::OUString aTmp; + Any aRet = ::utl::ConfigManager::GetDirectConfigProperty( + ::utl::ConfigManager::OOOVENDOR ); + aRet >>= aTmp; + rOOOVendor = aTmp; + + } + rStr.SearchAndReplaceAllAscii( "%OOOVENDOR" ,rOOOVendor ); + } if ( rStr.SearchAscii( "%WRITERCOMPATIBILITYVERSIONOOO11" ) != STRING_NOTFOUND ) { diff --git a/desktop/source/deployment/gui/dp_gui_service.cxx b/desktop/source/deployment/gui/dp_gui_service.cxx index 061988d5b04d..a6d3ee21c698 100644 --- a/desktop/source/deployment/gui/dp_gui_service.cxx +++ b/desktop/source/deployment/gui/dp_gui_service.cxx @@ -92,6 +92,8 @@ namespace : public rtl::Static< String, Version > {}; struct AboutBoxVersion : public rtl::Static< String, AboutBoxVersion > {}; + struct OOOVendor + : public rtl::Static< String, OOOVendor > {}; struct Extension : public rtl::Static< String, Extension > {}; } @@ -107,6 +109,7 @@ void ReplaceProductNameHookProc( String& rStr ) String &rVersion = Version::get(); String &rAboutBoxVersion = AboutBoxVersion::get(); String &rExtension = Extension::get(); + String &rOOOVendor = OOOVendor::get(); if ( !rProductName.Len() ) { @@ -121,8 +124,13 @@ void ReplaceProductNameHookProc( String& rStr ) aRet = ::utl::ConfigManager::GetDirectConfigProperty( ::utl::ConfigManager::ABOUTBOXPRODUCTVERSION ); aRet >>= aTmp; + rOOOVendor = aTmp; + + aRet = ::utl::ConfigManager::GetDirectConfigProperty( ::utl::ConfigManager::OOOVENDOR ); + aRet >>= aTmp; rAboutBoxVersion = aTmp; + if ( !rExtension.Len() ) { aRet = ::utl::ConfigManager::GetDirectConfigProperty( ::utl::ConfigManager::PRODUCTEXTENSION ); @@ -135,6 +143,7 @@ void ReplaceProductNameHookProc( String& rStr ) rStr.SearchAndReplaceAllAscii( "%PRODUCTNAME", rProductName ); rStr.SearchAndReplaceAllAscii( "%PRODUCTVERSION", rVersion ); rStr.SearchAndReplaceAllAscii( "%ABOUTBOXPRODUCTVERSION", rAboutBoxVersion ); + rStr.SearchAndReplaceAllAscii( "%OOOVENDOR", rOOOVendor ); rStr.SearchAndReplaceAllAscii( "%PRODUCTEXTENSION", rExtension ); } } diff --git a/officecfg/registry/data/org/openoffice/Setup.xcu b/officecfg/registry/data/org/openoffice/Setup.xcu index 4acf93dee764..feb0477503ab 100644 --- a/officecfg/registry/data/org/openoffice/Setup.xcu +++ b/officecfg/registry/data/org/openoffice/Setup.xcu @@ -37,6 +37,10 @@ ${ABOUTBOXPRODUCTVERSION} + + ${OOOVENDOR} + + ${PRODUCTEXTENSION} diff --git a/officecfg/registry/schema/org/openoffice/Setup.xcs b/officecfg/registry/schema/org/openoffice/Setup.xcs index 9e5551bda18a..2b21de7afe47 100644 --- a/officecfg/registry/schema/org/openoffice/Setup.xcs +++ b/officecfg/registry/schema/org/openoffice/Setup.xcs @@ -241,7 +241,15 @@ - + + + IHI + Specifies the vendor who build the product. + + + + + Specifies the version number that appears on the user interface. diff --git a/svx/source/intro/makefile.mk b/svx/source/intro/makefile.mk index 3ed86b3bcda3..9399514c3631 100644 --- a/svx/source/intro/makefile.mk +++ b/svx/source/intro/makefile.mk @@ -40,6 +40,10 @@ RSCLOCINC!:=$(RSCLOCINC);$(PRJ)$/RES OOO_VENDOR*=$(USER)$(USERNAME) RSCDEFS+=-DOOO_VENDOR="$(OOO_VENDOR)" +.IF "x$(OOO_VENDOR)x" == "xx" +.EXPORT : OOO_VENDOR +.ENDIF + # --- Allgemein ----------------------------------------------------------- LOCALIZE_ME=intro_tmpl.hrc diff --git a/svx/source/intro/ooo.src b/svx/source/intro/ooo.src index 6c52a054e3ce..f638120a507d 100644 --- a/svx/source/intro/ooo.src +++ b/svx/source/intro/ooo.src @@ -86,7 +86,7 @@ ModalDialog RID_DEFAULTABOUT { Pos = MAP_APPFONT ( 54 , 25 ) ; Size = MAP_APPFONT ( 168 , 51 ) ; - Text[ en-US ] ="Copyright 2000-2009 Sun Microsystems Inc.\nThis product was created by " OOO_VENDOR ", based on OpenOffice.org.\nOpenOffice.org acknowledges all community members, especially those mentioned at http://www.openoffice.org/welcome/credits.html."; + Text[ en-US ] ="Copyright 2000-2009 Sun Microsystems Inc.\nThis product was created by %OOOVENDOR, based on OpenOffice.org.\nOpenOffice.org acknowledges all community members, especially those mentioned at http://www.openoffice.org/welcome/credits.html."; WordBreak = TRUE ; }; StringArray ABOUT_STR_DEVELOPER_ARY -- cgit v1.2.3 From a687f59eac4ad98a4b60a4b3add78f33e4dd9166 Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Thu, 25 Mar 2010 17:21:13 +0100 Subject: cws l10ntooling18: #i110394# Introduce the variable %OOOVENDOR --- unotools/inc/unotools/configmgr.hxx | 3 ++- unotools/source/config/configmgr.cxx | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/unotools/inc/unotools/configmgr.hxx b/unotools/inc/unotools/configmgr.hxx index 82af190aab4f..c26ff5245739 100644 --- a/unotools/inc/unotools/configmgr.hxx +++ b/unotools/inc/unotools/configmgr.hxx @@ -99,7 +99,8 @@ namespace utl PRODUCTXMLFILEFORMATVERSION, WRITERCOMPATIBILITYVERSIONOOO11, OPENSOURCECONTEXT, - ABOUTBOXPRODUCTVERSION + ABOUTBOXPRODUCTVERSION, + OOOVENDOR }; //direct readonly access to some special configuration elements static com::sun::star::uno::Any GetDirectConfigProperty(ConfigProperty eProp); diff --git a/unotools/source/config/configmgr.cxx b/unotools/source/config/configmgr.cxx index 5f16733b5249..0df6d49afe59 100644 --- a/unotools/source/config/configmgr.cxx +++ b/unotools/source/config/configmgr.cxx @@ -70,6 +70,8 @@ namespace : public rtl::Static< ::rtl::OUString, ProductVersion > {}; struct AboutBoxProductVersion : public rtl::Static< ::rtl::OUString, AboutBoxProductVersion > {}; + struct OOOVendor + : public rtl::Static< ::rtl::OUString, OOOVendor > {}; struct ProductExtension : public rtl::Static< ::rtl::OUString, ProductExtension > {}; struct XMLFileFormatName @@ -433,6 +435,14 @@ Any ConfigManager::GetDirectConfigProperty(ConfigProperty eProp) return aRet; } + rtl::OUString &rOOOVendor = OOOVendor::get(); + if ( eProp == OOOVENDOR && rOOOVendor.getLength() ) + { + aRet <<= rOOOVendor; + return aRet; + } + + rtl::OUString &rProductExtension = ProductExtension::get(); if ( eProp == PRODUCTEXTENSION && rProductExtension.getLength() ) { @@ -493,6 +503,7 @@ Any ConfigManager::GetDirectConfigProperty(ConfigProperty eProp) case PRODUCTXMLFILEFORMATNAME : case PRODUCTXMLFILEFORMATVERSION: case OPENSOURCECONTEXT: + case OOOVENDOR: case ABOUTBOXPRODUCTVERSION: sPath += C2U("Setup/Product"); break; case DEFAULTCURRENCY: sPath += C2U("Setup/L10N"); break; @@ -526,6 +537,7 @@ Any ConfigManager::GetDirectConfigProperty(ConfigProperty eProp) case PRODUCTNAME: sProperty = C2U("ooName"); break; case PRODUCTVERSION: sProperty = C2U("ooSetupVersion"); break; case ABOUTBOXPRODUCTVERSION: sProperty = C2U("ooSetupVersionAboutBox"); break; + case OOOVENDOR: sProperty = C2U("ooVendor"); break; case PRODUCTEXTENSION: sProperty = C2U("ooSetupExtension"); break; case PRODUCTXMLFILEFORMATNAME: sProperty = C2U("ooXMLFileFormatName"); break; case PRODUCTXMLFILEFORMATVERSION: sProperty = C2U("ooXMLFileFormatVersion"); break; @@ -565,6 +577,9 @@ Any ConfigManager::GetDirectConfigProperty(ConfigProperty eProp) if ( eProp == PRODUCTVERSION ) aRet >>= rProductVersion; + if( eProp == OOOVENDOR ) + aRet >>= rOOOVendor; + if ( eProp == ABOUTBOXPRODUCTVERSION ) { aRet >>= rAboutBoxProductVersion; -- cgit v1.2.3 From 6e426f63ceb971976d107b9d1be27d5065a634f5 Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Thu, 25 Mar 2010 17:21:13 +0100 Subject: cws l10ntooling18: #i110394# Introduce the variable %OOOVENDOR --- instsetoo_native/util/openoffice.lst | 1 + solenv/bin/make_installer.pl | 4 ++++ solenv/bin/modules/installer/ziplist.pm | 10 ++++++++++ 3 files changed, 15 insertions(+) diff --git a/instsetoo_native/util/openoffice.lst b/instsetoo_native/util/openoffice.lst index 7897327d8de8..f57bc5be44d1 100644 --- a/instsetoo_native/util/openoffice.lst +++ b/instsetoo_native/util/openoffice.lst @@ -36,6 +36,7 @@ Globals UPDATE_DATABASE_LISTNAME finals_instsetoo.txt PACKAGEMAP package_names.txt,package_names_ext.txt WINDOWSPATCHLEVEL 6 + OOOVENDOR Oracle } } } diff --git a/solenv/bin/make_installer.pl b/solenv/bin/make_installer.pl index a2f552eceb8d..97fda043202d 100644 --- a/solenv/bin/make_installer.pl +++ b/solenv/bin/make_installer.pl @@ -257,6 +257,10 @@ if ( $installer::globals::globallogging ) { installer::files::save_hash($logging installer::ziplist::add_variables_to_allvariableshashref($allvariableshashref); if ( $installer::globals::globallogging ) { installer::files::save_hash($loggingdir . "allvariables3b.log", $allvariableshashref); } +installer::ziplist::overwrite_ooovendor( $allvariableshashref ); +if ( $installer::globals::globallogging ) { installer::files::save_hash($loggingdir . "allvariables3c.log", $allvariableshashref); } + + ######################################################## # Check if this is simple packaging mechanism ######################################################## diff --git a/solenv/bin/modules/installer/ziplist.pm b/solenv/bin/modules/installer/ziplist.pm index a434163b0dd9..baa2ef3060e0 100644 --- a/solenv/bin/modules/installer/ziplist.pm +++ b/solenv/bin/modules/installer/ziplist.pm @@ -752,6 +752,16 @@ sub replace_variables_in_ziplist_variables } } +########################################################### +# Overwrite the vendor string in openoffice.lst that is defined in configure +########################################################### + +sub overwrite_ooovendor +{ + my ($variableshashref) = @_; + $variableshashref->{'OOOVENDOR'} = $ENV{'OOO_VENDOR'} , if( defined $ENV{'OOO_VENDOR'} && $ENV{'OOO_VENDOR'} ne "" ); +} + ########################################################### # Adding the lowercase variables into the variableshashref ########################################################### -- cgit v1.2.3 From 78d5c55e026562260b0ed0b46d656e11dfbe40fa Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Thu, 25 Mar 2010 17:28:17 +0100 Subject: cws l10ntooling18: #i110394# OOO_VENDOR is no longer merged by rsc but by config --- svx/source/intro/makefile.mk | 8 -------- 1 file changed, 8 deletions(-) diff --git a/svx/source/intro/makefile.mk b/svx/source/intro/makefile.mk index 9399514c3631..4d0686baac04 100644 --- a/svx/source/intro/makefile.mk +++ b/svx/source/intro/makefile.mk @@ -36,14 +36,6 @@ TARGET=intro RSCLOCINC!:=$(RSCLOCINC);$(PRJ)$/RES -# setting the compiled by $user$ string in the About box -OOO_VENDOR*=$(USER)$(USERNAME) -RSCDEFS+=-DOOO_VENDOR="$(OOO_VENDOR)" - -.IF "x$(OOO_VENDOR)x" == "xx" -.EXPORT : OOO_VENDOR -.ENDIF - # --- Allgemein ----------------------------------------------------------- LOCALIZE_ME=intro_tmpl.hrc -- cgit v1.2.3 From aae2c038fad7eaeda79b1d77840cbbecb99f268b Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Thu, 25 Mar 2010 18:16:13 +0100 Subject: vcl111: #i92094# use current event for GetPointerState --- vcl/aqua/source/window/salframe.cxx | 95 ++++++++++++++++++++++++++----------- 1 file changed, 68 insertions(+), 27 deletions(-) diff --git a/vcl/aqua/source/window/salframe.cxx b/vcl/aqua/source/window/salframe.cxx index 71c84ee0c2f1..413b5bcd5490 100644 --- a/vcl/aqua/source/window/salframe.cxx +++ b/vcl/aqua/source/window/salframe.cxx @@ -1352,40 +1352,81 @@ void AquaSalFrame::GetWorkArea( Rectangle& rRect ) SalPointerState AquaSalFrame::GetPointerState() { SalPointerState state; + state.mnState = 0; // get position NSPoint aPt = [mpWindow mouseLocationOutsideOfEventStream]; CocoaToVCL( aPt, false ); state.maPos = Point(static_cast(aPt.x), static_cast(aPt.y)); - // FIXME: replace Carbon by Cocoa - // Cocoa does not have an equivalent for GetCurrentEventButtonState - // and GetCurrentEventKeyModifiers. - // we could try to get away with tracking all events for modifierKeys - // and all mouse events for button state in VCL_NSApllication::sendEvent, - // but it is unclear whether this will get us the same result. - // leave in GetCurrentEventButtonState and GetCurrentEventKeyModifiers for now + NSEvent* pCur = [NSApp currentEvent]; + bool bMouseEvent = false; + if( pCur ) + { + bMouseEvent = true; + switch( [pCur type] ) + { + case NSLeftMouseDown: state.mnState |= MOUSE_LEFT; break; + case NSLeftMouseUp: break; + case NSRightMouseDown: state.mnState |= MOUSE_RIGHT; break; + case NSRightMouseUp: break; + case NSOtherMouseDown: state.mnState |= ([pCur buttonNumber] == 2) ? MOUSE_MIDDLE : 0; break; + case NSOtherMouseUp: break; + case NSMouseMoved: break; + case NSLeftMouseDragged: state.mnState |= MOUSE_LEFT; break; + case NSRightMouseDragged: state.mnState |= MOUSE_RIGHT; break; + case NSOtherMouseDragged: state.mnState |= ([pCur buttonNumber] == 2) ? MOUSE_MIDDLE : 0; break; + break; + default: + bMouseEvent = false; + break; + } + } + if( bMouseEvent ) + { + unsigned int nMask = (unsigned int)[pCur modifierFlags]; + if( (nMask & NSShiftKeyMask) != 0 ) + state.mnState |= KEY_SHIFT; + if( (nMask & NSControlKeyMask) != 0 ) + state.mnState |= KEY_MOD3; + if( (nMask & NSAlternateKeyMask) != 0 ) + state.mnState |= KEY_MOD2; + if( (nMask & NSCommandKeyMask) != 0 ) + state.mnState |= KEY_MOD1; + + } + else + { + // FIXME: replace Carbon by Cocoa + // Cocoa does not have an equivalent for GetCurrentEventButtonState + // and GetCurrentEventKeyModifiers. + // we could try to get away with tracking all events for modifierKeys + // and all mouse events for button state in VCL_NSApllication::sendEvent, + // but it is unclear whether this will get us the same result. + // leave in GetCurrentEventButtonState and GetCurrentEventKeyModifiers for now + + // fill in button state + UInt32 nState = GetCurrentEventButtonState(); + state.mnState = 0; + if( nState & 1 ) + state.mnState |= MOUSE_LEFT; // primary button + if( nState & 2 ) + state.mnState |= MOUSE_RIGHT; // secondary button + if( nState & 4 ) + state.mnState |= MOUSE_MIDDLE; // tertiary button + + // fill in modifier state + nState = GetCurrentEventKeyModifiers(); + if( nState & shiftKey ) + state.mnState |= KEY_SHIFT; + if( nState & controlKey ) + state.mnState |= KEY_MOD3; + if( nState & optionKey ) + state.mnState |= KEY_MOD2; + if( nState & cmdKey ) + state.mnState |= KEY_MOD1; + } - // fill in button state - UInt32 nState = GetCurrentEventButtonState(); - state.mnState = 0; - if( nState & 1 ) - state.mnState |= MOUSE_LEFT; // primary button - if( nState & 2 ) - state.mnState |= MOUSE_RIGHT; // secondary button - if( nState & 4 ) - state.mnState |= MOUSE_MIDDLE; // tertiary button - - // fill in modifier state - nState = GetCurrentEventKeyModifiers(); - if( nState & shiftKey ) - state.mnState |= KEY_SHIFT; - if( nState & controlKey ) - state.mnState |= KEY_MOD3; - if( nState & optionKey ) - state.mnState |= KEY_MOD2; - if( nState & cmdKey ) - state.mnState |= KEY_MOD1; return state; } -- cgit v1.2.3 From 63c588143c71a72636b1e436aa231f9303efcacc Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Thu, 25 Mar 2010 18:24:49 +0100 Subject: cws l10ntooling18: #i110394# confused assignment --- desktop/source/deployment/gui/dp_gui_service.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/desktop/source/deployment/gui/dp_gui_service.cxx b/desktop/source/deployment/gui/dp_gui_service.cxx index a6d3ee21c698..578ff04a6c88 100644 --- a/desktop/source/deployment/gui/dp_gui_service.cxx +++ b/desktop/source/deployment/gui/dp_gui_service.cxx @@ -124,12 +124,11 @@ void ReplaceProductNameHookProc( String& rStr ) aRet = ::utl::ConfigManager::GetDirectConfigProperty( ::utl::ConfigManager::ABOUTBOXPRODUCTVERSION ); aRet >>= aTmp; - rOOOVendor = aTmp; + rAboutBoxVersion = aTmp; aRet = ::utl::ConfigManager::GetDirectConfigProperty( ::utl::ConfigManager::OOOVENDOR ); aRet >>= aTmp; - rAboutBoxVersion = aTmp; - + rOOOVendor = aTmp; if ( !rExtension.Len() ) { -- cgit v1.2.3 From 903bfc6a7230cf30262c52c6cf6b649dbac8f996 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Wed, 31 Mar 2010 14:10:23 +0200 Subject: vcl111: #102694# more hacking for metacity and tool windows --- vcl/unx/gtk/window/gtkframe.cxx | 31 +++++++++++++++++-------------- vcl/unx/inc/plugins/gtk/gtkframe.hxx | 1 + 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/vcl/unx/gtk/window/gtkframe.cxx b/vcl/unx/gtk/window/gtkframe.cxx index ba42cfc5ae82..bc4bc420a2eb 100644 --- a/vcl/unx/gtk/window/gtkframe.cxx +++ b/vcl/unx/gtk/window/gtkframe.cxx @@ -566,6 +566,7 @@ void GtkSalFrame::InitCommon() m_nExtStyle = 0; m_pRegion = NULL; m_ePointerStyle = 0xffff; + m_bSetFocusOnMap = false; gtk_widget_set_app_paintable( m_pWindow, TRUE ); gtk_widget_set_double_buffered( m_pWindow, FALSE ); @@ -803,11 +804,6 @@ void GtkSalFrame::Init( SalFrame* pParent, ULONG nStyle ) ( ! (nStyle & SAL_FRAME_STYLE_FLOAT) || (nStyle & (SAL_FRAME_STYLE_OWNERDRAWDECORATION|SAL_FRAME_STYLE_FLOAT_FOCUSABLE) ) ); - /* #i100116# metacity has a peculiar behavior regarding WM_HINT accept focus and _NET_WM_USER_TIME - at some point that may be fixed in metacity and we will have to revisit this - */ - bool bMetaCityToolWindowHack = getDisplay()->getWMAdaptor()->getWindowManagerName().EqualsAscii("Metacity") && - (nStyle & SAL_FRAME_STYLE_TOOLWINDOW ); if( bDecoHandling ) { bool bNoDecor = ! (nStyle & (SAL_FRAME_STYLE_MOVEABLE | SAL_FRAME_STYLE_SIZEABLE | SAL_FRAME_STYLE_CLOSEABLE ) ); @@ -823,8 +819,6 @@ void GtkSalFrame::Init( SalFrame* pParent, ULONG nStyle ) { eType = GDK_WINDOW_TYPE_HINT_UTILITY; gtk_window_set_skip_taskbar_hint( GTK_WINDOW(m_pWindow), true ); - if( bMetaCityToolWindowHack ) - lcl_set_accept_focus( GTK_WINDOW(m_pWindow), FALSE, true ); } else if( (nStyle & SAL_FRAME_STYLE_OWNERDRAWDECORATION) ) { @@ -874,7 +868,7 @@ void GtkSalFrame::Init( SalFrame* pParent, ULONG nStyle ) if( bDecoHandling ) { gtk_window_set_resizable( GTK_WINDOW(m_pWindow), (nStyle & SAL_FRAME_STYLE_SIZEABLE) ? TRUE : FALSE ); - if( ( (nStyle & (SAL_FRAME_STYLE_OWNERDRAWDECORATION)) ) || bMetaCityToolWindowHack ) + if( ( (nStyle & (SAL_FRAME_STYLE_OWNERDRAWDECORATION)) ) ) lcl_set_accept_focus( GTK_WINDOW(m_pWindow), FALSE, false ); } @@ -1357,9 +1351,9 @@ void GtkSalFrame::Show( BOOL bVisible, BOOL bNoActivate ) // // i.e. having a time < that of the toplevel frame means that the toplevel frame gets unfocused. // awesome. + bool bMetaCity = getDisplay()->getWMAdaptor()->getWindowManagerName().EqualsAscii("Metacity"); if( nUserTime == 0 && - ( - getDisplay()->getWMAdaptor()->getWindowManagerName().EqualsAscii("Metacity") || + ( bMetaCity || ( getDisplay()->getWMAdaptor()->getWindowManagerName().EqualsAscii("compiz") && (m_nStyle & (SAL_FRAME_STYLE_OWNERDRAWDECORATION)) @@ -1371,9 +1365,11 @@ void GtkSalFrame::Show( BOOL bVisible, BOOL bNoActivate ) nUserTime= getDisplay()->GetLastUserEventTime( true ); //nUserTime = gdk_x11_get_server_time(GTK_WIDGET (m_pWindow)->window); } - lcl_set_user_time( GTK_WIDGET(m_pWindow)->window, nUserTime ); + if( bMetaCity && ! bNoActivate && (m_nStyle & SAL_FRAME_STYLE_TOOLWINDOW) ) + m_bSetFocusOnMap = true; + gtk_widget_show( m_pWindow ); if( isFloatGrabWindow() ) @@ -2834,6 +2830,8 @@ gboolean GtkSalFrame::signalMap( GtkWidget*, GdkEvent*, gpointer frame ) GTK_YIELD_GRAB(); + bool bSetFocus = pThis->m_bSetFocusOnMap; + pThis->m_bSetFocusOnMap = false; if( ImplGetSVData()->mbIsTestTool ) { /* #i76541# testtool needs the focus to be in a new document @@ -2843,9 +2841,14 @@ gboolean GtkSalFrame::signalMap( GtkWidget*, GdkEvent*, gpointer frame ) * so this is done when running in testtool only */ if( ! pThis->m_pParent && (pThis->m_nStyle & SAL_FRAME_STYLE_MOVEABLE) != 0 ) - XSetInputFocus( pThis->getDisplay()->GetDisplay(), - GDK_WINDOW_XWINDOW( GTK_WIDGET(pThis->m_pWindow)->window), - RevertToParent, CurrentTime ); + bSetFocus = true; + } + + if( bSetFocus ) + { + XSetInputFocus( pThis->getDisplay()->GetDisplay(), + GDK_WINDOW_XWINDOW( GTK_WIDGET(pThis->m_pWindow)->window), + RevertToParent, CurrentTime ); } pThis->CallCallback( SALEVENT_RESIZE, NULL ); diff --git a/vcl/unx/inc/plugins/gtk/gtkframe.hxx b/vcl/unx/inc/plugins/gtk/gtkframe.hxx index 0a91d99fd839..88a26b401eed 100644 --- a/vcl/unx/inc/plugins/gtk/gtkframe.hxx +++ b/vcl/unx/inc/plugins/gtk/gtkframe.hxx @@ -185,6 +185,7 @@ class GtkSalFrame : public SalFrame bool m_bDefaultSize; bool m_bSendModChangeOnRelease; bool m_bWindowIsGtkPlug; + bool m_bSetFocusOnMap; String m_aTitle; IMHandler* m_pIMHandler; -- cgit v1.2.3 From 095e84c6758bd2c0c0a77a94fc8022bd64eee3ed Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Wed, 7 Apr 2010 16:54:36 +0200 Subject: fwk127: #i105851# arguments to memset are the wrong way around --- svl/source/items/nranges.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/svl/source/items/nranges.cxx b/svl/source/items/nranges.cxx index 284bc251a3a4..813c1fec8ebd 100644 --- a/svl/source/items/nranges.cxx +++ b/svl/source/items/nranges.cxx @@ -480,7 +480,7 @@ SfxNumRanges& SfxNumRanges::operator -= NUMTYPE nThisSize = Count_Impl(_pRanges); NUMTYPE nTargetSize = 1 + ( nThisSize + Count_Impl(rRanges._pRanges) ); NUMTYPE *pTarget = new NUMTYPE[ nTargetSize ]; - memset( pTarget, sizeof(NUMTYPE)*nTargetSize, 0 ); + memset( pTarget, 0, sizeof(NUMTYPE)*nTargetSize ); memcpy( pTarget, _pRanges, sizeof(NUMTYPE)*nThisSize ); NUMTYPE nPos1 = 0, nPos2 = 0, nTargetPos = 0; @@ -690,7 +690,7 @@ SfxNumRanges& SfxNumRanges::operator /= NUMTYPE nThisSize = Count_Impl(_pRanges); NUMTYPE nTargetSize = 1 + ( nThisSize + Count_Impl(rRanges._pRanges) ); NUMTYPE *pTarget = new NUMTYPE[ nTargetSize ]; - memset( pTarget, sizeof(NUMTYPE)*nTargetSize, 0 ); + memset( pTarget, 0, sizeof(NUMTYPE)*nTargetSize ); memcpy( pTarget, _pRanges, sizeof(NUMTYPE)*nThisSize ); NUMTYPE nPos1 = 0, nPos2 = 0, nTargetPos = 0; -- cgit v1.2.3 From e96760a74a9a65f99a5acfaeaf13fc31eb243d82 Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Thu, 8 Apr 2010 11:21:05 +0200 Subject: fwk127: #i106491# Substitute possible variables inside impl_setPathValue --- framework/source/services/pathsettings.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/framework/source/services/pathsettings.cxx b/framework/source/services/pathsettings.cxx index e99e08895a3f..5227cb9f302c 100644 --- a/framework/source/services/pathsettings.cxx +++ b/framework/source/services/pathsettings.cxx @@ -855,6 +855,7 @@ void PathSettings::impl_setPathValue( sal_Int32 nID , ::rtl::OUString sVal; aVal >>= sVal; OUStringList lList = impl_convertOldStyle2Path(sVal); + impl_subst(lList, fa_getSubstitution(), sal_False); impl_purgeKnownPaths(aChangePath, lList); if (! impl_isValidPath(lList)) throw css::lang::IllegalArgumentException(); -- cgit v1.2.3 From 4c700c32a3f70c1d5ebe636fdd52f79feefe0d14 Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Thu, 8 Apr 2010 17:26:09 +0200 Subject: fwk139: #i100512# Eliminate flicker when toolbar buttons make themselves invisible --- framework/inc/uielement/toolbarmanager.hxx | 6 +++ framework/source/uielement/toolbarmanager.cxx | 78 +++++++++++++++++++++++++++ 2 files changed, 84 insertions(+) diff --git a/framework/inc/uielement/toolbarmanager.hxx b/framework/inc/uielement/toolbarmanager.hxx index 98894b623aea..7c73cc0754d9 100644 --- a/framework/inc/uielement/toolbarmanager.hxx +++ b/framework/inc/uielement/toolbarmanager.hxx @@ -59,6 +59,9 @@ #include #include +//shizhoubo +#include +//end //_________________________________________________________________________________________________________________ // other includes //_________________________________________________________________________________________________________________ @@ -181,6 +184,9 @@ class ToolBarManager : public ::com::sun::star::frame::XFrameActionListener rtl::OUString RetrieveLabelFromCommand( const rtl::OUString& aCmdURL ); void CreateControllers(); void UpdateControllers(); + //for update controller via Support Visiable by shizhoubo + void UpdateController( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XToolbarController > xController); + //end void AddFrameActionListener(); void AddImageOrientationListener(); void UpdateImageOrientation(); diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx index d89b81c0f9b6..ea1cc2cda7e4 100644 --- a/framework/source/uielement/toolbarmanager.cxx +++ b/framework/source/uielement/toolbarmanager.cxx @@ -510,7 +510,47 @@ void ToolBarManager::UpdateControllers() } m_bUpdateControllers = sal_False; } +//for update toolbar controller via Support Visible by shizhoubo +void ToolBarManager::UpdateController( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XToolbarController > xController) +{ + RTL_LOGFILE_CONTEXT( aLog, "framework (cd100003) ::ToolBarManager::UpdateControllers" ); + + if ( !m_bUpdateControllers ) + { + m_bUpdateControllers = sal_True; + try + { if(xController.is()) + { + Reference< XUpdatable > xUpdatable( xController, UNO_QUERY ); + if ( xUpdatable.is() ) + xUpdatable->update(); + } + } + catch ( Exception& ) + { + } + + /* m_bUpdateControllers = sal_True; + ToolBarControllerMap::iterator pIter = m_aControllerMap.begin(); + while ( pIter != m_aControllerMap.end() ) + { + try + { + Reference< XUpdatable > xUpdatable( pIter->second, UNO_QUERY ); + if ( xUpdatable.is() ) + xUpdatable->update(); + } + catch ( Exception& ) + { + } + ++pIter; + }*/ + + } + m_bUpdateControllers = sal_False; +} +//end void ToolBarManager::frameAction( const FrameActionEvent& Action ) throw ( RuntimeException ) { @@ -1037,6 +1077,19 @@ void ToolBarManager::CreateControllers() Sequence< Any > aArgs( comphelper::containerToSequence( aPropertyVector )); xInit->initialize( aArgs ); + //for Support Visiblitly by shizhoubo + if (pController) + { + // rtl::OUString aCommandURL = pController->m_aCommandURL; + if(aCommandURL == rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:SwitchXFormsDesignMode" )) || + aCommandURL == rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:ViewDataSourceBrowser" )) || + aCommandURL == rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:ParaLeftToRight" )) || + aCommandURL == rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:ParaRightToLeft" )) + ) + pController->setFastPropertyValue_NoBroadcast(1,makeAny(sal_True)); + } + + //end } // Request a item window from the toolbar controller and set it at the VCL toolbar @@ -1057,6 +1110,31 @@ void ToolBarManager::CreateControllers() } } } + //for update Controller via support visiable state by shizhoubo + Reference< XPropertySet > xPropSet( xController, UNO_QUERY ); + if ( xPropSet.is() ) + { + try + { + sal_Bool bSupportVisiable = sal_True; + Any a( xPropSet->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "SupportsVisiable" ))) ); + a >>= bSupportVisiable; + if ( bSupportVisiable ) + { + Reference< XToolbarController > xTbxController( xController, UNO_QUERY ); + UpdateController(xTbxController); + } + } + catch ( RuntimeException& ) + { + throw; + } + catch ( Exception& ) + { + } + } + //end + } AddFrameActionListener(); -- cgit v1.2.3 From 753b209ebcb42d313359fc4062201461b21213a1 Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Thu, 8 Apr 2010 17:26:09 +0200 Subject: fwk139: #i100512# Eliminate flicker when toolbar buttons make themselves invisible --- svtools/inc/svtools/toolboxcontroller.hxx | 24 ++++++- svtools/source/uno/toolboxcontroller.cxx | 101 ++++++++++++++++++++++++++++-- 2 files changed, 117 insertions(+), 8 deletions(-) diff --git a/svtools/inc/svtools/toolboxcontroller.hxx b/svtools/inc/svtools/toolboxcontroller.hxx index 27ed315a3c04..e1ba26607922 100644 --- a/svtools/inc/svtools/toolboxcontroller.hxx +++ b/svtools/inc/svtools/toolboxcontroller.hxx @@ -42,7 +42,13 @@ #include #include #include - +//shizhoubo for ToolbarController Visiable +#include +#include +#include +#include +#include +//end #ifndef INCLUDED_HASH_MAP #include #define INCLUDED_HASH_MAP @@ -57,9 +63,13 @@ class SVT_DLLPUBLIC ToolboxController : public ::com::sun::star::frame::XStatusL public ::com::sun::star::lang::XInitialization, public ::com::sun::star::util::XUpdatable, public ::com::sun::star::lang::XComponent, - public ::comphelper::OBaseMutex, + public ::comphelper::OMutexAndBroadcastHelper,//shizhoubo + public ::comphelper::OPropertyContainer,//shizhoubo + public ::comphelper::OPropertyArrayUsageHelper< ToolboxController >,//shizhoubo public ::cppu::OWeakObject { + private: + sal_Bool m_bSupportVisiable; //shizhoubo public: ToolboxController( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rServiceManager, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& xFrame, @@ -102,8 +112,18 @@ class SVT_DLLPUBLIC ToolboxController : public ::com::sun::star::frame::XStatusL virtual void SAL_CALL doubleClick() throw (::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > SAL_CALL createPopupWindow() throw (::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > SAL_CALL createItemWindow( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >& Parent ) throw (::com::sun::star::uno::RuntimeException); + // OPropertySetHelper //shizhoubo + virtual void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const com::sun::star::uno::Any& rValue ) throw(com::sun::star::uno::Exception); + virtual sal_Bool SAL_CALL convertFastPropertyValue( com::sun::star::uno::Any& rConvertedValue, com::sun::star::uno::Any& rOldValue, sal_Int32 nHandle, const com::sun::star::uno::Any& rValue) throw(com::sun::star::lang::IllegalArgumentException); + // XPropertySet //shizhoubo + virtual ::com::sun::star::uno::Reference< com::sun::star::beans::XPropertySetInfo> SAL_CALL getPropertySetInfo() throw(::com::sun::star::uno::RuntimeException); + virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); + // OPropertyArrayUsageHelper //shizhoubo + virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const; + protected: + void setSupportVisiableProperty(sal_Bool bValue); //shizhoubo struct Listener { Listener( const ::com::sun::star::util::URL& rURL, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch >& rDispatch ) : diff --git a/svtools/source/uno/toolboxcontroller.cxx b/svtools/source/uno/toolboxcontroller.cxx index 3f0b4e7c0ee6..4658da9bee3a 100644 --- a/svtools/source/uno/toolboxcontroller.cxx +++ b/svtools/source/uno/toolboxcontroller.cxx @@ -42,6 +42,12 @@ #include #endif #include +//shizhobo +#include +const int TOOLBARCONTROLLER_PROPHANDLE_SUPPORTSVISIABLE = 1; +const int TOOLBARCONTROLLER_PROPCOUNT = 1; +const rtl::OUString TOOLBARCONTROLLER_PROPNAME_SUPPORTSVISIABLE( RTL_CONSTASCII_USTRINGPARAM( "SupportsVisiable" )); +//end using namespace ::cppu; using namespace ::com::sun::star::awt; @@ -61,10 +67,12 @@ struct ToolboxController_Impl }; ToolboxController::ToolboxController( + const Reference< XMultiServiceFactory >& rServiceManager, const Reference< XFrame >& xFrame, const ::rtl::OUString& aCommandURL ) : OWeakObject() + ,OPropertyContainer(GetBroadcastHelper())//shizhoubo , m_bInitialized( sal_False ) , m_bDisposed( sal_False ) , m_xFrame(xFrame) @@ -72,6 +80,10 @@ ToolboxController::ToolboxController( , m_aCommandURL( aCommandURL ) , m_aListenerContainer( m_aMutex ) { + //registger Propertyh by shizhoubo + registerProperty(TOOLBARCONTROLLER_PROPNAME_SUPPORTSVISIABLE, TOOLBARCONTROLLER_PROPHANDLE_SUPPORTSVISIABLE, com::sun::star::beans::PropertyAttribute::TRANSIENT | com::sun::star::beans::PropertyAttribute::READONLY, + &m_bSupportVisiable, getCppuType(&m_bSupportVisiable)); + m_pImpl = new ToolboxController_Impl; try @@ -87,10 +99,15 @@ ToolboxController::ToolboxController( ToolboxController::ToolboxController() : OWeakObject() + ,OPropertyContainer(GetBroadcastHelper())//shizhoubo , m_bInitialized( sal_False ) , m_bDisposed( sal_False ) , m_aListenerContainer( m_aMutex ) { + //registger Propertyh by shizhoubo + registerProperty(TOOLBARCONTROLLER_PROPNAME_SUPPORTSVISIABLE, TOOLBARCONTROLLER_PROPHANDLE_SUPPORTSVISIABLE, com::sun::star::beans::PropertyAttribute::TRANSIENT | com::sun::star::beans::PropertyAttribute::READONLY, + &m_bSupportVisiable, getCppuType(&m_bSupportVisiable)); + m_pImpl = new ToolboxController_Impl; } @@ -146,11 +163,16 @@ throw ( RuntimeException ) static_cast< XInitialization* >( this ), static_cast< XComponent* >( this ), static_cast< XUpdatable* >( this )); - - if ( a.hasValue() ) - return a; - - return OWeakObject::queryInterface( rType ); + if ( !a.hasValue()) + { + a = ::cppu::queryInterface(rType + ,static_cast(this) + ,static_cast(this) + ,static_cast(this)); + if (!a.hasValue()) + return OWeakObject::queryInterface( rType ); + } + return a; } void SAL_CALL ToolboxController::acquire() throw () @@ -186,7 +208,8 @@ throw ( Exception, RuntimeException ) { vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); m_bInitialized = sal_True; - + //shizhoubo add + m_bSupportVisiable = sal_False; PropertyValue aPropValue; for ( int i = 0; i < aArguments.getLength(); i++ ) { @@ -704,4 +727,70 @@ Reference< ::com::sun::star::awt::XWindow > ToolboxController::getParent() const { return m_pImpl->m_xParentWindow; } +// +//------------------------------------------------------------------------- +// XPropertySet by shizhoubo +com::sun::star::uno::Reference< com::sun::star::beans::XPropertySetInfo > SAL_CALL ToolboxController::getPropertySetInfo() throw(::com::sun::star::uno::RuntimeException) +{ + Reference xInfo( createPropertySetInfo( getInfoHelper() ) ); + return xInfo; +} +//------------------------------------------------------------------------- +::cppu::IPropertyArrayHelper& ToolboxController::getInfoHelper() +{ + return *const_cast(this)->getArrayHelper(); +} +//OPropertyArrayUsageHelper by shizhoubo +//------------------------------------------------------------------------------ +::cppu::IPropertyArrayHelper* ToolboxController::createArrayHelper( ) const +{ + com::sun::star::uno::Sequence< Property > aProps; + describeProperties(aProps); + return new ::cppu::OPropertyArrayHelper(aProps); +} +//shizhoubo for supportsvisiable +void ToolboxController::setSupportVisiableProperty(sal_Bool bValue) +{ + m_bSupportVisiable = bValue; +} +//OPropertySetHelper by shizhoubo +sal_Bool SAL_CALL ToolboxController::convertFastPropertyValue( com::sun::star::uno::Any& aConvertedValue , + com::sun::star::uno::Any& aOldValue , + sal_Int32 nHandle , + const com::sun::star::uno::Any& aValue ) throw( com::sun::star::lang::IllegalArgumentException ) +{ + + switch (nHandle) + { + case TOOLBARCONTROLLER_PROPHANDLE_SUPPORTSVISIABLE: + { + sal_Bool aNewValue; + aValue >>= aNewValue; + if (aNewValue != m_bSupportVisiable) + { + aConvertedValue <<= aNewValue; + aOldValue <<= m_bSupportVisiable; + return sal_True; + } + return sal_False; + } + } + return OPropertyContainer::convertFastPropertyValue(aConvertedValue, aOldValue, nHandle, aValue); + + +} +void SAL_CALL ToolboxController::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle, + const com::sun::star::uno::Any& aValue ) throw( com::sun::star::uno::Exception) +{ + OPropertyContainer::setFastPropertyValue_NoBroadcast(nHandle, aValue); + if (TOOLBARCONTROLLER_PROPHANDLE_SUPPORTSVISIABLE == nHandle) + { sal_Bool rValue; + aValue >>= rValue; + if (m_bInitialized) + this->setSupportVisiableProperty(rValue); + } + +} +//end + } // svt -- cgit v1.2.3 From b405ae53ad7bf65d43383f8338df9cd2daa96aba Mon Sep 17 00:00:00 2001 From: sj Date: Fri, 9 Apr 2010 18:04:50 +0200 Subject: impress190: #110673# applied patch (removed some Boundchecker warnings) --- sd/source/filter/ppt/pptatom.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/sd/source/filter/ppt/pptatom.cpp b/sd/source/filter/ppt/pptatom.cpp index 21a0c3c3f9f8..35c17692c5eb 100644 --- a/sd/source/filter/ppt/pptatom.cpp +++ b/sd/source/filter/ppt/pptatom.cpp @@ -49,7 +49,15 @@ Atom::Atom( const DffRecordHeader& rRecordHeader, SvStream& rStream ) Atom* pLastAtom = NULL; - while( (mrStream.GetError() == 0 ) && ( mrStream.Tell() < maRecordHeader.GetRecEndFilePos() ) ) + // retrieve file size (to allow sanity checks) + const sal_Size nStreamPos = mrStream.Tell(); + mrStream.Seek( STREAM_SEEK_TO_END ); + const sal_Size nStreamSize = mrStream.Tell(); + mrStream.Seek( nStreamPos ); + + while( (mrStream.GetError() == 0 ) + && ( mrStream.Tell() < nStreamSize ) + && ( mrStream.Tell() < maRecordHeader.GetRecEndFilePos() ) ) { mrStream >> aChildHeader; -- cgit v1.2.3 From 49e4ad75c4bca88d3da34510ff0a3f99337d676a Mon Sep 17 00:00:00 2001 From: sj Date: Fri, 9 Apr 2010 18:04:50 +0200 Subject: impress190: #110673# applied patch (removed some Boundchecker warnings) --- filter/source/msfilter/svdfppt.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx index 8d8e48832dc9..e8c1693e0a4e 100644 --- a/filter/source/msfilter/svdfppt.cxx +++ b/filter/source/msfilter/svdfppt.cxx @@ -5087,6 +5087,10 @@ void PPTStyleTextPropReader::ReadParaProps( SvStream& rIn, SdrPowerPointImport& rIn >> nCharCount >> aParaPropSet.pParaSet->mnDepth; // Einruecktiefe + aParaPropSet.pParaSet->mnDepth = + std::min(sal_uInt16(9), + aParaPropSet.pParaSet->mnDepth); + nCharCount--; rIn >> nMask; @@ -5321,7 +5325,7 @@ void PPTStyleTextPropReader::Init( SvStream& rIn, SdrPowerPointImport& rMan, con rIn >> aTextHd; sal_uInt32 nMaxLen = aTextHd.nRecLen; if ( nMaxLen > 0xFFFF ) - nMaxLen = 0xFFFF; + nMaxLen = 0xFFFE; if( aTextHd.nRecType == PPT_PST_TextCharsAtom ) { -- cgit v1.2.3 From a14e90df9620b4e4259d20197660f2dac67628d7 Mon Sep 17 00:00:00 2001 From: sj Date: Fri, 9 Apr 2010 18:04:50 +0200 Subject: impress190: #110673# applied patch (removed some Boundchecker warnings) --- vcl/source/gdi/pngread.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vcl/source/gdi/pngread.cxx b/vcl/source/gdi/pngread.cxx index b7eb8e5f50bf..11971db34378 100644 --- a/vcl/source/gdi/pngread.cxx +++ b/vcl/source/gdi/pngread.cxx @@ -703,7 +703,7 @@ void PNGReaderImpl::ImplGetGrayPalette( sal_uInt16 nBitDepth ) nBitDepth = 8; sal_uInt16 nPaletteEntryCount = 1 << nBitDepth; - sal_uInt32 nAdd = 256 / (nPaletteEntryCount - 1); + sal_uInt32 nAdd = nBitDepth ? 256 / (nPaletteEntryCount - 1) : 0; // no bitdepth==2 available // but bitdepth==4 with two unused bits is close enough -- cgit v1.2.3 From a142b995c98f436f20eacfdf5944feb30a5125df Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Mon, 12 Apr 2010 14:33:40 +0200 Subject: cws l10ntooling18: #i110687# path updated --- filter/source/config/tools/merge/pyAltFCFGMerge | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/filter/source/config/tools/merge/pyAltFCFGMerge b/filter/source/config/tools/merge/pyAltFCFGMerge index faf9b9c34cb7..8abf7e08df70 100755 --- a/filter/source/config/tools/merge/pyAltFCFGMerge +++ b/filter/source/config/tools/merge/pyAltFCFGMerge @@ -11,7 +11,8 @@ import sys, string, os.path -CFGFILE = "../../../../transex3/source/filter/merge/FCFGMerge.cfg" +# This is ugly, please take the file from solver output tree +CFGFILE = "../../../../l10ntools/source/filter/merge/FCFGMerge.cfg" PROP_XMLVERSION = "xmlversion" # // <= global cfg file PROP_XMLENCODING = "xmlencoding" # // <= global cfg file -- cgit v1.2.3 From 20231f17aebf160bb96b81ed31d4c2ed5c83785c Mon Sep 17 00:00:00 2001 From: "Herbert Duerr [hdu]" Date: Mon, 12 Apr 2010 14:55:57 +0200 Subject: #i110806# fix stlport debug assertion (thanks dtardon) --- vcl/source/gdi/sallayout.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vcl/source/gdi/sallayout.cxx b/vcl/source/gdi/sallayout.cxx index 344867ebb0b0..cacaa1849b65 100755 --- a/vcl/source/gdi/sallayout.cxx +++ b/vcl/source/gdi/sallayout.cxx @@ -1800,8 +1800,8 @@ void MultiSalLayout::AdjustLayout( ImplLayoutArgs& rArgs ) int nRunStart, nRunEnd; while (rArgs.GetNextRun(&nRunStart, &nRunEnd, &bRtl)) { - if (bRtl) std::fill(vRtl.begin() + nRunStart - rArgs.mnMinCharPos, - vRtl.begin() + nRunEnd - rArgs.mnMinCharPos, true); + if (bRtl) std::fill(vRtl.begin() + (nRunStart - rArgs.mnMinCharPos), + vRtl.begin() + (nRunEnd - rArgs.mnMinCharPos), true); } rArgs.ResetPos(); -- cgit v1.2.3 From f0b4543e5d07906c9f2a3c0afcae736740d7c0ac Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Mon, 12 Apr 2010 16:02:27 +0200 Subject: #i110810# rename output files --- l10ntools/source/localize.cxx | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/l10ntools/source/localize.cxx b/l10ntools/source/localize.cxx index b869098faed7..9379590d089c 100644 --- a/l10ntools/source/localize.cxx +++ b/l10ntools/source/localize.cxx @@ -959,8 +959,16 @@ int _cdecl main( int argc, char *argv[] ) aIter.SetLanguageRestriction( sLanguages ); if ( bExport ){ if( bQuiet2 ){ /*printf("");*/fflush( stdout );} - aIter.Extract( sFileName ); - if( bQuiet2 ){ printf("\n %d files found!\n",aIter.GetFileCnt());} + if( *iter == "ooo" ) + aIter.Extract( sFileName ); + else + { + ByteString sFileNameWithExt( sFileName ); + sFileNameWithExt += ByteString( "." ); + sFileNameWithExt += ByteString( (*iter).c_str() , (*iter).length() ); + aIter.Extract( sFileNameWithExt ); + } + if( bQuiet2 ){ printf("\n%d files found!\n",aIter.GetFileCnt());} } } if( hasPwd ) @@ -973,7 +981,7 @@ int _cdecl main( int argc, char *argv[] ) if ( bExport ){ if( bQuiet2 ){ /*printf("");*/fflush( stdout );} aIter.Extract( sFileName ); - if( bQuiet2 ){ printf("\n %d files found!\n",aIter.GetFileCnt());} + if( bQuiet2 ){ printf("\n%d files found!\n",aIter.GetFileCnt());} } } -- cgit v1.2.3 From 0f641fbfd20f06811ec4bdd886ff7ab16d058375 Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Tue, 13 Apr 2010 18:26:22 +0200 Subject: l10ntooling18: #i109378# set path to gsicheck in localize.pl --- l10ntools/scripts/localize.pl | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/l10ntools/scripts/localize.pl b/l10ntools/scripts/localize.pl index 8b6a8231ebce..a6a370385f21 100755 --- a/l10ntools/scripts/localize.pl +++ b/l10ntools/scripts/localize.pl @@ -392,11 +392,9 @@ sub merge_gsicheck{ my ( $TMPHANDLE , $tmpfile ) = File::Temp::tempfile(); close ( $TMPHANDLE ); - if( $ENV{WRAPCMD} ){ - $command = "$ENV{WRAPCMD} gsicheck"; - }else{ - $command = "gsicheck"; - } + $command = "$ENV{WRAPCMD} " if( $ENV{WRAPCMD} ); + $command .= fix_cygwin_path("$ENV{SOLARVER}/$ENV{INPATH}/bin/gsicheck"); + my $errfile = $sdffile.".err"; $command .= " -k -c -wcf $tmpfile -wef $errfile -l \"\" $sdffile"; #my $rc = system( $command ); -- cgit v1.2.3 From 6117ebac60ab7acb84b45b57d49150abf469667d Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Tue, 13 Apr 2010 18:47:19 +0200 Subject: vcl111: #i97017# add yet another recent file list --- framework/source/services/backingwindow.cxx | 156 +++++++++++++++++++++++++++- framework/source/services/backingwindow.hxx | 20 +++- framework/source/services/fwk_services.src | 2 +- 3 files changed, 170 insertions(+), 8 deletions(-) diff --git a/framework/source/services/backingwindow.cxx b/framework/source/services/backingwindow.cxx index bbbefdbdbda1..6cad7f6e6adf 100644 --- a/framework/source/services/backingwindow.cxx +++ b/framework/source/services/backingwindow.cxx @@ -41,6 +41,7 @@ #include "tools/urlobj.hxx" #include "unotools/dynamicmenuoptions.hxx" +#include "unotools/historyoptions.hxx" #include "svtools/imagemgr.hxx" #include "svl/svtools.hrc" @@ -48,18 +49,23 @@ #include "comphelper/sequenceashashmap.hxx" #include "comphelper/configurationhelper.hxx" +#include "cppuhelper/implbase1.hxx" + #include "rtl/strbuf.hxx" #include "rtl/ustrbuf.hxx" +#include "osl/file.h" #include "com/sun/star/lang/XMultiServiceFactory.hpp" #include "com/sun/star/container/XNameAccess.hpp" #include "com/sun/star/system/XSystemShellExecute.hpp" #include "com/sun/star/system/SystemShellExecuteFlags.hpp" #include "com/sun/star/task/XJobExecutor.hpp" +#include "com/sun/star/util/XStringWidth.hpp" using namespace ::com::sun::star::beans; using namespace ::com::sun::star::frame; +using namespace ::com::sun::star::util; using namespace ::com::sun::star::uno; using namespace ::com::sun::star; using namespace framework; @@ -110,6 +116,20 @@ Size DecoToolBox::getMinSize() return maMinSize; } +class RecentFilesStringLength : public ::cppu::WeakImplHelper1< ::com::sun::star::util::XStringWidth > +{ + public: + RecentFilesStringLength() {} + virtual ~RecentFilesStringLength() {} + + // XStringWidth + sal_Int32 SAL_CALL queryStringWidth( const ::rtl::OUString& aString ) + throw (::com::sun::star::uno::RuntimeException) + { + return aString.getLength(); + } +}; + #define STC_BUTTON_STYLE (WB_LEFT | WB_VCENTER | WB_FLATBUTTON | WB_BEVELBUTTON) BackingWindow::BackingWindow( Window* i_pParent ) : @@ -141,7 +161,8 @@ BackingWindow::BackingWindow( Window* i_pParent ) : mbInitControls( false ), mnLayoutStyle( 0 ), mpAccExec( NULL ), - mnBtnPos( 120 ) + mnBtnPos( 120 ), + mpRecentMenu( NULL ) { mnColumnWidth[0] = mnColumnWidth[1] = 0; mnTextColumnWidth[0] = mnTextColumnWidth[1] = 0; @@ -249,6 +270,7 @@ BackingWindow::BackingWindow( Window* i_pParent ) : BackingWindow::~BackingWindow() { + delete mpRecentMenu; delete mpAccExec; } @@ -277,6 +299,116 @@ void BackingWindow::DataChanged( const DataChangedEvent& rDCEvt ) } } +void BackingWindow::prepareRecentFileMenu() +{ + if( ! mpRecentMenu ) + mpRecentMenu = new PopupMenu(); + mpRecentMenu->Clear(); + maRecentFiles.clear(); + + // get recent file list and dispatch arguments + Sequence< Sequence< PropertyValue > > aHistoryList( SvtHistoryOptions().GetList( ePICKLIST ) ); + + sal_Int32 nPickListMenuItems = ( aHistoryList.getLength() > 99 ) ? 99 : aHistoryList.getLength(); + + if( ( nPickListMenuItems > 0 ) ) + { + maRecentFiles.reserve( nPickListMenuItems ); + for ( sal_Int32 i = 0; i < nPickListMenuItems; i++ ) + { + Sequence< PropertyValue >& rPickListEntry = aHistoryList[i]; + rtl::OUString aURL, aFilter, aFilterOpt, aTitle; + + for ( sal_Int32 j = 0; j < rPickListEntry.getLength(); j++ ) + { + const Any& a = rPickListEntry[j].Value; + + if ( rPickListEntry[j].Name == HISTORY_PROPERTYNAME_URL ) + a >>= aURL; + else if ( rPickListEntry[j].Name == HISTORY_PROPERTYNAME_FILTER ) + { + a >>= aFilter; + sal_Int32 nPos = aFilter.indexOf( '|' ); + if ( nPos >= 0 ) + { + if ( nPos < ( aFilter.getLength() - 1 ) ) + aFilterOpt = aFilter.copy( nPos+1 ); + aFilter = aFilter.copy( 0, nPos-1 ); + } + } + else if ( rPickListEntry[j].Name == HISTORY_PROPERTYNAME_TITLE ) + a >>= aTitle; + } + maRecentFiles.push_back( LoadRecentFile() ); + maRecentFiles.back().aTargetURL = aURL; + + sal_Int32 nArgs = aFilterOpt.getLength() ? 4 : 3; + Sequence< PropertyValue >& rArgsList( maRecentFiles.back().aArgSeq ); + rArgsList.realloc( nArgs ); + + nArgs--; + rArgsList[nArgs].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FilterName" )); + rArgsList[nArgs].Value = makeAny( aFilter ); + + if( aFilterOpt.getLength() ) + { + nArgs--; + rArgsList[nArgs].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FilterOptions" )); + rArgsList[nArgs].Value = makeAny( aFilterOpt ); + } + + // documents in the picklist will never be opened as templates + nArgs--; + rArgsList[nArgs].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "AsTemplate" )); + rArgsList[nArgs].Value = makeAny( (sal_Bool) sal_False ); + + nArgs--; + rArgsList[nArgs].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Referer" )); + rArgsList[nArgs].Value = makeAny( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "private:user" ) ) ); + + // and finally create an entry in the popupmenu + rtl::OUString aMenuTitle; + INetURLObject aURLObj( aURL ); + + if ( aURLObj.GetProtocol() == INET_PROT_FILE ) + { + // Do handle file URL differently => convert it to a system + // path and abbreviate it with a special function: + String aFileSystemPath( aURLObj.getFSysPath( INetURLObject::FSYS_DETECT ) ); + + rtl::OUString aSystemPath( aFileSystemPath ); + rtl::OUString aCompactedSystemPath; + + oslFileError nError = osl_abbreviateSystemPath( aSystemPath.pData, &aCompactedSystemPath.pData, 46, NULL ); + if ( !nError ) + aMenuTitle = String( aCompactedSystemPath ); + else + aMenuTitle = aSystemPath; + } + else + { + // Use INetURLObject to abbreviate all other URLs + Reference< XStringWidth > xStringLength( new RecentFilesStringLength() ); + aMenuTitle = aURLObj.getAbbreviated( xStringLength, 46, INetURLObject::DECODE_UNAMBIGUOUS ); + } + rtl::OUStringBuffer aBuf( aMenuTitle.getLength() + 5 ); + if( i < 9 ) + { + aBuf.append( sal_Unicode( '~' ) ); + aBuf.append( i+1 ); + } + else if( i == 9 ) + aBuf.appendAscii( "1~0" ); + else + aBuf.append( i+1 ); + aBuf.appendAscii( ": " ); + aBuf.append( aMenuTitle ); + mpRecentMenu->InsertItem( i+1, aBuf.makeStringAndClear() ); + } + maOpenButton.SetPopupMenu( mpRecentMenu ); + } +} + void BackingWindow::initBackground() { SetBackground( GetSettings().GetStyleSettings().GetWorkspaceGradient() ); @@ -348,6 +480,10 @@ void BackingWindow::initBackground() else mnBtnPos = maBackgroundLeft.GetSizePixel().Width() + 40; } + + maOpenButton.SetMenuMode( MENUBUTTON_MENUMODE_TIMED ); + maOpenButton.SetSelectHdl( LINK( this, BackingWindow, SelectHdl ) ); + prepareRecentFileMenu(); } void BackingWindow::initControls() @@ -534,7 +670,7 @@ void BackingWindow::initControls() Resize(); } -void BackingWindow::loadImage( const ResId& i_rId, ImageButton& i_rButton ) +void BackingWindow::loadImage( const ResId& i_rId, PushButton& i_rButton ) { BitmapEx aBmp( i_rId ); Size aImgSize( aBmp.GetSizePixel() ); @@ -549,7 +685,7 @@ void BackingWindow::layoutButtonAndText( const char* i_pURL, int nColumn, const std::set& i_rURLS, SvtModuleOptions& i_rOpt, SvtModuleOptions::EModule i_eMod, - ImageButton& i_rBtn, FixedText& i_rText, + PushButton& i_rBtn, FixedText& i_rText, MnemonicGenerator& i_rMnemns, const String& i_rStr ) @@ -865,6 +1001,20 @@ IMPL_LINK( BackingWindow, ClickHdl, Button*, pButton ) return 0; } +IMPL_LINK( BackingWindow, SelectHdl, Button*, pButton ) +{ + if( pButton == &maOpenButton ) + { + sal_Int32 nItem = sal_Int32(maOpenButton.GetCurItemId())-1; + if( nItem >= 0 && nItem < sal_Int32(maRecentFiles.size()) ) + { + Reference< XDispatchProvider > xFrame( mxFrame, UNO_QUERY ); + dispatchURL( maRecentFiles[nItem].aTargetURL, rtl::OUString(), xFrame, maRecentFiles[nItem].aArgSeq ); + } + } + return 0; +} + Window* BackingWindow::GetParentLabelFor( const Window* pLabel ) const { const Window* pRet = NULL; diff --git a/framework/source/services/backingwindow.hxx b/framework/source/services/backingwindow.hxx index 7b7dfa34b110..597caefce8ad 100644 --- a/framework/source/services/backingwindow.hxx +++ b/framework/source/services/backingwindow.hxx @@ -31,6 +31,7 @@ #include "rtl/ustring.hxx" #include "vcl/button.hxx" +#include "vcl/menubtn.hxx" #include "vcl/fixed.hxx" #include "vcl/bitmapex.hxx" #include "vcl/toolbox.hxx" @@ -77,6 +78,12 @@ namespace framework class BackingWindow : public Window { + struct LoadRecentFile + { + rtl::OUString aTargetURL; + com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue > aArgSeq; + }; + com::sun::star::uno::Reference mxDesktop; com::sun::star::uno::Reference mxDesktopDispatchProvider; com::sun::star::uno::Reference mxFrame; @@ -93,7 +100,7 @@ namespace framework FixedText maImpressText; ImageButton maImpressButton; FixedText maOpenText; - ImageButton maOpenButton; + MenuButton maOpenButton; FixedText maDrawText; ImageButton maDrawButton; FixedText maDBText; @@ -130,6 +137,9 @@ namespace framework svt::AcceleratorExecute* mpAccExec; long mnBtnPos; + PopupMenu* mpRecentMenu; + std::vector< LoadRecentFile > maRecentFiles; + static const int nItemId_Extensions = 1; static const int nItemId_Reg = 2; static const int nItemId_Info = 3; @@ -139,11 +149,11 @@ namespace framework static const int nShadowRight = 45; static const int nShadowBottom = 50; - void loadImage( const ResId& i_rId, ImageButton& i_rButton ); + void loadImage( const ResId& i_rId, PushButton& i_rButton ); void layoutButtonAndText( const char* i_pURL, int nColumn, const std::set& i_rURLS, SvtModuleOptions& i_rOpt, SvtModuleOptions::EModule i_eMod, - ImageButton& i_rBtn, FixedText& i_rText, + PushButton& i_rBtn, FixedText& i_rText, MnemonicGenerator& i_rMnemonicGen, const String& i_rStr = String() ); @@ -155,10 +165,12 @@ namespace framework ); DECL_LINK( ClickHdl, Button* ); + DECL_LINK( SelectHdl, Button* ); DECL_LINK( ToolboxHdl, void* ); void initControls(); void initBackground(); + void prepareRecentFileMenu(); public: BackingWindow( Window* pParent ); ~BackingWindow(); @@ -169,7 +181,7 @@ namespace framework virtual void DataChanged( const DataChangedEvent& rDCEvt ); virtual Window* GetParentLabelFor( const Window* pLabel ) const; virtual Window* GetParentLabeledBy( const Window* pLabeled ) const; - virtual void GetFocus(); + virtual void GetFocus(); void setOwningFrame( const com::sun::star::uno::Reference< com::sun::star::frame::XFrame >& xFrame ); }; diff --git a/framework/source/services/fwk_services.src b/framework/source/services/fwk_services.src index 7e2ee3253e71..a615cbd55d73 100644 --- a/framework/source/services/fwk_services.src +++ b/framework/source/services/fwk_services.src @@ -51,7 +51,7 @@ Window DLG_BACKING }; String STR_BACKING_FILE { - Text [ en-US ] = "~Open a document..."; + Text [ en-US ] = "~Open..."; }; Bitmap BMP_BACKING_WRITER { -- cgit v1.2.3 From c8bc53153321b98fd9d8db898c64e827448f4fc4 Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Tue, 13 Apr 2010 18:49:30 +0200 Subject: l10ntooling18: #i109378# added gsicheck wrapper script for command line usage --- solenv/bin/gsicheck | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 solenv/bin/gsicheck diff --git a/solenv/bin/gsicheck b/solenv/bin/gsicheck new file mode 100755 index 000000000000..9b898c9d5950 --- /dev/null +++ b/solenv/bin/gsicheck @@ -0,0 +1,18 @@ +#!/bin/sh +if [ x${SOLARENV}x = xx ]; then + echo No environment found, please use 'setsolar' +exit 1 +fi + +if [ "${OS?}" = MACOSX ]; then + export DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH+${DYLD_LIBRARY_PATH}:}${SOLARVERSION?}/${INPATH?}/lib${UPDMINOREXT} +else + export LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${SOLARVERSION?}/${INPATH?}/lib${UPDMINOREXT} +fi + +if [ x${SOLARVER}x = xx -o x${UPDMINOREXT}x = xx ]; then + exec $SOLARVERSION/$INPATH/bin/gsicheck "$@" +else + exec $SOLARVERSION/$INPATH/bin$UPDMINOREXT/gsicheck "$@" +fi + -- cgit v1.2.3 From 8b570a04e1bd1f5e2f49f13c4c377dbeb2ca6928 Mon Sep 17 00:00:00 2001 From: "Herbert Duerr [hdu]" Date: Wed, 14 Apr 2010 09:28:17 +0200 Subject: #i107915# fix vertical writing for non-BMP CJK chars --- vcl/source/gdi/sallayout.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/vcl/source/gdi/sallayout.cxx b/vcl/source/gdi/sallayout.cxx index 008a64f615f2..3e4ca9fc3df6 100755 --- a/vcl/source/gdi/sallayout.cxx +++ b/vcl/source/gdi/sallayout.cxx @@ -133,18 +133,19 @@ int GetVerticalFlags( sal_UCS4 nChar ) /* #i52932# remember: nChar == 0x2010 || nChar == 0x2015 nChar == 0x2016 || nChar == 0x2026 - are GF_NONE also, but already handled in the first if + are GF_NONE also, but already handled in the outer if condition */ if((nChar >= 0x3008 && nChar <= 0x301C && nChar != 0x3012) || (nChar == 0xFF3B || nChar == 0xFF3D) || (nChar >= 0xFF5B && nChar <= 0xFF9F) // halfwidth forms - || (nChar == 0xFFE3) - || (nChar >= 0x02F800 && nChar <= 0x02FFFF) ) + || (nChar == 0xFFE3) ) return GF_NONE; // not rotated else if( nChar == 0x30fc ) return GF_ROTR; // right return GF_ROTL; // left } + else if( (nChar >= 0x02F800 && nChar <= 0x02FFFF) ) // non-BMP CJK ideographs + return GF_NONE; // not rotated return GF_NONE; } -- cgit v1.2.3 From 2f030c991f7de0b09dc4dd6210f2b99511b69509 Mon Sep 17 00:00:00 2001 From: "Herbert Duerr [hdu]" Date: Wed, 14 Apr 2010 14:45:43 +0200 Subject: #i110240# fix emulation of hflex/hflex1 type2ops for type1 subset --- vcl/source/fontsubset/cff.cxx | 31 ++++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) diff --git a/vcl/source/fontsubset/cff.cxx b/vcl/source/fontsubset/cff.cxx index 9884e7016fee..d3cbd7e7bfbf 100644 --- a/vcl/source/fontsubset/cff.cxx +++ b/vcl/source/fontsubset/cff.cxx @@ -468,7 +468,7 @@ public: // TODO: is public really needed? private: // typeop exceution context int mnStackIdx; - ValType mnValStack[ NMAXSTACK]; + ValType mnValStack[ NMAXSTACK+4]; ValType mnTransVals[ NMAXTRANS]; int mnHintSize; @@ -1241,16 +1241,33 @@ void CffSubsetterContext::convertOneTypeEsc( void) break; } case TYPE2OP::HFLEX1: { - assert( mnStackIdx == 9 ); - writeCurveTo( mnStackIdx, -9, -8, -7, -6, -5, -6 ); - writeCurveTo( mnStackIdx, -4, -6, -3, -2, -1, -8 ); + assert( mnStackIdx == 9); +#if 0 // emulate hflex1 as straight line + const ValType* pX = &mnValStack[ mnStackIdx]; + const ValType fDX = pX[-9] + pX[-7] + pX[-5] + pX[-4] + pX[-3] + pX[-1]; + writeType1Val( fDX); + writeTypeOp( TYPE1OP::HLINETO); +#else // emulate hflex1 as two curves + writeCurveTo( mnStackIdx, -9, -8, -7, -6, -5, 0); + writeCurveTo( mnStackIdx, -4, 0, -3, -2, -1, 0); + // TODO: emulate hflex1 using othersubr call +#endif mnStackIdx -= 9; } break; case TYPE2OP::HFLEX: { - assert( mnStackIdx == 7 ); - writeCurveTo( mnStackIdx, -7, 0, -6, -5, -4, -5 ); - writeCurveTo( mnStackIdx, -3, -5, -2, 0, -1, 0 ); + assert( mnStackIdx == 7); + ValType* pX = &mnValStack[ mnStackIdx]; +#if 0 // emulate hflex as straight line + const ValType fDX = pX[-7] + pX[-6] + pX[-4] + pX[-3] + pX[-2] + pX[-1]; + writeType1Val( fDX); + writeTypeOp( TYPE1OP::HLINETO); +#else // emulate hflex as two curves + pX[+1] = -pX[-5]; // temp: +dy5==-dy2 + writeCurveTo( mnStackIdx, -7, 0, -6, -5, -4, 0); + writeCurveTo( mnStackIdx, -3, 0, -2, +1, -1, 0); + // TODO: emulate hflex using othersubr call +#endif mnStackIdx -= 7; } break; -- cgit v1.2.3 From 5b8d16eb981022d62e6f2fc5e27603c849807e53 Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Wed, 14 Apr 2010 17:17:09 +0200 Subject: aw081 #i110861# corrected mpSdrPageProperties usages in SdrPage implementation to do the right things in the right situations --- svx/inc/svx/svdpage.hxx | 1 - svx/source/svdraw/svdpage.cxx | 45 +++++++++++++++++++++++++++---------------- 2 files changed, 28 insertions(+), 18 deletions(-) diff --git a/svx/inc/svx/svdpage.hxx b/svx/inc/svx/svdpage.hxx index 29cf17ec9180..c601fddef181 100644 --- a/svx/inc/svx/svdpage.hxx +++ b/svx/inc/svx/svdpage.hxx @@ -376,7 +376,6 @@ private: public: // construct/destruct SdrPageProperties(SdrPage& rSdrPage); - SdrPageProperties(const SdrPageProperties& rCandidate); virtual ~SdrPageProperties(); // Notify(...) from baseclass SfxListener diff --git a/svx/source/svdraw/svdpage.cxx b/svx/source/svdraw/svdpage.cxx index 6dd816d429da..6cc3460875bb 100644 --- a/svx/source/svdraw/svdpage.cxx +++ b/svx/source/svdraw/svdpage.cxx @@ -1221,18 +1221,6 @@ SdrPageProperties::SdrPageProperties(SdrPage& rSdrPage) } } -SdrPageProperties::SdrPageProperties(const SdrPageProperties& rCandidate) -: SfxListener(), - mpSdrPage(rCandidate.mpSdrPage), - mpStyleSheet(0), - mpProperties(new SfxItemSet(*rCandidate.mpProperties)) -{ - if(rCandidate.GetStyleSheet()) - { - ImpAddStyleSheet(*rCandidate.GetStyleSheet()); - } -} - SdrPageProperties::~SdrPageProperties() { ImpRemoveStyleSheet(); @@ -1365,6 +1353,8 @@ SdrPage::SdrPage(const SdrPage& rSrcPage) // Warning: this leads to slicing (see issue 93186) and has to be // removed as soon as possible. *this = rSrcPage; + OSL_ENSURE(mpSdrPageProperties, + "SdrPage::SdrPage: operator= did not create needed SdrPageProperties (!)"); // be careful and correct eListKind, a member of SdrObjList which // will be changed by the SdrOIbjList::operator= before... @@ -1382,8 +1372,6 @@ SdrPage::SdrPage(const SdrPage& rSrcPage) mxUnoPage = NULL; xComponent->dispose(); } - - mpSdrPageProperties = new SdrPageProperties(rSrcPage.getSdrPageProperties()); } SdrPage::~SdrPage() @@ -1478,8 +1466,21 @@ void SdrPage::operator=(const SdrPage& rSrcPage) mbObjectsNotPersistent = rSrcPage.mbObjectsNotPersistent; { - delete mpSdrPageProperties; - mpSdrPageProperties = new SdrPageProperties(rSrcPage.getSdrPageProperties()); + if(!mpSdrPageProperties) + { + mpSdrPageProperties = new SdrPageProperties(*this); + } + else + { + mpSdrPageProperties->ClearItem(0); + } + + if(!IsMasterPage()) + { + mpSdrPageProperties->PutItemSet(rSrcPage.getSdrPageProperties().GetItemSet()); + } + + mpSdrPageProperties->SetStyleSheet(rSrcPage.getSdrPageProperties().GetStyleSheet()); } // Now copy the contained obejcts (by cloning them) @@ -1659,7 +1660,17 @@ void SdrPage::SetModel(SdrModel* pNewModel) } pLayerAdmin->SetModel(pNewModel); - SdrPageProperties *pNew = new SdrPageProperties(getSdrPageProperties()); + // create new SdrPageProperties with new model (due to SfxItemSet there) + // and copy ItemSet and StyleSheet + SdrPageProperties *pNew = new SdrPageProperties(*this); + + if(!IsMasterPage()) + { + pNew->PutItemSet(getSdrPageProperties().GetItemSet()); + } + + pNew->SetStyleSheet(getSdrPageProperties().GetStyleSheet()); + delete mpSdrPageProperties; mpSdrPageProperties = pNew; } -- cgit v1.2.3 From 7ff2125a6163e6734f9e6065d61bf71a9b6b68c3 Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Thu, 15 Apr 2010 11:27:39 +0200 Subject: aw081 #i110846# added needed exceptions to do the right hing for MasterPages with no style sheets --- svx/inc/svx/sdrmasterpagedescriptor.hxx | 2 -- .../contact/viewcontactofmasterpagedescriptor.cxx | 27 ++++++++++++++++++---- svx/source/sdr/contact/viewcontactofsdrpage.cxx | 16 +++++++++---- svx/source/svdraw/sdrmasterpagedescriptor.cxx | 12 ---------- 4 files changed, 35 insertions(+), 22 deletions(-) diff --git a/svx/inc/svx/sdrmasterpagedescriptor.hxx b/svx/inc/svx/sdrmasterpagedescriptor.hxx index 8325d2a57fa1..612f2ab927ec 100644 --- a/svx/inc/svx/sdrmasterpagedescriptor.hxx +++ b/svx/inc/svx/sdrmasterpagedescriptor.hxx @@ -89,8 +89,6 @@ namespace sdr // operators sal_Bool operator==(const MasterPageDescriptor& rCandidate) const; sal_Bool operator!=(const MasterPageDescriptor& rCandidate) const; - - const SfxItemSet& getCorrectFillAttributes() const; }; } // end of namespace sdr diff --git a/svx/source/sdr/contact/viewcontactofmasterpagedescriptor.cxx b/svx/source/sdr/contact/viewcontactofmasterpagedescriptor.cxx index ba260e79bba9..cbe9c4a9c615 100644 --- a/svx/source/sdr/contact/viewcontactofmasterpagedescriptor.cxx +++ b/svx/source/sdr/contact/viewcontactofmasterpagedescriptor.cxx @@ -61,11 +61,30 @@ namespace sdr drawinglayer::primitive2d::Primitive2DSequence ViewContactOfMasterPageDescriptor::createViewIndependentPrimitive2DSequence() const { drawinglayer::primitive2d::Primitive2DSequence xRetval; + drawinglayer::attribute::SdrFillAttribute aFill; + const SdrPage* pCorrectPage = &GetMasterPageDescriptor().GetOwnerPage(); + const SdrPageProperties* pCorrectProperties = &pCorrectPage->getSdrPageProperties(); - // build primitive from page fill attributes - const SfxItemSet& rPageFillAttributes = GetMasterPageDescriptor().getCorrectFillAttributes(); - const drawinglayer::attribute::SdrFillAttribute aFill( - drawinglayer::primitive2d::createNewSdrFillAttribute(rPageFillAttributes)); + if(XFILL_NONE == ((const XFillStyleItem&)pCorrectProperties->GetItemSet().Get(XATTR_FILLSTYLE)).GetValue()) + { + pCorrectPage = &GetMasterPageDescriptor().GetUsedPage(); + pCorrectProperties = &pCorrectPage->getSdrPageProperties(); + } + + if(pCorrectPage->IsMasterPage() && !pCorrectProperties->GetStyleSheet()) + { + // #i110846# Suppress SdrPage FillStyle for MasterPages without StyleSheets, + // else the PoolDefault (XFILL_COLOR and Blue8) will be used. Normally, all + // MasterPages should have a StyleSheet excactly for this reason, but historically + // e.g. the Notes MasterPage has no StyleSheet set (and there maybe others). + pCorrectProperties = 0; + } + + if(pCorrectProperties) + { + // create page fill attributes when correct properties were identified + aFill = drawinglayer::primitive2d::createNewSdrFillAttribute(pCorrectProperties->GetItemSet()); + } if(!aFill.isDefault()) { diff --git a/svx/source/sdr/contact/viewcontactofsdrpage.cxx b/svx/source/sdr/contact/viewcontactofsdrpage.cxx index e486f978fafb..b80b6fcbba88 100644 --- a/svx/source/sdr/contact/viewcontactofsdrpage.cxx +++ b/svx/source/sdr/contact/viewcontactofsdrpage.cxx @@ -203,10 +203,18 @@ namespace sdr } else { - // build primitive from pObject's attributes - const SfxItemSet& rFillAttributes = rPage.getSdrPageProperties().GetItemSet(); - const drawinglayer::attribute::SdrFillAttribute aFill( - drawinglayer::primitive2d::createNewSdrFillAttribute(rFillAttributes)); + drawinglayer::attribute::SdrFillAttribute aFill; + + // #i110846# Suppress SdrPage FillStyle for MasterPages without StyleSheets, + // else the PoolDefault (XFILL_COLOR and Blue8) will be used. Normally, all + // MasterPages should have a StyleSheet excactly for this reason, but historically + // e.g. the Notes MasterPage has no StyleSheet set (and there maybe others). + if(rPage.getSdrPageProperties().GetStyleSheet()) + { + // create page fill attributes with correct properties + aFill = drawinglayer::primitive2d::createNewSdrFillAttribute( + rPage.getSdrPageProperties().GetItemSet()); + } if(!aFill.isDefault()) { diff --git a/svx/source/svdraw/sdrmasterpagedescriptor.cxx b/svx/source/svdraw/sdrmasterpagedescriptor.cxx index 6bcdd8f55856..67b2de8b693c 100644 --- a/svx/source/svdraw/sdrmasterpagedescriptor.cxx +++ b/svx/source/svdraw/sdrmasterpagedescriptor.cxx @@ -113,18 +113,6 @@ namespace sdr || &maUsedPage != &rCandidate.maUsedPage || maVisibleLayers != rCandidate.maVisibleLayers); } - - const SfxItemSet& MasterPageDescriptor::getCorrectFillAttributes() const - { - const SfxItemSet& rOwnerPageAtributes = GetOwnerPage().getSdrPageProperties().GetItemSet(); - - if(XFILL_NONE != ((const XFillStyleItem&)rOwnerPageAtributes.Get(XATTR_FILLSTYLE)).GetValue()) - { - return rOwnerPageAtributes; - } - - return GetUsedPage().getSdrPageProperties().GetItemSet(); - } } // end of namespace sdr ////////////////////////////////////////////////////////////////////////////// -- cgit v1.2.3 From b09ce90f0a73acff0c0272978c6e5514325e913e Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Thu, 15 Apr 2010 13:20:32 +0200 Subject: aw081 #i110779# Adapted DoDepthArrange to use logical AND PolyPolygon checks instead of IsInside checks to get bettter quality --- svx/source/engine3d/view3d.cxx | 170 +++++++++++++++++------------------------ 1 file changed, 69 insertions(+), 101 deletions(-) diff --git a/svx/source/engine3d/view3d.cxx b/svx/source/engine3d/view3d.cxx index 97fee2250658..047faef2cb41 100644 --- a/svx/source/engine3d/view3d.cxx +++ b/svx/source/engine3d/view3d.cxx @@ -75,6 +75,7 @@ #include #include #include +#include #define ITEMVALUE(ItemSet,Id,Cast) ((const Cast&)(ItemSet).Get(Id)).GetValue() @@ -1066,77 +1067,39 @@ void E3dView::ConvertMarkedObjTo3D(BOOL bExtrude, basegfx::B2DPoint aPnt1, baseg struct E3dDepthNeighbour { - E3dDepthNeighbour* pNext; - E3dExtrudeObj* pObj; - - E3dDepthNeighbour() { pNext = NULL; pObj = NULL; } + E3dDepthNeighbour* mpNext; + E3dExtrudeObj* mpObj; + basegfx::B2DPolyPolygon maPreparedPolyPolygon; + + E3dDepthNeighbour() + : mpNext(0), + mpObj(0), + maPreparedPolyPolygon() + { + } }; struct E3dDepthLayer { - E3dDepthLayer* pDown; - E3dDepthNeighbour* pNext; - - E3dDepthLayer() { pDown = NULL; pNext = NULL; } - ~E3dDepthLayer() { while(pNext) { E3dDepthNeighbour* pSucc = pNext->pNext; delete pNext; pNext = pSucc; }} -}; - -bool ImpDoesOverlap(const basegfx::B2DPolygon& rPolygonA, const basegfx::B2DPolygon& rPolygonB) -{ - bool bRetval(false); - const basegfx::B2DRange aRangeA(basegfx::tools::getRange(rPolygonA)); - const basegfx::B2DRange aRangeB(basegfx::tools::getRange(rPolygonB)); + E3dDepthLayer* mpDown; + E3dDepthNeighbour* mpNext; - if(aRangeA.overlaps(aRangeB)) + E3dDepthLayer() + : mpDown(0), + mpNext(0) { - // A in B ? - if(basegfx::tools::isInside(rPolygonA, rPolygonB)) - return true; - - // B in A ? - if(basegfx::tools::isInside(rPolygonB, rPolygonA)) - return true; - - // A and B the same ? - if(basegfx::tools::isInside(rPolygonB, rPolygonA, true)) - return true; } - return bRetval; -} - -bool ImpDoesOverlap(const basegfx::B2DPolyPolygon& rPolyPolygonA, const basegfx::B2DPolyPolygon& rPolyPolygonB) -{ - bool bRetval(false); - const basegfx::B2DRange aRangeA(basegfx::tools::getRange(rPolyPolygonA)); - const basegfx::B2DRange aRangeB(basegfx::tools::getRange(rPolyPolygonB)); - - if(aRangeA.overlaps(aRangeB)) + ~E3dDepthLayer() { - const sal_uInt32 nCntA(rPolyPolygonA.count()); - const sal_uInt32 nCntB(rPolyPolygonB.count()); - - for(sal_uInt32 a(0L); !bRetval && a < nCntA; a++) + while(mpNext) { - const basegfx::B2DPolygon aPolygonA(rPolyPolygonA.getB2DPolygon(a)); - - if(aPolygonA.isClosed()) - { - for(sal_uInt32 b(0L); !bRetval && b < nCntB; b++) - { - const basegfx::B2DPolygon aPolygonB(rPolyPolygonB.getB2DPolygon(b)); - - if(aPolygonB.isClosed()) - { - bRetval = ImpDoesOverlap(aPolygonA, aPolygonB); - } - } - } + E3dDepthNeighbour* pSucc = mpNext->mpNext; + delete mpNext; + mpNext = pSucc; } } - - return bRetval; -} +}; void E3dView::DoDepthArrange(E3dScene* pScene, double fDepth) { @@ -1147,39 +1110,41 @@ void E3dView::DoDepthArrange(E3dScene* pScene, double fDepth) E3dDepthLayer* pBaseLayer = NULL; E3dDepthLayer* pLayer = NULL; INT32 nNumLayers = 0; - //SfxItemPool& rPool = pMod->GetItemPool(); while(aIter.IsMore()) { - E3dObject* pSubObj = (E3dObject*)aIter.Next(); + E3dExtrudeObj* pExtrudeObj = dynamic_cast< E3dExtrudeObj* >(aIter.Next()); - if(pSubObj && pSubObj->ISA(E3dExtrudeObj)) + if(pExtrudeObj) { - E3dExtrudeObj* pExtrudeObj = (E3dExtrudeObj*)pSubObj; - const basegfx::B2DPolyPolygon aExtrudePoly(pExtrudeObj->GetExtrudePolygon()); - + const basegfx::B2DPolyPolygon aExtrudePoly( + basegfx::tools::prepareForPolygonOperation(pExtrudeObj->GetExtrudePolygon())); const SfxItemSet& rLocalSet = pExtrudeObj->GetMergedItemSet(); - XFillStyle eLocalFillStyle = ITEMVALUE(rLocalSet, XATTR_FILLSTYLE, XFillStyleItem); - Color aLocalColor = ((const XFillColorItem&)(rLocalSet.Get(XATTR_FILLCOLOR))).GetColorValue(); + const XFillStyle eLocalFillStyle = ITEMVALUE(rLocalSet, XATTR_FILLSTYLE, XFillStyleItem); + const Color aLocalColor = ((const XFillColorItem&)(rLocalSet.Get(XATTR_FILLCOLOR))).GetColorValue(); - // ExtrudeObj einordnen + // sort in ExtrudeObj if(pLayer) { - // Gibt es eine Ueberschneidung mit einem Objekt dieses - // Layers? - BOOL bOverlap(FALSE); - E3dDepthNeighbour* pAct = pLayer->pNext; + // do we have overlap with an object of this layer? + bool bOverlap(false); + E3dDepthNeighbour* pAct = pLayer->mpNext; while(!bOverlap && pAct) { - // ueberlappen sich pAct->pObj und pExtrudeObj ? - const basegfx::B2DPolyPolygon aActPoly(pAct->pObj->GetExtrudePolygon()); - bOverlap = ImpDoesOverlap(aExtrudePoly, aActPoly); + // do pAct->mpObj and pExtrudeObj overlap? Check by + // using logical AND clipping + const basegfx::B2DPolyPolygon aAndPolyPolygon( + basegfx::tools::solvePolygonOperationAnd( + aExtrudePoly, + pAct->maPreparedPolyPolygon)); + + bOverlap = (0 != aAndPolyPolygon.count()); if(bOverlap) { // second ciriteria: is another fillstyle or color used? - const SfxItemSet& rCompareSet = pAct->pObj->GetMergedItemSet(); + const SfxItemSet& rCompareSet = pAct->mpObj->GetMergedItemSet(); XFillStyle eCompareFillStyle = ITEMVALUE(rCompareSet, XATTR_FILLSTYLE, XFillStyleItem); @@ -1201,71 +1166,74 @@ void E3dView::DoDepthArrange(E3dScene* pScene, double fDepth) } } - pAct = pAct->pNext; + pAct = pAct->mpNext; } if(bOverlap) { - // ja, beginne einen neuen Layer - pLayer->pDown = new E3dDepthLayer; - pLayer = pLayer->pDown; + // yes, start a new layer + pLayer->mpDown = new E3dDepthLayer; + pLayer = pLayer->mpDown; nNumLayers++; - pLayer->pNext = new E3dDepthNeighbour; - pLayer->pNext->pObj = pExtrudeObj; + pLayer->mpNext = new E3dDepthNeighbour; + pLayer->mpNext->mpObj = pExtrudeObj; + pLayer->mpNext->maPreparedPolyPolygon = aExtrudePoly; } else { - // nein, Objekt kann in aktuellen Layer + // no, add to current layer E3dDepthNeighbour* pNewNext = new E3dDepthNeighbour; - pNewNext->pObj = pExtrudeObj; - pNewNext->pNext = pLayer->pNext; - pLayer->pNext = pNewNext; + pNewNext->mpObj = pExtrudeObj; + pNewNext->maPreparedPolyPolygon = aExtrudePoly; + pNewNext->mpNext = pLayer->mpNext; + pLayer->mpNext = pNewNext; } } else { - // erster Layer ueberhaupt + // first layer ever pBaseLayer = new E3dDepthLayer; pLayer = pBaseLayer; nNumLayers++; - pLayer->pNext = new E3dDepthNeighbour; - pLayer->pNext->pObj = pExtrudeObj; + pLayer->mpNext = new E3dDepthNeighbour; + pLayer->mpNext->mpObj = pExtrudeObj; + pLayer->mpNext->maPreparedPolyPolygon = aExtrudePoly; } } } - // Anzahl Layer steht fest + // number of layers is done if(nNumLayers > 1) { - // Arrangement ist notwendig + // need to be arranged double fMinDepth = fDepth * 0.8; double fStep = (fDepth - fMinDepth) / (double)nNumLayers; pLayer = pBaseLayer; while(pLayer) { - // an pLayer entlangspazieren - E3dDepthNeighbour* pAct = pLayer->pNext; + // move along layer + E3dDepthNeighbour* pAct = pLayer->mpNext; while(pAct) { - // Anpassen - pAct->pObj->SetMergedItem(SfxUInt32Item(SDRATTR_3DOBJ_DEPTH, sal_uInt32(fMinDepth + 0.5))); + // adapt extrude value + pAct->mpObj->SetMergedItem(SfxUInt32Item(SDRATTR_3DOBJ_DEPTH, sal_uInt32(fMinDepth + 0.5))); - // Naechster Eintrag - pAct = pAct->pNext; + // next + pAct = pAct->mpNext; } - // naechster Layer - pLayer = pLayer->pDown; + // next layer + pLayer = pLayer->mpDown; fMinDepth += fStep; } } - // angelegte Strukturen aufraeumen + // cleanup while(pBaseLayer) { - pLayer = pBaseLayer->pDown; + pLayer = pBaseLayer->mpDown; delete pBaseLayer; pBaseLayer = pLayer; } -- cgit v1.2.3 From a4ed25efafb27d3d5acfd5502f2ad3fb90304d95 Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Thu, 15 Apr 2010 13:28:36 +0200 Subject: aw081 #i110731# adapted mfCenterZ to double --- drawinglayer/source/processor3d/zbufferprocessor3d.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drawinglayer/source/processor3d/zbufferprocessor3d.cxx b/drawinglayer/source/processor3d/zbufferprocessor3d.cxx index 326b9d392999..b06718d01ccb 100644 --- a/drawinglayer/source/processor3d/zbufferprocessor3d.cxx +++ b/drawinglayer/source/processor3d/zbufferprocessor3d.cxx @@ -487,7 +487,7 @@ private: boost::shared_ptr< drawinglayer::texture::GeoTexSvx > mpTransparenceGeoTexSvx; drawinglayer::attribute::MaterialAttribute3D maMaterial; basegfx::B3DPolyPolygon maPolyPolygon; - sal_uInt32 mfCenterZ; + double mfCenterZ; // bitfield bool mbModulate : 1; -- cgit v1.2.3 From 613cb2b85d6c0bd2b1c9fb04890f6772f25143f1 Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Thu, 15 Apr 2010 13:31:48 +0200 Subject: aw081 #i110731# added basegfx::fround to get to integer cleaner --- slideshow/source/engine/slideshowimpl.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/slideshow/source/engine/slideshowimpl.cxx b/slideshow/source/engine/slideshowimpl.cxx index d2af8c0daaed..d736c3f52d64 100644 --- a/slideshow/source/engine/slideshowimpl.cxx +++ b/slideshow/source/engine/slideshowimpl.cxx @@ -1545,7 +1545,9 @@ void SlideShowImpl::registerUserPaintPolygons( const uno::Reference< lang::XMult for( sal_uInt32 n = 0; n < nPoints; n++ ) { //Create a point from the polygon - *pInnerSequence++ = awt::Point( aPoly.getB2DPoint(n).getX(), aPoly.getB2DPoint(n).getY()); + *pInnerSequence++ = awt::Point( + basegfx::fround(aPoly.getB2DPoint(n).getX()), + basegfx::fround(aPoly.getB2DPoint(n).getY())); } //Fill the properties -- cgit v1.2.3 From 03b7bc0ba9614ed80fca87be41d263818574cfae Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Thu, 15 Apr 2010 13:45:37 +0200 Subject: aw081 #i108255# simplified SdrPathPrimitive2D::create2DDecomposition by removing correctOrientations there; for paint the corrections are not needed and may get expensive for complex polygons --- svx/source/sdr/primitive2d/sdrpathprimitive2d.cxx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/svx/source/sdr/primitive2d/sdrpathprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrpathprimitive2d.cxx index ac9b6307dd05..2ceea2c69b7d 100644 --- a/svx/source/sdr/primitive2d/sdrpathprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrpathprimitive2d.cxx @@ -51,13 +51,11 @@ namespace drawinglayer if(!getSdrLFSTAttribute().getFill().isDefault() && getUnitPolyPolygon().isClosed()) { - // take care for orientations - const basegfx::B2DPolyPolygon aOrientedUnitPolyPolygon( - basegfx::tools::correctOrientations(getUnitPolyPolygon())); - + // #i108255# no need to use correctOrientations here; target is + // straight visualisation appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createPolyPolygonFillPrimitive( - aOrientedUnitPolyPolygon, + getUnitPolyPolygon(), getTransform(), getSdrLFSTAttribute().getFill(), getSdrLFSTAttribute().getFillFloatTransGradient())); -- cgit v1.2.3 From d1a9c0e770c7c83aa46bdfa0e54283720dd1a79d Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Thu, 15 Apr 2010 17:55:20 +0200 Subject: aw081 #i106516# corrected clipping error with metafile rendering --- drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx index 0bc1b57113b8..fe73b224bc10 100644 --- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx @@ -1429,7 +1429,11 @@ namespace drawinglayer { // there is already a clip polygon set; build clipped union of // current mask polygon and new one - maClipPolyPolygon = basegfx::tools::clipPolyPolygonOnPolyPolygon(aMask, maClipPolyPolygon, false, false); + maClipPolyPolygon = basegfx::tools::clipPolyPolygonOnPolyPolygon( + aMask, + maClipPolyPolygon, + true, // #i106516# we want the inside of aMask, not the outside + false); } else { -- cgit v1.2.3 From a075cefbec52ef6b02cd631e8a5b1319aadd3e03 Mon Sep 17 00:00:00 2001 From: "Herbert Duerr [hdu]" Date: Fri, 16 Apr 2010 14:11:19 +0200 Subject: #i108743# fix psp\'s getGlyphWidths() for non-type1 fonts --- vcl/unx/source/fontmanager/fontmanager.cxx | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/vcl/unx/source/fontmanager/fontmanager.cxx b/vcl/unx/source/fontmanager/fontmanager.cxx index 93e3eef53ab3..606a57071d64 100644 --- a/vcl/unx/source/fontmanager/fontmanager.cxx +++ b/vcl/unx/source/fontmanager/fontmanager.cxx @@ -40,6 +40,7 @@ #include "vcl/fontcache.hxx" #include "vcl/fontcache.hxx" #include "vcl/fontsubset.hxx" +#include "vcl/impfont.hxx" #include "vcl/strhelper.hxx" #include "vcl/ppdparser.hxx" #include "vcl/svdata.hxx" @@ -3795,6 +3796,35 @@ void PrintFontManager::getGlyphWidths( fontID nFont, free( pMetrics ); rUnicodeEnc.clear(); } + + // fill the unicode map + // TODO: isn't this map already available elsewhere in the fontmanager? + const sal_uInt8* pCmapData = NULL; + int nCmapSize = 0; + if( GetSfntTable( pTTFont, O_cmap, &pCmapData, &nCmapSize ) ) + { + CmapResult aCmapResult; + if( ParseCMAP( pCmapData, nCmapSize, aCmapResult ) ) + { + const ImplFontCharMap aCharMap( aCmapResult ); + for( sal_uInt32 cOld = 0;;) + { + // get next unicode covered by font + const sal_uInt32 c = aCharMap.GetNextChar( cOld ); + if( c == cOld ) + break; + cOld = c; +#if (sizeof(sal_Unicode) <= 2) // TODO: remove when sal_Unicode covers all of unicode + if( c > 0xFFFF ) + break; +#endif + // get the matching glyph index + const sal_uInt32 nGlyphId = aCharMap.GetGlyphIndex( c ); + // update the requested map + rUnicodeEnc[ (sal_Unicode)c ] = nGlyphId; + } + } + } } CloseTTFont( pTTFont ); } -- cgit v1.2.3 From 9638a02039d3d286ba620c751cb9c43b0853df6c Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Tue, 20 Apr 2010 09:51:20 +0200 Subject: cws tl80: #i106004# selection window title changed --- starmath/source/smres.src | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 starmath/source/smres.src diff --git a/starmath/source/smres.src b/starmath/source/smres.src old mode 100644 new mode 100755 index 64891a95daf9..3ba2f49026eb --- a/starmath/source/smres.src +++ b/starmath/source/smres.src @@ -1556,7 +1556,7 @@ FloatingWindow RID_TOOLBOXWINDOW OutputSize = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 0 , 0 ) ; - Text [ en-US ] = "Formula Elements" ; + Text [ en-US ] = "Elements" ; ToolBox 1 { -- cgit v1.2.3 From fac60d2f0b6938e768a0c662f34a5f67028eaa93 Mon Sep 17 00:00:00 2001 From: "Herbert Duerr [hdu]" Date: Tue, 20 Apr 2010 15:42:54 +0200 Subject: #i107360# moved trapezoid tesselation into basegfx --- vcl/unx/inc/salgdi.h | 13 +- vcl/unx/source/gdi/salgdi.cxx | 778 +++++------------------------------------- 2 files changed, 88 insertions(+), 703 deletions(-) diff --git a/vcl/unx/inc/salgdi.h b/vcl/unx/inc/salgdi.h index da69f04b6f8f..6ccea2c4a00c 100644 --- a/vcl/unx/inc/salgdi.h +++ b/vcl/unx/inc/salgdi.h @@ -57,6 +57,10 @@ class ImplLayoutArgs; class X11FontLayout; class ServerFontLayout; +namespace basegfx { + class B2DTrapezoid; +} + // -=-= SalGraphicsData =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= class CairoFontsCache @@ -289,8 +293,11 @@ public: virtual void drawPolyPolygon( sal_uInt32 nPoly, const sal_uInt32* pPoints, PCONSTSALPOINT* pPtAry ); - virtual bool drawPolyPolygon( const ::basegfx::B2DPolyPolygon& rPolyPolygon, double fTransparency ); - virtual bool drawPolyLine( const ::basegfx::B2DPolygon& rPolygon, const ::basegfx::B2DVector& rLineWidth, basegfx::B2DLineJoin); + virtual bool drawPolyPolygon( const ::basegfx::B2DPolyPolygon&, double fTransparency ); + virtual bool drawPolyLine( const ::basegfx::B2DPolygon&, const ::basegfx::B2DVector& rLineWidth, basegfx::B2DLineJoin ); + virtual bool drawFilledTrapezoids( const ::basegfx::B2DTrapezoid*, int nTrapCount, double fTransparency ); + +#if 1 // TODO: remove these obselete methods virtual sal_Bool drawPolyLineBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry ); @@ -301,6 +308,8 @@ public: const sal_uInt32* pPoints, const SalPoint* const* pPtAry, const BYTE* const* pFlgAry ); +#endif + virtual void copyArea( long nDestX, long nDestY, long nSrcX, diff --git a/vcl/unx/source/gdi/salgdi.cxx b/vcl/unx/source/gdi/salgdi.cxx index 7637d3b2bd02..32aeed2dbc95 100644 --- a/vcl/unx/source/gdi/salgdi.cxx +++ b/vcl/unx/source/gdi/salgdi.cxx @@ -50,8 +50,9 @@ #include "basegfx/polygon/b2dpolygonclipper.hxx" #include "basegfx/polygon/b2dlinegeometry.hxx" #include "basegfx/matrix/b2dhommatrix.hxx" -#include +#include "basegfx/matrix/b2dhommatrixtools.hxx" #include "basegfx/polygon/b2dpolypolygoncutter.hxx" +#include "basegfx/polygon/b2dtrapezoid.hxx" #include #include @@ -1087,115 +1088,6 @@ SystemGraphicsData X11SalGraphics::GetGraphicsData() const // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -// B2DPolygon support methods - -namespace { // anonymous namespace to prevent export -// the methods and structures here are used by the -// B2DPolyPolygon->RenderTrapezoid conversion algorithm - -// compare two line segments -// assumption: both segments point downward -// assumption: they must have at least some y-overlap -// assumption: rA.p1.y <= rB.p1.y -bool IsLeftOf( const XLineFixed& rA, const XLineFixed& rB ) -{ - bool bAbove = (rA.p1.y <= rB.p1.y); - const XLineFixed& rU = bAbove ? rA : rB; - const XLineFixed& rL = bAbove ? rB : rA; - - const XFixed aXDiff = rU.p2.x - rU.p1.x; - const XFixed aYDiff = rU.p2.y - rU.p1.y; - - // compare upper point of lower segment with line through upper segment - if( (rU.p1.y != rL.p1.y) || (rU.p1.x != rL.p1.x) ) - { - const sal_Int64 n1 = (sal_Int64)aXDiff * (rL.p1.y - rU.p1.y); - const sal_Int64 n2 = (sal_Int64)aYDiff * (rL.p1.x - rU.p1.x); - if( n1 != n2 ) - return ((n1 < n2) == bAbove); - } - - // compare lower point of lower segment with line through upper segment - if( (rU.p2.y != rL.p2.y) || (rU.p2.x != rL.p2.x) ) - { - const sal_Int64 n3 = (sal_Int64)aXDiff * (rL.p2.y - rU.p1.y); - const sal_Int64 n4 = (sal_Int64)aYDiff * (rL.p2.x - rU.p1.x); - if( n3 != n4 ) - return ((n3 < n4) == bAbove); - } - - // both segments overlap - return false; -} - -struct HalfTrapezoid -{ - // assumptions: - // maLine.p1.y <= mnY < maLine.p2.y - XLineFixed maLine; - XFixed mnY; - - XFixed getXMin() const { return std::min( maLine.p1.x, maLine.p2.x); } - XFixed getXMax() const { return std::max( maLine.p1.x, maLine.p2.x); } -}; - -class HalfTrapCompare -{ -public: - bool operator()( const HalfTrapezoid& rA, const HalfTrapezoid& rB ) const - { - bool bIsTopLeft = false; - if( rA.mnY != rB.mnY ) // sort top-first if possible - bIsTopLeft = (rA.mnY < rB.mnY); - else // else sort left-first - bIsTopLeft = IsLeftOf( rA.maLine, rB.maLine ); - // adjust to priority_queue sorting convention - return !bIsTopLeft; - } -}; - -typedef std::vector< HalfTrapezoid > HTVector; -typedef std::priority_queue< HalfTrapezoid, HTVector, HalfTrapCompare > HTQueueBase; -// we need a priority queue with a reserve() to prevent countless reallocations -class HTQueue -: public HTQueueBase -{ -public: - void reserve( size_t n ) { c.reserve( n ); } - void swapvec( HTVector& v ) { c.swap( v ); } -}; - -typedef std::vector TrapezoidVector; - -class TrapezoidXCompare -{ - const TrapezoidVector& mrVector; -public: - TrapezoidXCompare( const TrapezoidVector& rVector ) - : mrVector( rVector ) {} - bool operator()( int nA, int nB ) const - { return IsLeftOf( mrVector[nA].left, mrVector[nB].left ); } -}; - -typedef std::multiset< int, TrapezoidXCompare > ActiveTrapSet; - -class TrapezoidYCompare -{ - const TrapezoidVector& mrVector; -public: - TrapezoidYCompare( const TrapezoidVector& rVector ) - : mrVector( rVector ) {} - bool operator()( int nA, int nB ) const - { return (mrVector[nA].bottom < mrVector[nB].bottom); } -}; - -typedef std::multiset< int, TrapezoidYCompare > VerticalTrapSet; - -#ifndef DISABLE_SOLVECROSSOVER_WORKAROUND -void splitIntersectingSegments( HTVector&); -#endif // DISABLE_SOLVECROSSOVER_WORKAROUND -} // end of anonymous namespace - // draw a poly-polygon bool X11SalGraphics::drawPolyPolygon( const ::basegfx::B2DPolyPolygon& rOrigPolyPoly, double fTransparency) { @@ -1219,329 +1111,66 @@ bool X11SalGraphics::drawPolyPolygon( const ::basegfx::B2DPolyPolygon& rOrigPoly if( pRenderEnv ) return FALSE; - // check xrender support for trapezoids - XRenderPeer& rRenderPeer = XRenderPeer::GetInstance(); - if( !rRenderPeer.AreTrapezoidsSupported() ) - return FALSE; - Picture aDstPic = GetXRenderPicture(); - // check xrender support for this drawable - if( !aDstPic ) - return FALSE; + // snap to raster if requested + basegfx::B2DPolyPolygon aPolyPoly = rOrigPolyPoly; + const bool bSnapToRaster = !getAntiAliasB2DDraw(); + if( bSnapToRaster ) + aPolyPoly = basegfx::tools::snapPointsOfHorizontalOrVerticalEdges( aPolyPoly ); // don't bother with polygons outside of visible area const basegfx::B2DRange aViewRange( 0, 0, GetGraphicsWidth(), GetGraphicsHeight() ); - const basegfx::B2DRange aPolyRange = basegfx::tools::getRange( rOrigPolyPoly ); - const bool bNeedViewClip = aPolyRange.isInside( aViewRange ); - if( !aPolyRange.overlaps( aViewRange ) ) + aPolyPoly = basegfx::tools::clipPolyPolygonOnRange( aPolyPoly, aViewRange, true, false ); + if( !aPolyPoly.count() ) return true; - // convert the polypolygon to trapezoids - - // prepare the polypolygon for the algorithm below: - // - clip it against the view range - // - make sure it contains no self-intersections - // while we are at it guess the number of involved polygon points - int nHTQueueReserve = 0; - basegfx::B2DPolyPolygon aGoodPolyPoly; - for( int nOrigPolyIdx = 0; nOrigPolyIdx < nOrigPolyCount; ++nOrigPolyIdx ) - { - const ::basegfx::B2DPolygon aOuterPolygon = rOrigPolyPoly.getB2DPolygon( nOrigPolyIdx ); - - // render-trapezoids should be inside the view => clip polygon against view range - basegfx::B2DPolyPolygon aClippedPolygon( aOuterPolygon ); - if( bNeedViewClip ) - { - aClippedPolygon = basegfx::tools::clipPolygonOnRange( aOuterPolygon, aViewRange, true, false ); - DBG_ASSERT( aClippedPolygon.count(), "polygon confirmed to overlap with view should not get here" ); - } - const int nClippedPolyCount = aClippedPolygon.count(); - if( !nClippedPolyCount ) - continue; - -#ifndef DISABLE_SOLVECROSSOVER_WORKAROUND - for( int nClippedPolyIdx = 0; nClippedPolyIdx < nClippedPolyCount; ++nClippedPolyIdx ) - { - const ::basegfx::B2DPolygon aSolvedPolygon = aClippedPolygon.getB2DPolygon( nClippedPolyIdx ); - const int nPointCount = aSolvedPolygon.count(); - aGoodPolyPoly.append( aSolvedPolygon ); - nHTQueueReserve += aSolvedPolygon.areControlPointsUsed() ? 8 * nPointCount : nPointCount; - } -#else // DISABLE_SOLVECROSSOVER_WORKAROUND - // #i103259# polypoly.solveCrossover() fails to remove self-intersections - // but polygon.solveCrossover() works. Use it to build the intersection-free polypolygon - // TODO: if the self-intersection prevention is too expensive make the trap-algorithm tolerate intersections - for( int nClippedPolyIdx = 0; nClippedPolyIdx < nClippedPolyCount; ++nClippedPolyIdx ) - { - ::basegfx::B2DPolygon aUnsolvedPolygon = aClippedPolygon.getB2DPolygon( nClippedPolyIdx ); - basegfx::B2DPolyPolygon aSolvedPolyPoly( basegfx::tools::solveCrossovers( aUnsolvedPolygon) ); - const int nSolvedPolyCount = aSolvedPolyPoly.count(); - for( int nSolvedPolyIdx = 0; nSolvedPolyIdx < nSolvedPolyCount; ++nSolvedPolyIdx ) - { - // build the intersection-free polypolygon one by one - const ::basegfx::B2DPolygon aSolvedPolygon = aSolvedPolyPoly.getB2DPolygon( nSolvedPolyIdx ); - aGoodPolyPoly.append( aSolvedPolygon ); - // and while we are at it use the conviently available point count to guess the number of needed half-traps - const int nPointCount = aSolvedPolygon.count(); - nHTQueueReserve += aSolvedPolygon.areControlPointsUsed() ? 8 * nPointCount : nPointCount; - } - } -#endif // DISABLE_SOLVECROSSOVER_WORKAROUND - } - // #i100922# try to prevent priority-queue reallocations by reservering enough - nHTQueueReserve = ((4*nHTQueueReserve) | 0x1FFF) + 1; - HTVector aHTVector; - aHTVector.reserve( nHTQueueReserve ); - - // first convert the B2DPolyPolygon to HalfTrapezoids - const int nGoodPolyCount = aGoodPolyPoly.count(); - for( int nGoodPolyIdx = 0; nGoodPolyIdx < nGoodPolyCount; ++nGoodPolyIdx ) - { - ::basegfx::B2DPolygon aInnerPolygon = aGoodPolyPoly.getB2DPolygon( nGoodPolyIdx ); - - // render-trapezoids have linear edges => get rid of bezier segments - if( aInnerPolygon.areControlPointsUsed() ) - aInnerPolygon = ::basegfx::tools::adaptiveSubdivideByDistance( aInnerPolygon, 0.125 ); - - const int nPointCount = aInnerPolygon.count(); - if( nPointCount >= 3 ) - { - // convert polygon point pairs to HalfTrapezoids - // connect the polygon point with the first one if needed - XPointFixed aOldXPF = { 0, 0 }; - XPointFixed aNewXPF; - for( int nPointIdx = 0; nPointIdx <= nPointCount; ++nPointIdx, aOldXPF = aNewXPF ) - { - // auto-close the polygon if needed - const int k = (nPointIdx < nPointCount) ? nPointIdx : 0; - const ::basegfx::B2DPoint& aPoint = aInnerPolygon.getB2DPoint( k ); - - // convert the B2DPoint into XRENDER units - if(getAntiAliasB2DDraw()) - { - aNewXPF.x = XDoubleToFixed( aPoint.getX() ); - aNewXPF.y = XDoubleToFixed( aPoint.getY() ); - } - else - { - aNewXPF.x = XDoubleToFixed( basegfx::fround( aPoint.getX() ) ); - aNewXPF.y = XDoubleToFixed( basegfx::fround( aPoint.getY() ) ); - } - - // check if enough data is available for a new HalfTrapezoid - if( nPointIdx == 0 ) - continue; - - // construct HalfTrapezoid as topdown segment - HalfTrapezoid aHT; - if( aNewXPF.y < aOldXPF.y ) - { - aHT.maLine.p1 = aNewXPF; - aHT.maLine.p2 = aOldXPF; - } - else - { - aHT.maLine.p2 = aNewXPF; - aHT.maLine.p1 = aOldXPF; - } - - aHT.mnY = aHT.maLine.p1.y; + // tesselate the polypolygon into trapezoids + basegfx::B2DTrapezoidVector aB2DTrapVector; + basegfx::tools::trapezoidSubdivide( aB2DTrapVector, aPolyPoly ); + const int nTrapCount = aB2DTrapVector.size(); + const bool bDrawn = drawFilledTrapezoids( &aB2DTrapVector[0], nTrapCount, fTransparency ); + return bDrawn; +} -#if 0 // ignore clipped HalfTrapezoids - if( aHT.mnY < 0 ) - aHT.mnY = 0; - else if( aHT.mnY > 10000 ) - continue; -#endif +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= - // queue up the HalfTrapezoid - aHTVector.push_back( aHT ); - } - } - } +bool X11SalGraphics::drawFilledTrapezoids( const ::basegfx::B2DTrapezoid* pB2DTraps, int nTrapCount, double fTransparency ) +{ + if( nTrapCount <= 0 ) + return true; - if( aHTVector.empty() ) - return TRUE; + Picture aDstPic = GetXRenderPicture(); + // check xrender support for this drawable + if( !aDstPic ) + return false; -#ifndef DISABLE_SOLVECROSSOVER_WORKAROUND - // find intersecting halftraps and split them up - // TODO: remove when solveCrossOvers gets fast enough so its use can be enabled above - // FAQ: why should segment intersection be handled before adaptiveSubdivide()? - // Answer: because it is conceptually much faster - // Example: consider two intersecting circles with a diameter of 1000 pixels - // before subdivision: eight bezier segments - // after subdivision: more than a thousand line segments - // since even the best generic intersection finders have a complexity of O((n+k)*log(n+k)) - // it shows that testing while the segment count is still low is a much better approach. - splitIntersectingSegments( aHTVector); -#endif // DISABLE_SOLVECROSSOVER_WORKAROUND - - // build queue from vector of intersection-free segments - // TODO: is replacing the priority-queue by a sorted vector worth it? - std::make_heap( aHTVector.begin(), aHTVector.end(), HalfTrapCompare()); - HTQueue aHTQueue; - aHTQueue.swapvec( aHTVector); - - // then convert the HalfTrapezoids into full Trapezoids - TrapezoidVector aTrapVector; - aTrapVector.reserve( aHTQueue.size() * 2 ); // just a guess - - TrapezoidXCompare aTrapXCompare( aTrapVector ); - ActiveTrapSet aActiveTraps( aTrapXCompare ); - - TrapezoidYCompare aTrapYCompare( aTrapVector ); - VerticalTrapSet aVerticalTraps( aTrapYCompare ); - - while( !aHTQueue.empty() ) + // convert the B2DTrapezoids into XRender-Trapezoids + typedef std::vector TrapezoidVector; + TrapezoidVector aTrapVector( nTrapCount ); + const basegfx::B2DTrapezoid* pB2DTrap = pB2DTraps; + for( int i = 0; i < nTrapCount; ++pB2DTrap, ++i ) { - XTrapezoid aTrapezoid; - - // convert a HalfTrapezoid pair - // get the left side of the trapezoid - const HalfTrapezoid& rLeft = aHTQueue.top(); - aTrapezoid.top = rLeft.mnY; - aTrapezoid.left = rLeft.maLine; - aHTQueue.pop(); - - // ignore left segment that would result in an empty trapezoid - if( aTrapezoid.left.p2.y <= aTrapezoid.top ) - continue; - - // get the right side of the trapezoid - aTrapezoid.right.p2.y = aTrapezoid.bottom; - while( !aHTQueue.empty() ) { - const HalfTrapezoid& rRight = aHTQueue.top(); - aTrapezoid.right = rRight.maLine; - aHTQueue.pop(); - // ignore right segment that would result in an empty trapezoid - if( aTrapezoid.right.p2.y > aTrapezoid.top ) - break; - } - - // the topmost endpoint determines the trapezoid bottom - aTrapezoid.bottom = aTrapezoid.left.p2.y; - if( aTrapezoid.bottom > aTrapezoid.right.p2.y ) - aTrapezoid.bottom = aTrapezoid.right.p2.y; - - // keep the full Trapezoid candidate - aTrapVector.push_back( aTrapezoid ); - - // unless it splits another trapezoid that is still active - bool bSplit = false; - ActiveTrapSet::iterator aActiveTrapsIt = aActiveTraps.begin(); - while(aActiveTrapsIt != aActiveTraps.end()) - { - XTrapezoid& rLeftTrap = aTrapVector[ *aActiveTrapsIt ]; - - // skip until first overlap candidate - // TODO: use stl::*er_bound() instead - if( IsLeftOf( aTrapezoid.left, rLeftTrap.left) ) - { - ++aActiveTrapsIt; - continue; - } - - // in the ActiveTrapSet there are still trapezoids where - // a vertical overlap with new trapezoids is no longer possible - // they could have been removed in the verticaltraps loop below - // but this would be expensive and is not needed as we can - // simply ignore them until we stumble upon them here. - if( rLeftTrap.bottom <= aTrapezoid.top ) - { - ActiveTrapSet::iterator it = aActiveTrapsIt; - if( aActiveTrapsIt != aActiveTraps.begin() ) - { - --aActiveTrapsIt; - aActiveTraps.erase( it ); - ++aActiveTrapsIt; - } - else - { - aActiveTraps.erase( it ); - aActiveTrapsIt = aActiveTraps.begin(); - } - continue; - } - - // check if there is horizontal overlap - // aTrapezoid.left==rLeftTrap.right is allowed though - if( !IsLeftOf( aTrapezoid.left, rLeftTrap.right ) ) - { - ++aActiveTrapsIt; - continue; - } - - // prepare to split the old trapezoid and keep its upper part - // find the old trapezoids entry in the VerticalTrapSet and remove it - typedef std::pair VTSPair; - VTSPair aVTSPair = aVerticalTraps.equal_range( *aActiveTrapsIt ); - VerticalTrapSet::iterator aVTSit = aVTSPair.first; - for(; aVTSit != aVTSPair.second; ++aVTSit ) - { - if( *aVTSit != *aActiveTrapsIt ) - continue; - aVerticalTraps.erase( aVTSit ); - break; - } - // then update the old trapezoid's bottom - rLeftTrap.bottom = aTrapezoid.top; - // enter the updated old trapzoid in VerticalTrapSet - aVerticalTraps.insert( aVerticalTraps.begin(), *aActiveTrapsIt ); - // the old trapezoid is no longer active - aActiveTraps.erase( aActiveTrapsIt ); - - // the trapezoid causing the split has become obsolete - // so its both sides have to be re-queued - HalfTrapezoid aHT; - aHT.mnY = aTrapezoid.top; - aHT.maLine = aTrapezoid.left; - aHTQueue.push( aHT ); - aHT.maLine = aTrapezoid.right; - aHTQueue.push( aHT ); - - bSplit = true; - break; - } - - // keep or forget the resulting full Trapezoid - if( bSplit ) - aTrapVector.pop_back(); - else - { - aActiveTraps.insert( aTrapVector.size()-1 ); - aVerticalTraps.insert( aTrapVector.size()-1 ); - } - - // mark trapezoids that can no longer be split as inactive - // and recycle their sides which were not fully resolved - static const XFixed nMaxTop = +0x7FFFFFFF; - const XFixed nNewTop = aHTQueue.empty() ? nMaxTop : aHTQueue.top().mnY; - while( !aVerticalTraps.empty() ) - { - // check the next trapezoid to be retired - const XTrapezoid& rOldTrap = aTrapVector[ *aVerticalTraps.begin() ]; - if( nNewTop < rOldTrap.bottom ) - break; - // this trapezoid can no longer be split - aVerticalTraps.erase( aVerticalTraps.begin() ); - - // recycle its sides that were not fully resolved - HalfTrapezoid aHT; - aHT.mnY = rOldTrap.bottom; - - if( rOldTrap.left.p2.y > aHT.mnY ) - { - aHT.maLine = rOldTrap.left; - aHTQueue.push( aHT ); - } - if( rOldTrap.right.p2.y > aHT.mnY ) - { - aHT.maLine = rOldTrap.right; - aHTQueue.push( aHT ); - } - } + XTrapezoid& rTrap = aTrapVector[ i ] ; + + // set y-coordinates + const double fY1 = pB2DTrap->getTopY(); + rTrap.left.p1.y = rTrap.right.p1.y = rTrap.top = XDoubleToFixed( fY1 ); + const double fY2 = pB2DTrap->getBottomY(); + rTrap.left.p2.y = rTrap.right.p2.y = rTrap.bottom = XDoubleToFixed( fY2 ); + + // set x-coordinates + const double fXL1 = pB2DTrap->getTopXLeft(); + rTrap.left.p1.x = XDoubleToFixed( fXL1 ); + const double fXR1 = pB2DTrap->getTopXRight(); + rTrap.right.p1.x = XDoubleToFixed( fXR1 ); + const double fXL2 = pB2DTrap->getBottomXLeft(); + rTrap.left.p2.x = XDoubleToFixed( fXL2 ); + const double fXR2 = pB2DTrap->getBottomXRight(); + rTrap.right.p2.x = XDoubleToFixed( fXR2 ); } - // create xrender Picture for polygon foreground + // get xrender Picture for polygon foreground + // TODO: cache it like the target picture which uses GetXRenderPicture() + XRenderPeer& rRenderPeer = XRenderPeer::GetInstance(); SalDisplay::RenderEntry& rEntry = GetDisplay()->GetRenderEntries( m_nScreen )[ 32 ]; if( !rEntry.m_aPicture ) { @@ -1569,15 +1198,17 @@ bool X11SalGraphics::drawPolyPolygon( const ::basegfx::B2DPolyPolygon& rOrigPoly rRenderPeer.CompositeTrapezoids( PictOpOver, rEntry.m_aPicture, aDstPic, pMaskFormat, 0, 0, &aTrapVector[0], aTrapVector.size() ); - return TRUE; + return true; } // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= bool X11SalGraphics::drawPolyLine(const ::basegfx::B2DPolygon& rPolygon, const ::basegfx::B2DVector& rLineWidth, basegfx::B2DLineJoin eLineJoin) { + const bool bIsHairline = (rLineWidth.getX() == rLineWidth.getY()) && (rLineWidth.getX() <= 1.2); + // #i101491# - if(rPolygon.count() > 1000) + if( !bIsHairline && (rPolygon.count() > 1000) ) { // the used basegfx::tools::createAreaGeometry is simply too // expensive with very big polygons; fallback to caller (who @@ -1587,9 +1218,28 @@ bool X11SalGraphics::drawPolyLine(const ::basegfx::B2DPolygon& rPolygon, const : // the same way. return false; } - const XRenderPeer& rRenderPeer = XRenderPeer::GetInstance(); - if( !rRenderPeer.AreTrapezoidsSupported() ) - return false; + + // temporarily adjust brush color to pen color + // since the line is drawn as an area-polygon + const SalColor aKeepBrushColor = nBrushColor_; + nBrushColor_ = nPenColor_; + + // shortcut for hairline drawing to improve performance + if( bIsHairline ) + { + // hairlines can benefit from a simplified tesselation + // e.g. for hairlines the linejoin style can be ignored + basegfx::B2DTrapezoidVector aB2DTrapVector; + basegfx::tools::createLineTrapezoidFromB2DPolygon( aB2DTrapVector, rPolygon, rLineWidth.getX() ); + + // draw tesselation result + const int nTrapCount = aB2DTrapVector.size(); + const bool bDrawOk = drawFilledTrapezoids( &aB2DTrapVector[0], nTrapCount, 0.0 ); + + // restore the original brush GC + nBrushColor_ = aKeepBrushColor; + return bDrawOk; + } // get the area polygon for the line polygon basegfx::B2DPolygon aPolygon = rPolygon; @@ -1600,18 +1250,6 @@ bool X11SalGraphics::drawPolyLine(const ::basegfx::B2DPolygon& rPolygon, const : aPolygon.transform(basegfx::tools::createScaleB2DHomMatrix(1.0, rLineWidth.getX() / rLineWidth.getY())); } - // special handling for hairlines to improve the drawing performance - // TODO: revisit after basegfx performance related changes - const bool bIsHairline = (rLineWidth.getX() < 1.2) && (rLineWidth.getY() < 1.2); - if( bIsHairline ) - { - // for hairlines the linejoin style becomes irrelevant - eLineJoin = basegfx::B2DLINEJOIN_NONE; - // createAreaGeometry is still too expensive when beziers are involved - if( aPolygon.areControlPointsUsed() ) - aPolygon = ::basegfx::tools::adaptiveSubdivideByDistance( aPolygon, 0.125 ); - } - // create the area-polygon for the line const basegfx::B2DPolyPolygon aAreaPolyPoly( basegfx::tools::createAreaGeometry(aPolygon, 0.5*rLineWidth.getX(), eLineJoin) ); @@ -1622,11 +1260,6 @@ bool X11SalGraphics::drawPolyLine(const ::basegfx::B2DPolygon& rPolygon, const : aPolygon.transform(basegfx::tools::createScaleB2DHomMatrix(1.0, rLineWidth.getY() / rLineWidth.getX())); } - // temporarily adjust brush color to pen color - // since the line is drawn as an area-polygon - const SalColor aKeepBrushColor = nBrushColor_; - nBrushColor_ = nPenColor_; - // draw each area polypolygon component individually // to emulate the polypolygon winding rule "non-zero" bool bDrawOk = true; @@ -1634,7 +1267,7 @@ bool X11SalGraphics::drawPolyLine(const ::basegfx::B2DPolygon& rPolygon, const : for( int nPolyIdx = 0; nPolyIdx < nPolyCount; ++nPolyIdx ) { const ::basegfx::B2DPolyPolygon aOnePoly( aAreaPolyPoly.getB2DPolygon( nPolyIdx ) ); - bDrawOk = drawPolyPolygon( aOnePoly, 0.0); + bDrawOk = drawPolyPolygon( aOnePoly, 0.0 ); if( !bDrawOk ) break; } @@ -1645,260 +1278,3 @@ bool X11SalGraphics::drawPolyLine(const ::basegfx::B2DPolygon& rPolygon, const : } // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= - -#ifndef DISABLE_SOLVECROSSOVER_WORKAROUND -// TODO: move the intersection solver into basegfx -// and then support bezier-intersection finding too - -namespace { // anonymous namespace to prevent export - -typedef HalfTrapezoid LineSeg; -typedef HTVector LSVector; - -inline bool operator==( const LineSeg& r1, const LineSeg& r2) -{ - if( r1.maLine.p2.y != r2.maLine.p2.y) return false; - if( r1.maLine.p2.x != r2.maLine.p2.x) return false; - if( r1.maLine.p1.y != r2.maLine.p1.y) return false; - if( r1.maLine.p1.x != r2.maLine.p1.x) return false; - return true; -} - -struct LSYMinCmp -{ - bool operator()( const LineSeg& r1, const LineSeg& r2) const - { return r2.maLine.p1.y < r1.maLine.p1.y; } -}; - -struct LSYMaxCmp -{ - bool operator()( const LineSeg& r1, const LineSeg& r2) const - { return r2.maLine.p2.y < r1.maLine.p2.y; } -}; - -struct LSXMinCmp -{ - bool operator()( const LineSeg& r1, const LineSeg& r2) const - { return( r1.getXMin() < r2.getXMin()); } -}; - -struct CutPoint -{ - XFixed mnSegmentId; - float mfCutParam; - XPointFixed maPoint; -}; - -struct CutPointCmp -{ - bool operator()( const CutPoint& r1, const CutPoint& r2) const - { - if( r1.mnSegmentId != r2.mnSegmentId) - return (r1.mnSegmentId < r2.mnSegmentId); - return (r1.mfCutParam < r2.mfCutParam); - } -}; - -bool findIntersection( const LineSeg& rLS1, const LineSeg& rLS2, CutPoint aCutPoints[2]) -{ - // segments intersect at r1.p1 + s*(r1.p2-r1.p1) == r2.p1 + t*(r2.p2-r2.p1) - // when both segment-parameters are ((0 - // (r1.p1x - r2.p1x) == s * (r1.p1x - r1.p2x) + t * (r2.p2x - r2.p1x) - // (r1.p1y - r2.p1y) == s * (r1.p1y - r1.p2y) + t * (r2.p2y - r2.p1y) - // check if lines are identical or parallel => not intersecting - const XLineFixed& r1 = rLS1.maLine; - const XLineFixed& r2 = rLS2.maLine; - const double fDet = (double)(r1.p1.x - r1.p2.x) * (r2.p2.y - r2.p1.y) - - (double)(r2.p2.x - r2.p1.x) * (r1.p1.y - r1.p2.y); - static const double fEps = 1e-8; - if( fabs(fDet) < fEps) - return false; - // check if intersecting with first segment - const double fS1 = (double)(r2.p2.y - r2.p1.y) * (r1.p1.x - r2.p1.x); - const double fS2 = (double)(r2.p2.x - r2.p1.x) * (r2.p1.y - r1.p1.y); - const double fS = (fS1 + fS2) / fDet; - if( (fS <= +fEps) || (fS >= 1-fEps)) - return false; - // check if intersecting with second segment - const double fT1 = (double)(r1.p2.y - r1.p1.y) * (r1.p1.x - r2.p1.x); - const double fT2 = (double)(r1.p2.x - r1.p1.x) * (r2.p1.y - r1.p1.y); - const double fT = (fT1 + fT2) / fDet; - if( (fT <= +fEps) || (fT >= 1-fEps)) - return false; - // force the intersection point to be exactly identical on both segments - aCutPoints[0].maPoint.x = (XFixed)(r1.p1.x + fS * (r1.p2.x - r1.p1.x)); - aCutPoints[0].maPoint.y = (XFixed)(r1.p1.y + fS * (r1.p2.y - r1.p1.y)); - aCutPoints[1].maPoint.x = aCutPoints[0].maPoint.x; - aCutPoints[1].maPoint.y = aCutPoints[0].maPoint.y; - aCutPoints[0].mnSegmentId = rLS1.mnY; - aCutPoints[0].mfCutParam = (float)fS; - aCutPoints[1].mnSegmentId = rLS2.mnY; - aCutPoints[1].mfCutParam = (float)fT; - return true; -} - -typedef std::priority_queue< LineSeg, LSVector, LSYMinCmp> LSYMinQueueBase; -typedef std::priority_queue< LineSeg, LSVector, LSYMaxCmp> LSYMaxQueueBase; -typedef std::multiset< LineSeg, LSXMinCmp> LSXMinSet; -typedef std::set< CutPoint, CutPointCmp> CutPointSet; - -class LSYMinQueue : public LSYMinQueueBase -{ -public: - void reserve( size_t n) { c.reserve(n);} - void swapvec( LSVector& v) { c.swap(v);} -}; - -class LSYMaxQueue : public LSYMaxQueueBase -{ -public: - void reserve( size_t n) { c.reserve(n);} -}; - -void addAndCutSegment( LSVector& rLSVector, const LineSeg& rLS, CutPointSet& rCutPointSet) -{ - // short circuit when no segment was cut - if( rCutPointSet.empty()) { - rLSVector.push_back( rLS); - return; - } - - // find the first cut point for this segment - LineSeg aCS = rLS; - CutPoint aMinCutPoint; - aMinCutPoint.mnSegmentId = rLS.mnY; - aMinCutPoint.mfCutParam = 0.0; - CutPointSet::iterator itFirst = rCutPointSet.lower_bound( aMinCutPoint); - CutPointSet::iterator it = itFirst; - // iterate through all cut points of this segment - for(; it != rCutPointSet.end(); ++it) { - const CutPoint rCutPoint = (*it); - if( rCutPoint.mnSegmentId != rLS.mnY) - break; - // cut segment at the cutpoint - aCS.maLine.p2 = rCutPoint.maPoint; - rLSVector.push_back( aCS); - // prepare for next segment cut - aCS.maLine.p1 = aCS.maLine.p2; - } - // remove cutparams that will no longer be needed - // TODO: is it worth it or should we just keep the cutparams? - rCutPointSet.erase( itFirst, it); - - // add segment part remaining after last cut - aCS.maLine.p2 = rLS.maLine.p2; - rLSVector.push_back( aCS); -} - -void splitIntersectingSegments( LSVector& rLSVector) -{ - // get a unique id for each lineseg, temporarily abuse the mnY member - LSVector::iterator aLSit = rLSVector.begin(); - for( int i = 0; aLSit != rLSVector.end(); ++aLSit) { - LineSeg& rLS = *aLSit; - rLS.mnY = i++; - } - // get an y-sorted queue from the input vector - LSYMinQueue aYMinQueue; - std::make_heap( rLSVector.begin(), rLSVector.end(), LSYMinCmp()); - aYMinQueue.swapvec( rLSVector); - - // prepare the result vector - // try to avoid reallocations by guessing a reasonable result size - rLSVector.reserve( aYMinQueue.size() * 3/2 ); - - // find all intersections - CutPointSet aCutPointSet; - LSXMinSet aXMinSet; - LSYMaxQueue aYMaxQueue; - aYMaxQueue.reserve( aYMinQueue.size()); - // sweep-down and check all segment-pairs that overlap - while( !aYMinQueue.empty()) { - // get next input-segment - const LineSeg& rLS = aYMinQueue.top(); - // retire obsoleted segments - const XFixed fYCur = rLS.maLine.p1.y; - while( !aYMaxQueue.empty()) { - // check next segment to be retired - const LineSeg& rOS = aYMaxQueue.top(); - if( fYCur < rOS.maLine.p2.y) - break; - // emit resolved segment into result - addAndCutSegment( rLSVector, rOS, aCutPointSet); - // find segment to be retired in xmin-compare-set - LSXMinSet::iterator itR = aXMinSet.lower_bound( rOS); - while( !(*itR == rOS)) ++itR; - // retire segment from xmin-compare-set - aXMinSet.erase( itR); - // this segment is pining for the fjords - aYMaxQueue.pop(); - } - - // iterate over all segments that might overlap - // skip over the leftmost segments that cannot overlap - const XFixed fXMax = rLS.getXMax(); - LSXMinSet::const_iterator itC = aXMinSet.begin(); - for(; itC != aXMinSet.end(); ++itC) - if( (*itC).getXMin() <= fXMax) - break; - // TODO: if the linear search becomes too expensive - // then use an XMaxQueue based approach to replace it - const XFixed fXMin = rLS.getXMin(); - for(; itC != aXMinSet.end(); ++itC) { - const LineSeg& rOS = *itC; - if( fXMin >= rOS.getXMax()) - continue; - if( fXMax < rOS.getXMin()) - break; - CutPoint aCutPoints[2]; - if( !findIntersection( rLS, rOS, aCutPoints)) - continue; - // remember cut parameters - // TODO: std::set seems to use individual allocations - // which results in perf-problems for many entries - // => pre-allocate nodes by using a non-default allocator - aCutPointSet.insert( aCutPoints[0]); - aCutPointSet.insert( aCutPoints[1]); - } - // add segment to xmin-compare-set - // TODO: do we have a good insertion hint? - aXMinSet.insert( /*itC,*/ rLS); - // register segment for retirement - aYMaxQueue.push( rLS); - aYMinQueue.pop(); - } - - // retire the remaining segments - aXMinSet.clear(); - while( !aYMaxQueue.empty()) { - // emit segments and cut them up if needed - const LineSeg& rLS = aYMaxQueue.top(); - addAndCutSegment( rLSVector, rLS, aCutPointSet); - aYMaxQueue.pop(); - } - - // get the segments ready to be consumed by the drawPolygon() caller - aLSit = rLSVector.begin(); - LSVector::iterator aLSit2 = aLSit; - for(; aLSit != rLSVector.end(); ++aLSit) { - LineSeg& rLS = *aLSit; - // restore the segment top member - rLS.mnY = rLS.maLine.p1.y; - // remove horizontal segments for now - // TODO: until the trapezoid converter is adjusted to handle them - if( rLS.maLine.p1.y == rLS.maLine.p2.y ) - continue; - *(aLSit2++) = rLS; - } - if(aLSit2 != aLSit) - rLSVector.resize( aLSit2 - rLSVector.begin() ); -} - -} // end anonymous namespace - -#endif // DISABLE_SOLVECROSSOVER_WORKAROUND - -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= - -- cgit v1.2.3 From 17c8132ca3e52eada54e861e59f0a805c50fff6e Mon Sep 17 00:00:00 2001 From: "Herbert Duerr [hdu]" Date: Tue, 20 Apr 2010 15:53:33 +0200 Subject: #i108743# destructor of ImplFontCharMap becomes public --- vcl/inc/vcl/impfont.hxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vcl/inc/vcl/impfont.hxx b/vcl/inc/vcl/impfont.hxx index 6ce9f21500b5..a1104bbf4a86 100644 --- a/vcl/inc/vcl/impfont.hxx +++ b/vcl/inc/vcl/impfont.hxx @@ -177,7 +177,8 @@ class CmapResult; class VCL_DLLPUBLIC ImplFontCharMap { public: - explicit ImplFontCharMap( const CmapResult& ); + explicit ImplFontCharMap( const CmapResult& ); + virtual ~ImplFontCharMap(); static ImplFontCharMap* GetDefaultMap( bool bSymbols=false); @@ -201,7 +202,6 @@ public: int GetGlyphIndex( sal_uInt32 ) const; private: - /*virtual*/ ~ImplFontCharMap(); int ImplFindRangeIndex( sal_uInt32 ) const; // prevent assignment and copy construction -- cgit v1.2.3 From 7d1514688c7baafb3b998cde97eabf83ea3ab908 Mon Sep 17 00:00:00 2001 From: "Herbert Duerr [hdu]" Date: Tue, 20 Apr 2010 16:01:40 +0200 Subject: remove compile warning --- vcl/unx/source/fontmanager/fontmanager.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vcl/unx/source/fontmanager/fontmanager.cxx b/vcl/unx/source/fontmanager/fontmanager.cxx index 606a57071d64..21183dc567ec 100644 --- a/vcl/unx/source/fontmanager/fontmanager.cxx +++ b/vcl/unx/source/fontmanager/fontmanager.cxx @@ -3814,8 +3814,8 @@ void PrintFontManager::getGlyphWidths( fontID nFont, if( c == cOld ) break; cOld = c; -#if (sizeof(sal_Unicode) <= 2) // TODO: remove when sal_Unicode covers all of unicode - if( c > 0xFFFF ) +#if 1 // TODO: remove when sal_Unicode covers all of unicode + if( c > (sal_Unicode)~0 ) break; #endif // get the matching glyph index -- cgit v1.2.3 From dcee57dba3d6bb88dcdc9f36ac4c6dd0dca699b9 Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Thu, 22 Apr 2010 13:08:19 +0200 Subject: cws tl80: #i110341# problems with spell check dialog fixed --- editeng/inc/editeng/editeng.hxx | 3 +- editeng/inc/editeng/outliner.hxx | 2 +- editeng/source/editeng/editeng.cxx | 14 +++++-- editeng/source/editeng/impedit.hxx | 5 ++- editeng/source/editeng/impedit4.cxx | 67 +++++++++++++++++++++++++--------- editeng/source/outliner/outlin2.cxx | 4 +- svx/inc/svx/SpellDialogChildWindow.hxx | 8 +++- 7 files changed, 76 insertions(+), 27 deletions(-) mode change 100644 => 100755 editeng/inc/editeng/editeng.hxx mode change 100644 => 100755 editeng/source/editeng/impedit.hxx mode change 100644 => 100755 editeng/source/editeng/impedit4.cxx diff --git a/editeng/inc/editeng/editeng.hxx b/editeng/inc/editeng/editeng.hxx old mode 100644 new mode 100755 index 3d9afded321f..84f4802e7b44 --- a/editeng/inc/editeng/editeng.hxx +++ b/editeng/inc/editeng/editeng.hxx @@ -232,6 +232,7 @@ public: ESelection WordRight( const ESelection& rSelection, USHORT nWordType ) const; ESelection CursorLeft( const ESelection& rSelection, USHORT nCharacterIteratorMode ) const; ESelection CursorRight( const ESelection& rSelection, USHORT nCharacterIteratorMode ) const; + ESelection SelectSentence( const ESelection& rCurSel ) const; void Clear(); void SetText( const String& rStr ); @@ -396,7 +397,7 @@ public: // put spell position to start of current sentence void PutSpellingToSentenceStart( EditView& rEditView ); //applies a changed sentence - void ApplyChangedSentence(EditView& rEditView, const ::svx::SpellPortions& rNewPortions, bool bIsGrammarChecking ); + void ApplyChangedSentence(EditView& rEditView, const ::svx::SpellPortions& rNewPortions, bool bRecheck ); //deinitialize sentence spelling void EndSpelling(); diff --git a/editeng/inc/editeng/outliner.hxx b/editeng/inc/editeng/outliner.hxx index 2d7afdb8a68c..09de5859db99 100644 --- a/editeng/inc/editeng/outliner.hxx +++ b/editeng/inc/editeng/outliner.hxx @@ -1017,7 +1017,7 @@ public: // put spell position to start of current sentence void PutSpellingToSentenceStart( EditView& rEditView ); //applies a changed sentence - void ApplyChangedSentence(EditView& rEditView, const ::svx::SpellPortions& rNewPortions, bool bIsGrammarChecking ); + void ApplyChangedSentence(EditView& rEditView, const ::svx::SpellPortions& rNewPortions, bool bRecheck ); void EndSpelling(); /** sets a link that is called at the beginning of a drag operation at an edit view */ diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx index 212fb8ff9446..e22f2dacad47 100644 --- a/editeng/source/editeng/editeng.cxx +++ b/editeng/source/editeng/editeng.cxx @@ -812,6 +812,14 @@ ESelection EditEngine::CursorRight( const ESelection& rSelection, USHORT nCharac return pE->pImpEditEngine->CreateESel( aSel ); } +ESelection EditEngine::SelectSentence( const ESelection& rCurSel ) const +{ + EditEngine* pE = (EditEngine*)this; + EditSelection aCurSel( pE->pImpEditEngine->CreateSel( rCurSel ) ); + EditSelection aSentenceSel( pE->pImpEditEngine->SelectSentence( aCurSel ) ); + return pE->pImpEditEngine->CreateESel( aSentenceSel ); +} + sal_Bool EditEngine::PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pEditView ) { DBG_CHKTHIS( EditEngine, 0 ); @@ -2195,7 +2203,7 @@ void EditEngine::EndSpelling() bool EditEngine::SpellSentence(EditView& rView, ::svx::SpellPortions& rToFill, bool bIsGrammarChecking ) { DBG_CHKTHIS( EditEngine, 0 ); - return pImpEditEngine->SpellSentence( rView, rToFill, bIsGrammarChecking ); + return pImpEditEngine->SpellSentence( rView, rToFill, bIsGrammarChecking ); } /*-- 08.09.2008 11:38:32--------------------------------------------------- @@ -2208,10 +2216,10 @@ void EditEngine::PutSpellingToSentenceStart( EditView& rEditView ) /*-- 13.10.2003 16:43:27--------------------------------------------------- -----------------------------------------------------------------------*/ -void EditEngine::ApplyChangedSentence(EditView& rEditView, const ::svx::SpellPortions& rNewPortions, bool bIsGrammarChecking ) +void EditEngine::ApplyChangedSentence(EditView& rEditView, const ::svx::SpellPortions& rNewPortions, bool bRecheck ) { DBG_CHKTHIS( EditEngine, 0 ); - pImpEditEngine->ApplyChangedSentence( rEditView, rNewPortions, bIsGrammarChecking ); + pImpEditEngine->ApplyChangedSentence( rEditView, rNewPortions, bRecheck ); } sal_Bool EditEngine::HasConvertibleTextPortion( LanguageType nLang ) diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx old mode 100644 new mode 100755 index 3bacfc949e3b..ede5acacc698 --- a/editeng/source/editeng/impedit.hxx +++ b/editeng/source/editeng/impedit.hxx @@ -164,6 +164,7 @@ struct SpellInfo EESpellState eState; EPaM aSpellStart; EPaM aSpellTo; + EditPaM aCurSentenceStart; sal_Bool bSpellToEnd; sal_Bool bMultipleDoc; ::svx::SpellPortions aLastSpellPortions; @@ -697,6 +698,8 @@ private: */ void ImplFillTextMarkingVector(const ::com::sun::star::lang::Locale& rLocale, EEngineData::TextMarkingVector& rTextMarkingVector, const String& rTxt, const USHORT nIdx, const USHORT nLen) const; + SpellInfo * CreateSpellInfo( const EditSelection &rSel, bool bMultipleDocs ); + protected: virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); @@ -953,7 +956,7 @@ public: //put spelling back to start of current sentence - needed after switch of grammar support void PutSpellingToSentenceStart( EditView& rEditView ); //applies a changed sentence - void ApplyChangedSentence(EditView& rEditView, const ::svx::SpellPortions& rNewPortions, bool bIsGrammarChecking ); + void ApplyChangedSentence(EditView& rEditView, const ::svx::SpellPortions& rNewPortions, bool bRecheck ); //deinitialize sentence spelling void EndSpelling(); //adds one or more portions of text to the SpellPortions depending on language changes diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx old mode 100644 new mode 100755 index c45c6faf2b6a..4f56faae8548 --- a/editeng/source/editeng/impedit4.cxx +++ b/editeng/source/editeng/impedit4.cxx @@ -1455,6 +1455,23 @@ Reference< XSpellChecker1 > ImpEditEngine::GetSpeller() return xSpeller; } + +SpellInfo * ImpEditEngine::CreateSpellInfo( const EditSelection &rSel, bool bMultipleDocs ) +{ + pSpellInfo = new SpellInfo; + pSpellInfo->bMultipleDoc = bMultipleDocs; + EditSelection aSentenceSel( SelectSentence( rSel ) ); +// pSpellInfo->aSpellStart = CreateEPaM( aSentenceSel.Min() ); +// pSpellInfo->aSpellTo = CreateEPaM( rSel.HasRange()? aSentenceSel.Max() : aSentenceSel.Min() ); + // always spell draw objects completely, startting at the top. + // (spelling in only a selection or not starting with the top requires + // further changes elsewehe to work properly) + pSpellInfo->aSpellStart = EPaM(); + pSpellInfo->aSpellTo = EPaM( EE_PARA_NOT_FOUND, EE_INDEX_NOT_FOUND ); + return pSpellInfo; +} + + EESpellState ImpEditEngine::Spell( EditView* pEditView, sal_Bool bMultipleDoc ) { #ifdef SVX_LIGHT @@ -1475,9 +1492,7 @@ EESpellState ImpEditEngine::Spell( EditView* pEditView, sal_Bool bMultipleDoc ) } EditSelection aCurSel( pEditView->pImpEditView->GetEditSelection() ); - pSpellInfo = new SpellInfo; - pSpellInfo->bMultipleDoc = bMultipleDoc; - pSpellInfo->aSpellStart = CreateEPaM( SelectWord( aCurSel, ::com::sun::star::i18n::WordType::DICTIONARY_WORD ).Min() ); + pSpellInfo = CreateSpellInfo( aCurSel, bMultipleDoc ); sal_Bool bIsStart = sal_False; if ( bMultipleDoc ) @@ -1945,11 +1960,9 @@ void ImpEditEngine::EndSpelling() void ImpEditEngine::StartSpelling(EditView& rEditView, sal_Bool bMultipleDoc) { DBG_ASSERT(!pSpellInfo, "pSpellInfo already set?"); - pSpellInfo = new SpellInfo; - pSpellInfo->bMultipleDoc = bMultipleDoc; rEditView.pImpEditView->SetEditSelection( aEditDoc.GetStartPaM() ); EditSelection aCurSel( rEditView.pImpEditView->GetEditSelection() ); - pSpellInfo->aSpellStart = CreateEPaM( SelectWord( aCurSel, ::com::sun::star::i18n::WordType::DICTIONARY_WORD ).Min() ); + pSpellInfo = CreateSpellInfo( aCurSel, bMultipleDoc ); } /*-- 13.10.2003 16:43:27--------------------------------------------------- Search for the next wrong word within the given selection @@ -2002,33 +2015,31 @@ Reference< XSpellAlternatives > ImpEditEngine::ImpFindNextError(EditSelection& r /*-- 13.10.2003 16:43:27--------------------------------------------------- -----------------------------------------------------------------------*/ -bool ImpEditEngine::SpellSentence(EditView& rEditView, ::svx::SpellPortions& rToFill, bool /*bIsGrammarChecking*/ ) +bool ImpEditEngine::SpellSentence(EditView& rEditView, + ::svx::SpellPortions& rToFill, + bool /*bIsGrammarChecking*/ ) { #ifdef SVX_LIGHT #else bool bRet = false; + EditSelection aCurSel( rEditView.pImpEditView->GetEditSelection() ); //the pSpellInfo has to be created on demand if(!pSpellInfo) - { - pSpellInfo = new SpellInfo; - pSpellInfo->bMultipleDoc = sal_True; - rEditView.pImpEditView->SetEditSelection( aEditDoc.GetStartPaM() ); - EditSelection aCurSel( rEditView.pImpEditView->GetEditSelection() ); - pSpellInfo->aSpellStart = CreateEPaM( SelectWord( aCurSel, ::com::sun::star::i18n::WordType::DICTIONARY_WORD ).Min() ); - } + pSpellInfo = CreateSpellInfo( aCurSel, true ); + pSpellInfo->aCurSentenceStart = aCurSel.Min(); DBG_ASSERT( xSpeller.is(), "Kein Speller gesetzt!" ); pSpellInfo->aLastSpellPortions.clear(); pSpellInfo->aLastSpellContentSelections.clear(); rToFill.clear(); - EditSelection aCurSel( rEditView.pImpEditView->GetEditSelection() ); //if no selection previously exists the range is extended to the end of the object if(aCurSel.Min() == aCurSel.Max()) { ContentNode* pLastNode = aEditDoc.SaveGetObject( aEditDoc.Count()-1); aCurSel.Max() = EditPaM(pLastNode, pLastNode->Len()); } + // check for next error in aCurSel and set aCurSel to that one if any was found Reference< XSpellAlternatives > xAlt = ImpFindNextError(aCurSel); - if(xAlt.is()) + if (xAlt.is()) { bRet = true; //find the sentence boundaries @@ -2060,6 +2071,7 @@ bool ImpEditEngine::SpellSentence(EditView& rEditView, ::svx::SpellPortions& rTo aCurSel = aNextSel; } while( xAlt.is() ); + //set the selection to the end of the current sentence rEditView.pImpEditView->SetEditSelection(aSentencePaM.Max()); } @@ -2173,13 +2185,20 @@ void ImpEditEngine::AddPortionIterated( /*-- 13.10.2003 16:43:33--------------------------------------------------- -----------------------------------------------------------------------*/ -void ImpEditEngine::ApplyChangedSentence(EditView& rEditView, const ::svx::SpellPortions& rNewPortions, bool /*bIsGrammarChecking*/ ) +void ImpEditEngine::ApplyChangedSentence(EditView& rEditView, + const ::svx::SpellPortions& rNewPortions, + bool bRecheck ) { #ifdef SVX_LIGHT #else DBG_ASSERT(pSpellInfo, "pSpellInfo not initialized"); if(pSpellInfo) { + // get current paragraph length to calculate later on how the sentence length changed, + // in order to place the cursor at the end of the sentence again + EditSelection aOldSel( rEditView.pImpEditView->GetEditSelection() ); + xub_StrLen nOldLen = aOldSel.Max().GetNode()->Len(); + UndoActionStart( EDITUNDO_INSERT ); if(pSpellInfo->aLastSpellPortions.size() == rNewPortions.size()) { @@ -2266,6 +2285,20 @@ void ImpEditEngine::ApplyChangedSentence(EditView& rEditView, const ::svx::Spell } } UndoActionEnd( EDITUNDO_INSERT ); + + EditPaM aNext; + if (bRecheck) + aNext = pSpellInfo->aCurSentenceStart; + else + { + // restore cursor position to the end of the modified sentence. + // (This will define the continuation position for spell/grammar checking) + // First: check if the sentence/para length changed + sal_Int32 nDelta = rEditView.pImpEditView->GetEditSelection().Max().GetNode()->Len() - nOldLen; + xub_StrLen nEndOfSentence = aOldSel.Max().GetIndex() + nDelta; + aNext = EditPaM( aOldSel.Max().GetNode(), nEndOfSentence ); + } + rEditView.pImpEditView->SetEditSelection( aNext ); } FormatAndUpdate(); aEditDoc.SetModified(TRUE); diff --git a/editeng/source/outliner/outlin2.cxx b/editeng/source/outliner/outlin2.cxx index 1a49c087265a..81db53b3d474 100644 --- a/editeng/source/outliner/outlin2.cxx +++ b/editeng/source/outliner/outlin2.cxx @@ -807,7 +807,7 @@ void Outliner::PutSpellingToSentenceStart( EditView& rEditView ) /*-- 13.10.2003 16:56:25--------------------------------------------------- -----------------------------------------------------------------------*/ -void Outliner::ApplyChangedSentence(EditView& rEditView, const ::svx::SpellPortions& rNewPortions, bool bIsGrammarChecking ) +void Outliner::ApplyChangedSentence(EditView& rEditView, const ::svx::SpellPortions& rNewPortions, bool bRecheck ) { - pEditEngine->ApplyChangedSentence( rEditView, rNewPortions, bIsGrammarChecking ); + pEditEngine->ApplyChangedSentence( rEditView, rNewPortions, bRecheck ); } diff --git a/svx/inc/svx/SpellDialogChildWindow.hxx b/svx/inc/svx/SpellDialogChildWindow.hxx index 034b6372f6f1..3702b643e17e 100644 --- a/svx/inc/svx/SpellDialogChildWindow.hxx +++ b/svx/inc/svx/SpellDialogChildWindow.hxx @@ -69,15 +69,19 @@ protected: @return returns an empty vector if no error could be found */ - virtual SpellPortions GetNextWrongSentence (void) = 0; + virtual SpellPortions GetNextWrongSentence (bool bRecheck) = 0; /** This abstract method applies the changes made in the spelling dialog to the document. The dialog always updates its settings when it gets the focus. The document can rely on the fact that the methods ApplyChangedSentence() is called for the position that the last GetNextWrongSentence() returned. + If 'bRecheck' is set to true then the same sentence should be rechecked once from + the start. This should be used too find errors that the user has introduced by + manual changes in the edit field, and in order to not miss the still following errors + in that sentence. */ - virtual void ApplyChangedSentence(const SpellPortions& rChanged) = 0; + virtual void ApplyChangedSentence(const SpellPortions& rChanged, bool bRecheck ) = 0; /** This methods determines whether the application supports AutoCorrection */ virtual bool HasAutoCorrection(); -- cgit v1.2.3 From 778e61a277dfee0682752896786e15d601478364 Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Thu, 22 Apr 2010 13:08:19 +0200 Subject: cws tl80: #i110341# problems with spell check dialog fixed --- sw/inc/crsrsh.hxx | 1 + sw/inc/editsh.hxx | 7 +- sw/inc/swcrsr.hxx | 1 + sw/source/core/crsr/crstrvl1.cxx | 4 + sw/source/core/crsr/swcrsr.cxx | 80 +++++++++++-- sw/source/core/edit/edlingu.cxx | 58 ++++++++- sw/source/filter/ww8/wrtww8.cxx | 24 ++-- sw/source/ui/dialog/SwSpellDialogChildWindow.cxx | 146 ++++++++++++++--------- sw/source/ui/inc/SwSpellDialogChildWindow.hxx | 4 +- sw/source/ui/inc/view.hxx | 2 +- sw/source/ui/uiview/viewdraw.cxx | 7 +- 11 files changed, 249 insertions(+), 85 deletions(-) mode change 100644 => 100755 sw/source/filter/ww8/wrtww8.cxx diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx index bcf511aa2a5b..f60a3d89f9ed 100644 --- a/sw/inc/crsrsh.hxx +++ b/sw/inc/crsrsh.hxx @@ -746,6 +746,7 @@ public: BOOL GoStartSentence(); BOOL GoEndSentence(); BOOL SelectWord( const Point* pPt = 0 ); + BOOL ExpandToSentenceBorders(); // Position vom akt. Cursor erfragen BOOL IsStartWord()const; diff --git a/sw/inc/editsh.hxx b/sw/inc/editsh.hxx index b2483f21a75a..3923edb35a2c 100644 --- a/sw/inc/editsh.hxx +++ b/sw/inc/editsh.hxx @@ -743,9 +743,14 @@ public: bool SpellSentence(::svx::SpellPortions& rToFill, bool bIsGrammarCheck ); // make SpellIter start with the current sentence when called next time void PutSpellingToSentenceStart(); + // moves the continuation position to the end of the currently checked sentence + void MoveContinuationPosToEndOfCheckedSentence(); //applies a changed sentence - void ApplyChangedSentence(const ::svx::SpellPortions& rNewPortions, bool bIsGrammarCheck); + void ApplyChangedSentence(const ::svx::SpellPortions& rNewPortions, bool bRecheck); + + // check SwSpellIter data to see if the last sentence got grammar checked + bool HasLastSentenceGotGrammarChecked() const; // Is text conversion active somewhere else? BOOL HasConvIter() const; // Is hyphenation active somewhere else? diff --git a/sw/inc/swcrsr.hxx b/sw/inc/swcrsr.hxx index 6e26a6a3bfcb..294330841388 100644 --- a/sw/inc/swcrsr.hxx +++ b/sw/inc/swcrsr.hxx @@ -162,6 +162,7 @@ public: BOOL GoEndSentence(){return GoSentence(END_SENT);} BOOL GoPrevSentence(){return GoSentence(PREV_SENT);} BOOL GoStartSentence(){return GoSentence(START_SENT);} + BOOL ExpandToSentenceBorders(); virtual BOOL LeftRight( BOOL bLeft, USHORT nCnt, USHORT nMode, BOOL bAllowVisual, BOOL bSkipHidden, BOOL bInsertCrsr ); diff --git a/sw/source/core/crsr/crstrvl1.cxx b/sw/source/core/crsr/crstrvl1.cxx index fcdcd99241f4..6dfccb086b46 100644 --- a/sw/source/core/crsr/crstrvl1.cxx +++ b/sw/source/core/crsr/crstrvl1.cxx @@ -94,4 +94,8 @@ BOOL SwCrsrShell::SelectWord( const Point* pPt ) return pCurCrsr->SelectWord( pPt ); } +BOOL SwCrsrShell::ExpandToSentenceBorders() +{ + return pCurCrsr->ExpandToSentenceBorders(); +} diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx index d8286d007395..fc57e8b38aaf 100644 --- a/sw/source/core/crsr/swcrsr.cxx +++ b/sw/source/core/crsr/swcrsr.cxx @@ -1401,11 +1401,11 @@ BOOL SwCursor::SelectWordWT( sal_Int16 nWordType, const Point* pPt ) } //----------------------------------------------------------------------------- -BOOL SwCursor::GoSentence( SentenceMoveType eMoveType ) + +static String lcl_MaskDeletedRedlines( const SwTxtNode* pTxtNd ) { - BOOL bRet = FALSE; - const SwTxtNode* pTxtNd = GetNode()->GetTxtNode(); - if( pTxtNd && pBreakIt->GetBreakIter().is() ) + String aRes; + if (pTxtNd) { //mask deleted redlines String sNodeText(pTxtNd->GetTxt()); @@ -1430,11 +1430,30 @@ BOOL SwCursor::GoSentence( SentenceMoveType eMoveType ) } } } + aRes = sNodeText; + } + return aRes; +} + +BOOL SwCursor::GoSentence( SentenceMoveType eMoveType ) +{ + BOOL bRet = FALSE; + const SwTxtNode* pTxtNd = GetNode()->GetTxtNode(); + if( pTxtNd && pBreakIt->GetBreakIter().is() ) + { + String sNodeText( lcl_MaskDeletedRedlines( pTxtNd ) ); + SwCrsrSaveState aSave( *this ); xub_StrLen nPtPos = GetPoint()->nContent.GetIndex(); switch ( eMoveType ) { - case END_SENT: + case START_SENT: /* when modifying: see also ExpandToSentenceBorders below! */ + nPtPos = (xub_StrLen)pBreakIt->GetBreakIter()->beginOfSentence( + sNodeText, + nPtPos, pBreakIt->GetLocale( + pTxtNd->GetLang( nPtPos ) )); + break; + case END_SENT: /* when modifying: see also ExpandToSentenceBorders below! */ nPtPos = (xub_StrLen)pBreakIt->GetBreakIter()->endOfSentence( sNodeText, nPtPos, pBreakIt->GetLocale( @@ -1451,12 +1470,6 @@ BOOL SwCursor::GoSentence( SentenceMoveType eMoveType ) ; break; } - case START_SENT: - nPtPos = (xub_StrLen)pBreakIt->GetBreakIter()->beginOfSentence( - sNodeText, - nPtPos, pBreakIt->GetLocale( - pTxtNd->GetLang( nPtPos ) )); - break; case PREV_SENT: nPtPos = (xub_StrLen)pBreakIt->GetBreakIter()->beginOfSentence( sNodeText, @@ -1484,6 +1497,51 @@ BOOL SwCursor::GoSentence( SentenceMoveType eMoveType ) return bRet; } + +BOOL SwCursor::ExpandToSentenceBorders() +{ + BOOL bRes = FALSE; + const SwTxtNode* pStartNd = Start()->nNode.GetNode().GetTxtNode(); + const SwTxtNode* pEndNd = End()->nNode.GetNode().GetTxtNode(); + if (pStartNd && pEndNd && pBreakIt->GetBreakIter().is()) + { + if (!HasMark()) + SetMark(); + + String sStartText( lcl_MaskDeletedRedlines( pStartNd ) ); + String sEndText( pStartNd == pEndNd? sStartText : lcl_MaskDeletedRedlines( pEndNd ) ); + + SwCrsrSaveState aSave( *this ); + xub_StrLen nStartPos = Start()->nContent.GetIndex(); + xub_StrLen nEndPos = End()->nContent.GetIndex(); + + nStartPos = (xub_StrLen)pBreakIt->GetBreakIter()->beginOfSentence( + sStartText, nStartPos, + pBreakIt->GetLocale( pStartNd->GetLang( nStartPos ) ) ); + nEndPos = (xub_StrLen)pBreakIt->GetBreakIter()->endOfSentence( + sEndText, nEndPos, + pBreakIt->GetLocale( pEndNd->GetLang( nEndPos ) ) ); + + // it is allowed to place the PaM just behind the last + // character in the text thus <= ...Len + bool bChanged = false; + if (nStartPos <= pStartNd->GetTxt().Len()) + { + GetMark()->nContent = nStartPos; + bChanged = true; + } + if (nEndPos <= pEndNd->GetTxt().Len()) + { + GetPoint()->nContent = nEndPos; + bChanged = true; + } + if (bChanged && !IsSelOvr()) + bRes = TRUE; + } + return bRes; +} + + BOOL SwTableCursor::LeftRight( BOOL bLeft, USHORT nCnt, USHORT /*nMode*/, BOOL /*bVisualAllowed*/, BOOL /*bSkipHidden*/, BOOL /*bInsertCrsr*/ ) { diff --git a/sw/source/core/edit/edlingu.cxx b/sw/source/core/edit/edlingu.cxx index 02dc1de62901..d99293071048 100644 --- a/sw/source/core/edit/edlingu.cxx +++ b/sw/source/core/edit/edlingu.cxx @@ -136,6 +136,7 @@ class SwSpellIter : public SwLinguIter SpellContentPositions aLastPositions; bool bBackToStartOfSentence; + bool bMoveToEndOfSentence; void CreatePortion(uno::Reference< XSpellAlternatives > xAlt, @@ -147,7 +148,7 @@ class SwSpellIter : public SwLinguIter const SpellContentPositions& rDeletedRedlines); public: SwSpellIter() : - bBackToStartOfSentence(false) {} + bBackToStartOfSentence(false), bMoveToEndOfSentence(false) {} void Start( SwEditShell *pSh, SwDocPositions eStart, SwDocPositions eEnd ); @@ -157,6 +158,7 @@ public: void ToSentenceStart(); const ::svx::SpellPortions GetLastPortions(){ return aLastPortions;} SpellContentPositions GetLastPositions() {return aLastPositions;} + void ContinueAfterThisSentence() { bMoveToEndOfSentence = true; } }; /************************************************************************* @@ -693,6 +695,24 @@ void SwHyphIter::InsertSoftHyph( const xub_StrLen nHyphPos ) // --------------------- Methoden der SwEditShell ------------------------ +bool SwEditShell::HasLastSentenceGotGrammarChecked() const +{ + bool bTextWasGrammarChecked = false; + if (pSpellIter) + { + ::svx::SpellPortions aLastPortions( pSpellIter->GetLastPortions() ); + for (size_t i = 0; i < aLastPortions.size() && !bTextWasGrammarChecked; ++i) + { + // bIsGrammarError is also true if the text was only checked but no + // grammar error was found. (That is if a ProofreadingResult was obtained in + // SwDoc::Spell and in turn bIsGrammarError was set in SwSpellIter::CreatePortion) + if (aLastPortions[i].bIsGrammarError) + bTextWasGrammarChecked = true; + } + } + return bTextWasGrammarChecked; +} + /************************************************************************* * SwEditShell::HasConvIter *************************************************************************/ @@ -1283,7 +1303,20 @@ sal_uInt32 lcl_CountRedlines( /*-- 18.09.2003 15:08:20--------------------------------------------------- -----------------------------------------------------------------------*/ -void SwEditShell::ApplyChangedSentence(const ::svx::SpellPortions& rNewPortions, bool bIsGrammarCheck) + +void SwEditShell::MoveContinuationPosToEndOfCheckedSentence() +{ + // give hint that continuation position for spell/grammar checking is + // at the end of this sentence + if (pSpellIter) + { + pSpellIter->SetCurr( new SwPosition( *pSpellIter->GetCurrX() ) ); + pSpellIter->ContinueAfterThisSentence(); + } +} + + +void SwEditShell::ApplyChangedSentence(const ::svx::SpellPortions& rNewPortions, bool bRecheck) { ASSERT( pSpellIter, "SpellIter missing" ); if(pSpellIter) @@ -1300,9 +1333,14 @@ void SwEditShell::ApplyChangedSentence(const ::svx::SpellPortions& rNewPortions, if(!rLastPortions.size()) return; - SwPaM *pCrsr = GetCrsr(); pDoc->StartUndo( UNDO_OVERWRITE, NULL ); StartAction(); + + SwPaM *pCrsr = GetCrsr(); + // save cursor position (which should be at the end of the current sentence) + // for later restoration + Push(); + sal_uInt32 nRedlinePortions = lcl_CountRedlines(rLastPortions); if((rLastPortions.size() - nRedlinePortions) == rNewPortions.size()) { @@ -1391,16 +1429,24 @@ void SwEditShell::ApplyChangedSentence(const ::svx::SpellPortions& rNewPortions, //set the cursor to the end of the inserted string *pCrsr->Start() = *pCrsr->End(); ++aCurrentNewPortion; - } } - //set the cursor to the end of the new sentence + + // restore cursor to the end of the sentence + // (will work also if the sentence length has changed, + // since cursors get updated automatically!) + Pop( FALSE ); + + // collapse cursor to the end of the modified sentence *pCrsr->Start() = *pCrsr->End(); - if( bIsGrammarCheck) + if (bRecheck) { //in grammar check the current sentence has to be checked again GoStartSentence(); } + // set continuation position for spell/grammar checking to the end of this sentence + pSpellIter->SetCurr( new SwPosition( *pCrsr->Start() ) ); + pDoc->EndUndo( UNDO_OVERWRITE, NULL ); EndAction(); } diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx old mode 100644 new mode 100755 index 6bf7ecbb8cdf..e7e870930d23 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -2433,13 +2433,15 @@ typedef ::std::deque SwNodeDeque; void MSWordExportBase::WriteText() { -#ifdef DEBUG - ::std::clog << "" << ::std::endl; - ::std::clog << dbg_out(pCurPam->GetDoc()->GetNodes()) << ::std::endl; - - SwNodeHashSet aNodeSet; - SwNodeDeque aNodeDeque; -#endif +// whoever has need of the missing function should go and implement it! +// This damned piece of code always breaks builds... +//#ifdef DEBUG +// ::std::clog << "" << ::std::endl; +// ::std::clog << dbg_out(pCurPam->GetDoc()->GetNodes()) << ::std::endl; +// +// SwNodeHashSet aNodeSet; +// SwNodeDeque aNodeDeque; +//#endif while( pCurPam->GetPoint()->nNode < pCurPam->GetMark()->nNode || ( pCurPam->GetPoint()->nNode == pCurPam->GetMark()->nNode && @@ -2447,6 +2449,9 @@ void MSWordExportBase::WriteText() { SwNode * pNd = pCurPam->GetNode(); +// whoever has need of the missing function should go and implement it! +// This damned piece of code always breaks builds... +#if 0 #ifdef DEBUG if (aNodeSet.find(pNd) == aNodeSet.end()) { @@ -2468,6 +2473,7 @@ void MSWordExportBase::WriteText() ::std::clog << "" << ::std::endl; } +#endif #endif if ( pNd->IsTxtNode() ) @@ -3722,7 +3728,9 @@ void WW8AttributeOutput::TableNodeInfoInner( ww8::WW8TableNodeInfoInner::Pointer void MSWordExportBase::OutputEndNode( const SwEndNode &rNode ) { #ifdef DEBUG - ::std::clog << "" << dbg_out(&rNode) << ::std::endl; +// whoever has need of the missing function should go and implement it! +// This damned piece of code always breaks builds... +// ::std::clog << "" << dbg_out(&rNode) << ::std::endl; #endif ww8::WW8TableNodeInfo::Pointer_t pNodeInfo = mpTableInfo->getTableNodeInfo( &rNode ); diff --git a/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx b/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx index 8bf658d504b0..c9e99979e66b 100644 --- a/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx +++ b/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx @@ -32,13 +32,13 @@ #include #include #include -#ifndef _SVX_SVXIDS_HRC #include -#endif #include #include #include #include +#include +#include #include #include #include @@ -56,9 +56,7 @@ #include #include #include -#ifndef _DIALOG_HXX #include -#endif #include @@ -202,12 +200,19 @@ SfxChildWinInfo SwSpellDialogChildWindow::GetInfo (void) const -----------------------------------------------------------------------*/ -svx::SpellPortions SwSpellDialogChildWindow::GetNextWrongSentence (void) +svx::SpellPortions SwSpellDialogChildWindow::GetNextWrongSentence(bool bRecheck) { svx::SpellPortions aRet; SwWrtShell* pWrtShell = GetWrtShell_Impl(); if(pWrtShell) { + if (!bRecheck) + { + // first set continuation point for spell/grammar check to the + // end of the current sentence + pWrtShell->MoveContinuationPosToEndOfCheckedSentence(); + } + ShellModes eSelMode = pWrtShell->GetView().GetShellMode(); bool bDrawText = SHELL_MODE_DRAWTEXT == eSelMode; bool bNormalText = @@ -239,7 +244,10 @@ svx::SpellPortions SwSpellDialogChildWindow::GetNextWrongSentence (void) if(!pWrtShell->HasSelection()) pWrtShell->GoStartSentence(); else + { + pWrtShell->ExpandToSentenceBorders(); m_pSpellState->m_bStartedInSelection = true; + } //determine if the selection is outside of the body text bOtherText = !(pWrtShell->GetFrmType(0,sal_True) & FRMTYPE_BODY); m_pSpellState->m_SpellStartPosition = bOtherText ? SPELL_START_OTHER : SPELL_START_BODY; @@ -269,7 +277,24 @@ svx::SpellPortions SwSpellDialogChildWindow::GetNextWrongSentence (void) m_pSpellState->m_SpellStartPosition = SPELL_START_DRAWTEXT; m_pSpellState->m_pStartDrawing = pSdrView->GetMarkedObjectList().GetMark(0)->GetMarkedSdrObj(); OutlinerView* pOLV = pSdrView->GetTextEditOutlinerView(); - m_pSpellState->m_aStartDrawingSelection = pOLV->GetSelection(); + // start checking at the top of the drawing object + pOLV->SetSelection( ESelection() ); + m_pSpellState->m_aStartDrawingSelection = ESelection(); +/* +Note: spelling in a selection only, or starting in a mid of a drawing object requires +further changes elsewhere. (Especially if it should work in sc and sd as well.) +The code below would only be part of the solution. +(Keeping it a as a comment for the time being) + ESelection aCurSel( pOLV->GetSelection() ); + ESelection aSentenceSel( pOLV->GetEditView().GetEditEngine()->SelectSentence( aCurSel ) ); + if (!aCurSel.HasRange()) + { + aSentenceSel.nEndPara = aSentenceSel.nStartPara; + aSentenceSel.nEndPos = aSentenceSel.nStartPos; + } + pOLV->SetSelection( aSentenceSel ); + m_pSpellState->m_aStartDrawingSelection = aSentenceSel; +*/ } m_pSpellState->m_bInitialCall = false; @@ -316,61 +341,66 @@ svx::SpellPortions SwSpellDialogChildWindow::GetNextWrongSentence (void) //spell inside of the Writer text if(!pWrtShell->SpellSentence(aRet, m_bIsGrammarCheckingOn)) { - //find out which text has been spelled body or other - bOtherText = !(pWrtShell->GetFrmType(0,sal_True) & FRMTYPE_BODY); - if(bOtherText && m_pSpellState->m_bStartedInOther && m_pSpellState->pOtherCursor) + // if there is a selection (within body or header/footer text) + // then spell/grammar checking should not move outside of it. + if (!m_pSpellState->m_bStartedInSelection) { - m_pSpellState->m_bStartedInOther = false; - pWrtShell->SetSelection(*m_pSpellState->pOtherCursor); - pWrtShell->SpellEnd(); - delete m_pSpellState->pOtherCursor; - m_pSpellState->pOtherCursor = 0; - pWrtShell->SpellStart(DOCPOS_OTHERSTART, DOCPOS_CURR, DOCPOS_OTHERSTART, FALSE ); - pWrtShell->SpellSentence(aRet, m_bIsGrammarCheckingOn); - } - if(!aRet.size()) - { - //end spelling - pWrtShell->SpellEnd(); - if(bOtherText) + //find out which text has been spelled body or other + bOtherText = !(pWrtShell->GetFrmType(0,sal_True) & FRMTYPE_BODY); + if(bOtherText && m_pSpellState->m_bStartedInOther && m_pSpellState->pOtherCursor) { - m_pSpellState->m_bOtherSpelled = true; - //has the body been spelled? - if(!m_pSpellState->m_bBodySpelled) + m_pSpellState->m_bStartedInOther = false; + pWrtShell->SetSelection(*m_pSpellState->pOtherCursor); + pWrtShell->SpellEnd(); + delete m_pSpellState->pOtherCursor; + m_pSpellState->pOtherCursor = 0; + pWrtShell->SpellStart(DOCPOS_OTHERSTART, DOCPOS_CURR, DOCPOS_OTHERSTART, FALSE ); + pWrtShell->SpellSentence(aRet, m_bIsGrammarCheckingOn); + } + if(!aRet.size()) + { + //end spelling + pWrtShell->SpellEnd(); + if(bOtherText) { - pWrtShell->SpellStart(DOCPOS_START, DOCPOS_END, DOCPOS_START, FALSE ); - if(!pWrtShell->SpellSentence(aRet, m_bIsGrammarCheckingOn)) + m_pSpellState->m_bOtherSpelled = true; + //has the body been spelled? + if(!m_pSpellState->m_bBodySpelled) { - m_pSpellState->m_bBodySpelled = true; - pWrtShell->SpellEnd(); + pWrtShell->SpellStart(DOCPOS_START, DOCPOS_END, DOCPOS_START, FALSE ); + if(!pWrtShell->SpellSentence(aRet, m_bIsGrammarCheckingOn)) + { + m_pSpellState->m_bBodySpelled = true; + pWrtShell->SpellEnd(); + } } } + else + { + m_pSpellState->m_bBodySpelled = true; + if(!m_pSpellState->m_bOtherSpelled && pWrtShell->HasOtherCnt()) + { + pWrtShell->SpellStart(DOCPOS_OTHERSTART, DOCPOS_OTHEREND, DOCPOS_OTHERSTART, FALSE ); + if(!pWrtShell->SpellSentence(aRet, m_bIsGrammarCheckingOn)) + { + pWrtShell->SpellEnd(); + m_pSpellState->m_bOtherSpelled = true; + } + } + else + m_pSpellState->m_bOtherSpelled = true; + } } - else + + //search for a draw text object that contains error and spell it + if(!aRet.size() && + (m_pSpellState->m_bDrawingsSpelled || + !FindNextDrawTextError_Impl(*pWrtShell) || !SpellDrawText_Impl(*pWrtShell, aRet))) { - m_pSpellState->m_bBodySpelled = true; - if(!m_pSpellState->m_bOtherSpelled && pWrtShell->HasOtherCnt()) - { - pWrtShell->SpellStart(DOCPOS_OTHERSTART, DOCPOS_OTHEREND, DOCPOS_OTHERSTART, FALSE ); - if(!pWrtShell->SpellSentence(aRet, m_bIsGrammarCheckingOn)) - { - pWrtShell->SpellEnd(); - m_pSpellState->m_bOtherSpelled = true; - } - } - else - m_pSpellState->m_bOtherSpelled = true; + lcl_LeaveDrawText(*pWrtShell); + m_pSpellState->m_bDrawingsSpelled = true; } } - - //search for a draw text object that contains error and spell it - if(!aRet.size() && - (m_pSpellState->m_bDrawingsSpelled || - !FindNextDrawTextError_Impl(*pWrtShell) || !SpellDrawText_Impl(*pWrtShell, aRet))) - { - lcl_LeaveDrawText(*pWrtShell); - m_pSpellState->m_bDrawingsSpelled = true; - } } } // now only the rest of the body text can be spelled - @@ -430,7 +460,7 @@ svx::SpellPortions SwSpellDialogChildWindow::GetNextWrongSentence (void) /*-- 09.09.2003 10:39:40--------------------------------------------------- -----------------------------------------------------------------------*/ -void SwSpellDialogChildWindow::ApplyChangedSentence(const svx::SpellPortions& rChanged) +void SwSpellDialogChildWindow::ApplyChangedSentence(const svx::SpellPortions& rChanged, bool bRecheck) { SwWrtShell* pWrtShell = GetWrtShell_Impl(); DBG_ASSERT(!m_pSpellState->m_bInitialCall, "ApplyChangedSentence in initial call or after resume"); @@ -443,13 +473,19 @@ void SwSpellDialogChildWindow::ApplyChangedSentence(const svx::SpellPortions& rC SHELL_MODE_LIST_TEXT == eSelMode || SHELL_MODE_TABLE_LIST_TEXT == eSelMode || SHELL_MODE_TEXT == eSelMode; + + // evaluate if the same sentence should be rechecked or not. + // Sentences that got grammar checked should always be rechecked in order + // to detect possible errors that get introduced with the changes + bRecheck |= pWrtShell->HasLastSentenceGotGrammarChecked(); + if(bNormalText) - pWrtShell->ApplyChangedSentence(rChanged, m_bIsGrammarCheckingOn); + pWrtShell->ApplyChangedSentence(rChanged, bRecheck); else if(bDrawText ) { SdrView* pDrView = pWrtShell->GetDrawView(); SdrOutliner *pOutliner = pDrView->GetTextEditOutliner(); - pOutliner->ApplyChangedSentence(pDrView->GetTextEditOutlinerView()->GetEditView(), rChanged, m_bIsGrammarCheckingOn); + pOutliner->ApplyChangedSentence(pDrView->GetTextEditOutlinerView()->GetEditView(), rChanged, bRecheck); } } } @@ -847,7 +883,7 @@ bool SwSpellDialogChildWindow::FindNextDrawTextError_Impl(SwWrtShell& rSh) Point aTmp( 0,0 ); rSh.SelectObj( aTmp, 0, pTextObj ); SdrPageView* pPV = pDrView->GetSdrPageView(); - rView.BeginTextEdit( pTextObj, pPV, &rView.GetEditWin(), FALSE ); + rView.BeginTextEdit( pTextObj, pPV, &rView.GetEditWin(), FALSE, TRUE ); rView.AttrChangedNotify(&rSh); bNextDoc = true; } diff --git a/sw/source/ui/inc/SwSpellDialogChildWindow.hxx b/sw/source/ui/inc/SwSpellDialogChildWindow.hxx index 3ab86b3469d7..dd3e7e2dce9b 100644 --- a/sw/source/ui/inc/SwSpellDialogChildWindow.hxx +++ b/sw/source/ui/inc/SwSpellDialogChildWindow.hxx @@ -48,8 +48,8 @@ class SwSpellDialogChildWindow void LockFocusNotification(bool bLock); protected: - virtual svx::SpellPortions GetNextWrongSentence (void); - virtual void ApplyChangedSentence(const svx::SpellPortions& rChanged); + virtual svx::SpellPortions GetNextWrongSentence(bool bRecheck); + virtual void ApplyChangedSentence(const svx::SpellPortions& rChanged, bool bRecheck); virtual void AddAutoCorrection(const String& rOld, const String& rNew, LanguageType eLanguage); virtual bool HasAutoCorrection(); virtual bool HasGrammarChecking(); diff --git a/sw/source/ui/inc/view.hxx b/sw/source/ui/inc/view.hxx index 7cff88c897cc..1a950f98032c 100644 --- a/sw/source/ui/inc/view.hxx +++ b/sw/source/ui/inc/view.hxx @@ -574,7 +574,7 @@ public: BOOL HasDrwObj(SdrObject *pSdrObj) const; BOOL HasOnlyObj(SdrObject *pSdrObj, UINT32 eObjInventor) const; BOOL BeginTextEdit( SdrObject* pObj, SdrPageView* pPV=NULL, - Window* pWin=NULL, BOOL bIsNewObj=FALSE); + Window* pWin=NULL, bool bIsNewObj=false, bool bSetSelectionToStart=false ); void StateTabWin(SfxItemSet&); diff --git a/sw/source/ui/uiview/viewdraw.cxx b/sw/source/ui/uiview/viewdraw.cxx index fe38c56f29e5..d9b8ab2c297b 100644 --- a/sw/source/ui/uiview/viewdraw.cxx +++ b/sw/source/ui/uiview/viewdraw.cxx @@ -520,7 +520,8 @@ sal_Bool SwView::EnterDrawTextMode(const Point& aDocPos) /****************************************************************************** * Beschreibung: DrawTextEditMode einschalten ******************************************************************************/ -sal_Bool SwView::BeginTextEdit(SdrObject* pObj, SdrPageView* pPV, Window* pWin, sal_Bool bIsNewObj) +sal_Bool SwView::BeginTextEdit(SdrObject* pObj, SdrPageView* pPV, Window* pWin, + bool bIsNewObj, bool bSetSelectionToStart) { SwWrtShell *pSh = &GetWrtShell(); SdrView *pSdrView = pSh->GetDrawView(); @@ -606,7 +607,11 @@ sal_Bool SwView::BeginTextEdit(SdrObject* pObj, SdrPageView* pPV, Window* pWin, Color aBackground(pSh->GetShapeBackgrd()); pView->SetBackgroundColor(aBackground); } + + // editing should start at the end of text, spell checking at the beginning ... ESelection aNewSelection(EE_PARA_NOT_FOUND, EE_INDEX_NOT_FOUND, EE_PARA_NOT_FOUND, EE_INDEX_NOT_FOUND); + if (bSetSelectionToStart) + aNewSelection = ESelection(); pView->SetSelection(aNewSelection); } -- cgit v1.2.3 From be66917cb7289d8f008ca8eb29308991979763b8 Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Thu, 22 Apr 2010 13:08:19 +0200 Subject: cws tl80: #i110341# problems with spell check dialog fixed --- sd/source/ui/dlg/SpellDialogChildWindow.cxx | 8 ++++---- sd/source/ui/inc/SpellDialogChildWindow.hxx | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sd/source/ui/dlg/SpellDialogChildWindow.cxx b/sd/source/ui/dlg/SpellDialogChildWindow.cxx index 95d4277f8f42..7aee12f23bbd 100644 --- a/sd/source/ui/dlg/SpellDialogChildWindow.cxx +++ b/sd/source/ui/dlg/SpellDialogChildWindow.cxx @@ -96,14 +96,14 @@ void SpellDialogChildWindow::InvalidateSpellDialog (void) -::svx::SpellPortions SpellDialogChildWindow::GetNextWrongSentence (void) +::svx::SpellPortions SpellDialogChildWindow::GetNextWrongSentence( bool /*bRecheck*/ ) { ::svx::SpellPortions aResult; if (mpSdOutliner != NULL) { ProvideOutliner(); - aResult = mpSdOutliner->GetNextSpellSentence (); + aResult = mpSdOutliner->GetNextSpellSentence(); } // Close the spell check dialog when there are no more sentences to @@ -125,7 +125,7 @@ void SpellDialogChildWindow::InvalidateSpellDialog (void) void SpellDialogChildWindow::ApplyChangedSentence ( - const ::svx::SpellPortions& rChanged) + const ::svx::SpellPortions& rChanged, bool bRecheck ) { if (mpSdOutliner != NULL) { @@ -133,7 +133,7 @@ void SpellDialogChildWindow::ApplyChangedSentence ( if (pOutlinerView != NULL) mpSdOutliner->ApplyChangedSentence ( pOutlinerView->GetEditView(), - rChanged, false); + rChanged, bRecheck); } } diff --git a/sd/source/ui/inc/SpellDialogChildWindow.hxx b/sd/source/ui/inc/SpellDialogChildWindow.hxx index 898df6865280..4e08dd99b063 100644 --- a/sd/source/ui/inc/SpellDialogChildWindow.hxx +++ b/sd/source/ui/inc/SpellDialogChildWindow.hxx @@ -62,12 +62,12 @@ protected: next sentence with spelling errors. While doing so the view mode may be changed and text shapes are set into edit mode. */ - virtual ::svx::SpellPortions GetNextWrongSentence (void); + virtual ::svx::SpellPortions GetNextWrongSentence( bool bRecheck ); /** This method is responsible for merging corrections made in the spelling dialog back into the document. */ - virtual void ApplyChangedSentence (const ::svx::SpellPortions& rChanged); + virtual void ApplyChangedSentence(const ::svx::SpellPortions& rChanged, bool bRecheck); virtual void GetFocus (void); virtual void LoseFocus (void); -- cgit v1.2.3 From bbb1428e3666acc7503d86704bbf1e1a4ac04795 Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Thu, 22 Apr 2010 13:08:19 +0200 Subject: cws tl80: #i110341# problems with spell check dialog fixed --- cui/source/dialogs/SpellDialog.cxx | 42 +++++++++++++++++++------------------- cui/source/inc/SpellDialog.hxx | 13 ++++++++---- 2 files changed, 30 insertions(+), 25 deletions(-) diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx index d243ce96f27c..81fee79663e5 100644 --- a/cui/source/dialogs/SpellDialog.cxx +++ b/cui/source/dialogs/SpellDialog.cxx @@ -389,14 +389,14 @@ void SpellDialog::UpdateBoxes_Impl() } // ----------------------------------------------------------------------- -void SpellDialog::SpellContinue_Impl(bool bUseSavedSentence) +void SpellDialog::SpellContinue_Impl(bool bUseSavedSentence, bool bIgnoreCurrentError ) { //initially or after the last error of a sentence MarkNextError will fail //then GetNextSentence() has to be called followed again by MarkNextError() //MarkNextError is not initally called if the UndoEdit mode is active bool bNextSentence = false; - if((!aSentenceED.IsUndoEditMode() && aSentenceED.MarkNextError()) || - true == ( bNextSentence = GetNextSentence_Impl(bUseSavedSentence) && aSentenceED.MarkNextError())) + if((!aSentenceED.IsUndoEditMode() && aSentenceED.MarkNextError( bIgnoreCurrentError )) || + true == ( bNextSentence = GetNextSentence_Impl(bUseSavedSentence, aSentenceED.IsUndoEditMode()) && aSentenceED.MarkNextError( false ))) { const SpellErrorDescription* pSpellErrorDescription = aSentenceED.GetAlternatives(); if( pSpellErrorDescription ) @@ -795,14 +795,12 @@ IMPL_LINK( SpellDialog, IgnoreHdl, Button *, EMPTYARG ) } else { - //in case the error has been changed manually it has to be restored + //in case the error has been changed manually it has to be restored, + // since the users choice now was to ignore the error aSentenceED.RestoreCurrentError(); - rParent.ApplyChangedSentence(aSentenceED.CreateSpellPortions(true)); - aSentenceED.ResetModified(); // the word is being ignored - SpellContinue_Impl(); - bModified = false; + SpellContinue_Impl( false, true ); } return 1; } @@ -1074,11 +1072,8 @@ IMPL_LINK(SpellDialog, ModifyHdl, SentenceEditWindow_Impl*, pEd) -----------------------------------------------------------------------*/ IMPL_LINK(SpellDialog, CancelHdl, Button *, EMPTYARG ) { - //apply changes first - if there are any - if(aSentenceED.IsModified()) - { - rParent.ApplyChangedSentence(aSentenceED.CreateSpellPortions(false)); - } + //apply changes and ignored text parts first - if there are any + rParent.ApplyChangedSentence(aSentenceED.CreateSpellPortions(true), false); Close(); return 0; } @@ -1158,15 +1153,17 @@ void SpellDialog::InvalidateDialog() /*-- 10.09.2003 08:35:56--------------------------------------------------- -----------------------------------------------------------------------*/ -bool SpellDialog::GetNextSentence_Impl(bool bUseSavedSentence) +bool SpellDialog::GetNextSentence_Impl(bool bUseSavedSentence, bool bRecheck) { bool bRet = false; - if(!bUseSavedSentence && aSentenceED.IsModified()) + if(!bUseSavedSentence /*&& aSentenceED.IsModified()*/) { - rParent.ApplyChangedSentence(aSentenceED.CreateSpellPortions(false)); + //apply changes and ignored text parts + rParent.ApplyChangedSentence(aSentenceED.CreateSpellPortions(true), bRecheck); } + aSentenceED.ResetIgnoreErrorsAt(); aSentenceED.ResetModified(); - SpellPortions aSentence = bUseSavedSentence ? m_aSavedSentence : rParent.GetNextWrongSentence(); + SpellPortions aSentence = bUseSavedSentence ? m_aSavedSentence : rParent.GetNextWrongSentence( bRecheck ); if(!bUseSavedSentence) m_aSavedSentence = aSentence; bool bHasReplaced = false; @@ -1177,8 +1174,8 @@ bool SpellDialog::GetNextSentence_Impl(bool bUseSavedSentence) if(!ApplyChangeAllList_Impl(aSentence, bHasReplaced)) { - rParent.ApplyChangedSentence(aSentence); - aSentence = rParent.GetNextWrongSentence(); + rParent.ApplyChangedSentence(aSentence, bRecheck); + aSentence = rParent.GetNextWrongSentence( bRecheck ); } else break; @@ -1642,8 +1639,10 @@ long SentenceEditWindow_Impl::PreNotify( NotifyEvent& rNEvt ) /*-- 10.09.2003 13:38:14--------------------------------------------------- -----------------------------------------------------------------------*/ -bool SentenceEditWindow_Impl::MarkNextError() +bool SentenceEditWindow_Impl::MarkNextError( bool bIgnoreCurrentError ) { + if (bIgnoreCurrentError) + m_aIgnoreErrorsAt.insert( m_nErrorStart ); ExtTextEngine* pTextEngine = GetTextEngine(); USHORT nTextLen = pTextEngine->GetTextLen(0); if(m_nErrorEnd >= nTextLen - 1) @@ -1981,7 +1980,8 @@ svx::SpellPortions SentenceEditWindow_Impl::CreateSpellPortions( bool bSetIgnore aPortion1.eLanguage = eLang; aPortion1.sText = pTextEngine->GetText( TextSelection(TextPaM(0, nStart), TextPaM(0, aStart->nPosition))); - if( bSetIgnoreFlag && m_nErrorStart == nStart ) + bool bIsIgnoreError = m_aIgnoreErrorsAt.find( nStart ) != m_aIgnoreErrorsAt.end(); + if( bSetIgnoreFlag && bIsIgnoreError /*m_nErrorStart == nStart*/ ) { aPortion1.bIgnoreThisError = true; } diff --git a/cui/source/inc/SpellDialog.hxx b/cui/source/inc/SpellDialog.hxx index a2deb5192389..8d233b71e890 100644 --- a/cui/source/inc/SpellDialog.hxx +++ b/cui/source/inc/SpellDialog.hxx @@ -50,6 +50,8 @@ #include #include +#include + class ScrollBar; class TextEngine; class ExtTextView; @@ -72,11 +74,12 @@ class SentenceEditWindow_Impl : public MultiLineEdit/*, public SfxListener*/ using MultiLineEdit::SetText; private: + std::set< USHORT > m_aIgnoreErrorsAt; USHORT m_nErrorStart; USHORT m_nErrorEnd; bool m_bIsUndoEditMode; - Link m_aModifyLink; + Link m_aModifyLink; void CallModifyLink() {m_aModifyLink.Call(this);} @@ -93,7 +96,7 @@ public: void SetAttrib( const TextAttrib& rAttr, ULONG nPara, USHORT nStart, USHORT nEnd ); void SetText( const String& rStr ); - bool MarkNextError(); + bool MarkNextError( bool bIgnoreCurrentError ); void ChangeMarkedWord(const String& rNewWord, LanguageType eLanguage); void MoveErrorMarkTo(USHORT nErrorStart, USHORT nErrorEnd, bool bGrammar); String GetErrorText() const; @@ -121,6 +124,8 @@ public: void UndoActionEnd( USHORT nId ); void MoveErrorEnd(long nOffset); + + void ResetIgnoreErrorsAt() { m_aIgnoreErrorsAt.clear(); } }; @@ -221,7 +226,7 @@ private: void InitUserDicts(); void UpdateBoxes_Impl(); void Init_Impl(); - void SpellContinue_Impl(bool UseSavedSentence = false); + void SpellContinue_Impl(bool UseSavedSentence = false, bool bIgnoreCurrentError = false ); void LockFocusChanges( bool bLock ) {bFocusLocked = bLock;} void Impl_Restore(); @@ -230,7 +235,7 @@ private: /** Retrieves the next sentence. */ - bool GetNextSentence_Impl(bool bUseSavedSentence); + bool GetNextSentence_Impl(bool bUseSavedSentence, bool bRechek /*for rechecking the curretn sentence*/); /** Corrects all errors that have been selected to be changed always */ bool ApplyChangeAllList_Impl(SpellPortions& rSentence, bool& bHasReplaced); -- cgit v1.2.3 From 26f62677ed79ab702a112a413beb04d6da2948b3 Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Thu, 22 Apr 2010 13:08:19 +0200 Subject: cws tl80: #i110341# problems with spell check dialog fixed --- sc/source/ui/inc/spelldialog.hxx | 4 ++-- sc/source/ui/view/spelldialog.cxx | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sc/source/ui/inc/spelldialog.hxx b/sc/source/ui/inc/spelldialog.hxx index af97519a2b43..eef0d170c2c8 100644 --- a/sc/source/ui/inc/spelldialog.hxx +++ b/sc/source/ui/inc/spelldialog.hxx @@ -65,12 +65,12 @@ protected: next sentence with spelling errors. While doing so the view mode may be changed and text shapes are set into edit mode. */ - virtual ::svx::SpellPortions GetNextWrongSentence(); + virtual ::svx::SpellPortions GetNextWrongSentence( bool bRecheck ); /** This method is responsible for merging corrections made in the spelling dialog back into the document. */ - virtual void ApplyChangedSentence( const ::svx::SpellPortions& rChanged ); + virtual void ApplyChangedSentence( const ::svx::SpellPortions& rChanged, bool bRecheck ); virtual void GetFocus(); virtual void LoseFocus(); diff --git a/sc/source/ui/view/spelldialog.cxx b/sc/source/ui/view/spelldialog.cxx index 8ff816263b4f..522b3b41abf4 100644 --- a/sc/source/ui/view/spelldialog.cxx +++ b/sc/source/ui/view/spelldialog.cxx @@ -79,7 +79,7 @@ void ScSpellDialogChildWindow::InvalidateSpellDialog() // protected ------------------------------------------------------------------ -::svx::SpellPortions ScSpellDialogChildWindow::GetNextWrongSentence() +::svx::SpellPortions ScSpellDialogChildWindow::GetNextWrongSentence( bool /*bRecheck*/ ) { ::svx::SpellPortions aPortions; if( mxEngine.get() && mpViewData ) @@ -103,11 +103,11 @@ void ScSpellDialogChildWindow::InvalidateSpellDialog() return aPortions; } -void ScSpellDialogChildWindow::ApplyChangedSentence( const ::svx::SpellPortions& rChanged ) +void ScSpellDialogChildWindow::ApplyChangedSentence( const ::svx::SpellPortions& rChanged, bool bRecheck ) { if( mxEngine.get() && mpViewData ) if( EditView* pEditView = mpViewData->GetSpellingView() ) - mxEngine->ApplyChangedSentence( *pEditView, rChanged, false ); + mxEngine->ApplyChangedSentence( *pEditView, rChanged, bRecheck ); } void ScSpellDialogChildWindow::GetFocus() -- cgit v1.2.3 From 33b27bb6627da60efcd78919c287a521f06c7e2b Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Thu, 22 Apr 2010 17:01:19 +0200 Subject: vcl111: #i108490# condition for error message was to broad --- vcl/source/gdi/pdfwriter_impl.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 6a24775219d9..add53cdfaabf 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -9749,7 +9749,7 @@ bool PDFWriterImpl::writeBitmapObject( BitmapEmit& rObject, bool bMask ) aLine.append( " ]\n" ); } } - else if( m_bIsPDF_A1 ) + else if( m_bIsPDF_A1 && (bWriteMask || aTransparentColor != Color( COL_TRANSPARENT )) ) m_aErrors.insert( PDFWriter::Warning_Transparency_Omitted_PDFA ); aLine.append( ">>\n" -- cgit v1.2.3 From fbce9358c049499cf0fc142e259493034fc6355c Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Thu, 22 Apr 2010 19:41:52 +0200 Subject: vcl111: #i59974# improve single key commit hack --- vcl/unx/gtk/window/gtkframe.cxx | 17 +++++++++++++---- vcl/unx/inc/plugins/gtk/gtkframe.hxx | 1 + 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/vcl/unx/gtk/window/gtkframe.cxx b/vcl/unx/gtk/window/gtkframe.cxx index ad694cf5bbc1..8029fb3cd05c 100644 --- a/vcl/unx/gtk/window/gtkframe.cxx +++ b/vcl/unx/gtk/window/gtkframe.cxx @@ -3209,7 +3209,8 @@ GtkSalFrame::IMHandler::IMHandler( GtkSalFrame* pFrame ) : m_pFrame(pFrame), m_nPrevKeyPresses( 0 ), m_pIMContext( NULL ), - m_bFocused( true ) + m_bFocused( true ), + m_bPreeditJustChanged( false ) { m_aInputEvent.mpTextAttr = NULL; createIMContext(); @@ -3384,6 +3385,8 @@ bool GtkSalFrame::IMHandler::handleKeyEvent( GdkEventKey* pEvent ) if( aDel.isDeleted() ) return true; + m_bPreeditJustChanged = false; + if( bResult ) return true; else @@ -3413,6 +3416,8 @@ bool GtkSalFrame::IMHandler::handleKeyEvent( GdkEventKey* pEvent ) if( aDel.isDeleted() ) return true; + m_bPreeditJustChanged = false; + std::list::iterator iter = m_aPrevKeyPresses.begin(); std::list::iterator iter_end = m_aPrevKeyPresses.end(); while (iter != iter_end) @@ -3476,8 +3481,6 @@ void GtkSalFrame::IMHandler::signalIMCommit( GtkIMContext* CONTEXT_ARG, gchar* p { GTK_YIELD_GRAB(); - bool bWasPreedit = (pThis->m_aInputEvent.mpTextAttr != 0); - pThis->m_aInputEvent.mnTime = 0; pThis->m_aInputEvent.mpTextAttr = 0; pThis->m_aInputEvent.maText = String( pText, RTL_TEXTENCODING_UTF8 ); @@ -3501,6 +3504,9 @@ void GtkSalFrame::IMHandler::signalIMCommit( GtkIMContext* CONTEXT_ARG, gchar* p * or because there never was a preedit. */ bool bSingleCommit = false; + bool bWasPreedit = + (pThis->m_aInputEvent.mpTextAttr != 0) || + pThis->m_bPreeditJustChanged; if( ! bWasPreedit && pThis->m_aInputEvent.maText.Len() == 1 && ! pThis->m_aPrevKeyPresses.empty() @@ -3515,7 +3521,6 @@ void GtkSalFrame::IMHandler::signalIMCommit( GtkIMContext* CONTEXT_ARG, gchar* p bSingleCommit = true; } } - if( ! bSingleCommit ) { pThis->m_pFrame->CallCallback( SALEVENT_EXTTEXTINPUT, (void*)&pThis->m_aInputEvent); @@ -3563,6 +3568,8 @@ void GtkSalFrame::IMHandler::signalIMPreeditChanged( GtkIMContext*, gpointer im_ } } + pThis->m_bPreeditJustChanged = true; + bool bEndPreedit = (!pText || !*pText) && pThis->m_aInputEvent.mpTextAttr != NULL; pThis->m_aInputEvent.mnTime = 0; pThis->m_aInputEvent.maText = String( pText, RTL_TEXTENCODING_UTF8 ); @@ -3646,6 +3653,8 @@ void GtkSalFrame::IMHandler::signalIMPreeditEnd( GtkIMContext*, gpointer im_hand GtkSalFrame::IMHandler* pThis = (GtkSalFrame::IMHandler*)im_handler; GTK_YIELD_GRAB(); + pThis->m_bPreeditJustChanged = true; + vcl::DeletionListener aDel( pThis->m_pFrame ); pThis->doCallEndExtTextInput(); if( ! aDel.isDeleted() ) diff --git a/vcl/unx/inc/plugins/gtk/gtkframe.hxx b/vcl/unx/inc/plugins/gtk/gtkframe.hxx index 88a26b401eed..18dd476fc2c4 100644 --- a/vcl/unx/inc/plugins/gtk/gtkframe.hxx +++ b/vcl/unx/inc/plugins/gtk/gtkframe.hxx @@ -130,6 +130,7 @@ class GtkSalFrame : public SalFrame int m_nPrevKeyPresses; // avoid using size() GtkIMContext* m_pIMContext; bool m_bFocused; + bool m_bPreeditJustChanged; SalExtTextInputEvent m_aInputEvent; std::vector< USHORT > m_aInputFlags; -- cgit v1.2.3 From 7bbc0b7c77ad3709ac14de13a22a5ee6c42bf90f Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Fri, 23 Apr 2010 08:03:06 +0200 Subject: cws tl80: #i109743# editengine occasional drag and drop crash fixed --- editeng/source/editeng/impedit.cxx | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) mode change 100644 => 100755 editeng/source/editeng/impedit.cxx diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx old mode 100644 new mode 100755 index b327d2a685bd..9ac7de8e2b7d --- a/editeng/source/editeng/impedit.cxx +++ b/editeng/source/editeng/impedit.cxx @@ -1489,7 +1489,7 @@ void ImpEditView::HideDDCursor() void ImpEditView::ShowDDCursor( const Rectangle& rRect ) { - if ( !pDragAndDropInfo->bVisCursor ) + if ( pDragAndDropInfo && !pDragAndDropInfo->bVisCursor ) { if ( pOutWin->GetCursor() ) pOutWin->GetCursor()->Hide(); @@ -1544,6 +1544,8 @@ void ImpEditView::dragGestureRecognized( const ::com::sun::star::datatransfer::d vos::OGuard aVclGuard( Application::GetSolarMutex() ); + pDragAndDropInfo = NULL; + Point aMousePosPixel( rDGE.DragOriginX, rDGE.DragOriginY ); EditSelection aCopySel( GetEditSelection() ); @@ -1717,7 +1719,7 @@ void ImpEditView::drop( const ::com::sun::star::datatransfer::dnd::DropTargetDro DBG_ASSERT( pDragAndDropInfo, "Drop - No Drag&Drop info?!" ); - if ( pDragAndDropInfo->bDragAccepted ) + if ( pDragAndDropInfo && pDragAndDropInfo->bDragAccepted ) { pEditEngine->GetBeginDropHdl().Call(GetEditViewPtr()); BOOL bChanges = FALSE; @@ -1817,7 +1819,7 @@ void ImpEditView::dragExit( const ::com::sun::star::datatransfer::dnd::DropTarge HideDDCursor(); - if ( !pDragAndDropInfo->bStarterOfDD ) + if ( pDragAndDropInfo && !pDragAndDropInfo->bStarterOfDD ) { delete pDragAndDropInfo; pDragAndDropInfo = NULL; @@ -1837,7 +1839,7 @@ void ImpEditView::dragOver( const ::com::sun::star::datatransfer::dnd::DropTarge { // sal_Int8 nSupportedActions = bReadOnly ? datatransfer::dnd::DNDConstants::ACTION_COPY : datatransfer::dnd::DNDConstants::ACTION_COPY_OR_MOVE; - if ( pDragAndDropInfo->bHasValidData /* && ( nSupportedActions & rDTDE.DropAction ) MT: Default = 0x80 ?! */ ) + if ( pDragAndDropInfo && pDragAndDropInfo->bHasValidData /* && ( nSupportedActions & rDTDE.DropAction ) MT: Default = 0x80 ?! */ ) { bAccept = sal_True; @@ -1957,7 +1959,8 @@ void ImpEditView::dragOver( const ::com::sun::star::datatransfer::dnd::DropTarge if ( !bAccept ) { HideDDCursor(); - pDragAndDropInfo->bDragAccepted = FALSE; + if (pDragAndDropInfo) + pDragAndDropInfo->bDragAccepted = FALSE; rDTDE.Context->rejectDrag(); } } -- cgit v1.2.3 From 8cf42ae630b46da64f9b86fbc47cbf2e3ed2b05f Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Fri, 23 Apr 2010 08:19:46 +0200 Subject: cws tl80: #i106032# changed default dictionary type for new user dictionaries to plain UTF-8 text file --- linguistic/source/dicimp.cxx | 46 +++++++++++++++++++++++++------------------- 1 file changed, 26 insertions(+), 20 deletions(-) diff --git a/linguistic/source/dicimp.cxx b/linguistic/source/dicimp.cxx index 969321ec3991..e975836c447c 100644 --- a/linguistic/source/dicimp.cxx +++ b/linguistic/source/dicimp.cxx @@ -74,6 +74,12 @@ static const sal_Char* pVerStr5 = "WBSWG5"; static const sal_Char* pVerStr6 = "WBSWG6"; static const sal_Char* pVerOOo7 = "OOoUserDict1"; +static const INT16 DIC_VERSION_DONTKNOW = -1; +static const INT16 DIC_VERSION_2 = 2; +static const INT16 DIC_VERSION_5 = 5; +static const INT16 DIC_VERSION_6 = 6; +static const INT16 DIC_VERSION_7 = 7; + static sal_Bool getTag(const ByteString &rLine, const sal_Char *pTagName, ByteString &rTagValue) { @@ -89,7 +95,7 @@ static sal_Bool getTag(const ByteString &rLine, INT16 ReadDicVersion( SvStreamPtr &rpStream, USHORT &nLng, BOOL &bNeg ) { // Sniff the header - INT16 nDicVersion; + INT16 nDicVersion = DIC_VERSION_DONTKNOW; sal_Char pMagicHeader[MAX_HEADER_LENGTH]; nLng = LANGUAGE_NONE; @@ -107,7 +113,7 @@ INT16 ReadDicVersion( SvStreamPtr &rpStream, USHORT &nLng, BOOL &bNeg ) sal_Bool bSuccess; ByteString aLine; - nDicVersion = 7; + nDicVersion = DIC_VERSION_7; // 1st skip magic / header line rpStream->ReadLine(aLine); @@ -160,17 +166,17 @@ INT16 ReadDicVersion( SvStreamPtr &rpStream, USHORT &nLng, BOOL &bNeg ) // Check version magic if (0 == strcmp( pMagicHeader, pVerStr6 )) - nDicVersion = 6; + nDicVersion = DIC_VERSION_6; else if (0 == strcmp( pMagicHeader, pVerStr5 )) - nDicVersion = 5; + nDicVersion = DIC_VERSION_5; else if (0 == strcmp( pMagicHeader, pVerStr2 )) - nDicVersion = 2; + nDicVersion = DIC_VERSION_2; else - nDicVersion = -1; + nDicVersion = DIC_VERSION_DONTKNOW; - if (2 == nDicVersion || - 5 == nDicVersion || - 6 == nDicVersion) + if (DIC_VERSION_2 == nDicVersion || + DIC_VERSION_5 == nDicVersion || + DIC_VERSION_6 == nDicVersion) { // The language of the dictionary *rpStream >> nLng; @@ -203,7 +209,7 @@ DictionaryNeo::DictionaryNeo() : nLanguage (LANGUAGE_NONE) { nCount = 0; - nDicVersion = -1; + nDicVersion = DIC_VERSION_DONTKNOW; bNeedEntries = FALSE; bIsModified = bIsActive = FALSE; bIsReadonly = FALSE; @@ -220,7 +226,7 @@ DictionaryNeo::DictionaryNeo(const OUString &rName, nLanguage (nLang) { nCount = 0; - nDicVersion = -1; + nDicVersion = DIC_VERSION_DONTKNOW; bNeedEntries = TRUE; bIsModified = bIsActive = FALSE; bIsReadonly = !bWriteable; @@ -231,7 +237,7 @@ DictionaryNeo::DictionaryNeo(const OUString &rName, if( !bExists ) { // save new dictionaries with in 6.0 Format (uses UTF8) - nDicVersion = 6; + nDicVersion = DIC_VERSION_6; //! create physical representation of an **empty** dictionary //! that could be found by the dictionary-list implementation @@ -303,13 +309,13 @@ ULONG DictionaryNeo::loadEntries(const OUString &rMainURL) eDicType = bNegativ ? DictionaryType_NEGATIVE : DictionaryType_POSITIVE; rtl_TextEncoding eEnc = osl_getThreadTextEncoding(); - if (nDicVersion >= 6) + if (nDicVersion >= DIC_VERSION_6) eEnc = RTL_TEXTENCODING_UTF8; nCount = 0; - if (6 == nDicVersion || - 5 == nDicVersion || - 2 == nDicVersion) + if (DIC_VERSION_6 == nDicVersion || + DIC_VERSION_5 == nDicVersion || + DIC_VERSION_2 == nDicVersion) { USHORT nLen = 0; sal_Char aWordBuf[ BUFSIZE ]; @@ -363,7 +369,7 @@ ULONG DictionaryNeo::loadEntries(const OUString &rMainURL) *(aWordBuf + nLen) = 0; } } - else if (7 == nDicVersion) + else if (DIC_VERSION_7 == nDicVersion) { sal_Bool bSuccess; ByteString aLine; @@ -436,10 +442,10 @@ ULONG DictionaryNeo::saveEntries(const OUString &rURL) ULONG nErr = sal::static_int_cast< ULONG >(-1); rtl_TextEncoding eEnc = osl_getThreadTextEncoding(); - if (nDicVersion >= 6) + if (nDicVersion >= DIC_VERSION_6) eEnc = RTL_TEXTENCODING_UTF8; - if (nDicVersion == 7) + if (nDicVersion == DIC_VERSION_7) { pStream->WriteLine(ByteString (pVerOOo7)); if (0 != (nErr = pStream->GetError())) @@ -482,7 +488,7 @@ ULONG DictionaryNeo::saveEntries(const OUString &rURL) // write version const sal_Char *pVerStr = NULL; - if (6 == nDicVersion) + if (DIC_VERSION_6 == nDicVersion) pVerStr = pVerStr6; else pVerStr = eDicType == DictionaryType_POSITIVE ? pVerStr2 : pVerStr5; -- cgit v1.2.3 From 224c0656fd0b1da325a2d6523b205f11058a3250 Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Fri, 23 Apr 2010 08:45:27 +0200 Subject: cws tl80: #i106032# changed default dictionary type for new user dictionaries to plain UTF-8 text file --- linguistic/source/dicimp.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) mode change 100644 => 100755 linguistic/source/dicimp.cxx diff --git a/linguistic/source/dicimp.cxx b/linguistic/source/dicimp.cxx old mode 100644 new mode 100755 index e975836c447c..1372dd782cf6 --- a/linguistic/source/dicimp.cxx +++ b/linguistic/source/dicimp.cxx @@ -236,8 +236,8 @@ DictionaryNeo::DictionaryNeo(const OUString &rName, BOOL bExists = FileExists( rMainURL ); if( !bExists ) { - // save new dictionaries with in 6.0 Format (uses UTF8) - nDicVersion = DIC_VERSION_6; + // save new dictionaries with in Format 7 (UTF8 plain text) + nDicVersion = 7; //! create physical representation of an **empty** dictionary //! that could be found by the dictionary-list implementation -- cgit v1.2.3 From e347876fb20d1df2e2c71d33865dae6d37fa9f51 Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Fri, 23 Apr 2010 08:48:44 +0200 Subject: cws tl80: #i106032# changed default dictionary type for new user dictionaries to plain UTF-8 text file --- linguistic/source/dicimp.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linguistic/source/dicimp.cxx b/linguistic/source/dicimp.cxx index 1372dd782cf6..fe53bf344ac3 100755 --- a/linguistic/source/dicimp.cxx +++ b/linguistic/source/dicimp.cxx @@ -237,7 +237,7 @@ DictionaryNeo::DictionaryNeo(const OUString &rName, if( !bExists ) { // save new dictionaries with in Format 7 (UTF8 plain text) - nDicVersion = 7; + nDicVersion = DIC_VERSION_7; //! create physical representation of an **empty** dictionary //! that could be found by the dictionary-list implementation -- cgit v1.2.3 From e4aad263d015527ede9763fd88496c7e1c537eb4 Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Fri, 23 Apr 2010 11:43:57 +0200 Subject: cws tl80: #i110180# printing options UI fixed --- sw/source/ui/config/optpage.cxx | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) mode change 100644 => 100755 sw/source/ui/config/optpage.cxx diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx old mode 100644 new mode 100755 index 97930582ce5a..921d2a652002 --- a/sw/source/ui/config/optpage.cxx +++ b/sw/source/ui/config/optpage.cxx @@ -542,10 +542,15 @@ void SwAddPrinterTabPage::Reset( const SfxItemSet& ) aFaxLB.SelectEntry( pAddPrinterAttr->sFaxName ); } if (aProspectCB.IsChecked()) + { aProspectCB_RTL.Enable(TRUE); + aNoRB.Enable( FALSE ); + aOnlyRB.Enable( FALSE ); + aEndRB.Enable( FALSE ); + aEndPageRB.Enable( FALSE ); + } else - aProspectCB_RTL.Disable(); - + aProspectCB_RTL.Enable( FALSE ); } //----------------------------------------------------------------------- @@ -560,13 +565,14 @@ void SwAddPrinterTabPage::Init() IMPL_LINK_INLINE_START( SwAddPrinterTabPage, AutoClickHdl, CheckBox *, EMPTYARG ) { bAttrModified = TRUE; - if (aProspectCB.IsChecked()) - aProspectCB_RTL.Enable(TRUE); - else - { + bool bIsProspect = aProspectCB.IsChecked(); + if (!bIsProspect) aProspectCB_RTL.Check( FALSE ); - aProspectCB_RTL.Disable(); - } + aProspectCB_RTL.Enable( bIsProspect ); + aNoRB.Enable( !bIsProspect ); + aOnlyRB.Enable( !bIsProspect ); + aEndRB.Enable( !bIsProspect ); + aEndPageRB.Enable( !bIsProspect ); return 0; } IMPL_LINK_INLINE_END( SwAddPrinterTabPage, AutoClickHdl, CheckBox *, EMPTYARG ) -- cgit v1.2.3 From 5f2fd81b6935efb16336201ef162f283a683f405 Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Fri, 23 Apr 2010 14:24:45 +0200 Subject: cws tl80: #i109020# 'nospace' command added --- starmath/inc/node.hxx | 13 ++++++-- starmath/inc/parse.hxx | 2 +- starmath/inc/starmath.hrc | 2 ++ starmath/source/commands.src | 7 +++++ starmath/source/node.cxx | 5 +-- starmath/source/parse.cxx | 73 ++++++++++++++++++++++++++++++++------------ 6 files changed, 77 insertions(+), 25 deletions(-) mode change 100644 => 100755 starmath/source/parse.cxx diff --git a/starmath/inc/node.hxx b/starmath/inc/node.hxx index f9fed9c9602a..6ef89ea5ec1b 100644 --- a/starmath/inc/node.hxx +++ b/starmath/inc/node.hxx @@ -484,15 +484,24 @@ public: class SmLineNode : public SmStructureNode { + BOOL bUseExtraSpaces; + protected: SmLineNode(SmNodeType eNodeType, const SmToken &rNodeToken) : SmStructureNode(eNodeType, rNodeToken) - {} + { + bUseExtraSpaces = TRUE; + } public: SmLineNode(const SmToken &rNodeToken) : SmStructureNode(NLINE, rNodeToken) - {} + { + bUseExtraSpaces = TRUE; + } + + void SetUseExtraSpaces(BOOL bVal) { bUseExtraSpaces = bVal; } + BOOL IsUseExtraSpaces() const { return bUseExtraSpaces; }; virtual void Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell); virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat); diff --git a/starmath/inc/parse.hxx b/starmath/inc/parse.hxx index b3ad5ef5bdc3..facf17d561e2 100644 --- a/starmath/inc/parse.hxx +++ b/starmath/inc/parse.hxx @@ -106,7 +106,7 @@ enum SmTokenType TLEFTARROW, TRIGHTARROW, TUPARROW, TDOWNARROW, TDIVIDES, TNDIBVIDES, TSETN, TSETZ, TSETQ, TSETR, TSETC, TWIDEVEC, TWIDETILDE, TWIDEHAT, TWIDESLASH, - TWIDEBACKSLASH, TLDBRACKET, TRDBRACKET, + TWIDEBACKSLASH, TLDBRACKET, TRDBRACKET, TNOSPACE, TUNKNOWN, TDEBUG }; diff --git a/starmath/inc/starmath.hrc b/starmath/inc/starmath.hrc index 2fbc7b4066d1..d73ea27a0d45 100644 --- a/starmath/inc/starmath.hrc +++ b/starmath/inc/starmath.hrc @@ -379,6 +379,7 @@ #define RID_LSUPX (RID_APP_START + 1916) #define RID_CSUBX (RID_APP_START + 1917) #define RID_CSUPX (RID_APP_START + 1918) +#define RID_NOSPACE (RID_APP_START + 1919) #define RID_ALEPH (RID_APP_START + 2001) #define RID_EMPTYSET (RID_APP_START + 2002) @@ -694,6 +695,7 @@ #define HID_SMA_DOTSDOWN (HID_SMA_START + 240) #define HID_SMA_DOTSLOW (HID_SMA_START + 241) #define HID_SMA_DOTSVERT (HID_SMA_START + 242) +#define HID_SMA_NOSPACE (HID_SMA_START + 243) #define HID_SMA_SETN (HID_SMA2_START + 1) #define HID_SMA_SETZ (HID_SMA2_START + 2) diff --git a/starmath/source/commands.src b/starmath/source/commands.src index 75c00cb819a6..9d618bbd0cf3 100644 --- a/starmath/source/commands.src +++ b/starmath/source/commands.src @@ -223,6 +223,7 @@ String RID_LEFTARROW { Text = "leftarrow " ; }; String RID_RIGHTARROW { Text = "rightarrow " ; }; String RID_UPARROW { Text = "uparrow " ; }; String RID_DOWNARROW { Text = "downarrow " ; }; +String RID_NOSPACE { Text = "nospace {} " ; }; ////////////////////////////////////////// @@ -1326,6 +1327,12 @@ Menu RID_COMMANDMENU Text [ en-US ] = "Gap"; }; MenuItem + { + Identifier = RID_NOSPACE; + HelpId = HID_SMA_NOSPACE; + Text [ en-US ] = "nospace {...}"; + }; + MenuItem { Identifier = RID_BINOMXY; HelpId = HID_SMA_BINOMXY; diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx index 722df5a1d502..30b8768d1570 100644 --- a/starmath/source/node.cxx +++ b/starmath/source/node.cxx @@ -831,8 +831,9 @@ void SmLineNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat) return; // make distance depend on font size - long nDist = +(rFormat.GetDistance(DIS_HORIZONTAL) - * GetFont().GetSize().Height()) / 100L; + long nDist = (rFormat.GetDistance(DIS_HORIZONTAL) * GetFont().GetSize().Height()) / 100L; + if (!IsUseExtraSpaces()) + nDist = 0; Point aPos; for (i = 0; i < nSize; i++) diff --git a/starmath/source/parse.cxx b/starmath/source/parse.cxx old mode 100644 new mode 100755 index 1955b0553b62..0efe0e0ed6b1 --- a/starmath/source/parse.cxx +++ b/starmath/source/parse.cxx @@ -242,12 +242,13 @@ static const SmTokenTableEntry aTokenTable[] = { "ni", TNI, MS_NI, TGRELATION, 0}, { "nitalic", TNITALIC, '\0', TGFONTATTR, 5}, { "none", TNONE, '\0', TGLBRACES | TGRBRACES, 0}, + { "nospace", TNOSPACE, '\0', TGSTANDALONE, 5}, { "notin", TNOTIN, MS_NOTIN, TGRELATION, 0}, + { "nroot", TNROOT, MS_SQRT, TGUNOPER, 5}, { "nsubset", TNSUBSET, MS_NSUBSET, TGRELATION, 0 }, { "nsupset", TNSUPSET, MS_NSUPSET, TGRELATION, 0 }, { "nsubseteq", TNSUBSETEQ, MS_NSUBSETEQ, TGRELATION, 0 }, { "nsupseteq", TNSUPSETEQ, MS_NSUPSETEQ, TGRELATION, 0 }, - { "nroot", TNROOT, MS_SQRT, TGUNOPER, 5}, { "odivide", TODIVIDE, MS_ODIVIDE, TGPRODUCT, 0}, { "odot", TODOT, MS_ODOT, TGPRODUCT, 0}, { "ominus", TOMINUS, MS_OMINUS, TGSUM, 0}, @@ -731,7 +732,7 @@ void SmParser::NextToken() xub_StrLen nTmpStart = sal::static_int_cast< xub_StrLen >(rnEndPos + aTmpRes.LeadingWhiteSpace); - // default setting fo the case that no identifier + // default setting for the case that no identifier // i.e. a valid symbol-name is following the '%' // character CurToken.eType = TTEXT; @@ -1132,6 +1133,16 @@ void SmParser::Line() void SmParser::Expression() { + BOOL bUseExtraSpaces = TRUE; + SmNode *pNode = NodeStack.Pop(); + if (pNode) + { + if (pNode->GetToken().eType == TNOSPACE) + bUseExtraSpaces = FALSE; + else + NodeStack.Push(pNode); // push the node from above again (now to be used as argument to this current 'nospace' node) + } + USHORT n = 0; SmNodeArray RelationArray; @@ -1147,8 +1158,9 @@ void SmParser::Expression() RelationArray[n - 1] = NodeStack.Pop(); } - SmStructureNode *pSNode = new SmExpressionNode(CurToken); + SmExpressionNode *pSNode = new SmExpressionNode(CurToken); pSNode->SetSubNodes(RelationArray); + pSNode->SetUseExtraSpaces(bUseExtraSpaces); NodeStack.Push(pSNode); } @@ -1270,7 +1282,7 @@ void SmParser::SubSup(ULONG nActiveGroup) return; SmSubSupNode *pNode = new SmSubSupNode(CurToken); - //! Of course 'CurToken' ist just the first sub-/supscript token. + //! Of course 'CurToken' is just the first sub-/supscript token. //! It should be of no further interest. The positions of the //! sub-/supscripts will be identified by the corresponding subnodes //! index in the 'aSubNodes' array (enum value from 'SmSubSup'). @@ -1374,30 +1386,51 @@ void SmParser::Blank() void SmParser::Term() { switch (CurToken.eType) - { case TESCAPE : + { + case TESCAPE : Escape(); break; + case TNOSPACE : case TLGROUP : - NextToken(); - - // allow for empty group - if (CurToken.eType == TRGROUP) - { SmStructureNode *pSNode = new SmExpressionNode(CurToken); - pSNode->SetSubNodes(NULL, NULL); - NodeStack.Push(pSNode); - + { + bool bNoSpace = CurToken.eType == TNOSPACE; + if (bNoSpace) // push 'no space' node and continue to parse expression + { + NodeStack.Push(new SmExpressionNode(CurToken)); NextToken(); } - else // go as usual - { Align(); - if (CurToken.eType != TRGROUP) - Error(PE_RGROUP_EXPECTED); - else - { NextToken(); + if (CurToken.eType != TLGROUP) + { + NodeStack.Pop(); // get rid of the 'no space' node pushed above + Term(); + } + else + { + NextToken(); + + // allow for empty group + if (CurToken.eType == TRGROUP) + { + if (bNoSpace) // get rid of the 'no space' node pushed above + NodeStack.Pop(); + SmStructureNode *pSNode = new SmExpressionNode(CurToken); + pSNode->SetSubNodes(NULL, NULL); + NodeStack.Push(pSNode); + + NextToken(); + } + else // go as usual + { + Align(); + if (CurToken.eType != TRGROUP) + Error(PE_RGROUP_EXPECTED); + else + NextToken(); } } - break; + } + break; case TLEFT : Brace(); -- cgit v1.2.3 From 3317eae28d0cc511a54e27e6033eb4ce6ae8689e Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Mon, 26 Apr 2010 09:23:15 +0200 Subject: cws tl80: #i101820# EditEngine spellcheck context menu fixed --- editeng/source/editeng/editview.cxx | 78 +++++++++++++++++++++++++++++++------ 1 file changed, 66 insertions(+), 12 deletions(-) mode change 100644 => 100755 editeng/source/editeng/editview.cxx diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx old mode 100644 new mode 100755 index 766023a0038c..619262677519 --- a/editeng/source/editeng/editview.cxx +++ b/editeng/source/editeng/editview.cxx @@ -40,6 +40,7 @@ #include #include #include +#include #include @@ -62,6 +63,8 @@ #include #include #include +#include +#include #include #include @@ -71,6 +74,8 @@ #include #include +#include + using ::rtl::OUString; using namespace com::sun::star; using namespace com::sun::star::uno; @@ -1004,6 +1009,26 @@ sal_Bool EditView::IsWrongSpelledWordAtPos( const Point& rPosPixel, sal_Bool bMa return pImpEditView->IsWrongSpelledWord( aPaM , bMarkIfWrong ); } + +static Image lcl_GetImageFromPngUrl( const OUString &rFileUrl ) +{ + Image aRes; + OUString aTmp; + osl::FileBase::getSystemPathFromFileURL( rFileUrl, aTmp ); +// ::rtl::OString aPath = OString( aTmp.getStr(), aTmp.getLength(), osl_getThreadTextEncoding() ); +#if defined(WNT) +// aTmp = lcl_Win_GetShortPathName( aTmp ); +#endif + Graphic aGraphic; + const String aFilterName( RTL_CONSTASCII_USTRINGPARAM( IMP_PNG ) ); + if( GRFILTER_OK == GraphicFilter::LoadGraphic( aTmp, aFilterName, aGraphic ) ) + { + aRes = Image( aGraphic.GetBitmapEx() ); + } + return aRes; +} + + void EditView::ExecuteSpellPopup( const Point& rPosPixel, Link* pCallBack ) { #ifndef SVX_LIGHT @@ -1114,25 +1139,54 @@ void EditView::ExecuteSpellPopup( const Point& rPosPixel, Link* pCallBack ) else aPopupMenu.RemoveItem( MN_AUTOCORR ); // Loeschen? - Reference< XDictionaryList > xDicList( SvxGetDictionaryList() ); + SvtLinguConfig aCfg; + const bool bHC = Application::GetSettings().GetStyleSettings().GetHighContrastMode(); + Reference< XDictionaryList > xDicList( SvxGetDictionaryList() ); Sequence< Reference< XDictionary > > aDics; + const Reference< XDictionary > *pDic = NULL; if (xDicList.is()) - aDics = xDicList->getDictionaries(); - const Reference< XDictionary > *pDic = aDics.getConstArray(); - sal_uInt16 nLanguage = PIMPEE->GetLanguage( aPaM2 ); - sal_uInt16 nDicCount = (USHORT)aDics.getLength(); - for ( sal_uInt16 i = 0; i < nDicCount; i++ ) { - Reference< XDictionary > xDic( pDic[i], UNO_QUERY ); + // add the default positive dictionary to dic-list (if not already done). + // This is to ensure that there is at least one dictionary to which + // words could be added. + uno::Reference< linguistic2::XDictionary > xDic( SvxGetOrCreatePosDic( xDicList ) ); if (xDic.is()) + xDic->setActive( sal_True ); + + aDics = xDicList->getDictionaries(); + pDic = aDics.getConstArray(); + sal_uInt16 nCheckedLanguage = PIMPEE->GetLanguage( aPaM2 ); + sal_uInt16 nDicCount = (USHORT)aDics.getLength(); + for (sal_uInt16 i = 0; i < nDicCount; i++) { - sal_uInt16 nActLanguage = SvxLocaleToLanguage( xDic->getLocale() ); - if( xDic->isActive() && - xDic->getDictionaryType() == DictionaryType_POSITIVE && - (nLanguage == nActLanguage || LANGUAGE_NONE == nActLanguage ) ) + uno::Reference< linguistic2::XDictionary > xDicTmp( pDic[i], uno::UNO_QUERY ); + if (!xDicTmp.is() || SvxGetIgnoreAllList() == xDicTmp) + continue; + + uno::Reference< frame::XStorable > xStor( xDicTmp, uno::UNO_QUERY ); + LanguageType nActLanguage = SvxLocaleToLanguage( xDicTmp->getLocale() ); + if( xDicTmp->isActive() + && xDicTmp->getDictionaryType() != linguistic2::DictionaryType_NEGATIVE + && (nCheckedLanguage == nActLanguage || LANGUAGE_NONE == nActLanguage ) + && (!xStor.is() || !xStor->isReadonly()) ) { - pInsertMenu->InsertItem( MN_DICTSTART + i, xDic->getName() ); + // the extra 1 is because of the (possible) external + // linguistic entry above + USHORT nPos = MN_DICTSTART + i; + pInsertMenu->InsertItem( nPos, xDicTmp->getName() ); + + uno::Reference< lang::XServiceInfo > xSvcInfo( xDicTmp, uno::UNO_QUERY ); + if (xSvcInfo.is()) + { + OUString aDictionaryImageUrl( aCfg.GetSpellAndGrammarContextDictionaryImage( + xSvcInfo->getImplementationName(), bHC) ); + if (aDictionaryImageUrl.getLength() > 0) + { + Image aImage( lcl_GetImageFromPngUrl( aDictionaryImageUrl ) ); + pInsertMenu->SetItemImage( nPos, aImage ); + } + } } } } -- cgit v1.2.3 From 96176d231f3737ef4eb96f2e08a5cfd958a12dcb Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Mon, 26 Apr 2010 11:14:03 +0200 Subject: vcl111: #i111106# simplify XIOErrorHandler (thanks cmc) --- vcl/unx/gtk/app/gtkdata.cxx | 3 --- vcl/unx/inc/saldisp.hxx | 1 + vcl/unx/kde/kdedata.cxx | 3 --- vcl/unx/kde4/KDEXLib.cxx | 5 +---- vcl/unx/source/app/saldata.cxx | 6 +++--- 5 files changed, 5 insertions(+), 13 deletions(-) diff --git a/vcl/unx/gtk/app/gtkdata.cxx b/vcl/unx/gtk/app/gtkdata.cxx index d1e5c5954352..586bedca1066 100644 --- a/vcl/unx/gtk/app/gtkdata.cxx +++ b/vcl/unx/gtk/app/gtkdata.cxx @@ -636,9 +636,6 @@ void GtkXLib::Init() Display *pDisp = gdk_x11_display_get_xdisplay( pGdkDisp ); - XSetIOErrorHandler ( (XIOErrorHandler)X11SalData::XIOErrorHdl ); - XSetErrorHandler ( (XErrorHandler)X11SalData::XErrorHdl ); - m_pGtkSalDisplay = new GtkSalDisplay( pGdkDisp ); gdk_window_add_filter( NULL, call_filterGdkEvent, m_pGtkSalDisplay ); diff --git a/vcl/unx/inc/saldisp.hxx b/vcl/unx/inc/saldisp.hxx index e54d6e828911..3734cbec6ef7 100644 --- a/vcl/unx/inc/saldisp.hxx +++ b/vcl/unx/inc/saldisp.hxx @@ -231,6 +231,7 @@ protected: XErrorHandler m_aHandler; }; std::vector< XErrorStackEntry > m_aXErrorHandlerStack; + XIOErrorHandler m_aOrigXIOErrorHandler; public: SalXLib(); virtual ~SalXLib(); diff --git a/vcl/unx/kde/kdedata.cxx b/vcl/unx/kde/kdedata.cxx index 5e2801e47fc6..34b0ff652cde 100644 --- a/vcl/unx/kde/kdedata.cxx +++ b/vcl/unx/kde/kdedata.cxx @@ -182,9 +182,6 @@ void KDEXLib::Init() SalDisplay *pSalDisplay = new SalKDEDisplay( pDisp ); - XSetIOErrorHandler ( (XIOErrorHandler)X11SalData::XIOErrorHdl ); - XSetErrorHandler ( (XErrorHandler)X11SalData::XErrorHdl ); - pInputMethod->CreateMethod( pDisp ); pInputMethod->AddConnectionWatch( pDisp, (void*)this ); pSalDisplay->SetInputMethod( pInputMethod ); diff --git a/vcl/unx/kde4/KDEXLib.cxx b/vcl/unx/kde4/KDEXLib.cxx index 2e5b86b79f9c..6a2793b8abe3 100644 --- a/vcl/unx/kde4/KDEXLib.cxx +++ b/vcl/unx/kde4/KDEXLib.cxx @@ -148,9 +148,6 @@ void KDEXLib::Init() ((VCLKDEApplication*)m_pApplication)->disp = pSalDisplay; - XSetIOErrorHandler ( (XIOErrorHandler)X11SalData::XIOErrorHdl ); - XSetErrorHandler ( (XErrorHandler)X11SalData::XErrorHdl ); - pInputMethod->CreateMethod( pDisp ); pInputMethod->AddConnectionWatch( pDisp, (void*)this ); pSalDisplay->SetInputMethod( pInputMethod ); @@ -175,4 +172,4 @@ void KDEXLib::doStartup() fprintf( stderr, "called KStartupInfo::appStarted()\n" ); #endif } -} \ No newline at end of file +} diff --git a/vcl/unx/source/app/saldata.cxx b/vcl/unx/source/app/saldata.cxx index 4155887a9875..c337dc14a6f8 100644 --- a/vcl/unx/source/app/saldata.cxx +++ b/vcl/unx/source/app/saldata.cxx @@ -352,8 +352,9 @@ SalXLib::SalXLib() nFDs_ = m_pTimeoutFDS[0] + 1; } - PushXErrorLevel( !!getenv( "SAL_IGNOREXERRORS" ) ); m_bHaveSystemChildFrames = false; + m_aOrigXIOErrorHandler = XSetIOErrorHandler ( (XIOErrorHandler)X11SalData::XIOErrorHdl ); + PushXErrorLevel( !!getenv( "SAL_IGNOREXERRORS" ) ); } SalXLib::~SalXLib() @@ -363,6 +364,7 @@ SalXLib::~SalXLib() close (m_pTimeoutFDS[1]); PopXErrorLevel(); + XSetIOErrorHandler (m_aOrigXIOErrorHandler); } void SalXLib::PushXErrorLevel( bool bIgnore ) @@ -458,8 +460,6 @@ void SalXLib::Init() exit(0); } - XSetIOErrorHandler ( (XIOErrorHandler)X11SalData::XIOErrorHdl ); - SalDisplay *pSalDisplay = new SalX11Display( pDisp ); pInputMethod->CreateMethod( pDisp ); -- cgit v1.2.3 From 5369c4232ac93e99fad3e52604538dba7a5d68f2 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Mon, 26 Apr 2010 16:36:17 +0200 Subject: vcl111: #i103999# fix problem with moblin theme (thanks tml) --- vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx index de4d55b0230a..cb36b4613707 100644 --- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx +++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx @@ -3475,7 +3475,7 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings ) aStyleSet.SetMenuColor( aBackColor ); aStyleSet.SetMenuTextColor( aTextColor ); - aTextColor = getColor( pMenubarStyle->text[GTK_STATE_NORMAL] ); + aTextColor = getColor( pMenubarStyle->fg[GTK_STATE_NORMAL] ); aStyleSet.SetMenuBarTextColor( aTextColor ); #if OSL_DEBUG_LEVEL > 1 -- cgit v1.2.3 From e6110f11e272a15a547de94bb140992b949fd9b4 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Mon, 26 Apr 2010 17:43:25 +0200 Subject: vcl111: #i111167# correct SetModifed handling --- sfx2/source/view/viewprn.cxx | 45 ++++++++++++++++++++++---------------------- 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx index 2d5403b72abd..0774e5ca68f1 100644 --- a/sfx2/source/view/viewprn.cxx +++ b/sfx2/source/view/viewprn.cxx @@ -129,28 +129,6 @@ SfxPrinterController::SfxPrinterController( const Any& i_rComplete, StartListening( *mpViewShell ); mpObjectShell = mpViewShell->GetObjectShell(); StartListening( *mpObjectShell ); - m_bOrigStatus = mpObjectShell->IsEnableSetModified(); - - // check configuration: shall update of printing information in DocInfo set the document to "modified"? - if ( m_bOrigStatus && !SvtPrintWarningOptions().IsModifyDocumentOnPrintingAllowed() ) - { - mpObjectShell->EnableSetModified( sal_False ); - m_bNeedsChange = sal_True; - } - - // refresh document info - uno::Reference xDocProps(mpObjectShell->getDocProperties()); - m_aLastPrintedBy = xDocProps->getPrintedBy(); - m_aLastPrinted = xDocProps->getPrintDate(); - - xDocProps->setPrintedBy( mpObjectShell->IsUseUserData() - ? ::rtl::OUString( SvtUserOptions().GetFullName() ) - : ::rtl::OUString() ); - ::DateTime now; - - xDocProps->setPrintDate( util::DateTime( - now.Get100Sec(), now.GetSec(), now.GetMin(), now.GetHour(), - now.GetDay(), now.GetMonth(), now.GetYear() ) ); } // initialize extra ui options @@ -283,6 +261,29 @@ void SfxPrinterController::jobStarted() { if ( mpObjectShell ) { + m_bOrigStatus = mpObjectShell->IsEnableSetModified(); + + // check configuration: shall update of printing information in DocInfo set the document to "modified"? + if ( m_bOrigStatus && !SvtPrintWarningOptions().IsModifyDocumentOnPrintingAllowed() ) + { + mpObjectShell->EnableSetModified( sal_False ); + m_bNeedsChange = sal_True; + } + + // refresh document info + uno::Reference xDocProps(mpObjectShell->getDocProperties()); + m_aLastPrintedBy = xDocProps->getPrintedBy(); + m_aLastPrinted = xDocProps->getPrintDate(); + + xDocProps->setPrintedBy( mpObjectShell->IsUseUserData() + ? ::rtl::OUString( SvtUserOptions().GetFullName() ) + : ::rtl::OUString() ); + ::DateTime now; + + xDocProps->setPrintDate( util::DateTime( + now.Get100Sec(), now.GetSec(), now.GetMin(), now.GetHour(), + now.GetDay(), now.GetMonth(), now.GetYear() ) ); + // FIXME: how to get all print options incl. AdditionalOptions easily? uno::Sequence < beans::PropertyValue > aOpts; mpObjectShell->Broadcast( SfxPrintingHint( view::PrintableState_JOB_STARTED, aOpts ) ); -- cgit v1.2.3 From ae9d7c2cef9ecd42687d64f985b9e2dcbc68a034 Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Tue, 27 Apr 2010 10:09:22 +0200 Subject: cws tl80: #i103552# Japanese word for 'shutdown' added to ja.dic --- i18npool/source/breakiterator/data/ja.dic | 1 + 1 file changed, 1 insertion(+) diff --git a/i18npool/source/breakiterator/data/ja.dic b/i18npool/source/breakiterator/data/ja.dic index ed76e4b4a271..d2923833e57d 100644 --- a/i18npool/source/breakiterator/data/ja.dic +++ b/i18npool/source/breakiterator/data/ja.dic @@ -21386,6 +21386,7 @@ シャッター シャット シャットアウト +シャットダウン シャッポ シャツ シャトル -- cgit v1.2.3 From 0b53c49463bbceebe4ea13d4aa9d78db6a2cab8f Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Tue, 27 Apr 2010 10:25:20 +0200 Subject: cws tl80: #i74188# fix for cursor positioning when removing indic characters --- editeng/source/editeng/impedit2.cxx | 11 +++++++++++ 1 file changed, 11 insertions(+) mode change 100644 => 100755 editeng/source/editeng/impedit2.cxx diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx old mode 100644 new mode 100755 index bbdfa47e6a57..8f0ad2bc15d4 --- a/editeng/source/editeng/impedit2.cxx +++ b/editeng/source/editeng/impedit2.cxx @@ -4198,7 +4198,18 @@ long ImpEditEngine::GetXPos( ParaPortion* pParaPortion, EditLine* pLine, USHORT DBG_ERROR("svx::ImpEditEngine::GetXPos(), index out of range!"); } +#if 0 long nPosInPortion = pLine->GetCharPosArray().GetObject( nPos ); +#else + // #i74188# (positioning the cursor after deleting components of combined indic characters) + SvxFont aTmpFont( pParaPortion->GetNode()->GetCharAttribs().GetDefFont() ); + SeekCursor( pParaPortion->GetNode(), nPos+1, aTmpFont ); + aTmpFont.SetPhysFont( GetRefDevice() ); + ImplInitDigitMode( GetRefDevice(), 0, 0, 0, aTmpFont.GetLanguage() ); + String sSegment(*pParaPortion->GetNode(), pLine->GetStart(), nPos+1); + long nPosInPortion = aTmpFont.QuickGetTextSize( GetRefDevice(), + sSegment, 0, nPos+1, NULL ).Width(); +#endif if ( !pPortion->IsRightToLeft() ) { -- cgit v1.2.3 From 6ebe363ce2eb75b496deb153fe00e7ce2a753b6a Mon Sep 17 00:00:00 2001 From: Dirk Voelzke Date: Tue, 27 Apr 2010 12:03:43 +0200 Subject: dv12#i29340# activated handleNameClashResolveRequest --- uui/source/iahndl.cxx | 15 +++++++-------- uui/source/iahndl.hxx | 3 --- 2 files changed, 7 insertions(+), 11 deletions(-) mode change 100644 => 100755 uui/source/iahndl.hxx diff --git a/uui/source/iahndl.cxx b/uui/source/iahndl.cxx index e883bd60848d..905faab4051a 100755 --- a/uui/source/iahndl.cxx +++ b/uui/source/iahndl.cxx @@ -867,14 +867,13 @@ UUIInteractionHelper::handleRequest_impl( if ( handleCertificateValidationRequest( rRequest ) ) return true; -// @@@ Todo #i29340#: activate! -// ucb::NameClashResolveRequest aNameClashResolveRequest; -// if (aAnyRequest >>= aNameClashResolveRequest) -// { -// handleNameClashResolveRequest(aNameClashResolveRequest, -// rRequest->getContinuations()); -// return true; -// } + ucb::NameClashResolveRequest aNameClashResolveRequest; + if (aAnyRequest >>= aNameClashResolveRequest) + { + handleNameClashResolveRequest(aNameClashResolveRequest, + rRequest->getContinuations()); + return true; + } if ( handleMasterPasswordRequest( rRequest ) ) return true; diff --git a/uui/source/iahndl.hxx b/uui/source/iahndl.hxx old mode 100644 new mode 100755 index 42935565a314..6402653d3bda --- a/uui/source/iahndl.hxx +++ b/uui/source/iahndl.hxx @@ -215,8 +215,6 @@ private: com::sun::star::task::XInteractionRequest > const & rRequest) SAL_THROW((com::sun::star::uno::RuntimeException)); -// @@@ Todo #i29340#: activate! -#if 0 void handleNameClashResolveRequest( com::sun::star::ucb::NameClashResolveRequest const & rRequest, @@ -261,7 +259,6 @@ private: com::sun::star::uno::Reference< com::sun::star::task::XInteractionRequest > const & rRequest) SAL_THROW((com::sun::star::uno::RuntimeException)); -#endif void handleErrorHandlerRequest( -- cgit v1.2.3 From 7fa4812d0283a9a4b9f06fc1e6c8dcc80bc62257 Mon Sep 17 00:00:00 2001 From: "Herbert Duerr [hdu]" Date: Tue, 27 Apr 2010 12:20:11 +0200 Subject: vcl: use language in glyph fallback lookup through fontconfig --- vcl/source/gdi/outdev3.cxx | 1 + vcl/unx/source/gdi/salgdi3.cxx | 2 +- vcl/util/makefile.mk | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx index e13ae6cbe64a..438f81bdc6c1 100644 --- a/vcl/source/gdi/outdev3.cxx +++ b/vcl/source/gdi/outdev3.cxx @@ -579,6 +579,7 @@ Font OutputDevice::GetDefaultFont( USHORT nType, LanguageType eLang, { aFont.SetHeight( nDefaultHeight ); aFont.SetWeight( WEIGHT_NORMAL ); + aFont.SetLanguage( eLang ); if ( aFont.GetCharSet() == RTL_TEXTENCODING_DONTKNOW ) aFont.SetCharSet( gsl_getSystemTextEncoding() ); diff --git a/vcl/unx/source/gdi/salgdi3.cxx b/vcl/unx/source/gdi/salgdi3.cxx index 7cf2009a3e07..760fb81cf1aa 100644 --- a/vcl/unx/source/gdi/salgdi3.cxx +++ b/vcl/unx/source/gdi/salgdi3.cxx @@ -2025,7 +2025,7 @@ static ImplFontSelectData GetFcSubstitute(const ImplFontSelectData &rFontSelData { ImplFontSelectData aRet(rFontSelData); - const rtl::OString aLangAttrib; //TODO: = MsLangId::convertLanguageToIsoByteString( rFontSelData.meLanguage ); + const rtl::OString aLangAttrib = MsLangId::convertLanguageToIsoByteString( rFontSelData.meLanguage ); psp::italic::type eItalic = psp::italic::Unknown; if( rFontSelData.GetSlant() != ITALIC_DONTKNOW ) diff --git a/vcl/util/makefile.mk b/vcl/util/makefile.mk index d501765c8491..eb54531c375c 100644 --- a/vcl/util/makefile.mk +++ b/vcl/util/makefile.mk @@ -299,6 +299,7 @@ SHL2DEPN=$(SHL1IMPLIBN) $(SHL1TARGETN) SHL2STDLIBS=\ $(VCLLIB)\ $(I18NPAPERLIB) \ + $(I18NISOLANGLIB) \ $(TOOLSLIB) \ $(VOSLIB) \ $(BASEGFXLIB) \ -- cgit v1.2.3 From de48ac823452730d09eed48cbfee70c2b3880055 Mon Sep 17 00:00:00 2001 From: "Herbert Duerr [hdu]" Date: Tue, 27 Apr 2010 13:55:52 +0200 Subject: #161963# use modulo-2 arithmetic for access into indirect glyphid array --- vcl/source/gdi/metric.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vcl/source/gdi/metric.cxx b/vcl/source/gdi/metric.cxx index e5f54df41c9e..097cc3a6b901 100644 --- a/vcl/source/gdi/metric.cxx +++ b/vcl/source/gdi/metric.cxx @@ -401,7 +401,7 @@ int ImplFontCharMap::GetGlyphIndex( sal_uInt32 cChar ) const nGlyphIndex += nStartIndex; } else { // the glyphid array has the glyph index - nGlyphIndex = mpGlyphIds[ nGlyphIndex - nStartIndex]; + nGlyphIndex = mpGlyphIds[ (nGlyphIndex - nStartIndex) & 0xFFFF ]; } return nGlyphIndex; -- cgit v1.2.3 From 6d884e817f8e8d6d42fa4ccdfc56a5832ce90369 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Tue, 27 Apr 2010 15:40:24 +0200 Subject: vcl111: #i105472# add style to omit pointer evasion of help window --- vcl/inc/vcl/help.hxx | 1 + vcl/source/app/help.cxx | 30 +++++++++++++++++++----------- 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/vcl/inc/vcl/help.hxx b/vcl/inc/vcl/help.hxx index 4bca986812ed..30308aa8a723 100644 --- a/vcl/inc/vcl/help.hxx +++ b/vcl/inc/vcl/help.hxx @@ -48,6 +48,7 @@ class Window; #define QUICKHELP_BOTTOM ((USHORT)0x0020) #define QUICKHELP_NOAUTOPOS (QUICKHELP_LEFT | QUICKHELP_CENTER | QUICKHELP_RIGHT | QUICKHELP_TOP | QUICKHELP_VCENTER | QUICKHELP_BOTTOM) #define QUICKHELP_CTRLTEXT ((USHORT)0x0040) +#define QUICKHELP_NOEVADEPOINTER ((USHORT)0x4000) #define QUICKHELP_BIDI_RTL ((USHORT)0x8000) // By changes you must also change: rsc/vclrsc.hxx diff --git a/vcl/source/app/help.cxx b/vcl/source/app/help.cxx index b4ab10887fcd..ac1da931ba06 100644 --- a/vcl/source/app/help.cxx +++ b/vcl/source/app/help.cxx @@ -759,18 +759,26 @@ void ImplSetHelpWindowPos( Window* pHelpWin, USHORT nHelpWinStyle, USHORT nStyle else if ( ( aPos.Y() + aSz.Height() ) > aScreenRect.Bottom() ) aPos.Y() = aScreenRect.Bottom() - aSz.Height(); - // the popup must not appear under the mouse - // otherwise it would directly be closed due to a focus change... - Rectangle aHelpRect( aPos, aSz ); - if( aHelpRect.IsInside( mPos ) ) + if( ! (nStyle & QUICKHELP_NOEVADEPOINTER) ) { - Point delta(2,2); - Point pSize( aSz.Width(), aSz.Height() ); - Point pTest( mPos - pSize - delta ); - if( pTest.X() > aScreenRect.Left() && pTest.Y() > aScreenRect.Top() ) - aPos = pTest; - else - aPos = mPos + delta; + /* the remark below should be obsolete by now as the helpwindow should + not be focusable, leaving it as a hint. However it is sensible in most + conditions to evade the mouse pointer so the content window is fully visible. + + // the popup must not appear under the mouse + // otherwise it would directly be closed due to a focus change... + */ + Rectangle aHelpRect( aPos, aSz ); + if( aHelpRect.IsInside( mPos ) ) + { + Point delta(2,2); + Point pSize( aSz.Width(), aSz.Height() ); + Point pTest( mPos - pSize - delta ); + if( pTest.X() > aScreenRect.Left() && pTest.Y() > aScreenRect.Top() ) + aPos = pTest; + else + aPos = mPos + delta; + } } Window* pWindow = pHelpWin->GetParent()->ImplGetFrameWindow(); -- cgit v1.2.3 From e26e06a95244abad81ea14f775e8aed1e37fd94e Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Tue, 27 Apr 2010 15:40:24 +0200 Subject: vcl111: #i105472# add style to omit pointer evasion of help window --- sc/source/ui/app/inputhdl.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx index 485ea4b88589..f43c09c814da 100644 --- a/sc/source/ui/app/inputhdl.cxx +++ b/sc/source/ui/app/inputhdl.cxx @@ -919,7 +919,7 @@ void ScInputHandler::ShowTipBelow( const String& rText ) } aPos = pWin->OutputToScreenPixel( aPos ); Rectangle aRect( aPos, aPos ); - USHORT nAlign = QUICKHELP_LEFT | QUICKHELP_TOP; + USHORT nAlign = QUICKHELP_LEFT | QUICKHELP_TOP | QUICKHELP_NOEVADEPOINTER; nTipVisibleSec = Help::ShowTip(pWin, aRect, rText, nAlign); } } -- cgit v1.2.3 From ef8fba320644340ec9500ff633f4bcb73dd4dedb Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Tue, 27 Apr 2010 19:27:46 +0200 Subject: pdfextfix03: #i110871# pdf literal strings may contain nested parantheses --- sdext/source/pdfimport/pdfparse/pdfparse.cxx | 37 +++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/sdext/source/pdfimport/pdfparse/pdfparse.cxx b/sdext/source/pdfimport/pdfparse/pdfparse.cxx index b8d0aaca6b74..b3ffa64427dd 100644 --- a/sdext/source/pdfimport/pdfparse/pdfparse.cxx +++ b/sdext/source/pdfimport/pdfparse/pdfparse.cxx @@ -108,6 +108,40 @@ public: iteratorT m_aGlobalBegin; public: + struct pdf_string_parser + { + typedef nil_t result_t; + template + std::ptrdiff_t + operator()(ScannerT const& scan, result_t& result) const + { + std::ptrdiff_t len = 0; + + int nBraceLevel = 0; + while( ! scan.at_end() ) + { + char c = *scan; + if( c == ')' ) + { + nBraceLevel--; + if( nBraceLevel < 0 ) + break; + } + else if( c == '(' ) + nBraceLevel++; + else if( c == '\\' ) // ignore escaped braces + { + ++len; + ++scan; + if( scan.at_end() ) + break; + } + ++len; + ++scan; + } + return scan.at_end() ? -1 : len; + } + }; template< typename ScannerT > struct definition @@ -135,7 +169,8 @@ public: //stringtype = ( confix_p("(",*anychar_p, ")") | // confix_p("<",*xdigit_p, ">") ) // [boost::bind(&PDFGrammar::pushString,pSelf, _1, _2)]; - stringtype = ( ( ch_p('(') >> *(str_p("\\)")|(anychar_p - ch_p(')'))) >> ch_p(')') ) | + + stringtype = ( ( ch_p('(') >> functor_parser() >> ch_p(')') ) | ( ch_p('<') >> *xdigit_p >> ch_p('>') ) ) [boost::bind(&PDFGrammar::pushString,pSelf, _1, _2)]; -- cgit v1.2.3 From 7d60d139fa41085697dcee6b03e8cc97341aef95 Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Wed, 28 Apr 2010 09:43:21 +0200 Subject: cws tl80: #162104# remove Writer easter egg --- sw/inc/dochdl.hrc | 4 +--- sw/source/ui/dochdl/dochdl.src | 9 --------- sw/source/ui/dochdl/gloshdl.cxx | 45 +++-------------------------------------- 3 files changed, 4 insertions(+), 54 deletions(-) mode change 100644 => 100755 sw/inc/dochdl.hrc mode change 100644 => 100755 sw/source/ui/dochdl/dochdl.src mode change 100644 => 100755 sw/source/ui/dochdl/gloshdl.cxx diff --git a/sw/inc/dochdl.hrc b/sw/inc/dochdl.hrc old mode 100644 new mode 100755 index ae39f480e6a3..47b0b8014240 --- a/sw/inc/dochdl.hrc +++ b/sw/inc/dochdl.hrc @@ -43,10 +43,8 @@ #define STR_PRIVATEOLE (RC_DOCHDL_BEGIN + 10) #define STR_DDEFORMAT (RC_DOCHDL_BEGIN + 11) -#define BMP_SW_TEAM_MUGSHOT (RC_DOCHDL_BEGIN + 12) -#define STR_SW_TEAM_NAMES (RC_DOCHDL_BEGIN + 13) -#define DOCHDL_ACT_END STR_SW_TEAM_NAMES +#define DOCHDL_ACT_END STR_DDEFORMAT #if DOCHDL_ACT_END > RC_DOCHDL_END #error Resource-Id Ueberlauf in #file, #line diff --git a/sw/source/ui/dochdl/dochdl.src b/sw/source/ui/dochdl/dochdl.src old mode 100644 new mode 100755 index 8ecccb5395cb..f92ea43681d8 --- a/sw/source/ui/dochdl/dochdl.src +++ b/sw/source/ui/dochdl/dochdl.src @@ -73,13 +73,4 @@ String STR_DDEFORMAT { Text [ en-US ] = "DDE link" ; }; -Bitmap BMP_SW_TEAM_MUGSHOT -{ - File ="writerteam.bmp"; -}; - -String STR_SW_TEAM_NAMES -{ - Text = "Back row: Aidan Butler, Hans-Peter Burow, Caolan McNamara, Michael Brauer, Martin Maher, Gunnar Timm\nFront row: Thomas Lange, Oliver-Rainer Duesterhoeft, Henning Brinkmann, Andreas Martens, Oliver Specht, Frank Meies, Daniel Vogelheim"; -}; diff --git a/sw/source/ui/dochdl/gloshdl.cxx b/sw/source/ui/dochdl/gloshdl.cxx old mode 100644 new mode 100755 index 5cb1df8a9ebb..cc789d6e4498 --- a/sw/source/ui/dochdl/gloshdl.cxx +++ b/sw/source/ui/dochdl/gloshdl.cxx @@ -607,48 +607,9 @@ BOOL SwGlossaryHdl::Expand( const String& rShortName, aShortName.Erase(nMaxLen); aShortName.AppendAscii(" ..."); } - if ( aShortName.EqualsAscii ( "StarWriterTeam", 0, 14 ) ) - { - String sGraphicName ( RTL_CONSTASCII_USTRINGPARAM ( "StarWriter team photo" ) ); - String sTeamCredits ( RTL_CONSTASCII_USTRINGPARAM ( "StarWriter team credits" ) ); - pWrtShell->StartUndo ( UNDO_INSGLOSSARY ); - pWrtShell->StartAllAction(); - if(pWrtShell->HasSelection()) - pWrtShell->DelLeft(); - Bitmap aBitmap ( SW_RES ( BMP_SW_TEAM_MUGSHOT ) ); - pWrtShell->Insert ( aEmptyStr, aEmptyStr, aBitmap); - pWrtShell->SetFlyName ( sGraphicName ); - SwTxtFmtColl* pColl = pWrtShell->GetTxtCollFromPool ( RES_POOLCOLL_LABEL_ABB ); - const IDocumentFieldsAccess* pIDFA = pWrtShell->getIDocumentFieldsAccess(); - SwFieldType* pType = pIDFA->GetFldType( RES_SETEXPFLD, pColl->GetName(), false ); - sal_uInt16 nId = pIDFA->GetFldTypes()->GetPos( pType ); - pWrtShell->InsertLabel( LTYPE_OBJECT, aEmptyStr, aEmptyStr, aEmptyStr, FALSE, nId, aEmptyStr ); - pWrtShell->SwFEShell::SetFlyName( sTeamCredits ); - pWrtShell->SwFEShell::SelectObj ( Point ( ULONG_MAX, ULONG_MAX ) ); - pWrtShell->EnterStdMode(); - pWrtShell->EndPara ( TRUE ); - String aTmp ( SW_RES ( STR_SW_TEAM_NAMES ) ); - pWrtShell->Insert ( aTmp ); - SvxAdjustItem aAdjustItem( SVX_ADJUST_CENTER, RES_PARATR_ADJUST ); - pWrtShell->SetAttr( aAdjustItem ); - pWrtShell->SttPara (); - pWrtShell->SplitNode(); - pWrtShell->Left(CRSR_SKIP_CHARS, FALSE, 1, FALSE ); - SvxWeightItem aWeightItem ( WEIGHT_BOLD, RES_CHRATR_WEIGHT ); - pWrtShell->Insert ( String ( RTL_CONSTASCII_USTRINGPARAM ( "The StarWriter team!" ) ) ); - pWrtShell->SttPara ( TRUE ); - pWrtShell->SetAttr( aWeightItem); - pWrtShell->GotoFly ( sTeamCredits); - pWrtShell->EndAllAction(); - pWrtShell->EndUndo( UNDO_INSGLOSSARY ); - } - else - { - String aTmp( SW_RES(STR_NOGLOS)); - aTmp.SearchAndReplaceAscii("%1", aShortName); - InfoBox( pWrtShell->GetView().GetWindow(), aTmp ).Execute(); - - } + String aTmp( SW_RES(STR_NOGLOS)); + aTmp.SearchAndReplaceAscii("%1", aShortName); + InfoBox( pWrtShell->GetView().GetWindow(), aTmp ).Execute(); } return FALSE; -- cgit v1.2.3 From 8a2bb76f962fd44b0ab024e9adab97d7e418b7f1 Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Wed, 28 Apr 2010 09:43:21 +0200 Subject: cws tl80: #162104# remove Writer easter egg --- default_images/sw/res/writerteam.png | Bin 169171 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 default_images/sw/res/writerteam.png diff --git a/default_images/sw/res/writerteam.png b/default_images/sw/res/writerteam.png deleted file mode 100644 index cfce490c5e68..000000000000 Binary files a/default_images/sw/res/writerteam.png and /dev/null differ -- cgit v1.2.3 From 2b7db7fb4e176d01bda38a58d1c0488a6ec9236e Mon Sep 17 00:00:00 2001 From: "Herbert Duerr [hdu]" Date: Wed, 28 Apr 2010 12:03:40 +0200 Subject: #i161963# fix indirect glyphid array access for aliased symbol codepoints --- vcl/source/gdi/metric.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/vcl/source/gdi/metric.cxx b/vcl/source/gdi/metric.cxx index 097cc3a6b901..325146b6be8a 100644 --- a/vcl/source/gdi/metric.cxx +++ b/vcl/source/gdi/metric.cxx @@ -386,8 +386,9 @@ int ImplFontCharMap::GetGlyphIndex( sal_uInt32 cChar ) const const bool bSymbolic = (mpRangeCodes[0]>=0xF000) & (mpRangeCodes[1]<=0xF0FF); if( !bSymbolic ) return 0; - // check for symbol aliasing (U+F0xx -> U+00xx) - nRange = ImplFindRangeIndex( cChar | 0xF000 ); + // check for symbol aliasing (U+00xx <-> U+F0xx) + cChar |= 0xF000; + nRange = ImplFindRangeIndex( cChar ); } // check that we are inside a range if( (nRange & 1) != 0 ) @@ -401,7 +402,7 @@ int ImplFontCharMap::GetGlyphIndex( sal_uInt32 cChar ) const nGlyphIndex += nStartIndex; } else { // the glyphid array has the glyph index - nGlyphIndex = mpGlyphIds[ (nGlyphIndex - nStartIndex) & 0xFFFF ]; + nGlyphIndex = mpGlyphIds[ nGlyphIndex - nStartIndex ]; } return nGlyphIndex; -- cgit v1.2.3 From 3651f6631751fc5acd3e9f709c0346958e3ab79e Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Wed, 28 Apr 2010 14:19:13 +0200 Subject: pdfextfix03: #i110871# use DocumentPasswordRequest, PasswordRequest is deprecated --- sdext/source/pdfimport/filterdet.cxx | 4 +++- sdext/source/pdfimport/filterdet.hxx | 4 +++- sdext/source/pdfimport/inc/pdfihelper.hxx | 4 +++- sdext/source/pdfimport/misc/pwdinteract.cxx | 19 +++++++++++-------- sdext/source/pdfimport/wrapper/wrapper.cxx | 8 +++++--- 5 files changed, 25 insertions(+), 14 deletions(-) diff --git a/sdext/source/pdfimport/filterdet.cxx b/sdext/source/pdfimport/filterdet.cxx index 9dac0acf7e1e..e9d58cfdb3b2 100644 --- a/sdext/source/pdfimport/filterdet.cxx +++ b/sdext/source/pdfimport/filterdet.cxx @@ -736,10 +736,12 @@ uno::Reference< io::XStream > getAdditionalStream( const rtl::OUString& break; } + rtl::OUString aDocName( rInPDFFileURL.copy( rInPDFFileURL.lastIndexOf( sal_Unicode('/') )+1 ) ); + bool bEntered = false; do { - bEntered = getPassword( xIntHdl, io_rPwd, ! bEntered ); + bEntered = getPassword( xIntHdl, io_rPwd, ! bEntered, aDocName ); rtl::OString aIsoPwd = rtl::OUStringToOString( io_rPwd, RTL_TEXTENCODING_ISO_8859_1 ); bAuthenticated = pPDFFile->setupDecryptionData( aIsoPwd.getStr() ); diff --git a/sdext/source/pdfimport/filterdet.hxx b/sdext/source/pdfimport/filterdet.hxx index 5a35320c91c5..4be260eb4254 100644 --- a/sdext/source/pdfimport/filterdet.hxx +++ b/sdext/source/pdfimport/filterdet.hxx @@ -104,7 +104,9 @@ bool checkDocChecksum( const rtl::OUString& rInPDFFileURL, bool getPassword( const com::sun::star::uno::Reference< com::sun::star::task::XInteractionHandler >& xHandler, rtl::OUString& o_rPwd, - bool bFirstTry ); + bool bFirstTry, + const rtl::OUString& i_rDocName + ); } diff --git a/sdext/source/pdfimport/inc/pdfihelper.hxx b/sdext/source/pdfimport/inc/pdfihelper.hxx index bcc69b0e9eda..9abc22214a6c 100755 --- a/sdext/source/pdfimport/inc/pdfihelper.hxx +++ b/sdext/source/pdfimport/inc/pdfihelper.hxx @@ -190,7 +190,9 @@ namespace pdfi bool getPassword( const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& xHandler, rtl::OUString& rOutPwd, - bool bFirstTry ); + bool bFirstTry, + const rtl::OUString& rDocName + ); } #define USTR(x) rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( x ) ) diff --git a/sdext/source/pdfimport/misc/pwdinteract.cxx b/sdext/source/pdfimport/misc/pwdinteract.cxx index a68c63054137..43dfd1151964 100644 --- a/sdext/source/pdfimport/misc/pwdinteract.cxx +++ b/sdext/source/pdfimport/misc/pwdinteract.cxx @@ -33,7 +33,7 @@ #include #include #include -#include +#include #include #include @@ -53,12 +53,12 @@ class PDFPasswordRequest : private cppu::BaseMutex, public PDFPasswordRequestBase { private: - task::PasswordRequest m_aRequest; - rtl::OUString m_aPassword; - bool m_bSelected; + task::DocumentPasswordRequest m_aRequest; + rtl::OUString m_aPassword; + bool m_bSelected; public: - explicit PDFPasswordRequest(bool bFirstTry); + explicit PDFPasswordRequest(bool bFirstTry, const rtl::OUString& rName); // XInteractionRequest virtual uno::Any SAL_CALL getRequest( ) throw (uno::RuntimeException); @@ -74,7 +74,7 @@ public: bool isSelected() const { osl::MutexGuard const guard( m_aMutex ); return m_bSelected; } }; -PDFPasswordRequest::PDFPasswordRequest( bool bFirstTry ) : +PDFPasswordRequest::PDFPasswordRequest( bool bFirstTry, const rtl::OUString& rName ) : PDFPasswordRequestBase( m_aMutex ), m_aRequest(), m_aPassword(), @@ -84,6 +84,7 @@ PDFPasswordRequest::PDFPasswordRequest( bool bFirstTry ) : task::PasswordRequestMode_PASSWORD_ENTER : task::PasswordRequestMode_PASSWORD_REENTER; m_aRequest.Classification = task::InteractionClassification_QUERY; + m_aRequest.Name = rName; } uno::Any SAL_CALL PDFPasswordRequest::getRequest() throw (uno::RuntimeException) @@ -132,13 +133,15 @@ namespace pdfi bool getPassword( const uno::Reference< task::XInteractionHandler >& xHandler, rtl::OUString& rOutPwd, - bool bFirstTry ) + bool bFirstTry, + const rtl::OUString& rDocName + ) { bool bSuccess = false; PDFPasswordRequest* pRequest; uno::Reference< task::XInteractionRequest > xReq( - pRequest = new PDFPasswordRequest( bFirstTry ) ); + pRequest = new PDFPasswordRequest( bFirstTry, rDocName ) ); try { xHandler->handle( xReq ); diff --git a/sdext/source/pdfimport/wrapper/wrapper.cxx b/sdext/source/pdfimport/wrapper/wrapper.cxx index 0eafbbb83327..bbc8c4f19f47 100755 --- a/sdext/source/pdfimport/wrapper/wrapper.cxx +++ b/sdext/source/pdfimport/wrapper/wrapper.cxx @@ -875,7 +875,8 @@ oslFileError readLine( oslFileHandle pFile, ::rtl::OStringBuffer& line ) static bool checkEncryption( const rtl::OUString& i_rPath, const uno::Reference< task::XInteractionHandler >& i_xIHdl, rtl::OUString& io_rPwd, - bool& o_rIsEncrypted + bool& o_rIsEncrypted, + const rtl::OUString& i_rDocName ) { bool bSuccess = false; @@ -908,7 +909,7 @@ static bool checkEncryption( const rtl::OUString& bool bEntered = false; do { - bEntered = getPassword( i_xIHdl, io_rPwd, ! bEntered ); + bEntered = getPassword( i_xIHdl, io_rPwd, ! bEntered, i_rDocName ); rtl::OString aIsoPwd = rtl::OUStringToOString( io_rPwd, RTL_TEXTENCODING_ISO_8859_1 ); bAuthenticated = pPDFFile->setupDecryptionData( aIsoPwd.getStr() ); @@ -937,11 +938,12 @@ bool xpdf_ImportFromFile( const ::rtl::OUString& rUR ::rtl::OUString aSysUPath; if( osl_getSystemPathFromFileURL( rURL.pData, &aSysUPath.pData ) != osl_File_E_None ) return false; + rtl::OUString aDocName( rURL.copy( rURL.lastIndexOf( sal_Unicode('/') )+1 ) ); // check for encryption, if necessary get password rtl::OUString aPwd( rPwd ); bool bIsEncrypted = false; - if( checkEncryption( aSysUPath, xIHdl, aPwd, bIsEncrypted ) == false ) + if( checkEncryption( aSysUPath, xIHdl, aPwd, bIsEncrypted, aDocName ) == false ) return false; rtl::OUStringBuffer converterURL = rtl::OUString::createFromAscii("xpdfimport"); -- cgit v1.2.3 From ececcc290b431ca40b785afbffa1f3c2396a1bbb Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Wed, 28 Apr 2010 14:22:16 +0200 Subject: pdfextfix03: #i110871# PasswordRequest should still be supported for backwards compatibility --- uui/source/iahndl-authentication.cxx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/uui/source/iahndl-authentication.cxx b/uui/source/iahndl-authentication.cxx index f31397f1ef92..db6437322e0a 100644 --- a/uui/source/iahndl-authentication.cxx +++ b/uui/source/iahndl-authentication.cxx @@ -581,5 +581,17 @@ UUIInteractionHelper::handlePasswordRequest( true /* bool bMSCryptoMode */); return true; } + + task::PasswordRequest aPasswordRequest; + if( aAnyRequest >>= aPasswordRequest ) + { + handlePasswordRequest_(getParentProperty(), + aPasswordRequest.Mode, + rRequest->getContinuations(), + rtl::OUString(), + false /* bool bMSCryptoMode */); + return true; + } + return false; } -- cgit v1.2.3 From 16fcdbceedcdbf77e07da780581df83f38305dbd Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Wed, 28 Apr 2010 15:36:33 +0200 Subject: pdfextfix03: #i90800# improvments for font recognition, RTL (thanks ayaniger !) --- sdext/source/pdfimport/pdfiadaptor.cxx | 2 +- sdext/source/pdfimport/tree/drawtreevisiting.cxx | 165 +++++++++++++++++++---- sdext/source/pdfimport/tree/drawtreevisiting.hxx | 11 +- sdext/source/pdfimport/tree/genericelements.hxx | 13 +- sdext/source/pdfimport/tree/pdfiprocessor.cxx | 7 +- sdext/source/pdfimport/tree/pdfiprocessor.hxx | 5 +- sdext/source/pdfimport/wrapper/wrapper.cxx | 84 +++++++----- 7 files changed, 218 insertions(+), 69 deletions(-) diff --git a/sdext/source/pdfimport/pdfiadaptor.cxx b/sdext/source/pdfimport/pdfiadaptor.cxx index 08faf9a87f69..16af49409fc5 100644 --- a/sdext/source/pdfimport/pdfiadaptor.cxx +++ b/sdext/source/pdfimport/pdfiadaptor.cxx @@ -242,7 +242,7 @@ bool PDFIRawAdaptor::parse( const uno::Reference& xInput { // container for metaformat boost::shared_ptr pSink( - new PDFIProcessor(xStatus)); + new PDFIProcessor(xStatus, m_xContext)); // TEMP! TEMP! if( m_bEnableToplevelText ) diff --git a/sdext/source/pdfimport/tree/drawtreevisiting.cxx b/sdext/source/pdfimport/tree/drawtreevisiting.cxx index 664a19c7763d..2fd17d059e23 100644 --- a/sdext/source/pdfimport/tree/drawtreevisiting.cxx +++ b/sdext/source/pdfimport/tree/drawtreevisiting.cxx @@ -39,10 +39,46 @@ #include #include +#include +#include +#include "comphelper/processfactory.hxx" +#include +#include + +using namespace ::com::sun::star; +using namespace ::com::sun::star; +using namespace ::com::sun::star::lang; +using namespace ::com::sun::star::i18n; +using namespace ::com::sun::star::uno; namespace pdfi { +const ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XBreakIterator >& DrawXmlOptimizer::GetBreakIterator() +{ + if ( !mxBreakIter.is() ) + { + Reference< XComponentContext > xContext( this->m_rProcessor.m_xContext, uno::UNO_SET_THROW ); + Reference< XMultiComponentFactory > xMSF( xContext->getServiceManager(), uno::UNO_SET_THROW ); + Reference < XInterface > xInterface = xMSF->createInstanceWithContext(::rtl::OUString::createFromAscii("com.sun.star.i18n.BreakIterator"), xContext); + + mxBreakIter = uno::Reference< i18n::XBreakIterator >( xInterface, uno::UNO_QUERY ); + } + return mxBreakIter; +} + +const ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XBreakIterator >& DrawXmlEmitter::GetBreakIterator() +{ + if ( !mxBreakIter.is() ) + { + Reference< XComponentContext > xContext( m_rEmitContext.m_xContext, uno::UNO_SET_THROW ); + Reference< XMultiComponentFactory > xMSF( xContext->getServiceManager(), uno::UNO_SET_THROW ); + Reference < XInterface > xInterface = xMSF->createInstanceWithContext(::rtl::OUString::createFromAscii("com.sun.star.i18n.BreakIterator"), xContext); + mxBreakIter = uno::Reference< i18n::XBreakIterator >( xInterface, uno::UNO_QUERY ); + } + return mxBreakIter; +} + void DrawXmlEmitter::visit( HyperlinkElement& elem, const std::list< Element* >::const_iterator& ) { if( elem.Children.empty() ) @@ -72,6 +108,7 @@ void DrawXmlEmitter::visit( TextElement& elem, const std::list< Element* >::cons return; rtl::OUString strSpace(32); + rtl::OUString strNbSpace(160); rtl::OUString tabSpace(0x09); PropertyMap aProps; if( elem.StyleId != -1 ) @@ -80,27 +117,50 @@ void DrawXmlEmitter::visit( TextElement& elem, const std::list< Element* >::cons m_rEmitContext.rStyles.getStyleName( elem.StyleId ); } + rtl::OUString str(elem.Text.getStr()); + + // Check for CTL + bool isComplex = false; + for(int i=0; i< elem.Text.getLength(); i++) + { + sal_Int16 nType = GetBreakIterator()->getScriptType( str, i + 1); + if (nType == ::com::sun::star::i18n::ScriptType::COMPLEX) + isComplex = true; + } + + #if 0 + // FIXME: need to have a service to do this mirroring + if (isComplex) // If so, reverse string + { + rtl::OUString flippedStr(RTL_CONSTASCII_USTRINGPARAM( "" )); + for(int i = str.getLength() - 1; i >= 0; i--) + { + sal_Unicode cChar = str[ i ]; + cChar = static_cast(GetMirroredChar( cChar )); + rtl::OUString uC(cChar); + flippedStr += uC; + } + str = flippedStr; + } + #endif + m_rEmitContext.rEmitter.beginTag( "text:span", aProps ); - rtl::OUString str(elem.Text.getStr()); for(int i=0; i< elem.Text.getLength(); i++) { rtl::OUString strToken= str.copy(i,1) ; - if( strSpace.equals(strToken) ) + if( strSpace.equals(strToken) || strNbSpace.equals(strToken)) { aProps[ USTR( "text:c" ) ] = USTR( "1" ); m_rEmitContext.rEmitter.beginTag( "text:s", aProps ); m_rEmitContext.rEmitter.endTag( "text:s"); - } else { if( tabSpace.equals(strToken) ) { - m_rEmitContext.rEmitter.beginTag( "text:tab", aProps ); m_rEmitContext.rEmitter.endTag( "text:tab"); - } else { @@ -608,6 +668,29 @@ void DrawXmlOptimizer::visit( PageElement& elem, const std::list< Element* >::co elem.applyToChildren(*this); } +bool isSpaces(TextElement* pTextElem) +{ + rtl::OUString strSpace(32); + ::rtl::OUString ouTxt2(pTextElem->Text); + for(int i=0; i< pTextElem->Text.getLength(); i++) + { + rtl::OUString strToken = ouTxt2.copy(i,1) ; + if( !strSpace.equals(strToken) ) + return false; + } + return true; +} + +bool notTransformed(GraphicsContext GC) +{ + return ( + GC.Transformation.get(0,0) == 100.00 && + GC.Transformation.get(1,0) == 0.00 && + GC.Transformation.get(0,1) == 0.00 && + GC.Transformation.get(1,1) == -100.00 + ); +} + void DrawXmlOptimizer::optimizeTextElements(Element& rParent) { if( rParent.Children.empty() ) // this should not happen @@ -616,9 +699,6 @@ void DrawXmlOptimizer::optimizeTextElements(Element& rParent) return; } - bool bFirstTime= true; - double fPrevY = 0; - // concatenate child elements with same font id std::list< Element* >::iterator next = rParent.Children.begin(); std::list< Element* >::iterator it = next++; @@ -634,15 +714,22 @@ void DrawXmlOptimizer::optimizeTextElements(Element& rParent) { bool bConcat = false; TextElement* pCur = dynamic_cast(*it); - if( bFirstTime ) - { - bFirstTime=false; - fPrevY = pCur->y; - } if( pCur ) { TextElement* pNext = dynamic_cast(*next); + bool isComplex = false; + rtl::OUString str(pCur->Text.getStr()); + for(int i=0; i< str.getLength(); i++) + { + sal_Int16 nType = GetBreakIterator()->getScriptType( str, i ); + if (nType == ::com::sun::star::i18n::ScriptType::COMPLEX) + isComplex = true; + } + bool bPara = strspn("ParagraphElement", typeid(rParent).name()); + ParagraphElement* pPara = dynamic_cast(&rParent); + if (bPara && isComplex) + pPara->bRtl = true; if( pNext ) { const GraphicsContext& rCurGC = m_rProcessor.getGraphicsContext( pCur->GCId ); @@ -650,20 +737,29 @@ void DrawXmlOptimizer::optimizeTextElements(Element& rParent) // line and space optimization; works only in strictly horizontal mode - // concatenate consecutive text elements unless there is a // font or text color or matrix change, leave a new span in that case - if( pCur->FontId == pNext->FontId && + if( (pCur->FontId == pNext->FontId || isSpaces(pNext)) && rCurGC.FillColor.Red == rNextGC.FillColor.Red && rCurGC.FillColor.Green == rNextGC.FillColor.Green && rCurGC.FillColor.Blue == rNextGC.FillColor.Blue && rCurGC.FillColor.Alpha == rNextGC.FillColor.Alpha && - rCurGC.Transformation == rNextGC.Transformation + (rCurGC.Transformation == rNextGC.Transformation || notTransformed(rNextGC)) ) { pCur->updateGeometryWith( pNext ); // append text to current element - pCur->Text.append( pNext->Text.getStr(), pNext->Text.getLength() ); + pCur->Text.append( pNext->Text.getStr(), pNext->Text.getLength() ); + + str = pCur->Text.getStr(); + for(int i=0; i< str.getLength(); i++) + { + sal_Int16 nType = GetBreakIterator()->getScriptType( str, i ); + if (nType == ::com::sun::star::i18n::ScriptType::COMPLEX) + isComplex = true; + } + if (bPara && isComplex) + pPara->bRtl = true; // append eventual children to current element // and clear children (else the children just // appended to pCur would be destroyed) @@ -677,16 +773,11 @@ void DrawXmlOptimizer::optimizeTextElements(Element& rParent) } else if( dynamic_cast(*it) ) optimizeTextElements( **it ); - if( bConcat ) - { + if ( bConcat ) next = it; - ++next; - } else - { ++it; - ++next; - } + ++next; } } @@ -763,19 +854,21 @@ void DrawXmlFinalizer::visit( TextElement& elem, const std::list< Element* >::co // family name aFontProps[ USTR( "fo:font-family" ) ] = rFont.familyName; + aFontProps[ USTR( "style:font-family-complex" ) ] = rFont.familyName; + // bold if( rFont.isBold ) { aFontProps[ USTR( "fo:font-weight" ) ] = USTR( "bold" ); aFontProps[ USTR( "fo:font-weight-asian" ) ] = USTR( "bold" ); - aFontProps[ USTR( "fo:font-weight-complex" ) ] = USTR( "bold" ); + aFontProps[ USTR( "style:font-weight-complex" ) ] = USTR( "bold" ); } // italic if( rFont.isItalic ) { aFontProps[ USTR( "fo:font-style" ) ] = USTR( "italic" ); aFontProps[ USTR( "fo:font-style-asian" ) ] = USTR( "italic" ); - aFontProps[ USTR( "fo:font-style-complex" ) ] = USTR( "italic" ); + aFontProps[ USTR( "style:font-style-complex" ) ] = USTR( "italic" ); } // underline if( rFont.isUnderline ) @@ -809,6 +902,26 @@ void DrawXmlFinalizer::visit( TextElement& elem, const std::list< Element* >::co void DrawXmlFinalizer::visit( ParagraphElement& elem, const std::list< Element* >::const_iterator& ) { + + PropertyMap aProps; + aProps[ USTR( "style:family" ) ] = USTR( "paragraph" ); + // generate standard paragraph style if necessary + m_rStyleContainer.getStandardStyleId( "paragraph" ); + + PropertyMap aParProps; + + aParProps[ USTR("fo:text-align")] = USTR("start"); + if (elem.bRtl) + aParProps[ USTR("style:writing-mode")] = USTR("rl-tb"); + else + aParProps[ USTR("style:writing-mode")] = USTR("lr-tb"); + + StyleContainer::Style aStyle( "style:style", aProps ); + StyleContainer::Style aSubStyle( "style:paragraph-properties", aParProps ); + aStyle.SubStyles.push_back( &aSubStyle ); + + elem.StyleId = m_rStyleContainer.getStyleId( aStyle ); + // update page boundaries if( elem.Parent ) { diff --git a/sdext/source/pdfimport/tree/drawtreevisiting.hxx b/sdext/source/pdfimport/tree/drawtreevisiting.hxx index b7b94371c6da..fd347fa4f302 100644 --- a/sdext/source/pdfimport/tree/drawtreevisiting.hxx +++ b/sdext/source/pdfimport/tree/drawtreevisiting.hxx @@ -29,7 +29,9 @@ #define INCLUDED_PDFI_DRAWTREEVISITING_HXX #include "treevisiting.hxx" - +#include +#include +#include namespace pdfi { @@ -42,6 +44,8 @@ namespace pdfi void optimizeTextElements(Element& rParent); public: + ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XBreakIterator > mxBreakIter; + const ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XBreakIterator >& GetBreakIterator(); explicit DrawXmlOptimizer(PDFIProcessor& rProcessor) : m_rProcessor(rProcessor) {} @@ -82,6 +86,10 @@ namespace pdfi class DrawXmlEmitter : public ElementTreeVisitor { private: + ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xFactory; + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > xCtx; + ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XBreakIterator > mxBreakIter; + EmitContext& m_rEmitContext ; /// writes Impress doc when false const bool m_bWriteDrawDocument; @@ -91,6 +99,7 @@ namespace pdfi const EmitContext& rEmitContext ); public: + const ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XBreakIterator >& GetBreakIterator(); enum DocType{ DRAW_DOC, IMPRESS_DOC }; explicit DrawXmlEmitter(EmitContext& rEmitContext, DocType eDocType) : m_rEmitContext(rEmitContext), diff --git a/sdext/source/pdfimport/tree/genericelements.hxx b/sdext/source/pdfimport/tree/genericelements.hxx index 88293673ee3a..d7cd690aba61 100644 --- a/sdext/source/pdfimport/tree/genericelements.hxx +++ b/sdext/source/pdfimport/tree/genericelements.hxx @@ -32,6 +32,7 @@ #include "treevisiting.hxx" #include +#include #include #include #include @@ -56,12 +57,15 @@ namespace pdfi ImageContainer& _rImages, PDFIProcessor& _rProcessor, const com::sun::star::uno::Reference< - com::sun::star::task::XStatusIndicator>& _xStatusIndicator ) : + com::sun::star::task::XStatusIndicator>& _xStatusIndicator, + com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > xContext) + : rEmitter(_rEmitter), rStyles(_rStyles), rImages(_rImages), rProcessor(_rProcessor), - xStatusIndicator(_xStatusIndicator) + xStatusIndicator(_xStatusIndicator), + m_xContext(xContext) {} XmlEmitter& rEmitter; @@ -70,6 +74,8 @@ namespace pdfi PDFIProcessor& rProcessor; com::sun::star::uno::Reference< com::sun::star::task::XStatusIndicator> xStatusIndicator; + com::sun::star::uno::Reference< + com::sun::star::uno::XComponentContext > m_xContext; }; struct Element : public ElementTreeVisitable @@ -178,7 +184,7 @@ namespace pdfi { friend class ElementFactory; protected: - ParagraphElement( Element* pParent ) : Element( pParent ), Type( Normal ) {} + ParagraphElement( Element* pParent ) : Element( pParent ), Type( Normal ), bRtl( false ) {} public: // ElementTreeVisitable @@ -194,6 +200,7 @@ namespace pdfi enum ParagraphType { Normal, Headline }; ParagraphType Type; + bool bRtl; }; struct PolyPolyElement : public DrawElement diff --git a/sdext/source/pdfimport/tree/pdfiprocessor.cxx b/sdext/source/pdfimport/tree/pdfiprocessor.cxx index d132c8f74c31..d823cac524cf 100644 --- a/sdext/source/pdfimport/tree/pdfiprocessor.cxx +++ b/sdext/source/pdfimport/tree/pdfiprocessor.cxx @@ -61,7 +61,10 @@ using namespace com::sun::star; namespace pdfi { - PDFIProcessor::PDFIProcessor( const uno::Reference< task::XStatusIndicator >& xStat ) : + PDFIProcessor::PDFIProcessor( const uno::Reference< task::XStatusIndicator >& xStat , + com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > xContext) : + + m_xContext(xContext), fYPrevTextPosition(-10000.0), fPrevTextHeight(0.0), fXPrevTextPosition(0.0), @@ -842,7 +845,7 @@ void PDFIProcessor::emit( XmlEmitter& rEmitter, m_pDocument->visitedBy( *finalizingVisitor, std::list::iterator() ); - EmitContext aContext( rEmitter, aStyles, m_aImages, *this, m_xStatusIndicator ); + EmitContext aContext( rEmitter, aStyles, m_aImages, *this, m_xStatusIndicator, m_xContext ); ElementTreeVisitorSharedPtr aEmittingVisitor( rVisitorFactory.createEmittingVisitor(aContext)); diff --git a/sdext/source/pdfimport/tree/pdfiprocessor.hxx b/sdext/source/pdfimport/tree/pdfiprocessor.hxx index 6a9d4ab85a4d..e646d6999df7 100644 --- a/sdext/source/pdfimport/tree/pdfiprocessor.hxx +++ b/sdext/source/pdfimport/tree/pdfiprocessor.hxx @@ -72,13 +72,16 @@ namespace pdfi class PDFIProcessor : public ContentSink { public: + com::sun::star::uno::Reference< + com::sun::star::uno::XComponentContext > m_xContext; double fYPrevTextPosition; double fPrevTextHeight; double fXPrevTextPosition; double fPrevTextWidth; enum DocumentTextDirecion { LrTb, RlTb, TbLr }; - explicit PDFIProcessor( const com::sun::star::uno::Reference< com::sun::star::task::XStatusIndicator >& ); + explicit PDFIProcessor( const com::sun::star::uno::Reference< com::sun::star::task::XStatusIndicator >& xStat, + com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > xContext) ; /// TEMP - enable writer-like text:p on doc level void enableToplevelText(); diff --git a/sdext/source/pdfimport/wrapper/wrapper.cxx b/sdext/source/pdfimport/wrapper/wrapper.cxx index bbc8c4f19f47..51817ce5eacf 100755 --- a/sdext/source/pdfimport/wrapper/wrapper.cxx +++ b/sdext/source/pdfimport/wrapper/wrapper.cxx @@ -70,6 +70,10 @@ #include #include +#ifdef WNT +#include +#include +#endif #include "rtl/bootstrap.h" @@ -180,6 +184,10 @@ class Parser void readLink(); void readMaskedImage(); void readSoftMaskedImage(); + int parseFontCheckForString( const sal_Unicode* pCopy, const char* str, sal_Int32& nLen, + FontAttributes& aResult, bool bItalic, bool bBold); + int parseFontRemoveSuffix( const sal_Unicode* pCopy, const char* s, sal_Int32& nLen); + public: Parser( const ContentSinkSharedPtr& rSink, @@ -455,6 +463,35 @@ rendering::ARGBColor Parser::readColor() return aRes; } +int Parser::parseFontCheckForString( const sal_Unicode* pCopy, const char* s, sal_Int32& nLen, + FontAttributes& aResult, bool bItalic, bool bBold) +{ + int l = strlen(s); + if (nLen < l) + return 0; + for (int i = 0; i < l; i++) + if (tolower(pCopy[i]) != s[i] + && toupper(pCopy[i]) != s[i]) + return 0; + aResult.isItalic = bItalic; + aResult.isBold = bBold; + nLen -= l; + pCopy += l; + return l; +} + +int Parser::parseFontRemoveSuffix( const sal_Unicode* pCopy, const char* s, sal_Int32& nLen) +{ + int l = strlen(s); + if (nLen < l) + return 0; + for (int i = 0; i < l; i++) + if ( pCopy[nLen - l + i] != s[i] ) + return 0; + nLen -= l; + return l; +} + void Parser::parseFontFamilyName( FontAttributes& aResult ) { rtl::OUStringBuffer aNewFamilyName( aResult.familyName.getLength() ); @@ -470,39 +507,17 @@ void Parser::parseFontFamilyName( FontAttributes& aResult ) while( nLen ) { - if( nLen > 5 && - ( *pCopy == 'i' || *pCopy == 'I' ) && - pCopy[1] == 't' && - pCopy[2] == 'a' && - pCopy[3] == 'l' && - pCopy[4] == 'i' && - pCopy[5] == 'c' ) - { - aResult.isItalic = true; - nLen -=6; - pCopy += 6; - } - else if( nLen > 3 && - ( *pCopy == 'B' || *pCopy == 'b' ) && - pCopy[1] == 'o' && - pCopy[2] == 'l' && - pCopy[3] == 'd' ) - { - aResult.isBold = true; - nLen -=4; - pCopy += 4; - } - else if( nLen > 5 && - *pCopy == '-' && - ( pCopy[1] == 'R' || pCopy[1] == 'r' ) && - pCopy[2] == 'o' && - pCopy[3] == 'm' && - pCopy[4] == 'a' && - pCopy[5] == 'n' ) - { - nLen -= 6; - pCopy += 6; - } + if (parseFontRemoveSuffix( pCopy, "PSMT", nLen)) {} + else if (parseFontRemoveSuffix( pCopy, "MT", nLen)) {} + + if (parseFontCheckForString( pCopy, "Italic", nLen, aResult, true, false)) {} + else if (parseFontCheckForString( pCopy, "-Bold", nLen, aResult, false, true)) {} + else if (parseFontCheckForString( pCopy, "Bold", nLen, aResult, false, true)) {} + else if (parseFontCheckForString( pCopy, "-Roman", nLen, aResult, false, false)) {} + else if (parseFontCheckForString( pCopy, "-LightOblique", nLen, aResult, true, false)) {} + else if (parseFontCheckForString( pCopy, "-BoldOblique", nLen, aResult, true, true)) {} + else if (parseFontCheckForString( pCopy, "-Light", nLen, aResult, false, false)) {} + else if (parseFontCheckForString( pCopy, "-Reg", nLen, aResult, false, false)) {} else { if( *pCopy != '-' ) @@ -557,7 +572,6 @@ void Parser::readFont() // extract textual attributes (bold, italic in the name, etc.) parseFontFamilyName(aResult); - // need to read font file? if( nFileLen ) { @@ -582,6 +596,7 @@ void Parser::readFont() if( aRes >>= aFD ) { aResult.familyName = aFD.Name; + parseFontFamilyName(aResult); aResult.isBold = (aFD.Weight > 100.0); aResult.isItalic = (aFD.Slant == awt::FontSlant_OBLIQUE || aFD.Slant == awt::FontSlant_ITALIC ); @@ -602,7 +617,6 @@ void Parser::readFont() } } - m_aFontMap[nFontID] = aResult; aResult.size = nSize; -- cgit v1.2.3 From 58c7801ffdbfc486b7977834ece67ae964bad03f Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Thu, 29 Apr 2010 10:05:04 +0200 Subject: fs33a: #i111238# add support for images to AWT's ListBoxControl/Model --- offapi/com/sun/star/awt/ItemListEvent.idl | 76 ++++++++ offapi/com/sun/star/awt/XItemList.idl | 246 ++++++++++++++++++++++++++ offapi/com/sun/star/awt/XItemListListener.idl | 85 +++++++++ offapi/com/sun/star/awt/makefile.mk | 5 +- 4 files changed, 411 insertions(+), 1 deletion(-) create mode 100644 offapi/com/sun/star/awt/ItemListEvent.idl create mode 100644 offapi/com/sun/star/awt/XItemList.idl create mode 100644 offapi/com/sun/star/awt/XItemListListener.idl diff --git a/offapi/com/sun/star/awt/ItemListEvent.idl b/offapi/com/sun/star/awt/ItemListEvent.idl new file mode 100644 index 000000000000..f9d2658bd5bd --- /dev/null +++ b/offapi/com/sun/star/awt/ItemListEvent.idl @@ -0,0 +1,76 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef __offapi_com_sun_star_awt_ListItemEvent_idl__ +#define __offapi_com_sun_star_awt_ListItemEvent_idl__ + +#include +#include + +//================================================================================================================== + +module com { module sun { module star { module awt { + +//================================================================================================================== + +/** is the event broadcasted by a XListItems implementation for changes + in its item list. + */ +struct ItemListEvent : ::com::sun::star::lang::EventObject +{ + /** specifies the position of the item which is affected by the event + +

In case the event is not related to a single item, but to the complete list, the value of this + member is undefined.

+ */ + long ItemPosition; + + /** the text of the item. + +

If the event being notified did not touch the text of an item, this member is empty. For instance, upon + invocation of XItemList::setItemImage, only ItemImageURL will be set, and + ItemText will be empty.

+ */ + ::com::sun::star::beans::Optional< string > + ItemText; + + /** the URL of the image of the item + +

If the event being notified did not touch the image of an item, this member is empty. For instance, upon + invocation of XItemList::setItemText, only ItemText will be set, and + ItemImageURL will be empty.

+ */ + ::com::sun::star::beans::Optional< string > + ItemImageURL; +}; + +//================================================================================================================== + +}; }; }; }; + +//================================================================================================================== + +#endif diff --git a/offapi/com/sun/star/awt/XItemList.idl b/offapi/com/sun/star/awt/XItemList.idl new file mode 100644 index 000000000000..55721bf0af36 --- /dev/null +++ b/offapi/com/sun/star/awt/XItemList.idl @@ -0,0 +1,246 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef __offapi_com_sun_star_awt_XItemList_idl__ +#define __offapi_com_sun_star_awt_XItemList_idl__ + +#include +#include + +//================================================================================================================== + +module com { module sun { module star { module awt { + +interface XItemListListener; + +//================================================================================================================== + +/** provides convenient access to the list of items in a list box + */ +interface XItemList +{ + /** is the number of items in the list + */ + [attribute, readonly] long ItemCount; + + /** inserts a new item into the list + + @param Position + the position at which the item should be inserted. Must be greater or equal to 0, and + lesser than or equal to ItemCount. + + @param ItemText + the text of the item to be inserted. + + @param ItemImageURL + the URL of the image to display for the item + + @throws ::com::sun::star::lang::IndexOutOfBoundsException + if Position is invalid. + */ + void insertItem( + [in] long Position, + [in] string ItemText, + [in] string ItemImageURL + ) + raises ( ::com::sun::star::lang::IndexOutOfBoundsException ); + + /** inserts an item which has only a text, but no image + + @param Position + the position at which the item should be inserted. Must be greater or equal to 0, and + lesser than or equal to ItemCount. + + @param ItemText + the text of the item to be inserted. + + @throws ::com::sun::star::lang::IndexOutOfBoundsException + if Position is invalid. + */ + void insertItemText( + [in] long Position, + [in] string ItemText + ) + raises ( ::com::sun::star::lang::IndexOutOfBoundsException ); + + /** inserts an item which has only an image, but no text + + @param Position + the position at which the item should be inserted. Must be greater or equal to 0, and + lesser than or equal to ItemCount. + + @param ItemImageURL + the URL of the image to display for the item + + @throws ::com::sun::star::lang::IndexOutOfBoundsException + if Position is invalid. + */ + void insertItemImage( + [in] long Position, + [in] string ItemImageURL + ) + raises ( ::com::sun::star::lang::IndexOutOfBoundsException ); + + /** removes an item from the list + + @param Position + the position of the item which should be removed. Must be greater or equal to 0, and + lesser than ItemCount. + + @throws ::com::sun::star::lang::IndexOutOfBoundsException + if Position is invalid. + */ + void removeItem( + [in] long Position + ) + raises ( ::com::sun::star::lang::IndexOutOfBoundsException ); + + /** removes all items from the list + */ + void removeAllItems(); + + /** sets a new text for an existing item + + @param Position + the position of the item whose text is to be changed. Must be greater or equal to 0, and + lesser than ItemCount. + + @param ItemText + the new text of the item + + @throws ::com::sun::star::lang::IndexOutOfBoundsException + if Position is invalid. + */ + void setItemText( + [in] long Position, + [in] string ItemText + ) + raises ( ::com::sun::star::lang::IndexOutOfBoundsException ); + + /** sets a new image for an existing item + + @param Position + the position of the item whose image is to be changed. Must be greater or equal to 0, and + lesser than ItemCount. + + @param ItemImageURL + the new URL of the image to display for the item + + @throws ::com::sun::star::lang::IndexOutOfBoundsException + if Position is invalid. + */ + void setItemImage( + [in] long Position, + [in] string ItemImageURL + ) + raises ( ::com::sun::star::lang::IndexOutOfBoundsException ); + + /** sets both a new position and text for an existing item + + @param Position + the position of the item whose text and image is to be changed. Must be greater or equal to 0, and + lesser than ItemCount. + + @param ItemText + the new text of the item + + @param ItemImageURL + the new URL of the image to display for the item + + @throws ::com::sun::star::lang::IndexOutOfBoundsException + if Position is invalid. + */ + void setItemTextAndImage( + [in] long Position, + [in] string ItemText, + [in] string ItemImageURL + ) + raises ( ::com::sun::star::lang::IndexOutOfBoundsException ); + + /** retrieves the text of an existing item + + @param Position + the position of the item whose text should be retrieved. Must be greater or equal to 0, and + lesser than ItemCount. + + @throws ::com::sun::star::lang::IndexOutOfBoundsException + if Position is invalid. + */ + string getItemText( + [in] long Position + ) + raises ( ::com::sun::star::lang::IndexOutOfBoundsException ); + + /** retrieves the URL of the image of an existing item + + @param Position + the position of the item whose image should be retrieved. Must be greater or equal to 0, and + lesser than ItemCount. + + @throws ::com::sun::star::lang::IndexOutOfBoundsException + if Position is invalid. + */ + string getItemImage( + [in] long Position + ) + raises ( ::com::sun::star::lang::IndexOutOfBoundsException ); + + /** retrieves both the text and the image URL of an existing item + + @param Position + the position of the item whose text and image should be retrieved. Must be greater or equal to 0, and + lesser than ItemCount. + + @throws ::com::sun::star::lang::IndexOutOfBoundsException + if Position is invalid. + */ + ::com::sun::star::beans::Pair< string, string > + getItemTextAndImage( + [in] long Position + ) + raises ( ::com::sun::star::lang::IndexOutOfBoundsException ); + + /** retrieves the texts and images of all items in the list + */ + sequence< ::com::sun::star::beans::Pair< string, string > > + getAllItems(); + + /** registers a listener which is notified about changes in the item list. + */ + void addItemListListener( [in] XItemListListener Listener ); + + /** revokes a listener which is notified about changes in the item list. + */ + void removeItemListListener( [in] XItemListListener Listener ); +}; + +//================================================================================================================== + +}; }; }; }; + +//================================================================================================================== + +#endif diff --git a/offapi/com/sun/star/awt/XItemListListener.idl b/offapi/com/sun/star/awt/XItemListListener.idl new file mode 100644 index 000000000000..d41d8b104a02 --- /dev/null +++ b/offapi/com/sun/star/awt/XItemListListener.idl @@ -0,0 +1,85 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef __offapi_com_sun_star_awt_XItemListListener_idl__ +#define __offapi_com_sun_star_awt_XItemListListener_idl__ + +#include +#include + +//================================================================================================================== + +module com { module sun { module star { module awt { + +//================================================================================================================== + +/** describes a listener for changes in a item list + @see XListItems + */ +interface XItemListListener : ::com::sun::star::lang::XEventListener +{ + /** is called when an item is inserted into the list + */ + void listItemInserted( + [in] ItemListEvent Event + ); + + /** is called when an item is removed from the list + */ + void listItemRemoved( + [in] ItemListEvent Event + ); + + /** is called when an item in the list is modified, i.e. its text or image changed + */ + void listItemModified( + [in] ItemListEvent Event + ); + /** is called when the list has been completely cleared, i.e. after an invocation of + XItemList::removeAllItems + */ + void allItemsRemoved( + [in] ::com::sun::star::lang::EventObject Event + ); + + /** is called when the changes to the item list which occured are too complex to be notified + in single events. + +

Consumers of this event should discard their cached information about the current item list, + and completely refresh it from the XItemList's current state.

+ */ + void itemListChanged( + [in] ::com::sun::star::lang::EventObject Event + ); +}; + +//================================================================================================================== + +}; }; }; }; + +//================================================================================================================== + +#endif diff --git a/offapi/com/sun/star/awt/makefile.mk b/offapi/com/sun/star/awt/makefile.mk index 1e2350a3a1d3..55734fd75ca6 100644 --- a/offapi/com/sun/star/awt/makefile.mk +++ b/offapi/com/sun/star/awt/makefile.mk @@ -328,7 +328,10 @@ IDLFILES=\ MenuLogo.idl \ XMenuExtended2.idl \ XMenuBarExtended.idl \ - XPopupMenuExtended.idl + XPopupMenuExtended.idl \ + XItemList.idl \ + XItemListListener.idl \ + ItemListEvent.idl # ------------------------------------------------------------------ -- cgit v1.2.3 From 0f011288f27663ba8d67147c3a3820f727a20249 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Thu, 29 Apr 2010 10:15:25 +0200 Subject: fs33a: #i111238# add (optional, since the thing is published) support for XItemList --- offapi/com/sun/star/awt/UnoControlListBoxModel.idl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/offapi/com/sun/star/awt/UnoControlListBoxModel.idl b/offapi/com/sun/star/awt/UnoControlListBoxModel.idl index 5017b05635ad..1cd36de93231 100644 --- a/offapi/com/sun/star/awt/UnoControlListBoxModel.idl +++ b/offapi/com/sun/star/awt/UnoControlListBoxModel.idl @@ -39,6 +39,8 @@ #include #endif +#include + //============================================================================= @@ -208,6 +210,11 @@ published service UnoControlListBoxModel this is possible.

*/ [optional, property] short MouseWheelBehavior; + + /** allows mmanipulating the list of items in the list box more fine-grained than the + StringItemList property. + */ + [optional] interface XItemList; }; //============================================================================= -- cgit v1.2.3 From 165f0b50ea8624004d12a09f9b04a1ede187511d Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Thu, 29 Apr 2010 11:10:06 +0200 Subject: cws tl80: #i98575# memory leak fixed --- sw/source/ui/docvw/postit.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) mode change 100644 => 100755 sw/source/ui/docvw/postit.cxx diff --git a/sw/source/ui/docvw/postit.cxx b/sw/source/ui/docvw/postit.cxx old mode 100644 new mode 100755 index b5a8ea2edba8..d96cc99dd91e --- a/sw/source/ui/docvw/postit.cxx +++ b/sw/source/ui/docvw/postit.cxx @@ -1259,7 +1259,12 @@ void SwMarginWin::ExecuteCommand(USHORT nSlot) SwView* pView = DocView(); if (Engine()->GetEditEngine().GetText() != String(EMPTYSTRING)) { - OutlinerParaObject* pPara = new OutlinerParaObject(*View()->GetEditView().CreateTextObject()); + // since we will be owner of the object returned by CreateTextObject, + // and OutlinerParaObject will clone that one, we need to delete the + // original object. + EditTextObject* pTemporaryText = View()->GetEditView().CreateTextObject(); + OutlinerParaObject* pPara = new OutlinerParaObject( *pTemporaryText ); + delete pTemporaryText; Mgr()->RegisterAnswer(pPara); } if (Mgr()->GetActivePostIt()) -- cgit v1.2.3 From 3f67e32d8113c35c2bd5f1cbeb4780fdc4c12e24 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Thu, 29 Apr 2010 11:25:37 +0200 Subject: pdfextfix03: #i110871# increase micro version to reflect bugfixes --- sdext/source/pdfimport/config/description.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdext/source/pdfimport/config/description.xml b/sdext/source/pdfimport/config/description.xml index c2d36bd58be1..9c2dc76c62d1 100644 --- a/sdext/source/pdfimport/config/description.xml +++ b/sdext/source/pdfimport/config/description.xml @@ -16,7 +16,7 @@ - + -- cgit v1.2.3 From 031a451a48f26480a674cdbd8483403e8a9a3433 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Thu, 29 Apr 2010 14:10:03 +0200 Subject: fs33a: #i111238# now with UserData support --- offapi/com/sun/star/awt/XItemList.idl | 37 +++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/offapi/com/sun/star/awt/XItemList.idl b/offapi/com/sun/star/awt/XItemList.idl index 55721bf0af36..3d618d760322 100644 --- a/offapi/com/sun/star/awt/XItemList.idl +++ b/offapi/com/sun/star/awt/XItemList.idl @@ -180,6 +180,26 @@ interface XItemList ) raises ( ::com::sun::star::lang::IndexOutOfBoundsException ); + /** associates an implementation dependend value with the given list item. + +

You can use this to store data for an item which does not interfere with the displayed + text and image, but can be used by the client of the list box for an arbitrary purpose.

+ + @param Position + the position of the item whose data value should be set. Must be greater or equal to 0, and + lesser than ItemCount. + + @throws ::com::sun::star::lang::IndexOutOfBoundsException + if Position is invalid. + + @see getUserData + */ + void setUserData( + [in] long Position, + [in] any DataValue + ) + raises ( ::com::sun::star::lang::IndexOutOfBoundsException ); + /** retrieves the text of an existing item @param Position @@ -223,6 +243,23 @@ interface XItemList ) raises ( ::com::sun::star::lang::IndexOutOfBoundsException ); + /** retrieves the implementation dependend value associated with the given list item. + @see setUserData + + @param Position + the position of the item whose data value should be retrieved. Must be greater or equal to 0, and + lesser than ItemCount. + + @throws ::com::sun::star::lang::IndexOutOfBoundsException + if Position is invalid. + + @see getUserData + */ + any getUserData( + [in] long Position + ) + raises ( ::com::sun::star::lang::IndexOutOfBoundsException ); + /** retrieves the texts and images of all items in the list */ sequence< ::com::sun::star::beans::Pair< string, string > > -- cgit v1.2.3 From 113cf2120bfcf27fb94f990c8ea6f4a44b7889f0 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Thu, 29 Apr 2010 14:39:58 +0200 Subject: fs33a: #i111238# ensure that form control list boxes, which override the StringItemListProperty, update it when the aggregated toolkit list box changes it --- forms/source/component/ListBox.cxx | 20 ++++++++++++++++++++ forms/source/component/ListBox.hxx | 3 +++ 2 files changed, 23 insertions(+) diff --git a/forms/source/component/ListBox.cxx b/forms/source/component/ListBox.cxx index 88135c040d71..e8a93ca12bc0 100644 --- a/forms/source/component/ListBox.cxx +++ b/forms/source/component/ListBox.cxx @@ -174,6 +174,8 @@ namespace frm m_eListSourceType = ListSourceType_VALUELIST; m_aBoundColumn <<= (sal_Int16)1; initValueProperty( PROPERTY_SELECT_SEQ, PROPERTY_ID_SELECT_SEQ); + + startAggregatePropertyListening( PROPERTY_STRINGITEMLIST ); } //------------------------------------------------------------------ @@ -191,6 +193,8 @@ namespace frm ,m_nBoundColumnType( DataType::SQLNULL ) { DBG_CTOR(OListBoxModel,NULL); + + startAggregatePropertyListening( PROPERTY_STRINGITEMLIST ); } //------------------------------------------------------------------ @@ -452,6 +456,22 @@ namespace frm END_DESCRIBE_PROPERTIES(); } + //------------------------------------------------------------------------------ + void OListBoxModel::_propertyChanged( const PropertyChangeEvent& i_rEvent ) throw ( RuntimeException ) + { + if ( i_rEvent.PropertyName == PROPERTY_STRINGITEMLIST ) + { + ControlModelLock aLock( *this ); + // SYNCHRONIZED -----> + // our aggregate internally changed its StringItemList property - reflect this in our "overridden" + // version of the property + setNewStringItemList( i_rEvent.NewValue, aLock ); + // <----- SYNCHRONIZED + return; + } + OBoundControlModel::_propertyChanged( i_rEvent ); + } + //------------------------------------------------------------------------------ void OListBoxModel::describeAggregateProperties( Sequence< Property >& _rAggregateProps ) const { diff --git a/forms/source/component/ListBox.hxx b/forms/source/component/ListBox.hxx index 04db6069d89e..46ab6b872fb8 100644 --- a/forms/source/component/ListBox.hxx +++ b/forms/source/component/ListBox.hxx @@ -134,6 +134,9 @@ protected: // XEventListener virtual void SAL_CALL disposing(const ::com::sun::star::lang::EventObject& Source) throw (::com::sun::star::uno::RuntimeException); + // OPropertyChangeListener + virtual void _propertyChanged( const ::com::sun::star::beans::PropertyChangeEvent& _rEvt ) throw ( ::com::sun::star::uno::RuntimeException ); + // prevent method hiding using OBoundControlModel::getFastPropertyValue; using OBoundControlModel::setPropertyValues; -- cgit v1.2.3 From 46862f3143fc883a8152ba581ecc3bac52b39b8e Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Thu, 29 Apr 2010 15:29:46 +0200 Subject: fs33a: #i111238# [s|g]etUserData -> [s|g]etItemData --- toolkit/inc/toolkit/controls/unocontrols.hxx | 4 ++-- toolkit/source/controls/unocontrols.cxx | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/toolkit/inc/toolkit/controls/unocontrols.hxx b/toolkit/inc/toolkit/controls/unocontrols.hxx index 71e0a915788d..88449418c70a 100644 --- a/toolkit/inc/toolkit/controls/unocontrols.hxx +++ b/toolkit/inc/toolkit/controls/unocontrols.hxx @@ -795,11 +795,11 @@ public: virtual void SAL_CALL setItemText( ::sal_Int32 Position, const ::rtl::OUString& ItemText ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL setItemImage( ::sal_Int32 Position, const ::rtl::OUString& ItemImageURL ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL setItemTextAndImage( ::sal_Int32 Position, const ::rtl::OUString& ItemText, const ::rtl::OUString& ItemImageURL ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setUserData( ::sal_Int32 Position, const ::com::sun::star::uno::Any& DataValue ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setItemData( ::sal_Int32 Position, const ::com::sun::star::uno::Any& DataValue ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); virtual ::rtl::OUString SAL_CALL getItemText( ::sal_Int32 Position ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); virtual ::rtl::OUString SAL_CALL getItemImage( ::sal_Int32 Position ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::beans::Pair< ::rtl::OUString, ::rtl::OUString > SAL_CALL getItemTextAndImage( ::sal_Int32 Position ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Any SAL_CALL getUserData( ::sal_Int32 Position ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getItemData( ::sal_Int32 Position ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Pair< ::rtl::OUString, ::rtl::OUString > > SAL_CALL getAllItems( ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL addItemListListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListListener >& Listener ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL removeItemListListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListListener >& Listener ) throw (::com::sun::star::uno::RuntimeException); diff --git a/toolkit/source/controls/unocontrols.cxx b/toolkit/source/controls/unocontrols.cxx index 975040ca9070..8b37978c58e6 100644 --- a/toolkit/source/controls/unocontrols.cxx +++ b/toolkit/source/controls/unocontrols.cxx @@ -1851,19 +1851,19 @@ struct ListItem { ::rtl::OUString ItemText; ::rtl::OUString ItemImageURL; - Any ItemUserData; + Any ItemData; ListItem() :ItemText() ,ItemImageURL() - ,ItemUserData() + ,ItemData() { } ListItem( const ::rtl::OUString& i_rItemText ) :ItemText( i_rItemText ) ,ItemImageURL() - ,ItemUserData() + ,ItemData() { } }; @@ -2168,11 +2168,11 @@ void SAL_CALL UnoControlListBoxModel::setItemTextAndImage( ::sal_Int32 i_nPositi } // --------------------------------------------------------------------------------------------------------------------- -void SAL_CALL UnoControlListBoxModel::setUserData( ::sal_Int32 i_nPosition, const Any& i_rDataValue ) throw (IndexOutOfBoundsException, RuntimeException) +void SAL_CALL UnoControlListBoxModel::setItemData( ::sal_Int32 i_nPosition, const Any& i_rDataValue ) throw (IndexOutOfBoundsException, RuntimeException) { ::osl::ClearableMutexGuard aGuard( GetMutex() ); ListItem& rItem( m_pData->getItem( i_nPosition ) ); - rItem.ItemUserData = i_rDataValue; + rItem.ItemData = i_rDataValue; } // --------------------------------------------------------------------------------------------------------------------- @@ -2200,11 +2200,11 @@ beans::Pair< ::rtl::OUString, ::rtl::OUString > SAL_CALL UnoControlListBoxModel: } // --------------------------------------------------------------------------------------------------------------------- -Any SAL_CALL UnoControlListBoxModel::getUserData( ::sal_Int32 i_nPosition ) throw (IndexOutOfBoundsException, RuntimeException) +Any SAL_CALL UnoControlListBoxModel::getItemData( ::sal_Int32 i_nPosition ) throw (IndexOutOfBoundsException, RuntimeException) { ::osl::ClearableMutexGuard aGuard( GetMutex() ); const ListItem& rItem( m_pData->getItem( i_nPosition ) ); - return rItem.ItemUserData; + return rItem.ItemData; } // --------------------------------------------------------------------------------------------------------------------- -- cgit v1.2.3 From ec28ca09191867b79d433c588f03dd89802d8b79 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Thu, 29 Apr 2010 15:29:46 +0200 Subject: fs33a: #i111238# [s|g]etUserData -> [s|g]etItemData --- offapi/com/sun/star/awt/XItemList.idl | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/offapi/com/sun/star/awt/XItemList.idl b/offapi/com/sun/star/awt/XItemList.idl index 3d618d760322..6419ea94d0b0 100644 --- a/offapi/com/sun/star/awt/XItemList.idl +++ b/offapi/com/sun/star/awt/XItemList.idl @@ -189,14 +189,17 @@ interface XItemList the position of the item whose data value should be set. Must be greater or equal to 0, and lesser than ItemCount. + @param ItemData + the data to associate with the list item + @throws ::com::sun::star::lang::IndexOutOfBoundsException if Position is invalid. - @see getUserData + @see getItemData */ - void setUserData( + void setItemData( [in] long Position, - [in] any DataValue + [in] any ItemData ) raises ( ::com::sun::star::lang::IndexOutOfBoundsException ); @@ -244,7 +247,7 @@ interface XItemList raises ( ::com::sun::star::lang::IndexOutOfBoundsException ); /** retrieves the implementation dependend value associated with the given list item. - @see setUserData + @see setItemData @param Position the position of the item whose data value should be retrieved. Must be greater or equal to 0, and @@ -253,9 +256,9 @@ interface XItemList @throws ::com::sun::star::lang::IndexOutOfBoundsException if Position is invalid. - @see getUserData + @see setItemData */ - any getUserData( + any getItemData( [in] long Position ) raises ( ::com::sun::star::lang::IndexOutOfBoundsException ); -- cgit v1.2.3 From 360fc68830537e351f3b8c231c5cd18f4a40cd31 Mon Sep 17 00:00:00 2001 From: Dirk Voelzke Date: Thu, 29 Apr 2010 16:27:38 +0200 Subject: dv12#i105255# Use different names for different images :-) --- desktop/source/deployment/gui/dp_gui_dialog2.src | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.src b/desktop/source/deployment/gui/dp_gui_dialog2.src index 22170d41eae9..7c47365999a0 100644 --- a/desktop/source/deployment/gui/dp_gui_dialog2.src +++ b/desktop/source/deployment/gui/dp_gui_dialog2.src @@ -165,12 +165,12 @@ Image RID_IMG_WARNING_HC Image RID_IMG_LOCKED { - ImageBitmap = Bitmap { File = "shared_16.png"; }; + ImageBitmap = Bitmap { File = "lock_16.png"; }; }; Image RID_IMG_LOCKED_HC { - ImageBitmap = Bitmap { File = "shared_16_h.png"; }; + ImageBitmap = Bitmap { File = "lock_16_h.png"; }; }; Image RID_IMG_SHARED -- cgit v1.2.3 From a3defc0336a475847f218ff2fddafb240ef32e3f Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Fri, 30 Apr 2010 14:33:36 +0200 Subject: cws tl80: #i48303# fixed minor spell check problem when splitting wrong words --- editeng/source/editeng/edtspell.cxx | 12 ++++++++++++ editeng/source/editeng/edtspell.hxx | 8 +------- editeng/source/editeng/impedit2.cxx | 13 ++++++++++++- 3 files changed, 25 insertions(+), 8 deletions(-) diff --git a/editeng/source/editeng/edtspell.cxx b/editeng/source/editeng/edtspell.cxx index fed1394e5fd0..f01381a4ae62 100644 --- a/editeng/source/editeng/edtspell.cxx +++ b/editeng/source/editeng/edtspell.cxx @@ -208,6 +208,9 @@ void EditSpellWrapper::CheckSpellTo() pSpellInfo->aSpellTo.nIndex = aPaM.GetNode()->Len(); } } + +////////////////////////////////////////////////////////////////////// + SV_IMPL_VARARR( WrongRanges, WrongRange ); WrongList::WrongList() @@ -220,6 +223,14 @@ WrongList::~WrongList() { } +void WrongList::MarkInvalid( USHORT nS, USHORT nE ) +{ + if ( ( nInvalidStart == NOT_INVALID ) || ( nInvalidStart > nS ) ) + nInvalidStart = nS; + if ( nInvalidEnd < nE ) + nInvalidEnd = nE; +} + void WrongList::TextInserted( sal_uInt16 nPos, sal_uInt16 nNew, sal_Bool bPosIsSep ) { if ( !IsInvalid() ) @@ -527,6 +538,7 @@ sal_Bool WrongList::DbgIsBuggy() const } #endif +////////////////////////////////////////////////////////////////////// EdtAutoCorrDoc::EdtAutoCorrDoc( ImpEditEngine* pE, ContentNode* pN, sal_uInt16 nCrsr, xub_Unicode cIns ) diff --git a/editeng/source/editeng/edtspell.hxx b/editeng/source/editeng/edtspell.hxx index cfe0aaf57e87..851848c5ede0 100644 --- a/editeng/source/editeng/edtspell.hxx +++ b/editeng/source/editeng/edtspell.hxx @@ -97,13 +97,7 @@ public: BOOL IsInvalid() const { return nInvalidStart != NOT_INVALID; } void SetValid() { nInvalidStart = NOT_INVALID; nInvalidEnd = 0; } - void MarkInvalid( USHORT nS, USHORT nE ) - { - if ( ( nInvalidStart == NOT_INVALID ) || ( nInvalidStart > nS ) ) - nInvalidStart = nS; - if ( nInvalidEnd < nE ) - nInvalidEnd = nE; - } + void MarkInvalid( USHORT nS, USHORT nE ); USHORT Count() const { return WrongRanges::Count(); } diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx index 8f0ad2bc15d4..778942730e71 100755 --- a/editeng/source/editeng/impedit2.cxx +++ b/editeng/source/editeng/impedit2.cxx @@ -2755,6 +2755,11 @@ EditPaM ImpEditEngine::ImpInsertText( EditSelection aCurSel, const XubString& rS EditPaM aCurPaM( aPaM ); // fuers Invalidieren + // get word boundaries in order to clear possible WrongList entries + // and invalidate all the necessary text (everything after and including the + // start of the word) + EditSelection aCurWord( SelectWord( aCurPaM, i18n::WordType::DICTIONARY_WORD ) ); + XubString aText( rStr ); aText.ConvertLineEnd( LINEEND_LF ); SfxVoidItem aTabItem( EE_FEATURE_TAB ); @@ -2809,7 +2814,13 @@ EditPaM ImpEditEngine::ImpInsertText( EditSelection aCurSel, const XubString& rS } ParaPortion* pPortion = FindParaPortion( aPaM.GetNode() ); DBG_ASSERT( pPortion, "Blinde Portion in InsertText" ); - pPortion->MarkInvalid( aCurPaM.GetIndex(), aLine.Len() ); + + // now remove the Wrongs (red spell check marks) from both words... + WrongList *pWrongs = aCurPaM.GetNode()->GetWrongList(); + if (pWrongs && pWrongs->HasWrongs()) + pWrongs->ClearWrongs( aCurWord.Min().GetIndex(), aPaM.GetIndex(), aPaM.GetNode() ); + // ... and mark both words as 'to be checked again' + pPortion->MarkInvalid( aCurWord.Min().GetIndex(), aLine.Len() ); } if ( nEnd < aText.Len() ) aPaM = ImpInsertParaBreak( aPaM ); -- cgit v1.2.3 From 491858eb7551eaf5e9063ebbcc3a301395d2fb0a Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Fri, 30 Apr 2010 16:49:16 +0200 Subject: vcl111: #i103999# fix menu text color --- vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx index cb36b4613707..4f8372c263d4 100644 --- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx +++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx @@ -3471,7 +3471,7 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings ) aBackColor = getColor( pMenubarStyle->bg[GTK_STATE_NORMAL] ); aStyleSet.SetMenuBarColor( aBackColor ); aBackColor = getColor( pMenuStyle->bg[GTK_STATE_NORMAL] ); - aTextColor = getColor( pMenuTextStyle->text[GTK_STATE_NORMAL] ); + aTextColor = getColor( pMenuTextStyle->fg[GTK_STATE_NORMAL] ); aStyleSet.SetMenuColor( aBackColor ); aStyleSet.SetMenuTextColor( aTextColor ); -- cgit v1.2.3 From d1191555eaaedeed0e2103008f7a941ed20031ce Mon Sep 17 00:00:00 2001 From: Niklas Nebel Date: Fri, 30 Apr 2010 17:31:53 +0200 Subject: calc54: #i111293# correct parentheses --- sc/source/filter/xml/xmlexprt.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx index d53f26a5e887..57b914a9f65f 100644 --- a/sc/source/filter/xml/xmlexprt.cxx +++ b/sc/source/filter/xml/xmlexprt.cxx @@ -3546,8 +3546,8 @@ sal_Bool ScXMLExport::IsCellEqual (ScMyCell& aCell1, ScMyCell& aCell2) { if (!aCell1.bHasAnnotation || (aCell1.bHasAnnotation && sal_False/*IsAnnotationEqual(aCell1.xCell, aCell2.xCell)*/)) // no longer compareable { - if (((aCell1.nStyleIndex == aCell2.nStyleIndex) && ((aCell1.bIsAutoStyle == aCell2.bIsAutoStyle) || - (aCell1.nStyleIndex == aCell2.nStyleIndex)) && (aCell1.nStyleIndex == -1)) && + if ((((aCell1.nStyleIndex == aCell2.nStyleIndex) && (aCell1.bIsAutoStyle == aCell2.bIsAutoStyle)) || + ((aCell1.nStyleIndex == aCell2.nStyleIndex) && (aCell1.nStyleIndex == -1))) && (aCell1.nValidationIndex == aCell2.nValidationIndex) && IsCellTypeEqual(aCell1, aCell2)) { -- cgit v1.2.3 From 840f8f92702d550390719027d5eb215d3ad07619 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Sun, 2 May 2010 13:19:38 +0200 Subject: fs33a: compile errors on unxlngi6.pro / unxmacxi.pro --- toolkit/source/awt/vclxwindows.cxx | 2 +- toolkit/source/controls/unocontrols.cxx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx index ff4dc6fb5ec4..43e0e50c315d 100644 --- a/toolkit/source/awt/vclxwindows.cxx +++ b/toolkit/source/awt/vclxwindows.cxx @@ -2155,7 +2155,7 @@ void SAL_CALL VCLXListBox::listItemModified( const ItemListEvent& i_rEvent ) thr // VCL's ListBox does not support changing an entry's text or image, so remove and re-insert - const ::rtl::OUString sNewText = i_rEvent.ItemText.IsPresent ? i_rEvent.ItemText.Value : pListBox->GetEntry( i_rEvent.ItemPosition ); + const ::rtl::OUString sNewText = i_rEvent.ItemText.IsPresent ? i_rEvent.ItemText.Value : ::rtl::OUString( pListBox->GetEntry( i_rEvent.ItemPosition ) ); const Image aNewImage( i_rEvent.ItemImageURL.IsPresent ? lcl_getImageFromURL( i_rEvent.ItemImageURL.Value ) : pListBox->GetEntryImage( i_rEvent.ItemPosition ) ); pListBox->RemoveEntry( i_rEvent.ItemPosition ); diff --git a/toolkit/source/controls/unocontrols.cxx b/toolkit/source/controls/unocontrols.cxx index 8b37978c58e6..3b037e3ca0d3 100644 --- a/toolkit/source/controls/unocontrols.cxx +++ b/toolkit/source/controls/unocontrols.cxx @@ -1881,9 +1881,9 @@ struct StripItemData : public ::std::unary_function< ListItem, UnoListItem > struct UnoControlListBoxModel_Data { UnoControlListBoxModel_Data( UnoControlListBoxModel& i_rAntiImpl ) - :m_rAntiImpl( i_rAntiImpl ) + :m_bSettingLegacyProperty( false ) + ,m_rAntiImpl( i_rAntiImpl ) ,m_aListItems() - ,m_bSettingLegacyProperty( false ) { } -- cgit v1.2.3 From 5ee055288d53fb2db05e835361574dbaae1b58c0 Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Mon, 3 May 2010 14:43:49 +0200 Subject: cws tl80: #i98187# api documentation for EditInReadonly --- offapi/com/sun/star/text/TextFrame.idl | 9 +++++++++ 1 file changed, 9 insertions(+) mode change 100644 => 100755 offapi/com/sun/star/text/TextFrame.idl diff --git a/offapi/com/sun/star/text/TextFrame.idl b/offapi/com/sun/star/text/TextFrame.idl old mode 100644 new mode 100755 index e1ab64c2e674..e43b3d79197c --- a/offapi/com/sun/star/text/TextFrame.idl +++ b/offapi/com/sun/star/text/TextFrame.idl @@ -111,6 +111,13 @@ published service TextFrame @see SizeType */ [property] short SizeType; + //------------------------------------------------------------------------- + /** determines if the text frame should be editable in a read-only document. + (This is usually used in forms.) + + */ + [optional, property] boolean EditInReadonly; + //------------------------------------------------------------------------- /** determines the interpretation of the width and relative width properties. @@ -119,12 +126,14 @@ published service TextFrame @since OOo 2.4 */ [optional, property] short WidthType; + //----------------------------------------------------------------------------- /** contains the writing direction, as represented by the WritingMode2 constants */ [optional, property] short WritingMode; + //----------------------------------------------------------------------------- /** controls, if the frame follows the text flow or can leave its layout environment

If set, the frame follows the text flow and doesn't leaves the layout -- cgit v1.2.3 From 03efbb4e37d70ea1bd8f2616ce6c6e5a84e61378 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Mon, 3 May 2010 15:00:51 +0200 Subject: vcl111: #i106125# do not limit the system scrollbarsize anymore --- vcl/win/source/window/salframe.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vcl/win/source/window/salframe.cxx b/vcl/win/source/window/salframe.cxx index a6567464ac5e..7314fd2b6164 100755 --- a/vcl/win/source/window/salframe.cxx +++ b/vcl/win/source/window/salframe.cxx @@ -2891,8 +2891,8 @@ void WinSalFrame::UpdateSettings( AllSettings& rSettings ) BOOL bCompBorder = (aStyleSettings.GetOptions() & (STYLE_OPTION_MACSTYLE | STYLE_OPTION_UNIXSTYLE)) == 0; // TODO: once those options vanish: just set bCompBorder to TRUE // to have the system colors read - aStyleSettings.SetScrollBarSize( Min( GetSystemMetrics( SM_CXVSCROLL ), 20 ) ); // #99956# do not allow huge scrollbars, most of the UI is not scaled anymore - aStyleSettings.SetSpinSize( Min( GetSystemMetrics( SM_CXVSCROLL ), 20 ) ); + aStyleSettings.SetScrollBarSize( GetSystemMetrics( SM_CXVSCROLL ) ); + aStyleSettings.SetSpinSize( GetSystemMetrics( SM_CXVSCROLL ) ); aStyleSettings.SetCursorBlinkTime( GetCaretBlinkTime() ); if ( bCompBorder ) { -- cgit v1.2.3 From 40de6609ed4a6d68c526e1e347955b83865bb3e3 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 3 May 2010 15:38:30 +0200 Subject: os141: accept more URL schemes which are supported by the GraphicsProvider --- svtools/source/misc/imageresourceaccess.cxx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/svtools/source/misc/imageresourceaccess.cxx b/svtools/source/misc/imageresourceaccess.cxx index a4f19d9e004a..6481adc8c671 100644 --- a/svtools/source/misc/imageresourceaccess.cxx +++ b/svtools/source/misc/imageresourceaccess.cxx @@ -141,8 +141,13 @@ namespace svt //-------------------------------------------------------------------- bool GraphicAccess::isSupportedURL( const ::rtl::OUString& _rURL ) { - ::rtl::OUString sIndicator( RTL_CONSTASCII_USTRINGPARAM( "private:resource/" ) ); - return ( ( _rURL.indexOf( sIndicator ) == 0 ) || ( _rURL.compareToAscii( GRAPHOBJ_URLPREFIX, RTL_CONSTASCII_LENGTH( GRAPHOBJ_URLPREFIX ) ) == 0 ) ); + if ( ( _rURL.indexOfAsciiL( RTL_CONSTASCII_STRINGPARAM( "private:resource/" ) ) == 0 ) + || ( _rURL.indexOfAsciiL( RTL_CONSTASCII_STRINGPARAM( "private:graphicrepository/" ) ) == 0 ) + || ( _rURL.indexOfAsciiL( RTL_CONSTASCII_STRINGPARAM( "private:standardimage/" ) ) == 0 ) + || ( _rURL.compareToAscii( GRAPHOBJ_URLPREFIX, RTL_CONSTASCII_LENGTH( GRAPHOBJ_URLPREFIX ) ) == 0 ) + ) + return true; + return false; } //-------------------------------------------------------------------- -- cgit v1.2.3 From 790987f24261489d3984388f6b6bc0eedb5b5390 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 3 May 2010 15:39:14 +0200 Subject: os141: getPhysicalLocation: do not destroy valid non-file URLs --- toolkit/source/controls/dialogcontrol.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/toolkit/source/controls/dialogcontrol.cxx b/toolkit/source/controls/dialogcontrol.cxx index db9634fb44a1..49065302d217 100644 --- a/toolkit/source/controls/dialogcontrol.cxx +++ b/toolkit/source/controls/dialogcontrol.cxx @@ -2081,24 +2081,24 @@ throw (RuntimeException) ::rtl::OUString getPhysicalLocation( const ::com::sun::star::uno::Any& rbase, const ::com::sun::star::uno::Any& rUrl ) { - - - ::rtl::OUString ret; - ::rtl::OUString baseLocation; ::rtl::OUString url; rbase >>= baseLocation; rUrl >>= url; + ::rtl::OUString absoluteURL( url ); if ( url.getLength() > 0 ) { INetURLObject urlObj(baseLocation); urlObj.removeSegment(); baseLocation = urlObj.GetMainURL( INetURLObject::NO_DECODE ); - ::osl::FileBase::getAbsoluteFileURL( baseLocation, url, ret ); + + ::rtl::OUString testAbsoluteURL; + if ( osl_File_E_None == ::osl::FileBase::getAbsoluteFileURL( baseLocation, url, testAbsoluteURL ) ) + absoluteURL = testAbsoluteURL; } - return ret; + return absoluteURL; } -- cgit v1.2.3 From f645ed3b6bd82298df06c912ea2fadba0eea96eb Mon Sep 17 00:00:00 2001 From: "Herbert Duerr [hdu]" Date: Tue, 4 May 2010 15:38:17 +0200 Subject: #i95867# avoid GDI-internal integer overflow for extremely anisotropic text --- vcl/win/source/gdi/salgdi3.cxx | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/vcl/win/source/gdi/salgdi3.cxx b/vcl/win/source/gdi/salgdi3.cxx index ebe470d3eb7e..abdfb2dac5bb 100644 --- a/vcl/win/source/gdi/salgdi3.cxx +++ b/vcl/win/source/gdi/salgdi3.cxx @@ -1272,15 +1272,24 @@ HFONT WinSalGraphics::ImplDoSetFont( ImplFontSelectData* i_pFont, float& o_rFont && (ImplSalWICompareAscii( aLogFont.lfFaceName, "Courier" ) == 0) ) lstrcpynW( aLogFont.lfFaceName, L"Courier New", 11 ); - // limit font requests to MAXFONTHEIGHT + // #i47675# limit font requests to MAXFONTHEIGHT // TODO: share MAXFONTHEIGHT font instance - if( -aLogFont.lfHeight <= MAXFONTHEIGHT ) + if( (-aLogFont.lfHeight <= MAXFONTHEIGHT) + && (+aLogFont.lfWidth <= MAXFONTHEIGHT) ) + { o_rFontScale = 1.0; - else + } + else if( -aLogFont.lfHeight >= +aLogFont.lfWidth ) { o_rFontScale = -aLogFont.lfHeight / (float)MAXFONTHEIGHT; aLogFont.lfHeight = -MAXFONTHEIGHT; - aLogFont.lfWidth = static_cast( aLogFont.lfWidth / o_rFontScale ); + aLogFont.lfWidth = FRound( aLogFont.lfWidth / o_rFontScale ); + } + else // #i95867# also limit font widths + { + o_rFontScale = +aLogFont.lfWidth / (float)MAXFONTHEIGHT; + aLogFont.lfWidth = +MAXFONTHEIGHT; + aLogFont.lfHeight = FRound( aLogFont.lfHeight / o_rFontScale ); } hNewFont = ::CreateFontIndirectW( &aLogFont ); -- cgit v1.2.3 From c999e914a371d37ec37aab2db3c2d5f8a62ee192 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Tue, 4 May 2010 18:15:36 +0200 Subject: vcl111: #i42282# do not position dialogs outside the screen just because the screen existed in the last session --- vcl/inc/vcl/syswin.hxx | 2 ++ vcl/source/window/syswin.cxx | 61 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+) diff --git a/vcl/inc/vcl/syswin.hxx b/vcl/inc/vcl/syswin.hxx index b0e74df9a767..b3a7d9b8775e 100644 --- a/vcl/inc/vcl/syswin.hxx +++ b/vcl/inc/vcl/syswin.hxx @@ -179,6 +179,8 @@ private: SystemWindow (const SystemWindow &); SystemWindow & operator= (const SystemWindow &); + SAL_DLLPRIVATE void ImplMoveToScreen( long& io_rX, long& io_rY, long i_nWidth, long i_nHeight, Window* i_pConfigureWin ); + protected: // Single argument ctors shall be explicit. explicit SystemWindow( WindowType nType ); diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx index 056b55dc3b61..f3624ef56f59 100644 --- a/vcl/source/window/syswin.cxx +++ b/vcl/source/window/syswin.cxx @@ -659,6 +659,63 @@ static void ImplWindowStateToStr( const WindowStateData& rData, ByteString& rStr // ----------------------------------------------------------------------- +void SystemWindow::ImplMoveToScreen( long& io_rX, long& io_rY, long i_nWidth, long i_nHeight, Window* i_pConfigureWin ) +{ + Rectangle aScreenRect; + if( Application::IsMultiDisplay() ) + { + aScreenRect = Application::GetScreenPosSizePixel( GetScreenNumber() ); + } + else + { + aScreenRect = Application::GetScreenPosSizePixel( 0 ); + for( unsigned int i = 1; i < Application::GetScreenCount(); i++ ) + aScreenRect.Union( Application::GetScreenPosSizePixel( i ) ); + } + // unfortunately most of the time width and height are not really known + if( i_nWidth < 1 ) + i_nWidth = 50; + if( i_nHeight < 1 ) + i_nHeight = 50; + + // check left border + bool bMove = false; + if( io_rX + i_nWidth < aScreenRect.Left() ) + { + bMove = true; + io_rX = aScreenRect.Left(); + } + // check right border + if( io_rX > aScreenRect.Right() - i_nWidth ) + { + bMove = true; + io_rX = aScreenRect.Right() - i_nWidth; + } + // check top border + if( io_rY + i_nHeight < aScreenRect.Top() ) + { + bMove = true; + io_rY = aScreenRect.Top(); + } + // check bottom border + if( io_rY > aScreenRect.Bottom() - i_nHeight ) + { + bMove = true; + io_rY = aScreenRect.Bottom() - i_nHeight; + } + Window* pParent = i_pConfigureWin->GetParent(); + if( bMove && pParent ) + { + // calculate absolute screen pos here, since that is what is contained in WindowState + Point aParentAbsPos( pParent->OutputToAbsoluteScreenPixel( Point(0,0) ) ); + Size aParentSizePixel( pParent->GetOutputSizePixel() ); + Point aPos( (aParentSizePixel.Width() - i_nWidth) / 2, + (aParentSizePixel.Height() - i_nHeight) / 2 ); + io_rX = aParentAbsPos.X() + aPos.X(); + io_rY = aParentAbsPos.Y() + aPos.Y(); + } +} + void SystemWindow::SetWindowStateData( const WindowStateData& rData ) { ULONG nValidMask = rData.GetMask(); @@ -701,6 +758,10 @@ void SystemWindow::SetWindowStateData( const WindowStateData& rData ) //nState &= ~(WINDOWSTATE_STATE_MINIMIZED); aState.mnState = nState & SAL_FRAMESTATE_SYSTEMMASK; + // normalize window positions onto screen + ImplMoveToScreen( aState.mnX, aState.mnY, aState.mnWidth, aState.mnHeight, pWindow ); + ImplMoveToScreen( aState.mnMaximizedX, aState.mnMaximizedY, aState.mnMaximizedWidth, aState.mnMaximizedHeight, pWindow ); + // #96568# avoid having multiple frames at the same screen location // do the check only if not maximized if( !((rData.GetMask() & WINDOWSTATE_MASK_STATE) && (nState & WINDOWSTATE_STATE_MAXIMIZED)) ) -- cgit v1.2.3 From e494bb1b4549f170f1909c3958900335d075f40c Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Wed, 5 May 2010 10:46:06 +0200 Subject: os141: background handling: ue a reasonable default background (so we don not rely on the magic in Window::ImplInit), and propagate background changes from the TableControl to its DataWindow --- svtools/source/table/tablecontrol.cxx | 38 ++++++++++++++++++++++++++++++++ svtools/source/table/tabledatawindow.cxx | 5 +++++ svtools/source/uno/svtxgridcontrol.cxx | 12 ++++++++++ 3 files changed, 55 insertions(+) diff --git a/svtools/source/table/tablecontrol.cxx b/svtools/source/table/tablecontrol.cxx index 2e7b28fd6aa4..1770bfd7dd02 100644 --- a/svtools/source/table/tablecontrol.cxx +++ b/svtools/source/table/tablecontrol.cxx @@ -76,6 +76,11 @@ namespace svt { namespace table aTableData->SetMouseButtonUpHdl( LINK( this, TableControl, ImplMouseButtonUpHdl ) ); aTableData->SetSelectHdl( LINK( this, TableControl, ImplSelectHdl ) ); m_pAccessTable.reset(new ::svt::table::AccessibleTableControl_Impl()); + + // by default, use the background as determined by the style settings + const Color aWindowColor( GetSettings().GetStyleSettings().GetFieldColor() ); + SetBackground( Wallpaper( aWindowColor ) ); + SetFillColor( aWindowColor ); } //-------------------------------------------------------------------- @@ -120,6 +125,39 @@ namespace svt { namespace table } } } + + + //-------------------------------------------------------------------- + void TableControl::StateChanged( StateChangedType i_nStateChange ) + { + Control::StateChanged( i_nStateChange ); + + // forward certain settings to the data window + switch ( i_nStateChange ) + { + case STATE_CHANGE_CONTROLBACKGROUND: + if ( IsControlBackground() ) + getDataWindow()->SetControlBackground( GetControlBackground() ); + else + getDataWindow()->SetControlBackground(); + break; + + case STATE_CHANGE_CONTROLFOREGROUND: + if ( IsControlForeground() ) + getDataWindow()->SetControlForeground( GetControlForeground() ); + else + getDataWindow()->SetControlForeground(); + break; + + case STATE_CHANGE_CONTROLFONT: + if ( IsControlFont() ) + getDataWindow()->SetControlFont( GetControlFont() ); + else + getDataWindow()->SetControlFont(); + break; + } + } + //-------------------------------------------------------------------- void TableControl::Resize() { diff --git a/svtools/source/table/tabledatawindow.cxx b/svtools/source/table/tabledatawindow.cxx index e307071e2699..3245b7e84aac 100644 --- a/svtools/source/table/tabledatawindow.cxx +++ b/svtools/source/table/tabledatawindow.cxx @@ -47,6 +47,10 @@ namespace svt { namespace table ,m_rTableControl ( _rTableControl ) ,m_nRowAlreadySelected( -1 ) { + // by default, use the background as determined by the style settings + const Color aWindowColor( GetSettings().GetStyleSettings().GetFieldColor() ); + SetBackground( Wallpaper( aWindowColor ) ); + SetFillColor( aWindowColor ); } //-------------------------------------------------------------------- @@ -54,6 +58,7 @@ namespace svt { namespace table { m_rTableControl.doPaintContent( rUpdateRect ); } + //-------------------------------------------------------------------- void TableDataWindow::MouseMove( const MouseEvent& rMEvt ) { diff --git a/svtools/source/uno/svtxgridcontrol.cxx b/svtools/source/uno/svtxgridcontrol.cxx index 728ee17bbda2..1514d585cd98 100755 --- a/svtools/source/uno/svtxgridcontrol.cxx +++ b/svtools/source/uno/svtxgridcontrol.cxx @@ -129,6 +129,18 @@ void SVTXGridControl::setProperty( const ::rtl::OUString& PropertyName, const An TableControl* pTable = (TableControl*)GetWindow(); switch( GetPropertyId( PropertyName ) ) { + case BASEPROPERTY_BACKGROUNDCOLOR: + { + // let the base class handle this for the TableControl + VCLXWindow::setProperty( PropertyName, aValue ); + // and forward to the grid control's data window + if ( pTable->IsBackground() ) + pTable->getDataWindow()->SetBackground( pTable->GetBackground() ); + else + pTable->getDataWindow()->SetBackground(); + } + break; + case BASEPROPERTY_GRID_SELECTIONMODE: { SelectionType eSelectionType; -- cgit v1.2.3 From a18ceca0a76f0b8d36d2e377dc929c8cea90c7fd Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Wed, 5 May 2010 10:49:44 +0200 Subject: os141: background handling: ue a reasonable default background (so we don not rely on the magic in Window::ImplInit), and propagate background changes from the TableControl to its DataWindow --- svtools/inc/svtools/table/tablecontrol.hxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/svtools/inc/svtools/table/tablecontrol.hxx b/svtools/inc/svtools/table/tablecontrol.hxx index 6419446d03be..6eb7f063f9fa 100644 --- a/svtools/inc/svtools/table/tablecontrol.hxx +++ b/svtools/inc/svtools/table/tablecontrol.hxx @@ -177,7 +177,7 @@ namespace svt { namespace table virtual void GetFocus(); virtual void LoseFocus(); virtual void KeyInput( const KeyEvent& rKEvt ); - //virtual long Notify(NotifyEvent& rNEvt); + virtual void StateChanged( StateChangedType i_nStateChange ); /** Creates and returns the accessible object of the whole GridControl. */ SVT_DLLPRIVATE virtual XACC CreateAccessible(); -- cgit v1.2.3 From c59fc0d76cacdaaf1c1cdd4e8b820acb42f8b4d1 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Wed, 5 May 2010 12:27:19 +0200 Subject: os141: do not consume COMMAND_CONTEXTMENU command events when not handled, otherwise they will not be propagated to the VCLXwindow, which means UNO listeners cannot handle them --- svtools/source/contnr/svimpbox.cxx | 42 +++++++++++++++++++++++++------------- svtools/source/contnr/svlbox.cxx | 3 ++- svtools/source/contnr/svtreebx.cxx | 3 ++- svtools/source/inc/svimpbox.hxx | 2 +- 4 files changed, 33 insertions(+), 17 deletions(-) diff --git a/svtools/source/contnr/svimpbox.cxx b/svtools/source/contnr/svimpbox.cxx index 671b5a9f54e5..7111a29a6a8a 100644 --- a/svtools/source/contnr/svimpbox.cxx +++ b/svtools/source/contnr/svimpbox.cxx @@ -3115,7 +3115,7 @@ void lcl_DeleteSubPopups(PopupMenu* pPopup) } } -void SvImpLBox::Command( const CommandEvent& rCEvt ) +bool SvImpLBox::Command( const CommandEvent& rCEvt ) { USHORT nCommand = rCEvt.GetCommand(); @@ -3123,9 +3123,22 @@ void SvImpLBox::Command( const CommandEvent& rCEvt ) aEditTimer.Stop(); // Rollmaus-Event? - if( ( ( nCommand == COMMAND_WHEEL ) || ( nCommand == COMMAND_STARTAUTOSCROLL ) || ( nCommand == COMMAND_AUTOSCROLL ) ) - && pView->HandleScrollCommand( rCEvt, &aHorSBar, &aVerSBar ) ) - return; + if ( ( ( nCommand == COMMAND_WHEEL ) + || ( nCommand == COMMAND_STARTAUTOSCROLL ) + || ( nCommand == COMMAND_AUTOSCROLL ) + ) + && pView->HandleScrollCommand( rCEvt, &aHorSBar, &aVerSBar ) + ) + { + return true; + } + + if ( ( nCommand == COMMAND_CONTEXTMENU ) + && !bContextMenuHandling + ) + { + return false; + } if( bContextMenuHandling && nCommand == COMMAND_CONTEXTMENU ) { @@ -3174,8 +3187,6 @@ void SvImpLBox::Command( const CommandEvent& rCEvt ) { // deselect all pView->SelectAll( FALSE ); } - - } else { // key event (or at least no mouse event) @@ -3235,15 +3246,18 @@ void SvImpLBox::Command( const CommandEvent& rCEvt ) aSelRestore.pop(); } } + return true; } -#ifndef NOCOMMAND - else - { - const Point& rPos = rCEvt.GetMousePosPixel(); - if( rPos.X() < aOutputSize.Width() && rPos.Y() < aOutputSize.Height() ) - aSelEng.Command( rCEvt ); - } -#endif + + const Point& rPos = rCEvt.GetMousePosPixel(); + if( rPos.X() < aOutputSize.Width() && rPos.Y() < aOutputSize.Height() ) + aSelEng.Command( rCEvt ); + + // strictly, this is not correct. However, it leads to a behavior compatible to the one at the time + // when this method did have a void return value ... + // A proper solution would be to give the EditEngine::Command also a boolean return value, and forward + // this (or false) to our caller + return true; } void SvImpLBox::BeginScroll() diff --git a/svtools/source/contnr/svlbox.cxx b/svtools/source/contnr/svlbox.cxx index 2752e813052e..dd19879e73b7 100644 --- a/svtools/source/contnr/svlbox.cxx +++ b/svtools/source/contnr/svlbox.cxx @@ -1515,9 +1515,10 @@ void SvLBox::MakeVisible( SvLBoxEntry* ) DBG_CHKTHIS(SvLBox,0); } -void SvLBox::Command( const CommandEvent& ) +void SvLBox::Command( const CommandEvent& i_rCommandEvent ) { DBG_CHKTHIS(SvLBox,0); + Control::Command( i_rCommandEvent ); } void SvLBox::KeyInput( const KeyEvent& rKEvt ) diff --git a/svtools/source/contnr/svtreebx.cxx b/svtools/source/contnr/svtreebx.cxx index 736f27a1eafb..9f599cbdb22e 100644 --- a/svtools/source/contnr/svtreebx.cxx +++ b/svtools/source/contnr/svtreebx.cxx @@ -2250,7 +2250,8 @@ Region SvTreeListBox::GetDragRegion() const void SvTreeListBox::Command( const CommandEvent& rCEvt ) { DBG_CHKTHIS(SvTreeListBox,0); - pImp->Command( rCEvt ); + if ( !pImp->Command( rCEvt ) ) + SvLBox::Command( rCEvt ); } diff --git a/svtools/source/inc/svimpbox.hxx b/svtools/source/inc/svimpbox.hxx index cde986b3cb7d..92b9f960b65c 100644 --- a/svtools/source/inc/svimpbox.hxx +++ b/svtools/source/inc/svimpbox.hxx @@ -340,7 +340,7 @@ public: const Size& GetOutputSize() const { return aOutputSize;} void KeyUp( BOOL bPageUp, BOOL bNotifyScroll = TRUE ); void KeyDown( BOOL bPageDown, BOOL bNotifyScroll = TRUE ); - void Command( const CommandEvent& rCEvt ); + bool Command( const CommandEvent& rCEvt ); void Invalidate(); void DestroyAnchor() { pAnchor=0; aSelEng.Reset(); } -- cgit v1.2.3 From 69e661370538571d578552757bde5998c9d52fdf Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Wed, 5 May 2010 12:29:29 +0200 Subject: os141: do not crash on NULL Windows passed to ::Execute --- vcl/source/window/menu.cxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx index ddfb1125d0d7..cebe1d1f596c 100644 --- a/vcl/source/window/menu.cxx +++ b/vcl/source/window/menu.cxx @@ -32,6 +32,7 @@ #include "vcl/salinst.hxx" #include "tools/list.hxx" #include "tools/debug.hxx" +#include "tools/diagnose_ex.h" #include "vcl/svdata.hxx" #include "vcl/svapp.hxx" #include "vcl/mnemonic.hxx" @@ -3464,6 +3465,9 @@ USHORT PopupMenu::Execute( Window* pExecWindow, const Point& rPopupPos ) USHORT PopupMenu::Execute( Window* pExecWindow, const Rectangle& rRect, USHORT nFlags ) { + ENSURE_OR_RETURN( pExecWindow, "PopupMenu::Execute: need a non-NULL window!", 0 ); + + ULONG nPopupModeFlags = 0; if ( nFlags & POPUPMENU_EXECUTE_DOWN ) nPopupModeFlags = FLOATWIN_POPUPMODE_DOWN; -- cgit v1.2.3 From 6a909277d937b2d809d1baaee51f94795405d3a8 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Wed, 5 May 2010 13:49:53 +0200 Subject: os141: added XTreeControl::getNodeRect --- svtools/source/uno/treecontrolpeer.cxx | 14 ++++++++++++++ svtools/source/uno/treecontrolpeer.hxx | 1 + toolkit/source/controls/tree/treecontrol.cxx | 7 +++++++ toolkit/source/controls/tree/treecontrol.hxx | 1 + 4 files changed, 23 insertions(+) diff --git a/svtools/source/uno/treecontrolpeer.cxx b/svtools/source/uno/treecontrolpeer.cxx index 70ffe67b7759..7c202e3b2bdf 100644 --- a/svtools/source/uno/treecontrolpeer.cxx +++ b/svtools/source/uno/treecontrolpeer.cxx @@ -34,6 +34,7 @@ #include #include #include +#include #include #include @@ -922,6 +923,19 @@ Reference< XTreeNode > SAL_CALL TreeControlPeer::getClosestNodeForLocation( sal_ // ------------------------------------------------------------------- +awt::Rectangle SAL_CALL TreeControlPeer::getNodeRect( const Reference< XTreeNode >& i_Node ) throw (IllegalArgumentException, RuntimeException) +{ + ::vos::OGuard aGuard( GetMutex() ); + + UnoTreeListBoxImpl& rTree = getTreeListBoxOrThrow(); + UnoTreeListEntry* pEntry = getEntry( i_Node, true ); + + ::Rectangle aEntryRect( rTree.GetFocusRect( pEntry, rTree.GetEntryPosition( pEntry ).Y() ) ); + return VCLUnoHelper::ConvertToAWTRect( aEntryRect ); +} + +// ------------------------------------------------------------------- + sal_Bool SAL_CALL TreeControlPeer::isEditing( ) throw (RuntimeException) { ::vos::OGuard aGuard( GetMutex() ); diff --git a/svtools/source/uno/treecontrolpeer.hxx b/svtools/source/uno/treecontrolpeer.hxx index 015e131321f8..336830804a6f 100644 --- a/svtools/source/uno/treecontrolpeer.hxx +++ b/svtools/source/uno/treecontrolpeer.hxx @@ -91,6 +91,7 @@ public: virtual void SAL_CALL removeTreeExpansionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::tree::XTreeExpansionListener >& Listener ) throw (::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::tree::XTreeNode > SAL_CALL getNodeForLocation( ::sal_Int32 x, ::sal_Int32 y ) throw (::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::tree::XTreeNode > SAL_CALL getClosestNodeForLocation( ::sal_Int32 x, ::sal_Int32 y ) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::awt::Rectangle SAL_CALL getNodeRect( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::tree::XTreeNode >& Node ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); virtual ::sal_Bool SAL_CALL isEditing( ) throw (::com::sun::star::uno::RuntimeException); virtual ::sal_Bool SAL_CALL stopEditing( ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL cancelEditing( ) throw (::com::sun::star::uno::RuntimeException); diff --git a/toolkit/source/controls/tree/treecontrol.cxx b/toolkit/source/controls/tree/treecontrol.cxx index f70a73c3b5eb..8606792fdf2f 100644 --- a/toolkit/source/controls/tree/treecontrol.cxx +++ b/toolkit/source/controls/tree/treecontrol.cxx @@ -362,6 +362,13 @@ Reference< XTreeNode > SAL_CALL UnoTreeControl::getClosestNodeForLocation( sal_I // ------------------------------------------------------------------- +awt::Rectangle SAL_CALL UnoTreeControl::getNodeRect( const Reference< XTreeNode >& Node ) throw (IllegalArgumentException, RuntimeException) +{ + return Reference< XTreeControl >( getPeer(), UNO_QUERY_THROW )->getNodeRect( Node ); +} + +// ------------------------------------------------------------------- + sal_Bool SAL_CALL UnoTreeControl::isEditing( ) throw (RuntimeException) { return Reference< XTreeControl >( getPeer(), UNO_QUERY_THROW )->isEditing(); diff --git a/toolkit/source/controls/tree/treecontrol.hxx b/toolkit/source/controls/tree/treecontrol.hxx index 0cae86616aa4..e646664c4a64 100644 --- a/toolkit/source/controls/tree/treecontrol.hxx +++ b/toolkit/source/controls/tree/treecontrol.hxx @@ -114,6 +114,7 @@ public: virtual void SAL_CALL removeTreeExpansionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::tree::XTreeExpansionListener >& Listener ) throw (::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::tree::XTreeNode > SAL_CALL getNodeForLocation( ::sal_Int32 x, ::sal_Int32 y ) throw (::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::tree::XTreeNode > SAL_CALL getClosestNodeForLocation( ::sal_Int32 x, ::sal_Int32 y ) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::awt::Rectangle SAL_CALL getNodeRect( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::tree::XTreeNode >& Node ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); virtual ::sal_Bool SAL_CALL isEditing( ) throw (::com::sun::star::uno::RuntimeException); virtual ::sal_Bool SAL_CALL stopEditing( ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL cancelEditing( ) throw (::com::sun::star::uno::RuntimeException); -- cgit v1.2.3 From 9a40f47ebf9f07f5cae092ddd84280c2e21e515f Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Wed, 5 May 2010 13:49:53 +0200 Subject: os141: added XTreeControl::getNodeRect --- offapi/com/sun/star/awt/tree/XTreeControl.idl | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/offapi/com/sun/star/awt/tree/XTreeControl.idl b/offapi/com/sun/star/awt/tree/XTreeControl.idl index a65b9eece27f..a5341257ba45 100644 --- a/offapi/com/sun/star/awt/tree/XTreeControl.idl +++ b/offapi/com/sun/star/awt/tree/XTreeControl.idl @@ -219,6 +219,17 @@ interface XTreeControl */ XTreeNode getClosestNodeForLocation( [in] long x, [in] long y ); + /** returns the rectangle occupied by the visual representation of the given node + + @param Node + the node whose geometry should be obtained + @throws ::com::sun::star::lang::IllegalArgumentException + if the given node is , or does not belong to the tree's data model + */ + ::com::sun::star::awt::Rectangle + getNodeRect( [in] XTreeNode Node ) + raises( ::com::sun::star::lang::IllegalArgumentException ); + // ------------ // tree editing // ------------ -- cgit v1.2.3 From 119f78a4d99618ae1e788d70cd8aab012cf81d34 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Wed, 5 May 2010 14:06:24 +0200 Subject: os141: also accept the brand-new vnd.sun.star.ext:// URL scheme --- svtools/source/misc/imageresourceaccess.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/svtools/source/misc/imageresourceaccess.cxx b/svtools/source/misc/imageresourceaccess.cxx index 6481adc8c671..436c3f721833 100644 --- a/svtools/source/misc/imageresourceaccess.cxx +++ b/svtools/source/misc/imageresourceaccess.cxx @@ -48,8 +48,6 @@ namespace svt { //........................................................................ -#define GRAPHOBJ_URLPREFIX "vnd.sun.star.GraphicObject:" - using namespace ::utl; using namespace ::comphelper; using namespace ::com::sun::star::io; @@ -144,7 +142,8 @@ namespace svt if ( ( _rURL.indexOfAsciiL( RTL_CONSTASCII_STRINGPARAM( "private:resource/" ) ) == 0 ) || ( _rURL.indexOfAsciiL( RTL_CONSTASCII_STRINGPARAM( "private:graphicrepository/" ) ) == 0 ) || ( _rURL.indexOfAsciiL( RTL_CONSTASCII_STRINGPARAM( "private:standardimage/" ) ) == 0 ) - || ( _rURL.compareToAscii( GRAPHOBJ_URLPREFIX, RTL_CONSTASCII_LENGTH( GRAPHOBJ_URLPREFIX ) ) == 0 ) + || ( _rURL.indexOfAsciiL( RTL_CONSTASCII_STRINGPARAM( "vnd.sun.star.GraphicObject:" ) ) == 0 ) + || ( _rURL.indexOfAsciiL( RTL_CONSTASCII_STRINGPARAM( "vnd.sun.star.extension://" ) ) == 0 ) ) return true; return false; -- cgit v1.2.3 From ab9908fa29246f0a310c6ff319b91583e9b61da5 Mon Sep 17 00:00:00 2001 From: Christian Lippka Date: Wed, 5 May 2010 14:21:14 +0200 Subject: #i102023# use LogicToPagePos conversion for snap lines and points --- sd/source/ui/func/fusnapln.cxx | 1 + 1 file changed, 1 insertion(+) mode change 100644 => 100755 sd/source/ui/func/fusnapln.cxx diff --git a/sd/source/ui/func/fusnapln.cxx b/sd/source/ui/func/fusnapln.cxx old mode 100644 new mode 100755 index ab686481b402..fad1cb324fd2 --- a/sd/source/ui/func/fusnapln.cxx +++ b/sd/source/ui/func/fusnapln.cxx @@ -123,6 +123,7 @@ void FuSnapLine::DoExecute( SfxRequest& rReq ) { OSL_ASSERT(pPV!=NULL); aLinePos = (pPV->GetHelpLines())[nHelpLine].GetPos(); + pPV->LogicToPagePos(aLinePos); bLineExist = true; } aNewAttr.Put(SfxUInt32Item(ATTR_SNAPLINE_X, aLinePos.X())); -- cgit v1.2.3 From 1875ea687b2c5c45fe3df626c05ca5f483417269 Mon Sep 17 00:00:00 2001 From: Christian Lippka Date: Wed, 5 May 2010 16:36:37 +0200 Subject: #i87750# removed insert sound&video from menu --- sd/uiconfig/sdraw/menubar/menubar.xml | 2 -- sd/uiconfig/sdraw/statusbar/statusbar.xml | 0 sd/uiconfig/sdraw/toolbar/3dobjectsbar.xml | 0 sd/uiconfig/sdraw/toolbar/alignmentbar.xml | 0 sd/uiconfig/sdraw/toolbar/arrowsbar.xml | 0 sd/uiconfig/sdraw/toolbar/arrowshapes.xml | 0 sd/uiconfig/sdraw/toolbar/basicshapes.xml | 0 sd/uiconfig/sdraw/toolbar/bezierobjectbar.xml | 0 sd/uiconfig/sdraw/toolbar/calloutshapes.xml | 0 sd/uiconfig/sdraw/toolbar/choosemodebar.xml | 0 sd/uiconfig/sdraw/toolbar/colorbar.xml | 0 sd/uiconfig/sdraw/toolbar/commentsbar.xml | 0 sd/uiconfig/sdraw/toolbar/connectorsbar.xml | 0 sd/uiconfig/sdraw/toolbar/drawingobjectbar.xml | 0 sd/uiconfig/sdraw/toolbar/ellipsesbar.xml | 0 sd/uiconfig/sdraw/toolbar/extrusionobjectbar.xml | 0 sd/uiconfig/sdraw/toolbar/flowchartshapes.xml | 0 sd/uiconfig/sdraw/toolbar/fontworkobjectbar.xml | 0 sd/uiconfig/sdraw/toolbar/fontworkshapetype.xml | 0 sd/uiconfig/sdraw/toolbar/formcontrols.xml | 0 sd/uiconfig/sdraw/toolbar/formdesign.xml | 0 sd/uiconfig/sdraw/toolbar/formsfilterbar.xml | 0 sd/uiconfig/sdraw/toolbar/formsnavigationbar.xml | 0 sd/uiconfig/sdraw/toolbar/formtextobjectbar.xml | 0 sd/uiconfig/sdraw/toolbar/fullscreenbar.xml | 0 sd/uiconfig/sdraw/toolbar/gluepointsobjectbar.xml | 0 sd/uiconfig/sdraw/toolbar/graffilterbar.xml | 0 sd/uiconfig/sdraw/toolbar/graphicobjectbar.xml | 0 sd/uiconfig/sdraw/toolbar/insertbar.xml | 0 sd/uiconfig/sdraw/toolbar/linesbar.xml | 0 sd/uiconfig/sdraw/toolbar/masterviewtoolbar.xml | 0 sd/uiconfig/sdraw/toolbar/mediaobjectbar.xml | 0 sd/uiconfig/sdraw/toolbar/moreformcontrols.xml | 0 sd/uiconfig/sdraw/toolbar/optimizetablebar.xml | 0 sd/uiconfig/sdraw/toolbar/optionsbar.xml | 0 sd/uiconfig/sdraw/toolbar/positionbar.xml | 0 sd/uiconfig/sdraw/toolbar/rectanglesbar.xml | 0 sd/uiconfig/sdraw/toolbar/standardbar.xml | 0 sd/uiconfig/sdraw/toolbar/starshapes.xml | 0 sd/uiconfig/sdraw/toolbar/symbolshapes.xml | 0 sd/uiconfig/sdraw/toolbar/tableobjectbar.xml | 0 sd/uiconfig/sdraw/toolbar/textbar.xml | 0 sd/uiconfig/sdraw/toolbar/textobjectbar.xml | 0 sd/uiconfig/sdraw/toolbar/toolbar.xml | 0 sd/uiconfig/sdraw/toolbar/viewerbar.xml | 0 sd/uiconfig/sdraw/toolbar/zoombar.xml | 0 sd/uiconfig/simpress/menubar/menubar.xml | 2 -- sd/uiconfig/simpress/statusbar/statusbar.xml | 0 sd/uiconfig/simpress/toolbar/3dobjectsbar.xml | 0 sd/uiconfig/simpress/toolbar/alignmentbar.xml | 0 sd/uiconfig/simpress/toolbar/arrowsbar.xml | 0 sd/uiconfig/simpress/toolbar/arrowshapes.xml | 0 sd/uiconfig/simpress/toolbar/basicshapes.xml | 0 sd/uiconfig/simpress/toolbar/bezierobjectbar.xml | 0 sd/uiconfig/simpress/toolbar/calloutshapes.xml | 0 sd/uiconfig/simpress/toolbar/choosemodebar.xml | 0 sd/uiconfig/simpress/toolbar/colorbar.xml | 0 sd/uiconfig/simpress/toolbar/commentsbar.xml | 0 sd/uiconfig/simpress/toolbar/commontaskbar.xml | 0 sd/uiconfig/simpress/toolbar/connectorsbar.xml | 0 sd/uiconfig/simpress/toolbar/drawingobjectbar.xml | 0 sd/uiconfig/simpress/toolbar/ellipsesbar.xml | 0 sd/uiconfig/simpress/toolbar/extrusionobjectbar.xml | 0 sd/uiconfig/simpress/toolbar/flowchartshapes.xml | 0 sd/uiconfig/simpress/toolbar/fontworkobjectbar.xml | 0 sd/uiconfig/simpress/toolbar/fontworkshapetype.xml | 0 sd/uiconfig/simpress/toolbar/formcontrols.xml | 0 sd/uiconfig/simpress/toolbar/formdesign.xml | 0 sd/uiconfig/simpress/toolbar/formsfilterbar.xml | 0 sd/uiconfig/simpress/toolbar/formsnavigationbar.xml | 0 sd/uiconfig/simpress/toolbar/formtextobjectbar.xml | 0 sd/uiconfig/simpress/toolbar/fullscreenbar.xml | 0 sd/uiconfig/simpress/toolbar/gluepointsobjectbar.xml | 0 sd/uiconfig/simpress/toolbar/graffilterbar.xml | 0 sd/uiconfig/simpress/toolbar/graphicobjectbar.xml | 0 sd/uiconfig/simpress/toolbar/insertbar.xml | 0 sd/uiconfig/simpress/toolbar/linesbar.xml | 0 sd/uiconfig/simpress/toolbar/masterviewtoolbar.xml | 0 sd/uiconfig/simpress/toolbar/mediaobjectbar.xml | 0 sd/uiconfig/simpress/toolbar/moreformcontrols.xml | 0 sd/uiconfig/simpress/toolbar/optimizetablebar.xml | 0 sd/uiconfig/simpress/toolbar/optionsbar.xml | 0 sd/uiconfig/simpress/toolbar/outlinetoolbar.xml | 0 sd/uiconfig/simpress/toolbar/positionbar.xml | 0 sd/uiconfig/simpress/toolbar/rectanglesbar.xml | 0 sd/uiconfig/simpress/toolbar/slideviewobjectbar.xml | 0 sd/uiconfig/simpress/toolbar/slideviewtoolbar.xml | 0 sd/uiconfig/simpress/toolbar/standardbar.xml | 0 sd/uiconfig/simpress/toolbar/starshapes.xml | 0 sd/uiconfig/simpress/toolbar/symbolshapes.xml | 0 sd/uiconfig/simpress/toolbar/tableobjectbar.xml | 0 sd/uiconfig/simpress/toolbar/textbar.xml | 0 sd/uiconfig/simpress/toolbar/textobjectbar.xml | 0 sd/uiconfig/simpress/toolbar/toolbar.xml | 0 sd/uiconfig/simpress/toolbar/viewerbar.xml | 0 sd/uiconfig/simpress/toolbar/zoombar.xml | 0 96 files changed, 4 deletions(-) mode change 100644 => 100755 sd/uiconfig/sdraw/menubar/menubar.xml mode change 100644 => 100755 sd/uiconfig/sdraw/statusbar/statusbar.xml mode change 100644 => 100755 sd/uiconfig/sdraw/toolbar/3dobjectsbar.xml mode change 100644 => 100755 sd/uiconfig/sdraw/toolbar/alignmentbar.xml mode change 100644 => 100755 sd/uiconfig/sdraw/toolbar/arrowsbar.xml mode change 100644 => 100755 sd/uiconfig/sdraw/toolbar/arrowshapes.xml mode change 100644 => 100755 sd/uiconfig/sdraw/toolbar/basicshapes.xml mode change 100644 => 100755 sd/uiconfig/sdraw/toolbar/bezierobjectbar.xml mode change 100644 => 100755 sd/uiconfig/sdraw/toolbar/calloutshapes.xml mode change 100644 => 100755 sd/uiconfig/sdraw/toolbar/choosemodebar.xml mode change 100644 => 100755 sd/uiconfig/sdraw/toolbar/colorbar.xml mode change 100644 => 100755 sd/uiconfig/sdraw/toolbar/commentsbar.xml mode change 100644 => 100755 sd/uiconfig/sdraw/toolbar/connectorsbar.xml mode change 100644 => 100755 sd/uiconfig/sdraw/toolbar/drawingobjectbar.xml mode change 100644 => 100755 sd/uiconfig/sdraw/toolbar/ellipsesbar.xml mode change 100644 => 100755 sd/uiconfig/sdraw/toolbar/extrusionobjectbar.xml mode change 100644 => 100755 sd/uiconfig/sdraw/toolbar/flowchartshapes.xml mode change 100644 => 100755 sd/uiconfig/sdraw/toolbar/fontworkobjectbar.xml mode change 100644 => 100755 sd/uiconfig/sdraw/toolbar/fontworkshapetype.xml mode change 100644 => 100755 sd/uiconfig/sdraw/toolbar/formcontrols.xml mode change 100644 => 100755 sd/uiconfig/sdraw/toolbar/formdesign.xml mode change 100644 => 100755 sd/uiconfig/sdraw/toolbar/formsfilterbar.xml mode change 100644 => 100755 sd/uiconfig/sdraw/toolbar/formsnavigationbar.xml mode change 100644 => 100755 sd/uiconfig/sdraw/toolbar/formtextobjectbar.xml mode change 100644 => 100755 sd/uiconfig/sdraw/toolbar/fullscreenbar.xml mode change 100644 => 100755 sd/uiconfig/sdraw/toolbar/gluepointsobjectbar.xml mode change 100644 => 100755 sd/uiconfig/sdraw/toolbar/graffilterbar.xml mode change 100644 => 100755 sd/uiconfig/sdraw/toolbar/graphicobjectbar.xml mode change 100644 => 100755 sd/uiconfig/sdraw/toolbar/insertbar.xml mode change 100644 => 100755 sd/uiconfig/sdraw/toolbar/linesbar.xml mode change 100644 => 100755 sd/uiconfig/sdraw/toolbar/masterviewtoolbar.xml mode change 100644 => 100755 sd/uiconfig/sdraw/toolbar/mediaobjectbar.xml mode change 100644 => 100755 sd/uiconfig/sdraw/toolbar/moreformcontrols.xml mode change 100644 => 100755 sd/uiconfig/sdraw/toolbar/optimizetablebar.xml mode change 100644 => 100755 sd/uiconfig/sdraw/toolbar/optionsbar.xml mode change 100644 => 100755 sd/uiconfig/sdraw/toolbar/positionbar.xml mode change 100644 => 100755 sd/uiconfig/sdraw/toolbar/rectanglesbar.xml mode change 100644 => 100755 sd/uiconfig/sdraw/toolbar/standardbar.xml mode change 100644 => 100755 sd/uiconfig/sdraw/toolbar/starshapes.xml mode change 100644 => 100755 sd/uiconfig/sdraw/toolbar/symbolshapes.xml mode change 100644 => 100755 sd/uiconfig/sdraw/toolbar/tableobjectbar.xml mode change 100644 => 100755 sd/uiconfig/sdraw/toolbar/textbar.xml mode change 100644 => 100755 sd/uiconfig/sdraw/toolbar/textobjectbar.xml mode change 100644 => 100755 sd/uiconfig/sdraw/toolbar/toolbar.xml mode change 100644 => 100755 sd/uiconfig/sdraw/toolbar/viewerbar.xml mode change 100644 => 100755 sd/uiconfig/sdraw/toolbar/zoombar.xml mode change 100644 => 100755 sd/uiconfig/simpress/menubar/menubar.xml mode change 100644 => 100755 sd/uiconfig/simpress/statusbar/statusbar.xml mode change 100644 => 100755 sd/uiconfig/simpress/toolbar/3dobjectsbar.xml mode change 100644 => 100755 sd/uiconfig/simpress/toolbar/alignmentbar.xml mode change 100644 => 100755 sd/uiconfig/simpress/toolbar/arrowsbar.xml mode change 100644 => 100755 sd/uiconfig/simpress/toolbar/arrowshapes.xml mode change 100644 => 100755 sd/uiconfig/simpress/toolbar/basicshapes.xml mode change 100644 => 100755 sd/uiconfig/simpress/toolbar/bezierobjectbar.xml mode change 100644 => 100755 sd/uiconfig/simpress/toolbar/calloutshapes.xml mode change 100644 => 100755 sd/uiconfig/simpress/toolbar/choosemodebar.xml mode change 100644 => 100755 sd/uiconfig/simpress/toolbar/colorbar.xml mode change 100644 => 100755 sd/uiconfig/simpress/toolbar/commentsbar.xml mode change 100644 => 100755 sd/uiconfig/simpress/toolbar/commontaskbar.xml mode change 100644 => 100755 sd/uiconfig/simpress/toolbar/connectorsbar.xml mode change 100644 => 100755 sd/uiconfig/simpress/toolbar/drawingobjectbar.xml mode change 100644 => 100755 sd/uiconfig/simpress/toolbar/ellipsesbar.xml mode change 100644 => 100755 sd/uiconfig/simpress/toolbar/extrusionobjectbar.xml mode change 100644 => 100755 sd/uiconfig/simpress/toolbar/flowchartshapes.xml mode change 100644 => 100755 sd/uiconfig/simpress/toolbar/fontworkobjectbar.xml mode change 100644 => 100755 sd/uiconfig/simpress/toolbar/fontworkshapetype.xml mode change 100644 => 100755 sd/uiconfig/simpress/toolbar/formcontrols.xml mode change 100644 => 100755 sd/uiconfig/simpress/toolbar/formdesign.xml mode change 100644 => 100755 sd/uiconfig/simpress/toolbar/formsfilterbar.xml mode change 100644 => 100755 sd/uiconfig/simpress/toolbar/formsnavigationbar.xml mode change 100644 => 100755 sd/uiconfig/simpress/toolbar/formtextobjectbar.xml mode change 100644 => 100755 sd/uiconfig/simpress/toolbar/fullscreenbar.xml mode change 100644 => 100755 sd/uiconfig/simpress/toolbar/gluepointsobjectbar.xml mode change 100644 => 100755 sd/uiconfig/simpress/toolbar/graffilterbar.xml mode change 100644 => 100755 sd/uiconfig/simpress/toolbar/graphicobjectbar.xml mode change 100644 => 100755 sd/uiconfig/simpress/toolbar/insertbar.xml mode change 100644 => 100755 sd/uiconfig/simpress/toolbar/linesbar.xml mode change 100644 => 100755 sd/uiconfig/simpress/toolbar/masterviewtoolbar.xml mode change 100644 => 100755 sd/uiconfig/simpress/toolbar/mediaobjectbar.xml mode change 100644 => 100755 sd/uiconfig/simpress/toolbar/moreformcontrols.xml mode change 100644 => 100755 sd/uiconfig/simpress/toolbar/optimizetablebar.xml mode change 100644 => 100755 sd/uiconfig/simpress/toolbar/optionsbar.xml mode change 100644 => 100755 sd/uiconfig/simpress/toolbar/outlinetoolbar.xml mode change 100644 => 100755 sd/uiconfig/simpress/toolbar/positionbar.xml mode change 100644 => 100755 sd/uiconfig/simpress/toolbar/rectanglesbar.xml mode change 100644 => 100755 sd/uiconfig/simpress/toolbar/slideviewobjectbar.xml mode change 100644 => 100755 sd/uiconfig/simpress/toolbar/slideviewtoolbar.xml mode change 100644 => 100755 sd/uiconfig/simpress/toolbar/standardbar.xml mode change 100644 => 100755 sd/uiconfig/simpress/toolbar/starshapes.xml mode change 100644 => 100755 sd/uiconfig/simpress/toolbar/symbolshapes.xml mode change 100644 => 100755 sd/uiconfig/simpress/toolbar/tableobjectbar.xml mode change 100644 => 100755 sd/uiconfig/simpress/toolbar/textbar.xml mode change 100644 => 100755 sd/uiconfig/simpress/toolbar/textobjectbar.xml mode change 100644 => 100755 sd/uiconfig/simpress/toolbar/toolbar.xml mode change 100644 => 100755 sd/uiconfig/simpress/toolbar/viewerbar.xml mode change 100644 => 100755 sd/uiconfig/simpress/toolbar/zoombar.xml diff --git a/sd/uiconfig/sdraw/menubar/menubar.xml b/sd/uiconfig/sdraw/menubar/menubar.xml old mode 100644 new mode 100755 index 9e5d927b263e..816f46a801b7 --- a/sd/uiconfig/sdraw/menubar/menubar.xml +++ b/sd/uiconfig/sdraw/menubar/menubar.xml @@ -163,8 +163,6 @@ - - diff --git a/sd/uiconfig/sdraw/statusbar/statusbar.xml b/sd/uiconfig/sdraw/statusbar/statusbar.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/sdraw/toolbar/3dobjectsbar.xml b/sd/uiconfig/sdraw/toolbar/3dobjectsbar.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/sdraw/toolbar/alignmentbar.xml b/sd/uiconfig/sdraw/toolbar/alignmentbar.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/sdraw/toolbar/arrowsbar.xml b/sd/uiconfig/sdraw/toolbar/arrowsbar.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/sdraw/toolbar/arrowshapes.xml b/sd/uiconfig/sdraw/toolbar/arrowshapes.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/sdraw/toolbar/basicshapes.xml b/sd/uiconfig/sdraw/toolbar/basicshapes.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/sdraw/toolbar/bezierobjectbar.xml b/sd/uiconfig/sdraw/toolbar/bezierobjectbar.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/sdraw/toolbar/calloutshapes.xml b/sd/uiconfig/sdraw/toolbar/calloutshapes.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/sdraw/toolbar/choosemodebar.xml b/sd/uiconfig/sdraw/toolbar/choosemodebar.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/sdraw/toolbar/colorbar.xml b/sd/uiconfig/sdraw/toolbar/colorbar.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/sdraw/toolbar/commentsbar.xml b/sd/uiconfig/sdraw/toolbar/commentsbar.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/sdraw/toolbar/connectorsbar.xml b/sd/uiconfig/sdraw/toolbar/connectorsbar.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/sdraw/toolbar/drawingobjectbar.xml b/sd/uiconfig/sdraw/toolbar/drawingobjectbar.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/sdraw/toolbar/ellipsesbar.xml b/sd/uiconfig/sdraw/toolbar/ellipsesbar.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/sdraw/toolbar/extrusionobjectbar.xml b/sd/uiconfig/sdraw/toolbar/extrusionobjectbar.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/sdraw/toolbar/flowchartshapes.xml b/sd/uiconfig/sdraw/toolbar/flowchartshapes.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/sdraw/toolbar/fontworkobjectbar.xml b/sd/uiconfig/sdraw/toolbar/fontworkobjectbar.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/sdraw/toolbar/fontworkshapetype.xml b/sd/uiconfig/sdraw/toolbar/fontworkshapetype.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/sdraw/toolbar/formcontrols.xml b/sd/uiconfig/sdraw/toolbar/formcontrols.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/sdraw/toolbar/formdesign.xml b/sd/uiconfig/sdraw/toolbar/formdesign.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/sdraw/toolbar/formsfilterbar.xml b/sd/uiconfig/sdraw/toolbar/formsfilterbar.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/sdraw/toolbar/formsnavigationbar.xml b/sd/uiconfig/sdraw/toolbar/formsnavigationbar.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/sdraw/toolbar/formtextobjectbar.xml b/sd/uiconfig/sdraw/toolbar/formtextobjectbar.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/sdraw/toolbar/fullscreenbar.xml b/sd/uiconfig/sdraw/toolbar/fullscreenbar.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/sdraw/toolbar/gluepointsobjectbar.xml b/sd/uiconfig/sdraw/toolbar/gluepointsobjectbar.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/sdraw/toolbar/graffilterbar.xml b/sd/uiconfig/sdraw/toolbar/graffilterbar.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/sdraw/toolbar/graphicobjectbar.xml b/sd/uiconfig/sdraw/toolbar/graphicobjectbar.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/sdraw/toolbar/insertbar.xml b/sd/uiconfig/sdraw/toolbar/insertbar.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/sdraw/toolbar/linesbar.xml b/sd/uiconfig/sdraw/toolbar/linesbar.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/sdraw/toolbar/masterviewtoolbar.xml b/sd/uiconfig/sdraw/toolbar/masterviewtoolbar.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/sdraw/toolbar/mediaobjectbar.xml b/sd/uiconfig/sdraw/toolbar/mediaobjectbar.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/sdraw/toolbar/moreformcontrols.xml b/sd/uiconfig/sdraw/toolbar/moreformcontrols.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/sdraw/toolbar/optimizetablebar.xml b/sd/uiconfig/sdraw/toolbar/optimizetablebar.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/sdraw/toolbar/optionsbar.xml b/sd/uiconfig/sdraw/toolbar/optionsbar.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/sdraw/toolbar/positionbar.xml b/sd/uiconfig/sdraw/toolbar/positionbar.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/sdraw/toolbar/rectanglesbar.xml b/sd/uiconfig/sdraw/toolbar/rectanglesbar.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/sdraw/toolbar/standardbar.xml b/sd/uiconfig/sdraw/toolbar/standardbar.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/sdraw/toolbar/starshapes.xml b/sd/uiconfig/sdraw/toolbar/starshapes.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/sdraw/toolbar/symbolshapes.xml b/sd/uiconfig/sdraw/toolbar/symbolshapes.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/sdraw/toolbar/tableobjectbar.xml b/sd/uiconfig/sdraw/toolbar/tableobjectbar.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/sdraw/toolbar/textbar.xml b/sd/uiconfig/sdraw/toolbar/textbar.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/sdraw/toolbar/textobjectbar.xml b/sd/uiconfig/sdraw/toolbar/textobjectbar.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/sdraw/toolbar/toolbar.xml b/sd/uiconfig/sdraw/toolbar/toolbar.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/sdraw/toolbar/viewerbar.xml b/sd/uiconfig/sdraw/toolbar/viewerbar.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/sdraw/toolbar/zoombar.xml b/sd/uiconfig/sdraw/toolbar/zoombar.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/simpress/menubar/menubar.xml b/sd/uiconfig/simpress/menubar/menubar.xml old mode 100644 new mode 100755 index c1dacd33e0c0..36e75e377cff --- a/sd/uiconfig/simpress/menubar/menubar.xml +++ b/sd/uiconfig/simpress/menubar/menubar.xml @@ -181,8 +181,6 @@ - - diff --git a/sd/uiconfig/simpress/statusbar/statusbar.xml b/sd/uiconfig/simpress/statusbar/statusbar.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/simpress/toolbar/3dobjectsbar.xml b/sd/uiconfig/simpress/toolbar/3dobjectsbar.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/simpress/toolbar/alignmentbar.xml b/sd/uiconfig/simpress/toolbar/alignmentbar.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/simpress/toolbar/arrowsbar.xml b/sd/uiconfig/simpress/toolbar/arrowsbar.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/simpress/toolbar/arrowshapes.xml b/sd/uiconfig/simpress/toolbar/arrowshapes.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/simpress/toolbar/basicshapes.xml b/sd/uiconfig/simpress/toolbar/basicshapes.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/simpress/toolbar/bezierobjectbar.xml b/sd/uiconfig/simpress/toolbar/bezierobjectbar.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/simpress/toolbar/calloutshapes.xml b/sd/uiconfig/simpress/toolbar/calloutshapes.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/simpress/toolbar/choosemodebar.xml b/sd/uiconfig/simpress/toolbar/choosemodebar.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/simpress/toolbar/colorbar.xml b/sd/uiconfig/simpress/toolbar/colorbar.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/simpress/toolbar/commentsbar.xml b/sd/uiconfig/simpress/toolbar/commentsbar.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/simpress/toolbar/commontaskbar.xml b/sd/uiconfig/simpress/toolbar/commontaskbar.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/simpress/toolbar/connectorsbar.xml b/sd/uiconfig/simpress/toolbar/connectorsbar.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/simpress/toolbar/drawingobjectbar.xml b/sd/uiconfig/simpress/toolbar/drawingobjectbar.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/simpress/toolbar/ellipsesbar.xml b/sd/uiconfig/simpress/toolbar/ellipsesbar.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/simpress/toolbar/extrusionobjectbar.xml b/sd/uiconfig/simpress/toolbar/extrusionobjectbar.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/simpress/toolbar/flowchartshapes.xml b/sd/uiconfig/simpress/toolbar/flowchartshapes.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/simpress/toolbar/fontworkobjectbar.xml b/sd/uiconfig/simpress/toolbar/fontworkobjectbar.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/simpress/toolbar/fontworkshapetype.xml b/sd/uiconfig/simpress/toolbar/fontworkshapetype.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/simpress/toolbar/formcontrols.xml b/sd/uiconfig/simpress/toolbar/formcontrols.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/simpress/toolbar/formdesign.xml b/sd/uiconfig/simpress/toolbar/formdesign.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/simpress/toolbar/formsfilterbar.xml b/sd/uiconfig/simpress/toolbar/formsfilterbar.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/simpress/toolbar/formsnavigationbar.xml b/sd/uiconfig/simpress/toolbar/formsnavigationbar.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/simpress/toolbar/formtextobjectbar.xml b/sd/uiconfig/simpress/toolbar/formtextobjectbar.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/simpress/toolbar/fullscreenbar.xml b/sd/uiconfig/simpress/toolbar/fullscreenbar.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/simpress/toolbar/gluepointsobjectbar.xml b/sd/uiconfig/simpress/toolbar/gluepointsobjectbar.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/simpress/toolbar/graffilterbar.xml b/sd/uiconfig/simpress/toolbar/graffilterbar.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/simpress/toolbar/graphicobjectbar.xml b/sd/uiconfig/simpress/toolbar/graphicobjectbar.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/simpress/toolbar/insertbar.xml b/sd/uiconfig/simpress/toolbar/insertbar.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/simpress/toolbar/linesbar.xml b/sd/uiconfig/simpress/toolbar/linesbar.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/simpress/toolbar/masterviewtoolbar.xml b/sd/uiconfig/simpress/toolbar/masterviewtoolbar.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/simpress/toolbar/mediaobjectbar.xml b/sd/uiconfig/simpress/toolbar/mediaobjectbar.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/simpress/toolbar/moreformcontrols.xml b/sd/uiconfig/simpress/toolbar/moreformcontrols.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/simpress/toolbar/optimizetablebar.xml b/sd/uiconfig/simpress/toolbar/optimizetablebar.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/simpress/toolbar/optionsbar.xml b/sd/uiconfig/simpress/toolbar/optionsbar.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/simpress/toolbar/outlinetoolbar.xml b/sd/uiconfig/simpress/toolbar/outlinetoolbar.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/simpress/toolbar/positionbar.xml b/sd/uiconfig/simpress/toolbar/positionbar.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/simpress/toolbar/rectanglesbar.xml b/sd/uiconfig/simpress/toolbar/rectanglesbar.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/simpress/toolbar/slideviewobjectbar.xml b/sd/uiconfig/simpress/toolbar/slideviewobjectbar.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/simpress/toolbar/slideviewtoolbar.xml b/sd/uiconfig/simpress/toolbar/slideviewtoolbar.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/simpress/toolbar/standardbar.xml b/sd/uiconfig/simpress/toolbar/standardbar.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/simpress/toolbar/starshapes.xml b/sd/uiconfig/simpress/toolbar/starshapes.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/simpress/toolbar/symbolshapes.xml b/sd/uiconfig/simpress/toolbar/symbolshapes.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/simpress/toolbar/tableobjectbar.xml b/sd/uiconfig/simpress/toolbar/tableobjectbar.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/simpress/toolbar/textbar.xml b/sd/uiconfig/simpress/toolbar/textbar.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/simpress/toolbar/textobjectbar.xml b/sd/uiconfig/simpress/toolbar/textobjectbar.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/simpress/toolbar/toolbar.xml b/sd/uiconfig/simpress/toolbar/toolbar.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/simpress/toolbar/viewerbar.xml b/sd/uiconfig/simpress/toolbar/viewerbar.xml old mode 100644 new mode 100755 diff --git a/sd/uiconfig/simpress/toolbar/zoombar.xml b/sd/uiconfig/simpress/toolbar/zoombar.xml old mode 100644 new mode 100755 -- cgit v1.2.3 From 58dd850178eb0151f03351b0599fcb88e6b499a8 Mon Sep 17 00:00:00 2001 From: Christian Lippka Date: Wed, 5 May 2010 17:39:48 +0200 Subject: #i89450# removed unused code --- sd/inc/Outliner.hxx | 24 - sd/inc/OutlinerIterator.hxx | 31 +- sd/inc/drawdoc.hxx | 14 - sd/inc/sdmod.hxx | 2 - sd/inc/segdefs.hxx | 29 - sd/inc/segdefs_.hxx | 1400 -------------------- sd/inc/shapelist.hxx | 4 - sd/inc/stlpool.hxx | 2 - sd/inc/textapi.hxx | 1 - sd/source/core/CustomAnimationEffect.cxx | 9 - sd/source/core/drawdoc2.cxx | 31 - sd/source/core/drawdoc4.cxx | 77 -- sd/source/core/shapelist.cxx | 19 - sd/source/core/stlpool.cxx | 50 - sd/source/core/text/textapi.cxx | 27 - sd/source/filter/eppt/eppt.hxx | 18 +- sd/source/filter/eppt/epptso.cxx | 37 +- sd/source/filter/html/htmlattr.cxx | 12 - sd/source/filter/html/htmlattr.hxx | 2 - sd/source/filter/html/htmlex.cxx | 9 - sd/source/filter/html/htmlex.hxx | 1 - sd/source/filter/ppt/ppt97animations.cxx | 8 +- sd/source/filter/ppt/ppt97animations.hxx | 3 +- sd/source/filter/ppt/pptatom.cpp | 12 - sd/source/filter/ppt/pptatom.hxx | 8 - sd/source/filter/ppt/pptinanimations.cxx | 58 - sd/source/filter/ppt/pptinanimations.hxx | 7 +- .../ui/accessibility/AccessibleViewForwarder.cxx | 21 - sd/source/ui/animations/AnimationSchemesPane.cxx | 443 ------- sd/source/ui/animations/AnimationSchemesPane.hrc | 50 - sd/source/ui/animations/AnimationSchemesPane.hxx | 114 -- sd/source/ui/animations/AnimationSchemesPane.src | 113 -- .../ui/animations/CustomAnimationCreateDialog.cxx | 7 - .../ui/animations/CustomAnimationSchemesPane.hrc | 32 - .../ui/animations/CustomAnimationSchemesPane.src | 71 - sd/source/ui/animations/makefile.mk | 3 - sd/source/ui/annotations/annotationmanager.cxx | 4 +- sd/source/ui/annotations/annotationmanagerimpl.hxx | 4 +- sd/source/ui/annotations/annotationwindow.cxx | 6 - sd/source/ui/annotations/annotationwindow.hxx | 1 - sd/source/ui/app/optsitem.cxx | 229 ---- sd/source/ui/app/sdmod.cxx | 17 - sd/source/ui/dlg/LayerDialogContent.cxx | 8 - sd/source/ui/dlg/PaneDockingWindow.cxx | 9 - sd/source/ui/dlg/animobjs.cxx | 13 - sd/source/ui/dlg/dlgass.cxx | 15 - sd/source/ui/dlg/dlgassim.cxx | 284 ---- sd/source/ui/dlg/dlgassim.hxx | 51 +- sd/source/ui/dlg/dlgctrls.cxx | 6 - sd/source/ui/dlg/dlgsnap.cxx | 18 +- sd/source/ui/dlg/docprev.cxx | 19 - sd/source/ui/dlg/filedlg.cxx | 88 -- sd/source/ui/dlg/headerfooterdlg.cxx | 6 - sd/source/ui/dlg/inspagob.cxx | 1 - sd/source/ui/dlg/prntopts.cxx | 16 - sd/source/ui/dlg/sdtreelb.cxx | 55 - sd/source/ui/dlg/tpaction.cxx | 45 - sd/source/ui/docshell/docshel4.cxx | 12 - sd/source/ui/docshell/docshell.cxx | 15 - .../configuration/ConfigurationClassifier.cxx | 7 - .../configuration/ConfigurationController.cxx | 26 - .../configuration/ConfigurationTracer.cxx | 8 +- .../configuration/ConfigurationTracer.hxx | 4 +- .../configuration/ConfigurationUpdater.cxx | 8 - .../configuration/ConfigurationUpdater.hxx | 3 - .../ui/framework/configuration/ResourceId.cxx | 11 - .../ui/framework/factories/BasicPaneFactory.cxx | 26 - .../ui/framework/factories/BasicPaneFactory.hxx | 6 - .../ui/framework/factories/TaskPanelFactory.cxx | 17 - .../ui/framework/factories/TaskPanelFactory.hxx | 2 - .../ui/framework/factories/ViewShellWrapper.cxx | 8 - .../ui/framework/module/ReadOnlyModeObserver.cxx | 11 - .../ui/framework/module/ReadOnlyModeObserver.hxx | 6 - sd/source/ui/framework/module/ResourceManager.cxx | 21 - sd/source/ui/framework/module/ResourceManager.hxx | 2 - sd/source/ui/framework/tools/FrameworkHelper.cxx | 22 - sd/source/ui/func/fuconstr.cxx | 7 - sd/source/ui/func/fudraw.cxx | 8 - sd/source/ui/func/fuoutl.cxx | 6 - sd/source/ui/func/fupoor.cxx | 22 - sd/source/ui/func/fusearch.cxx | 9 +- sd/source/ui/func/fuspell.cxx | 166 --- sd/source/ui/func/futransf.cxx | 25 - sd/source/ui/func/makefile.mk | 3 - sd/source/ui/func/outlinfo.cxx | 301 ----- sd/source/ui/func/sdundogr.cxx | 11 - sd/source/ui/func/unoaprms.cxx | 46 - sd/source/ui/inc/AccessibleViewForwarder.hxx | 3 - sd/source/ui/inc/DrawController.hxx | 2 - sd/source/ui/inc/DrawDocShell.hxx | 3 - sd/source/ui/inc/DrawViewShell.hxx | 8 - sd/source/ui/inc/GraphicViewShell.hxx | 5 - sd/source/ui/inc/LayerDialogContent.hxx | 2 - sd/source/ui/inc/MasterPageObserver.hxx | 6 - sd/source/ui/inc/OutlineView.hxx | 2 + sd/source/ui/inc/OutlineViewShell.hxx | 5 - sd/source/ui/inc/PaneDockingWindow.hxx | 6 - sd/source/ui/inc/SdUnoPresView.hxx | 54 - sd/source/ui/inc/SlideSorterViewShell.hxx | 6 - sd/source/ui/inc/SlideView.hxx | 2 - sd/source/ui/inc/TaskPaneViewShell.hxx | 31 - sd/source/ui/inc/ToolBarManager.hxx | 16 - sd/source/ui/inc/View.hxx | 3 - sd/source/ui/inc/ViewShell.hxx | 7 - sd/source/ui/inc/ViewShellBase.hxx | 29 - sd/source/ui/inc/ViewShellManager.hxx | 43 - sd/source/ui/inc/Window.hxx | 2 - sd/source/ui/inc/animobjs.hxx | 1 - sd/source/ui/inc/bmcache.hxx | 2 - sd/source/ui/inc/dlgass.hxx | 3 - sd/source/ui/inc/dlgctrls.hxx | 1 - sd/source/ui/inc/docprev.hxx | 2 - sd/source/ui/inc/filedlg.hxx | 31 - sd/source/ui/inc/framework/FrameworkHelper.hxx | 17 - sd/source/ui/inc/framework/ResourceId.hxx | 2 - sd/source/ui/inc/framework/ViewShellWrapper.hxx | 10 - sd/source/ui/inc/fuconstr.hxx | 1 - sd/source/ui/inc/fudraw.hxx | 2 - sd/source/ui/inc/fuoutl.hxx | 2 - sd/source/ui/inc/fupoor.hxx | 2 - sd/source/ui/inc/fuspell.hxx | 71 - sd/source/ui/inc/futransf.hxx | 2 - sd/source/ui/inc/headerfooterdlg.hxx | 1 - sd/source/ui/inc/optsitem.hxx | 28 - sd/source/ui/inc/outlinfo.hxx | 125 -- sd/source/ui/inc/prntopts.hxx | 1 - sd/source/ui/inc/sdtreelb.hxx | 1 - sd/source/ui/inc/sdundogr.hxx | 1 - sd/source/ui/inc/showview.hxx | 88 -- sd/source/ui/inc/slideshow.hxx | 1 - sd/source/ui/inc/taskpane/ScrollPanel.hxx | 5 - sd/source/ui/inc/taskpane/SubToolPanel.hxx | 18 - sd/source/ui/inc/taskpane/TaskPaneTreeNode.hxx | 17 - sd/source/ui/inc/taskpane/TitledControl.hxx | 7 - sd/source/ui/inc/taskpane/ToolPanel.hxx | 5 - sd/source/ui/inc/tools/PropertySet.hxx | 7 - .../ui/inc/tools/SdGlobalResourceContainer.hxx | 11 - sd/source/ui/inc/tools/SlotStateListener.hxx | 15 - sd/source/ui/inc/tpaction.hxx | 2 - sd/source/ui/inc/unoaprms.hxx | 2 - sd/source/ui/inc/unosrch.hxx | 7 +- sd/source/ui/inc/zoomlist.hxx | 1 - sd/source/ui/presenter/PresenterCanvas.cxx | 16 - sd/source/ui/presenter/PresenterTextView.cxx | 12 - sd/source/ui/slideshow/slideshow.cxx | 7 - sd/source/ui/slideshow/slideshowimpl.cxx | 9 +- sd/source/ui/slideshow/slideshowimpl.hxx | 3 +- sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx | 37 - sd/source/ui/slidesorter/cache/SlsBitmapCache.hxx | 14 - .../ui/slidesorter/cache/SlsGenericPageCache.cxx | 20 - .../ui/slidesorter/cache/SlsGenericPageCache.hxx | 10 - sd/source/ui/slidesorter/cache/SlsIdleDetector.cxx | 66 - sd/source/ui/slidesorter/cache/SlsIdleDetector.hxx | 51 - sd/source/ui/slidesorter/cache/SlsPageCache.cxx | 20 - .../ui/slidesorter/cache/SlsQueueProcessor.cxx | 1 - sd/source/ui/slidesorter/cache/makefile.mk | 1 - .../controller/SlideSorterController.cxx | 69 - .../controller/SlsCurrentSlideManager.cxx | 15 - .../ui/slidesorter/controller/SlsPageSelector.cxx | 11 - .../slidesorter/controller/SlsScrollBarManager.cxx | 20 - .../slidesorter/controller/SlsSelectionCommand.cxx | 20 - .../slidesorter/controller/SlsSelectionCommand.hxx | 13 - .../controller/SlsSelectionFunction.cxx | 89 +- .../ui/slidesorter/controller/SlsSlideFunction.cxx | 6 - .../ui/slidesorter/controller/SlsSlotManager.cxx | 94 -- .../ui/slidesorter/inc/cache/SlsPageCache.hxx | 29 +- .../inc/controller/SlideSorterController.hxx | 18 - .../slidesorter/inc/controller/SlsPageSelector.hxx | 1 - .../inc/controller/SlsScrollBarManager.hxx | 7 - .../inc/controller/SlsSelectionFunction.hxx | 8 - .../inc/controller/SlsSlideFunction.hxx | 2 - .../slidesorter/inc/controller/SlsSlotManager.hxx | 3 - .../ui/slidesorter/inc/model/SlideSorterModel.hxx | 7 - .../ui/slidesorter/inc/model/SlsPageDescriptor.hxx | 11 - .../ui/slidesorter/inc/view/SlideSorterView.hxx | 13 - sd/source/ui/slidesorter/inc/view/SlsLayouter.hxx | 23 - .../inc/view/SlsPageObjectViewContact.hxx | 2 - .../ui/slidesorter/model/SlideSorterModel.cxx | 45 - .../ui/slidesorter/model/SlsPageDescriptor.cxx | 16 - .../ui/slidesorter/shell/SlideSorterService.cxx | 12 - .../ui/slidesorter/shell/SlideSorterService.hxx | 1 - .../ui/slidesorter/shell/SlideSorterViewShell.cxx | 16 - sd/source/ui/slidesorter/view/SlideSorterView.cxx | 70 - sd/source/ui/slidesorter/view/SlsLayouter.cxx | 55 - .../slidesorter/view/SlsPageObjectViewContact.cxx | 15 - .../view/SlsPageObjectViewObjectContact.cxx | 16 - sd/source/ui/toolpanel/EmptyWindow.cxx | 96 -- sd/source/ui/toolpanel/EmptyWindow.hxx | 57 - sd/source/ui/toolpanel/LayoutMenu.cxx | 8 - sd/source/ui/toolpanel/LayoutMenu.hxx | 4 - sd/source/ui/toolpanel/ScrollPanel.cxx | 9 - sd/source/ui/toolpanel/SimpleLayoutWrapper.cxx | 98 -- sd/source/ui/toolpanel/SimpleLayoutWrapper.hxx | 70 - sd/source/ui/toolpanel/SubToolPanel.cxx | 58 - sd/source/ui/toolpanel/TaskPaneShellManager.cxx | 13 - sd/source/ui/toolpanel/TaskPaneTreeNode.cxx | 28 - sd/source/ui/toolpanel/TaskPaneViewShell.cxx | 74 +- sd/source/ui/toolpanel/TestMenu.cxx | 6 +- sd/source/ui/toolpanel/TestMenu.hxx | 3 + sd/source/ui/toolpanel/TestPanel.cxx | 5 +- sd/source/ui/toolpanel/TestPanel.hxx | 4 + sd/source/ui/toolpanel/TitleToolBox.cxx | 116 -- sd/source/ui/toolpanel/TitleToolBox.hxx | 70 - sd/source/ui/toolpanel/TitledControl.cxx | 16 - sd/source/ui/toolpanel/ToolPanel.cxx | 9 - .../toolpanel/controls/AnimationSchemesPanel.cxx | 86 ++ .../toolpanel/controls/AnimationSchemesPanel.hxx | 70 + .../ui/toolpanel/controls/MasterPageContainer.cxx | 148 --- .../ui/toolpanel/controls/MasterPageContainer.hxx | 10 - .../controls/MasterPageContainerProviders.cxx | 40 - .../controls/MasterPageContainerProviders.hxx | 15 - .../ui/toolpanel/controls/MasterPageDescriptor.cxx | 22 - .../ui/toolpanel/controls/MasterPageDescriptor.hxx | 5 - .../ui/toolpanel/controls/MasterPageObserver.cxx | 9 - .../ui/toolpanel/controls/MasterPagesSelector.cxx | 30 - .../ui/toolpanel/controls/MasterPagesSelector.hxx | 6 - sd/source/ui/toolpanel/controls/makefile.mk | 3 +- sd/source/ui/toolpanel/makefile.mk | 3 - sd/source/ui/tools/PropertySet.cxx | 16 - sd/source/ui/tools/SdGlobalResourceContainer.cxx | 25 - sd/source/ui/tools/SlotStateListener.cxx | 18 - sd/source/ui/unoidl/DrawController.cxx | 12 - sd/source/ui/unoidl/SdUnoPresView.cxx | 54 - sd/source/ui/unoidl/makefile.mk | 2 - sd/source/ui/unoidl/unocpres.cxx | 21 - sd/source/ui/unoidl/unocpres.hxx | 1 - sd/source/ui/unoidl/unoobj.cxx | 8 - sd/source/ui/unoidl/unoobj.hxx | 1 - sd/source/ui/unoidl/unopage.cxx | 29 +- sd/source/ui/unoidl/unopage.hxx | 3 +- sd/source/ui/unoidl/unosrch.cxx | 5 - sd/source/ui/unoidl/unovwcrs.cxx | 209 --- sd/source/ui/unoidl/unowcntr.cxx | 25 - sd/source/ui/unoidl/unowcntr.hxx | 3 - sd/source/ui/view/Outliner.cxx | 69 - sd/source/ui/view/OutlinerIterator.cxx | 36 - sd/source/ui/view/ToolBarManager.cxx | 98 +- sd/source/ui/view/ViewShellBase.cxx | 64 - sd/source/ui/view/ViewShellImplementation.cxx | 42 - sd/source/ui/view/ViewShellManager.cxx | 207 --- sd/source/ui/view/bmcache.cxx | 109 -- sd/source/ui/view/drviews1.cxx | 1 - sd/source/ui/view/drviews2.cxx | 42 - sd/source/ui/view/drviews6.cxx | 26 - sd/source/ui/view/drviewsa.cxx | 15 - sd/source/ui/view/grviewsh.cxx | 18 - sd/source/ui/view/makefile.mk | 1 - sd/source/ui/view/outlnvsh.cxx | 25 - sd/source/ui/view/outlview.cxx | 2 + sd/source/ui/view/sdview.cxx | 83 -- sd/source/ui/view/sdview4.cxx | 5 - sd/source/ui/view/sdwindow.cxx | 29 - sd/source/ui/view/showview.cxx | 170 --- sd/source/ui/view/viewshe2.cxx | 40 - sd/source/ui/view/viewshel.cxx | 8 - sd/source/ui/view/zoomlist.cxx | 13 - 256 files changed, 271 insertions(+), 8619 deletions(-) delete mode 100644 sd/inc/segdefs.hxx delete mode 100644 sd/inc/segdefs_.hxx delete mode 100644 sd/source/ui/animations/AnimationSchemesPane.cxx delete mode 100644 sd/source/ui/animations/AnimationSchemesPane.hrc delete mode 100644 sd/source/ui/animations/AnimationSchemesPane.hxx delete mode 100644 sd/source/ui/animations/AnimationSchemesPane.src delete mode 100644 sd/source/ui/animations/CustomAnimationSchemesPane.hrc delete mode 100644 sd/source/ui/animations/CustomAnimationSchemesPane.src mode change 100644 => 100755 sd/source/ui/dlg/dlgsnap.cxx delete mode 100644 sd/source/ui/func/fuspell.cxx delete mode 100644 sd/source/ui/func/outlinfo.cxx delete mode 100644 sd/source/ui/inc/SdUnoPresView.hxx delete mode 100644 sd/source/ui/inc/fuspell.hxx delete mode 100644 sd/source/ui/inc/outlinfo.hxx delete mode 100644 sd/source/ui/inc/showview.hxx delete mode 100644 sd/source/ui/slidesorter/cache/SlsIdleDetector.cxx delete mode 100644 sd/source/ui/slidesorter/cache/SlsIdleDetector.hxx delete mode 100644 sd/source/ui/toolpanel/EmptyWindow.cxx delete mode 100644 sd/source/ui/toolpanel/EmptyWindow.hxx delete mode 100644 sd/source/ui/toolpanel/SimpleLayoutWrapper.cxx delete mode 100644 sd/source/ui/toolpanel/SimpleLayoutWrapper.hxx delete mode 100644 sd/source/ui/toolpanel/TitleToolBox.cxx delete mode 100644 sd/source/ui/toolpanel/TitleToolBox.hxx delete mode 100644 sd/source/ui/unoidl/SdUnoPresView.cxx delete mode 100644 sd/source/ui/unoidl/unovwcrs.cxx delete mode 100644 sd/source/ui/view/showview.cxx diff --git a/sd/inc/Outliner.hxx b/sd/inc/Outliner.hxx index 0c14dec72583..1b608fa7b637 100644 --- a/sd/inc/Outliner.hxx +++ b/sd/inc/Outliner.hxx @@ -136,9 +136,6 @@ public: */ void StartSpelling (void); - /** Proxy for method from base class to avoid compiler warning */ - void StartSpelling(EditView&, unsigned char); - /** Initiate a find and/or replace on the next relevant text object. @return Returns when the search/replace is finished (as @@ -179,13 +176,6 @@ public: enum ChangeHint { CH_VIEW_SHELL_INVALID, CH_VIEW_SHELL_VALID }; - /** Handle a change outside the outliner which may affect the outliner. - At the moment this is restricted to changes of the main view shell - but later may include any changes that are detected now by - DetectChange(). - */ - void HandleOutsideChange (ChangeHint eHint); - int GetIgnoreCurrentPageChangesLevel() const { return mnIgnoreCurrentPageChangesLevel; }; void IncreIgnoreCurrentPageChangesLevel() { mnIgnoreCurrentPageChangesLevel++; }; void DecreIgnoreCurrentPageChangesLevel() { mnIgnoreCurrentPageChangesLevel--; }; @@ -421,15 +411,6 @@ private: */ void EndOfSearch (void); - /** Prepare to commence searching/spell checking on the specified page. - This also creates a proper page iterator. - @param nPageIndex - Index of the page to prepare for searching. The default value - of -1 is a flag for using the first/last page of the current - edit mode/view mode depending on the search direction. - */ - void InitPage (USHORT nPageIndex = (USHORT)-1); - /** Show a dialog that tells the user that the search has ended either because there are no more matches after finding at least one or that no match has been found at all. @@ -521,11 +502,6 @@ private: */ bool HandleFailedSearch (void); - /** Return a parent window for a dialog. The returned window depends on - the search mode. - */ - ::Window* GetParentForDialog (void); - /** Take a position as returned by an object iterator and switch to the view and page on which the object specified by this position is located. diff --git a/sd/inc/OutlinerIterator.hxx b/sd/inc/OutlinerIterator.hxx index ce291a6f5a00..92301f06289c 100644 --- a/sd/inc/OutlinerIterator.hxx +++ b/sd/inc/OutlinerIterator.hxx @@ -109,13 +109,6 @@ public: */ explicit Iterator (IteratorImplBase* pObject); - /** Create a new iterator with the implementation object being the copy - of the provided one. - @param rObject - A copy of this object will become the implementation object. - */ - explicit Iterator (const IteratorImplBase& rObject); - ~Iterator (void); /** Assign the iterator from the given one. The implementation object @@ -240,9 +233,8 @@ private: This specifies whether the returned iterator points to the first, (one past the) last, or current object. @return - Returns an iterator as constructed by one of the + Returns an iterator as constructed by CreateSelectionIterator(), - CreateViewIterator(), or CreateDocumentIterator(). */ Iterator CreateIterator (IteratorLocation aLocation); @@ -269,24 +261,6 @@ private: bool bDirectionIsForward=true, IteratorLocation aLocation=BEGIN); - /** Create an iterator that iterates over all SdrObjects - objects of the mpOutliner outliner that belong to - the current view. - @param pDocument - The document to which the objects belong. - @param pViewShell - The view shell which displays the objects. - @param bDirectionIsForward - The direction of iteration. It defaults to forward. - @param aLocation - This specifies at which object the iterator points initially. - */ - Iterator CreateViewIterator ( - SdDrawDocument* pDocument, - const boost::shared_ptr& rpViewShell, - bool bDirectionIsForward=true, - IteratorLocation aLocation=BEGIN); - /** Create an iterator that iterates over all SdrObjects objects of the mpOutliner outliner. @param pDocument @@ -356,9 +330,6 @@ public: assigned to the data members of this object. */ IteratorPosition (const IteratorPosition& aPosition); - /** Create a new object and set its data members to the given values. - */ - IteratorPosition (SdrObject* pObject, sal_Int32 nText, sal_Int32 nPageIndex, PageKind ePageKind, EditMode eEditMode); /// The destructor is a no-op at the moment. ~IteratorPosition (void); diff --git a/sd/inc/drawdoc.hxx b/sd/inc/drawdoc.hxx index 1d801baa5d3c..6811da762934 100644 --- a/sd/inc/drawdoc.hxx +++ b/sd/inc/drawdoc.hxx @@ -441,7 +441,6 @@ public: CharClass* GetCharClass() const { return mpCharClass; } void RestoreLayerNames(); - void MakeUniqueLayerNames(); void UpdateAllLinks(); @@ -465,18 +464,6 @@ public: static SdDrawDocument* pDocLockedInsertingLinks; // static to prevent recursions while resolving links - /** This method acts as a simplified front end for the more complex - CreatePage() method. - @param nPageNum - The page number as passed to the GetSdPage() - method from which to use certain properties for the new pages. - These include the auto layout. - @return - Returns an index of the inserted pages that can be used with the - GetSdPage() method. - */ - USHORT CreatePage (USHORT nPageNum); - /** Create and insert a set of two new pages: a standard (draw) page and the associated notes page. The new pages are inserted direclty after the specified page set. @@ -687,7 +674,6 @@ namespace sd class ModifyGuard { public: - ModifyGuard( DrawDocShell* pDocShell ); ModifyGuard( SdDrawDocument* pDoc ); ~ModifyGuard(); diff --git a/sd/inc/sdmod.hxx b/sd/inc/sdmod.hxx index 0dad3ca237cb..f0d5cc64a3c4 100644 --- a/sd/inc/sdmod.hxx +++ b/sd/inc/sdmod.hxx @@ -141,8 +141,6 @@ public: SD_DLLPUBLIC SvNumberFormatter* GetNumberFormatter(); - ::com::sun::star::text::WritingMode GetDefaultWritingMode() const; - //virtuelle Methoden fuer den Optionendialog virtual SfxItemSet* CreateItemSet( USHORT nId ); virtual void ApplyItemSet( USHORT nId, const SfxItemSet& rSet ); diff --git a/sd/inc/segdefs.hxx b/sd/inc/segdefs.hxx deleted file mode 100644 index fc06d39b4ac1..000000000000 --- a/sd/inc/segdefs.hxx +++ /dev/null @@ -1,29 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#include - - diff --git a/sd/inc/segdefs_.hxx b/sd/inc/segdefs_.hxx deleted file mode 100644 index a93071b463b6..000000000000 --- a/sd/inc/segdefs_.hxx +++ /dev/null @@ -1,1400 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#define app_01 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) -#define app_04 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) -#define app_05 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) -#define app_0a SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) -#define app2_01 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) -#define app2_03 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) -#define app2_06 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) -#define app4_01 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) -#define splcfg_01 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) -#define splcfg_04 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) -#define app5_01 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) -#define optsitem_01 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) -#define optsitem_02 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) -#define optsitem_03 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) -#define optsitem_04 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) -#define optsitem_06 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) -#define optsitem_07 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE) -#define drawdoc2_04 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) -#define drviewsa_0a SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) -#define drawdoc_11 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) -#define drawdoc2_03 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) -#define sdpage_11 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) -#define drawdoc_0e SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) -#define stlsheet_06 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) -#define drawview_06 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) -#define sdview_07 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) -#define drawview_09 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) -#define drviews5_08 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) -#define sdwindow_06 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) -#define sdview_11 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) -#define drawview_04 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) -#define drviews5_01 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) -#define viewshel_07 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) -#define fudraw_0b SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) -#define fudraw_04 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) -#define fusel_04 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) -#define viewshel_0a SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) -#define drviews4_08 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) -#define sdwindow_09 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) -#define drviews4_0b SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) -#define fudraw_09 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) -#define fusel_07 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) -#define drviews4_01 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) -#define drviewsa_06 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) -#define viewshel_06 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) -#define fupoor_03 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) -#define docshel2_04 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) -#define drviews1_01 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) -#define drviews5_07 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) -#define drviews1_02 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) -#define fupoor_01 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) -#define fudraw_01 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) -#define fusel_08 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) -#define fudraw_0a SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) -#define fupoor_04 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) -#define fupoor_02 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) -#define fudraw_02 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) -#define drviews7_02 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) -#define viewshel_08 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) -#define drviews6_07 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) -#define tbxitem_01 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) -#define tbxitem_02 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) -#define docshell_07 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) -#define drawdoc2_0c SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) -#define docshell_0a SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) -#define docshel4_1d SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) -#define stlsheet_07 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) -#define sdwindow_20 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) -#define docshell_08 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) -#define docshell_06 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) -#define viewshe2_16 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) -#define sdwindow_0c SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) -#define fudraw_0e SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) -#define fupoor_12 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) -#define docshel4_0b SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) -#define drviews1_0b SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) -#define drviews7_01 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) -#define drviews7_03 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) -#define sdview_0a SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) -#define tbxitem_03 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) -#define drviews3_06 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) -#define sdwindow_07 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) -#define sdpage_03 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) -#define viewshe2_01 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) -#define sdwindow_14 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) -#define sdwindow_1b SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) -#define sdwindow_1c SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) -#define sdwindow_19 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) -#define sdwindow_17 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) -#define sdwindow_18 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) -#define sdwindow_1a SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) -#define sdwindow_15 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE) -#define sdwindow_0d SEG_SEGCLASS(STARTWORK_SEG001,STARTWORK_CODE) -#define sdwindow_04 SEG_SEGCLASS(STARTWORK_SEG001,STARTWORK_CODE) -#define sdpage2_08 SEG_SEGCLASS(STARTWORK_SEG001,STARTWORK_CODE) -#define sdruler_06 SEG_SEGCLASS(STARTSLICE_SEG000,STARTSLICE_CODE) -#define viewshe2_09 SEG_SEGCLASS(STARTSLICE_SEG000,STARTSLICE_CODE) -#define sdwindow_0e SEG_SEGCLASS(STARTSLICE_SEG000,STARTSLICE_CODE) -#define sdwindow_0f SEG_SEGCLASS(STARTSLICE_SEG000,STARTSLICE_CODE) -#define outlview_0f SEG_SEGCLASS(STARTSLICE_SEG000,STARTSLICE_CODE) -#define outlview_09 SEG_SEGCLASS(STARTSLICE_SEG000,STARTSLICE_CODE) -#define fuoltext_06 SEG_SEGCLASS(STARTSLICE_SEG000,STARTSLICE_CODE) -#define outlnvsh_1c SEG_SEGCLASS(STARTSLICE_SEG000,STARTSLICE_CODE) -#define outlnvsh_11 SEG_SEGCLASS(STARTSLICE_SEG000,STARTSLICE_CODE) -#define outlview_0a SEG_SEGCLASS(STARTSLICE_SEG000,STARTSLICE_CODE) -#define sdwindow_21 SEG_SEGCLASS(STARTSLICE_SEG000,STARTSLICE_CODE) -#define outlnvsh_15 SEG_SEGCLASS(STARTSLICE_SEG000,STARTSLICE_CODE) -#define viewshe2_07 SEG_SEGCLASS(STARTSLICE_SEG000,STARTSLICE_CODE) -#define sdwindow_11 SEG_SEGCLASS(STARTSLICE_SEG000,STARTSLICE_CODE) -#define sdwindow_10 SEG_SEGCLASS(STARTSLICE_SEG000,STARTSLICE_CODE) -#define sdwindow_12 SEG_SEGCLASS(STARTSLICE_SEG000,STARTSLICE_CODE) -#define viewshe2_08 SEG_SEGCLASS(STARTSLICE_SEG000,STARTSLICE_CODE) -#define drviews1_06 SEG_SEGCLASS(STARTSLICE_SEG000,STARTSLICE_CODE) -#define drviews4_02 SEG_SEGCLASS(STARTSLICE_SEG000,STARTSLICE_CODE) -#define drviews5_05 SEG_SEGCLASS(STARTSLICE_SEG000,STARTSLICE_CODE) -#define viewshel_10 SEG_SEGCLASS(STARTSLICE_SEG000,STARTSLICE_CODE) -#define viewshel_12 SEG_SEGCLASS(STARTSLICE_SEG000,STARTSLICE_CODE) -#define sdwindow_13 SEG_SEGCLASS(STARTSLICE_SEG000,STARTSLICE_CODE) -#define drviews1_10 SEG_SEGCLASS(STARTSLICE_SEG000,STARTSLICE_CODE) -#define viewshel_13 SEG_SEGCLASS(STARTSLICE_SEG000,STARTSLICE_CODE) -#define viewshel_0f SEG_SEGCLASS(STARTSLICE_SEG000,STARTSLICE_CODE) -#define sdpage_1f SEG_SEGCLASS(STARTSLICE_SEG000,STARTSLICE_CODE) -#define drviews1_1c SEG_SEGCLASS(STARTSLICE_SEG000,STARTSLICE_CODE) -#define drviews5_06 SEG_SEGCLASS(STARTSLICE_SEG000,STARTSLICE_CODE) -#define drviews5_04 SEG_SEGCLASS(STARTSLICE_SEG000,STARTSLICE_CODE) -#define drviews1_13 SEG_SEGCLASS(STARTSLICE_SEG000,STARTSLICE_CODE) -#define sdruler_03 SEG_SEGCLASS(STARTSLICE_SEG000,STARTSLICE_CODE) -#define sdruler_01 SEG_SEGCLASS(STARTSLICE_SEG000,STARTSLICE_CODE) -#define drviews1_14 SEG_SEGCLASS(STARTSLICE_SEG000,STARTSLICE_CODE) -#define app3_01 SEG_SEGCLASS(STARTSLICE_SEG000,STARTSLICE_CODE) -#define docshel4_1c SEG_SEGCLASS(STARTSLICE_SEG000,STARTSLICE_CODE) -#define drviewsh_01 SEG_SEGCLASS(STARTSLICE_SEG000,STARTSLICE_CODE) -#define docshell_02 SEG_SEGCLASS(STARTSLICE_SEG000,STARTSLICE_CODE) -#define docshel4_0e SEG_SEGCLASS(STARTSLICE_SEG000,STARTSLICE_CODE) -#define drawdoc2_07 SEG_SEGCLASS(STARTSLICE_SEG001,STARTSLICE_CODE) -#define drawdoc2_09 SEG_SEGCLASS(STARTSLICE_SEG001,STARTSLICE_CODE) -#define drawdoc2_0e SEG_SEGCLASS(STARTSLICE_SEG001,STARTSLICE_CODE) -#define sdpage2_05 SEG_SEGCLASS(STARTSLICE_SEG001,STARTSLICE_CODE) -#define sdpage2_07 SEG_SEGCLASS(STARTSLICE_SEG001,STARTSLICE_CODE) -#define drawdoc_04 SEG_SEGCLASS(STARTSLICE_SEG001,STARTSLICE_CODE) -#define sdpage_01 SEG_SEGCLASS(STARTSLICE_SEG001,STARTSLICE_CODE) -#define outlview_0c SEG_SEGCLASS(STARTSLICE_SEG001,STARTSLICE_CODE) -#define sdpage_0e SEG_SEGCLASS(STARTSLICE_SEG001,STARTSLICE_CODE) -#define sdpage_0d SEG_SEGCLASS(STARTSLICE_SEG001,STARTSLICE_CODE) -#define drawdoc2_13 SEG_SEGCLASS(STARTSLICE_SEG001,STARTSLICE_CODE) -#define sdpage_19 SEG_SEGCLASS(STARTSLICE_SEG001,STARTSLICE_CODE) -#define sdpage_04 SEG_SEGCLASS(STARTSLICE_SEG001,STARTSLICE_CODE) -#define sdpage_05 SEG_SEGCLASS(STARTSLICE_SEG001,STARTSLICE_CODE) -#define drawdoc_13 SEG_SEGCLASS(STARTSLICE_SEG001,STARTSLICE_CODE) -#define sdoutl_01 SEG_SEGCLASS(STARTSLICE_SEG001,STARTSLICE_CODE) -#define drawdoc_12 SEG_SEGCLASS(STARTSLICE_SEG001,STARTSLICE_CODE) -#define outlnvsh_01 SEG_SEGCLASS(STARTSLICE_SEG001,STARTSLICE_CODE) -#define sdview_01 SEG_SEGCLASS(STARTSLICE_SEG001,STARTSLICE_CODE) -#define drawdoc2_05 SEG_SEGCLASS(STARTSLICE_SEG001,STARTSLICE_CODE) -#define drtxtob_01 SEG_SEGCLASS(STARTSLICE_SEG001,STARTSLICE_CODE) -#define sdpage_1d SEG_SEGCLASS(STARTSLICE_SEG001,STARTSLICE_CODE) -#define sdpage_1b SEG_SEGCLASS(STARTSLICE_SEG001,STARTSLICE_CODE) -#define sdpage_12 SEG_SEGCLASS(STARTSLICE_SEG001,STARTSLICE_CODE) -#define sdpage_13 SEG_SEGCLASS(STARTSLICE_SEG001,STARTSLICE_CODE) -#define stlpool_03 SEG_SEGCLASS(STARTSLICE_SEG001,STARTSLICE_CODE) -#define stlsheet_01 SEG_SEGCLASS(STARTSLICE_SEG001,STARTSLICE_CODE) -#define app3_02 SEG_SEGCLASS(STARTSLICE_SEG002,STARTSLICE_CODE) -#define fusel_01 SEG_SEGCLASS(STARTSLICE_SEG002,STARTSLICE_CODE) -#define fusel_02 SEG_SEGCLASS(STARTSLICE_SEG002,STARTSLICE_CODE) -#define drviewsa_05 SEG_SEGCLASS(STARTSLICE_SEG002,STARTSLICE_CODE) -#define drawdoc2_0d SEG_SEGCLASS(STARTSLICE_SEG002,STARTSLICE_CODE) -#define outlview_14 SEG_SEGCLASS(STARTSLICE_SEG002,STARTSLICE_CODE) -#define outlview_0b SEG_SEGCLASS(STARTSLICE_SEG002,STARTSLICE_CODE) -#define frmview_04 SEG_SEGCLASS(STARTSLICE_SEG002,STARTSLICE_CODE) -#define sdview_02 SEG_SEGCLASS(STARTSLICE_SEG002,STARTSLICE_CODE) -#define sdview_06 SEG_SEGCLASS(STARTSLICE_SEG002,STARTSLICE_CODE) -#define drawview_02 SEG_SEGCLASS(STARTSLICE_SEG002,STARTSLICE_CODE) -#define outlnvsh_05 SEG_SEGCLASS(STARTSLICE_SEG002,STARTSLICE_CODE) -#define fuoltext_02 SEG_SEGCLASS(STARTSLICE_SEG002,STARTSLICE_CODE) -#define outlview_02 SEG_SEGCLASS(STARTSLICE_SEG002,STARTSLICE_CODE) -#define fuoutl_02 SEG_SEGCLASS(STARTSLICE_SEG002,STARTSLICE_CODE) -#define fuoltext_08 SEG_SEGCLASS(STARTSLICE_SEG002,STARTSLICE_CODE) -#define outlview_12 SEG_SEGCLASS(STARTSLICE_SEG002,STARTSLICE_CODE) -#define outlview_18 SEG_SEGCLASS(STARTSLICE_SEG002,STARTSLICE_CODE) -#define outlview_01 SEG_SEGCLASS(STARTSLICE_SEG002,STARTSLICE_CODE) -#define outlview_13 SEG_SEGCLASS(STARTSLICE_SEG002,STARTSLICE_CODE) -#define outlnvsh_14 SEG_SEGCLASS(STARTSLICE_SEG002,STARTSLICE_CODE) -#define drtxtob_04 SEG_SEGCLASS(STARTSLICE_SEG003,STARTSLICE_CODE) -#define outlview_16 SEG_SEGCLASS(STARTSLICE_SEG003,STARTSLICE_CODE) -#define tbxww_08 SEG_SEGCLASS(STARTSLICE_SEG003,STARTSLICE_CODE) -#define viewshe2_0b SEG_SEGCLASS(STARTSLICE_SEG004,STARTSLICE_CODE) -#define sdpage_1a SEG_SEGCLASS(STARTSLICE_SEG004,STARTSLICE_CODE) -#define sdpage_0a SEG_SEGCLASS(STARTSLICE_SEG004,STARTSLICE_CODE) -#define sdview_03 SEG_SEGCLASS(STARTSLICE_SEG004,STARTSLICE_CODE) -#define outlnvsh_0d SEG_SEGCLASS(STARTSLICE_SEG004,STARTSLICE_CODE) -#define sdview_04 SEG_SEGCLASS(STARTSLICE_SEG004,STARTSLICE_CODE) -#define outlnvsh_0b SEG_SEGCLASS(STARTSLICE_SEG005,STARTSLICE_CODE) -#define drviews1_16 SEG_SEGCLASS(STARTSLICE_SEG005,STARTSLICE_CODE) -#define sdwindow_05 SEG_SEGCLASS(STARTSLICE_SEG005,STARTSLICE_CODE) -#define drviews1_15 SEG_SEGCLASS(STARTSLICE_SEG005,STARTSLICE_CODE) -#define drviews1_12 SEG_SEGCLASS(STARTSLICE_SEG005,STARTSLICE_CODE) -#define outlnvsh_1e SEG_SEGCLASS(STARTSLICE_SEG005,STARTSLICE_CODE) -#define drawdoc2_12 SEG_SEGCLASS(STARTSLICE_SEG005,STARTSLICE_CODE) -#define drawdoc_01 SEG_SEGCLASS(STARTSLICE_SEG005,STARTSLICE_CODE) -#define stlpool_01 SEG_SEGCLASS(STARTSLICE_SEG005,STARTSLICE_CODE) -#define optsitem_14 SEG_SEGCLASS(STARTSLICE_SEG006,STARTSLICE_CODE) -#define optsitem_16 SEG_SEGCLASS(STARTSLICE_SEG006,STARTSLICE_CODE) -#define optsitem_17 SEG_SEGCLASS(STARTSLICE_SEG006,STARTSLICE_CODE) -#define drviews1_1d SEG_SEGCLASS(STARTSLICE_SEG006,STARTSLICE_CODE) -#define stlsheet_05 SEG_SEGCLASS(STARTSLICE_SEG007,STARTSLICE_CODE) -#define drawdoc4_01 SEG_SEGCLASS(STARTSLICE_SEG007,STARTSLICE_CODE) -#define stlpool_07 SEG_SEGCLASS(STARTSLICE_SEG007,STARTSLICE_CODE) -#define drawdoc_10 SEG_SEGCLASS(STARTSLICE_SEG007,STARTSLICE_CODE) -#define outlnvsh_06 SEG_SEGCLASS(STARTSLICE_SEG008,STARTSLICE_CODE) -#define outlview_03 SEG_SEGCLASS(STARTSLICE_SEG008,STARTSLICE_CODE) -#define viewshel_01 SEG_SEGCLASS(STARTSLICE_SEG008,STARTSLICE_CODE) -#define viewshel_02 SEG_SEGCLASS(STARTSLICE_SEG008,STARTSLICE_CODE) -#define sdwindow_01 SEG_SEGCLASS(STARTSLICE_SEG008,STARTSLICE_CODE) -#define frmview_01 SEG_SEGCLASS(STARTSLICE_SEG009,STARTSLICE_CODE) -#define frmview_07 SEG_SEGCLASS(STARTSLICE_SEG009,STARTSLICE_CODE) -#define drviewsa_03 SEG_SEGCLASS(STARTSLICE_SEG009,STARTSLICE_CODE) -#define frmview_03 SEG_SEGCLASS(STARTSLICE_SEG009,STARTSLICE_CODE) -#define outlnvsh_03 SEG_SEGCLASS(STARTSLICE_SEG009,STARTSLICE_CODE) -#define outlnvsh_10 SEG_SEGCLASS(STARTSLICE_SEG009,STARTSLICE_CODE) -#define fuoutl_01 SEG_SEGCLASS(STARTSLICE_SEG009,STARTSLICE_CODE) -#define drviewsa_07 SEG_SEGCLASS(STARTSLICE_SEG009,STARTSLICE_CODE) -#define fuoltext_01 SEG_SEGCLASS(STARTSLICE_SEG009,STARTSLICE_CODE) -#define fuoltext_07 SEG_SEGCLASS(STARTSLICE_SEG009,STARTSLICE_CODE) -#define drawitem_03 SEG_SEGCLASS(STARTSLICE_SEG010,STARTSLICE_CODE) -#define drawitem_06 SEG_SEGCLASS(STARTSLICE_SEG010,STARTSLICE_CODE) -#define docshell_0b SEG_SEGCLASS(STARTSLICE_SEG010,STARTSLICE_CODE) -#define docshell_01 SEG_SEGCLASS(STARTSLICE_SEG010,STARTSLICE_CODE) -#define drawitem_02 SEG_SEGCLASS(STARTSLICE_SEG010,STARTSLICE_CODE) -#define drawitem_08 SEG_SEGCLASS(STARTSLICE_SEG010,STARTSLICE_CODE) -#define drawitem_0c SEG_SEGCLASS(STARTSLICE_SEG010,STARTSLICE_CODE) -#define drawitem_09 SEG_SEGCLASS(STARTSLICE_SEG010,STARTSLICE_CODE) -#define drawitem_0e SEG_SEGCLASS(STARTSLICE_SEG010,STARTSLICE_CODE) -#define drawitem_12 SEG_SEGCLASS(STARTSLICE_SEG010,STARTSLICE_CODE) -#define drawitem_0f SEG_SEGCLASS(STARTSLICE_SEG010,STARTSLICE_CODE) -#define drawitem_14 SEG_SEGCLASS(STARTSLICE_SEG010,STARTSLICE_CODE) -#define drawitem_18 SEG_SEGCLASS(STARTSLICE_SEG010,STARTSLICE_CODE) -#define drawitem_15 SEG_SEGCLASS(STARTSLICE_SEG010,STARTSLICE_CODE) -#define drawitem_1a SEG_SEGCLASS(STARTSLICE_SEG010,STARTSLICE_CODE) -#define drawitem_1e SEG_SEGCLASS(STARTSLICE_SEG010,STARTSLICE_CODE) -#define drawitem_1b SEG_SEGCLASS(STARTSLICE_SEG010,STARTSLICE_CODE) -#define drawitem_20 SEG_SEGCLASS(STARTSLICE_SEG010,STARTSLICE_CODE) -#define drawitem_24 SEG_SEGCLASS(STARTSLICE_SEG010,STARTSLICE_CODE) -#define drawitem_21 SEG_SEGCLASS(STARTSLICE_SEG010,STARTSLICE_CODE) -#define drviews1_11 SEG_SEGCLASS(STARTSLICE_SEG011,STARTSLICE_CODE) -#define drbezob_01 SEG_SEGCLASS(STARTSLICE_SEG011,STARTSLICE_CODE) -#define tabcontr_01 SEG_SEGCLASS(STARTSLICE_SEG011,STARTSLICE_CODE) -#define drawview_01 SEG_SEGCLASS(STARTSLICE_SEG011,STARTSLICE_CODE) -#define drstdob_01 SEG_SEGCLASS(STARTSLICE_SEG011,STARTSLICE_CODE) -#define layertab_01 SEG_SEGCLASS(STARTSLICE_SEG011,STARTSLICE_CODE) -#define sdruler_02 SEG_SEGCLASS(STARTSLICE_SEG011,STARTSLICE_CODE) -#define sdruler_08 SEG_SEGCLASS(STARTSLICE_SEG011,STARTSLICE_CODE) -#define docshel2_03 SEG_SEGCLASS(STARTSLICE_SEG011,STARTSLICE_CODE) -#define docshel2_02 SEG_SEGCLASS(STARTSLICE_SEG011,STARTSLICE_CODE) -#define tbxww_04 SEG_SEGCLASS(STARTSLICE_SEG012,STARTSLICE_CODE) -#define viewshe2_1d SEG_SEGCLASS(STARTSLICE_SEG012,STARTSLICE_CODE) -#define viewshel_04 SEG_SEGCLASS(STARTSLICE_SEG012,STARTSLICE_CODE) -#define docshel2_05 SEG_SEGCLASS(STARTSLICE_SEG012,STARTSLICE_CODE) -#define sdwindow_02 SEG_SEGCLASS(STARTSLICE_SEG012,STARTSLICE_CODE) -#define drtxtob_02 SEG_SEGCLASS(STARTSLICE_SEG012,STARTSLICE_CODE) -#define drstdob_02 SEG_SEGCLASS(STARTSLICE_SEG012,STARTSLICE_CODE) -#define drbezob_02 SEG_SEGCLASS(STARTSLICE_SEG012,STARTSLICE_CODE) -#define sdruler_04 SEG_SEGCLASS(STARTSLICE_SEG012,STARTSLICE_CODE) -#define tabcontr_02 SEG_SEGCLASS(STARTSLICE_SEG013,STARTSLICE_CODE) -#define layertab_02 SEG_SEGCLASS(STARTSLICE_SEG013,STARTSLICE_CODE) -#define drviews1_0a SEG_SEGCLASS(STARTSLICE_SEG013,STARTSLICE_CODE) -#define outlnvsh_1a SEG_SEGCLASS(STARTSLICE_SEG013,STARTSLICE_CODE) -#define app4_02 SEG_SEGCLASS(STARTSLICE_SEG013,STARTSLICE_CODE) -#define docdlg_01 SEG_SEGCLASS(STARTSLICE_SEG013,STARTSLICE_CODE) -#define tabcontr_04 SEG_SEGCLASS(STARTSLICE_SEG013,STARTSLICE_CODE) -#define viewshe2_10 SEG_SEGCLASS(STARTSLICE_SEG013,STARTSLICE_CODE) -#define outlnvsh_08 SEG_SEGCLASS(STARTSLICE_SEG013,STARTSLICE_CODE) -#define outlnvsh_09 SEG_SEGCLASS(STARTSLICE_SEG014,STARTSLICE_CODE) -#define outlnvsh_0a SEG_SEGCLASS(STARTSLICE_SEG014,STARTSLICE_CODE) -#define outlnvsh_18 SEG_SEGCLASS(STARTSLICE_SEG014,STARTSLICE_CODE) -#define outlnvsh_19 SEG_SEGCLASS(STARTSLICE_SEG014,STARTSLICE_CODE) -#define tabcontr_08 SEG_SEGCLASS(STARTSLICE_SEG015,STARTSLICE_CODE) -#define drawdoc2_16 SEG_SEGCLASS(CALLOPT_SEG000,CALLOPT_CODE) -#define drviews2_02 SEG_SEGCLASS(CALLOPT_SEG000,CALLOPT_CODE) -#define drawview_05 SEG_SEGCLASS(CALLOPT_SEG000,CALLOPT_CODE) -#define fucopy_01 SEG_SEGCLASS(CALLOPT_SEG000,CALLOPT_CODE) -#define drawview_03 SEG_SEGCLASS(CALLOPT_SEG000,CALLOPT_CODE) -#define sdview_08 SEG_SEGCLASS(CALLOPT_SEG000,CALLOPT_CODE) -#define drviews1_03 SEG_SEGCLASS(CALLOPT_SEG000,CALLOPT_CODE) -#define sdpage2_06 SEG_SEGCLASS(CALLOPT_SEG000,CALLOPT_CODE) -#define sdview_09 SEG_SEGCLASS(CALLOPT_SEG000,CALLOPT_CODE) -#define fudraw_06 SEG_SEGCLASS(CALLOPT_SEG000,CALLOPT_CODE) -#define sdview2_07 SEG_SEGCLASS(CALLOPT_SEG000,CALLOPT_CODE) -#define drviewsc_01 SEG_SEGCLASS(CALLOPT_SEG000,CALLOPT_CODE) -#define fuoltext_04 SEG_SEGCLASS(CALLOPT_SEG000,CALLOPT_CODE) -#define outlview_19 SEG_SEGCLASS(CALLOPT_SEG000,CALLOPT_CODE) -#define sdview_0e SEG_SEGCLASS(CALLOPT_SEG000,CALLOPT_CODE) -#define futext_04 SEG_SEGCLASS(CALLOPT_SEG000,CALLOPT_CODE) -#define fupoor_05 SEG_SEGCLASS(CALLOPT_SEG000,CALLOPT_CODE) -#define fuconstr_04 SEG_SEGCLASS(CALLOPT_SEG000,CALLOPT_CODE) -#define sdpage2_04 SEG_SEGCLASS(CALLOPT_SEG000,CALLOPT_CODE) -#define viewshel_0b SEG_SEGCLASS(WORKSET_SEG000,WORKSET_CODE) -#define drviews4_09 SEG_SEGCLASS(WORKSET_SEG000,WORKSET_CODE) -#define sdwindow_0a SEG_SEGCLASS(WORKSET_SEG000,WORKSET_CODE) -#define fusel_05 SEG_SEGCLASS(WORKSET_SEG000,WORKSET_CODE) -#define fudraw_05 SEG_SEGCLASS(WORKSET_SEG000,WORKSET_CODE) -#define fupoor_0f SEG_SEGCLASS(WORKSET_SEG000,WORKSET_CODE) -#define drawdoc3_09 SEG_SEGCLASS(WORKSET_SEG000,WORKSET_CODE) -#define fusel_03 SEG_SEGCLASS(WORKSET_SEG000,WORKSET_CODE) -#define viewshel_09 SEG_SEGCLASS(WORKSET_SEG000,WORKSET_CODE) -#define drviews4_07 SEG_SEGCLASS(WORKSET_SEG000,WORKSET_CODE) -#define fudraw_03 SEG_SEGCLASS(WORKSET_SEG000,WORKSET_CODE) -#define sdwindow_08 SEG_SEGCLASS(WORKSET_SEG000,WORKSET_CODE) -#define viewshe2_1b SEG_SEGCLASS(WORKSET_SEG000,WORKSET_CODE) -#define sdwindow_0b SEG_SEGCLASS(WORKSET_SEG000,WORKSET_CODE) -#define drviews4_0a SEG_SEGCLASS(WORKSET_SEG000,WORKSET_CODE) -#define viewshel_0c SEG_SEGCLASS(WORKSET_SEG000,WORKSET_CODE) -#define viewshel_05 SEG_SEGCLASS(SLICES_SEG000,SLICES_CODE) -#define drviews8_01 SEG_SEGCLASS(SLICES_SEG000,SLICES_CODE) -#define drviewsb_01 SEG_SEGCLASS(SLICES_SEG000,SLICES_CODE) -#define outlnvsh_0f SEG_SEGCLASS(SLICES_SEG000,SLICES_CODE) -#define fuarea_01 SEG_SEGCLASS(SLICES_SEG000,SLICES_CODE) -#define fuconpol_05 SEG_SEGCLASS(SLICES_SEG000,SLICES_CODE) -#define sdview_10 SEG_SEGCLASS(SLICES_SEG000,SLICES_CODE) -#define fuconrec_05 SEG_SEGCLASS(SLICES_SEG000,SLICES_CODE) -#define fuconstr_05 SEG_SEGCLASS(SLICES_SEG000,SLICES_CODE) -#define futext_05 SEG_SEGCLASS(SLICES_SEG000,SLICES_CODE) -#define futext_0a SEG_SEGCLASS(SLICES_SEG000,SLICES_CODE) -#define futext_01 SEG_SEGCLASS(SLICES_SEG000,SLICES_CODE) -#define futext_0b SEG_SEGCLASS(SLICES_SEG000,SLICES_CODE) -#define futext_0c SEG_SEGCLASS(SLICES_SEG000,SLICES_CODE) -#define sdview_13 SEG_SEGCLASS(SLICES_SEG000,SLICES_CODE) -#define futext_08 SEG_SEGCLASS(SLICES_SEG000,SLICES_CODE) -#define fuconstr_07 SEG_SEGCLASS(SLICES_SEG000,SLICES_CODE) -#define fuconpol_07 SEG_SEGCLASS(SLICES_SEG000,SLICES_CODE) -#define app6_06 SEG_SEGCLASS(SLICES_SEG000,SLICES_CODE) -#define futext_0f SEG_SEGCLASS(SLICES_SEG000,SLICES_CODE) -#define fuconrec_07 SEG_SEGCLASS(SLICES_SEG000,SLICES_CODE) -#define futext_0d SEG_SEGCLASS(SLICES_SEG000,SLICES_CODE) -#define futext_03 SEG_SEGCLASS(SLICES_SEG000,SLICES_CODE) -#define sdview_14 SEG_SEGCLASS(SLICES_SEG000,SLICES_CODE) -#define futext_0e SEG_SEGCLASS(SLICES_SEG000,SLICES_CODE) -#define futext_02 SEG_SEGCLASS(SLICES_SEG000,SLICES_CODE) -#define futext_10 SEG_SEGCLASS(SLICES_SEG000,SLICES_CODE) -#define fuconbez_05 SEG_SEGCLASS(SLICES_SEG000,SLICES_CODE) -#define fuconstr_02 SEG_SEGCLASS(SLICES_SEG000,SLICES_CODE) -#define fuconpol_02 SEG_SEGCLASS(SLICES_SEG000,SLICES_CODE) -#define fuconpol_08 SEG_SEGCLASS(SLICES_SEG000,SLICES_CODE) -#define fuconstr_08 SEG_SEGCLASS(SLICES_SEG000,SLICES_CODE) -#define fuconrec_08 SEG_SEGCLASS(SLICES_SEG000,SLICES_CODE) -#define futext_09 SEG_SEGCLASS(SLICES_SEG000,SLICES_CODE) -#define fuconstr_01 SEG_SEGCLASS(SLICES_SEG000,SLICES_CODE) -#define fuconpol_01 SEG_SEGCLASS(SLICES_SEG000,SLICES_CODE) -#define fudraw_0d SEG_SEGCLASS(SLICES_SEG001,SLICES_CODE) -#define fupoor_0d SEG_SEGCLASS(SLICES_SEG001,SLICES_CODE) -#define futext_11 SEG_SEGCLASS(SLICES_SEG001,SLICES_CODE) -#define sdwindow_1d SEG_SEGCLASS(SLICES_SEG001,SLICES_CODE) -#define sdwindow_1f SEG_SEGCLASS(SLICES_SEG001,SLICES_CODE) -#define drviews1_08 SEG_SEGCLASS(SLICES_SEG001,SLICES_CODE) -#define sdview2_05 SEG_SEGCLASS(SLICES_SEG001,SLICES_CODE) -#define fuoutl_03 SEG_SEGCLASS(SLICES_SEG001,SLICES_CODE) -#define sdwindow_1e SEG_SEGCLASS(SLICES_SEG001,SLICES_CODE) -#define viewshe2_13 SEG_SEGCLASS(SLICES_SEG001,SLICES_CODE) -#define outlview_08 SEG_SEGCLASS(SLICES_SEG001,SLICES_CODE) -#define outlview_0e SEG_SEGCLASS(SLICES_SEG001,SLICES_CODE) -#define drawdoc2_0b SEG_SEGCLASS(SLICES_SEG001,SLICES_CODE) -#define outlview_0d SEG_SEGCLASS(SLICES_SEG001,SLICES_CODE) -#define outlnvsh_0e SEG_SEGCLASS(SLICES_SEG001,SLICES_CODE) -#define viewshe2_1c SEG_SEGCLASS(SLICES_SEG001,SLICES_CODE) -#define sdwindow_22 SEG_SEGCLASS(SLICES_SEG001,SLICES_CODE) -#define drviews1_09 SEG_SEGCLASS(SLICES_SEG001,SLICES_CODE) -#define sdview2_06 SEG_SEGCLASS(SLICES_SEG001,SLICES_CODE) -#define outlview_1a SEG_SEGCLASS(SLICES_SEG001,SLICES_CODE) -#define fuoltext_09 SEG_SEGCLASS(SLICES_SEG001,SLICES_CODE) -#define fuoltext_0b SEG_SEGCLASS(SLICES_SEG001,SLICES_CODE) -#define viewshe2_12 SEG_SEGCLASS(SLICES_SEG001,SLICES_CODE) -#define outlview_07 SEG_SEGCLASS(SLICES_SEG001,SLICES_CODE) -#define outlview_10 SEG_SEGCLASS(SLICES_SEG001,SLICES_CODE) -#define outlview_11 SEG_SEGCLASS(SLICES_SEG001,SLICES_CODE) -#define drawdoc2_0f SEG_SEGCLASS(SLICES_SEG001,SLICES_CODE) -#define fubullet_01 SEG_SEGCLASS(SLICES_SEG001,SLICES_CODE) -#define drviews4_05 SEG_SEGCLASS(SLICES_SEG002,SLICES_CODE) -#define showwin_03 SEG_SEGCLASS(SLICES_SEG002,SLICES_CODE) -#define fuslshow_0c SEG_SEGCLASS(SLICES_SEG002,SLICES_CODE) -#define fupoor_08 SEG_SEGCLASS(SLICES_SEG002,SLICES_CODE) -#define fusel_06 SEG_SEGCLASS(SLICES_SEG003,SLICES_CODE) -#define sdpage_02 SEG_SEGCLASS(SLICES_SEG003,SLICES_CODE) -#define sdpage2_02 SEG_SEGCLASS(SLICES_SEG003,SLICES_CODE) -#define drawdoc_02 SEG_SEGCLASS(SLICES_SEG003,SLICES_CODE) -#define docshel4_0f SEG_SEGCLASS(SLICES_SEG003,SLICES_CODE) -#define drawdoc3_06 SEG_SEGCLASS(SLICES_SEG003,SLICES_CODE) -#define drawdoc3_0a SEG_SEGCLASS(SLICES_SEG003,SLICES_CODE) -#define docshell_05 SEG_SEGCLASS(SLICES_SEG003,SLICES_CODE) -#define stlsheet_02 SEG_SEGCLASS(SLICES_SEG003,SLICES_CODE) -#define stlpool_02 SEG_SEGCLASS(SLICES_SEG003,SLICES_CODE) -#define stlpool_06 SEG_SEGCLASS(SLICES_SEG003,SLICES_CODE) -#define dragserv_03 SEG_SEGCLASS(SLICES_SEG003,SLICES_CODE) -#define drawdoc_06 SEG_SEGCLASS(SLICES_SEG003,SLICES_CODE) -#define drawdoc3_08 SEG_SEGCLASS(SLICES_SEG003,SLICES_CODE) -#define sdoutl_02 SEG_SEGCLASS(SLICES_SEG003,SLICES_CODE) -#define stlpool_05 SEG_SEGCLASS(SLICES_SEG003,SLICES_CODE) -#define fuprlout_01 SEG_SEGCLASS(SLICES_SEG003,SLICES_CODE) -#define drawdoc_03 SEG_SEGCLASS(SLICES_SEG003,SLICES_CODE) -#define sdpage_18 SEG_SEGCLASS(SLICES_SEG003,SLICES_CODE) -#define sdpage2_01 SEG_SEGCLASS(SLICES_SEG003,SLICES_CODE) -#define drawview_07 SEG_SEGCLASS(SLICES_SEG003,SLICES_CODE) -#define docshel4_0c SEG_SEGCLASS(SLICES_SEG003,SLICES_CODE) -#define sdiocmpt_01 SEG_SEGCLASS(SLICES_SEG003,SLICES_CODE) -#define frmview_06 SEG_SEGCLASS(SLICES_SEG003,SLICES_CODE) -#define stlsheet_03 SEG_SEGCLASS(SLICES_SEG003,SLICES_CODE) -#define sdpage2_03 SEG_SEGCLASS(SLICES_SEG003,SLICES_CODE) -#define drawdoc_05 SEG_SEGCLASS(SLICES_SEG003,SLICES_CODE) -#define docshel4_1e SEG_SEGCLASS(SLICES_SEG003,SLICES_CODE) -#define frmview_05 SEG_SEGCLASS(SLICES_SEG003,SLICES_CODE) -#define drawdoc2_11 SEG_SEGCLASS(SLICES_SEG003,SLICES_CODE) -#define drawdoc2_14 SEG_SEGCLASS(SLICES_SEG003,SLICES_CODE) -#define docshel4_14 SEG_SEGCLASS(SLICES_SEG003,SLICES_CODE) -#define docshel4_0d SEG_SEGCLASS(SLICES_SEG003,SLICES_CODE) -#define stlsheet_04 SEG_SEGCLASS(SLICES_SEG003,SLICES_CODE) -#define viewshe2_1f SEG_SEGCLASS(SLICES_SEG003,SLICES_CODE) -#define app6_0a SEG_SEGCLASS(SLICES_SEG003,SLICES_CODE) -#define sdobjpal_12 SEG_SEGCLASS(SLICES_SEG003,SLICES_CODE) -#define sdobjpal_11 SEG_SEGCLASS(SLICES_SEG003,SLICES_CODE) -#define sdobjpal_14 SEG_SEGCLASS(SLICES_SEG003,SLICES_CODE) -#define sdobjpal_06 SEG_SEGCLASS(SLICES_SEG003,SLICES_CODE) -#define sdobjpal_02 SEG_SEGCLASS(SLICES_SEG003,SLICES_CODE) -#define app6_05 SEG_SEGCLASS(SLICES_SEG003,SLICES_CODE) -#define sdobjpal_04 SEG_SEGCLASS(SLICES_SEG003,SLICES_CODE) -#define sdview_0c SEG_SEGCLASS(SLICES_SEG004,SLICES_CODE) -#define sdobjpal_17 SEG_SEGCLASS(SLICES_SEG004,SLICES_CODE) -#define sdobjpal_0c SEG_SEGCLASS(SLICES_SEG004,SLICES_CODE) -#define sdobjpal_01 SEG_SEGCLASS(SLICES_SEG004,SLICES_CODE) -#define sdobjpal_0d SEG_SEGCLASS(SLICES_SEG004,SLICES_CODE) -#define app6_07 SEG_SEGCLASS(SLICES_SEG004,SLICES_CODE) -#define app6_0b SEG_SEGCLASS(SLICES_SEG004,SLICES_CODE) -#define drviews6_03 SEG_SEGCLASS(SLICES_SEG004,SLICES_CODE) -#define sdobjpal_10 SEG_SEGCLASS(SLICES_SEG004,SLICES_CODE) -#define drviews6_04 SEG_SEGCLASS(SLICES_SEG004,SLICES_CODE) -#define sdobjpal_0e SEG_SEGCLASS(SLICES_SEG004,SLICES_CODE) -#define app6_08 SEG_SEGCLASS(SLICES_SEG004,SLICES_CODE) -#define sdobjpal_0f SEG_SEGCLASS(SLICES_SEG004,SLICES_CODE) -#define fuconstr_03 SEG_SEGCLASS(SLICES_SEG005,SLICES_CODE) -#define fuconrec_03 SEG_SEGCLASS(SLICES_SEG005,SLICES_CODE) -#define fuconbez_03 SEG_SEGCLASS(SLICES_SEG005,SLICES_CODE) -#define fuconarc_03 SEG_SEGCLASS(SLICES_SEG005,SLICES_CODE) -#define futext_12 SEG_SEGCLASS(SLICES_SEG006,SLICES_CODE) -#define frmview_02 SEG_SEGCLASS(SLICES_SEG006,SLICES_CODE) -#define fuconrec_04 SEG_SEGCLASS(SLICES_SEG006,SLICES_CODE) -#define viewshe2_0a SEG_SEGCLASS(SLICES_SEG006,SLICES_CODE) -#define drviews3_01 SEG_SEGCLASS(SLICES_SEG006,SLICES_CODE) -#define drawdoc2_10 SEG_SEGCLASS(SLICES_SEG007,SLICES_CODE) -#define fuoltext_03 SEG_SEGCLASS(SLICES_SEG007,SLICES_CODE) -#define fuoltext_05 SEG_SEGCLASS(SLICES_SEG007,SLICES_CODE) -#define fuconrec_01 SEG_SEGCLASS(SLICES_SEG007,SLICES_CODE) -#define fuconrec_02 SEG_SEGCLASS(SLICES_SEG007,SLICES_CODE) -#define sdview_0f SEG_SEGCLASS(SLICES_SEG008,SLICES_CODE) -#define drtxtob_03 SEG_SEGCLASS(SLICES_SEG008,SLICES_CODE) -#define outlview_15 SEG_SEGCLASS(SLICES_SEG008,SLICES_CODE) -#define fuchar_01 SEG_SEGCLASS(SLICES_SEG008,SLICES_CODE) -#define dlgchar_01 SEG_SEGCLASS(SLICES_SEG008,SLICES_CODE) -#define dlgchar_02 SEG_SEGCLASS(SLICES_SEG008,SLICES_CODE) -#define fuolbull_01 SEG_SEGCLASS(SLICES_SEG008,SLICES_CODE) -#define enumdlg_02 SEG_SEGCLASS(SLICES_SEG008,SLICES_CODE) -#define enumdlg_04 SEG_SEGCLASS(SLICES_SEG008,SLICES_CODE) -#define dlgolbul_01 SEG_SEGCLASS(SLICES_SEG008,SLICES_CODE) -#define enumdlg_03 SEG_SEGCLASS(SLICES_SEG008,SLICES_CODE) -#define enumdlg_07 SEG_SEGCLASS(SLICES_SEG008,SLICES_CODE) -#define enumdlg_05 SEG_SEGCLASS(SLICES_SEG008,SLICES_CODE) -#define enumdlg_0f SEG_SEGCLASS(SLICES_SEG008,SLICES_CODE) -#define enumdlg_10 SEG_SEGCLASS(SLICES_SEG008,SLICES_CODE) -#define enumdlg_0b SEG_SEGCLASS(SLICES_SEG008,SLICES_CODE) -#define enumdlg_06 SEG_SEGCLASS(SLICES_SEG008,SLICES_CODE) -#define enumdlg_01 SEG_SEGCLASS(SLICES_SEG008,SLICES_CODE) -#define enumdlg_0c SEG_SEGCLASS(SLICES_SEG008,SLICES_CODE) -#define enumdlg_09 SEG_SEGCLASS(SLICES_SEG008,SLICES_CODE) -#define enumdlg_0a SEG_SEGCLASS(SLICES_SEG008,SLICES_CODE) -#define enumdlg_0d SEG_SEGCLASS(SLICES_SEG008,SLICES_CODE) -#define enumdlg_0e SEG_SEGCLASS(SLICES_SEG008,SLICES_CODE) -#define sdpage_07 SEG_SEGCLASS(SLICES_SEG009,SLICES_CODE) -#define app1_03 SEG_SEGCLASS(SLICES_SEG009,SLICES_CODE) -#define newfoil_01 SEG_SEGCLASS(SLICES_SEG009,SLICES_CODE) -#define newfoil_03 SEG_SEGCLASS(SLICES_SEG009,SLICES_CODE) -#define newfoil_07 SEG_SEGCLASS(SLICES_SEG009,SLICES_CODE) -#define newfoil_05 SEG_SEGCLASS(SLICES_SEG009,SLICES_CODE) -#define newfoil_02 SEG_SEGCLASS(SLICES_SEG010,SLICES_CODE) -#define newfoil_04 SEG_SEGCLASS(SLICES_SEG010,SLICES_CODE) -#define newfoil_06 SEG_SEGCLASS(SLICES_SEG010,SLICES_CODE) -#define futext_07 SEG_SEGCLASS(SLICES_SEG010,SLICES_CODE) -#define app_02 SEG_SEGCLASS(SLICES_SEG010,SLICES_CODE) -#define sdobjpal_03 SEG_SEGCLASS(SLICES_SEG011,SLICES_CODE) -#define sdobjpal_13 SEG_SEGCLASS(SLICES_SEG011,SLICES_CODE) -#define tabcontr_03 SEG_SEGCLASS(SLICES_SEG011,SLICES_CODE) -#define fuconpol_04 SEG_SEGCLASS(SLICES_SEG011,SLICES_CODE) -#define app2_02 SEG_SEGCLASS(SLICES_SEG011,SLICES_CODE) -#define app1_02 SEG_SEGCLASS(SLICES_SEG011,SLICES_CODE) -#define app6_02 SEG_SEGCLASS(SLICES_SEG011,SLICES_CODE) -#define app2_07 SEG_SEGCLASS(SLICES_SEG012,SLICES_CODE) -#define outlnvsh_1d SEG_SEGCLASS(SLICES_SEG012,SLICES_CODE) -#define drviews1_07 SEG_SEGCLASS(SLICES_SEG012,SLICES_CODE) -#define fuconbez_04 SEG_SEGCLASS(SLICES_SEG012,SLICES_CODE) -#define fupoor_0e SEG_SEGCLASS(SLICES_SEG012,SLICES_CODE) -#define app_08 SEG_SEGCLASS(SLICES_SEG013,SLICES_CODE) -#define sdobjpal_19 SEG_SEGCLASS(SLICES_SEG013,SLICES_CODE) -#define tbxww_01 SEG_SEGCLASS(SLICES_SEG013,SLICES_CODE) -#define tbxww_06 SEG_SEGCLASS(SLICES_SEG013,SLICES_CODE) -#define tbxww_07 SEG_SEGCLASS(SLICES_SEG013,SLICES_CODE) -#define tbxww_05 SEG_SEGCLASS(SLICES_SEG014,SLICES_CODE) -#define fupoor_10 SEG_SEGCLASS(SLICES_SEG014,SLICES_CODE) -#define unchss_01 SEG_SEGCLASS(SLICES_SEG014,SLICES_CODE) -#define drviews6_09 SEG_SEGCLASS(SLICES_SEG014,SLICES_CODE) -#define fuslshow_03 SEG_SEGCLASS(SLICES_SEG014,SLICES_CODE) -#define fader_06 SEG_SEGCLASS(SLICES_SEG014,SLICES_CODE) -#define fader_0e SEG_SEGCLASS(SLICES_SEG014,SLICES_CODE) -#define fader_11 SEG_SEGCLASS(SLICES_SEG014,SLICES_CODE) -#define fader_13 SEG_SEGCLASS(SLICES_SEG014,SLICES_CODE) -#define fader_07 SEG_SEGCLASS(SLICES_SEG014,SLICES_CODE) -#define fuslshow_07 SEG_SEGCLASS(SLICES_SEG014,SLICES_CODE) -#define showview_01 SEG_SEGCLASS(SLICES_SEG014,SLICES_CODE) -#define showwin_07 SEG_SEGCLASS(SLICES_SEG014,SLICES_CODE) -#define fuslshow_11 SEG_SEGCLASS(SLICES_SEG014,SLICES_CODE) -#define fuslshow_0d SEG_SEGCLASS(SLICES_SEG014,SLICES_CODE) -#define fader_1b SEG_SEGCLASS(SLICES_SEG014,SLICES_CODE) -#define fader_08 SEG_SEGCLASS(SLICES_SEG014,SLICES_CODE) -#define fader_15 SEG_SEGCLASS(SLICES_SEG014,SLICES_CODE) -#define fader_16 SEG_SEGCLASS(SLICES_SEG014,SLICES_CODE) -#define fader_1a SEG_SEGCLASS(SLICES_SEG014,SLICES_CODE) -#define showwin_05 SEG_SEGCLASS(SLICES_SEG014,SLICES_CODE) -#define fuslshow_08 SEG_SEGCLASS(SLICES_SEG014,SLICES_CODE) -#define fuslshw2_0b SEG_SEGCLASS(SLICES_SEG014,SLICES_CODE) -#define showview_03 SEG_SEGCLASS(SLICES_SEG014,SLICES_CODE) -#define showview_06 SEG_SEGCLASS(SLICES_SEG014,SLICES_CODE) -#define showview_04 SEG_SEGCLASS(SLICES_SEG014,SLICES_CODE) -#define fuslshw2_01 SEG_SEGCLASS(SLICES_SEG014,SLICES_CODE) -#define fuslshow_0b SEG_SEGCLASS(SLICES_SEG014,SLICES_CODE) -#define fuslshw3_02 SEG_SEGCLASS(SLICES_SEG014,SLICES_CODE) -#define fuslshow_14 SEG_SEGCLASS(SLICES_SEG014,SLICES_CODE) -#define fuslshow_0a SEG_SEGCLASS(SLICES_SEG014,SLICES_CODE) -#define fuslshw3_01 SEG_SEGCLASS(SLICES_SEG014,SLICES_CODE) -#define fuslshow_12 SEG_SEGCLASS(SLICES_SEG014,SLICES_CODE) -#define fuslshw2_0c SEG_SEGCLASS(SLICES_SEG014,SLICES_CODE) -#define fuslshw3_08 SEG_SEGCLASS(SLICES_SEG014,SLICES_CODE) -#define fuslshw3_0b SEG_SEGCLASS(SLICES_SEG014,SLICES_CODE) -#define fuslshw3_0c SEG_SEGCLASS(SLICES_SEG014,SLICES_CODE) -#define fuslshw2_10 SEG_SEGCLASS(SLICES_SEG014,SLICES_CODE) -#define fuslshw3_12 SEG_SEGCLASS(SLICES_SEG014,SLICES_CODE) -#define fuslshw2_0e SEG_SEGCLASS(SLICES_SEG014,SLICES_CODE) -#define fuslshw3_09 SEG_SEGCLASS(SLICES_SEG014,SLICES_CODE) -#define fuslshw2_02 SEG_SEGCLASS(SLICES_SEG014,SLICES_CODE) -#define fader_21 SEG_SEGCLASS(SLICES_SEG014,SLICES_CODE) -#define fader_22 SEG_SEGCLASS(SLICES_SEG014,SLICES_CODE) -#define fuslshw2_0f SEG_SEGCLASS(SLICES_SEG014,SLICES_CODE) -#define fader_0f SEG_SEGCLASS(SLICES_SEG014,SLICES_CODE) -#define tbxww_02 SEG_SEGCLASS(SLICES_SEG015,SLICES_CODE) -#define drviews1_19 SEG_SEGCLASS(SLICES_SEG015,SLICES_CODE) -#define fupage_01 SEG_SEGCLASS(SLICES_SEG015,SLICES_CODE) -#define viewshe2_20 SEG_SEGCLASS(SLICES_SEG015,SLICES_CODE) -#define drawdoc2_06 SEG_SEGCLASS(SLICES_SEG015,SLICES_CODE) -#define dlgpage_01 SEG_SEGCLASS(SLICES_SEG015,SLICES_CODE) -#define sdundogr_05 SEG_SEGCLASS(SLICES_SEG015,SLICES_CODE) -#define fuconbez_07 SEG_SEGCLASS(SLICES_SEG016,SLICES_CODE) -#define fuconstr_06 SEG_SEGCLASS(SLICES_SEG016,SLICES_CODE) -#define fuconrec_06 SEG_SEGCLASS(SLICES_SEG016,SLICES_CODE) -#define fuconbez_06 SEG_SEGCLASS(SLICES_SEG016,SLICES_CODE) -#define fudraw_0c SEG_SEGCLASS(SLICES_SEG016,SLICES_CODE) -#define fuslshow_01 SEG_SEGCLASS(SLICES_SEG016,SLICES_CODE) -#define drawdoc_08 SEG_SEGCLASS(SLICES_SEG016,SLICES_CODE) -#define drawdoc_09 SEG_SEGCLASS(SLICES_SEG016,SLICES_CODE) -#define drawdoc_0a SEG_SEGCLASS(SLICES_SEG016,SLICES_CODE) -#define drawdoc_0b SEG_SEGCLASS(SLICES_SEG016,SLICES_CODE) -#define drawdoc_0c SEG_SEGCLASS(SLICES_SEG016,SLICES_CODE) -#define present_01 SEG_SEGCLASS(SLICES_SEG016,SLICES_CODE) -#define present_03 SEG_SEGCLASS(SLICES_SEG016,SLICES_CODE) -#define present_04 SEG_SEGCLASS(SLICES_SEG016,SLICES_CODE) -#define present_02 SEG_SEGCLASS(SLICES_SEG016,SLICES_CODE) -#define fuslshow_02 SEG_SEGCLASS(SLICES_SEG017,SLICES_CODE) -#define fader_02 SEG_SEGCLASS(SLICES_SEG017,SLICES_CODE) -#define mover_02 SEG_SEGCLASS(SLICES_SEG017,SLICES_CODE) -#define showview_02 SEG_SEGCLASS(SLICES_SEG017,SLICES_CODE) -#define fuslshow_0e SEG_SEGCLASS(SLICES_SEG018,SLICES_CODE) -#define fuslshow_0f SEG_SEGCLASS(SLICES_SEG018,SLICES_CODE) -#define docshel4_11 SEG_SEGCLASS(SLICES_SEG018,SLICES_CODE) -#define docshel4_16 SEG_SEGCLASS(SLICES_SEG018,SLICES_CODE) -#define app6_03 SEG_SEGCLASS(SLICES_SEG018,SLICES_CODE) -#define sdobjpal_21 SEG_SEGCLASS(SLICES_SEG018,SLICES_CODE) -#define app6_04 SEG_SEGCLASS(SLICES_SEG018,SLICES_CODE) -#define fuedibez_03 SEG_SEGCLASS(SLICES_SEG019,SLICES_CODE) -#define fuedibez_0a SEG_SEGCLASS(SLICES_SEG019,SLICES_CODE) -#define fuedibez_04 SEG_SEGCLASS(SLICES_SEG019,SLICES_CODE) -#define fuedibez_05 SEG_SEGCLASS(SLICES_SEG019,SLICES_CODE) -#define fuconbez_01 SEG_SEGCLASS(SLICES_SEG020,SLICES_CODE) -#define fuconbez_08 SEG_SEGCLASS(SLICES_SEG020,SLICES_CODE) -#define fader_01 SEG_SEGCLASS(SLICES_SEG020,SLICES_CODE) -#define fupoor_09 SEG_SEGCLASS(SLICES_SEG020,SLICES_CODE) -#define sdview2_01 SEG_SEGCLASS(SLICES_SEG020,SLICES_CODE) -#define mover_01 SEG_SEGCLASS(SLICES_SEG020,SLICES_CODE) -#define showwin_01 SEG_SEGCLASS(SLICES_SEG020,SLICES_CODE) -#define showwin_02 SEG_SEGCLASS(SLICES_SEG020,SLICES_CODE) -#define dragserv_02 SEG_SEGCLASS(SLICES_SEG021,SLICES_CODE) -#define dragserv_04 SEG_SEGCLASS(SLICES_SEG021,SLICES_CODE) -#define dragserv_05 SEG_SEGCLASS(SLICES_SEG021,SLICES_CODE) -#define dragserv_06 SEG_SEGCLASS(SLICES_SEG021,SLICES_CODE) -#define dragserv_08 SEG_SEGCLASS(SLICES_SEG021,SLICES_CODE) -#define stlpool_09 SEG_SEGCLASS(SLICES_SEG022,SLICES_CODE) -#define stlpool_0a SEG_SEGCLASS(SLICES_SEG022,SLICES_CODE) -#define drviews6_08 SEG_SEGCLASS(SLICES_SEG023,SLICES_CODE) -#define fuslshow_09 SEG_SEGCLASS(SLICES_SEG023,SLICES_CODE) -#define fuedibez_07 SEG_SEGCLASS(SLICES_SEG024,SLICES_CODE) -#define fuconbez_02 SEG_SEGCLASS(SLICES_SEG024,SLICES_CODE) -#define fupoor_0b SEG_SEGCLASS(SLICES_SEG024,SLICES_CODE) -#define sdview2_03 SEG_SEGCLASS(SLICES_SEG024,SLICES_CODE) -#define showwin_04 SEG_SEGCLASS(SLICES_SEG025,SLICES_CODE) -#define showwin_06 SEG_SEGCLASS(SLICES_SEG025,SLICES_CODE) -#define fuinsert_01 SEG_SEGCLASS(SLICES_SEG025,SLICES_CODE) -#define graphpro_01 SEG_SEGCLASS(SLICES_SEG025,SLICES_CODE) -#define graphpro_02 SEG_SEGCLASS(SLICES_SEG025,SLICES_CODE) -#define graphpro_03 SEG_SEGCLASS(SLICES_SEG025,SLICES_CODE) -#define fuinsert_02 SEG_SEGCLASS(SLICES_SEG026,SLICES_CODE) -#define fuprlout_02 SEG_SEGCLASS(SLICES_SEG026,SLICES_CODE) -#define fucopy_02 SEG_SEGCLASS(SLICES_SEG026,SLICES_CODE) -#define fucopy_04 SEG_SEGCLASS(SLICES_SEG026,SLICES_CODE) -#define fuline_01 SEG_SEGCLASS(SLICES_SEG026,SLICES_CODE) -#define unprlout_01 SEG_SEGCLASS(SLICES_SEG027,SLICES_CODE) -#define unmovss_01 SEG_SEGCLASS(SLICES_SEG027,SLICES_CODE) -#define stlsheet_08 SEG_SEGCLASS(SLICES_SEG027,SLICES_CODE) -#define copydlg_01 SEG_SEGCLASS(SLICES_SEG027,SLICES_CODE) -#define copydlg_03 SEG_SEGCLASS(SLICES_SEG027,SLICES_CODE) -#define copydlg_02 SEG_SEGCLASS(SLICES_SEG028,SLICES_CODE) -#define copydlg_04 SEG_SEGCLASS(SLICES_SEG028,SLICES_CODE) -#define docshell_0c SEG_SEGCLASS(SLICES_SEG029,SLICES_CODE) -#define docshel3_01 SEG_SEGCLASS(SLICES_SEG029,SLICES_CODE) -#define fusearch_01 SEG_SEGCLASS(SLICES_SEG029,SLICES_CODE) -#define sdoutl_03 SEG_SEGCLASS(SLICES_SEG029,SLICES_CODE) -#define app2_04 SEG_SEGCLASS(SLICES_SEG029,SLICES_CODE) -#define sdoutl_04 SEG_SEGCLASS(SLICES_SEG029,SLICES_CODE) -#define fusearch_02 SEG_SEGCLASS(SLICES_SEG029,SLICES_CODE) -#define fuspell_01 SEG_SEGCLASS(SLICES_SEG029,SLICES_CODE) -#define fuspell_02 SEG_SEGCLASS(SLICES_SEG029,SLICES_CODE) -#define fusearch_03 SEG_SEGCLASS(SLICES_SEG029,SLICES_CODE) -#define sdoutl_07 SEG_SEGCLASS(SLICES_SEG029,SLICES_CODE) -#define fuspell_03 SEG_SEGCLASS(SLICES_SEG029,SLICES_CODE) -#define sdoutl_05 SEG_SEGCLASS(SLICES_SEG029,SLICES_CODE) -#define viewshe2_04 SEG_SEGCLASS(SLICES_SEG030,SLICES_CODE) -#define viewshe2_05 SEG_SEGCLASS(SLICES_SEG030,SLICES_CODE) -#define sdwindow_16 SEG_SEGCLASS(SLICES_SEG030,SLICES_CODE) -#define outlnvsh_13 SEG_SEGCLASS(SLICES_SEG030,SLICES_CODE) -#define viewshe2_0e SEG_SEGCLASS(SLICES_SEG031,SLICES_CODE) -#define fuzoom_04 SEG_SEGCLASS(SLICES_SEG031,SLICES_CODE) -#define fuzoom_05 SEG_SEGCLASS(SLICES_SEG031,SLICES_CODE) -#define outlnvsh_16 SEG_SEGCLASS(SLICES_SEG031,SLICES_CODE) -#define fuzoom_01 SEG_SEGCLASS(SLICES_SEG032,SLICES_CODE) -#define fuzoom_02 SEG_SEGCLASS(SLICES_SEG032,SLICES_CODE) -#define fuzoom_03 SEG_SEGCLASS(SLICES_SEG032,SLICES_CODE) -#define fuzoom_07 SEG_SEGCLASS(SLICES_SEG032,SLICES_CODE) -#define fuzoom_08 SEG_SEGCLASS(SLICES_SEG032,SLICES_CODE) -#define fuolbull_02 SEG_SEGCLASS(SLICES_SEG032,SLICES_CODE) -#define fuolbull_04 SEG_SEGCLASS(SLICES_SEG032,SLICES_CODE) -#define newfoil_08 SEG_SEGCLASS(SLICES_SEG032,SLICES_CODE) -#define app6_09 SEG_SEGCLASS(SLICES_SEG032,SLICES_CODE) -#define app6_01 SEG_SEGCLASS(SLICES_SEG032,SLICES_CODE) -#define docdlg_04 SEG_SEGCLASS(SLICES_SEG033,SLICES_CODE) -#define docdlg_05 SEG_SEGCLASS(SLICES_SEG033,SLICES_CODE) -#define drviews1_0d SEG_SEGCLASS(SLICES_SEG033,SLICES_CODE) -#define fuconarc_01 SEG_SEGCLASS(SLICES_SEG033,SLICES_CODE) -#define fuconarc_02 SEG_SEGCLASS(SLICES_SEG034,SLICES_CODE) -#define fuconarc_04 SEG_SEGCLASS(SLICES_SEG034,SLICES_CODE) -#define fuconarc_05 SEG_SEGCLASS(SLICES_SEG034,SLICES_CODE) -#define fuconarc_07 SEG_SEGCLASS(SLICES_SEG034,SLICES_CODE) -#define fuconarc_08 SEG_SEGCLASS(SLICES_SEG034,SLICES_CODE) -#define fuedibez_01 SEG_SEGCLASS(SLICES_SEG034,SLICES_CODE) -#define fuedibez_02 SEG_SEGCLASS(SLICES_SEG034,SLICES_CODE) -#define fuedibez_08 SEG_SEGCLASS(SLICES_SEG035,SLICES_CODE) -#define fupoor_0c SEG_SEGCLASS(SLICES_SEG035,SLICES_CODE) -#define fudspord_01 SEG_SEGCLASS(SLICES_SEG035,SLICES_CODE) -#define fudspord_02 SEG_SEGCLASS(SLICES_SEG035,SLICES_CODE) -#define fudspord_03 SEG_SEGCLASS(SLICES_SEG035,SLICES_CODE) -#define fudspord_04 SEG_SEGCLASS(SLICES_SEG035,SLICES_CODE) -#define fudspord_05 SEG_SEGCLASS(SLICES_SEG035,SLICES_CODE) -#define fudspord_07 SEG_SEGCLASS(SLICES_SEG035,SLICES_CODE) -#define fudspord_08 SEG_SEGCLASS(SLICES_SEG035,SLICES_CODE) -#define futempl_01 SEG_SEGCLASS(SLICES_SEG035,SLICES_CODE) -#define drawview_08 SEG_SEGCLASS(SLICES_SEG035,SLICES_CODE) -#define sdview_12 SEG_SEGCLASS(SLICES_SEG035,SLICES_CODE) -#define tabtempl_01 SEG_SEGCLASS(SLICES_SEG035,SLICES_CODE) -#define tabtempl_02 SEG_SEGCLASS(SLICES_SEG035,SLICES_CODE) -#define tabtempl_03 SEG_SEGCLASS(SLICES_SEG035,SLICES_CODE) -#define slidvish_01 SEG_SEGCLASS(SLICES_SEG036,SLICES_CODE) -#define slidvish_03 SEG_SEGCLASS(SLICES_SEG036,SLICES_CODE) -#define slidvish_0c SEG_SEGCLASS(SLICES_SEG036,SLICES_CODE) -#define fuslid_01 SEG_SEGCLASS(SLICES_SEG036,SLICES_CODE) -#define slidvish_18 SEG_SEGCLASS(SLICES_SEG036,SLICES_CODE) -#define slidview_05 SEG_SEGCLASS(SLICES_SEG036,SLICES_CODE) -#define slidview_12 SEG_SEGCLASS(SLICES_SEG036,SLICES_CODE) -#define slidview_06 SEG_SEGCLASS(SLICES_SEG036,SLICES_CODE) -#define slidview_0a SEG_SEGCLASS(SLICES_SEG036,SLICES_CODE) -#define slidview_11 SEG_SEGCLASS(SLICES_SEG036,SLICES_CODE) -#define slidview_01 SEG_SEGCLASS(SLICES_SEG036,SLICES_CODE) -#define slidview_09 SEG_SEGCLASS(SLICES_SEG036,SLICES_CODE) -#define slidview_04 SEG_SEGCLASS(SLICES_SEG036,SLICES_CODE) -#define slidview_0b SEG_SEGCLASS(SLICES_SEG036,SLICES_CODE) -#define slidvish_1c SEG_SEGCLASS(SLICES_SEG036,SLICES_CODE) -#define fuslsel_01 SEG_SEGCLASS(SLICES_SEG036,SLICES_CODE) -#define fuslsel_08 SEG_SEGCLASS(SLICES_SEG036,SLICES_CODE) -#define fuslid_06 SEG_SEGCLASS(SLICES_SEG036,SLICES_CODE) -#define drviews4_06 SEG_SEGCLASS(SLICES_SEG037,SLICES_CODE) -#define sdruler_05 SEG_SEGCLASS(SLICES_SEG037,SLICES_CODE) -#define viewshe2_1e SEG_SEGCLASS(SLICES_SEG037,SLICES_CODE) -#define fuslshow_13 SEG_SEGCLASS(SLICES_SEG037,SLICES_CODE) -#define fuinsfil_01 SEG_SEGCLASS(SLICES_SEG037,SLICES_CODE) -#define fuinsfil_07 SEG_SEGCLASS(SLICES_SEG037,SLICES_CODE) -#define fuinsfil_09 SEG_SEGCLASS(SLICES_SEG037,SLICES_CODE) -#define fuinsfil_02 SEG_SEGCLASS(SLICES_SEG038,SLICES_CODE) -#define fuinsfil_04 SEG_SEGCLASS(SLICES_SEG038,SLICES_CODE) -#define fuprtmpl_01 SEG_SEGCLASS(SLICES_SEG038,SLICES_CODE) -#define prlayout_01 SEG_SEGCLASS(SLICES_SEG038,SLICES_CODE) -#define prlayout_03 SEG_SEGCLASS(SLICES_SEG038,SLICES_CODE) -#define prlayout_05 SEG_SEGCLASS(SLICES_SEG038,SLICES_CODE) -#define prlayout_02 SEG_SEGCLASS(SLICES_SEG038,SLICES_CODE) -#define prlayout_04 SEG_SEGCLASS(SLICES_SEG038,SLICES_CODE) -#define prltempl_03 SEG_SEGCLASS(SLICES_SEG038,SLICES_CODE) -#define prltempl_01 SEG_SEGCLASS(SLICES_SEG038,SLICES_CODE) -#define prltempl_02 SEG_SEGCLASS(SLICES_SEG038,SLICES_CODE) -#define fuprtmpl_02 SEG_SEGCLASS(SLICES_SEG039,SLICES_CODE) -#define docshel4_19 SEG_SEGCLASS(SLICES_SEG039,SLICES_CODE) -#define sdobjpal_08 SEG_SEGCLASS(SLICES_SEG039,SLICES_CODE) -#define sdobjpal_09 SEG_SEGCLASS(SLICES_SEG040,SLICES_CODE) -#define sdobjpal_18 SEG_SEGCLASS(SLICES_SEG041,SLICES_CODE) -#define drviews1_05 SEG_SEGCLASS(SLICES_SEG041,SLICES_CODE) -#define drviews1_0c SEG_SEGCLASS(SLICES_SEG041,SLICES_CODE) -#define fuedibez_06 SEG_SEGCLASS(SLICES_SEG041,SLICES_CODE) -#define unmodpg_01 SEG_SEGCLASS(SLICES_SEG041,SLICES_CODE) -#define unmodpg_06 SEG_SEGCLASS(SLICES_SEG042,SLICES_CODE) -#define drviews5_02 SEG_SEGCLASS(SLICES_SEG042,SLICES_CODE) -#define drviews5_0c SEG_SEGCLASS(SLICES_SEG042,SLICES_CODE) -#define layertab_04 SEG_SEGCLASS(SLICES_SEG043,SLICES_CODE) -#define layertab_08 SEG_SEGCLASS(SLICES_SEG043,SLICES_CODE) -#define sdruler_07 SEG_SEGCLASS(SLICES_SEG043,SLICES_CODE) -#define futxtatt_01 SEG_SEGCLASS(SLICES_SEG043,SLICES_CODE) -#define fusnapln_01 SEG_SEGCLASS(SLICES_SEG043,SLICES_CODE) -#define dlgsnap_01 SEG_SEGCLASS(SLICES_SEG043,SLICES_CODE) -#define dlgsnap_03 SEG_SEGCLASS(SLICES_SEG043,SLICES_CODE) -#define inspage_05 SEG_SEGCLASS(SLICES_SEG044,SLICES_CODE) -#define inspage_06 SEG_SEGCLASS(SLICES_SEG044,SLICES_CODE) -#define sdpage_09 SEG_SEGCLASS(SLICES_SEG045,SLICES_CODE) -#define app_0b SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) -#define app_0c SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) -#define docshell_03 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) -#define drviewsh_02 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) -#define slidvish_04 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) -#define slidvish_05 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) -#define slidvish_06 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) -#define slidvish_07 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) -#define slidvish_08 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) -#define slidvish_09 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) -#define slidvish_0a SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) -#define slidvish_0b SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) -#define slidvish_0d SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) -#define slidvish_0e SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) -#define slidvish_0f SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) -#define slidvish_10 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) -#define slidvish_11 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) -#define slidvish_12 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) -#define slidvish_13 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) -#define slidvish_14 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) -#define slidvish_15 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) -#define slidvish_16 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) -#define slidvish_17 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) -#define slidvish_19 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) -#define slidvish_1a SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) -#define slidvish_1b SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) -#define slidvish_1d SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) -#define slidvish_1e SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) -#define slidvish_1f SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) -#define outlnvsh_04 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) -#define outlnvsh_07 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) -#define outlnvsh_0c SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) -#define outlnvsh_12 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) -#define outlnvsh_17 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) -#define outlnvsh_1b SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) -#define outlnvsh_1f SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) -#define outlnvsh_20 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) -#define sdobjfac_02 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) -#define drawdoc2_01 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) -#define drawdoc2_02 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) -#define drawdoc2_08 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) -#define drawdoc2_0a SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) -#define sdattr_09 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) -#define sdattr_0a SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) -#define sdattr_0b SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) -#define sdattr_0c SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) -#define sdattr_0d SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) -#define sdattr_0e SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) -#define sdattr_0f SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) -#define sdattr_10 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) -#define sdattr_11 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) -#define sdattr_12 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) -#define sdattr_13 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) -#define sdattr_14 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) -#define sdattr_15 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) -#define sdattr_16 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) -#define anminfo_01 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) -#define anminfo_02 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) -#define anminfo_03 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE) -#define anminfo_04 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE) -#define anminfo_05 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE) -#define anminfo_06 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE) -#define anminfo_07 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE) -#define anminfo_08 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE) -#define anminfo_09 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE) -#define app3_03 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE) -#define app4_03 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE) -#define app1_01 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE) -#define docshel3_02 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE) -#define drviews3_05 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE) -#define drviews3_07 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE) -#define drviews3_09 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE) -#define drviews9_01 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE) -#define drviews9_02 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE) -#define drviews9_03 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE) -#define drviews9_04 SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE) -#define drviews4_03 SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE) -#define drviews4_04 SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE) -#define drviews6_01 SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE) -#define drviews6_02 SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE) -#define drviews6_05 SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE) -#define drviews6_06 SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE) -#define drviews7_04 SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE) -#define drviews7_05 SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE) -#define drviews7_06 SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE) -#define drviewsa_04 SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE) -#define drviewsa_08 SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE) -#define drviewsa_09 SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE) -#define fuslsel_02 SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE) -#define fuslsel_03 SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE) -#define fuslsel_04 SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE) -#define fuslsel_05 SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE) -#define fuslsel_06 SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE) -#define fuslsel_07 SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE) -#define fuslsel_09 SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE) -#define fuslsel_0a SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE) -#define fuslsel_0c SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE) -#define fuslsel_0d SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE) -#define fuslsel_0e SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE) -#define fuslsel_0f SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE) -#define fuslsel_10 SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE) -#define fuslsel_11 SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE) -#define fuslsel_12 SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE) -#define viewshe2_02 SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE) -#define viewshe2_03 SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE) -#define viewshe2_06 SEG_SEGCLASS(UNUSED_SEG003,UNUSED_CODE) -#define viewshe2_0f SEG_SEGCLASS(UNUSED_SEG003,UNUSED_CODE) -#define viewshe2_14 SEG_SEGCLASS(UNUSED_SEG003,UNUSED_CODE) -#define viewshe2_17 SEG_SEGCLASS(UNUSED_SEG003,UNUSED_CODE) -#define viewshe2_18 SEG_SEGCLASS(UNUSED_SEG003,UNUSED_CODE) -#define viewshe2_19 SEG_SEGCLASS(UNUSED_SEG003,UNUSED_CODE) -#define viewshe2_1a SEG_SEGCLASS(UNUSED_SEG003,UNUSED_CODE) -#define slidview_02 SEG_SEGCLASS(UNUSED_SEG003,UNUSED_CODE) -#define slidview_03 SEG_SEGCLASS(UNUSED_SEG003,UNUSED_CODE) -#define slidview_07 SEG_SEGCLASS(UNUSED_SEG003,UNUSED_CODE) -#define slidview_08 SEG_SEGCLASS(UNUSED_SEG003,UNUSED_CODE) -#define slidview_0c SEG_SEGCLASS(UNUSED_SEG003,UNUSED_CODE) -#define slidview_0d SEG_SEGCLASS(UNUSED_SEG003,UNUSED_CODE) -#define slidview_0e SEG_SEGCLASS(UNUSED_SEG003,UNUSED_CODE) -#define slidview_0f SEG_SEGCLASS(UNUSED_SEG003,UNUSED_CODE) -#define slidview_10 SEG_SEGCLASS(UNUSED_SEG003,UNUSED_CODE) -#define fuslhide_01 SEG_SEGCLASS(UNUSED_SEG003,UNUSED_CODE) -#define fuslhide_02 SEG_SEGCLASS(UNUSED_SEG003,UNUSED_CODE) -#define fuslprms_01 SEG_SEGCLASS(UNUSED_SEG003,UNUSED_CODE) -#define fuslprms_02 SEG_SEGCLASS(UNUSED_SEG003,UNUSED_CODE) -#define fuslprms_03 SEG_SEGCLASS(UNUSED_SEG003,UNUSED_CODE) -#define fuslprms_04 SEG_SEGCLASS(UNUSED_SEG003,UNUSED_CODE) -#define fuslshow_05 SEG_SEGCLASS(UNUSED_SEG003,UNUSED_CODE) -#define fuslshow_06 SEG_SEGCLASS(UNUSED_SEG003,UNUSED_CODE) -#define fuslshow_15 SEG_SEGCLASS(UNUSED_SEG003,UNUSED_CODE) -#define fuslshow_16 SEG_SEGCLASS(UNUSED_SEG003,UNUSED_CODE) -#define viewshel_03 SEG_SEGCLASS(UNUSED_SEG003,UNUSED_CODE) -#define viewshel_0e SEG_SEGCLASS(UNUSED_SEG003,UNUSED_CODE) -#define viewshel_11 SEG_SEGCLASS(UNUSED_SEG003,UNUSED_CODE) -#define viewshel_14 SEG_SEGCLASS(UNUSED_SEG003,UNUSED_CODE) -#define fuzoom_06 SEG_SEGCLASS(UNUSED_SEG003,UNUSED_CODE) -#define fuscale_01 SEG_SEGCLASS(UNUSED_SEG004,UNUSED_CODE) -#define fuscale_02 SEG_SEGCLASS(UNUSED_SEG004,UNUSED_CODE) -#define fuscale_03 SEG_SEGCLASS(UNUSED_SEG004,UNUSED_CODE) -#define fuscale_04 SEG_SEGCLASS(UNUSED_SEG004,UNUSED_CODE) -#define fuslshw3_03 SEG_SEGCLASS(UNUSED_SEG004,UNUSED_CODE) -#define fuslshw3_04 SEG_SEGCLASS(UNUSED_SEG004,UNUSED_CODE) -#define fuslshw3_05 SEG_SEGCLASS(UNUSED_SEG004,UNUSED_CODE) -#define fuslshw3_06 SEG_SEGCLASS(UNUSED_SEG004,UNUSED_CODE) -#define fuslshw3_07 SEG_SEGCLASS(UNUSED_SEG004,UNUSED_CODE) -#define fuslshw3_0a SEG_SEGCLASS(UNUSED_SEG004,UNUSED_CODE) -#define fuslshw3_0d SEG_SEGCLASS(UNUSED_SEG004,UNUSED_CODE) -#define fuslshw3_0e SEG_SEGCLASS(UNUSED_SEG004,UNUSED_CODE) -#define fuslshw3_0f SEG_SEGCLASS(UNUSED_SEG004,UNUSED_CODE) -#define fuslshw3_10 SEG_SEGCLASS(UNUSED_SEG004,UNUSED_CODE) -#define fuslshw3_11 SEG_SEGCLASS(UNUSED_SEG004,UNUSED_CODE) -#define fuslshw3_13 SEG_SEGCLASS(UNUSED_SEG004,UNUSED_CODE) -#define fuoltext_0a SEG_SEGCLASS(UNUSED_SEG004,UNUSED_CODE) -#define outlview_04 SEG_SEGCLASS(UNUSED_SEG004,UNUSED_CODE) -#define outlview_05 SEG_SEGCLASS(UNUSED_SEG004,UNUSED_CODE) -#define outlview_06 SEG_SEGCLASS(UNUSED_SEG004,UNUSED_CODE) -#define outlview_17 SEG_SEGCLASS(UNUSED_SEG004,UNUSED_CODE) -#define futhes_01 SEG_SEGCLASS(UNUSED_SEG004,UNUSED_CODE) -#define futhes_02 SEG_SEGCLASS(UNUSED_SEG004,UNUSED_CODE) -#define fuinsfil_03 SEG_SEGCLASS(UNUSED_SEG004,UNUSED_CODE) -#define fuinsfil_05 SEG_SEGCLASS(UNUSED_SEG004,UNUSED_CODE) -#define fuinsfil_06 SEG_SEGCLASS(UNUSED_SEG004,UNUSED_CODE) -#define fuinsfil_08 SEG_SEGCLASS(UNUSED_SEG004,UNUSED_CODE) -#define fuprobjs_01 SEG_SEGCLASS(UNUSED_SEG004,UNUSED_CODE) -#define fuprobjs_02 SEG_SEGCLASS(UNUSED_SEG004,UNUSED_CODE) -#define fuolbull_03 SEG_SEGCLASS(UNUSED_SEG004,UNUSED_CODE) -#define docshel4_12 SEG_SEGCLASS(UNUSED_SEG004,UNUSED_CODE) -#define docshel4_1f SEG_SEGCLASS(UNUSED_SEG004,UNUSED_CODE) -#define app7_01 SEG_SEGCLASS(UNUSED_SEG004,UNUSED_CODE) -#define dlgass_01 SEG_SEGCLASS(UNUSED_SEG005,UNUSED_CODE) -#define dlgass_02 SEG_SEGCLASS(UNUSED_SEG005,UNUSED_CODE) -#define dlgass_03 SEG_SEGCLASS(UNUSED_SEG005,UNUSED_CODE) -#define dlgass_04 SEG_SEGCLASS(UNUSED_SEG005,UNUSED_CODE) -#define dlgass_05 SEG_SEGCLASS(UNUSED_SEG005,UNUSED_CODE) -#define dlgass_06 SEG_SEGCLASS(UNUSED_SEG005,UNUSED_CODE) -#define dlgass_07 SEG_SEGCLASS(UNUSED_SEG005,UNUSED_CODE) -#define dlgass_08 SEG_SEGCLASS(UNUSED_SEG005,UNUSED_CODE) -#define dlgass_09 SEG_SEGCLASS(UNUSED_SEG005,UNUSED_CODE) -#define dlgass_0a SEG_SEGCLASS(UNUSED_SEG005,UNUSED_CODE) -#define dlgass_0b SEG_SEGCLASS(UNUSED_SEG005,UNUSED_CODE) -#define dlgass_0c SEG_SEGCLASS(UNUSED_SEG005,UNUSED_CODE) -#define dlgass_0d SEG_SEGCLASS(UNUSED_SEG005,UNUSED_CODE) -#define dlgass_0e SEG_SEGCLASS(UNUSED_SEG005,UNUSED_CODE) -#define dlgass_0f SEG_SEGCLASS(UNUSED_SEG005,UNUSED_CODE) -#define dlgass_10 SEG_SEGCLASS(UNUSED_SEG005,UNUSED_CODE) -#define dlgass_11 SEG_SEGCLASS(UNUSED_SEG005,UNUSED_CODE) -#define dlgass_12 SEG_SEGCLASS(UNUSED_SEG005,UNUSED_CODE) -#define dlgass_13 SEG_SEGCLASS(UNUSED_SEG005,UNUSED_CODE) -#define splcfg_02 SEG_SEGCLASS(UNUSED_SEG005,UNUSED_CODE) -#define splcfg_03 SEG_SEGCLASS(UNUSED_SEG005,UNUSED_CODE) -#define optsitem_05 SEG_SEGCLASS(UNUSED_SEG005,UNUSED_CODE) -#define optsitem_08 SEG_SEGCLASS(UNUSED_SEG005,UNUSED_CODE) -#define optsitem_09 SEG_SEGCLASS(UNUSED_SEG006,UNUSED_CODE) -#define optsitem_0a SEG_SEGCLASS(UNUSED_SEG006,UNUSED_CODE) -#define optsitem_0b SEG_SEGCLASS(UNUSED_SEG006,UNUSED_CODE) -#define optsitem_0c SEG_SEGCLASS(UNUSED_SEG006,UNUSED_CODE) -#define optsitem_0d SEG_SEGCLASS(UNUSED_SEG006,UNUSED_CODE) -#define optsitem_0e SEG_SEGCLASS(UNUSED_SEG006,UNUSED_CODE) -#define optsitem_0f SEG_SEGCLASS(UNUSED_SEG006,UNUSED_CODE) -#define optsitem_10 SEG_SEGCLASS(UNUSED_SEG006,UNUSED_CODE) -#define optsitem_11 SEG_SEGCLASS(UNUSED_SEG006,UNUSED_CODE) -#define optsitem_12 SEG_SEGCLASS(UNUSED_SEG006,UNUSED_CODE) -#define optsitem_13 SEG_SEGCLASS(UNUSED_SEG006,UNUSED_CODE) -#define optsitem_15 SEG_SEGCLASS(UNUSED_SEG006,UNUSED_CODE) -#define optsitem_18 SEG_SEGCLASS(UNUSED_SEG006,UNUSED_CODE) -#define optsitem_19 SEG_SEGCLASS(UNUSED_SEG006,UNUSED_CODE) -#define animobjs_01 SEG_SEGCLASS(UNUSED_SEG006,UNUSED_CODE) -#define animobjs_03 SEG_SEGCLASS(UNUSED_SEG006,UNUSED_CODE) -#define animobjs_04 SEG_SEGCLASS(UNUSED_SEG006,UNUSED_CODE) -#define animobjs_05 SEG_SEGCLASS(UNUSED_SEG006,UNUSED_CODE) -#define animobjs_06 SEG_SEGCLASS(UNUSED_SEG006,UNUSED_CODE) -#define animobjs_07 SEG_SEGCLASS(UNUSED_SEG006,UNUSED_CODE) -#define animobjs_08 SEG_SEGCLASS(UNUSED_SEG006,UNUSED_CODE) -#define animobjs_0a SEG_SEGCLASS(UNUSED_SEG006,UNUSED_CODE) -#define animobjs_0b SEG_SEGCLASS(UNUSED_SEG006,UNUSED_CODE) -#define animobjs_0c SEG_SEGCLASS(UNUSED_SEG006,UNUSED_CODE) -#define animobjs_0d SEG_SEGCLASS(UNUSED_SEG006,UNUSED_CODE) -#define animobjs_0e SEG_SEGCLASS(UNUSED_SEG006,UNUSED_CODE) -#define animobjs_0f SEG_SEGCLASS(UNUSED_SEG006,UNUSED_CODE) -#define animobjs_10 SEG_SEGCLASS(UNUSED_SEG006,UNUSED_CODE) -#define animobjs_11 SEG_SEGCLASS(UNUSED_SEG006,UNUSED_CODE) -#define animobjs_12 SEG_SEGCLASS(UNUSED_SEG006,UNUSED_CODE) -#define animobjs_13 SEG_SEGCLASS(UNUSED_SEG006,UNUSED_CODE) -#define animobjs_14 SEG_SEGCLASS(UNUSED_SEG006,UNUSED_CODE) -#define animobjs_15 SEG_SEGCLASS(UNUSED_SEG006,UNUSED_CODE) -#define animobjs_16 SEG_SEGCLASS(UNUSED_SEG006,UNUSED_CODE) -#define animobjs_17 SEG_SEGCLASS(UNUSED_SEG006,UNUSED_CODE) -#define animobjs_18 SEG_SEGCLASS(UNUSED_SEG006,UNUSED_CODE) -#define animobjs_19 SEG_SEGCLASS(UNUSED_SEG006,UNUSED_CODE) -#define animobjs_1a SEG_SEGCLASS(UNUSED_SEG006,UNUSED_CODE) -#define diactrl_01 SEG_SEGCLASS(UNUSED_SEG006,UNUSED_CODE) -#define diactrl_02 SEG_SEGCLASS(UNUSED_SEG006,UNUSED_CODE) -#define diactrl_03 SEG_SEGCLASS(UNUSED_SEG007,UNUSED_CODE) -#define diactrl_04 SEG_SEGCLASS(UNUSED_SEG007,UNUSED_CODE) -#define diactrl_05 SEG_SEGCLASS(UNUSED_SEG007,UNUSED_CODE) -#define diactrl_06 SEG_SEGCLASS(UNUSED_SEG007,UNUSED_CODE) -#define diactrl_07 SEG_SEGCLASS(UNUSED_SEG007,UNUSED_CODE) -#define diactrl_08 SEG_SEGCLASS(UNUSED_SEG007,UNUSED_CODE) -#define diactrl_09 SEG_SEGCLASS(UNUSED_SEG007,UNUSED_CODE) -#define diactrl_0a SEG_SEGCLASS(UNUSED_SEG007,UNUSED_CODE) -#define diactrl_0b SEG_SEGCLASS(UNUSED_SEG007,UNUSED_CODE) -#define diactrl_0c SEG_SEGCLASS(UNUSED_SEG007,UNUSED_CODE) -#define diactrl_0d SEG_SEGCLASS(UNUSED_SEG007,UNUSED_CODE) -#define diactrl_0e SEG_SEGCLASS(UNUSED_SEG007,UNUSED_CODE) -#define diactrl_0f SEG_SEGCLASS(UNUSED_SEG007,UNUSED_CODE) -#define diactrl_10 SEG_SEGCLASS(UNUSED_SEG007,UNUSED_CODE) -#define diactrl_11 SEG_SEGCLASS(UNUSED_SEG007,UNUSED_CODE) -#define diactrl_12 SEG_SEGCLASS(UNUSED_SEG007,UNUSED_CODE) -#define diactrl_13 SEG_SEGCLASS(UNUSED_SEG007,UNUSED_CODE) -#define diactrl_14 SEG_SEGCLASS(UNUSED_SEG007,UNUSED_CODE) -#define diactrl_15 SEG_SEGCLASS(UNUSED_SEG007,UNUSED_CODE) -#define diactrl_16 SEG_SEGCLASS(UNUSED_SEG007,UNUSED_CODE) -#define diactrl_17 SEG_SEGCLASS(UNUSED_SEG007,UNUSED_CODE) -#define diactrl_18 SEG_SEGCLASS(UNUSED_SEG007,UNUSED_CODE) -#define diactrl_19 SEG_SEGCLASS(UNUSED_SEG007,UNUSED_CODE) -#define diactrl_1a SEG_SEGCLASS(UNUSED_SEG007,UNUSED_CODE) -#define diactrl_1b SEG_SEGCLASS(UNUSED_SEG007,UNUSED_CODE) -#define diactrl_1c SEG_SEGCLASS(UNUSED_SEG007,UNUSED_CODE) -#define diactrl_1d SEG_SEGCLASS(UNUSED_SEG007,UNUSED_CODE) -#define diactrl_1e SEG_SEGCLASS(UNUSED_SEG007,UNUSED_CODE) -#define diactrl_1f SEG_SEGCLASS(UNUSED_SEG007,UNUSED_CODE) -#define diactrl_20 SEG_SEGCLASS(UNUSED_SEG007,UNUSED_CODE) -#define diactrl_21 SEG_SEGCLASS(UNUSED_SEG007,UNUSED_CODE) -#define sdobjpal_05 SEG_SEGCLASS(UNUSED_SEG007,UNUSED_CODE) -#define sdobjpal_07 SEG_SEGCLASS(UNUSED_SEG007,UNUSED_CODE) -#define sdobjpal_0a SEG_SEGCLASS(UNUSED_SEG007,UNUSED_CODE) -#define sdobjpal_15 SEG_SEGCLASS(UNUSED_SEG007,UNUSED_CODE) -#define sdobjpal_16 SEG_SEGCLASS(UNUSED_SEG007,UNUSED_CODE) -#define sdobjpal_20 SEG_SEGCLASS(UNUSED_SEG007,UNUSED_CODE) -#define sdview_05 SEG_SEGCLASS(UNUSED_SEG007,UNUSED_CODE) -#define sdview_0d SEG_SEGCLASS(UNUSED_SEG007,UNUSED_CODE) -#define sdview_15 SEG_SEGCLASS(UNUSED_SEG007,UNUSED_CODE) -#define sdview_16 SEG_SEGCLASS(UNUSED_SEG007,UNUSED_CODE) -#define sdview_17 SEG_SEGCLASS(UNUSED_SEG007,UNUSED_CODE) -#define fuexhtml_01 SEG_SEGCLASS(UNUSED_SEG007,UNUSED_CODE) -#define fuexhtml_02 SEG_SEGCLASS(UNUSED_SEG007,UNUSED_CODE) -#define fuexhtml_03 SEG_SEGCLASS(UNUSED_SEG007,UNUSED_CODE) -#define fuexhtml_04 SEG_SEGCLASS(UNUSED_SEG007,UNUSED_CODE) -#define sdundogr_01 SEG_SEGCLASS(UNUSED_SEG007,UNUSED_CODE) -#define sdundogr_02 SEG_SEGCLASS(UNUSED_SEG007,UNUSED_CODE) -#define sdundogr_03 SEG_SEGCLASS(UNUSED_SEG007,UNUSED_CODE) -#define sdundogr_04 SEG_SEGCLASS(UNUSED_SEG007,UNUSED_CODE) -#define drviews1_0e SEG_SEGCLASS(UNUSED_SEG007,UNUSED_CODE) -#define drviews1_17 SEG_SEGCLASS(UNUSED_SEG007,UNUSED_CODE) -#define drviews1_18 SEG_SEGCLASS(UNUSED_SEG007,UNUSED_CODE) -#define drviews1_1a SEG_SEGCLASS(UNUSED_SEG008,UNUSED_CODE) -#define drviews1_1b SEG_SEGCLASS(UNUSED_SEG008,UNUSED_CODE) -#define undopage_01 SEG_SEGCLASS(UNUSED_SEG008,UNUSED_CODE) -#define undopage_02 SEG_SEGCLASS(UNUSED_SEG008,UNUSED_CODE) -#define undopage_03 SEG_SEGCLASS(UNUSED_SEG008,UNUSED_CODE) -#define undopage_04 SEG_SEGCLASS(UNUSED_SEG008,UNUSED_CODE) -#define undopage_05 SEG_SEGCLASS(UNUSED_SEG008,UNUSED_CODE) -#define undopage_06 SEG_SEGCLASS(UNUSED_SEG008,UNUSED_CODE) -#define undopage_07 SEG_SEGCLASS(UNUSED_SEG008,UNUSED_CODE) -#define undopage_08 SEG_SEGCLASS(UNUSED_SEG008,UNUSED_CODE) -#define undopage_09 SEG_SEGCLASS(UNUSED_SEG008,UNUSED_CODE) -#define undopage_0a SEG_SEGCLASS(UNUSED_SEG008,UNUSED_CODE) -#define undopage_0b SEG_SEGCLASS(UNUSED_SEG008,UNUSED_CODE) -#define undopage_0c SEG_SEGCLASS(UNUSED_SEG008,UNUSED_CODE) -#define fuconarc_06 SEG_SEGCLASS(UNUSED_SEG008,UNUSED_CODE) -#define fuedibez_09 SEG_SEGCLASS(UNUSED_SEG008,UNUSED_CODE) -#define fuconctl_01 SEG_SEGCLASS(UNUSED_SEG008,UNUSED_CODE) -#define fuconctl_02 SEG_SEGCLASS(UNUSED_SEG008,UNUSED_CODE) -#define fuconctl_03 SEG_SEGCLASS(UNUSED_SEG008,UNUSED_CODE) -#define fuconctl_04 SEG_SEGCLASS(UNUSED_SEG008,UNUSED_CODE) -#define fuconctl_05 SEG_SEGCLASS(UNUSED_SEG008,UNUSED_CODE) -#define fuconctl_06 SEG_SEGCLASS(UNUSED_SEG008,UNUSED_CODE) -#define fuconctl_07 SEG_SEGCLASS(UNUSED_SEG008,UNUSED_CODE) -#define fuconctl_08 SEG_SEGCLASS(UNUSED_SEG008,UNUSED_CODE) -#define fuedipo_01 SEG_SEGCLASS(UNUSED_SEG008,UNUSED_CODE) -#define fuedipo_02 SEG_SEGCLASS(UNUSED_SEG008,UNUSED_CODE) -#define fuedipo_03 SEG_SEGCLASS(UNUSED_SEG008,UNUSED_CODE) -#define fuedipo_04 SEG_SEGCLASS(UNUSED_SEG008,UNUSED_CODE) -#define fuedipo_05 SEG_SEGCLASS(UNUSED_SEG008,UNUSED_CODE) -#define fuedipo_06 SEG_SEGCLASS(UNUSED_SEG008,UNUSED_CODE) -#define fuedipo_07 SEG_SEGCLASS(UNUSED_SEG008,UNUSED_CODE) -#define fuedipo_08 SEG_SEGCLASS(UNUSED_SEG008,UNUSED_CODE) -#define drviews8_02 SEG_SEGCLASS(UNUSED_SEG008,UNUSED_CODE) -#define unmodpg_02 SEG_SEGCLASS(UNUSED_SEG008,UNUSED_CODE) -#define unmodpg_03 SEG_SEGCLASS(UNUSED_SEG008,UNUSED_CODE) -#define unmodpg_04 SEG_SEGCLASS(UNUSED_SEG008,UNUSED_CODE) -#define unmodpg_05 SEG_SEGCLASS(UNUSED_SEG008,UNUSED_CODE) -#define fuslid_02 SEG_SEGCLASS(UNUSED_SEG008,UNUSED_CODE) -#define fuslid_03 SEG_SEGCLASS(UNUSED_SEG008,UNUSED_CODE) -#define fuslid_04 SEG_SEGCLASS(UNUSED_SEG008,UNUSED_CODE) -#define fuslid_05 SEG_SEGCLASS(UNUSED_SEG008,UNUSED_CODE) -#define fuslid_07 SEG_SEGCLASS(UNUSED_SEG008,UNUSED_CODE) -#define fader_05 SEG_SEGCLASS(UNUSED_SEG008,UNUSED_CODE) -#define fader_10 SEG_SEGCLASS(UNUSED_SEG008,UNUSED_CODE) -#define fader_12 SEG_SEGCLASS(UNUSED_SEG008,UNUSED_CODE) -#define fader_14 SEG_SEGCLASS(UNUSED_SEG008,UNUSED_CODE) -#define fader_17 SEG_SEGCLASS(UNUSED_SEG008,UNUSED_CODE) -#define fader_18 SEG_SEGCLASS(UNUSED_SEG008,UNUSED_CODE) -#define fader_19 SEG_SEGCLASS(UNUSED_SEG008,UNUSED_CODE) -#define fader_1c SEG_SEGCLASS(UNUSED_SEG008,UNUSED_CODE) -#define fader_1d SEG_SEGCLASS(UNUSED_SEG008,UNUSED_CODE) -#define fader_1e SEG_SEGCLASS(UNUSED_SEG009,UNUSED_CODE) -#define fader_1f SEG_SEGCLASS(UNUSED_SEG009,UNUSED_CODE) -#define fader_20 SEG_SEGCLASS(UNUSED_SEG009,UNUSED_CODE) -#define fader_23 SEG_SEGCLASS(UNUSED_SEG009,UNUSED_CODE) -#define fader_24 SEG_SEGCLASS(UNUSED_SEG009,UNUSED_CODE) -#define fader_25 SEG_SEGCLASS(UNUSED_SEG009,UNUSED_CODE) -#define fader_26 SEG_SEGCLASS(UNUSED_SEG009,UNUSED_CODE) -#define fader_27 SEG_SEGCLASS(UNUSED_SEG009,UNUSED_CODE) -#define fader_28 SEG_SEGCLASS(UNUSED_SEG009,UNUSED_CODE) -#define fader_29 SEG_SEGCLASS(UNUSED_SEG009,UNUSED_CODE) -#define fader_2a SEG_SEGCLASS(UNUSED_SEG009,UNUSED_CODE) -#define fader_2b SEG_SEGCLASS(UNUSED_SEG010,UNUSED_CODE) -#define fader_2c SEG_SEGCLASS(UNUSED_SEG010,UNUSED_CODE) -#define showview_05 SEG_SEGCLASS(UNUSED_SEG010,UNUSED_CODE) -#define showview_07 SEG_SEGCLASS(UNUSED_SEG010,UNUSED_CODE) -#define showview_08 SEG_SEGCLASS(UNUSED_SEG010,UNUSED_CODE) -#define fupoor_06 SEG_SEGCLASS(UNUSED_SEG010,UNUSED_CODE) -#define fupoor_0a SEG_SEGCLASS(UNUSED_SEG010,UNUSED_CODE) -#define fupoor_11 SEG_SEGCLASS(UNUSED_SEG010,UNUSED_CODE) -#define sdwindow_03 SEG_SEGCLASS(UNUSED_SEG010,UNUSED_CODE) -#define bmcache_01 SEG_SEGCLASS(UNUSED_SEG010,UNUSED_CODE) -#define bmcache_02 SEG_SEGCLASS(UNUSED_SEG010,UNUSED_CODE) -#define bmcache_03 SEG_SEGCLASS(UNUSED_SEG010,UNUSED_CODE) -#define diadlg_01 SEG_SEGCLASS(UNUSED_SEG010,UNUSED_CODE) -#define diadlg_02 SEG_SEGCLASS(UNUSED_SEG010,UNUSED_CODE) -#define diadlg_03 SEG_SEGCLASS(UNUSED_SEG010,UNUSED_CODE) -#define diadlg_04 SEG_SEGCLASS(UNUSED_SEG010,UNUSED_CODE) -#define diadlg_05 SEG_SEGCLASS(UNUSED_SEG010,UNUSED_CODE) -#define diadlg_06 SEG_SEGCLASS(UNUSED_SEG010,UNUSED_CODE) -#define diadlg_07 SEG_SEGCLASS(UNUSED_SEG010,UNUSED_CODE) -#define diadlg_08 SEG_SEGCLASS(UNUSED_SEG010,UNUSED_CODE) -#define diadlg_09 SEG_SEGCLASS(UNUSED_SEG010,UNUSED_CODE) -#define diadlg_0a SEG_SEGCLASS(UNUSED_SEG010,UNUSED_CODE) -#define diadlg_0b SEG_SEGCLASS(UNUSED_SEG010,UNUSED_CODE) -#define diadlg_0c SEG_SEGCLASS(UNUSED_SEG010,UNUSED_CODE) -#define unslprms_01 SEG_SEGCLASS(UNUSED_SEG010,UNUSED_CODE) -#define unslprms_02 SEG_SEGCLASS(UNUSED_SEG010,UNUSED_CODE) -#define unslprms_03 SEG_SEGCLASS(UNUSED_SEG010,UNUSED_CODE) -#define unslprms_04 SEG_SEGCLASS(UNUSED_SEG010,UNUSED_CODE) -#define mover_03 SEG_SEGCLASS(UNUSED_SEG010,UNUSED_CODE) -#define mover_05 SEG_SEGCLASS(UNUSED_SEG010,UNUSED_CODE) -#define mover_06 SEG_SEGCLASS(UNUSED_SEG010,UNUSED_CODE) -#define mover_07 SEG_SEGCLASS(UNUSED_SEG010,UNUSED_CODE) -#define mover_08 SEG_SEGCLASS(UNUSED_SEG010,UNUSED_CODE) -#define mover_09 SEG_SEGCLASS(UNUSED_SEG010,UNUSED_CODE) -#define fuslshw2_03 SEG_SEGCLASS(UNUSED_SEG010,UNUSED_CODE) -#define fuslshw2_04 SEG_SEGCLASS(UNUSED_SEG010,UNUSED_CODE) -#define fuslshw2_05 SEG_SEGCLASS(UNUSED_SEG010,UNUSED_CODE) -#define fuslshw2_06 SEG_SEGCLASS(UNUSED_SEG011,UNUSED_CODE) -#define fuslshw2_08 SEG_SEGCLASS(UNUSED_SEG011,UNUSED_CODE) -#define fuslshw2_09 SEG_SEGCLASS(UNUSED_SEG011,UNUSED_CODE) -#define fuslshw2_0a SEG_SEGCLASS(UNUSED_SEG011,UNUSED_CODE) -#define fuslshw2_0d SEG_SEGCLASS(UNUSED_SEG012,UNUSED_CODE) -#define fuslshw2_1a SEG_SEGCLASS(UNUSED_SEG012,UNUSED_CODE) -#define inspagob_01 SEG_SEGCLASS(UNUSED_SEG012,UNUSED_CODE) -#define inspagob_02 SEG_SEGCLASS(UNUSED_SEG012,UNUSED_CODE) -#define inspagob_03 SEG_SEGCLASS(UNUSED_SEG012,UNUSED_CODE) -#define inspagob_04 SEG_SEGCLASS(UNUSED_SEG012,UNUSED_CODE) -#define inspagob_05 SEG_SEGCLASS(UNUSED_SEG012,UNUSED_CODE) -#define unchss_02 SEG_SEGCLASS(UNUSED_SEG012,UNUSED_CODE) -#define unchss_03 SEG_SEGCLASS(UNUSED_SEG012,UNUSED_CODE) -#define unchss_04 SEG_SEGCLASS(UNUSED_SEG012,UNUSED_CODE) -#define unchss_05 SEG_SEGCLASS(UNUSED_SEG012,UNUSED_CODE) -#define unchss_06 SEG_SEGCLASS(UNUSED_SEG012,UNUSED_CODE) -#define prlayout_06 SEG_SEGCLASS(UNUSED_SEG012,UNUSED_CODE) -#define docshel2_01 SEG_SEGCLASS(UNUSED_SEG012,UNUSED_CODE) -#define docshel2_06 SEG_SEGCLASS(UNUSED_SEG012,UNUSED_CODE) -#define docshel2_07 SEG_SEGCLASS(UNUSED_SEG012,UNUSED_CODE) -#define docshel2_08 SEG_SEGCLASS(UNUSED_SEG012,UNUSED_CODE) -#define docshel2_09 SEG_SEGCLASS(UNUSED_SEG012,UNUSED_CODE) -#define docshel2_0a SEG_SEGCLASS(UNUSED_SEG012,UNUSED_CODE) -#define docshel2_0b SEG_SEGCLASS(UNUSED_SEG012,UNUSED_CODE) -#define docshel2_0c SEG_SEGCLASS(UNUSED_SEG012,UNUSED_CODE) -#define docshel2_0d SEG_SEGCLASS(UNUSED_SEG012,UNUSED_CODE) -#define docshel2_0e SEG_SEGCLASS(UNUSED_SEG012,UNUSED_CODE) -#define docshel2_0f SEG_SEGCLASS(UNUSED_SEG012,UNUSED_CODE) -#define docshel2_10 SEG_SEGCLASS(UNUSED_SEG012,UNUSED_CODE) -#define docshel2_11 SEG_SEGCLASS(UNUSED_SEG012,UNUSED_CODE) -#define optdlg_01 SEG_SEGCLASS(UNUSED_SEG012,UNUSED_CODE) -#define optdlg_02 SEG_SEGCLASS(UNUSED_SEG012,UNUSED_CODE) -#define optdlg_04 SEG_SEGCLASS(UNUSED_SEG012,UNUSED_CODE) -#define assclass_01 SEG_SEGCLASS(UNUSED_SEG012,UNUSED_CODE) -#define assclass_02 SEG_SEGCLASS(UNUSED_SEG012,UNUSED_CODE) -#define assclass_03 SEG_SEGCLASS(UNUSED_SEG012,UNUSED_CODE) -#define assclass_04 SEG_SEGCLASS(UNUSED_SEG012,UNUSED_CODE) -#define assclass_05 SEG_SEGCLASS(UNUSED_SEG012,UNUSED_CODE) -#define assclass_06 SEG_SEGCLASS(UNUSED_SEG012,UNUSED_CODE) -#define assclass_07 SEG_SEGCLASS(UNUSED_SEG012,UNUSED_CODE) -#define assclass_08 SEG_SEGCLASS(UNUSED_SEG012,UNUSED_CODE) -#define assclass_09 SEG_SEGCLASS(UNUSED_SEG012,UNUSED_CODE) -#define drtxtob_05 SEG_SEGCLASS(UNUSED_SEG012,UNUSED_CODE) -#define docshel5_01 SEG_SEGCLASS(UNUSED_SEG012,UNUSED_CODE) -#define docshel5_02 SEG_SEGCLASS(UNUSED_SEG012,UNUSED_CODE) -#define docshel5_03 SEG_SEGCLASS(UNUSED_SEG012,UNUSED_CODE) -#define sdclient_01 SEG_SEGCLASS(UNUSED_SEG012,UNUSED_CODE) -#define sdclient_02 SEG_SEGCLASS(UNUSED_SEG012,UNUSED_CODE) -#define sdclient_03 SEG_SEGCLASS(UNUSED_SEG013,UNUSED_CODE) -#define sdclient_04 SEG_SEGCLASS(UNUSED_SEG013,UNUSED_CODE) -#define sdclient_05 SEG_SEGCLASS(UNUSED_SEG013,UNUSED_CODE) -#define sdview2_02 SEG_SEGCLASS(UNUSED_SEG013,UNUSED_CODE) -#define sdview2_04 SEG_SEGCLASS(UNUSED_SEG013,UNUSED_CODE) -#define sdview2_08 SEG_SEGCLASS(UNUSED_SEG013,UNUSED_CODE) -#define sdview2_09 SEG_SEGCLASS(UNUSED_SEG013,UNUSED_CODE) -#define tabcontr_05 SEG_SEGCLASS(UNUSED_SEG013,UNUSED_CODE) -#define tabcontr_06 SEG_SEGCLASS(UNUSED_SEG013,UNUSED_CODE) -#define tabcontr_07 SEG_SEGCLASS(UNUSED_SEG013,UNUSED_CODE) -#define tabcontr_09 SEG_SEGCLASS(UNUSED_SEG013,UNUSED_CODE) -#define tabcontr_0a SEG_SEGCLASS(UNUSED_SEG013,UNUSED_CODE) -#define tabcontr_0b SEG_SEGCLASS(UNUSED_SEG013,UNUSED_CODE) -#define drviews5_03 SEG_SEGCLASS(UNUSED_SEG013,UNUSED_CODE) -#define drviews5_09 SEG_SEGCLASS(UNUSED_SEG013,UNUSED_CODE) -#define drviews5_0a SEG_SEGCLASS(UNUSED_SEG013,UNUSED_CODE) -#define drviews5_0b SEG_SEGCLASS(UNUSED_SEG013,UNUSED_CODE) -#define drviews5_0d SEG_SEGCLASS(UNUSED_SEG013,UNUSED_CODE) -#define layertab_03 SEG_SEGCLASS(UNUSED_SEG013,UNUSED_CODE) -#define layertab_05 SEG_SEGCLASS(UNUSED_SEG013,UNUSED_CODE) -#define layertab_06 SEG_SEGCLASS(UNUSED_SEG013,UNUSED_CODE) -#define layertab_07 SEG_SEGCLASS(UNUSED_SEG013,UNUSED_CODE) -#define layertab_09 SEG_SEGCLASS(UNUSED_SEG013,UNUSED_CODE) -#define layertab_0a SEG_SEGCLASS(UNUSED_SEG013,UNUSED_CODE) -#define layertab_0b SEG_SEGCLASS(UNUSED_SEG013,UNUSED_CODE) -#define dlgctrls_01 SEG_SEGCLASS(UNUSED_SEG013,UNUSED_CODE) -#define sdoutl_06 SEG_SEGCLASS(UNUSED_SEG013,UNUSED_CODE) -#define sdoutl_08 SEG_SEGCLASS(UNUSED_SEG013,UNUSED_CODE) -#define pubdlg_01 SEG_SEGCLASS(UNUSED_SEG013,UNUSED_CODE) -#define pubdlg_02 SEG_SEGCLASS(UNUSED_SEG013,UNUSED_CODE) -#define sdruler_09 SEG_SEGCLASS(UNUSED_SEG013,UNUSED_CODE) -#define prntopts_01 SEG_SEGCLASS(UNUSED_SEG014,UNUSED_CODE) -#define prntopts_02 SEG_SEGCLASS(UNUSED_SEG014,UNUSED_CODE) -#define prntopts_03 SEG_SEGCLASS(UNUSED_SEG014,UNUSED_CODE) -#define prntopts_04 SEG_SEGCLASS(UNUSED_SEG014,UNUSED_CODE) -#define prntopts_05 SEG_SEGCLASS(UNUSED_SEG014,UNUSED_CODE) -#define prntopts_07 SEG_SEGCLASS(UNUSED_SEG014,UNUSED_CODE) -#define fudraw_07 SEG_SEGCLASS(UNUSED_SEG014,UNUSED_CODE) -#define fudraw_08 SEG_SEGCLASS(UNUSED_SEG014,UNUSED_CODE) -#define fulink_01 SEG_SEGCLASS(UNUSED_SEG014,UNUSED_CODE) -#define futransf_01 SEG_SEGCLASS(UNUSED_SEG014,UNUSED_CODE) -#define futransf_02 SEG_SEGCLASS(UNUSED_SEG014,UNUSED_CODE) -#define futransf_03 SEG_SEGCLASS(UNUSED_SEG014,UNUSED_CODE) -#define fuoaprms_01 SEG_SEGCLASS(UNUSED_SEG014,UNUSED_CODE) -#define fuoaprms_02 SEG_SEGCLASS(UNUSED_SEG014,UNUSED_CODE) -#define fuoaprms_03 SEG_SEGCLASS(UNUSED_SEG014,UNUSED_CODE) -#define fuoaprms_04 SEG_SEGCLASS(UNUSED_SEG014,UNUSED_CODE) -#define fuinsert_05 SEG_SEGCLASS(UNUSED_SEG014,UNUSED_CODE) -#define fuinsert_06 SEG_SEGCLASS(UNUSED_SEG014,UNUSED_CODE) -#define fuinsert_09 SEG_SEGCLASS(UNUSED_SEG015,UNUSED_CODE) -#define fuinsert_0a SEG_SEGCLASS(UNUSED_SEG015,UNUSED_CODE) -#define fuinsert_0b SEG_SEGCLASS(UNUSED_SEG015,UNUSED_CODE) -#define fulinend_01 SEG_SEGCLASS(UNUSED_SEG015,UNUSED_CODE) -#define fuconpol_03 SEG_SEGCLASS(UNUSED_SEG015,UNUSED_CODE) -#define fuconpol_06 SEG_SEGCLASS(UNUSED_SEG015,UNUSED_CODE) -#define fucopy_03 SEG_SEGCLASS(UNUSED_SEG015,UNUSED_CODE) -#define fuparagr_01 SEG_SEGCLASS(UNUSED_SEG015,UNUSED_CODE) -#define sdtreelb_02 SEG_SEGCLASS(UNUSED_SEG015,UNUSED_CODE) -#define sdtreelb_03 SEG_SEGCLASS(UNUSED_SEG015,UNUSED_CODE) -#define sdtreelb_04 SEG_SEGCLASS(UNUSED_SEG015,UNUSED_CODE) -#define sdtreelb_05 SEG_SEGCLASS(UNUSED_SEG015,UNUSED_CODE) -#define sdtreelb_06 SEG_SEGCLASS(UNUSED_SEG015,UNUSED_CODE) -#define sdtreelb_07 SEG_SEGCLASS(UNUSED_SEG015,UNUSED_CODE) -#define sdtreelb_08 SEG_SEGCLASS(UNUSED_SEG015,UNUSED_CODE) -#define enumdlg_08 SEG_SEGCLASS(UNUSED_SEG015,UNUSED_CODE) -#define clview_01 SEG_SEGCLASS(UNUSED_SEG015,UNUSED_CODE) -#define clview_02 SEG_SEGCLASS(UNUSED_SEG015,UNUSED_CODE) -#define clview_03 SEG_SEGCLASS(UNUSED_SEG015,UNUSED_CODE) -#define clview_04 SEG_SEGCLASS(UNUSED_SEG015,UNUSED_CODE) -#define clview_05 SEG_SEGCLASS(UNUSED_SEG015,UNUSED_CODE) -#define dragserv_01 SEG_SEGCLASS(UNUSED_SEG015,UNUSED_CODE) -#define dragserv_07 SEG_SEGCLASS(UNUSED_SEG015,UNUSED_CODE) -#define tpoption_01 SEG_SEGCLASS(UNUSED_SEG015,UNUSED_CODE) -#define tpoption_02 SEG_SEGCLASS(UNUSED_SEG015,UNUSED_CODE) -#define tpoption_03 SEG_SEGCLASS(UNUSED_SEG015,UNUSED_CODE) -#define tpoption_04 SEG_SEGCLASS(UNUSED_SEG015,UNUSED_CODE) -#define tpoption_05 SEG_SEGCLASS(UNUSED_SEG015,UNUSED_CODE) -#define tpoption_07 SEG_SEGCLASS(UNUSED_SEG015,UNUSED_CODE) -#define tpoption_08 SEG_SEGCLASS(UNUSED_SEG015,UNUSED_CODE) -#define tpoption_09 SEG_SEGCLASS(UNUSED_SEG015,UNUSED_CODE) -#define tpoption_0a SEG_SEGCLASS(UNUSED_SEG016,UNUSED_CODE) -#define tpoption_0b SEG_SEGCLASS(UNUSED_SEG016,UNUSED_CODE) -#define tpoption_0c SEG_SEGCLASS(UNUSED_SEG016,UNUSED_CODE) -#define tpoption_0d SEG_SEGCLASS(UNUSED_SEG016,UNUSED_CODE) -#define tpoption_0e SEG_SEGCLASS(UNUSED_SEG016,UNUSED_CODE) -#define tpoption_0f SEG_SEGCLASS(UNUSED_SEG016,UNUSED_CODE) -#define tpoption_10 SEG_SEGCLASS(UNUSED_SEG016,UNUSED_CODE) -#define tpscale_01 SEG_SEGCLASS(UNUSED_SEG016,UNUSED_CODE) -#define tpscale_02 SEG_SEGCLASS(UNUSED_SEG016,UNUSED_CODE) -#define tpscale_03 SEG_SEGCLASS(UNUSED_SEG016,UNUSED_CODE) -#define tpscale_04 SEG_SEGCLASS(UNUSED_SEG016,UNUSED_CODE) -#define tpscale_05 SEG_SEGCLASS(UNUSED_SEG016,UNUSED_CODE) -#define tpscale_06 SEG_SEGCLASS(UNUSED_SEG016,UNUSED_CODE) -#define tpscale_07 SEG_SEGCLASS(UNUSED_SEG016,UNUSED_CODE) -#define tpscale_08 SEG_SEGCLASS(UNUSED_SEG016,UNUSED_CODE) -#define tpscale_0b SEG_SEGCLASS(UNUSED_SEG016,UNUSED_CODE) -#define tpscale_0c SEG_SEGCLASS(UNUSED_SEG016,UNUSED_CODE) -#define tpscale_0d SEG_SEGCLASS(UNUSED_SEG016,UNUSED_CODE) -#define tpeffect_01 SEG_SEGCLASS(UNUSED_SEG016,UNUSED_CODE) -#define tpeffect_02 SEG_SEGCLASS(UNUSED_SEG016,UNUSED_CODE) -#define tpeffect_03 SEG_SEGCLASS(UNUSED_SEG016,UNUSED_CODE) -#define tpeffect_04 SEG_SEGCLASS(UNUSED_SEG016,UNUSED_CODE) -#define tpeffect_05 SEG_SEGCLASS(UNUSED_SEG016,UNUSED_CODE) -#define tpeffect_06 SEG_SEGCLASS(UNUSED_SEG016,UNUSED_CODE) -#define tpeffect_07 SEG_SEGCLASS(UNUSED_SEG016,UNUSED_CODE) -#define tpeffect_08 SEG_SEGCLASS(UNUSED_SEG016,UNUSED_CODE) -#define tpeffect_09 SEG_SEGCLASS(UNUSED_SEG016,UNUSED_CODE) -#define tpeffect_0a SEG_SEGCLASS(UNUSED_SEG016,UNUSED_CODE) -#define tpeffect_0b SEG_SEGCLASS(UNUSED_SEG016,UNUSED_CODE) -#define tpeffect_0c SEG_SEGCLASS(UNUSED_SEG016,UNUSED_CODE) -#define tpeffect_0d SEG_SEGCLASS(UNUSED_SEG016,UNUSED_CODE) -#define tpeffect_0e SEG_SEGCLASS(UNUSED_SEG016,UNUSED_CODE) -#define tpeffect_0f SEG_SEGCLASS(UNUSED_SEG016,UNUSED_CODE) -#define tpeffect_10 SEG_SEGCLASS(UNUSED_SEG016,UNUSED_CODE) -#define tpeffect_11 SEG_SEGCLASS(UNUSED_SEG016,UNUSED_CODE) -#define tpeffect_12 SEG_SEGCLASS(UNUSED_SEG016,UNUSED_CODE) -#define tpeffect_13 SEG_SEGCLASS(UNUSED_SEG016,UNUSED_CODE) -#define tpeffect_14 SEG_SEGCLASS(UNUSED_SEG016,UNUSED_CODE) -#define tpeffect_15 SEG_SEGCLASS(UNUSED_SEG016,UNUSED_CODE) -#define tpeffect_16 SEG_SEGCLASS(UNUSED_SEG016,UNUSED_CODE) -#define tpeffect_17 SEG_SEGCLASS(UNUSED_SEG016,UNUSED_CODE) -#define tpeffect_18 SEG_SEGCLASS(UNUSED_SEG016,UNUSED_CODE) -#define tpeffect_19 SEG_SEGCLASS(UNUSED_SEG017,UNUSED_CODE) -#define tpeffect_1a SEG_SEGCLASS(UNUSED_SEG017,UNUSED_CODE) -#define tpeffect_1b SEG_SEGCLASS(UNUSED_SEG017,UNUSED_CODE) -#define tpeffect_1c SEG_SEGCLASS(UNUSED_SEG017,UNUSED_CODE) -#define tpeffect_1d SEG_SEGCLASS(UNUSED_SEG017,UNUSED_CODE) -#define tpeffect_1e SEG_SEGCLASS(UNUSED_SEG017,UNUSED_CODE) -#define tpeffect_1f SEG_SEGCLASS(UNUSED_SEG017,UNUSED_CODE) -#define tpeffect_20 SEG_SEGCLASS(UNUSED_SEG017,UNUSED_CODE) -#define tpeffect_21 SEG_SEGCLASS(UNUSED_SEG017,UNUSED_CODE) -#define tpeffect_22 SEG_SEGCLASS(UNUSED_SEG017,UNUSED_CODE) -#define tpeffect_23 SEG_SEGCLASS(UNUSED_SEG017,UNUSED_CODE) -#define tpeffect_24 SEG_SEGCLASS(UNUSED_SEG017,UNUSED_CODE) -#define tpeffect_25 SEG_SEGCLASS(UNUSED_SEG017,UNUSED_CODE) -#define tpeffect_26 SEG_SEGCLASS(UNUSED_SEG017,UNUSED_CODE) -#define tpeffect_27 SEG_SEGCLASS(UNUSED_SEG017,UNUSED_CODE) -#define tpeffect_28 SEG_SEGCLASS(UNUSED_SEG017,UNUSED_CODE) -#define tpeffect_29 SEG_SEGCLASS(UNUSED_SEG017,UNUSED_CODE) -#define tpeffect_2a SEG_SEGCLASS(UNUSED_SEG017,UNUSED_CODE) -#define tpeffect_2b SEG_SEGCLASS(UNUSED_SEG017,UNUSED_CODE) -#define tpeffect_2c SEG_SEGCLASS(UNUSED_SEG017,UNUSED_CODE) -#define tpeffect_2d SEG_SEGCLASS(UNUSED_SEG017,UNUSED_CODE) -#define tpeffect_2e SEG_SEGCLASS(UNUSED_SEG017,UNUSED_CODE) -#define unoaprms_01 SEG_SEGCLASS(UNUSED_SEG017,UNUSED_CODE) -#define unoaprms_02 SEG_SEGCLASS(UNUSED_SEG017,UNUSED_CODE) -#define unoaprms_03 SEG_SEGCLASS(UNUSED_SEG017,UNUSED_CODE) -#define unoaprms_04 SEG_SEGCLASS(UNUSED_SEG017,UNUSED_CODE) -#define unprlout_02 SEG_SEGCLASS(UNUSED_SEG017,UNUSED_CODE) -#define unprlout_03 SEG_SEGCLASS(UNUSED_SEG017,UNUSED_CODE) -#define unprlout_04 SEG_SEGCLASS(UNUSED_SEG017,UNUSED_CODE) -#define unprlout_05 SEG_SEGCLASS(UNUSED_SEG017,UNUSED_CODE) -#define unprlout_06 SEG_SEGCLASS(UNUSED_SEG017,UNUSED_CODE) -#define unmovss_02 SEG_SEGCLASS(UNUSED_SEG017,UNUSED_CODE) -#define unmovss_03 SEG_SEGCLASS(UNUSED_SEG017,UNUSED_CODE) -#define unmovss_04 SEG_SEGCLASS(UNUSED_SEG017,UNUSED_CODE) -#define unmovss_05 SEG_SEGCLASS(UNUSED_SEG017,UNUSED_CODE) -#define unmovss_06 SEG_SEGCLASS(UNUSED_SEG017,UNUSED_CODE) -#define tabtempl_04 SEG_SEGCLASS(UNUSED_SEG017,UNUSED_CODE) -#define copydlg_05 SEG_SEGCLASS(UNUSED_SEG017,UNUSED_CODE) -#define paragr_01 SEG_SEGCLASS(UNUSED_SEG017,UNUSED_CODE) -#define inspage_07 SEG_SEGCLASS(UNUSED_SEG017,UNUSED_CODE) -#define dlgsnap_02 SEG_SEGCLASS(UNUSED_SEG017,UNUSED_CODE) -#define dlgsnap_04 SEG_SEGCLASS(UNUSED_SEG017,UNUSED_CODE) -#define dlgsnap_05 SEG_SEGCLASS(UNUSED_SEG017,UNUSED_CODE) -#define sdpage_06 SEG_SEGCLASS(UNUSED_SEG017,UNUSED_CODE) -#define sdpage_08 SEG_SEGCLASS(UNUSED_SEG017,UNUSED_CODE) -#define sdpage_0b SEG_SEGCLASS(UNUSED_SEG017,UNUSED_CODE) -#define sdpage_0c SEG_SEGCLASS(UNUSED_SEG017,UNUSED_CODE) -#define sdpage_14 SEG_SEGCLASS(UNUSED_SEG017,UNUSED_CODE) -#define sdpage_15 SEG_SEGCLASS(UNUSED_SEG017,UNUSED_CODE) -#define sdpage_16 SEG_SEGCLASS(UNUSED_SEG017,UNUSED_CODE) -#define sdpage_17 SEG_SEGCLASS(UNUSED_SEG017,UNUSED_CODE) -#define sdpage_1c SEG_SEGCLASS(UNUSED_SEG017,UNUSED_CODE) -#define sdpage_1e SEG_SEGCLASS(UNUSED_SEG017,UNUSED_CODE) -#define drawdoc3_01 SEG_SEGCLASS(UNUSED_SEG017,UNUSED_CODE) -#define drawdoc3_02 SEG_SEGCLASS(UNUSED_SEG017,UNUSED_CODE) -#define drawdoc3_03 SEG_SEGCLASS(UNUSED_SEG017,UNUSED_CODE) -#define drawdoc3_04 SEG_SEGCLASS(UNUSED_SEG018,UNUSED_CODE) -#define drawdoc3_05 SEG_SEGCLASS(UNUSED_SEG018,UNUSED_CODE) -#define drawdoc3_07 SEG_SEGCLASS(UNUSED_SEG018,UNUSED_CODE) -#define drawitem_01 SEG_SEGCLASS(UNUSED_SEG018,UNUSED_CODE) -#define drawitem_04 SEG_SEGCLASS(UNUSED_SEG018,UNUSED_CODE) -#define drawitem_05 SEG_SEGCLASS(UNUSED_SEG018,UNUSED_CODE) -#define drawitem_07 SEG_SEGCLASS(UNUSED_SEG018,UNUSED_CODE) -#define drawitem_0a SEG_SEGCLASS(UNUSED_SEG018,UNUSED_CODE) -#define drawitem_0b SEG_SEGCLASS(UNUSED_SEG018,UNUSED_CODE) -#define drawitem_0d SEG_SEGCLASS(UNUSED_SEG018,UNUSED_CODE) -#define drawitem_10 SEG_SEGCLASS(UNUSED_SEG018,UNUSED_CODE) -#define drawitem_11 SEG_SEGCLASS(UNUSED_SEG018,UNUSED_CODE) -#define drawitem_13 SEG_SEGCLASS(UNUSED_SEG018,UNUSED_CODE) -#define drawitem_16 SEG_SEGCLASS(UNUSED_SEG018,UNUSED_CODE) -#define drawitem_17 SEG_SEGCLASS(UNUSED_SEG018,UNUSED_CODE) -#define drawitem_19 SEG_SEGCLASS(UNUSED_SEG018,UNUSED_CODE) -#define drawitem_1c SEG_SEGCLASS(UNUSED_SEG018,UNUSED_CODE) -#define drawitem_1d SEG_SEGCLASS(UNUSED_SEG018,UNUSED_CODE) -#define drawitem_1f SEG_SEGCLASS(UNUSED_SEG018,UNUSED_CODE) -#define drawitem_22 SEG_SEGCLASS(UNUSED_SEG018,UNUSED_CODE) -#define drawitem_23 SEG_SEGCLASS(UNUSED_SEG018,UNUSED_CODE) -#define stlpool_04 SEG_SEGCLASS(UNUSED_SEG018,UNUSED_CODE) -#define stlpool_0b SEG_SEGCLASS(UNUSED_SEG018,UNUSED_CODE) -#define pglink_01 SEG_SEGCLASS(UNUSED_SEG018,UNUSED_CODE) -#define pglink_02 SEG_SEGCLASS(UNUSED_SEG018,UNUSED_CODE) -#define pglink_03 SEG_SEGCLASS(UNUSED_SEG018,UNUSED_CODE) -#define pglink_04 SEG_SEGCLASS(UNUSED_SEG018,UNUSED_CODE) diff --git a/sd/inc/shapelist.hxx b/sd/inc/shapelist.hxx index 553f438669d2..44a258001fc3 100644 --- a/sd/inc/shapelist.hxx +++ b/sd/inc/shapelist.hxx @@ -60,10 +60,6 @@ namespace sd returns the first shape if pObj is 0 */ SdrObject* getNextShape(SdrObject* pObj) const; - /** returns the shape prior to the given shape in the list or 0 - returns the last shape if pObj is 0 */ - SdrObject* getPreviousShape( SdrObject* pObj ) const; - /** */ SdrObject* getNextShape(); diff --git a/sd/inc/stlpool.hxx b/sd/inc/stlpool.hxx index d49d743b6dee..e8baba1aa79e 100644 --- a/sd/inc/stlpool.hxx +++ b/sd/inc/stlpool.hxx @@ -68,7 +68,6 @@ public: SfxStyleSheetBase* GetActualStyleSheet() { return mpActualStyleSheet; } SfxStyleSheetBase* GetTitleSheet(const String& rLayoutName); - String GetLayoutName() const; // Caller muss Liste loeschen List* CreateOutlineSheetList(const String& rLayoutName); @@ -82,7 +81,6 @@ public: when styles are missing. */ SD_DLLPUBLIC void CreateLayoutStyleSheets(const String& rLayoutName, sal_Bool bCheck = sal_False ); - void EraseLayoutStyleSheets(const String& rLayoutName); List* CreateLayoutSheetNames(const String& rLayoutName) const; void CreateLayoutSheetList(const String& rLayoutName, SdStyleSheetVector& rLayoutSheets); void CopyLayoutSheets(const String& rLayoutName, SdStyleSheetPool& rSourcePool, SdStyleSheetVector& rCreatedSheets ); diff --git a/sd/inc/textapi.hxx b/sd/inc/textapi.hxx index ced8a48c5bb6..6fa186596fba 100644 --- a/sd/inc/textapi.hxx +++ b/sd/inc/textapi.hxx @@ -53,7 +53,6 @@ public: virtual void SAL_CALL dispose() throw(::com::sun::star::uno::RuntimeException); OutlinerParaObject* CreateText(); - void SetString( const String& rText ); void SetText( OutlinerParaObject& rText ); String GetText(); diff --git a/sd/source/core/CustomAnimationEffect.cxx b/sd/source/core/CustomAnimationEffect.cxx index 7852f7cc8fcf..33b9c233909b 100644 --- a/sd/source/core/CustomAnimationEffect.cxx +++ b/sd/source/core/CustomAnimationEffect.cxx @@ -1809,15 +1809,6 @@ void EffectSequenceHelper::append( const CustomAnimationEffectPtr& pEffect ) // -------------------------------------------------------------------- -void EffectSequenceHelper::insert( EffectSequence::iterator& rPos, const CustomAnimationEffectPtr& pEffect ) -{ - pEffect->setEffectSequence( this ); - maEffects.insert( rPos, pEffect ); - rebuild(); -} - -// -------------------------------------------------------------------- - CustomAnimationEffectPtr EffectSequenceHelper::append( const CustomAnimationPresetPtr& pPreset, const Any& rTarget, double fDuration /* = -1.0 */ ) { CustomAnimationEffectPtr pEffect; diff --git a/sd/source/core/drawdoc2.cxx b/sd/source/core/drawdoc2.cxx index 092549428a42..14614dbf1337 100644 --- a/sd/source/core/drawdoc2.cxx +++ b/sd/source/core/drawdoc2.cxx @@ -1342,37 +1342,6 @@ void SdDrawDocument::CheckMasterPages() } } - - - -USHORT SdDrawDocument::CreatePage (USHORT nPageNum) -{ - PageKind ePageKind = PK_STANDARD; - - // Get current page. - SdPage* pActualPage = GetSdPage(nPageNum, ePageKind); - - // Get background flags. - SdrLayerAdmin& rLayerAdmin = GetLayerAdmin(); - BYTE aBckgrnd = rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRND)), FALSE); - BYTE aBckgrndObj = rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRNDOBJ)), FALSE); - SetOfByte aVisibleLayers = pActualPage->TRG_GetMasterPageVisibleLayers(); - - // Get layout from current page. - AutoLayout eAutoLayout = pActualPage->GetAutoLayout(); - - return CreatePage ( - pActualPage, ePageKind, - // No names for the new slides. - String(), String(), - eAutoLayout, eAutoLayout, - aVisibleLayers.IsSet(aBckgrnd), - aVisibleLayers.IsSet(aBckgrndObj)); -} - - - - USHORT SdDrawDocument::CreatePage ( SdPage* pActualPage, PageKind ePageKind, diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx index b615c7e76c05..89f74de30494 100644 --- a/sd/source/core/drawdoc4.cxx +++ b/sd/source/core/drawdoc4.cxx @@ -242,26 +242,6 @@ void SdDrawDocument::CreateLayoutTemplates() rISet.Put(SvxLRSpaceItem(EE_PARA_LRSPACE)); rISet.Put(SvxULSpaceItem(EE_PARA_ULSPACE)); - // only change paragraph text direction, - // if this is a new document and - // text direction is set explicitly to RTL -/* - if( mpDocSh && - mpDocSh->IsNewDocument() && - SD_MOD()->GetDefaultWritingMode() == ::com::sun::star::text::WritingMode_RL_TB ) - { - SvxAdjustItem aAdjust( SVX_ADJUST_RIGHT ); - SvxFrameDirectionItem aFrameDirectionItem( FRMDIR_HORI_RIGHT_TOP, EE_PARA_WRITINGDIR ); - - rISet.Put( aAdjust ); - rISet.Put( aFrameDirectionItem ); - - pItemPool->SetPoolDefaultItem( aAdjust ); - pItemPool->SetPoolDefaultItem( aFrameDirectionItem ); - } - else - rISet.Put( SvxAdjustItem() ); -*/ rISet.Put( SdrTextLeftDistItem( 250 ) ); // sj: (i33745) using text frame distances seems to be a better default rISet.Put( SdrTextRightDistItem( 250 ) ); rISet.Put( SdrTextUpperDistItem( 125 ) ); @@ -1119,57 +1099,6 @@ void SdDrawDocument::ImpOnlineSpellCallback(SpellCallbackInfo* pInfo, SdrObject* } } -/************************************************************************* -|* -|* Sprachabhaengige Namen der StandardLayer durch eindeutigen Namen ersetzen -|* -\************************************************************************/ - -void SdDrawDocument::MakeUniqueLayerNames() -{ - String aLayerLayout(SdResId(STR_LAYER_LAYOUT)); - String aLayerBckgrnd(SdResId(STR_LAYER_BCKGRND)); - String aLayerBckgrndObj(SdResId(STR_LAYER_BCKGRNDOBJ)); - String aLayerControls(SdResId(STR_LAYER_CONTROLS)); - String aLayerMeasurelines(SdResId(STR_LAYER_MEASURELINES)); - SdrLayerAdmin& rLayerAdmin = GetLayerAdmin(); - USHORT nStandardLayer = 5; - USHORT nLayerCount = Min(rLayerAdmin.GetLayerCount(), nStandardLayer); - - for (USHORT nLayer = 0; nLayer < nLayerCount; nLayer++) - { - // Die sprachabhaengigen Namen der Default-Layer werden nicht mehr - // gespeichert. Es werden stattdessen eindeutige Namen verwendet. - SdrLayer* pLayer = rLayerAdmin.GetLayer(nLayer); - - if (pLayer) - { - String aLayerName(pLayer->GetName()); - - if (aLayerName == aLayerLayout) - { - pLayer->SetName( String( RTL_CONSTASCII_USTRINGPARAM( "LAYER_LAYOUT" ))); - } - else if (aLayerName == aLayerBckgrnd) - { - pLayer->SetName( String( RTL_CONSTASCII_USTRINGPARAM( "LAYER_BCKGRND" ))); - } - else if (aLayerName == aLayerBckgrndObj) - { - pLayer->SetName( String( RTL_CONSTASCII_USTRINGPARAM( "LAYER_BACKGRNDOBJ" ))); - } - else if (aLayerName == aLayerControls) - { - pLayer->SetName( String( RTL_CONSTASCII_USTRINGPARAM( "LAYER_CONTROLS" ))); - } - else if (aLayerName == aLayerMeasurelines) - { - pLayer->SetName( String( RTL_CONSTASCII_USTRINGPARAM( "LAYER_MEASURELINES" ))); - } - } - } -} - /************************************************************************* |* |* Eindeutige Namen der StandardLayer durch sprachabhaengige Namen ersetzen @@ -1545,12 +1474,6 @@ SdStyleSheetPool* SdDrawDocument::GetSdStyleSheetPool() const return dynamic_cast< SdStyleSheetPool* >( GetStyleSheetPool() ); } -ModifyGuard::ModifyGuard( DrawDocShell* pDocShell ) -: mpDocShell( pDocShell ), mpDoc( 0 ) -{ - init(); -} - ModifyGuard::ModifyGuard( SdDrawDocument* pDoc ) : mpDocShell( 0 ), mpDoc( pDoc ) { diff --git a/sd/source/core/shapelist.cxx b/sd/source/core/shapelist.cxx index daefe45c3cb1..4bb14b642f79 100644 --- a/sd/source/core/shapelist.cxx +++ b/sd/source/core/shapelist.cxx @@ -132,25 +132,6 @@ SdrObject* ShapeList::getNextShape(SdrObject* pObj) const return 0; } -SdrObject* ShapeList::getPreviousShape( SdrObject* pObj ) const -{ - if( pObj ) - { - ListImpl::const_iterator aIter( std::find( maShapeList.begin(), maShapeList.end(), pObj ) ); - if( (aIter != maShapeList.end()) && (aIter != maShapeList.begin()) ) - { - aIter--; - return (*aIter); - } - } - else if( !maShapeList.empty() ) - { - return (*--maShapeList.end()); - } - - return 0; -} - void ShapeList::ObjectInDestruction(const SdrObject& rObject) { ListImpl::iterator aIter( std::find( maShapeList.begin(), maShapeList.end(), &rObject ) ); diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx index e592ba45a27e..25ccc7d708ff 100644 --- a/sd/source/core/stlpool.cxx +++ b/sd/source/core/stlpool.cxx @@ -144,30 +144,6 @@ SfxStyleSheetBase* SdStyleSheetPool::GetTitleSheet(const String& rLayoutName) return pResult; } -// ---------------------------------------------------------- -// find layout name of first layout -// ---------------------------------------------------------- - -String SdStyleSheetPool::GetLayoutName() const -{ - String aName( SdResId(STR_LAYOUT_DEFAULT_NAME ) ); - sal_uInt32 nCount = aStyles.size(); - - for( sal_uInt32 n = 0; n < nCount; n++ ) - { - aName = aStyles[n]->GetName(); - sal_uInt16 nPos = aName.SearchAscii( SD_LT_SEPARATOR ); - if( nPos != STRING_NOTFOUND ) - break; - } - - sal_uInt16 nPos = aName.Search( sal_Unicode( ' ' )); - if( nPos != STRING_NOTFOUND ) - aName.Erase( nPos ); // removing blanks and number (e.g. "Gliederung 1") - - return aName; -} - /************************************************************************* |* |* eine Liste der Gliederungstextvorlagen fuer ein Praesentationlayout @@ -571,32 +547,6 @@ void SdStyleSheetPool::CreateLayoutStyleSheets(const String& rLayoutName, sal_Bo DBG_ASSERT( !bCheck || !bCreated, "missing layout style sheets detected!" ); } -/************************************************************************* -|* -|* StyleSheets des genannten Praesentationslayouts loeschen -|* -\************************************************************************/ - -void SdStyleSheetPool::EraseLayoutStyleSheets(const String& rLayoutName) -{ - SfxStyleSheetBase* pSheet = NULL; - - List* pNameList = CreateLayoutSheetNames(rLayoutName); - - String* pName = (String*)pNameList->First(); - while (pName) - { - pSheet = Find(*pName, SD_STYLE_FAMILY_MASTERPAGE); - DBG_ASSERT(pSheet, "EraseLayoutStyleSheets: Vorlage nicht gefunden"); - if (pSheet) - Remove(pSheet); - delete pName; - pName = (String*)pNameList->Next(); - } - delete pNameList; -} - - /************************************************************************* |* |* Graphik-StyleSheets aus dem Quellpool in diesen Pool kopieren diff --git a/sd/source/core/text/textapi.cxx b/sd/source/core/text/textapi.cxx index 0856e867f4e1..ab6c69ee8fdc 100644 --- a/sd/source/core/text/textapi.cxx +++ b/sd/source/core/text/textapi.cxx @@ -118,7 +118,6 @@ public: void Dispose(); void SetText( OutlinerParaObject& rText ); - void SetString( const String& rText ); OutlinerParaObject* CreateText(); String GetText(); SdDrawDocument* GetDoc() { return pImpl->mpDoc; } @@ -177,16 +176,6 @@ OutlinerParaObject* TextApiObject::CreateText() return mpSource->CreateText(); } -void TextApiObject::SetString( const String& rText ) -{ - SdrModel* pModel = mpSource->GetDoc(); - if( pModel && pModel->IsUndoEnabled() ) - pModel->AddUndo( new UndoTextAPIChanged( *pModel, this ) ); - - mpSource->SetString( rText ); - maSelection.nStartPara = 0xffff; -} - void TextApiObject::SetText( OutlinerParaObject& rText ) { SdrModel* pModel = mpSource->GetDoc(); @@ -288,22 +277,6 @@ void TextAPIEditSource::SetText( OutlinerParaObject& rText ) } } -void TextAPIEditSource::SetString( const String& rText ) -{ - if ( pImpl->mpDoc ) - { - if( !pImpl->mpOutliner ) - { - //init draw model first - pImpl->mpOutliner = new Outliner( pImpl->mpDoc, OUTLINERMODE_TEXTOBJECT ); - pImpl->mpDoc->SetCalcFieldValueHdl( pImpl->mpOutliner ); - } - else - pImpl->mpOutliner->Clear(); - pImpl->mpOutliner->Insert( rText ); - } -} - OutlinerParaObject* TextAPIEditSource::CreateText() { if ( pImpl->mpDoc && pImpl->mpOutliner ) diff --git a/sd/source/filter/eppt/eppt.hxx b/sd/source/filter/eppt/eppt.hxx index f3ec27d8093c..3d8797beb328 100644 --- a/sd/source/filter/eppt/eppt.hxx +++ b/sd/source/filter/eppt/eppt.hxx @@ -476,7 +476,6 @@ class GroupTable ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > & GetCurrentGroupAccess() const { return mpGroupEntry[ mnCurrentGroupEntry - 1 ]->mXIndexAccess; }; sal_uInt32 GetGroupsClosed(); - void SkipCurrentGroup(); void ResetGroupTable( sal_uInt32 nCount ); void ClearGroupTable(); sal_Bool EnterGroup( ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > & rIndex ); @@ -534,7 +533,7 @@ class PortionObj : public PropStateValue protected : void ImplClear(); - void ImplConstruct( PortionObj& rPortionObj ); + void ImplConstruct( const PortionObj& rPortionObj ); sal_uInt32 ImplGetTextField( ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & rXTextRangeRef, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & rXPropSetRef, String& rURL ); sal_uInt32 ImplCalculateTextPositions( sal_uInt32 nCurrentTextPosition ); @@ -567,13 +566,13 @@ class PortionObj : public PropStateValue sal_Bool bLast, FontCollection& rFontCollection ); PortionObj( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & rXPropSetRef, FontCollection& rFontCollection ); - PortionObj( PortionObj& rPortionObj ); + PortionObj( const PortionObj& rPortionObj ); ~PortionObj(); void Write( SvStream* pStrm, sal_Bool bLast ); sal_uInt32 Count() const { return mnTextSize; }; - PortionObj& operator=( PortionObj& rPortionObj ); + PortionObj& operator=( const PortionObj& rPortionObj ); }; struct ParaFlags @@ -594,10 +593,9 @@ class ParagraphObj : public List, public PropStateValue, public SOParagraph protected : - void ImplConstruct( ParagraphObj& rParagraphObj ); + void ImplConstruct( const ParagraphObj& rParagraphObj ); void ImplClear(); sal_uInt32 ImplCalculateTextPositions( sal_uInt32 nCurrentTextPosition ); - ::com::sun::star::awt::Size ImplMapSize( const ::com::sun::star::awt::Size& rSize ); void ImplGetParagraphValues( PPTExBulletProvider& rBuProv, sal_Bool bGetPropStateValue = FALSE ); void ImplGetNumberingLevel( PPTExBulletProvider& rBuProv, sal_Int16 nDepth, sal_Bool bIsBullet, sal_Bool bGetPropStateValue = FALSE ); @@ -631,7 +629,7 @@ class ParagraphObj : public List, public PropStateValue, public SOParagraph ParagraphObj( ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent > & rXTextContentRef, ParaFlags, FontCollection& rFontCollection, PPTExBulletProvider& rBuProv ); - ParagraphObj( ParagraphObj& rParargraphObj ); + ParagraphObj( const ParagraphObj& rParargraphObj ); ParagraphObj( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & rXPropSetRef, PPTExBulletProvider& rBuProv ); @@ -641,7 +639,7 @@ class ParagraphObj : public List, public PropStateValue, public SOParagraph void Write( SvStream* pStrm ); sal_uInt32 Count() const { return mnTextSize; }; - ParagraphObj& operator=( ParagraphObj& rParagraphObj ); + ParagraphObj& operator=( const ParagraphObj& rParagraphObj ); }; struct ImplTextObj @@ -659,13 +657,13 @@ struct ImplTextObj class TextObj { - ImplTextObj* mpImplTextObj; + mutable ImplTextObj* mpImplTextObj; void ImplCalculateTextPositions(); public : TextObj( ::com::sun::star::uno::Reference< ::com::sun::star::text::XSimpleText > & rXText, int nInstance, FontCollection& rFontCollection, PPTExBulletProvider& rBuProv ); - TextObj( TextObj& rTextObj ); + TextObj( const TextObj& rTextObj ); ~TextObj(); void Write( SvStream* pStrm ); diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx index f07245d1ff31..7915bc8b0340 100644 --- a/sd/source/filter/eppt/epptso.cxx +++ b/sd/source/filter/eppt/epptso.cxx @@ -312,14 +312,6 @@ sal_Bool GroupTable::GetNextGroupEntry() // --------------------------------------------------------------------------------------------- -void GroupTable::SkipCurrentGroup() -{ - if ( mnCurrentGroupEntry ) - delete ( mpGroupEntry[ --mnCurrentGroupEntry ] ); -} - -// --------------------------------------------------------------------------------------------- - FontCollectionEntry::~FontCollectionEntry() { } @@ -1869,7 +1861,7 @@ PortionObj::PortionObj( ::com::sun::star::uno::Reference< ::com::sun::star::text } } -PortionObj::PortionObj( PortionObj& rPortionObj ) +PortionObj::PortionObj( const PortionObj& rPortionObj ) : PropStateValue( rPortionObj ) { ImplConstruct( rPortionObj ); @@ -2097,7 +2089,7 @@ void PortionObj::ImplClear() delete[] mpText; } -void PortionObj::ImplConstruct( PortionObj& rPortionObj ) +void PortionObj::ImplConstruct( const PortionObj& rPortionObj ) { mbLastPortion = rPortionObj.mbLastPortion; mnTextSize = rPortionObj.mnTextSize; @@ -2291,7 +2283,7 @@ sal_uInt32 PortionObj::ImplGetTextField( ::com::sun::star::uno::Reference< ::com return nRetValue; } -PortionObj& PortionObj::operator=( PortionObj& rPortionObj ) +PortionObj& PortionObj::operator=( const PortionObj& rPortionObj ) { if ( this != &rPortionObj ) { @@ -2369,7 +2361,7 @@ ParagraphObj::ParagraphObj( const ::com::sun::star::uno::Reference< ::com::sun:: } } -ParagraphObj::ParagraphObj( ParagraphObj& rObj ) +ParagraphObj::ParagraphObj( const ParagraphObj& rObj ) : List() , PropStateValue() , SOParagraph() @@ -2878,7 +2870,7 @@ void ParagraphObj::ImplGetParagraphValues( PPTExBulletProvider& rBuProv, sal_Boo meBiDi = ePropState; } -void ParagraphObj::ImplConstruct( ParagraphObj& rParagraphObj ) +void ParagraphObj::ImplConstruct( const ParagraphObj& rParagraphObj ) { mnTextSize = rParagraphObj.mnTextSize; mnTextAdjust = rParagraphObj.mnTextAdjust; @@ -2891,8 +2883,9 @@ void ParagraphObj::ImplConstruct( ParagraphObj& rParagraphObj ) mbForbiddenRules = rParagraphObj.mbForbiddenRules; mnBiDi = rParagraphObj.mnBiDi; - for ( void* pPtr = rParagraphObj.First(); pPtr; pPtr = rParagraphObj.Next() ) - Insert( new PortionObj( *(PortionObj*)pPtr ), LIST_APPEND ); + ParagraphObj& rOther = const_cast(rParagraphObj); + for ( const void* pPtr = rOther.First(); pPtr; pPtr = rOther.Next() ) + Insert( new PortionObj( *(const PortionObj*)pPtr ), LIST_APPEND ); maTabStop = rParagraphObj.maTabStop; bExtendedParameters = rParagraphObj.bExtendedParameters; @@ -2917,16 +2910,6 @@ void ParagraphObj::ImplConstruct( ParagraphObj& rParagraphObj ) nBulletId = rParagraphObj.nBulletId; } -::com::sun::star::awt::Size ParagraphObj::ImplMapSize( const ::com::sun::star::awt::Size& rSize ) -{ - Size aSize( OutputDevice::LogicToLogic( Size( rSize.Width, rSize.Height ), maMapModeSrc, maMapModeDest ) ); - if ( !aSize.Width() ) - aSize.Width()++; - if ( !aSize.Height() ) - aSize.Height()++; - return ::com::sun::star::awt::Size( aSize.Width(), aSize.Height() ); -} - sal_uInt32 ParagraphObj::ImplCalculateTextPositions( sal_uInt32 nCurrentTextPosition ) { mnTextSize = 0; @@ -2935,7 +2918,7 @@ sal_uInt32 ParagraphObj::ImplCalculateTextPositions( sal_uInt32 nCurrentTextPosi return mnTextSize; } -ParagraphObj& ParagraphObj::operator=( ParagraphObj& rParagraphObj ) +ParagraphObj& ParagraphObj::operator=( const ParagraphObj& rParagraphObj ) { if ( this != &rParagraphObj ) { @@ -2998,7 +2981,7 @@ TextObj::TextObj( ::com::sun::star::uno::Reference< ::com::sun::star::text::XSim ImplCalculateTextPositions(); } -TextObj::TextObj( TextObj& rTextObj ) +TextObj::TextObj( const TextObj& rTextObj ) { mpImplTextObj = rTextObj.mpImplTextObj; mpImplTextObj->mnRefCount++; diff --git a/sd/source/filter/html/htmlattr.cxx b/sd/source/filter/html/htmlattr.cxx index 5adcbd5fc56a..4bcb73535ba1 100644 --- a/sd/source/filter/html/htmlattr.cxx +++ b/sd/source/filter/html/htmlattr.cxx @@ -100,15 +100,3 @@ void SdHtmlAttrPreview::SetColors( Color& aBack, Color& aText, Color& aLink, m_aVLinkColor = aVLink; m_aALinkColor = aALink; } - -// ===================================================================== -// ===================================================================== -void SdHtmlAttrPreview::GetColors( Color& aBack, Color& aText, Color& aLink, - Color& aVLink, Color& aALink ) const -{ - aBack = m_aBackColor; - aText = m_aTextColor; - aLink = m_aLinkColor; - aVLink = m_aVLinkColor; - aALink = m_aALinkColor; -} diff --git a/sd/source/filter/html/htmlattr.hxx b/sd/source/filter/html/htmlattr.hxx index b076b2a29307..1caa16822ab1 100644 --- a/sd/source/filter/html/htmlattr.hxx +++ b/sd/source/filter/html/htmlattr.hxx @@ -46,8 +46,6 @@ public: void SetColors( Color& aBack, Color& aText, Color& aLink, Color& aVLink, Color& aALink ); - void GetColors( Color& aBack, Color& aText, Color& aLink, - Color& aVLink, Color& aALink ) const; }; #endif // _SD_HTMLATTR_HXX diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx index 82fabc73aed2..9de46771e14c 100644 --- a/sd/source/filter/html/htmlex.cxx +++ b/sd/source/filter/html/htmlex.cxx @@ -3371,15 +3371,6 @@ BOOL HtmlErrorContext::GetString( ULONG, String& rCtxStr ) // ===================================================================== -void HtmlErrorContext::SetContext( USHORT nResId ) -{ - mnResId = nResId; - maURL1.Erase(); - maURL2.Erase(); -} - -// ===================================================================== - void HtmlErrorContext::SetContext( USHORT nResId, const String& rURL ) { mnResId = nResId; diff --git a/sd/source/filter/html/htmlex.hxx b/sd/source/filter/html/htmlex.hxx index 34ca8182d22f..43bc12419f84 100644 --- a/sd/source/filter/html/htmlex.hxx +++ b/sd/source/filter/html/htmlex.hxx @@ -88,7 +88,6 @@ public: virtual BOOL GetString( ULONG nErrId, String& rCtxStr ); - void SetContext( USHORT nResId ); void SetContext( USHORT nResId, const String& rURL ); void SetContext( USHORT nResId, const String& rURL1, const String& rURL2 ); }; diff --git a/sd/source/filter/ppt/ppt97animations.cxx b/sd/source/filter/ppt/ppt97animations.cxx index a4a3564d35b0..25ac858ca319 100644 --- a/sd/source/filter/ppt/ppt97animations.cxx +++ b/sd/source/filter/ppt/ppt97animations.cxx @@ -84,11 +84,6 @@ Ppt97Animation::Ppt97Animation( SvStream& rInputStream ) m_aAtom.ReadStream( rInputStream ); } -Ppt97Animation::Ppt97Animation() - : MEMBER_CONSTRUCTOR_LIST() -{ -} - Ppt97Animation::Ppt97Animation( const Ppt97Animation& rAnimation ) : MEMBER_CONSTRUCTOR_LIST() { @@ -163,11 +158,12 @@ bool Ppt97Animation::HasAfterEffect_DimAtNextEffect() const { return m_aAtom.nAfterEffect == 2; } +#ifdef FUTURE bool Ppt97Animation::HasAfterEffect_DimAfterEffect() const { return m_aAtom.nAfterEffect == 3; } - +#endif UINT32 Ppt97Animation::GetSoundRef() const { return m_aAtom.nSoundRef; diff --git a/sd/source/filter/ppt/ppt97animations.hxx b/sd/source/filter/ppt/ppt97animations.hxx index 4aa24ab12de8..c68ba9a19382 100644 --- a/sd/source/filter/ppt/ppt97animations.hxx +++ b/sd/source/filter/ppt/ppt97animations.hxx @@ -95,7 +95,6 @@ class Ppt97Animation public: //public methods Ppt97Animation( SvStream& rIn ); - Ppt97Animation(); Ppt97Animation( const Ppt97Animation& rAnimation ); Ppt97Animation& operator= ( const Ppt97Animation& rAnimation ); bool operator < ( const Ppt97Animation& rAnimation ) const;//later is greater @@ -129,7 +128,9 @@ private: //private methods bool HasAfterEffect() const; bool HasAfterEffect_ChangeColor() const; bool HasAfterEffect_DimAtNextEffect() const; +#ifdef FUTURE bool HasAfterEffect_DimAfterEffect() const; +#endif bool HasStopPreviousSound() const; bool HasReverseOrder() const; //true if the text paragraphs should be animated in reverse order sal_Int32 GetParagraphLevel() const; //paragraph level that is animated ( that paragraph and higher levels ) diff --git a/sd/source/filter/ppt/pptatom.cpp b/sd/source/filter/ppt/pptatom.cpp index 21a0c3c3f9f8..e48cdcc0acd6 100644 --- a/sd/source/filter/ppt/pptatom.cpp +++ b/sd/source/filter/ppt/pptatom.cpp @@ -109,15 +109,3 @@ const Atom* Atom::findNextChildAtom( sal_uInt16 nRecType, const Atom* pLast ) co return pChild; } - -/** returns the next child atom after pLast with nRecType and nRecInstance or NULL */ -const Atom* Atom::findNextChildAtom( sal_uInt16 nRecType, sal_uInt16 nRecInstance, const Atom* pLast ) const -{ - const Atom* pChild = pLast != NULL ? pLast->mpNextAtom : mpFirstChild; - while( pChild && (pChild->maRecordHeader.nRecType != nRecType) && (pChild->maRecordHeader.nRecInstance != nRecInstance) ) - { - pChild = findNextChildAtom( pChild ); - } - - return pChild; -} diff --git a/sd/source/filter/ppt/pptatom.hxx b/sd/source/filter/ppt/pptatom.hxx index 0b13dc314584..7cadad0e7dcd 100644 --- a/sd/source/filter/ppt/pptatom.hxx +++ b/sd/source/filter/ppt/pptatom.hxx @@ -61,9 +61,6 @@ public: /** returns the first child atom with nRecType and nRecInstance or NULL */ inline const Atom* findFirstChildAtom( sal_uInt16 nRecType, sal_uInt16 nRecInstance ) const; - /** returns the next child atom after pLast with nRecType and nRecInstance or NULL */ - const Atom* findNextChildAtom( sal_uInt16 nRecType, sal_uInt16 nRecInstance, const Atom* pLast ) const; - /** returns the first child atom or NULL */ inline const Atom* findFirstChildAtom() const; @@ -114,11 +111,6 @@ inline const DffRecordHeader& Atom::getHeader() const return maRecordHeader; } -inline const Atom* Atom::findFirstChildAtom( sal_uInt16 nRecType, sal_uInt16 nRecInstance ) const -{ - return findNextChildAtom( nRecType, nRecInstance, NULL ); -} - inline const Atom* Atom::findFirstChildAtom() const { return mpFirstChild; diff --git a/sd/source/filter/ppt/pptinanimations.cxx b/sd/source/filter/ppt/pptinanimations.cxx index 16fc1a99dd8a..10b0b152b8f4 100644 --- a/sd/source/filter/ppt/pptinanimations.cxx +++ b/sd/source/filter/ppt/pptinanimations.cxx @@ -1522,52 +1522,6 @@ void AnimationImporter::importTimeContainer( const Atom* pAtom, const Reference< // -------------------------------------------------------------------- -/* todo: for now we dump sub containers into its parent container, what else to do with it? */ -void AnimationImporter::importAnimationSubContainer( const Atom* pAtom, const Reference< XAnimationNode >& xNode ) -{ - DBG_ASSERT( pAtom && xNode.is(), "invalid call to ppt::AnimationImporter::importTimeContainer()!"); - if( pAtom && xNode.is() ) - { - // import sub containers - const Atom* pChildAtom = pAtom->findFirstChildAtom(); - - while( pChildAtom ) - { - switch( pChildAtom->getType() ) - { - case DFF_msofbtAnimNode: - case DFF_msofbtAnimEvent: - case DFF_msofbtAnimValue: - case DFF_msofbtAnimAction: - case DFF_msofbtAnimPropertySet: - break; - case DFF_msofbtAnimCommand: - { - const OUString aServiceName( OUString::createFromAscii("com.sun.star.animations.Command") ); - Reference< XAnimationNode > xChildNode( ::comphelper::getProcessServiceFactory()->createInstance(aServiceName), UNO_QUERY ); - importAnimationNodeContainer( pChildAtom, xChildNode ); - Reference< XTimeContainer > xParentContainer( xNode, UNO_QUERY ); - if( xParentContainer.is() && xChildNode.is() ) - xParentContainer->appendChild( xChildNode ); - } - break; - - default: - { - dump_atom_header( pChildAtom, true, false ); - dump_atom( pChildAtom ); - dump_atom_header( pChildAtom, false, false ); - } - break; - } - - pChildAtom = pAtom->findNextChildAtom( pChildAtom ); - } - } -} - -// -------------------------------------------------------------------- - void AnimationImporter::importAnimationNodeContainer( const Atom* pAtom, const Reference< XAnimationNode >& xNode ) { DBG_ASSERT( pAtom && xNode.is(), "invalid call to ppt::AnimationImporter::importAnimationNodeContainer()!"); @@ -3894,14 +3848,6 @@ void AnimationImporter::dump_atom( const Atom* , bool ) { } -void AnimationImporter::dump( sal_uInt32 , bool ) -{ -} - -void AnimationImporter::dump_anim_group( const Atom* , const AnimationNode& , const PropertySet& , bool ) -{ -} - void AnimationImporter::dump_target( ::com::sun::star::uno::Any& ) { } @@ -3922,10 +3868,6 @@ void AnimationImporter::dump( const char * ) { } -void AnimationImporter::dump( const rtl::OUString& ) -{ -} - void AnimationImporter::dump( const char * , sal_Int32 ) { } diff --git a/sd/source/filter/ppt/pptinanimations.hxx b/sd/source/filter/ppt/pptinanimations.hxx index d29449361861..24f423029e82 100644 --- a/sd/source/filter/ppt/pptinanimations.hxx +++ b/sd/source/filter/ppt/pptinanimations.hxx @@ -62,7 +62,6 @@ private: void importAnimationContainer( const Atom* pAtom, const ::com::sun::star::uno::Reference< ::com::sun::star::animations::XAnimationNode >& xParent ); void importTimeContainer( const Atom* pAtom, const ::com::sun::star::uno::Reference< ::com::sun::star::animations::XAnimationNode >& xNode ); void importAnimationNodeContainer( const Atom* pAtom, const ::com::sun::star::uno::Reference< ::com::sun::star::animations::XAnimationNode >& xNode ); - void importAnimationSubContainer( const Atom* pAtom, const ::com::sun::star::uno::Reference< ::com::sun::star::animations::XAnimationNode >& xNode ); void importAnimateSetContainer( const Atom* pAtom, const ::com::sun::star::uno::Reference< ::com::sun::star::animations::XAnimationNode >& xNode ); void importAnimateFilterContainer( const Atom* pAtom, const ::com::sun::star::uno::Reference< ::com::sun::star::animations::XAnimationNode >& xNode ); @@ -109,18 +108,18 @@ private: #ifdef DBG_ANIM_LOG FILE * mpFile; + void dump_anim_group( const Atom* pAtom, const AnimationNode& rNode, const PropertySet& rSet, bool bOpen ); + void dump( const rtl::OUString& rString ); + void dump( sal_uInt32 nLen, bool bNewLine = true ); #endif void dump_atom_header( const Atom* pAtom, bool bOpen, bool bAppend ); void dump_atom( const Atom* pAtom, bool bNewLine = true ); - void dump( sal_uInt32 nLen, bool bNewLine = true ); - void dump_anim_group( const Atom* pAtom, const AnimationNode& rNode, const PropertySet& rSet, bool bOpen ); void dump_target( ::com::sun::star::uno::Any& rAny ); void dump( ::com::sun::star::uno::Any& rAny ); void dump( const PropertySet& rSet ); void dump( const AnimationNode& rNode ); void dump( const char * pText ); - void dump( const rtl::OUString& rString ); void dump( const char * pText, sal_Int32 nInt ); void dump( const char * pText, double fDouble ); void dump( const char * pText, const char * pText2 ); diff --git a/sd/source/ui/accessibility/AccessibleViewForwarder.cxx b/sd/source/ui/accessibility/AccessibleViewForwarder.cxx index 70734ac23198..de5342afd23f 100644 --- a/sd/source/ui/accessibility/AccessibleViewForwarder.cxx +++ b/sd/source/ui/accessibility/AccessibleViewForwarder.cxx @@ -44,18 +44,6 @@ namespace accessibility { May change in the future. */ -AccessibleViewForwarder::AccessibleViewForwarder (SdrPaintView* pView, USHORT nWindowId) - : mpView (pView), - mnWindowId (nWindowId), - mrDevice (pView->GetPaintWindow((sal_uInt32)nWindowId)->GetOutputDevice()) -{ - OSL_ASSERT (mpView != NULL); - // empty -} - - - - AccessibleViewForwarder::AccessibleViewForwarder (SdrPaintView* pView, OutputDevice& rDevice) : mpView (pView), mnWindowId (0), @@ -86,15 +74,6 @@ AccessibleViewForwarder::~AccessibleViewForwarder (void) -void AccessibleViewForwarder::SetView (SdrPaintView* pView) -{ - mpView = pView; - OSL_ASSERT (mpView != NULL); -} - - - - sal_Bool AccessibleViewForwarder::IsValid (void) const { return sal_True; diff --git a/sd/source/ui/animations/AnimationSchemesPane.cxx b/sd/source/ui/animations/AnimationSchemesPane.cxx deleted file mode 100644 index 337dc64331fd..000000000000 --- a/sd/source/ui/animations/AnimationSchemesPane.cxx +++ /dev/null @@ -1,443 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_sd.hxx" -#include "AnimationSchemesPane.hxx" -#include "AnimationSchemesPane.hrc" -#include "CustomAnimation.hrc" - -#include "TransitionPreset.hxx" -#include "sdresid.hxx" -#include "ViewShellBase.hxx" -#include "DrawDocShell.hxx" -#include "SlideSorterViewShell.hxx" -#include "drawdoc.hxx" -#include "filedlg.hxx" -#include "strings.hrc" -#include "EventMultiplexer.hxx" -#include - -#ifndef _SVT_CONTROLDIMS_HRC_ -#include -#endif -#include -#include -#include -#include - -#include - - -using namespace ::com::sun::star; - -using ::com::sun::star::uno::Reference; -using ::com::sun::star::uno::Sequence; -using ::rtl::OUString; -using ::com::sun::star::uno::RuntimeException; - -// ______________________ -// -// Local Helper Functions -// ______________________ - -namespace -{ - -typedef ::boost::shared_ptr - SharedPageSelection; -SharedPageSelection lcl_getSelectedPages (::sd::ViewShellBase& rBase) -{ - ::sd::slidesorter::SlideSorterViewShell*pSlideSorterViewShell - = ::sd::slidesorter::SlideSorterViewShell::GetSlideSorter(rBase); - DBG_ASSERT( pSlideSorterViewShell, "No Slide-Sorter available" ); - - if (pSlideSorterViewShell != NULL) - { - return pSlideSorterViewShell->GetPageSelection(); - } - else - { - return SharedPageSelection(new sd::slidesorter::SlideSorterViewShell::PageSelection()); - } -} - -// void lcl_ApplyToPages( ::std::vector< SdPage * > aPages, const ::sd::impl::TransitionEffect & rEffect ) -// { -// ::std::vector< SdPage * >::const_iterator aIt( aPages.begin()); -// const ::std::vector< SdPage * >::const_iterator aEndIt( aPages.end()); -// for( ; aIt != aEndIt; ++aIt ) -// { -// rEffect.applyTo( *(*aIt) ); -// } -// } - -} // anonymous namespace - -namespace sd -{ - -// ____________________ -// -// AnimationSchemesPane -// ____________________ - -AnimationSchemesPane::AnimationSchemesPane( - ::Window * pParent, - ViewShellBase & rBase, - SdDrawDocument* pDoc ) : - Control( pParent, SdResId( DLG_ANIMATION_SCHEMES_PANE ) ), - - mrBase( rBase ), - mpDrawDoc( pDoc ), - maFL_APPLY_SCHEME( this, SdResId( FL_APPLY_SCHEME ) ), - maLB_ANIMATION_SCHEMES( this, SdResId( LB_ANIMATION_SCHEMES ) ), - maFL_EMPTY1( this, SdResId( FL_EMPTY1 ) ), - maPB_APPLY_TO_ALL( this, SdResId( PB_APPLY_TO_ALL ) ), - maPB_PLAY( this, SdResId( PB_PLAY ) ), - maPB_SLIDE_SHOW( this, SdResId( PB_SLIDE_SHOW ) ), - maFL_EMPTY2( this, SdResId( FL_EMPTY2 ) ), - maCB_AUTO_PREVIEW( this, SdResId( CB_AUTO_PREVIEW ) ), - - maSTR_NO_SCHEME( SdResId( STR_NO_SCHEME ) ), - mbHasSelection( false ), - mbUpdatingControls( false ), - mbIsMainViewChangePending( false ) -{ - // use no resource ids from here on - FreeResource(); - - if( pDoc ) - mxModel.set( pDoc->getUnoModel(), uno::UNO_QUERY ); - // TODO: get correct view - if( mxModel.is()) - mxView.set( mxModel->getCurrentController(), uno::UNO_QUERY ); - - // fill list box of slide transitions - maLB_ANIMATION_SCHEMES.InsertEntry( maSTR_NO_SCHEME ); - - // set defaults - maCB_AUTO_PREVIEW.Check(); // automatic preview on - - // update control states before adding handlers - updateLayout(); - updateControls(); - - // set handlers - maPB_APPLY_TO_ALL.SetClickHdl( LINK( this, AnimationSchemesPane, ApplyToAllButtonClicked )); - maPB_PLAY.SetClickHdl( LINK( this, AnimationSchemesPane, PlayButtonClicked )); - maPB_SLIDE_SHOW.SetClickHdl( LINK( this, AnimationSchemesPane, SlideShowButtonClicked )); - - maLB_ANIMATION_SCHEMES.SetSelectHdl( LINK( this, AnimationSchemesPane, SchemeSelected )); - - addListener(); -} - -AnimationSchemesPane::~AnimationSchemesPane() -{ - removeListener(); -} - -void AnimationSchemesPane::Resize() -{ - updateLayout(); -} - -void AnimationSchemesPane::onSelectionChanged() -{ - updateControls(); -} - -void AnimationSchemesPane::onChangeCurrentPage() -{ - updateControls(); -} - -void AnimationSchemesPane::updateLayout() -{ - ::Size aPaneSize( GetSizePixel() ); - - // start layouting elements from bottom to top. The remaining space is used - // for the topmost list box - ::Point aOffset( LogicToPixel( Point( 3, 3 ), MAP_APPFONT ) ); - long nOffsetX = aOffset.getX(); - long nOffsetY = aOffset.getY(); - long nOffsetBtnX = LogicToPixel( Point( 6, 1 ), MAP_APPFONT ).getX(); - - ::Point aUpperLeft( nOffsetX, aPaneSize.getHeight() - nOffsetY ); - long nMaxWidth = aPaneSize.getWidth() - 2 * nOffsetX; - - // auto preview check-box - ::Size aCtrlSize = maCB_AUTO_PREVIEW.GetSizePixel(); - aCtrlSize.setWidth( maCB_AUTO_PREVIEW.CalcMinimumSize( nMaxWidth ).getWidth()); - aUpperLeft.setY( aUpperLeft.getY() - aCtrlSize.getHeight()); - maCB_AUTO_PREVIEW.SetPosSizePixel( aUpperLeft, aCtrlSize ); - - // fixed line above check-box - aCtrlSize = maFL_EMPTY2.GetSizePixel(); - aCtrlSize.setWidth( nMaxWidth ); - aUpperLeft.setY( aUpperLeft.getY() - aCtrlSize.getHeight()); - maFL_EMPTY2.SetPosSizePixel( aUpperLeft, aCtrlSize ); - - // buttons "Play" and "Slide Show" - long nPlayButtonWidth = maPB_PLAY.CalcMinimumSize().getWidth() + 2 * nOffsetBtnX; - long nSlideShowButtonWidth = maPB_SLIDE_SHOW.CalcMinimumSize().getWidth() + 2 * nOffsetBtnX; - - if( (nPlayButtonWidth + nSlideShowButtonWidth + nOffsetX) <= nMaxWidth ) - { - // place buttons side by side - aCtrlSize = maPB_PLAY.GetSizePixel(); - aUpperLeft.setY( aUpperLeft.getY() - aCtrlSize.getHeight()); - aCtrlSize.setWidth( nPlayButtonWidth ); - maPB_PLAY.SetPosSizePixel( aUpperLeft, aCtrlSize ); - - aUpperLeft.setX( aUpperLeft.getX() + nPlayButtonWidth + nOffsetX ); - aCtrlSize.setWidth( nSlideShowButtonWidth ); - maPB_SLIDE_SHOW.SetPosSizePixel( aUpperLeft, aCtrlSize ); - aUpperLeft.setX( nOffsetX ); - } - else - { - // place buttons on top of each other - aCtrlSize = maPB_SLIDE_SHOW.GetSizePixel(); - aUpperLeft.setY( aUpperLeft.getY() - aCtrlSize.getHeight()); - aCtrlSize.setWidth( nSlideShowButtonWidth ); - maPB_SLIDE_SHOW.SetPosSizePixel( aUpperLeft, aCtrlSize ); - - aCtrlSize = maPB_PLAY.GetSizePixel(); - aUpperLeft.setY( aUpperLeft.getY() - aCtrlSize.getHeight() - nOffsetY ); - aCtrlSize.setWidth( nPlayButtonWidth ); - maPB_PLAY.SetPosSizePixel( aUpperLeft, aCtrlSize ); - } - - // "Apply to All Slides" button - aCtrlSize = maPB_APPLY_TO_ALL.GetSizePixel(); - aCtrlSize.setWidth( maPB_APPLY_TO_ALL.CalcMinimumSize( nMaxWidth ).getWidth() + 2 * nOffsetBtnX ); - aUpperLeft.setY( aUpperLeft.getY() - aCtrlSize.getHeight() - nOffsetY ); - maPB_APPLY_TO_ALL.SetPosSizePixel( aUpperLeft, aCtrlSize ); - - // fixed line above "Apply to All Slides" button - aCtrlSize = maFL_EMPTY1.GetSizePixel(); - aCtrlSize.setWidth( nMaxWidth ); - aUpperLeft.setY( aUpperLeft.getY() - aCtrlSize.getHeight()); - maFL_EMPTY1.SetPosSizePixel( aUpperLeft, aCtrlSize ); - - // fixed line "Apply to selected slides" - aCtrlSize = maFL_APPLY_SCHEME.GetSizePixel(); - aCtrlSize.setWidth( nMaxWidth ); - ::Point aUpperLeftCorner( nOffsetX, nOffsetY ); - maFL_APPLY_SCHEME.SetPosSizePixel( aUpperLeftCorner, aCtrlSize ); - aUpperLeftCorner.setY( aUpperLeftCorner.getY() + aCtrlSize.getHeight() + nOffsetY ); - aUpperLeft.setY( aUpperLeft.getY() - nOffsetY ); - - // list box animation scheme - aCtrlSize.setWidth( nMaxWidth ); - aCtrlSize.setHeight( aUpperLeft.getY() - aUpperLeftCorner.getY() ); - maLB_ANIMATION_SCHEMES.SetPosSizePixel( aUpperLeftCorner, aCtrlSize ); -} - -void AnimationSchemesPane::updateControls() -{ - SharedPageSelection aSelectedPages( lcl_getSelectedPages( mrBase )); - if( aSelectedPages->empty()) - { - mbHasSelection = false; - return; - } - mbHasSelection = true; - - DBG_ASSERT( ! mbUpdatingControls, "Multiple Control Updates" ); - mbUpdatingControls = true; - - // get model data for first page -#ifdef DBG_UTIL - SdPage * pFirstPage = aSelectedPages->front(); - DBG_ASSERT( pFirstPage, "Invalid Page" ); -#endif - -// // merge with other pages -// ::std::vector< SdPage * >::const_iterator aIt( aSelectedPages.begin()); -// const ::std::vector< SdPage * >::const_iterator aEndIt( aSelectedPages.end()); - -// // start with second page (note aIt != aEndIt, because ! aSelectedPages.empty()) -// for( ++aIt ;aIt != aEndIt; ++aIt ) -// { -// if( *aIt ) -// // merge -// } - - mbUpdatingControls = false; - - updateControlState(); -} - -void AnimationSchemesPane::updateControlState() -{ - maLB_ANIMATION_SCHEMES.Enable( mbHasSelection ); - - maPB_APPLY_TO_ALL.Enable( mbHasSelection ); - maPB_PLAY.Enable( mbHasSelection ); -// maPB_SLIDE_SHOW.Enable( TRUE ); - maCB_AUTO_PREVIEW.Enable( mbHasSelection ); -} - -void AnimationSchemesPane::getAnimationSchemeFromControls() const -{ - // TODO: Implement -} - -void AnimationSchemesPane::applyToSelectedPages() -{ - if( ! mbUpdatingControls ) - { - SharedPageSelection aSelectedPages( lcl_getSelectedPages( mrBase )); - if( ! aSelectedPages->empty()) - { -// lcl_ApplyToPages( aSelectedPages, getAnimationSchemeFromControls() ); - } - if( maCB_AUTO_PREVIEW.IsEnabled() && - maCB_AUTO_PREVIEW.IsChecked()) - { - playCurrentScheme(); - } - } -} - -void AnimationSchemesPane::playCurrentScheme() -{ - // TODO: Implement a preview in the center view -} - -void AnimationSchemesPane::addListener() -{ - Link aLink( LINK(this,AnimationSchemesPane,EventMultiplexerListener) ); - mrBase.GetEventMultiplexer()->AddEventListener( - aLink, - tools::EventMultiplexerEvent::EID_EDIT_VIEW_SELECTION - | tools::EventMultiplexerEvent::EID_CURRENT_PAGE - | tools::EventMultiplexerEvent::EID_MAIN_VIEW_REMOVED - | tools::EventMultiplexerEvent::EID_MAIN_VIEW_ADDED - | tools::EventMultiplexerEvent::EID_CONFIGURATION_UPDATED); -} - -void AnimationSchemesPane::removeListener() -{ - Link aLink( LINK(this,AnimationSchemesPane,EventMultiplexerListener) ); - mrBase.GetEventMultiplexer()->RemoveEventListener( aLink ); -} - -IMPL_LINK(AnimationSchemesPane,EventMultiplexerListener, - tools::EventMultiplexerEvent*,pEvent) -{ - switch (pEvent->meEventId) - { - case tools::EventMultiplexerEvent::EID_EDIT_VIEW_SELECTION: - onSelectionChanged(); - break; - - case tools::EventMultiplexerEvent::EID_CURRENT_PAGE: - onChangeCurrentPage(); - break; - - case tools::EventMultiplexerEvent::EID_MAIN_VIEW_REMOVED: - mxView = Reference(); - onSelectionChanged(); - onChangeCurrentPage(); - break; - - case tools::EventMultiplexerEvent::EID_MAIN_VIEW_ADDED: - mbIsMainViewChangePending = true; - break; - - case tools::EventMultiplexerEvent::EID_CONFIGURATION_UPDATED: - if (mbIsMainViewChangePending) - { - mbIsMainViewChangePending = false; - mxView = Reference::query( mxModel->getCurrentController() ); - onSelectionChanged(); - onChangeCurrentPage(); - } - break; - } - return 0; -} - -IMPL_LINK( AnimationSchemesPane, ApplyToAllButtonClicked, void *, EMPTYARG ) -{ - DBG_ASSERT( mpDrawDoc, "Invalid Draw Document!" ); - if( !mpDrawDoc ) - return 0; - - ::std::vector< SdPage * > aPages; - - sal_uInt16 nPageCount = mpDrawDoc->GetSdPageCount( PK_STANDARD ); - aPages.reserve( nPageCount ); - for( sal_uInt16 i=0; iGetSdPage( i, PK_STANDARD ); - if( pPage ) - aPages.push_back( pPage ); - } - -// if( ! aPages.empty()) -// lcl_ApplyToPages( aPages, getAnimationSchemeFromControls() ); - - return 0; -} - - -IMPL_LINK( AnimationSchemesPane, PlayButtonClicked, void *, EMPTYARG ) -{ - playCurrentScheme(); - return 0; -} - -IMPL_LINK( AnimationSchemesPane, SlideShowButtonClicked, void *, EMPTYARG ) -{ - mrBase.StartPresentation(); - return 0; -} - -IMPL_LINK( AnimationSchemesPane, SchemeSelected, void *, EMPTYARG ) -{ - applyToSelectedPages(); - return 0; -} - -::Window * createAnimationSchemesPanel( ::Window* pParent, ViewShellBase& rBase ) -{ - ::Window* pWindow = 0; - - DrawDocShell* pDocSh = rBase.GetDocShell(); - if( pDocSh ) - pWindow = new AnimationSchemesPane( pParent, rBase, pDocSh->GetDoc() ); - - return pWindow; -} - - -} // namespace sd diff --git a/sd/source/ui/animations/AnimationSchemesPane.hrc b/sd/source/ui/animations/AnimationSchemesPane.hrc deleted file mode 100644 index 2b9ec9be3611..000000000000 --- a/sd/source/ui/animations/AnimationSchemesPane.hrc +++ /dev/null @@ -1,50 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _SD_ANIMATIONSCHEMESPANE_HRC -#define _SD_ANIMATIONSCHEMESPANE_HRC - -#define FL_APPLY_SCHEME 1 -// spec: 1 -#define LB_ANIMATION_SCHEMES 2 - -#define FL_EMPTY1 3 -// spec: 2 -#define PB_APPLY_TO_ALL 4 -// spec: 3 -#define PB_PLAY 5 -// spec: 4 -#define PB_SLIDE_SHOW 6 - -#define FL_EMPTY2 7 -// spec: 5 -#define CB_AUTO_PREVIEW 8 - -#define STR_NO_SCHEME 9 - - -#endif // _SD_ANIMATIONSCHEMESPANE_HRC diff --git a/sd/source/ui/animations/AnimationSchemesPane.hxx b/sd/source/ui/animations/AnimationSchemesPane.hxx deleted file mode 100644 index 8528e5e6ef64..000000000000 --- a/sd/source/ui/animations/AnimationSchemesPane.hxx +++ /dev/null @@ -1,114 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef SD_ANIMATIONSCHEMESPANE_HXX -#define SD_ANIMATIONSCHEMESPANE_HXX - -#include -#include -#include -#ifndef _SV_BUTTON_HXX -#include -#endif -#include -#include -#include - -#include - -class SdDrawDocument; -class SdPage; - -namespace sd { namespace tools { -class EventMultiplexerEvent; -} } - -namespace sd -{ - -class ViewShellBase; - -class AnimationSchemesPane : public Control -{ -public: - explicit AnimationSchemesPane( - ::Window * pParent, - ViewShellBase & rBase, - SdDrawDocument* pDoc ); - virtual ~AnimationSchemesPane(); - - virtual void Resize(); - - void onSelectionChanged(); - void onChangeCurrentPage(); - -private: - void updateLayout(); - void updateControls(); - void updateControlState(); - - void applyToSelectedPages(); - void playCurrentScheme(); - - void addListener(); - void removeListener(); - - void getAnimationSchemeFromControls() const; - - DECL_LINK( ApplyToAllButtonClicked, void * ); - DECL_LINK( PlayButtonClicked, void * ); - DECL_LINK( SlideShowButtonClicked, void * ); - - DECL_LINK( SchemeSelected, void * ); - DECL_LINK(EventMultiplexerListener, tools::EventMultiplexerEvent*); - -private: - ViewShellBase & mrBase; - SdDrawDocument * mpDrawDoc; - - FixedLine maFL_APPLY_SCHEME; - ListBox maLB_ANIMATION_SCHEMES; - FixedLine maFL_EMPTY1; - PushButton maPB_APPLY_TO_ALL; - PushButton maPB_PLAY; - PushButton maPB_SLIDE_SHOW; - FixedLine maFL_EMPTY2; - CheckBox maCB_AUTO_PREVIEW; - - String maSTR_NO_SCHEME; - - ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawView > mxView; - ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > mxModel; - - bool mbHasSelection; - bool mbUpdatingControls; - bool mbIsMainViewChangePending; -}; - -} // namespace sd - -// SD_ANIMATIONSCHEMESPANE_HXX -#endif diff --git a/sd/source/ui/animations/AnimationSchemesPane.src b/sd/source/ui/animations/AnimationSchemesPane.src deleted file mode 100644 index 12447c917930..000000000000 --- a/sd/source/ui/animations/AnimationSchemesPane.src +++ /dev/null @@ -1,113 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#include "CustomAnimation.hrc" -#include "AnimationSchemesPane.hrc" -#include "helpids.h" - -#ifndef _SVT_CONTROLDIMS_HRC_ -#include -#endif - -// Note: Sizes of 1 usually mean they are auto-calculated - -Control DLG_ANIMATION_SCHEMES_PANE -{ - OutputSize = TRUE; - Size = MAP_APPFONT( 1, 1 ); - - Text [ en-US ] = "Animation Schemes"; - - FixedLine FL_APPLY_SCHEME - { - Size = MAP_APPFONT( 1, RSC_CD_FIXEDLINE_HEIGHT ); - Text [ en-US ] = "Apply to selected slides "; - }; - - ListBox LB_ANIMATION_SCHEMES - { - HelpId = HID_SD_ANIMATIONSCHEMESPANE_LB_ANIMATION_SCHEMES; - Border = TRUE ; - TabStop = TRUE ; - - Size = MAP_APPFONT( 1, 1 ); - }; - - FixedLine FL_EMPTY1 - { - Size = MAP_APPFONT( 1, RSC_CD_FIXEDLINE_HEIGHT ); - }; - - PushButton PB_APPLY_TO_ALL - { - HelpId = HID_SD_ANIMATIONSCHEMESPANE_PB_APPLY_TO_ALL; - Size = MAP_APPFONT( 1, RSC_CD_PUSHBUTTON_HEIGHT ); - TabStop = TRUE ; - - Text [ en-US ] = "Apply to All Slides"; - }; - - - PushButton PB_PLAY - { - HelpId = HID_SD_ANIMATIONSCHEMESPANE_PB_PLAY; - Size = MAP_APPFONT( 1, RSC_CD_PUSHBUTTON_HEIGHT ); - TabStop = TRUE ; - - Text [ en-US ] = "Play"; - }; - - PushButton PB_SLIDE_SHOW - { - HelpId = HID_SD_ANIMATIONSCHEMESPANE_PB_SLIDE_SHOW; - Size = MAP_APPFONT( 1, RSC_CD_PUSHBUTTON_HEIGHT ); - TabStop = TRUE ; - - Text [ en-US ] = "Slide Show"; - }; - - FixedLine FL_EMPTY2 - { - Size = MAP_APPFONT( 1, RSC_CD_FIXEDLINE_HEIGHT ); - }; - - Checkbox CB_AUTO_PREVIEW - { - HelpId = HID_SD_ANIMATIONSCHEMESPANE_CB_AUTO_PREVIEW; - Size = MAP_APPFONT( 1, RSC_CD_CHECKBOX_HEIGHT ); - TabStop = TRUE ; - - Text [ en-US ] = "Automatic preview"; - }; - - // -------------------- - - String STR_NO_SCHEME - { - Text [ en-US ] = "No Animation"; - }; -}; diff --git a/sd/source/ui/animations/CustomAnimationCreateDialog.cxx b/sd/source/ui/animations/CustomAnimationCreateDialog.cxx index 3ac3d1f24a07..f76b84d29826 100644 --- a/sd/source/ui/animations/CustomAnimationCreateDialog.cxx +++ b/sd/source/ui/animations/CustomAnimationCreateDialog.cxx @@ -92,7 +92,6 @@ extern void fillDurationComboBox( ComboBox* pBox ); class CategoryListBox : public ListBox { public: - CategoryListBox( Window* pParent, WinBits nStyle = WB_BORDER ); CategoryListBox( Window* pParent, const ResId& rResId ); ~CategoryListBox(); @@ -110,12 +109,6 @@ private: Link maDoubleClickHdl; }; -CategoryListBox::CategoryListBox( Window* pParent, WinBits nStyle /* = WB_BORDER */ ) -: ListBox( pParent, nStyle ) -{ - EnableUserDraw( TRUE ); -} - CategoryListBox::CategoryListBox( Window* pParent, const ResId& rResId ) : ListBox( pParent, rResId ) { diff --git a/sd/source/ui/animations/CustomAnimationSchemesPane.hrc b/sd/source/ui/animations/CustomAnimationSchemesPane.hrc deleted file mode 100644 index 70168d2662cf..000000000000 --- a/sd/source/ui/animations/CustomAnimationSchemesPane.hrc +++ /dev/null @@ -1,32 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _SD_CUSTOMANIMATIONSCHEMESPANE_HRC -#define _SD_CUSTOMANIMATIONSCHEMESPANE_HRC - - -#endif // _SD_CUSTOMANIMATIONSCHEMESPANE_HRC \ No newline at end of file diff --git a/sd/source/ui/animations/CustomAnimationSchemesPane.src b/sd/source/ui/animations/CustomAnimationSchemesPane.src deleted file mode 100644 index 1499b79bbb4b..000000000000 --- a/sd/source/ui/animations/CustomAnimationSchemesPane.src +++ /dev/null @@ -1,71 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#include "CustomAnimation.hrc" - -ModalDialog DLG_CUSTOMANIMATION_SCHEMES_PANE -{ - DialogControl = TRUE; - - Text [ en-US ] = "Animation Schemes"; - - Fixedline 1 - { - Text [ en-US ] = "Apply to selected slides"; - }; - - PushButton 1 - { - Text [ en-US ] = "Apply to All Slides"; - }; - - PushButton 2 - { - Text [ en-US ] = "Play"; - }; - - PushButton 3 - { - Text [ en-US ] = "Slide Show"; - }; - - Checkbox 4 - { - Text [ en-US ] = "Automatic preview"; - }; - - String 2 - { - Text [ en-US ] = "No Animation"; - }; - - String 3 - { - Text [ en-US ] = "Recently used Schemes"; - }; -}; - diff --git a/sd/source/ui/animations/makefile.mk b/sd/source/ui/animations/makefile.mk index 2194dad6eafc..db010bf4ef23 100644 --- a/sd/source/ui/animations/makefile.mk +++ b/sd/source/ui/animations/makefile.mk @@ -42,16 +42,13 @@ ENABLE_EXCEPTIONS=TRUE SRS1NAME=$(TARGET) SRC1FILES =\ - AnimationSchemesPane.src\ CustomAnimationPane.src\ CustomAnimationDialog.src\ CustomAnimationCreateDialog.src\ SlideTransitionPane.src\ - CustomAnimationSchemesPane.src\ CustomAnimation.src SLOFILES = \ - $(SLO)$/AnimationSchemesPane.obj \ $(SLO)$/CustomAnimationCreateDialog.obj\ $(SLO)$/CustomAnimationDialog.obj\ $(SLO)$/CustomAnimationPane.obj \ diff --git a/sd/source/ui/annotations/annotationmanager.cxx b/sd/source/ui/annotations/annotationmanager.cxx index aa42fec50f9c..1e64617edab8 100644 --- a/sd/source/ui/annotations/annotationmanager.cxx +++ b/sd/source/ui/annotations/annotationmanager.cxx @@ -971,7 +971,7 @@ IMPL_LINK(AnnotationManagerImpl,EventMultiplexerListener, } return 0; } - +#if 0 OUString AnnotationManagerImpl::GetHelpText( ::com::sun::star::uno::Reference< ::com::sun::star::office::XAnnotation >& xAnnotation ) { OUString sRet; @@ -994,7 +994,7 @@ OUString AnnotationManagerImpl::GetHelpText( ::com::sun::star::uno::Reference< : return sRet; } - +#endif void AnnotationManagerImpl::ExecuteAnnotationContextMenu( Reference< XAnnotation > xAnnotation, ::Window* pParent, const Rectangle& rContextRect, bool bButtonMenu /* = false */ ) { diff --git a/sd/source/ui/annotations/annotationmanagerimpl.hxx b/sd/source/ui/annotations/annotationmanagerimpl.hxx index 43b53d8467f9..70b95c2a509b 100755 --- a/sd/source/ui/annotations/annotationmanagerimpl.hxx +++ b/sd/source/ui/annotations/annotationmanagerimpl.hxx @@ -99,9 +99,9 @@ public: void onTagDeselected( AnnotationTag& rTag ); void onSelectionChanged(); - +#if 0 rtl::OUString GetHelpText( ::com::sun::star::uno::Reference< ::com::sun::star::office::XAnnotation >& xAnnotation ); - +#endif void addListener(); void removeListener(); diff --git a/sd/source/ui/annotations/annotationwindow.cxx b/sd/source/ui/annotations/annotationwindow.cxx index ad6709c776ce..3ba99307fd41 100644 --- a/sd/source/ui/annotations/annotationwindow.cxx +++ b/sd/source/ui/annotations/annotationwindow.cxx @@ -493,12 +493,6 @@ void AnnotationWindow::ResizeIfNeccessary(long aOldHeight, long aNewHeight) } } -void AnnotationWindow::SetReadonly(bool bSet) -{ - mbReadonly = bSet; - getView()->SetReadOnly(bSet); -} - void AnnotationWindow::SetLanguage(const SvxLanguageItem aNewItem) { Engine()->SetModifyHdl( Link() ); diff --git a/sd/source/ui/annotations/annotationwindow.hxx b/sd/source/ui/annotations/annotationwindow.hxx index ba82d4e862d3..264cb2fa1afe 100644 --- a/sd/source/ui/annotations/annotationwindow.hxx +++ b/sd/source/ui/annotations/annotationwindow.hxx @@ -144,7 +144,6 @@ class AnnotationWindow : public FloatingWindow void Rescale(); - void SetReadonly(bool bSet); bool IsReadOnly() { return mbReadonly;} bool IsProtected() { return mbProtected; } diff --git a/sd/source/ui/app/optsitem.cxx b/sd/source/ui/app/optsitem.cxx index e3181f792d04..4355da3011c9 100755 --- a/sd/source/ui/app/optsitem.cxx +++ b/sd/source/ui/app/optsitem.cxx @@ -222,22 +222,6 @@ SdOptionsLayout::SdOptionsLayout( USHORT nConfigId, BOOL bUseConfig ) : // ----------------------------------------------------------------------------- -void SdOptionsLayout::SetDefaults() -{ - SetRulerVisible( TRUE ); - SetHelplines( TRUE ); - SetHandlesBezier( FALSE ); - SetMoveOutline( TRUE ); - SetDragStripes( FALSE ); - if ( isMetricSystem() ) - SetMetric( FUNIT_CM ); // default for countries with metric system - else - SetMetric( FUNIT_INCH ); // default for others - SetDefTab( 1250 ); -} - -// ----------------------------------------------------------------------------- - BOOL SdOptionsLayout::operator==( const SdOptionsLayout& rOpt ) const { return( IsRulerVisible() == rOpt.IsRulerVisible() && @@ -406,12 +390,6 @@ SdOptionsContents::SdOptionsContents( USHORT nConfigId, BOOL bUseConfig ) : // ----------------------------------------------------------------------------- -void SdOptionsContents::SetDefaults() -{ -} - -// ----------------------------------------------------------------------------- - BOOL SdOptionsContents::operator==(const SdOptionsContents&) const { return true; @@ -459,14 +437,6 @@ BOOL SdOptionsContents::WriteData( Any* pValues ) const |* \************************************************************************/ -SdOptionsContentsItem::SdOptionsContentsItem( USHORT _nWhich ) -: SfxPoolItem ( _nWhich ) -, maOptionsContents ( 0, FALSE ) -{ -} - -// ---------------------------------------------------------------------- - SdOptionsContentsItem::SdOptionsContentsItem(USHORT _nWhich, SdOptions*, ::sd::FrameView*) : SfxPoolItem ( _nWhich ) , maOptionsContents ( 0, FALSE ) @@ -542,40 +512,6 @@ SdOptionsMisc::SdOptionsMisc( USHORT nConfigId, BOOL bUseConfig ) : // ----------------------------------------------------------------------------- -void SdOptionsMisc::SetDefaults() -{ - SetStartWithTemplate( TRUE ); - SetMarkedHitMovesAlways( TRUE ); - SetMoveOnlyDragging( FALSE ); - SetCrookNoContortion( FALSE ); - SetQuickEdit( GetConfigId() != SDCFG_DRAW ); - SetMasterPagePaintCaching( TRUE ); - SetDragWithCopy( FALSE ); - SetPickThrough( TRUE ); - SetBigHandles( FALSE ); - SetDoubleClickTextEdit( TRUE ); - SetClickChangeRotation( FALSE ); - SetStartWithActualPage( FALSE ); - SetSummationOfParagraphs( FALSE ); - SetSolidDragging( TRUE ); - SetSolidMarkHdl( TRUE ); - // #90356# - SetShowUndoDeleteWarning( TRUE ); - // The default for 6.1-and-above documents is to use printer-independent - // formatting. - SetPrinterIndependentLayout (1); - // #97016# - SetDefaultObjectSizeWidth(8000); - SetDefaultObjectSizeHeight(5000); - SetPreviewNewEffects(true); - SetPreviewChangedEffects(false); - SetPreviewTransitions(true); - SetDisplay(0); - SetShowComments(true); -} - -// ----------------------------------------------------------------------------- - BOOL SdOptionsMisc::operator==( const SdOptionsMisc& rOpt ) const { return( IsStartWithTemplate() == rOpt.IsStartWithTemplate() && @@ -909,22 +845,6 @@ SdOptionsSnap::SdOptionsSnap( USHORT nConfigId, BOOL bUseConfig ) : // ----------------------------------------------------------------------------- -void SdOptionsSnap::SetDefaults() -{ - SetSnapHelplines( TRUE ); - SetSnapBorder( TRUE ); - SetSnapFrame( FALSE ); - SetSnapPoints( FALSE ); - SetOrtho( FALSE ); - SetBigOrtho( TRUE ); - SetRotate( FALSE ); - SetSnapArea( 5 ); - SetAngle( 1500 ); - SetEliminatePolyPointLimitAngle( 1500 ); -} - -// ----------------------------------------------------------------------------- - BOOL SdOptionsSnap::operator==( const SdOptionsSnap& rOpt ) const { return( IsSnapHelplines() == rOpt.IsSnapHelplines() && @@ -1098,13 +1018,6 @@ SdOptionsZoom::SdOptionsZoom( USHORT nConfigId, BOOL bUseConfig ) : // ----------------------------------------------------------------------------- -void SdOptionsZoom::SetDefaults() -{ - SetScale( 1, 1 ); -} - -// ----------------------------------------------------------------------------- - BOOL SdOptionsZoom::operator==( const SdOptionsZoom& rOpt ) const { INT32 nX1, nX2, nY1, nY2; @@ -1158,63 +1071,6 @@ BOOL SdOptionsZoom::WriteData( Any* pValues ) const return TRUE; } -/************************************************************************* -|* -|* SdOptionsZoomItem -|* -\************************************************************************/ - -SdOptionsZoomItem::SdOptionsZoomItem( USHORT _nWhich ) -: SfxPoolItem ( _nWhich ) -, maOptionsZoom ( 0, FALSE ) -{ -} - -// ---------------------------------------------------------------------- - -SdOptionsZoomItem::SdOptionsZoomItem( USHORT _nWhich, SdOptions* pOpts, ::sd::FrameView* ) -: SfxPoolItem ( _nWhich ) -, maOptionsZoom ( 0, FALSE ) -{ - if( pOpts ) - { - INT32 nX, nY; - - pOpts->GetScale( nX, nY ); - maOptionsZoom.SetScale( nX, nY ); - } -} - -// ---------------------------------------------------------------------- - -SfxPoolItem* SdOptionsZoomItem::Clone( SfxItemPool* ) const -{ - return new SdOptionsZoomItem( *this ); -} - - -// ---------------------------------------------------------------------- - -int SdOptionsZoomItem::operator==( const SfxPoolItem& rAttr ) const -{ - const bool bSameType = SfxPoolItem::operator==(rAttr); - DBG_ASSERT( bSameType, "SdOptionsZoomItem::operator==(), differen pool item type!" ); - return bSameType && ( maOptionsZoom == static_cast< const SdOptionsZoomItem& >(rAttr).maOptionsZoom ); -} - -// ----------------------------------------------------------------------- - -void SdOptionsZoomItem::SetOptions( SdOptions* pOpts ) const -{ - if( pOpts ) - { - INT32 nX, nY; - - maOptionsZoom.GetScale( nX, nY ); - pOpts->SetScale( nX, nY ); - } -} - /************************************************************************* |* |* SdOptionsGrid @@ -1366,13 +1222,6 @@ BOOL SdOptionsGrid::WriteData( Any* pValues ) const |* \************************************************************************/ -SdOptionsGridItem::SdOptionsGridItem( USHORT _nWhich ) : - SvxGridItem( _nWhich ) -{ -} - -// ----------------------------------------------------------------------------- - SdOptionsGridItem::SdOptionsGridItem( USHORT _nWhich, SdOptions* pOpts, ::sd::FrameView* pView ) : SvxGridItem( _nWhich ) { @@ -1458,33 +1307,6 @@ SdOptionsPrint::SdOptionsPrint( USHORT nConfigId, BOOL bUseConfig ) : // ----------------------------------------------------------------------------- -void SdOptionsPrint::SetDefaults() -{ - SetDraw( TRUE ); - SetNotes( FALSE ); - SetHandout( FALSE ); - SetOutline( FALSE ); - SetDate( FALSE ); - SetTime( FALSE ); - SetPagename( FALSE ); - SetHiddenPages( TRUE ); - SetPagesize( FALSE ); - SetPagetile( FALSE ); - SetWarningPrinter( TRUE ); - SetWarningSize( FALSE ); - SetWarningOrientation( FALSE ); - SetBooklet( FALSE ); - SetFrontPage( TRUE ); - SetBackPage( TRUE ); - SetCutPage( FALSE ); - SetPaperbin( FALSE ); - SetOutputQuality( 0 ); - SetHandoutHorizontal( TRUE ); - SetHandoutPages( 6 ); -} - -// ----------------------------------------------------------------------------- - BOOL SdOptionsPrint::operator==( const SdOptionsPrint& rOpt ) const { return( IsDraw() == rOpt.IsDraw() && @@ -1630,31 +1452,6 @@ BOOL SdOptionsPrint::WriteData( Any* pValues ) const return TRUE; } -void SdOptionsPrint::SetPrinterOptions( const SdOptionsPrint* pOptions ) -{ - bDraw = pOptions->bDraw; - bNotes = pOptions->bNotes; - bHandout = pOptions->bHandout; - bOutline = pOptions->bOutline; - bDate = pOptions->bDate; - bTime = pOptions->bTime; - bPagename = pOptions->bPagename; - bHiddenPages = pOptions->bHiddenPages; - bPagesize = pOptions->bPagesize; - bPagetile = pOptions->bPagetile; - bWarningPrinter = pOptions->bWarningPrinter; - bWarningSize = pOptions->bWarningSize; - bWarningOrientation = pOptions->bWarningOrientation; - bBooklet = pOptions->bBooklet; - bFront = pOptions->bFront; - bBack = pOptions->bBack; - bCutPage = pOptions->bCutPage; - bPaperbin = pOptions->bPaperbin; - nQuality = pOptions->nQuality; - mnHandoutPages = pOptions->mnHandoutPages; - mbHandoutHorizontal = pOptions->mbHandoutHorizontal; -} - /************************************************************************* |* |* SdOptionsPrintItem @@ -1766,32 +1563,6 @@ SdOptions::~SdOptions() // ---------------------------------------------------------------------- -void SdOptions::SetRangeDefaults( ULONG nOptionsRange ) -{ - if( nOptionsRange & SD_OPTIONS_LAYOUT ) - SdOptionsLayout::SetDefaults(); - - if( nOptionsRange & SD_OPTIONS_CONTENTS ) - SdOptionsContents::SetDefaults(); - - if( nOptionsRange & SD_OPTIONS_MISC ) - SdOptionsMisc::SetDefaults(); - - if( nOptionsRange & SD_OPTIONS_SNAP ) - SdOptionsSnap::SetDefaults(); - - if( nOptionsRange & SD_OPTIONS_ZOOM ) - SdOptionsZoom::SetDefaults(); - - if( nOptionsRange & SD_OPTIONS_GRID ) - SdOptionsGrid::SetDefaults(); - - if( nOptionsRange & SD_OPTIONS_PRINT ) - SdOptionsPrint::SetDefaults(); -} - -// ---------------------------------------------------------------------- - void SdOptions::StoreConfig( ULONG nOptionsRange ) { if( nOptionsRange & SD_OPTIONS_LAYOUT ) diff --git a/sd/source/ui/app/sdmod.cxx b/sd/source/ui/app/sdmod.cxx index fb180509cff9..ccbc7c8f5665 100644 --- a/sd/source/ui/app/sdmod.cxx +++ b/sd/source/ui/app/sdmod.cxx @@ -336,20 +336,3 @@ OutputDevice* SdModule::GetRefDevice (::sd::DrawDocShell& ) { return GetVirtualRefDevice(); } - - -/************************************************************************* -|* -\************************************************************************/ - -::com::sun::star::text::WritingMode SdModule::GetDefaultWritingMode() const -{ -/* - const SvtLanguageOptions aLanguageOptions; - - return( aLanguageOptions.IsCTLFontEnabled() ? - ::com::sun::star::text::WritingMode_RL_TB : - ::com::sun::star::text::WritingMode_LR_TB ); -*/ - return ::com::sun::star::text::WritingMode_LR_TB; -} diff --git a/sd/source/ui/dlg/LayerDialogContent.cxx b/sd/source/ui/dlg/LayerDialogContent.cxx index 7420319ab491..975d277c7dff 100644 --- a/sd/source/ui/dlg/LayerDialogContent.cxx +++ b/sd/source/ui/dlg/LayerDialogContent.cxx @@ -86,14 +86,6 @@ LayerDialogContent::~LayerDialogContent (void) -LayerTabBar& LayerDialogContent::GetLayerTabBar (void) -{ - return maLayerTabBar; -} - - - - BOOL LayerDialogContent::Close (void) { return SfxDockingWindow::Close(); diff --git a/sd/source/ui/dlg/PaneDockingWindow.cxx b/sd/source/ui/dlg/PaneDockingWindow.cxx index c0dcd76f0fae..20c952c9c597 100644 --- a/sd/source/ui/dlg/PaneDockingWindow.cxx +++ b/sd/source/ui/dlg/PaneDockingWindow.cxx @@ -94,15 +94,6 @@ PaneDockingWindow::~PaneDockingWindow (void) -void PaneDockingWindow::SetTitle (const String& rsTitle) -{ - msTitle = rsTitle; - Invalidate(); -} - - - - void PaneDockingWindow::Resize (void) { SfxDockingWindow::Resize(); diff --git a/sd/source/ui/dlg/animobjs.cxx b/sd/source/ui/dlg/animobjs.cxx index 2ac4801aba0c..e179a0ba9f86 100644 --- a/sd/source/ui/dlg/animobjs.cxx +++ b/sd/source/ui/dlg/animobjs.cxx @@ -691,19 +691,6 @@ void AnimationWindow::ResetAttrs() // ----------------------------------------------------------------------- -void AnimationWindow::WaitInEffect( ULONG nMilliSeconds ) const -{ - ULONG nEnd = Time::GetSystemTicks() + nMilliSeconds; - ULONG nCurrent = Time::GetSystemTicks(); - while (nCurrent < nEnd) - { - nCurrent = Time::GetSystemTicks(); - Application::Reschedule(); - } -} - -// ----------------------------------------------------------------------- - void AnimationWindow::WaitInEffect( ULONG nMilliSeconds, ULONG nTime, SfxProgress* pProgress ) const { diff --git a/sd/source/ui/dlg/dlgass.cxx b/sd/source/ui/dlg/dlgass.cxx index d398724a3074..1eb3a3d0cedc 100644 --- a/sd/source/ui/dlg/dlgass.cxx +++ b/sd/source/ui/dlg/dlgass.cxx @@ -1928,21 +1928,6 @@ SfxObjectShellLock AssistentDlg::GetDocument() return mpImpl->GetDocument(); } -String AssistentDlg::GetTopic() const -{ - return mpImpl->mpPage4AskTopicEDT->GetText(); -} - -String AssistentDlg::GetUserName() const -{ - return mpImpl->mpPage4AskNameEDT->GetText(); -} - -String AssistentDlg::GetInformation() const -{ - return mpImpl->mpPage4AskInfoEDT->GetText(); -} - OutputType AssistentDlg::GetOutputMedium() const { if(mpImpl->mpPage2Medium1RB->IsChecked()) diff --git a/sd/source/ui/dlg/dlgassim.cxx b/sd/source/ui/dlg/dlgassim.cxx index 40bfae16c2a4..f9dcf5046189 100644 --- a/sd/source/ui/dlg/dlgassim.cxx +++ b/sd/source/ui/dlg/dlgassim.cxx @@ -207,287 +207,3 @@ void SdPageListControl::DataChanged( const DataChangedEvent& rDCEvt ) SvTreeListBox::DataChanged( rDCEvt ); } -// ==================================================================== -// TemplateCache -// ==================================================================== - -// Kennung fuer die Config Datei mit den Cache Daten -static const UINT16 nMagic = (UINT16)0x4127; - -TemplateCacheInfo::TemplateCacheInfo() -{ - m_bImpress = FALSE; - m_bValid = FALSE; - m_bModified = TRUE; -} - -TemplateCacheInfo::TemplateCacheInfo( const String& rFile, const DateTime& rDateTime, BOOL bImpress ) -{ - m_aFile = rFile; - m_aDateTime = rDateTime; - m_bImpress = bImpress; - m_bValid = FALSE; - m_bModified = TRUE; -} - -SvStream& operator >> (SvStream& rIn, TemplateCacheInfo& rInfo) -{ - rIn.ReadByteString( rInfo.m_aFile, RTL_TEXTENCODING_UTF8 ); - USHORT nDay, nMonth, nYear; - rIn >> nDay; - rIn >> nMonth; - rIn >> nYear; - rInfo.m_aDateTime.SetDay( nDay ); - rInfo.m_aDateTime.SetMonth( nMonth ); - rInfo.m_aDateTime.SetYear( nYear); - - USHORT nHour, nMin, nSec, n100Sec; - - rIn >> nHour; - rIn >> nMin; - rIn >> nSec; - rIn >> n100Sec; - - rInfo.m_aDateTime.SetHour( nHour ); - rInfo.m_aDateTime.SetMin( nMin ); - rInfo.m_aDateTime.SetSec( nSec ); - rInfo.m_aDateTime.Set100Sec( n100Sec ); - - rIn >> rInfo.m_bImpress; - - rInfo.m_bModified = FALSE; - - return rIn; -} - -SvStream& operator << (SvStream& rOut, const TemplateCacheInfo& rInfo) -{ - USHORT nTemp; - - rOut.WriteByteString( rInfo.m_aFile, RTL_TEXTENCODING_UTF8 ); - - nTemp = rInfo.m_aDateTime.GetDay(); - rOut << nTemp; - - nTemp = rInfo.m_aDateTime.GetMonth(); - rOut << nTemp; - - nTemp = rInfo.m_aDateTime.GetYear(); - rOut << nTemp; - - nTemp = rInfo.m_aDateTime.GetHour(); - rOut << nTemp; - - nTemp = rInfo.m_aDateTime.GetMin(); - rOut << nTemp; - - nTemp = rInfo.m_aDateTime.GetSec(); - rOut << nTemp; - - nTemp = rInfo.m_aDateTime.Get100Sec(); - rOut << nTemp; - - rOut << rInfo.m_bImpress; - - return rOut; -} - -TemplateCache::TemplateCache() -{ -} - -TemplateCache::~TemplateCache() -{ - Clear(); -} - -void TemplateCache::Clear() -{ - for( TemplateCacheDirEntry* pDir = m_aDirs.First(); pDir; pDir = m_aDirs.Next() ) - { - for( TemplateCacheInfo* pEntry = pDir->m_aFiles.First(); pEntry; pEntry = pDir->m_aFiles.Next() ) - delete pEntry; - delete pDir; - } -} - -void TemplateCache::Load() -{ - INetURLObject aURL( SvtPathOptions().GetUserConfigPath() ); - aURL.Append( String( RTL_CONSTASCII_USTRINGPARAM( "template.sod" ) ) ); - SfxMedium aMedium( aURL.GetMainURL( INetURLObject::NO_DECODE ), STREAM_READ | STREAM_NOCREATE, TRUE ); // Download - SvStream* pStream = aMedium.GetInStream(); - - if( !pStream ) - return; - - UINT16 aCheck; - *pStream >> aCheck; - - if(aCheck != nMagic) - return; - - UINT16 nDirs; - *pStream >> nDirs; - - for( UINT16 nDir = 0; pStream->GetError() == SVSTREAM_OK && nDir < nDirs; nDir++ ) - { - TemplateCacheDirEntry* pDir = new TemplateCacheDirEntry(); - m_aDirs.Insert(pDir); - - pStream->ReadByteString( pDir->m_aPath, RTL_TEXTENCODING_UTF8 ); - - UINT16 nFiles; - *pStream >> nFiles; - - for( UINT16 nFile = 0; pStream->GetError() == SVSTREAM_OK && nFile < nFiles; nFile++ ) - { - TemplateCacheInfo* pEntry = new TemplateCacheInfo(); - *pStream >> *pEntry; - pDir->m_aFiles.Insert(pEntry); - } - } - - if( pStream->GetError() != SVSTREAM_OK ) - { - // Ein I/O Problem ist doch kein Beinbruch, dann wird der Cache halt neu erzeugt - Clear(); - } -} - -void TemplateCache::Save() -{ - INetURLObject aURL( SvtPathOptions().GetUserConfigPath() ); - aURL.Append( String( RTL_CONSTASCII_USTRINGPARAM( "template.sod" ) ) ); - SfxMedium aMedium( aURL.GetMainURL( INetURLObject::NO_DECODE ), STREAM_WRITE | STREAM_TRUNC, FALSE ); // Download - SvStream* pStream = aMedium.GetInStream(); - - if( !pStream ) - return; - - UINT16 nCheck = nMagic; - *pStream << nCheck; - - const UINT16 nDirs = (UINT16) m_aDirs.Count(); - *pStream << nDirs; - - for( TemplateCacheDirEntry* pDir = m_aDirs.First(); - pStream->GetError() == SVSTREAM_OK && pDir; - pDir = m_aDirs.Next() ) - { - pStream->WriteByteString( pDir->m_aPath, RTL_TEXTENCODING_UTF8 ); - - const UINT16 nFiles = (UINT16) pDir->m_aFiles.Count(); - *pStream << nFiles; - - for( TemplateCacheInfo* pEntry = pDir->m_aFiles.First(); - pStream->GetError() == SVSTREAM_OK && pEntry; - pEntry = pDir->m_aFiles.Next() ) - { - *pStream << *pEntry; - } - } -} - -TemplateCacheDirEntry* TemplateCache::GetDirEntry( const String& rPath ) -{ - TemplateCacheDirEntry* pDir = m_aDirs.GetCurObject(); - if( pDir && pDir->m_aPath == rPath ) - return pDir; - - for( pDir = m_aDirs.First(); pDir; pDir = m_aDirs.Next() ) - { - if( pDir->m_aPath == rPath ) - return pDir; - } - - return NULL; -} - -TemplateCacheInfo* TemplateCache::GetFileInfo( const String& rPath ) -{ - INetURLObject aUrl( rPath ); - String aPath( aUrl.GetPath() ); - String aName( aUrl.GetName( INetURLObject::DECODE_UNAMBIGUOUS ) ); - - DBG_ASSERT( aUrl.GetProtocol() != INET_PROT_NOT_VALID, "invalid URL" ); - - TemplateCacheDirEntry* pDir = GetDirEntry( aPath ); - - if( NULL != pDir ) - { - for( TemplateCacheInfo* pEntry = pDir->m_aFiles.First(); pEntry; pEntry = pDir->m_aFiles.Next() ) - { - if( pEntry->GetFile() == aName ) - return pEntry; - } - } - - return NULL; -} - -TemplateCacheInfo* TemplateCache::AddFileInfo( const String& rPath ) -{ - INetURLObject aUrl( rPath ); - String aPath( aUrl.GetPath() ); - String aName( aUrl.GetName( INetURLObject::DECODE_UNAMBIGUOUS ) ); - - DBG_ASSERT( aUrl.GetProtocol() != INET_PROT_NOT_VALID, "invalid URL" ); - - TemplateCacheDirEntry* pDir = GetDirEntry( aPath ); - TemplateCacheInfo* pEntry = NULL; - - if( pDir == NULL ) - { - pDir = new TemplateCacheDirEntry(); - pDir->m_aPath = aPath; - m_aDirs.Insert(pDir); - } - - if( NULL != pDir ) - { - for( pEntry = pDir->m_aFiles.First(); pEntry; pEntry = pDir->m_aFiles.Next() ) - { - if( pEntry->GetFile() == aName) - return pEntry; - } - - pEntry = new TemplateCacheInfo(); - pEntry->SetFile( aName ); - pDir->m_aFiles.Insert(pEntry); - } - - return pEntry; -} - -BOOL TemplateCache::ClearInvalidEntrys() -{ - BOOL bModified = FALSE; - - for( TemplateCacheDirEntry* pDir = m_aDirs.First(); pDir; pDir = m_aDirs.Next() ) - { - for( TemplateCacheInfo* pEntry = pDir->m_aFiles.First(); pEntry; pEntry = pDir->m_aFiles.Next() ) - { - if(!pEntry->IsValid()) - { - pDir->m_aFiles.Remove(pEntry); - delete pEntry; - bModified = TRUE; - } - else if( pEntry->IsModified() ) - { - bModified = TRUE; - } - } - - if( pDir->m_aFiles.Count() == 0 ) - { - m_aDirs.Remove(pDir); - delete pDir; - } - } - - return bModified; -} - - diff --git a/sd/source/ui/dlg/dlgassim.hxx b/sd/source/ui/dlg/dlgassim.hxx index dc3e7f636e8d..35bbd41de448 100644 --- a/sd/source/ui/dlg/dlgassim.hxx +++ b/sd/source/ui/dlg/dlgassim.hxx @@ -56,37 +56,7 @@ public: }; -class TemplateCacheInfo -{ -private: - DateTime m_aDateTime; - String m_aFile; - BOOL m_bImpress; - BOOL m_bValid; - BOOL m_bModified; - -public: - TemplateCacheInfo(); - TemplateCacheInfo( const String& rFile, const DateTime& rDateTime, BOOL bImpress ); - - BOOL IsValid() const { return m_bValid; } - void SetValid( BOOL bValid = TRUE ) { m_bValid = bValid; } - - BOOL IsImpress() const { return m_bImpress; } - void SetImpress( BOOL bImpress = TRUE ) { m_bImpress = bImpress; } - - const String& GetFile() const { return m_aFile; } - void SetFile( const String& rFile ) { m_aFile = rFile; } - - const DateTime& GetDateTime() const { return m_aDateTime; } - void SetDateTime( const DateTime& rDateTime ) { m_aDateTime = rDateTime; } - - BOOL IsModified() const { return m_bModified; } - void SetModified( BOOL bModified = TRUE ) { m_bModified = bModified; } - - friend SvStream& operator >> (SvStream& rIn, TemplateCacheInfo& rInfo); - friend SvStream& operator << (SvStream& rOut, const TemplateCacheInfo& rInfo); -}; +class TemplateCacheInfo; DECLARE_LIST( TemplateCacheInfoList, TemplateCacheInfo * ) @@ -98,22 +68,3 @@ public: }; DECLARE_LIST( TemplateCacheDirEntryList, TemplateCacheDirEntry * ) - -class TemplateCache -{ -private: - TemplateCacheDirEntryList m_aDirs; - TemplateCacheDirEntry* GetDirEntry( const String& rPath ); - void Clear(); -public: - TemplateCache(); - ~TemplateCache(); - - void Load(); - void Save(); - - TemplateCacheInfo* GetFileInfo( const String& rPath ); - TemplateCacheInfo* AddFileInfo( const String& rPath ); - - BOOL ClearInvalidEntrys(); -}; diff --git a/sd/source/ui/dlg/dlgctrls.cxx b/sd/source/ui/dlg/dlgctrls.cxx index 14c1209875ef..1a5a612d37ad 100644 --- a/sd/source/ui/dlg/dlgctrls.cxx +++ b/sd/source/ui/dlg/dlgctrls.cxx @@ -51,12 +51,6 @@ FadeEffectLB::FadeEffectLB( Window* pParent, SdResId Id ) { } -FadeEffectLB::FadeEffectLB( Window* pParent, WinBits aWB ) -: ListBox( pParent, aWB ), - mpImpl( new FadeEffectLBImpl ) -{ -} - FadeEffectLB::~FadeEffectLB() { delete mpImpl; diff --git a/sd/source/ui/dlg/dlgsnap.cxx b/sd/source/ui/dlg/dlgsnap.cxx old mode 100644 new mode 100755 index 2b78a649eaef..6cd220d5a5bc --- a/sd/source/ui/dlg/dlgsnap.cxx +++ b/sd/source/ui/dlg/dlgsnap.cxx @@ -96,27 +96,35 @@ SdSnapLineDlg::SdSnapLineDlg( DBG_ASSERT( pPool, "Wo ist der Pool?" ); SfxMapUnit ePoolUnit = pPool->GetMetric( SID_ATTR_FILL_HATCH ); - // Hier werden die Max- und MinWerte in Ahaengigkeit von der + // #i48497# Consider page origin + SdrPageView* pPV = pView->GetSdrPageView(); + Point aLeftTop(aWorkArea.Left()+1, aWorkArea.Top()+1); + pPV->LogicToPagePos(aLeftTop); + Point aRightBottom(aWorkArea.Right()-2, aWorkArea.Bottom()-2); + pPV->LogicToPagePos(aRightBottom); + + // Hier werden die Max- und MinWerte in Abhaengigkeit von der // WorkArea, PoolUnit und der FieldUnit: - SetMetricValue( aMtrFldX, aWorkArea.Left(), ePoolUnit ); + SetMetricValue( aMtrFldX, aLeftTop.X(), ePoolUnit ); + long nValue = static_cast(aMtrFldX.GetValue()); nValue = Fraction( nValue ) / aUIScale; aMtrFldX.SetMin( nValue ); aMtrFldX.SetFirst( nValue ); - SetMetricValue( aMtrFldX, aWorkArea.Right()+1, ePoolUnit ); + SetMetricValue( aMtrFldX, aRightBottom.X(), ePoolUnit ); nValue = static_cast(aMtrFldX.GetValue()); nValue = Fraction( nValue ) / aUIScale; aMtrFldX.SetMax( nValue ); aMtrFldX.SetLast( nValue ); - SetMetricValue( aMtrFldY, aWorkArea.Top(), ePoolUnit ); + SetMetricValue( aMtrFldY, aLeftTop.Y(), ePoolUnit ); nValue = static_cast(aMtrFldY.GetValue()); nValue = Fraction( nValue ) / aUIScale; aMtrFldY.SetMin( nValue ); aMtrFldY.SetFirst( nValue ); - SetMetricValue( aMtrFldY, aWorkArea.Bottom()+1, ePoolUnit ); + SetMetricValue( aMtrFldY, aRightBottom.Y(), ePoolUnit ); nValue = static_cast(aMtrFldY.GetValue()); nValue = Fraction( nValue ) / aUIScale; aMtrFldY.SetMax( nValue ); diff --git a/sd/source/ui/dlg/docprev.cxx b/sd/source/ui/dlg/docprev.cxx index 71a7145425b7..a42ce43a2c6d 100644 --- a/sd/source/ui/dlg/docprev.cxx +++ b/sd/source/ui/dlg/docprev.cxx @@ -45,7 +45,6 @@ #include "DrawDocShell.hxx" #include "ViewShell.hxx" #include "ViewShellBase.hxx" -#include "showview.hxx" #include "drawview.hxx" #include "sdpage.hxx" #include "sfx2/viewfrm.hxx" @@ -81,17 +80,6 @@ SdDocPreviewWin::SdDocPreviewWin( Window* pParent, const ResId& rResId ) SetBackground( aEmpty ); } -SdDocPreviewWin::SdDocPreviewWin( Window* pParent ) -: Control(pParent, 0 ), pMetaFile( 0 ), bInEffect(FALSE), mpObj(NULL), mnShowPage(0) -{ - SetBorderStyle( WINDOW_BORDER_MONO ); - svtools::ColorConfig aColorConfig; - Wallpaper aEmpty; - SetBackground( aEmpty ); - Resize(); - Show(); -} - SdDocPreviewWin::~SdDocPreviewWin() { delete pMetaFile; @@ -104,13 +92,6 @@ void SdDocPreviewWin::Resize() mxSlideShow->resize( GetSizePixel() ); } -void SdDocPreviewWin::SetGDIFile( GDIMetaFile* pFile ) -{ - delete pMetaFile; - pMetaFile = pFile; - Invalidate(); -} - void SdDocPreviewWin::CalcSizeAndPos( GDIMetaFile* pFile, Size& rSize, Point& rPoint ) { Size aTmpSize = pFile ? pFile->GetPrefSize() : Size(1,1 ); diff --git a/sd/source/ui/dlg/filedlg.cxx b/sd/source/ui/dlg/filedlg.cxx index 182c70954111..71fad02f24a7 100644 --- a/sd/source/ui/dlg/filedlg.cxx +++ b/sd/source/ui/dlg/filedlg.cxx @@ -69,7 +69,6 @@ private: using sfx2::FileDialogHelper::Execute; #endif - friend class SdExportFileDialog; friend class SdOpenSoundFileDialog; css::uno::Reference< css::ui::dialogs::XFilePickerControlAccess > mxControlAccess; @@ -95,8 +94,6 @@ public: // overwritten from FileDialogHelper, to receive user feedback virtual void SAL_CALL ControlStateChanged( const css::ui::dialogs::FilePickerEvent& aEvent ); - - sal_Bool SelectionBoxState() const; }; // ------------------------------------------------------------------------ @@ -313,91 +310,6 @@ ErrCode SdFileDialog_Imp::Execute() return FileDialogHelper::Execute(); } -// ------------------------------------------------------------------------ -sal_Bool SdFileDialog_Imp::SelectionBoxState() const -{ - if ( !mbUsableSelection || !mxControlAccess.is() ) - return sal_False; - - sal_Bool bState(0); - try - { - mxControlAccess->getValue( css::ui::dialogs::ExtendedFilePickerElementIds::CHECKBOX_SELECTION, 0 ) >>= bState; - } - catch( css::lang::IllegalArgumentException ) - { -#ifdef DBG_UTIL - DBG_ERROR( "Cannot access \"selection\" checkbox" ); -#endif - } - - return bState; -} - - -// -------------------------------------------------------------------- -// ----------- SdExportFileDialog --------------------------- -// -------------------------------------------------------------------- - -// these are simple forwarders -SdExportFileDialog::SdExportFileDialog(BOOL bHaveCheckbox) : - mpImpl( new SdFileDialog_Imp( css::ui::dialogs::TemplateDescription::FILESAVE_AUTOEXTENSION_SELECTION, - bHaveCheckbox ) ) -{ - // setup filter - const String aHTMLFilter( SdResId( STR_EXPORT_HTML_NAME ) ); - GraphicFilter* pFilter = GraphicFilter::GetGraphicFilter(); - const USHORT nFilterCount = pFilter->GetExportFormatCount(); - - // add HTML filter - mpImpl->AddFilter( aHTMLFilter, String( SdResId( STR_EXPORT_HTML_FILTER ) ) ); - - // add other graphic filters - for ( USHORT i = 0; i < nFilterCount; i++ ) - { - mpImpl->AddFilter( pFilter->GetExportFormatName( i ), - pFilter->GetExportWildcard( i ) ); - } - - // set dialog title - mpImpl->SetTitle( String( SdResId( STR_EXPORT_DIALOG_TITLE ) ) ); -} - -// ------------------------------------------------------------------------ -SdExportFileDialog::~SdExportFileDialog() -{ -} - -// ------------------------------------------------------------------------ -ErrCode SdExportFileDialog::Execute() -{ - return mpImpl->Execute(); -} - -String SdExportFileDialog::GetPath() const -{ - return mpImpl->GetPath(); -} - -// ------------------------------------------------------------------------ -void SdExportFileDialog::SetPath( const String& rPath ) -{ - mpImpl->SetDisplayDirectory( rPath ); -} - -// ------------------------------------------------------------------------ -String SdExportFileDialog::ReqCurrentFilter() const -{ - return mpImpl->GetCurrentFilter(); -} - -// ------------------------------------------------------------------------ -BOOL SdExportFileDialog::IsExportSelection() const -{ - return mpImpl->SelectionBoxState(); -} - - // -------------------------------------------------------------------- // ----------- SdOpenSoundFileDialog ----------------------- // -------------------------------------------------------------------- diff --git a/sd/source/ui/dlg/headerfooterdlg.cxx b/sd/source/ui/dlg/headerfooterdlg.cxx index 294e61f3fe40..b48a1682bba6 100644 --- a/sd/source/ui/dlg/headerfooterdlg.cxx +++ b/sd/source/ui/dlg/headerfooterdlg.cxx @@ -291,12 +291,6 @@ HeaderFooterDialog::~HeaderFooterDialog() // ----------------------------------------------------------------------- -void HeaderFooterDialog::initTabPages() -{ -} - -// ----------------------------------------------------------------------- - IMPL_LINK( HeaderFooterDialog, ActivatePageHdl, TabControl *, pTabCtrl ) { const USHORT nId = pTabCtrl->GetCurPageId(); diff --git a/sd/source/ui/dlg/inspagob.cxx b/sd/source/ui/dlg/inspagob.cxx index f16e90dd7791..5d260367f383 100644 --- a/sd/source/ui/dlg/inspagob.cxx +++ b/sd/source/ui/dlg/inspagob.cxx @@ -142,7 +142,6 @@ List* SdInsertPagesObjsDlg::GetList( USHORT nType ) // wird das gesamte Dokument (und nicht mehr!) eingefuegt. if( aLbTree.GetSelectionCount() == 0 || ( aLbTree.IsSelected( aLbTree.First() ) ) ) - //return( aLbTree.GetBookmarkList( nType ) ); return( NULL ); // #37350# } return( aLbTree.GetSelectEntryList( nType ) ); diff --git a/sd/source/ui/dlg/prntopts.cxx b/sd/source/ui/dlg/prntopts.cxx index ea7a702e539e..3c9aad38c332 100644 --- a/sd/source/ui/dlg/prntopts.cxx +++ b/sd/source/ui/dlg/prntopts.cxx @@ -41,15 +41,6 @@ #include "app.hrc" #include #include -// STATIC DATA ----------------------------------------------------------- - -static USHORT pPrintOptRanges[] = -{ - ATTR_OPTIONS_PRINT, - ATTR_OPTIONS_PRINT, - 0 -}; - /************************************************************************* |* @@ -236,13 +227,6 @@ SfxTabPage* SdPrintOptions::Create( Window* pWindow, //----------------------------------------------------------------------- -USHORT* SdPrintOptions::GetRanges() -{ - return pPrintOptRanges; -} - -//----------------------------------------------------------------------- - IMPL_LINK( SdPrintOptions, ClickCheckboxHdl, CheckBox *, pCbx ) { // there must be at least one of them checked diff --git a/sd/source/ui/dlg/sdtreelb.cxx b/sd/source/ui/dlg/sdtreelb.cxx index 9dbf8e22629c..d44d99ed3c64 100644 --- a/sd/source/ui/dlg/sdtreelb.cxx +++ b/sd/source/ui/dlg/sdtreelb.cxx @@ -728,61 +728,6 @@ List* SdPageObjsTLB::GetSelectEntryList( USHORT nDepth ) return( pList ); } -/************************************************************************* -|* -|* Alle Pages (und Objekte) des Docs zurueckgeben -|* nType == 0 -> Seiten -|* nType == 1 -> Objekte -|* -\************************************************************************/ - -List* SdPageObjsTLB::GetBookmarkList( USHORT nType ) -{ - List* pList = NULL; - - if( GetBookmarkDoc() ) - { - SdPage* pPage = NULL; - String* pName = NULL; - USHORT nPage = 0; - const USHORT nMaxPages = mpBookmarkDoc->GetSdPageCount( PK_STANDARD ); - - while( nPage < nMaxPages ) - { - pPage = mpBookmarkDoc->GetSdPage( nPage, PK_STANDARD ); - - if( nType == 0 ) // Seitennamen einfuegen - { - if( !pList ) - pList = new List(); - - pName = new String( pPage->GetRealName() ); - pList->Insert( pName, LIST_APPEND ); - } - else // Objektnamen einfuegen - { - // Ueber Objekte der Seite iterieren - SdrObjListIter aIter( *pPage, IM_DEEPWITHGROUPS ); - while( aIter.IsMore() ) - { - SdrObject* pObj = aIter.Next(); - String aStr( GetObjectName( pObj ) ); - if( aStr.Len() ) - { - if( !pList ) - pList = new List(); - - pName = new String( aStr ); - pList->Insert( pName, LIST_APPEND ); - } - } - } - nPage++; - } - } - return( pList ); -} - /************************************************************************* |* |* Eintraege werden erst auf Anforderung (Doppelklick) eingefuegt diff --git a/sd/source/ui/dlg/tpaction.cxx b/sd/source/ui/dlg/tpaction.cxx index ebe0243f7d99..af2668fc9dad 100644 --- a/sd/source/ui/dlg/tpaction.cxx +++ b/sd/source/ui/dlg/tpaction.cxx @@ -86,15 +86,6 @@ using namespace ::com::sun::star; using namespace com::sun::star::uno; using namespace com::sun::star::lang; -static USHORT pActionRanges[] = -{ - ATTR_ANIMATION_TRANSPCOLOR, - ATTR_ANIMATION_TRANSPCOLOR, - ATTR_ACTION_START, - ATTR_ACTION_END, - 0 -}; - #define DOCUMENT_TOKEN (sal_Unicode('#')) /************************************************************************* @@ -423,13 +414,6 @@ SfxTabPage* SdTPAction::Create( Window* pWindow, //------------------------------------------------------------------------ -USHORT* SdTPAction::GetRanges() -{ - return( pActionRanges ); -} - -//------------------------------------------------------------------------ - void SdTPAction::UpdateTree() { if( !bTreeUpdated && mpDoc && mpDoc->GetDocSh() && mpDoc->GetDocSh()->GetMedium() ) @@ -849,35 +833,6 @@ void SdTPAction::SetEditText( String const & rStr ) } } -String SdTPAction::GetMacroName( const String& rMacroPath ) -{ - String result = rMacroPath; - - // try to get name by parsing the macro path - // using the new URI parsing services - - Reference< XMultiServiceFactory > xSMgr = - ::comphelper::getProcessServiceFactory(); - - Reference< com::sun::star::uri::XUriReferenceFactory > - xFactory( xSMgr->createInstance( - ::rtl::OUString::createFromAscii( - "com.sun.star.uri.UriReferenceFactory" ) ), UNO_QUERY ); - - if ( xFactory.is() ) - { - Reference< com::sun::star::uri::XVndSunStarScriptUrl > - xUrl( xFactory->parse( rMacroPath ), UNO_QUERY ); - - if ( xUrl.is() ) - { - result = xUrl->getName(); - } - } - - return result; -} - //------------------------------------------------------------------------ String SdTPAction::GetEditText( BOOL bFullDocDestination ) diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx index 29218a7b985a..a033661e7c85 100644 --- a/sd/source/ui/docshell/docshel4.cxx +++ b/sd/source/ui/docshell/docshel4.cxx @@ -312,18 +312,6 @@ BOOL DrawDocShell::InitNew( const ::com::sun::star::uno::Reference< ::com::sun:: |* \************************************************************************/ -sal_Bool DrawDocShell::IsNewDocument() const -{ - return( mbNewDocument && - ( !GetMedium() || GetMedium()->GetURLObject().GetProtocol() == INET_PROT_NOT_VALID ) ); -} - -/************************************************************************* -|* -|* Load: Pools und Dokument laden -|* -\************************************************************************/ - BOOL DrawDocShell::Load( SfxMedium& rMedium ) { mbNewDocument = sal_False; diff --git a/sd/source/ui/docshell/docshell.cxx b/sd/source/ui/docshell/docshell.cxx index f284651b91e5..78b1b9434ad0 100644 --- a/sd/source/ui/docshell/docshell.cxx +++ b/sd/source/ui/docshell/docshell.cxx @@ -548,21 +548,6 @@ void DrawDocShell::SetModified( BOOL bSet /* = TRUE */ ) } } -::Window* DrawDocShell::GetWindow() const -{ - SfxViewFrame* pFrame = GetFrame(); - if( pFrame == NULL ) - pFrame = SfxViewFrame::GetFirst( this ); - - if( pFrame ) - return &(pFrame->GetWindow()); - else - { - DBG_ASSERT( 0, "No active window for DrawDocShell found! (next gpf is caused by this assertion)" ); - return NULL; - } -} - /************************************************************************* |* |* Callback fuer ExecuteSpellPopup() diff --git a/sd/source/ui/framework/configuration/ConfigurationClassifier.cxx b/sd/source/ui/framework/configuration/ConfigurationClassifier.cxx index c8256bc2c0a6..55e22361ad3a 100644 --- a/sd/source/ui/framework/configuration/ConfigurationClassifier.cxx +++ b/sd/source/ui/framework/configuration/ConfigurationClassifier.cxx @@ -87,15 +87,12 @@ const ConfigurationClassifier::ResourceIdVector& ConfigurationClassifier::GetC2m - const ConfigurationClassifier::ResourceIdVector& ConfigurationClassifier::GetC1andC2 (void) const { return maC1andC2; } - - void ConfigurationClassifier::PartitionResources ( const ::com::sun::star::uno::Sequence >& rS1, const ::com::sun::star::uno::Sequence >& rS2) @@ -222,8 +219,6 @@ void ConfigurationClassifier::CopyResources ( } - - void ConfigurationClassifier::TraceResourceIdVector ( const sal_Char* pMessage, const ResourceIdVector& rResources) const @@ -240,6 +235,4 @@ void ConfigurationClassifier::TraceResourceIdVector ( } - - } } // end of namespace sd::framework diff --git a/sd/source/ui/framework/configuration/ConfigurationController.cxx b/sd/source/ui/framework/configuration/ConfigurationController.cxx index 68bf55bb7495..99b8b8fc5278 100644 --- a/sd/source/ui/framework/configuration/ConfigurationController.cxx +++ b/sd/source/ui/framework/configuration/ConfigurationController.cxx @@ -101,8 +101,6 @@ public: const Reference& rxController); ~Implementation (void); - void Initialize (const Reference& rxController); - Reference mxControllerManager; /** The Broadcaster class implements storing and calling of listeners. @@ -119,8 +117,6 @@ public: ViewShellBase* mpBase; - bool mbIsInitialized; - ::boost::shared_ptr mpResourceFactoryContainer; ::boost::shared_ptr mpResourceManager; @@ -705,7 +701,6 @@ ConfigurationController::Implementation::Implementation ( mpBroadcaster(new ConfigurationControllerBroadcaster(&rController)), mxRequestedConfiguration(new Configuration(&rController, true)), mpBase(NULL), - mbIsInitialized(false), mpResourceFactoryContainer(new ResourceFactoryManager(mxControllerManager)), mpResourceManager( new ConfigurationControllerResourceManager(mpResourceFactoryContainer,mpBroadcaster)), @@ -721,27 +716,6 @@ ConfigurationController::Implementation::Implementation ( -void ConfigurationController::Implementation::Initialize ( - const Reference& rxController) -{ - mxControllerManager = Reference(rxController, UNO_QUERY_THROW); - - mpConfigurationUpdater->SetControllerManager(mxControllerManager); - - // Tunnel through the controller to obtain a ViewShellBase. - Reference xTunnel (rxController, UNO_QUERY_THROW); - if (xTunnel.is()) - { - ::sd::DrawController* pController = reinterpret_cast( - xTunnel->getSomething(sd::DrawController::getUnoTunnelId())); - if (pController != NULL) - mpBase = pController->GetViewShellBase(); - } -} - - - - ConfigurationController::Implementation::~Implementation (void) { } diff --git a/sd/source/ui/framework/configuration/ConfigurationTracer.cxx b/sd/source/ui/framework/configuration/ConfigurationTracer.cxx index 63e45f8bb110..1781f6e038f4 100644 --- a/sd/source/ui/framework/configuration/ConfigurationTracer.cxx +++ b/sd/source/ui/framework/configuration/ConfigurationTracer.cxx @@ -60,12 +60,12 @@ void ConfigurationTracer::TraceConfiguration ( +#ifdef DEBUG void ConfigurationTracer::TraceBoundResources ( const Reference& rxConfiguration, const Reference& rxResourceId, const int nIndentation) { -#ifdef DEBUG Sequence > aResourceList ( rxConfiguration->getResources(rxResourceId, ::rtl::OUString(), AnchorBindingMode_DIRECT)); const ::rtl::OUString sIndentation (::rtl::OUString::createFromAscii(" ")); @@ -77,11 +77,7 @@ void ConfigurationTracer::TraceBoundResources ( OSL_TRACE("%s\n", OUStringToOString(sLine, RTL_TEXTENCODING_UTF8).getStr()); TraceBoundResources(rxConfiguration, aResourceList[nIndex], nIndentation+1); } -#else - (void)rxConfiguration; - (void)rxResourceId; - (void)nIndentation; -#endif } +#endif } } // end of namespace sd::framework diff --git a/sd/source/ui/framework/configuration/ConfigurationTracer.hxx b/sd/source/ui/framework/configuration/ConfigurationTracer.hxx index 8a789a051584..b04206fd65e1 100644 --- a/sd/source/ui/framework/configuration/ConfigurationTracer.hxx +++ b/sd/source/ui/framework/configuration/ConfigurationTracer.hxx @@ -32,7 +32,6 @@ namespace sd { namespace framework { - /** Print debug information about configurations to the standard error output channel. */ @@ -43,13 +42,14 @@ public: const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::framework::XConfiguration>& rxConfiguration, const char* pMessage); - +#ifdef DEBUG static void TraceBoundResources ( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::framework::XConfiguration>& rxConfiguration, const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::framework::XResourceId>& rxResourceId, const int nIndentation); +#endif }; } } // end of namespace sd::framework diff --git a/sd/source/ui/framework/configuration/ConfigurationUpdater.cxx b/sd/source/ui/framework/configuration/ConfigurationUpdater.cxx index 5db5cb436739..50a68706745d 100644 --- a/sd/source/ui/framework/configuration/ConfigurationUpdater.cxx +++ b/sd/source/ui/framework/configuration/ConfigurationUpdater.cxx @@ -162,14 +162,6 @@ Reference ConfigurationUpdater::GetCurrentConfiguration (void) c -Reference ConfigurationUpdater::GetRequestedConfiguration (void) const -{ - return mxRequestedConfiguration; -} - - - - bool ConfigurationUpdater::IsUpdatePossible (void) { return ! mbUpdateBeingProcessed diff --git a/sd/source/ui/framework/configuration/ConfigurationUpdater.hxx b/sd/source/ui/framework/configuration/ConfigurationUpdater.hxx index 87c92be5e5c4..a9f3e09f2a64 100644 --- a/sd/source/ui/framework/configuration/ConfigurationUpdater.hxx +++ b/sd/source/ui/framework/configuration/ConfigurationUpdater.hxx @@ -84,9 +84,6 @@ public: css::uno::Reference< css::drawing::framework::XConfiguration> GetCurrentConfiguration (void) const; - css::uno::Reference< - css::drawing::framework::XConfiguration> GetRequestedConfiguration (void) const; - friend class ConfigurationUpdaterLock; /** Return a lock of the called ConfigurationUpdater. While the returned object exists no update of the current configuration is diff --git a/sd/source/ui/framework/configuration/ResourceId.cxx b/sd/source/ui/framework/configuration/ResourceId.cxx index 32894411547a..15d7c3a6f4ec 100644 --- a/sd/source/ui/framework/configuration/ResourceId.cxx +++ b/sd/source/ui/framework/configuration/ResourceId.cxx @@ -592,17 +592,6 @@ bool ResourceId::IsBoundToAnchor ( -bool ResourceId::IsValid (void) const -{ - return maResourceURLs.size() == 0 - || maResourceURLs[0].getLength()>0 - || maResourceURLs.size() == 1; - -} - - - - void ResourceId::ParseResourceURL (void) { ::osl::Guard< ::osl::Mutex > aGuard (::osl::Mutex::getGlobalMutex()); diff --git a/sd/source/ui/framework/factories/BasicPaneFactory.cxx b/sd/source/ui/framework/factories/BasicPaneFactory.cxx index 969844f7650d..5ee2ae9433d4 100644 --- a/sd/source/ui/framework/factories/BasicPaneFactory.cxx +++ b/sd/source/ui/framework/factories/BasicPaneFactory.cxx @@ -551,32 +551,6 @@ Reference BasicPaneFactory::CreateChildWindowPane ( return xPane; } - - - -bool BasicPaneFactory::IsBoundToChildWindow (const Reference& rxResourceId) const -{ - if ( ! rxResourceId.is()) - return false; - - Reference xAnchorId (rxResourceId->getAnchor()); - if ( ! xAnchorId.is()) - return false; - - const OUString sAnchorURL (xAnchorId->getResourceURL()); - if (sAnchorURL == FrameworkHelper::msLeftImpressPaneURL) - return true; - else if (sAnchorURL == FrameworkHelper::msLeftDrawPaneURL) - return true; - else if (sAnchorURL == FrameworkHelper::msRightPaneURL) - return true; - else - return false; -} - - - - void BasicPaneFactory::ThrowIfDisposed (void) const throw (lang::DisposedException) { diff --git a/sd/source/ui/framework/factories/BasicPaneFactory.hxx b/sd/source/ui/framework/factories/BasicPaneFactory.hxx index 1f442656d1d9..891845a5a1aa 100644 --- a/sd/source/ui/framework/factories/BasicPaneFactory.hxx +++ b/sd/source/ui/framework/factories/BasicPaneFactory.hxx @@ -159,12 +159,6 @@ private: css::drawing::framework::XResourceId>& rxPaneId, const PaneDescriptor& rDescriptor); - /** Return when the specified resource is bound to one of the - child windows. - */ - bool IsBoundToChildWindow ( - const css::uno::Reference& rxResourceId) const; - void ThrowIfDisposed (void) const throw (css::lang::DisposedException); }; diff --git a/sd/source/ui/framework/factories/TaskPanelFactory.cxx b/sd/source/ui/framework/factories/TaskPanelFactory.cxx index 8942833d2483..19eb50d67f0d 100644 --- a/sd/source/ui/framework/factories/TaskPanelFactory.cxx +++ b/sd/source/ui/framework/factories/TaskPanelFactory.cxx @@ -267,23 +267,6 @@ void SAL_CALL TaskPanelFactory::releaseResource ( -//============================================================================= - -void TaskPanelFactory::ThrowIfDisposed (void) const - throw (lang::DisposedException) -{ - if (rBHelper.bDisposed || rBHelper.bInDispose) - { - throw lang::DisposedException ( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "TaskPanelFactory object has already been disposed")), - const_cast(static_cast(this))); - } -} - - - - //===== ToolPanelResource ===================================================== namespace { diff --git a/sd/source/ui/framework/factories/TaskPanelFactory.hxx b/sd/source/ui/framework/factories/TaskPanelFactory.hxx index 1130a106a56c..70550bd45bee 100644 --- a/sd/source/ui/framework/factories/TaskPanelFactory.hxx +++ b/sd/source/ui/framework/factories/TaskPanelFactory.hxx @@ -89,8 +89,6 @@ public: private: ViewShellBase* mpViewShellBase; - - void ThrowIfDisposed (void) const throw (css::lang::DisposedException); }; } } // end of namespace sd::framework diff --git a/sd/source/ui/framework/factories/ViewShellWrapper.cxx b/sd/source/ui/framework/factories/ViewShellWrapper.cxx index 0a3aeccade7c..04b730e75581 100644 --- a/sd/source/ui/framework/factories/ViewShellWrapper.cxx +++ b/sd/source/ui/framework/factories/ViewShellWrapper.cxx @@ -101,14 +101,6 @@ void SAL_CALL ViewShellWrapper::disposing (void) -bool ViewShellWrapper::IsUnique (void) -{ - return m_refCount==1; -} - - - - //----- XResource ------------------------------------------------------------- Reference SAL_CALL ViewShellWrapper::getResourceId (void) diff --git a/sd/source/ui/framework/module/ReadOnlyModeObserver.cxx b/sd/source/ui/framework/module/ReadOnlyModeObserver.cxx index cf9b095072b1..090247e7f68c 100644 --- a/sd/source/ui/framework/module/ReadOnlyModeObserver.cxx +++ b/sd/source/ui/framework/module/ReadOnlyModeObserver.cxx @@ -145,17 +145,6 @@ void ReadOnlyModeObserver::AddStatusListener ( -void ReadOnlyModeObserver::RemoveStatusListener ( - const Reference& rxListener) -{ - mpBroadcaster->removeListener( - getCppuType((Reference*)NULL), - rxListener); -} - - - - bool ReadOnlyModeObserver::ConnectToDispatch (void) { if ( ! mxDispatch.is()) diff --git a/sd/source/ui/framework/module/ReadOnlyModeObserver.hxx b/sd/source/ui/framework/module/ReadOnlyModeObserver.hxx index f01649bdf8bd..d783d6d83abf 100644 --- a/sd/source/ui/framework/module/ReadOnlyModeObserver.hxx +++ b/sd/source/ui/framework/module/ReadOnlyModeObserver.hxx @@ -91,12 +91,6 @@ public: const ::com::sun::star::uno::Reference< com::sun::star::frame::XStatusListener>& rxListener); - /** Remove the given listener. - */ - void RemoveStatusListener ( - const ::com::sun::star::uno::Reference< - com::sun::star::frame::XStatusListener>& rxListener); - // XEventListener virtual void SAL_CALL disposing ( diff --git a/sd/source/ui/framework/module/ResourceManager.cxx b/sd/source/ui/framework/module/ResourceManager.cxx index 8f79ed41f24b..fcd90ca6454b 100644 --- a/sd/source/ui/framework/module/ResourceManager.cxx +++ b/sd/source/ui/framework/module/ResourceManager.cxx @@ -291,25 +291,4 @@ void SAL_CALL ResourceManager::disposing ( } } - - - -void ResourceManager::Trace (void) const -{ - OSL_TRACE("main views with resource %s:", - ::rtl::OUStringToOString( - FrameworkHelper::ResourceIdToString(mxResourceId), RTL_TEXTENCODING_UTF8).getStr()); - - MainViewContainer::const_iterator iDescriptor; - for (iDescriptor=mpActiveMainViewContainer->begin(); - iDescriptor!=mpActiveMainViewContainer->end(); - ++iDescriptor) - { - OSL_TRACE(" %s", - ::rtl::OUStringToOString(*iDescriptor, RTL_TEXTENCODING_UTF8).getStr()); - } -} - - - } } // end of namespace sd::framework diff --git a/sd/source/ui/framework/module/ResourceManager.hxx b/sd/source/ui/framework/module/ResourceManager.hxx index 23cb1ed7dd48..d00ee78c2de3 100644 --- a/sd/source/ui/framework/module/ResourceManager.hxx +++ b/sd/source/ui/framework/module/ResourceManager.hxx @@ -126,8 +126,6 @@ private: const ::com::sun::star::uno::Reference< com::sun::star::drawing::framework::XConfiguration>& rxConfiguration); void UpdateForMainViewShell (void); - - void Trace (void) const; }; } } // end of namespace sd::framework diff --git a/sd/source/ui/framework/tools/FrameworkHelper.cxx b/sd/source/ui/framework/tools/FrameworkHelper.cxx index 25790e736473..9edb584a9e29 100644 --- a/sd/source/ui/framework/tools/FrameworkHelper.cxx +++ b/sd/source/ui/framework/tools/FrameworkHelper.cxx @@ -982,28 +982,6 @@ void SAL_CALL FrameworkHelper::DisposeListener::disposing (const lang::EventObje -//----- DispatchCaller -------------------------------------------------------- - -DispatchCaller::DispatchCaller ( - SfxDispatcher& rDispatcher, - USHORT nSId) - : mrDispatcher(rDispatcher), - mnSId(nSId) -{ -} - - - - -void DispatchCaller::operator() (bool bEventSeen) -{ - (void)bEventSeen; - mrDispatcher.Execute(mnSId, SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD); -} - - - - //===== FrameworkHelperResourceIdFilter ======================================= FrameworkHelperResourceIdFilter::FrameworkHelperResourceIdFilter ( diff --git a/sd/source/ui/func/fuconstr.cxx b/sd/source/ui/func/fuconstr.cxx index 26119b6a03b9..c0d8235e97fb 100644 --- a/sd/source/ui/func/fuconstr.cxx +++ b/sd/source/ui/func/fuconstr.cxx @@ -72,13 +72,6 @@ FuConstruct::FuConstruct ( { } -FunctionReference FuConstruct::Create( ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView, SdDrawDocument* pDoc, SfxRequest& rReq ) -{ - FunctionReference xFunc( new FuConstruct( pViewSh, pWin, pView, pDoc, rReq ) ); - xFunc->DoExecute(rReq); - return xFunc; -} - void FuConstruct::DoExecute( SfxRequest& rReq ) { FuDraw::DoExecute( rReq ); diff --git a/sd/source/ui/func/fudraw.cxx b/sd/source/ui/func/fudraw.cxx index bbe13c114931..5cc3cc49ca88 100644 --- a/sd/source/ui/func/fudraw.cxx +++ b/sd/source/ui/func/fudraw.cxx @@ -99,14 +99,6 @@ FuDraw::FuDraw(ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView, { } -FunctionReference FuDraw::Create( ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView, SdDrawDocument* pDoc, SfxRequest& rReq, bool bPermanent ) -{ - FuDraw* pFunc; - FunctionReference xFunc( pFunc = new FuDraw( pViewSh, pWin, pView, pDoc, rReq ) ); - pFunc->SetPermanent(bPermanent); - return xFunc; -} - /************************************************************************* |* |* Destruktor diff --git a/sd/source/ui/func/fuoutl.cxx b/sd/source/ui/func/fuoutl.cxx index 2bb056f55e42..c0ef53f144b3 100644 --- a/sd/source/ui/func/fuoutl.cxx +++ b/sd/source/ui/func/fuoutl.cxx @@ -60,12 +60,6 @@ FuOutline::FuOutline ( { } -FunctionReference FuOutline::Create( ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView, SdDrawDocument* pDoc, SfxRequest& rReq ) -{ - FunctionReference xFunc( new FuOutline( pViewSh, pWin, pView, pDoc, rReq ) ); - return xFunc; -} - /************************************************************************* |* |* Command, weiterleiten an OutlinerView diff --git a/sd/source/ui/func/fupoor.cxx b/sd/source/ui/func/fupoor.cxx index bb6f6e7b6908..45c444da151f 100644 --- a/sd/source/ui/func/fupoor.cxx +++ b/sd/source/ui/func/fupoor.cxx @@ -244,16 +244,6 @@ IMPL_LINK_INLINE_START( FuPoor, ScrollHdl, Timer *, EMPTYARG ) } IMPL_LINK_INLINE_END( FuPoor, ScrollHdl, Timer *, pTimer ) -/************************************************************************* -|* -|* String in Applikations-Statuszeile ausgeben -|* -\************************************************************************/ - -void FuPoor::WriteStatus(const String& ) -{ -} - /************************************************************************* |* |* Tastaturereignisse bearbeiten @@ -1118,18 +1108,6 @@ void FuPoor::StartDelayToScrollTimer () aDelayToScrollTimer.Start (); } -/************************************************************************* -|* -|* Handler fuer Maustaste -|* -\************************************************************************/ - -long FuPoor::diffPoint (long pos1, long pos2) -{ - return (pos1 > pos2) ? pos1 - pos2 - : pos2 - pos1; -} - /************************************************************************* |* |* Help-event diff --git a/sd/source/ui/func/fusearch.cxx b/sd/source/ui/func/fusearch.cxx index 82007fe61893..04fcf124cc14 100644 --- a/sd/source/ui/func/fusearch.cxx +++ b/sd/source/ui/func/fusearch.cxx @@ -38,7 +38,6 @@ #include #include #include "fupoor.hxx" -#include "fuspell.hxx" // wegen SidArraySpell[] #ifndef SD_WINDOW_SHELL_HXX #include "Window.hxx" #endif @@ -55,6 +54,14 @@ class SfxRequest; namespace sd { +static USHORT SidArraySpell[] = { + SID_DRAWINGMODE, + SID_OUTLINEMODE, + SID_DIAMODE, + SID_NOTESMODE, + SID_HANDOUTMODE, + 0 }; + TYPEINIT1( FuSearch, FuPoor ); /************************************************************************* diff --git a/sd/source/ui/func/fuspell.cxx b/sd/source/ui/func/fuspell.cxx deleted file mode 100644 index 526efb0087e4..000000000000 --- a/sd/source/ui/func/fuspell.cxx +++ /dev/null @@ -1,166 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_sd.hxx" - - -#include "fuspell.hxx" - -#include -#include - -#include -#include "fupoor.hxx" -#include "Outliner.hxx" -#include "drawdoc.hxx" -#include "DrawViewShell.hxx" -#include "OutlineViewShell.hxx" -#include "ViewShellBase.hxx" - -#include "app.hrc" - -class SfxRequest; - -namespace sd { - -USHORT SidArraySpell[] = { - SID_DRAWINGMODE, - SID_OUTLINEMODE, - SID_DIAMODE, - SID_NOTESMODE, - SID_HANDOUTMODE, - 0 }; - -TYPEINIT1( FuSpell, FuPoor ); - -/************************************************************************* -|* -|* Konstruktor -|* -\************************************************************************/ - -FuSpell::FuSpell ( - ViewShell* pViewSh, - ::sd::Window* pWin, - ::sd::View* pView, - SdDrawDocument* pDoc, - SfxRequest& rReq ) - : FuPoor(pViewSh, pWin, pView, pDoc, rReq), - pSdOutliner(NULL), - bOwnOutliner(FALSE) -{ -} - -FunctionReference FuSpell::Create( ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView, SdDrawDocument* pDoc, SfxRequest& rReq ) -{ - FunctionReference xFunc( new FuSpell( pViewSh, pWin, pView, pDoc, rReq ) ); - xFunc->DoExecute(rReq); - return xFunc; -} - -void FuSpell::DoExecute( SfxRequest& ) -{ - mpViewShell->GetViewFrame()->GetBindings().Invalidate( SidArraySpell ); - - if ( mpViewShell->ISA(DrawViewShell) ) - { - bOwnOutliner = TRUE; - pSdOutliner = new ::sd::Outliner( mpDoc, OUTLINERMODE_TEXTOBJECT ); - } - else if ( mpViewShell->ISA(OutlineViewShell) ) - { - bOwnOutliner = FALSE; - pSdOutliner = mpDoc->GetOutliner(); - } - - if (pSdOutliner) - pSdOutliner->PrepareSpelling(); -} - - - -/************************************************************************* -|* -|* Destruktor -|* -\************************************************************************/ - -FuSpell::~FuSpell() -{ - mpDocSh->GetViewShell()->GetViewFrame()->GetBindings().Invalidate( SidArraySpell ); - - if (pSdOutliner) - pSdOutliner->EndSpelling(); - - if (bOwnOutliner) - delete pSdOutliner; -} - -/************************************************************************* -|* -|* Pruefung starten -|* -\************************************************************************/ - -void FuSpell::StartSpelling() -{ - // Get current main view shell. - ViewShellBase* pBase (ViewShellBase::GetViewShellBase ( - mpDocSh->GetViewShell()->GetViewFrame())); - if (pBase != NULL) - mpViewShell = pBase->GetMainViewShell().get(); - else - mpViewShell = NULL; - if (mpViewShell != NULL) - { - if ( pSdOutliner && mpViewShell->ISA(DrawViewShell) && !bOwnOutliner ) - { - pSdOutliner->EndSpelling(); - - bOwnOutliner = TRUE; - pSdOutliner = new ::sd::Outliner( mpDoc, OUTLINERMODE_TEXTOBJECT ); - pSdOutliner->PrepareSpelling(); - } - else if ( pSdOutliner && mpViewShell->ISA(OutlineViewShell) && bOwnOutliner ) - { - pSdOutliner->EndSpelling(); - delete pSdOutliner; - - bOwnOutliner = FALSE; - pSdOutliner = mpDoc->GetOutliner(); - pSdOutliner->PrepareSpelling(); - } - - if (pSdOutliner) - pSdOutliner->StartSpelling(); - } -} - - - -} // end of namespace sd diff --git a/sd/source/ui/func/futransf.cxx b/sd/source/ui/func/futransf.cxx index f62b1b087aee..31797f3c8a03 100644 --- a/sd/source/ui/func/futransf.cxx +++ b/sd/source/ui/func/futransf.cxx @@ -136,29 +136,4 @@ void FuTransform::DoExecute( SfxRequest& rReq ) } } -/************************************************************************* -|* -|* Function ResizeObject -|* -\************************************************************************/ - -Point FuTransform::GetPoint( Rectangle aRect, RECT_POINT eRP ) -{ - - switch( eRP ) - { - case RP_LT: return( Point( aRect.Left(), aRect.Top() ) ); - case RP_MT: return( Point( aRect.Center().X(), aRect.Top() ) ); - case RP_RT: return( Point( aRect.Right(), aRect.Top() ) ); - case RP_LM: return( Point( aRect.Left(), aRect.Center().Y() ) ); - case RP_MM: return( Point( aRect.Center().X(), aRect.Center().Y() ) ); - case RP_RM: return( Point( aRect.Right(), aRect.Center().Y() ) ); - case RP_LB: return( Point( aRect.Left(), aRect.Bottom() ) ); - case RP_MB: return( Point( aRect.Center().X(), aRect.Bottom() ) ); - case RP_RB: return( Point( aRect.Right(), aRect.Bottom() ) ); - } - return( Point ( 0, 0 ) ); // Sollte nicht vorkommen ! -} - - } // end of namespace sd diff --git a/sd/source/ui/func/makefile.mk b/sd/source/ui/func/makefile.mk index 9ec946325239..a7567c5c0ff2 100644 --- a/sd/source/ui/func/makefile.mk +++ b/sd/source/ui/func/makefile.mk @@ -84,7 +84,6 @@ SLOFILES = \ $(SLO)$/fuolbull.obj \ $(SLO)$/fucopy.obj \ $(SLO)$/fulink.obj \ - $(SLO)$/fuspell.obj \ $(SLO)$/futhes.obj \ $(SLO)$/fusearch.obj \ $(SLO)$/fuinsfil.obj \ @@ -98,7 +97,6 @@ SLOFILES = \ $(SLO)$/fumorph.obj \ $(SLO)$/fuexpand.obj \ $(SLO)$/fusumry.obj \ - $(SLO)$/outlinfo.obj \ $(SLO)$/fucushow.obj \ $(SLO)$/fuvect.obj \ $(SLO)$/bulmaper.obj \ @@ -173,7 +171,6 @@ LIB3OBJFILES= \ $(SLO)$/fumorph.obj \ $(SLO)$/fuexpand.obj \ $(SLO)$/fusumry.obj \ - $(SLO)$/outlinfo.obj \ $(SLO)$/fucushow.obj \ $(SLO)$/fuvect.obj \ $(SLO)$/bulmaper.obj \ diff --git a/sd/source/ui/func/outlinfo.cxx b/sd/source/ui/func/outlinfo.cxx deleted file mode 100644 index 0a52da329b20..000000000000 --- a/sd/source/ui/func/outlinfo.cxx +++ /dev/null @@ -1,301 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_sd.hxx" - -#include -#include -#include -#include -#include -#include "drawdoc.hxx" -#include "outlinfo.hxx" -#include - -// #101500# -#include - -#ifndef _COM_SUN_STAR_I18N_SCRIPTTYPE_HDL_ -#include -#endif -#include -#include - -#ifndef _COM_SUN_STAR_I18N_CHARACTERITERATORMODE_HDL_ -#include -#endif -#include - -using namespace ::com::sun::star::uno; -using namespace ::com::sun::star::lang; -using namespace ::com::sun::star::i18n; - -// ---------------- -// - OutlinerInfo - -// ---------------- - -OutlinerInfo::OutlinerInfo() : - pParagraphs ( NULL ), - nParaCount ( 0UL ), - nExtraData ( 0L ) -{ -} - -// ----------------------------------------------------------------------------- - -OutlinerInfo::~OutlinerInfo() -{ - Clear(); -} - -// ----------------------------------------------------------------------------- - -void OutlinerInfo::SetTextObj( SdDrawDocument* pDoc, SdrRectObj* pObj, OutputDevice* pOut ) -{ - Clear(); - - SdrOutliner& rOutliner = pDoc->GetDrawOutliner(); - - mpOut = pOut; - rOutliner.SetText( *pObj->GetOutlinerParaObject() ); - - aObjBound = pObj->GetCurrentBoundRect(); - nParaCount = rOutliner.GetParagraphCount(); - nExtraData = 0L; - - if( nParaCount ) - { - mbVertical = rOutliner.IsVertical(); - pObj->TakeTextRect( rOutliner, aParaBound, TRUE ); - - if( IsVertical() ) - aTextOffset = aParaBound.TopRight(); - else - aTextOffset = aParaBound.TopLeft(); - - nCurPara = 0; - bInit = TRUE; - - rOutliner.SetDrawPortionHdl( LINK( this, OutlinerInfo, DrawPortionHdl ) ); - pParagraphs = new OutlinerParagraph[ nParaCount ]; - rOutliner.StripPortions(); - rOutliner.SetDrawPortionHdl( Link() ); - - if( 1 == nParaCount ) - pParagraphs[ 0 ].aRect = aParaBound; - else if( IsVertical() ) - { - pParagraphs[ 0 ].aRect.Right() = aParaBound.Right(); - - for( USHORT i = 0; i < nParaCount; i++ ) - { - if( i > 0 ) - pParagraphs[i].aRect.Right() = pParagraphs[ i - 1 ].aRect.Left(); - - pParagraphs[i].aRect.Left() = pParagraphs[i].aRect.Right() - rOutliner.GetTextHeight( i ); - } - } - else - { - pParagraphs[ 0 ].aRect.Top() = aParaBound.Top(); - - for( USHORT i = 0; i < nParaCount; i++ ) - { - if( i > 0 ) - pParagraphs[ i ].aRect.Top() = pParagraphs[ i - 1 ].aRect.Bottom(); - - pParagraphs[ i ].aRect.Bottom() = pParagraphs[ i ].aRect.Top() + rOutliner.GetTextHeight( i ); - } - } - } - else - { - pParagraphs = NULL; - aParaBound = Rectangle(); - aTextOffset = Point(); - } - - nCurPara = 0; - bInit = FALSE; -} - -// ----------------------------------------------------------------------------- - -void OutlinerInfo::Clear() -{ - for( void* pChar = aCharacterList.First(); pChar; pChar = aCharacterList.Next() ) - delete (OutlinerCharacter*) pChar; - aCharacterList.Clear(); - - delete[] pParagraphs; - pParagraphs = NULL; - - nCurPara = nParaCount = 0UL; - aObjBound = aParaBound = Rectangle(); - aTextOffset = Point(); -} - -// ----------------------------------------------------------------------------- - -const Rectangle& OutlinerInfo::GetParaRect( const ULONG nPara ) const -{ - DBG_ASSERT( nPara < nParaCount, "Para out of range!" ); - return pParagraphs[ nPara ].aRect; -} - -// ----------------------------------------------------------------------------- - -BOOL OutlinerInfo::GetParaCharCount( const ULONG nPara ) const -{ - DBG_ASSERT( nPara < nParaCount, "Para out of range!" ); - return (0 != pParagraphs[ nPara ].nCharCount); -} - -// ----------------------------------------------------------------------------- - -IMPL_LINK(OutlinerInfo, DrawPortionHdl, DrawPortionInfo*, pInfo) -{ - // #101500# - Point aStart; - sal_Bool bIsVertical(IsVertical()); - mpOut->SetFont((const Font&)pInfo->mrFont); - FontMetric aFontMetric(mpOut->GetFontMetric()); - sal_Bool bUseBreakIterator(sal_False); - - // initialize BreakIterator - Reference < com::sun::star::i18n::XBreakIterator > xBreak; - Reference < XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory(); - Reference < XInterface > xInterface = xMSF->createInstance(::rtl::OUString::createFromAscii("com.sun.star.i18n.BreakIterator")); - ::com::sun::star::lang::Locale aFontLocale = SvxCreateLocale(pInfo->mrFont.GetLanguage()); - - if(xInterface.is()) - { - Any x = xInterface->queryInterface(::getCppuType((const Reference< XBreakIterator >*)0)); - x >>= xBreak; - } - - if(xBreak.is()) - { - bUseBreakIterator = sal_True; - } - - if(bIsVertical) - { - aStart.X() = pInfo->mrStartPos.X() + aTextOffset.X() - aFontMetric.GetDescent(); - aStart.Y() = pInfo->mrStartPos.Y() + aTextOffset.Y(); - - const Point aTopLeft(aStart.X(), aParaBound.Top()); - const Point aBottomRight(aStart.X() + aFontMetric.GetLineHeight(), aParaBound.Bottom()); - const Rectangle aCurRect(aTopLeft, aBottomRight); - - if(pInfo->mnPara != nCurPara) - { - nCurPara = pInfo->mnPara; - pParagraphs[nCurPara].aRect = aCurRect; - } - else - { - pParagraphs[nCurPara].aRect.Union(aCurRect); - } - } - else - { - aStart.X() = pInfo->mrStartPos.X() + aTextOffset.X(); - aStart.Y() = pInfo->mrStartPos.Y() + aTextOffset.Y() - aFontMetric.GetAscent(); - - const Point aTopLeft(aParaBound.Left(), aStart.Y()); - const Point aBottomRight(aParaBound.Right(), aStart.Y() + aFontMetric.GetLineHeight()); - const Rectangle aCurRect(aTopLeft, aBottomRight); - - if(pInfo->mnPara != nCurPara) - { - nCurPara = pInfo->mnPara; - pParagraphs[nCurPara].aRect = aCurRect; - } - else - { - pParagraphs[nCurPara].aRect.Union(aCurRect); - } - } - - if(pInfo->mnTextLen && (0xFFFF != pInfo->mnIndex)) - { - pParagraphs[nCurPara].nCharCount += pInfo->mnTextLen; - sal_uInt16 nInsertIndex(0xffff); - - if(pInfo->IsRTL()) - nInsertIndex = (sal_uInt16)aCharacterList.Count(); - - for(sal_uInt16 nCharIndex(0); nCharIndex < pInfo->mnTextLen; ) - { - xub_StrLen nNextGlyphLen(1); - sal_Bool bIsSingleSpace(sal_False); - - if(bUseBreakIterator) - { - sal_Int32 nDone(0L); - nNextGlyphLen = (xub_StrLen)xBreak->nextCharacters( pInfo->mrText, pInfo->mnTextStart, aFontLocale, - CharacterIteratorMode::SKIPCELL, 1, nDone) - (pInfo->mnTextStart); - } - - if(!bIsSingleSpace) - { - Size aGlyphSize(pInfo->mrFont.GetPhysTxtSize(mpOut, - pInfo->mrText, nCharIndex + pInfo->mnTextStart, nNextGlyphLen)); - - if(bIsVertical) - { - ::std::swap(aGlyphSize.Width(), aGlyphSize.Height()); - } - - const Rectangle aRect(aStart, aGlyphSize); - - aCharacterList.Insert(new OutlinerCharacter( - aRect, - pInfo->mnPara, - pInfo->mrFont.GetColor()), - nInsertIndex); - - long dx = 0; - if( pInfo->mpDXArray ) - dx = (pInfo->mpDXArray)[nCharIndex]; - - if(bIsVertical) - aStart.Y() = pInfo->mrStartPos.Y() + aTextOffset.Y() + dx; - else - aStart.X() = pInfo->mrStartPos.X() + aTextOffset.X() + dx; - } - - nCharIndex = nCharIndex + nNextGlyphLen; - } - } - - return 0L; -} - -// eof diff --git a/sd/source/ui/func/sdundogr.cxx b/sd/source/ui/func/sdundogr.cxx index daea6eef49a2..7b7a361bba80 100644 --- a/sd/source/ui/func/sdundogr.cxx +++ b/sd/source/ui/func/sdundogr.cxx @@ -116,14 +116,3 @@ void SdUndoGroup::AddAction(SdUndoAction* pAction) { aCtn.Insert(pAction, CONTAINER_APPEND); } - -/************************************************************************* -|* -|* Zeiger auf eine Aktion liefern -|* -\************************************************************************/ - -SdUndoAction* SdUndoGroup::GetAction(ULONG nAction) const -{ - return (SdUndoAction*)aCtn.GetObject(nAction); -} diff --git a/sd/source/ui/func/unoaprms.cxx b/sd/source/ui/func/unoaprms.cxx index 684487d0c592..933e961ed927 100644 --- a/sd/source/ui/func/unoaprms.cxx +++ b/sd/source/ui/func/unoaprms.cxx @@ -37,52 +37,6 @@ TYPEINIT1(SdAnimationPrmsUndoAction, SdUndoAction); -/************************************************************************* -|* -|* 2. Ctor, der den ersten (inline) nach der Version 4.0 einmal ersetzen -|* soll (mit 3. Parameter dann) -|* Hier werden die Member mit den Animations-Informationen vorbelegt, -|* um nicht immer alle inline-Methoden aufrufen zu muessen, auch im -|* Hinblick auf zukuenftige Erweiterungen (neue Member etc.) -|* -\************************************************************************/ - -SdAnimationPrmsUndoAction::SdAnimationPrmsUndoAction( - SdDrawDocument* pTheDoc, - SdrObject* pObj ) : - SdUndoAction ( pTheDoc ), - pObject ( pObj ), - bInfoCreated ( FALSE ) // Fuer Animationsreihenfolge existiert Info -{ - SdAnimationInfo* pInfo = pTheDoc->GetAnimationInfo( pObject ); - if( pInfo ) - { - bNewActive = bOldActive = pInfo->mbActive; - eNewEffect = eOldEffect = pInfo->meEffect; - eNewTextEffect = eOldTextEffect = pInfo->meTextEffect; - eNewSpeed = eOldSpeed = pInfo->meSpeed; - bNewDimPrevious = bOldDimPrevious= pInfo->mbDimPrevious; - aNewDimColor = aOldDimColor = pInfo->maDimColor; - bNewDimHide = bOldDimHide = pInfo->mbDimHide; - bNewSoundOn = bOldSoundOn = pInfo->mbSoundOn; - aNewSoundFile = aOldSoundFile = pInfo->maSoundFile; - bNewPlayFull = bOldPlayFull = pInfo->mbPlayFull; - - pNewPathObj = pOldPathObj = pInfo->mpPathObj; - - eNewClickAction = eOldClickAction = pInfo->meClickAction; - aNewBookmark = aOldBookmark = pInfo->GetBookmark(); -// bNewInvisibleInPres = bOldInvisibleInPres= pInfo->mbInvisibleInPresentation; - nNewVerb = nOldVerb = pInfo->mnVerb; - nNewPresOrder = nOldPresOrder = pInfo->mnPresOrder; - - eNewSecondEffect = eOldSecondEffect = pInfo->meSecondEffect; - eNewSecondSpeed = eOldSecondSpeed = pInfo->meSecondSpeed; - bNewSecondSoundOn = bOldSecondSoundOn = pInfo->mbSecondSoundOn; - bNewSecondPlayFull = bOldSecondPlayFull = pInfo->mbSecondPlayFull; - } -} - /************************************************************************* |* |* Undo() diff --git a/sd/source/ui/inc/AccessibleViewForwarder.hxx b/sd/source/ui/inc/AccessibleViewForwarder.hxx index 33e0bbf725ab..5c8fba1e6b2d 100644 --- a/sd/source/ui/inc/AccessibleViewForwarder.hxx +++ b/sd/source/ui/inc/AccessibleViewForwarder.hxx @@ -53,13 +53,10 @@ class AccessibleViewForwarder public: //===== internal ======================================================== - AccessibleViewForwarder (SdrPaintView* pView, USHORT nWindowId); AccessibleViewForwarder (SdrPaintView* pView, OutputDevice& rDevice); virtual ~AccessibleViewForwarder (void); - void SetView (SdrPaintView* pView); - //===== IAccessibleViewforwarder ======================================== /** This method informs you about the state of the forwarder. Do not diff --git a/sd/source/ui/inc/DrawController.hxx b/sd/source/ui/inc/DrawController.hxx index 5afda083abbc..c8744b2201ac 100644 --- a/sd/source/ui/inc/DrawController.hxx +++ b/sd/source/ui/inc/DrawController.hxx @@ -126,8 +126,6 @@ public: void SetSubController ( const css::uno::Reference& rxSubController); - ::com::sun::star::awt::Rectangle GetVisArea (void) const; - /** Call this method when the VisArea has changed. */ void FireVisAreaChanged (const Rectangle& rVisArea) throw(); diff --git a/sd/source/ui/inc/DrawDocShell.hxx b/sd/source/ui/inc/DrawDocShell.hxx index f2b77d01f96c..4ad4b0d09392 100644 --- a/sd/source/ui/inc/DrawDocShell.hxx +++ b/sd/source/ui/inc/DrawDocShell.hxx @@ -115,7 +115,6 @@ public: sd::ViewShell* GetViewShell() { return mpViewShell; } ::sd::FrameView* GetFrameView(); - ::Window* GetWindow() const; ::sd::FunctionReference GetDocShellFunction() const { return mxDocShellFunction; } void SetDocShellFunction( const ::sd::FunctionReference& xFunction ); @@ -164,8 +163,6 @@ public: UINT16 GetStyleFamily() const { return mnStyleFamily; } void SetStyleFamily( UINT16 nSF ) { mnStyleFamily = nSF; } - sal_Bool IsNewDocument() const; - /** executes the SID_OPENDOC slot to let the framework open a document with the given URL and this document as a referer */ void OpenBookmark( const String& rBookmarkURL ); diff --git a/sd/source/ui/inc/DrawViewShell.hxx b/sd/source/ui/inc/DrawViewShell.hxx index e48d3cef142b..e0fcf4d8cb5b 100644 --- a/sd/source/ui/inc/DrawViewShell.hxx +++ b/sd/source/ui/inc/DrawViewShell.hxx @@ -93,11 +93,6 @@ public: PageKind ePageKind = PK_STANDARD, FrameView* pFrameView = NULL); - DrawViewShell( - SfxViewFrame* pFrame, - ::Window* pParentWindow, - const DrawViewShell& rShell); - virtual ~DrawViewShell (void); virtual void Init (bool bIsMainViewShell); @@ -198,9 +193,6 @@ public: void ExecFormText(SfxRequest& rReq); void GetFormTextState(SfxItemSet& rSet); - void ExecObjPalette(SfxRequest& rReq); - void GetObjPaletteState(SfxItemSet& rSet); - void ExecAnimationWin(SfxRequest& rReq); void GetAnimationWinState(SfxItemSet& rSet); diff --git a/sd/source/ui/inc/GraphicViewShell.hxx b/sd/source/ui/inc/GraphicViewShell.hxx index 39e12e47d1e1..6b5d96be95c6 100644 --- a/sd/source/ui/inc/GraphicViewShell.hxx +++ b/sd/source/ui/inc/GraphicViewShell.hxx @@ -52,11 +52,6 @@ public: SFX_DECL_VIEWFACTORY(GraphicViewShell); SFX_DECL_INTERFACE(SD_IF_SDGRAPHICVIEWSHELL) - GraphicViewShell ( - SfxViewFrame* pFrame, - ::Window* pParentWindow, - const DrawViewShell& rShell); - /** Create a new view shell for the Draw application. @param rViewShellBase The new object will be stacked on this view shell base. diff --git a/sd/source/ui/inc/LayerDialogContent.hxx b/sd/source/ui/inc/LayerDialogContent.hxx index f06b785737b0..3c0b00025307 100644 --- a/sd/source/ui/inc/LayerDialogContent.hxx +++ b/sd/source/ui/inc/LayerDialogContent.hxx @@ -50,8 +50,6 @@ public: ViewShellBase& rBase); virtual ~LayerDialogContent (void); - LayerTabBar& GetLayerTabBar (void); - protected: virtual BOOL Close (void); virtual void Resize (void); diff --git a/sd/source/ui/inc/MasterPageObserver.hxx b/sd/source/ui/inc/MasterPageObserver.hxx index 4e74d922d256..caaa8c175f68 100644 --- a/sd/source/ui/inc/MasterPageObserver.hxx +++ b/sd/source/ui/inc/MasterPageObserver.hxx @@ -80,12 +80,6 @@ public: */ void RemoveEventListener (const Link& rEventListener); - /** Return a set of the names of master pages for the given document. - This convenience method exists because this set is part of the - internal data structure and thus takes no time to create. - */ - MasterPageNameSet GetMasterPageNames (SdDrawDocument& rDocument); - private: static ::osl::Mutex maMutex; diff --git a/sd/source/ui/inc/OutlineView.hxx b/sd/source/ui/inc/OutlineView.hxx index 710ee3a96cf7..78481294bf94 100644 --- a/sd/source/ui/inc/OutlineView.hxx +++ b/sd/source/ui/inc/OutlineView.hxx @@ -162,7 +162,9 @@ public: */ void IgnoreCurrentPageChanges (bool bIgnore); +#if 0 sal_Int32 GetPageNumberWidthPixel(); +#endif void InvalidateSlideNumberArea(); diff --git a/sd/source/ui/inc/OutlineViewShell.hxx b/sd/source/ui/inc/OutlineViewShell.hxx index 0bc083b12b2e..6c3848f39926 100644 --- a/sd/source/ui/inc/OutlineViewShell.hxx +++ b/sd/source/ui/inc/OutlineViewShell.hxx @@ -67,11 +67,6 @@ public: ::Window* pParentWindow, FrameView* pFrameView = NULL); - OutlineViewShell ( - SfxViewFrame* pFrame, - ::Window* pParentWindow, - const OutlineViewShell& rShell); - virtual ~OutlineViewShell (void); virtual void Shutdown (void); diff --git a/sd/source/ui/inc/PaneDockingWindow.hxx b/sd/source/ui/inc/PaneDockingWindow.hxx index 03e6cf96c0f0..9d07ab9beefc 100644 --- a/sd/source/ui/inc/PaneDockingWindow.hxx +++ b/sd/source/ui/inc/PaneDockingWindow.hxx @@ -93,12 +93,6 @@ public: */ USHORT AddMenu (const String& rsMenuName, ULONG nHelpId, const Link& rCallback); - /** Set the title of the docking window to the given string. Use this - method when the title is not yet known at the time of construction - or can not be passed to the constructor. - */ - void SetTitle (const String& rsTitle); - ::Window* GetContentWindow (void); ::boost::shared_ptr GetTitleToolBox (void) const; diff --git a/sd/source/ui/inc/SdUnoPresView.hxx b/sd/source/ui/inc/SdUnoPresView.hxx deleted file mode 100644 index 8edf171f60cc..000000000000 --- a/sd/source/ui/inc/SdUnoPresView.hxx +++ /dev/null @@ -1,54 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef SD_UNO_PRES_VIEW_HXX -#define SD_UNO_PRES_VIEW_HXX - -#include "SdUnoDrawView.hxx" - -namespace sd { - -/** The sub controller for the slide show (or preview?) It formerly reduced - the property set inherited from SdUnoDrawView to just 'CurrentPage'. - Now that we have to always support the whole set, we can as well try to - do that as best as we can. Therefore the inherited functionality is - provided as is. -*/ -class SdUnoPresView - : public SdUnoDrawView -{ -public: - SdUnoPresView ( - DrawController& rController, - DrawViewShell& rViewShell, - View& rView) throw(); - virtual ~SdUnoPresView (void) throw(); -}; - -} // end of namespace sd - -#endif diff --git a/sd/source/ui/inc/SlideSorterViewShell.hxx b/sd/source/ui/inc/SlideSorterViewShell.hxx index 6f8ebb285886..4e6033d67ad1 100644 --- a/sd/source/ui/inc/SlideSorterViewShell.hxx +++ b/sd/source/ui/inc/SlideSorterViewShell.hxx @@ -53,12 +53,6 @@ public: TYPEINFO(); SFX_DECL_INTERFACE(SD_IF_SDSLIDESORTERVIEWSHELL) - static SfxShell* CreateInstance ( - sal_Int32 nId, - SfxShell* pParent, - void* pUserData, - ViewShellBase& rBase); - static ::boost::shared_ptr Create( SfxViewFrame* pFrame, ViewShellBase& rViewShellBase, diff --git a/sd/source/ui/inc/SlideView.hxx b/sd/source/ui/inc/SlideView.hxx index 3764347f2a4b..17f7f17e3a9a 100644 --- a/sd/source/ui/inc/SlideView.hxx +++ b/sd/source/ui/inc/SlideView.hxx @@ -36,7 +36,6 @@ class SdPage; namespace sd { -class ShowView; class SlideViewShell; class Window; @@ -129,7 +128,6 @@ private: List aDelayedPaints; SlideViewShell* pSlideViewShell; BitmapCache* pCache; - ShowView* pShowView; VirtualDevice* mpVDev; USHORT nAllowInvalidateSmph; USHORT nPagesPerRow; diff --git a/sd/source/ui/inc/TaskPaneViewShell.hxx b/sd/source/ui/inc/TaskPaneViewShell.hxx index d9f432029dc2..f502ee03c87f 100644 --- a/sd/source/ui/inc/TaskPaneViewShell.hxx +++ b/sd/source/ui/inc/TaskPaneViewShell.hxx @@ -44,7 +44,6 @@ class PopupMenu; namespace sd { namespace toolpanel { class TaskPaneShellManager; -class TitleToolBox; class TitleBar; class TitledControl; class ToolPanel; @@ -101,9 +100,6 @@ public: virtual SdPage* GetActualPage (void); virtual SdPage* getCurrentPage (void) const; - void Execute (SfxRequest& rRequest); - void GetState (SfxItemSet& rItemSet); - virtual void ArrangeGUIElements (void); TaskPaneShellManager& GetSubShellManager (void) const; @@ -121,12 +117,6 @@ public: */ void ShowPanel (const PanelId nId); - /** Hide and collapse the specified panel. - @param nId - The id of the panel that is to hide. - */ - void HidePanel (const PanelId nId); - /** Expand the specified panel. Its visibility state is not modified. @param nId The id of the panel that is to expand. @@ -200,27 +190,6 @@ private: }; - - -/** This functor makes visible a panel in the task pane. It can be used - with the FrameworkHelper to make a panel visible after an asynchonous - update of the configuration, e.g. after switching to another view. -*/ -class PanelActivation -{ -public: - /** Create a new object that, when its operator() method is called, will - make the specified panel visible in the task pane that belongs to - the application window specified by the given ViewShellBase. - */ - PanelActivation (ViewShellBase& rBase, TaskPaneViewShell::PanelId nPanelId); - void operator() (bool); -private: - ViewShellBase& mrBase; - TaskPaneViewShell::PanelId mnPanelId; -}; - - } } // end of namespace ::sd::toolpanel #endif diff --git a/sd/source/ui/inc/ToolBarManager.hxx b/sd/source/ui/inc/ToolBarManager.hxx index 2caead9a3c5d..d8b84d1d7b61 100644 --- a/sd/source/ui/inc/ToolBarManager.hxx +++ b/sd/source/ui/inc/ToolBarManager.hxx @@ -144,14 +144,6 @@ public: TBG__LAST = TBG_MASTER_MODE }; - /** Only after calls with bValid= may the tool bar manager use - the frame::XLayoutManager to change the visible tool bars. Call - this method when the controller is attached to or detachted from the - frame. When called with then ResetAllToolBars() is - executed. - */ - void SetValid (bool bValid); - /** Reset the set of visible object bars in the specified group. Tool bars in other groups are not affected. @param rParentShell @@ -209,10 +201,6 @@ public: ToolBarGroup eGroup, const ::rtl::OUString& rsToolBarName); - void RemoveToolBarShell ( - ToolBarGroup eGroup, - ShellId nToolBarId); - /** This is basically a shortcut for ResetToolBars(),AddToolBar(). The main difference is, that all sub shells of the specified parent shell are deactivated as well. @@ -275,10 +263,6 @@ public: }; friend class UpdateLock; - /** Return whether updates of tool bars are locked. - */ - bool IsUpdateLocked (void) const; - void ToolBarsDestroyed(void); private: diff --git a/sd/source/ui/inc/View.hxx b/sd/source/ui/inc/View.hxx index a0d7bf179886..c4f9ab6e7d19 100644 --- a/sd/source/ui/inc/View.hxx +++ b/sd/source/ui/inc/View.hxx @@ -160,10 +160,7 @@ public: void SetMarkedOriginalSize(); - VirtualDevice* CreatePageVDev(USHORT nSdPage, PageKind ePageKind, ULONG nWidthPixel); - void LockRedraw(BOOL bLock); - bool IsRedrawLocked (void) const; BOOL IsMorphingAllowed() const; BOOL IsVectorizeAllowed() const; diff --git a/sd/source/ui/inc/ViewShell.hxx b/sd/source/ui/inc/ViewShell.hxx index 64bc5cbc02b7..ffefb9de7359 100644 --- a/sd/source/ui/inc/ViewShell.hxx +++ b/sd/source/ui/inc/ViewShell.hxx @@ -141,10 +141,6 @@ public: ::Window* pParentWindow, ViewShellBase& rViewShellBase, bool bAllowCenter = true); - ViewShell ( - SfxViewFrame *pFrame, - ::Window* pParentWindow, - const ViewShell& rShell); virtual ~ViewShell (void); /** The Init method has to be called from the outside directly @@ -235,7 +231,6 @@ public: void InitWindows(const Point& rViewOrigin, const Size& rViewSize, const Point& rWinPos, BOOL bUpdate = FALSE); void InvalidateWindows(); - void UpdateWindows(); /** This method is still used by the OutlineViewShell to update the model according to the content of the outline view. This in turn updates the previews in the slide sorter. @@ -243,8 +238,6 @@ public: virtual void UpdatePreview (SdPage* pPage, BOOL bInit = FALSE); void DrawMarkRect(const Rectangle& rRect) const; - void DrawFilledRect( const Rectangle& rRect, const Color& rLColor, - const Color& rFColor ) const; void ExecReq( SfxRequest &rReq ); diff --git a/sd/source/ui/inc/ViewShellBase.hxx b/sd/source/ui/inc/ViewShellBase.hxx index 5e1acbe2a6ac..13dbd6e6cd53 100644 --- a/sd/source/ui/inc/ViewShellBase.hxx +++ b/sd/source/ui/inc/ViewShellBase.hxx @@ -55,7 +55,6 @@ class ToolBarManager; class UpdateLockManager; class ViewShell; class ViewShellManager; -class CustomHandleManager; /** SfxViewShell descendant that the stacked Draw/Impress shells are based on. @@ -110,10 +109,6 @@ public: DrawDocShell* GetDocShell (void) const; SdDrawDocument* GetDocument (void) const; - /** Callback function for retrieving item values related to menu entries. - */ - void GetMenuState (SfxItemSet& rSet); - /** Callback function for general slot calls. At the moment these are slots for switching the pane docking windows on and off. */ @@ -163,12 +158,6 @@ public: PrintDialog *pPrintDialog, BOOL bSilent, BOOL bIsAPI ); - /// Forwarded to the print manager. - USHORT SetPrinterOptDlg ( - SfxPrinter* pNewPrinter, - USHORT nDiffFlags = SFX_PRINTER_ALL, - BOOL _bShowDialog = TRUE); - virtual void PreparePrint (PrintDialog* pPrintDialog); /// Forward methods to main sub shell. @@ -259,8 +248,6 @@ public: */ ::Window* GetViewWindow (void); - CustomHandleManager& getCustomHandleManager() const; - /** returns the ui descriptive name for the given uno slot. The result is taken from the configuration and not cached, so do not use it excessive (f.e. in status updates) */ ::rtl::OUString RetrieveLabelFromCommand( const ::rtl::OUString& aCmdURL ) const; @@ -293,22 +280,6 @@ public: virtual void addCustomHandler( SdrView& rSourceView, ViewShell::ShellType eShellType, SdrHdlList& rHandlerList ) = 0; }; -class CustomHandleManager : public ICustomhandleSupplier -{ -public: - CustomHandleManager( ViewShellBase& rViewShellBase ); - virtual ~CustomHandleManager(); - - void registerSupplier( ICustomhandleSupplier* pSupplier ); - void unRegisterSupplier( ICustomhandleSupplier* pSupplier ); - - virtual void addCustomHandler( SdrView& rSourceView, ViewShell::ShellType eShellType, SdrHdlList& rHandlerList ); - -private: - ViewShellBase& mrViewShellBase; - std::set< ICustomhandleSupplier* > maSupplier; -}; - } // end of namespace sd #endif diff --git a/sd/source/ui/inc/ViewShellManager.hxx b/sd/source/ui/inc/ViewShellManager.hxx index 27f88b72bf11..d674e7d07eff 100644 --- a/sd/source/ui/inc/ViewShellManager.hxx +++ b/sd/source/ui/inc/ViewShellManager.hxx @@ -90,23 +90,6 @@ public: ViewShell* pViewShell, const SharedShellFactory& rpFactory); - /** Create a new (or possibly recycle an existing) instance of a view - shell that is specified by the given id. When called multiple times - with the same id then multiple instances of the associated view - shell are created. Use the returned pointer to distinguish between - these. - @param nId - The id of the shell to activate. - @return - A pointer to the activated shell is returned. Use this pointer - to identify the shell in other method calls. When an activation - is not possible then NULL is returned. - */ - ViewShell* ActivateViewShell ( - ShellId nId, - ::Window* pParentWindow, - FrameView* pFrameView); - /** Activate the given view shell. */ void ActivateViewShell (ViewShell* pViewShell); @@ -156,10 +139,6 @@ public: */ void DeactivateSubShell (const ViewShell& rParentShell, ShellId nId); - /** Deactivate all sub shells of the given view shell. - */ - void DeactivateAllSubShells (const ViewShell& rParentShell); - /** Move the specified sub shells to the top position among the sub shells of the parent view shell. The rest of the SFX shell stack does not change (but the all shells above the sub shells have to be @@ -173,14 +152,6 @@ public: void InvalidateAllSubShells ( ViewShell* pViewShell); - /** Call this method to when a 'secondary' shell is moved to or from the - stack, e.g. an object bar. As a result a pending - TakeShellsFromStack() is executed and at the next UnlockUpdate() to - lock level 0 the shells are asked about their secondary shells to - push on the shell stack. - */ - void InvalidateShellStack (const SfxShell* pShell); - /** Move the specified view shell to the top most position on the stack of view shells in relation to the other view shells. After this the only shells that are higher on the stack are its object bars. @@ -211,20 +182,6 @@ public: */ SfxShell* GetTopShell (void) const; - /** Return the id of the given shell. - */ - ShellId GetShellId (const SfxShell* pShell) const; - - /** Replace the references to one SfxUndoManager to that of another at all - shells on the SFX shell stack. Call this method when an undo - manager is about to be destroyed. - @param pManager - The undo manager to be replaced. - @param pReplacement - The undo manager that replaces pManager. - */ - void ReplaceUndoManager (SfxUndoManager* pManager, SfxUndoManager* pReplacement); - /** Use this class to safely lock updates of the view shell stack. */ class UpdateLock diff --git a/sd/source/ui/inc/Window.hxx b/sd/source/ui/inc/Window.hxx index dbf2a1ed40a6..8dd522d8212d 100644 --- a/sd/source/ui/inc/Window.hxx +++ b/sd/source/ui/inc/Window.hxx @@ -66,8 +66,6 @@ public: void SetViewShell (ViewShell* pViewSh); - void ShareViewArea(::sd::Window* pOtherWin); - /** Set the zoom factor to the specified value and center the display area arround the zoom center. @param nZoom diff --git a/sd/source/ui/inc/animobjs.hxx b/sd/source/ui/inc/animobjs.hxx index 846863c3a68a..7a7a34362c48 100644 --- a/sd/source/ui/inc/animobjs.hxx +++ b/sd/source/ui/inc/animobjs.hxx @@ -172,7 +172,6 @@ private: void UpdateControl( ULONG nPos, BOOL bDisableCtrls = FALSE ); void ResetAttrs(); - void WaitInEffect( ULONG nMilliSeconds ) const; void WaitInEffect( ULONG nMilliSeconds, ULONG nTime, SfxProgress* pStbMgr ) const; Fraction GetScale(); diff --git a/sd/source/ui/inc/bmcache.hxx b/sd/source/ui/inc/bmcache.hxx index 26658333dca3..c04f7d2ed2c4 100644 --- a/sd/source/ui/inc/bmcache.hxx +++ b/sd/source/ui/inc/bmcache.hxx @@ -45,8 +45,6 @@ public: : nMaxSize(nMaxSizeKB), nCurSize(0) {} virtual ~BitmapCache(); - void Add(const SdPage* pPage, const Bitmap& rBmp, long nZoomPercent); - const GraphicObject* Get(const SdPage* pPage, long& rZoomPercent, long nZoomTolerancePercent); void Remove(const SdPage* pPage); }; diff --git a/sd/source/ui/inc/dlgass.hxx b/sd/source/ui/inc/dlgass.hxx index 418d72618b4c..523b86cf66a8 100644 --- a/sd/source/ui/inc/dlgass.hxx +++ b/sd/source/ui/inc/dlgass.hxx @@ -64,9 +64,6 @@ public: DECL_LINK( FinishHdl, OKButton * ); SfxObjectShellLock GetDocument(); - String GetTopic() const; - String GetUserName() const; - String GetInformation() const; OutputType GetOutputMedium() const; BOOL IsSummary() const; StartType GetStartType() const; diff --git a/sd/source/ui/inc/dlgctrls.hxx b/sd/source/ui/inc/dlgctrls.hxx index df48868d473d..72b5921d8e86 100644 --- a/sd/source/ui/inc/dlgctrls.hxx +++ b/sd/source/ui/inc/dlgctrls.hxx @@ -50,7 +50,6 @@ class SD_DLLPUBLIC FadeEffectLB : public ListBox { public: FadeEffectLB( Window* pParent, SdResId Id ); - FadeEffectLB( Window* pParent, WinBits aWB ); ~FadeEffectLB(); virtual void Fill(); diff --git a/sd/source/ui/inc/docprev.hxx b/sd/source/ui/inc/docprev.hxx index 0827371da3be..76b8fe06f318 100644 --- a/sd/source/ui/inc/docprev.hxx +++ b/sd/source/ui/inc/docprev.hxx @@ -70,10 +70,8 @@ protected: public: SdDocPreviewWin( Window* pParent, const ResId& rResId ); - SdDocPreviewWin( Window* pParent ); ~SdDocPreviewWin(); void SetObjectShell( SfxObjectShell* pObj, sal_uInt16 nShowPage = 0 ); - void SetGDIFile( GDIMetaFile* pFile ); virtual void Resize(); void startPreview(); diff --git a/sd/source/ui/inc/filedlg.hxx b/sd/source/ui/inc/filedlg.hxx index 74b4c5d1d6a6..2aaa7be9f123 100644 --- a/sd/source/ui/inc/filedlg.hxx +++ b/sd/source/ui/inc/filedlg.hxx @@ -40,40 +40,9 @@ class SdFileDialog_Imp; -/******************************************************************************/ - -/** - The class SdExportFileDialog wraps the FileDialogHelper, displaying the - FILESAVE_AUTOEXTENSION_SELECTION dialog template. The interface is a downstripped - version of the aforementioned class, with similar semantics. - */ -class SdExportFileDialog -{ - const std::auto_ptr< SdFileDialog_Imp > mpImpl; - - // forbidden and not implemented - SdExportFileDialog (); - SdExportFileDialog (const SdExportFileDialog &); - SdExportFileDialog & operator= (const SdExportFileDialog &); - -public: - explicit SdExportFileDialog( BOOL haveCheckbox ); - ~SdExportFileDialog(); - - ErrCode Execute(); - String GetPath() const; - void SetPath( const String& rPath ); - - String ReqDisplayDirectory() const; - - String ReqCurrentFilter() const; - BOOL IsExportSelection() const; // whether the "selection" checkbox is checked. -}; - /******************************************************************************/ - /** The class SdOpenSoundFileDialog wraps the FileDialogHelper, displaying the FILEOPEN_PLAY dialog template and performing the 'preview' functionality diff --git a/sd/source/ui/inc/framework/FrameworkHelper.hxx b/sd/source/ui/inc/framework/FrameworkHelper.hxx index a25839b3e637..58c663449bbc 100644 --- a/sd/source/ui/inc/framework/FrameworkHelper.hxx +++ b/sd/source/ui/inc/framework/FrameworkHelper.hxx @@ -383,23 +383,6 @@ private: }; - -/** This functor wraps a slot call. It is used to call a slot after an - asynchronous configuration update, eg after switching views. -*/ -class DispatchCaller -{ - SfxDispatcher& mrDispatcher; - USHORT mnSId; -public: - /** Create a new DispatchCaller object that, when executed, will call - the given slot at the given dispatcher. - */ - DispatchCaller(SfxDispatcher& rDispatcher, USHORT nSId); - void operator() (bool bEventSeen); -}; - - } } // end of namespace sd::framework diff --git a/sd/source/ui/inc/framework/ResourceId.hxx b/sd/source/ui/inc/framework/ResourceId.hxx index a4d5390d15d0..e8124e895ee6 100644 --- a/sd/source/ui/inc/framework/ResourceId.hxx +++ b/sd/source/ui/inc/framework/ResourceId.hxx @@ -236,8 +236,6 @@ private: const ::std::vector& rResourceURLs, css::drawing::framework::AnchorBindingMode eMode) const; - bool IsValid (void) const; - void ParseResourceURL (void); }; diff --git a/sd/source/ui/inc/framework/ViewShellWrapper.hxx b/sd/source/ui/inc/framework/ViewShellWrapper.hxx index 96846e5c08d7..a7fbc3dde82a 100644 --- a/sd/source/ui/inc/framework/ViewShellWrapper.hxx +++ b/sd/source/ui/inc/framework/ViewShellWrapper.hxx @@ -90,16 +90,6 @@ public: */ ::boost::shared_ptr GetViewShell (void); - /** Returns whether there is exactly one reference to the called - ViewShellWrapper object (the number of references to the wrapped - ViewShell object is not taken into account). This method is - typically used by the owner of a ViewShellWrapper object to verify - that, at the end of the ViewShellWrapper object's lifetime, the - owner holds the last reference and by releasing it will destroy the - object. - */ - bool IsUnique (void); - // XUnoTunnel diff --git a/sd/source/ui/inc/fuconstr.hxx b/sd/source/ui/inc/fuconstr.hxx index c4199986a5b6..390060a16e3c 100644 --- a/sd/source/ui/inc/fuconstr.hxx +++ b/sd/source/ui/inc/fuconstr.hxx @@ -50,7 +50,6 @@ public: TYPEINFO(); - static FunctionReference Create( ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView, SdDrawDocument* pDoc, SfxRequest& rReq ); virtual void DoExecute( SfxRequest& rReq ); // Mouse- & Key-Events diff --git a/sd/source/ui/inc/fudraw.hxx b/sd/source/ui/inc/fudraw.hxx index 77427a7f346e..23f68eda327b 100644 --- a/sd/source/ui/inc/fudraw.hxx +++ b/sd/source/ui/inc/fudraw.hxx @@ -50,8 +50,6 @@ class FuDraw public: TYPEINFO(); - static FunctionReference Create( ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView, SdDrawDocument* pDoc, SfxRequest& rReq, bool bPermanent ); - virtual BOOL KeyInput(const KeyEvent& rKEvt); virtual BOOL MouseMove(const MouseEvent& rMEvt); virtual BOOL MouseButtonUp(const MouseEvent& rMEvt); diff --git a/sd/source/ui/inc/fuoutl.hxx b/sd/source/ui/inc/fuoutl.hxx index a8743fea8a50..92299387849a 100644 --- a/sd/source/ui/inc/fuoutl.hxx +++ b/sd/source/ui/inc/fuoutl.hxx @@ -54,8 +54,6 @@ class FuOutline public: TYPEINFO(); - static FunctionReference Create( ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView, SdDrawDocument* pDoc, SfxRequest& rReq ); - virtual BOOL Command(const CommandEvent& rCEvt); virtual void ScrollStart(); diff --git a/sd/source/ui/inc/fupoor.hxx b/sd/source/ui/inc/fupoor.hxx index c3c95a384a38..2650e99767b5 100644 --- a/sd/source/ui/inc/fupoor.hxx +++ b/sd/source/ui/inc/fupoor.hxx @@ -98,7 +98,6 @@ public: virtual void ScrollEnd() {} // ForceScroll aufgerufen void SetWindow(::sd::Window* pWin) { mpWindow = pWin; } - void WriteStatus(const String& aStr); // Statuszeile schreiben // #97016# II virtual void SelectionHasChanged(); @@ -145,7 +144,6 @@ protected: virtual ~FuPoor (void); DECL_LINK( DelayHdl, Timer * ); - long diffPoint (long pos1, long pos2); void ImpForceQuadratic(Rectangle& rRect); diff --git a/sd/source/ui/inc/fuspell.hxx b/sd/source/ui/inc/fuspell.hxx deleted file mode 100644 index 1bb37d3a873d..000000000000 --- a/sd/source/ui/inc/fuspell.hxx +++ /dev/null @@ -1,71 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef SD_FU_SPELL_HXX -#define SD_FU_SPELL_HXX - -#include "fupoor.hxx" - -namespace sd { - -extern USHORT SidArraySpell[]; - -class Outliner; - -class FuSpell - : public FuPoor -{ -public: - TYPEINFO(); - - static FunctionReference Create( ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView, SdDrawDocument* pDoc, SfxRequest& rReq ); - virtual void DoExecute( SfxRequest& rReq ); - - void StartSpelling(); - - ::sd::Outliner* GetOutliner() const { return pSdOutliner; } - -protected: - virtual ~FuSpell (void); - - ::sd::Outliner* pSdOutliner; - BOOL bOwnOutliner; - -private: - FuSpell ( - ViewShell* pViewSh, - ::sd::Window* pWin, - ::sd::View* pView, - SdDrawDocument* pDoc, - SfxRequest& rReq); -}; - -} // end of namespace sd - -#endif - - diff --git a/sd/source/ui/inc/futransf.hxx b/sd/source/ui/inc/futransf.hxx index be554e941400..85041334c7f0 100644 --- a/sd/source/ui/inc/futransf.hxx +++ b/sd/source/ui/inc/futransf.hxx @@ -51,8 +51,6 @@ private: ::sd::View* pView, SdDrawDocument* pDoc, SfxRequest& rReq); - - Point GetPoint( Rectangle aRect, RECT_POINT eRP ); }; } // end of namespace sd diff --git a/sd/source/ui/inc/headerfooterdlg.hxx b/sd/source/ui/inc/headerfooterdlg.hxx index 382727475f84..fa0c4d9282c0 100644 --- a/sd/source/ui/inc/headerfooterdlg.hxx +++ b/sd/source/ui/inc/headerfooterdlg.hxx @@ -65,7 +65,6 @@ private: SdPage* mpCurrentPage; ViewShell* mpViewShell; - void initTabPages(); void apply( bool bToAll, bool bForceSlides ); void change( SdUndoGroup* pUndoGroup, SdPage* pPage, const HeaderFooterSettings& rNewSettings ); diff --git a/sd/source/ui/inc/optsitem.hxx b/sd/source/ui/inc/optsitem.hxx index dcf53fc6ffc3..13088dfc64cb 100644 --- a/sd/source/ui/inc/optsitem.hxx +++ b/sd/source/ui/inc/optsitem.hxx @@ -163,7 +163,6 @@ public: SdOptionsLayout( USHORT nConfigId, BOOL bUseConfig ); virtual ~SdOptionsLayout() {} - void SetDefaults(); BOOL operator==( const SdOptionsLayout& rOpt ) const; BOOL IsRulerVisible() const { Init(); return (BOOL) bRuler; } @@ -220,7 +219,6 @@ public: SdOptionsContents( USHORT nConfigId, BOOL bUseConfig ); virtual ~SdOptionsContents() {} - void SetDefaults(); BOOL operator==( const SdOptionsContents& rOpt ) const; }; @@ -230,7 +228,6 @@ class SD_DLLPUBLIC SdOptionsContentsItem : public SfxPoolItem { public: - SdOptionsContentsItem( USHORT nWhich); SdOptionsContentsItem( USHORT nWhich, SdOptions* pOpts, ::sd::FrameView* pView = NULL ); virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; @@ -301,7 +298,6 @@ public: SdOptionsMisc( USHORT nConfigId, BOOL bUseConfig ); virtual ~SdOptionsMisc() {} - void SetDefaults(); BOOL operator==( const SdOptionsMisc& rOpt ) const; BOOL IsStartWithTemplate() const { Init(); return (BOOL) bStartWithTemplate; } @@ -427,7 +423,6 @@ public: SdOptionsSnap( USHORT nConfigId, BOOL bUseConfig ); virtual ~SdOptionsSnap() {} - void SetDefaults(); BOOL operator==( const SdOptionsSnap& rOpt ) const; BOOL IsSnapHelplines() const { Init(); return (BOOL) bSnapHelplines; } @@ -494,7 +489,6 @@ public: SdOptionsZoom( USHORT nConfigId, BOOL bUseConfig ); virtual ~SdOptionsZoom() {} - void SetDefaults(); BOOL operator==( const SdOptionsZoom& rOpt ) const; void GetScale( INT32& rX, INT32& rY ) const { Init(); rX = nX; rY = nY; } @@ -503,23 +497,6 @@ public: // ----------------------------------------------------------------------------- -class SdOptionsZoomItem : public SfxPoolItem -{ -public: - - SdOptionsZoomItem( USHORT nWhich); - SdOptionsZoomItem( USHORT nWhich, SdOptions* pOpts, ::sd::FrameView* pView = NULL ); - - virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual int operator==( const SfxPoolItem& ) const; - - void SetOptions( SdOptions* pOpts ) const; - - SdOptionsZoom& GetOptionsZoom() { return maOptionsZoom; } -private: - SdOptionsZoom maOptionsZoom; -}; - // ----------------- // - SdOptionsGrid - // ----------------- @@ -569,7 +546,6 @@ class SdOptionsGridItem : public SvxGridItem { public: - SdOptionsGridItem( USHORT nWhich ); SdOptionsGridItem( USHORT nWhich, SdOptions* pOpts, ::sd::FrameView* pView = NULL ); void SetOptions( SdOptions* pOpts ) const; @@ -616,9 +592,6 @@ public: SdOptionsPrint( USHORT nConfigId, BOOL bUseConfig ); virtual ~SdOptionsPrint() {} - void SetPrinterOptions( const SdOptionsPrint* pOptions ); - - void SetDefaults(); BOOL operator==( const SdOptionsPrint& rOpt ) const; BOOL IsDraw() const { Init(); return (BOOL) bDraw; } @@ -700,7 +673,6 @@ public: SdOptions( USHORT nConfigId ); virtual ~SdOptions(); - void SetRangeDefaults( ULONG nOptionRange ); void StoreConfig( ULONG nOptionRange = SD_OPTIONS_ALL ); }; diff --git a/sd/source/ui/inc/outlinfo.hxx b/sd/source/ui/inc/outlinfo.hxx deleted file mode 100644 index 4f277c0fa320..000000000000 --- a/sd/source/ui/inc/outlinfo.hxx +++ /dev/null @@ -1,125 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _OUTLINFO_HXX -#define _OUTLINFO_HXX - -#include -#include - -// --------------- -// - SdLaserInfo - -// --------------- - -struct OutlinerCharacter -{ - Rectangle aRect; - ULONG nPara; - Color aColor; - - // #101500# Removed CharCode, it's only used in one place to compare - // for single space character. This can be done at creation, too. - //USHORT nCharCode; - - OutlinerCharacter( const Rectangle& _rRect, ULONG _nPara, const Color& _rCol /* #101500#, USHORT _nCharCode*/ ) - : aRect( _rRect ), - nPara( _nPara ), - aColor( _rCol ) - { - } -}; - -// ----------------------------------------------------------------------------- - -struct OutlinerParagraph -{ - Rectangle aRect; - ULONG nCharCount; - - OutlinerParagraph() : nCharCount( 0 ) {} - ~OutlinerParagraph() {}; -}; - -// ---------------- -// - OutlinerInfo - -// ---------------- - -class DrawPortionInfo; -class SdDrawDocument; -class SdrRectObj; - -class OutlinerInfo -{ -private: - - List aCharacterList; - Rectangle aObjBound; - Rectangle aParaBound; - Point aTextOffset; - OutlinerParagraph* pParagraphs; - OutputDevice* mpOut; - ULONG nParaCount; - ULONG nCurPara; - long nExtraData; - BOOL bInit; - BOOL mbVertical; - - OutlinerInfo( const OutlinerInfo& ) {} - OutlinerInfo& operator=( const OutlinerInfo& ) { return *this; } - - DECL_LINK( DrawPortionHdl, DrawPortionInfo* ); - -public: - - OutlinerInfo(); - ~OutlinerInfo(); - - void Clear(); - - void SetTextObj( SdDrawDocument* pDoc, SdrRectObj* pObj, OutputDevice* _pOut ); - - const Rectangle& GetObjRect() const { return aObjBound; } - const Rectangle& GetTextRect() const { return aParaBound; } - const Point& GetTextOffset() const { return aTextOffset; } - - ULONG GetParaCount() const { return nParaCount; } - - const Rectangle& GetParaRect( const ULONG nPara ) const; - BOOL GetParaCharCount( const ULONG nPara ) const; - - ULONG GetCharacterCount() const { return aCharacterList.Count(); } - OutlinerCharacter* GetCharacter( ULONG nPos ) const { return (OutlinerCharacter*) aCharacterList.GetObject( nPos ); }; - OutlinerCharacter* GetFirstCharacter() { return (OutlinerCharacter*) aCharacterList.First(); } - OutlinerCharacter* GetNextCharacter() { return (OutlinerCharacter*) aCharacterList.Next(); } - - void SetExtraData( const long _nExtraData = 0L ) { nExtraData = _nExtraData; } - long GetExtraData() const { return nExtraData; } - - BOOL IsVertical() const { return mbVertical; } -}; - -#endif diff --git a/sd/source/ui/inc/prntopts.hxx b/sd/source/ui/inc/prntopts.hxx index 288bcfb3e359..da9bc20c02d6 100644 --- a/sd/source/ui/inc/prntopts.hxx +++ b/sd/source/ui/inc/prntopts.hxx @@ -94,7 +94,6 @@ public: ~SdPrintOptions(); static SfxTabPage* Create( Window*, const SfxItemSet& ); - static USHORT* GetRanges(); virtual BOOL FillItemSet( SfxItemSet& ); virtual void Reset( const SfxItemSet & ); diff --git a/sd/source/ui/inc/sdtreelb.hxx b/sd/source/ui/inc/sdtreelb.hxx index 948a55d3754c..dc98929a9ed1 100644 --- a/sd/source/ui/inc/sdtreelb.hxx +++ b/sd/source/ui/inc/sdtreelb.hxx @@ -210,7 +210,6 @@ public: BOOL SelectEntry( const String& rName ); String GetSelectEntry(); List* GetSelectEntryList( USHORT nDepth ); - List* GetBookmarkList( USHORT nType ); SdDrawDocument* GetBookmarkDoc(SfxMedium* pMedium = NULL); ::sd::DrawDocShell* GetDropDocSh() { return(mpDropDocSh); } diff --git a/sd/source/ui/inc/sdundogr.hxx b/sd/source/ui/inc/sdundogr.hxx index b4665dbe5a46..f02977234475 100644 --- a/sd/source/ui/inc/sdundogr.hxx +++ b/sd/source/ui/inc/sdundogr.hxx @@ -48,7 +48,6 @@ public: virtual void Redo(); void AddAction(SdUndoAction* pAction); - SdUndoAction* GetAction(ULONG nAction) const; ULONG Count() const { return aCtn.Count(); } }; diff --git a/sd/source/ui/inc/showview.hxx b/sd/source/ui/inc/showview.hxx deleted file mode 100644 index 748effbe1985..000000000000 --- a/sd/source/ui/inc/showview.hxx +++ /dev/null @@ -1,88 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef SD_SHOW_VIEW_HXX -#define SD_SHOW_VIEW_HXX - -#include - -class SdDrawDocument; - -namespace sd { - -class ViewShell; - -/************************************************************************* -|* -|* Beschreibung ShowView ist die View fuer die Diashow -|* -\************************************************************************/ - -class ShowView - : public FmFormView -{ -public: - // wenn waehrend des Zeichnens Plugins 'connected' - // werden sollen, muss pWWin ein Zeiger auf das Fenster - // sein, das das Plugin benutzen soll - ShowView ( - SdDrawDocument* pDoc, - OutputDevice* pOut, - ViewShell* pViewShell, - ::Window* pWin = NULL); - virtual ~ShowView (void); - - SdDrawDocument& GetDoc() const { return *pDrDoc; } - - void SetAllowInvalidate(BOOL bFlag); - BOOL IsInvalidateAllowed() const; - - void SetAllowMasterPageCaching(BOOL bAllow) - { bAllowMasterPageCaching = bAllow; } - BOOL IsMasterPageCachingAllowed() const - { return(bAllowMasterPageCaching); } - - virtual void CompleteRedraw(OutputDevice* pOutDev, const Region& rReg, sdr::contact::ViewObjectContactRedirector* pRedirector = 0L); - virtual void InvalidateOneWin(::Window& rWin); - virtual void InvalidateOneWin(::Window& rWin, const Rectangle& rRect); - - virtual void DoConnect(SdrOle2Obj* pOleObj); - -private: - SdDrawDocument* pDrDoc; - ViewShell* mpViewSh; - Window* pWindowForPlugIns; - USHORT nAllowInvalidateSmph; - BOOL bAllowMasterPageCaching; - -}; - -} // end of namespace sd - -#endif - - diff --git a/sd/source/ui/inc/slideshow.hxx b/sd/source/ui/inc/slideshow.hxx index bc4df5aa44f5..eda80feeb825 100644 --- a/sd/source/ui/inc/slideshow.hxx +++ b/sd/source/ui/inc/slideshow.hxx @@ -173,7 +173,6 @@ public: ShowWindow* getShowWindow(); // a.k.a. FuSlideShow::GetShowWindow() int getAnimationMode(); // a.k.a. FuSlideShow::GetAnimationMode() sal_Int32 getCurrentPageNumber(); // a.k.a. FuSlideShow::GetCurrentPage() - sal_Int32 getCurrentPageIndex(); sal_Int32 getFirstPageNumber(); sal_Int32 getLastPageNumber(); bool isEndless(); diff --git a/sd/source/ui/inc/taskpane/ScrollPanel.hxx b/sd/source/ui/inc/taskpane/ScrollPanel.hxx index 019e06d9dd44..00a2225efbbb 100644 --- a/sd/source/ui/inc/taskpane/ScrollPanel.hxx +++ b/sd/source/ui/inc/taskpane/ScrollPanel.hxx @@ -127,11 +127,6 @@ public: Rectangle& aRectangle, ::Window* pWindow); -protected: - /** Initiate a rearrangement of the controls. - */ - void ListHasChanged (void); - private: ::Control maScrollWindow; ScrollBar maVerticalScrollBar; diff --git a/sd/source/ui/inc/taskpane/SubToolPanel.hxx b/sd/source/ui/inc/taskpane/SubToolPanel.hxx index 9524cdddf748..2a56ee6d74dc 100644 --- a/sd/source/ui/inc/taskpane/SubToolPanel.hxx +++ b/sd/source/ui/inc/taskpane/SubToolPanel.hxx @@ -69,19 +69,6 @@ public: SubToolPanel (TreeNode* pParent); virtual ~SubToolPanel (void); - /** Add a control to the sub panel. - @param rTitle - The title that will be shown in the two title bars that - belong to the control. - @param nHelpId - The help id is set at the title bar not the actual control. - */ - void AddControl ( - ::std::auto_ptr pControl, - const String& rTitle, - ULONG nHelpId); - void AddControl (::std::auto_ptr pControl); - virtual void Paint (const Rectangle& rRect); /** Initiate a rearrangement of the controls and title bars. @@ -107,11 +94,6 @@ public: ::com::sun::star::accessibility::XAccessible>& rxParent); using Window::GetWindow; -protected: - /** Initiate a rearrangement of the controls. - */ - void ListHasChanged (void); - private: ::Window maWindowFiller; bool mbIsRearrangePending; diff --git a/sd/source/ui/inc/taskpane/TaskPaneTreeNode.hxx b/sd/source/ui/inc/taskpane/TaskPaneTreeNode.hxx index 250e73124854..cd55832ec4c2 100644 --- a/sd/source/ui/inc/taskpane/TaskPaneTreeNode.hxx +++ b/sd/source/ui/inc/taskpane/TaskPaneTreeNode.hxx @@ -69,15 +69,6 @@ public: TreeNode (TreeNode* pParent); virtual ~TreeNode (void); - /** Returns if the node has no children, i.e. is a leaf of a - tree. In this case mpControlContainer is NULL. - */ - bool IsLeaf (void); - - /** Returns true if the node has no parent, i.e. is the root of a tree. - */ - bool IsRoot (void); - void SetParentNode (TreeNode* pNewParent); TreeNode* GetParentNode (void); @@ -187,14 +178,6 @@ public: */ void AddStateChangeListener (const Link& rListener); - /** Remove the listener form the list of state change listeners. - @param rListener - It is OK to specify a listener that is not currently - registered. Only when the listener is registered it is - removed. Otherwise the call is ignored. - */ - void RemoveStateChangeListener (const Link& rListener); - /** Call the state change listeners and pass a state change event with the specified event id. The source field is set to this. @param pChild diff --git a/sd/source/ui/inc/taskpane/TitledControl.hxx b/sd/source/ui/inc/taskpane/TitledControl.hxx index a5a319ca5219..9dfc06e2df58 100644 --- a/sd/source/ui/inc/taskpane/TitledControl.hxx +++ b/sd/source/ui/inc/taskpane/TitledControl.hxx @@ -134,13 +134,6 @@ public: virtual void SetEnabledState(bool bFlag); - /** Ownership of the given data remains with the caller. The data - is thus not destroyed when the destructor of this class is - called. - */ - void SetUserData (void* pUserData); - void* GetUserData (void) const; - virtual bool IsShowing (void) const; virtual void Show (bool bVisible); diff --git a/sd/source/ui/inc/taskpane/ToolPanel.hxx b/sd/source/ui/inc/taskpane/ToolPanel.hxx index f2c573a21c06..c3b61a5d22de 100644 --- a/sd/source/ui/inc/taskpane/ToolPanel.hxx +++ b/sd/source/ui/inc/taskpane/ToolPanel.hxx @@ -101,11 +101,6 @@ public: using Window::GetWindow; -protected: - /** Initiate a rearrangement of the controls. - */ - void ListHasChanged (void); - private: TaskPaneViewShell& mrViewShell; diff --git a/sd/source/ui/inc/tools/PropertySet.hxx b/sd/source/ui/inc/tools/PropertySet.hxx index c74253092adf..998b4f0e2142 100644 --- a/sd/source/ui/inc/tools/PropertySet.hxx +++ b/sd/source/ui/inc/tools/PropertySet.hxx @@ -62,13 +62,6 @@ public: virtual void SAL_CALL disposing (void); - - /** Create an UnknownPropertyException, but do not yet throw it. This - method fills in the fields of the exception. - */ - css::beans::UnknownPropertyException CreateUnknownPropertyException ( - const rtl::OUString& rsPropertyName); - // XPropertySet virtual css::uno::Reference diff --git a/sd/source/ui/inc/tools/SdGlobalResourceContainer.hxx b/sd/source/ui/inc/tools/SdGlobalResourceContainer.hxx index d86ac3cf6433..d0661a61636b 100644 --- a/sd/source/ui/inc/tools/SdGlobalResourceContainer.hxx +++ b/sd/source/ui/inc/tools/SdGlobalResourceContainer.hxx @@ -92,17 +92,6 @@ public: */ void AddResource (const ::css::uno::Reference& rxResource); - /** Tell the container that it is not any longer responsible for the - specified resource. - @return - When the specified resource has previously added to the - container the resource is returned (which is, of course, the - same pointer as the given one.) Otherwise a NULL pointer is - returned. - */ - ::std::auto_ptr ReleaseResource ( - SdGlobalResource* pResource); - protected: friend class ::SdModule; friend class ::std::auto_ptr; diff --git a/sd/source/ui/inc/tools/SlotStateListener.hxx b/sd/source/ui/inc/tools/SlotStateListener.hxx index 418e4dbf1766..1f45aef331ab 100644 --- a/sd/source/ui/inc/tools/SlotStateListener.hxx +++ b/sd/source/ui/inc/tools/SlotStateListener.hxx @@ -57,13 +57,6 @@ class SlotStateListener public SlotStateListenerInterfaceBase { public: - /** Create a new object that has yet to be told about the the frame and - slots to listen to and the callback that state changes are relayed - to. When you want to listen to one single slot then you can use the - three argument variant of this constructor. - */ - SlotStateListener (void); - /** This convenience version of the constructor takes all parameters that are necessary to observe a single slot. See descriptions of the SetCallback(), ConnectToFrame(), and ObserveSlot() methods for @@ -105,14 +98,6 @@ public: */ void ObserveSlot (const ::rtl::OUString& rSlotName); - /** Return whether the called SlotStateListener is connected to a slot. - One reason for returning is that the SlotStateListener has - been created before the controller and frame have been properly - initialized. - */ - bool IsValid (void) const; - - //===== frame::XStatusListener ========================================== /** Called by slot state change broadcasters. In turn the callback is diff --git a/sd/source/ui/inc/tpaction.hxx b/sd/source/ui/inc/tpaction.hxx index d07f24a2dcc2..2ee8bbe6771a 100644 --- a/sd/source/ui/inc/tpaction.hxx +++ b/sd/source/ui/inc/tpaction.hxx @@ -114,7 +114,6 @@ private: void SetActualAnimationEffect( ::com::sun::star::presentation::AnimationEffect eAE ); void SetEditText( String const & rStr ); String GetEditText( BOOL bURL = FALSE ); - String GetMacroName( const String& rPath ); USHORT GetClickActionSdResId( ::com::sun::star::presentation::ClickAction eCA ); USHORT GetAnimationEffectSdResId( ::com::sun::star::presentation::AnimationEffect eAE ); @@ -123,7 +122,6 @@ public: ~SdTPAction(); static SfxTabPage* Create( Window*, const SfxItemSet& ); - static USHORT* GetRanges(); virtual BOOL FillItemSet( SfxItemSet& ); virtual void Reset( const SfxItemSet & ); diff --git a/sd/source/ui/inc/unoaprms.hxx b/sd/source/ui/inc/unoaprms.hxx index 9cc3555dce3b..a2a80963ad63 100644 --- a/sd/source/ui/inc/unoaprms.hxx +++ b/sd/source/ui/inc/unoaprms.hxx @@ -97,8 +97,6 @@ public: bInfoCreated (bCreated) {} - SdAnimationPrmsUndoAction( SdDrawDocument* pTheDoc, SdrObject* pObj ); - void SetActive(BOOL bTheOldActive, BOOL bTheNewActive) { bOldActive = bTheOldActive; bNewActive = bTheNewActive; } void SetEffect(::com::sun::star::presentation::AnimationEffect eTheOldEffect, ::com::sun::star::presentation::AnimationEffect eTheNewEffect) diff --git a/sd/source/ui/inc/unosrch.hxx b/sd/source/ui/inc/unosrch.hxx index e30605181c4c..b19f3751e836 100644 --- a/sd/source/ui/inc/unosrch.hxx +++ b/sd/source/ui/inc/unosrch.hxx @@ -58,9 +58,10 @@ protected: ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > GetCurrentShape() const throw(); public: - SdUnoSearchReplaceShape( ::com::sun::star::drawing::XDrawPage* xPage ) throw(); // danger, these c'tors are only usable if - SdUnoSearchReplaceShape( ::com::sun::star::drawing::XShape* xShape ) throw(); // the given shape or page is derived from - virtual ~SdUnoSearchReplaceShape() throw(); // this class!!! + // danger, this c'tor is only usable if the given shape or page is derived + // from this class!!! + SdUnoSearchReplaceShape( ::com::sun::star::drawing::XDrawPage* xPage ) throw(); + virtual ~SdUnoSearchReplaceShape() throw(); // XReplaceable virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XReplaceDescriptor > SAL_CALL createReplaceDescriptor( ) throw(::com::sun::star::uno::RuntimeException); diff --git a/sd/source/ui/inc/zoomlist.hxx b/sd/source/ui/inc/zoomlist.hxx index 1e31eaa598ac..6957bfed25ce 100644 --- a/sd/source/ui/inc/zoomlist.hxx +++ b/sd/source/ui/inc/zoomlist.hxx @@ -44,7 +44,6 @@ public: virtual ~ZoomList(); void InsertZoomRect(const Rectangle& rRect); - Rectangle GetCurrentZoomRect() const; Rectangle GetNextZoomRect(); Rectangle GetPreviousZoomRect(); BOOL IsNextPossible() const; diff --git a/sd/source/ui/presenter/PresenterCanvas.cxx b/sd/source/ui/presenter/PresenterCanvas.cxx index 8a87a10e43d0..a1f583a4e40c 100644 --- a/sd/source/ui/presenter/PresenterCanvas.cxx +++ b/sd/source/ui/presenter/PresenterCanvas.cxx @@ -908,22 +908,6 @@ css::rendering::ViewState PresenterCanvas::MergeViewState ( -Reference PresenterCanvas::GetSharedCanvas (void) const -{ - return mxSharedCanvas; -} - - - - -void PresenterCanvas::SetClip (const awt::Rectangle& rClipRectangle) -{ - maClipRectangle = rClipRectangle; -} - - - - awt::Point PresenterCanvas::GetOffset (const Reference& rxBaseWindow) { mbOffsetUpdatePending = false; diff --git a/sd/source/ui/presenter/PresenterTextView.cxx b/sd/source/ui/presenter/PresenterTextView.cxx index 3734f488d370..ba90a92939ca 100644 --- a/sd/source/ui/presenter/PresenterTextView.cxx +++ b/sd/source/ui/presenter/PresenterTextView.cxx @@ -113,7 +113,6 @@ public: void SetFontDescriptor (const awt::FontDescriptor& rFontDescriptor); sal_Int32 GetTop (void) const; void SetTop (const sal_Int32 nTop); - void ClearText (void); void SetText (const OUString& Text); sal_Int32 ParseDistance (const OUString& rsDistance) const; Reference GetBitmap (void); @@ -533,17 +532,6 @@ void PresenterTextView::Implementation::SetTop (const sal_Int32 nTop) -void PresenterTextView::Implementation::ClearText (void) -{ - DBG_ASSERT(mpEditEngine!=NULL, "EditEngine missing"); - msText = OUString(); - mnTotalHeight = 0; - mxBitmap = NULL; -} - - - - void PresenterTextView::Implementation::SetText (const OUString& rText) { DBG_ASSERT(mpEditEngine!=NULL, "EditEngine missing"); diff --git a/sd/source/ui/slideshow/slideshow.cxx b/sd/source/ui/slideshow/slideshow.cxx index c951f68d9b74..187d0d5ea715 100644 --- a/sd/source/ui/slideshow/slideshow.cxx +++ b/sd/source/ui/slideshow/slideshow.cxx @@ -947,13 +947,6 @@ sal_Int32 SlideShow::getCurrentPageNumber() // --------------------------------------------------------- -sal_Int32 SlideShow::getCurrentPageIndex() -{ - return mxController.is() ? mxController->getCurrentSlideIndex() : 0; -} - -// --------------------------------------------------------- - void SlideShow::jumpToBookmark( const OUString& sBookmark ) { if( mxController.is() ) diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx index d58cfcb3f6c9..c2adccc82a80 100644 --- a/sd/source/ui/slideshow/slideshowimpl.cxx +++ b/sd/source/ui/slideshow/slideshowimpl.cxx @@ -3724,14 +3724,7 @@ Reference< XSlideShow > SAL_CALL SlideshowImpl::getSlideShow() throw (RuntimeExc // -------------------------------------------------------------------- -PresentationSettingsEx::PresentationSettingsEx() -: mbRehearseTimings(sal_False) -, mbPreview(sal_False) -, mpParentWindow( 0 ) -{ -} - -PresentationSettingsEx::PresentationSettingsEx( PresentationSettingsEx& r ) +PresentationSettingsEx::PresentationSettingsEx( const PresentationSettingsEx& r ) : PresentationSettings( r ) , mbRehearseTimings(r.mbRehearseTimings) , mbPreview(r.mbPreview) diff --git a/sd/source/ui/slideshow/slideshowimpl.hxx b/sd/source/ui/slideshow/slideshowimpl.hxx index 48dca432671c..cb33c4a740c7 100644 --- a/sd/source/ui/slideshow/slideshowimpl.hxx +++ b/sd/source/ui/slideshow/slideshowimpl.hxx @@ -112,8 +112,7 @@ struct PresentationSettingsEx : public PresentationSettings css::uno::Reference< css::drawing::XDrawPage > mxStartPage; css::uno::Reference< css::animations::XAnimationNode > mxAnimationNode; - PresentationSettingsEx(); - PresentationSettingsEx( PresentationSettingsEx& ); + PresentationSettingsEx( const PresentationSettingsEx& ); PresentationSettingsEx( PresentationSettings& ); void SetArguments( const css::uno::Sequence< css::beans::PropertyValue >& rArguments ) throw (css::lang::IllegalArgumentException); diff --git a/sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx b/sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx index 47818b73d193..1bbecbef3d66 100644 --- a/sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx +++ b/sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx @@ -178,14 +178,6 @@ void BitmapCache::Clear (void) -bool BitmapCache::IsEmpty (void) const -{ - return mpBitmapContainer->empty(); -} - - - - bool BitmapCache::IsFull (void) const { return mbIsFull; @@ -261,21 +253,6 @@ bool BitmapCache::BitmapIsUpToDate (const CacheKey& rKey) -void BitmapCache::ReleaseBitmap (const CacheKey& rKey) -{ - ::osl::MutexGuard aGuard (maMutex); - - CacheBitmapContainer::iterator aIterator (mpBitmapContainer->find(rKey)); - if (aIterator != mpBitmapContainer->end()) - { - UpdateCacheSize(aIterator->second, REMOVE); - mpBitmapContainer->erase(aIterator); - } -} - - - - void BitmapCache::InvalidateBitmap (const CacheKey& rKey) { ::osl::MutexGuard aGuard (maMutex); @@ -348,20 +325,6 @@ void BitmapCache::SetBitmap ( -bool BitmapCache::IsPrecious (const CacheKey& rKey) -{ - ::osl::MutexGuard aGuard (maMutex); - - CacheBitmapContainer::iterator aIterator (mpBitmapContainer->find(rKey)); - if (aIterator != mpBitmapContainer->end()) - return aIterator->second.IsPrecious(); - else - return false; -} - - - - void BitmapCache::SetPrecious (const CacheKey& rKey, bool bIsPrecious) { ::osl::MutexGuard aGuard (maMutex); diff --git a/sd/source/ui/slidesorter/cache/SlsBitmapCache.hxx b/sd/source/ui/slidesorter/cache/SlsBitmapCache.hxx index d0f8766cabf5..2c33e042342f 100644 --- a/sd/source/ui/slidesorter/cache/SlsBitmapCache.hxx +++ b/sd/source/ui/slidesorter/cache/SlsBitmapCache.hxx @@ -81,10 +81,6 @@ public: */ void Clear (void); - /** Returns when there is no preview bitmap in the cache. - */ - bool IsEmpty (void) const; - /** Return when the cache is full, i.e. the cache compactor had to be run. */ @@ -108,11 +104,6 @@ public: */ ::boost::shared_ptr GetBitmap (const CacheKey& rKey); - /** Release the reference to the preview bitmap that is associated with - the given key. - */ - void ReleaseBitmap (const CacheKey& rKey); - /** Mark the specified preview bitmap as not being up-to-date anymore. */ void InvalidateBitmap (const CacheKey& rKey); @@ -128,11 +119,6 @@ public: const ::boost::shared_ptr& rpPreview, bool bIsPrecious); - /** Return whether the specified preview bitmap has been marked as - precious. - */ - bool IsPrecious (const CacheKey& rKey); - /** Mark the specified preview bitmap as precious, i.e. that it must not be compressed or otherwise removed from the cache. */ diff --git a/sd/source/ui/slidesorter/cache/SlsGenericPageCache.cxx b/sd/source/ui/slidesorter/cache/SlsGenericPageCache.cxx index 7658d1f3b663..780a429df29e 100644 --- a/sd/source/ui/slidesorter/cache/SlsGenericPageCache.cxx +++ b/sd/source/ui/slidesorter/cache/SlsGenericPageCache.cxx @@ -199,15 +199,6 @@ void GenericPageCache::RequestPreviewBitmap ( -void GenericPageCache::InvalidatePreviewBitmap (CacheKey aKey) -{ - if (mpBitmapCache.get() != NULL) - mpBitmapCache->InvalidateBitmap(mpCacheContext->GetPage(aKey)); -} - - - - void GenericPageCache::ReleasePreviewBitmap (CacheKey aKey) { if (mpBitmapCache.get() != NULL) @@ -294,17 +285,6 @@ void GenericPageCache::SetPreciousFlag (CacheKey aKey, bool bIsPrecious) -bool GenericPageCache::IsEmpty (void) const -{ - if (mpBitmapCache.get() != NULL) - return mpBitmapCache->IsEmpty(); - else - return true; -} - - - - void GenericPageCache::Pause (void) { ProvideCacheAndProcessor(); diff --git a/sd/source/ui/slidesorter/cache/SlsGenericPageCache.hxx b/sd/source/ui/slidesorter/cache/SlsGenericPageCache.hxx index e38745e2844f..89fc657004e8 100644 --- a/sd/source/ui/slidesorter/cache/SlsGenericPageCache.hxx +++ b/sd/source/ui/slidesorter/cache/SlsGenericPageCache.hxx @@ -99,12 +99,6 @@ public: const Size& rSize, bool bMayBeUpToDate = true); - /** Tell the cache to replace the bitmap associated with the given - request data with a new one that reflects recent changes in the - content of the page object. - */ - void InvalidatePreviewBitmap (CacheKey aKey); - /** Call this method when a view-object-contact object is being deleted and does not need (a) its current bitmap in the cache and (b) a requested a new bitmap. @@ -124,10 +118,6 @@ public: */ void SetPreciousFlag (CacheKey aKey, bool bIsPrecious); - /** Return when there is no preview bitmap in the cache. - */ - bool IsEmpty (void) const; - void Pause (void); void Resume (void); diff --git a/sd/source/ui/slidesorter/cache/SlsIdleDetector.cxx b/sd/source/ui/slidesorter/cache/SlsIdleDetector.cxx deleted file mode 100644 index 6df77bf52800..000000000000 --- a/sd/source/ui/slidesorter/cache/SlsIdleDetector.cxx +++ /dev/null @@ -1,66 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_sd.hxx" - -#include "precompiled_sd.hxx" - -#include "SlsIdleDetector.hxx" - -#include "view/SlideSorterView.hxx" -#include "tools/IdleDetection.hxx" -#include "Window.hxx" - -namespace sd { namespace slidesorter { namespace cache { - -IdleDetector::IdleDetector ( - const ::Window* pWindow, - const bool bIsSuspendPreviewUpdatesDuringFullScreenPresentation) - : mpWindow(pWindow), - mbIsSuspendPreviewUpdatesDuringFullScreenPresentation( - bIsSuspendPreviewUpdatesDuringFullScreenPresentation) -{ -} - - - - -bool IdleDetector::operator() (void) -{ - // Determine whether the system is idle. - sal_Int32 nIdleState (tools::IdleDetection::GetIdleState(mpWindow)); - if (nIdleState == tools::IdleDetection::IDET_IDLE) - return true; - else - return false; -} - - -} } } // end of namespace ::sd::slidesorter::cache - - - diff --git a/sd/source/ui/slidesorter/cache/SlsIdleDetector.hxx b/sd/source/ui/slidesorter/cache/SlsIdleDetector.hxx deleted file mode 100644 index a0ad5422496a..000000000000 --- a/sd/source/ui/slidesorter/cache/SlsIdleDetector.hxx +++ /dev/null @@ -1,51 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef SD_SLIDESORTER_IDLE_DETECTOR_HXX -#define SD_SLIDESORTER_IDLE_DETECTOR_HXX - -class Window; - -namespace sd { namespace slidesorter { namespace cache { - -class IdleDetector -{ -public: - IdleDetector (const ::Window* pWindow, const bool bIsSuspendPreviewUpdatesDuringFullScreenPresentation); - bool operator() (void); - -private: - const ::Window* mpWindow; - const bool mbIsSuspendPreviewUpdatesDuringFullScreenPresentation; -}; - - - - -} } } // end of namespace ::sd::slidesorter::cache - -#endif diff --git a/sd/source/ui/slidesorter/cache/SlsPageCache.cxx b/sd/source/ui/slidesorter/cache/SlsPageCache.cxx index 29b7cdb687d1..714e1f008329 100644 --- a/sd/source/ui/slidesorter/cache/SlsPageCache.cxx +++ b/sd/source/ui/slidesorter/cache/SlsPageCache.cxx @@ -29,7 +29,6 @@ #include "SlsGenericPageCache.hxx" #include "SlsRequestFactory.hxx" -#include "SlsIdleDetector.hxx" #include "cache/SlsPageCache.hxx" #include "model/SlideSorterModel.hxx" #include @@ -81,25 +80,6 @@ BitmapEx PageCache::GetPreviewBitmap ( -void PageCache::RequestPreviewBitmap ( - CacheKey aKey, - const Size& rSize) -{ - return mpImplementation->RequestPreviewBitmap(aKey, rSize); -} - - - - -void PageCache::InvalidatePreviewBitmap ( - CacheKey aKey) -{ - mpImplementation->InvalidatePreviewBitmap(aKey); -} - - - - void PageCache::ReleasePreviewBitmap ( CacheKey aKey) { diff --git a/sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx b/sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx index 86354c823b7e..bec9c7fa369d 100644 --- a/sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx +++ b/sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx @@ -30,7 +30,6 @@ #include "SlsQueueProcessor.hxx" #include "SlsCacheConfiguration.hxx" #include "SlsRequestQueue.hxx" -#include "SlsIdleDetector.hxx" namespace sd { namespace slidesorter { namespace cache { diff --git a/sd/source/ui/slidesorter/cache/makefile.mk b/sd/source/ui/slidesorter/cache/makefile.mk index d9766e892992..58862a28645a 100644 --- a/sd/source/ui/slidesorter/cache/makefile.mk +++ b/sd/source/ui/slidesorter/cache/makefile.mk @@ -49,7 +49,6 @@ SLOFILES = \ $(SLO)$/SlsCacheCompactor.obj \ $(SLO)$/SlsCacheConfiguration.obj \ $(SLO)$/SlsGenericPageCache.obj \ - $(SLO)$/SlsIdleDetector.obj \ $(SLO)$/SlsPageCache.obj \ $(SLO)$/SlsPageCacheManager.obj \ $(SLO)$/SlsQueueProcessor.obj \ diff --git a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx index d90f6f0f824f..69c2a02ddc24 100644 --- a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx +++ b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx @@ -210,14 +210,6 @@ SlideSorterController::~SlideSorterController (void) -SlideSorter& SlideSorterController::GetSlideSorter (void) const -{ - return mrSlideSorter; -} - - - - model::SharedPageDescriptor SlideSorterController::GetPageAt ( const Point& aPixelPosition) { @@ -229,23 +221,6 @@ model::SharedPageDescriptor SlideSorterController::GetPageAt ( return pDescriptorAtPoint; } - - - -model::SharedPageDescriptor SlideSorterController::GetFadePageAt ( - const Point& aPixelPosition) -{ - sal_Int32 nHitPageIndex (mrView.GetFadePageIndexAtPoint(aPixelPosition)); - model::SharedPageDescriptor pDescriptorAtPoint; - if (nHitPageIndex >= 0) - pDescriptorAtPoint = mrModel.GetPageDescriptor(nHitPageIndex); - - return pDescriptorAtPoint; -} - - - - PageSelector& SlideSorterController::GetPageSelector (void) { OSL_ASSERT(mpPageSelector.get()!=NULL); @@ -800,50 +775,6 @@ Rectangle SlideSorterController::Rearrange (bool bForce) -void SlideSorterController::SetZoom (long int nZoom) -{ - ::sd::Window* pWindow = mrSlideSorter.GetActiveWindow(); - long int nCurrentZoom ((long int)( - pWindow->GetMapMode().GetScaleX().operator double() * 100)); - - if (nZoom > nCurrentZoom) - { - Size aPageSize (mrView.GetPageBoundingBox( - 0, - view::SlideSorterView::CS_MODEL, - view::SlideSorterView::BBT_SHAPE).GetSize()); - Size aWindowSize (pWindow->PixelToLogic( - pWindow->GetOutputSizePixel())); - - // The zoom factor must not grow by more then the ratio of the - // widths of the output window and the page objects. - long nMaxFactor - = nCurrentZoom * aWindowSize.Width() / aPageSize.Width(); - // Apply rounding, so that a current zoom factor of 1 is still - // increased. - nMaxFactor = (nCurrentZoom * 18 + 5) / 10; - nZoom = Min(nMaxFactor, nZoom); - } - if (nZoom < 1) - nZoom = 1; - - mrView.LockRedraw (TRUE); - mrView.GetLayouter().SetZoom(nZoom/100.0, pWindow); - mrView.Layout(); - GetScrollBarManager().UpdateScrollBars (false); - mrView.GetPreviewCache()->InvalidateCache(); - mrView.RequestRepaint(); - mrView.LockRedraw (FALSE); - - /* - ViewShell::SetZoom (nZoom); - GetViewFrame()->GetBindings().Invalidate (SID_ATTR_ZOOM); - */ -} - - - - FunctionReference SlideSorterController::CreateSelectionFunction (SfxRequest& rRequest) { FunctionReference xFunc( SelectionFunction::Create(mrSlideSorter, rRequest) ); diff --git a/sd/source/ui/slidesorter/controller/SlsCurrentSlideManager.cxx b/sd/source/ui/slidesorter/controller/SlsCurrentSlideManager.cxx index 5fdee6400959..f5864c3307a1 100644 --- a/sd/source/ui/slidesorter/controller/SlsCurrentSlideManager.cxx +++ b/sd/source/ui/slidesorter/controller/SlsCurrentSlideManager.cxx @@ -253,19 +253,4 @@ void CurrentSlideManager::HandleModelChange (void) } } - - - -SdPage* GetCurrentSdPage (SlideSorter& rSlideSorter) -{ - SharedPageDescriptor pDescriptor ( - rSlideSorter.GetController().GetCurrentSlideManager()->GetCurrentSlide()); - if (pDescriptor.get() == NULL) - return NULL; - else - return pDescriptor->GetPage(); -} - - - } } } // end of namespace ::sd::slidesorter::controller diff --git a/sd/source/ui/slidesorter/controller/SlsPageSelector.cxx b/sd/source/ui/slidesorter/controller/SlsPageSelector.cxx index b50be47a0188..0e8f5e100d1c 100644 --- a/sd/source/ui/slidesorter/controller/SlsPageSelector.cxx +++ b/sd/source/ui/slidesorter/controller/SlsPageSelector.cxx @@ -177,17 +177,6 @@ void PageSelector::DeselectPage (int nPageIndex) -void PageSelector::DeselectPage (const SdPage* pPage) -{ - int nPageIndex = (pPage->GetPageNum()-1) / 2; - SharedPageDescriptor pDescriptor (mrModel.GetPageDescriptor(nPageIndex)); - if (pDescriptor.get()!=NULL && pDescriptor->GetPage()==pPage) - DeselectPage(pDescriptor); -} - - - - void PageSelector::DeselectPage (const SharedPageDescriptor& rpDescriptor) { if (rpDescriptor.get()!=NULL && rpDescriptor->Deselect()) diff --git a/sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx b/sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx index b928eeb9f4ce..5ee7f6f58b82 100644 --- a/sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx +++ b/sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx @@ -219,26 +219,6 @@ void ScrollBarManager::PlaceFiller (const Rectangle& aArea) -void ScrollBarManager::AdaptWindowSize (const Rectangle& rArea) -{ - Size aPixelContentSize (mpContentWindow->LogicToPixel( - mrSlideSorter.GetView().GetLayouter().GetPageBox ( - mrSlideSorter.GetModel().GetPageCount()).GetSize())); - int nHeightDifference = aPixelContentSize.Height() - rArea.GetHeight(); - ::Window* pParentWindow = mpContentWindow->GetParent(); - Size aNewWindowSize (pParentWindow->GetSizePixel()); - if (nHeightDifference != 0) - { - aNewWindowSize.Height() += nHeightDifference; - pParentWindow->SetPosSizePixel( - pParentWindow->GetPosPixel(), - aNewWindowSize); - } -} - - - - void ScrollBarManager::UpdateScrollBars (bool bResetThumbPosition, bool bUseScrolling) { Rectangle aModelArea (mrSlideSorter.GetView().GetModelArea()); diff --git a/sd/source/ui/slidesorter/controller/SlsSelectionCommand.cxx b/sd/source/ui/slidesorter/controller/SlsSelectionCommand.cxx index d24f8a347646..687019954feb 100644 --- a/sd/source/ui/slidesorter/controller/SlsSelectionCommand.cxx +++ b/sd/source/ui/slidesorter/controller/SlsSelectionCommand.cxx @@ -54,18 +54,6 @@ SelectionCommand::SelectionCommand ( -void SelectionCommand::AddSlides ( - const ::boost::shared_ptr& rpSelection) -{ - PageSelector::PageSelection::iterator iPage = rpSelection->begin(); - PageSelector::PageSelection::iterator iEnd = rpSelection->end(); - for (; iPage!=iEnd; ++iPage) - AddSlide(((*iPage)->GetPageNum()-1)/2); -} - - - - void SelectionCommand::AddSlide (USHORT nPageIndex) { maPagesToSelect.push_back(nPageIndex); @@ -74,14 +62,6 @@ void SelectionCommand::AddSlide (USHORT nPageIndex) -void SelectionCommand::SetCurrentSlide (USHORT nPageIndex) -{ - mnCurrentPageIndex = nPageIndex; -} - - - - void SelectionCommand::operator() (void) { OSL_ASSERT(mpCurrentSlideManager.get()!=NULL); diff --git a/sd/source/ui/slidesorter/controller/SlsSelectionCommand.hxx b/sd/source/ui/slidesorter/controller/SlsSelectionCommand.hxx index 88ce0ea29b75..7a9d0f27369e 100644 --- a/sd/source/ui/slidesorter/controller/SlsSelectionCommand.hxx +++ b/sd/source/ui/slidesorter/controller/SlsSelectionCommand.hxx @@ -64,24 +64,11 @@ public: const ::boost::shared_ptr& rpCurrentSlideManager, const model::SlideSorterModel& rModel); - /** Add the pages in the given list of selected pages to those that will - be selected when this command is executed, i.e. its operator() - method is called. - The first page will be set as current page when the new current page - has not been specified previously. - */ - void AddSlides (const ::boost::shared_ptr& rpSelection); - /** Remember the specified page to be selected when this command is executed. */ void AddSlide (USHORT nPageIndex); - /** Call this method to explicitly set the page that will be made the - current page when this command is executed. - */ - void SetCurrentSlide (USHORT nPageIndex); - /** Execute the command and select the pages added by previous calls to AddPages() and AddPage(). */ diff --git a/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx b/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx index 710e7c2eb02d..c1d742ce7158 100644 --- a/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx +++ b/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx @@ -47,7 +47,6 @@ #include "view/SlsLayouter.hxx" #include "view/SlsPageObjectViewObjectContact.hxx" #include "framework/FrameworkHelper.hxx" -#include "showview.hxx" #include "ViewShellBase.hxx" #include "DrawController.hxx" #include @@ -136,26 +135,6 @@ private: }; -class SelectionFunction::InsertionIndicatorHandler -{ -public: - InsertionIndicatorHandler (SlideSorter& rSlideSorter); - ~InsertionIndicatorHandler (void); - - /** Show the insertion marker at the given coordinates. - */ - void Start (const Point& rMouseModelPosition); - - void UpdatePosition (const Point& rMouseModelPosition); - - /** Hide the insertion marker. - */ - void End (void); - -private: - SlideSorter& mrSlideSorter; -}; - class SelectionFunction::EventDescriptor { public: @@ -188,8 +167,7 @@ SelectionFunction::SelectionFunction ( mbDragSelection(false), maInsertionMarkerBox(), mbProcessingMouseButtonDown(false), - mpSubstitutionHandler(new SubstitutionHandler(mrSlideSorter)), - mpInsertionIndicatorHandler(new InsertionIndicatorHandler(mrSlideSorter)) + mpSubstitutionHandler(new SubstitutionHandler(mrSlideSorter)) { //af aDelayToScrollTimer.SetTimeout(50); aDragTimer.SetTimeoutHdl( LINK( this, SelectionFunction, DragSlideHdl ) ); @@ -710,20 +688,6 @@ void SelectionFunction::GotoNextPage (int nOffset) -void SelectionFunction::ClearOverlays (void) -{ - view::ViewOverlay& rOverlay (mrSlideSorter.GetView().GetOverlay()); - - rOverlay.GetSubstitutionOverlay().setVisible(false); - rOverlay.GetSubstitutionOverlay().Clear(); - - mpInsertionIndicatorHandler->End(); - rOverlay.GetMouseOverIndicatorOverlay().SetSlideUnderMouse(model::SharedPageDescriptor()); -} - - - - void SelectionFunction::ProcessMouseEvent (sal_uInt32 nEventType, const MouseEvent& rEvent) { // #95491# remember button state for creation of own MouseEvents @@ -1350,55 +1314,4 @@ bool SelectionFunction::SubstitutionHandler::IsSubstitutionInsertionNonTrivial ( return bIsNonTrivial; } - - - -//===== InsertionIndicatorHandler ============================================= - -SelectionFunction::InsertionIndicatorHandler::InsertionIndicatorHandler ( - SlideSorter& rSlideSorter) - : mrSlideSorter(rSlideSorter) -{ -} - - - - -SelectionFunction::InsertionIndicatorHandler::~InsertionIndicatorHandler (void) -{ -} - - - - -void SelectionFunction::InsertionIndicatorHandler::Start (const Point& rMouseModelPosition) -{ - if (mrSlideSorter.GetController().GetProperties()->IsUIReadOnly()) - return; - - view::ViewOverlay& rOverlay (mrSlideSorter.GetView().GetOverlay()); - rOverlay.GetInsertionIndicatorOverlay().SetPosition(rMouseModelPosition); - rOverlay.GetInsertionIndicatorOverlay().setVisible(true); -} - - - - -void SelectionFunction::InsertionIndicatorHandler::UpdatePosition (const Point& rMouseModelPosition) -{ - if (mrSlideSorter.GetController().GetProperties()->IsUIReadOnly()) - return; - - view::ViewOverlay& rOverlay (mrSlideSorter.GetView().GetOverlay()); - rOverlay.GetInsertionIndicatorOverlay().SetPosition(rMouseModelPosition); -} - - - - -void SelectionFunction::InsertionIndicatorHandler::End (void) -{ - mrSlideSorter.GetView().GetOverlay().GetInsertionIndicatorOverlay().setVisible(false); -} - } } } // end of namespace ::sd::slidesorter::controller diff --git a/sd/source/ui/slidesorter/controller/SlsSlideFunction.cxx b/sd/source/ui/slidesorter/controller/SlsSlideFunction.cxx index 1b70cb1e154e..7fe090ad5541 100644 --- a/sd/source/ui/slidesorter/controller/SlsSlideFunction.cxx +++ b/sd/source/ui/slidesorter/controller/SlsSlideFunction.cxx @@ -53,12 +53,6 @@ SlideFunction::SlideFunction ( { } -FunctionReference SlideFunction::Create( SlideSorter& rSlideSorter, SfxRequest& rRequest ) -{ - FunctionReference xFunc( new SlideFunction( rSlideSorter, rRequest ) ); - return xFunc; -} - void SlideFunction::ScrollStart (void) { } diff --git a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx index 126a599c21d3..e07e2d2cccaf 100644 --- a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx +++ b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx @@ -483,68 +483,6 @@ void SlotManager::GetAttrState (SfxItemSet& rSet) } } - - - -void SlotManager::GetCtrlState (SfxItemSet& rSet) -{ - if (rSet.GetItemState(SID_RELOAD) != SFX_ITEM_UNKNOWN) - { - // "Letzte Version" vom SFx en/disablen lassen - ViewShell* pShell = mrSlideSorter.GetViewShell(); - if (pShell != NULL) - { - SfxViewFrame* pSlideViewFrame = pShell->GetViewFrame(); - DBG_ASSERT(pSlideViewFrame!=NULL, - "SlideSorterController::GetCtrlState: ViewFrame not found"); - pSlideViewFrame->GetSlotState (SID_RELOAD, NULL, &rSet); - } - } - - // Output quality. - if (rSet.GetItemState(SID_OUTPUT_QUALITY_COLOR)==SFX_ITEM_AVAILABLE - ||rSet.GetItemState(SID_OUTPUT_QUALITY_GRAYSCALE)==SFX_ITEM_AVAILABLE - ||rSet.GetItemState(SID_OUTPUT_QUALITY_BLACKWHITE)==SFX_ITEM_AVAILABLE - ||rSet.GetItemState(SID_OUTPUT_QUALITY_CONTRAST)==SFX_ITEM_AVAILABLE) - { - ULONG nMode = mrSlideSorter.GetView().GetWindow()->GetDrawMode(); - UINT16 nQuality = 0; - - switch (nMode) - { - case ::sd::ViewShell::OUTPUT_DRAWMODE_COLOR: - nQuality = 0; - break; - case ::sd::ViewShell::OUTPUT_DRAWMODE_GRAYSCALE: - nQuality = 1; - break; - case ::sd::ViewShell::OUTPUT_DRAWMODE_BLACKWHITE: - nQuality = 2; - break; - case ::sd::ViewShell::OUTPUT_DRAWMODE_CONTRAST: - nQuality = 3; - break; - } - - rSet.Put (SfxBoolItem (SID_OUTPUT_QUALITY_COLOR, - (BOOL)(nQuality==0))); - rSet.Put (SfxBoolItem (SID_OUTPUT_QUALITY_GRAYSCALE, - (BOOL)(nQuality==1))); - rSet.Put (SfxBoolItem (SID_OUTPUT_QUALITY_BLACKWHITE, - (BOOL)(nQuality==2))); - rSet.Put (SfxBoolItem (SID_OUTPUT_QUALITY_CONTRAST, - (BOOL)(nQuality==3))); - } - - if (rSet.GetItemState(SID_MAIL_SCROLLBODY_PAGEDOWN) == SFX_ITEM_AVAILABLE) - { - rSet.Put (SfxBoolItem( SID_MAIL_SCROLLBODY_PAGEDOWN, TRUE)); - } -} - - - - void SlotManager::GetMenuState ( SfxItemSet& rSet) { EditMode eEditMode = mrSlideSorter.GetModel().GetEditMode(); @@ -1160,38 +1098,6 @@ void SlotManager::InsertSlide (SfxRequest& rRequest) mrSlideSorter.GetView().LockRedraw(FALSE); } - - - -void SlotManager::AssignTransitionEffect (void) -{ - model::SlideSorterModel& rModel (mrSlideSorter.GetModel()); - - // We have to manually select the pages in the document that are - // selected in the slide sorter. - rModel.SynchronizeDocumentSelection(); - - // #i34011#: Needs review, AF's bugfix is removed here - //rShell.AssignFromSlideChangeWindow(rModel.GetEditMode()); - - // We have to remove the selection of master pages to not confuse the - // model. - if (rModel.GetEditMode() == EM_MASTERPAGE) - { - SdDrawDocument* pDocument = mrSlideSorter.GetModel().GetDocument(); - USHORT nMasterPageCount = pDocument->GetMasterSdPageCount(PK_STANDARD); - for (USHORT nIndex=0; nIndexGetMasterSdPage(nIndex, PK_STANDARD); - if (pPage != NULL) - pPage->SetSelected (FALSE); - } - } -} - - - - void SlotManager::ExecuteCommandAsynchronously (::std::auto_ptr pCommand) { // Ownership of command is (implicitely) transferred to the queue. diff --git a/sd/source/ui/slidesorter/inc/cache/SlsPageCache.hxx b/sd/source/ui/slidesorter/inc/cache/SlsPageCache.hxx index 9a3256a07d86..4a5c2b51ac28 100644 --- a/sd/source/ui/slidesorter/inc/cache/SlsPageCache.hxx +++ b/sd/source/ui/slidesorter/inc/cache/SlsPageCache.hxx @@ -68,18 +68,11 @@ class RequestData; bitmaps and throw.

-

There are three somewhat similar methods for requesting new previews: - a) GetPreviewBitmap() schedules a re-rendering (when necessary) and +

There is another somewhat similar methods for requesting new previews: + GetPreviewBitmap() schedules a re-rendering (when necessary) and returns the preview what is currently available, either as a preview of the preview or, when nothing has changed since the last call, as the final thing. - b) RequestPreviewBitmap() schedules, like GetPreviewBitmap(), a - re-rendering when the currently available preview is not up-to-date. It - does not, however, return anything. Use this if you can wait for the - preview. - c) InvalidatePreviewBitmap() does not schedule a re-rendering, but - remembers that one is necessary when one of the other two methods is - called.

*/ class PageCache @@ -120,24 +113,6 @@ public: CacheKey aKey, const Size& rSize); - /** When the requested preview bitmap does not yet exist or is not - up-to-date then the rendering of one is scheduled. Otherwise this - method does nothing. - */ - void RequestPreviewBitmap ( - CacheKey aKey, - const Size& rSize); - - /** Tell the cache that the bitmap associated with the given request - data is not up-to-date anymore. Unlike the RequestPreviewBitmap() - method this does not trigger the rendering itself. It just - remembers to render it when the preview is requested the next time. - @param rRequestData - It is safe to pass a (barly) living object. It will called only - once to obtain its page object. - */ - void InvalidatePreviewBitmap (CacheKey aKey); - /** Call this method when a view-object-contact object is being deleted and does not need (a) its current bitmap in the cache and (b) a requested new bitmap. diff --git a/sd/source/ui/slidesorter/inc/controller/SlideSorterController.hxx b/sd/source/ui/slidesorter/inc/controller/SlideSorterController.hxx index af90b60932b9..667aa768ee8f 100644 --- a/sd/source/ui/slidesorter/inc/controller/SlideSorterController.hxx +++ b/sd/source/ui/slidesorter/inc/controller/SlideSorterController.hxx @@ -105,8 +105,6 @@ public: */ Rectangle Rearrange (bool bForce = false); - SlideSorter& GetSlideSorter (void) const; - /** Return the descriptor of the page that is rendered under the given position. @return @@ -116,14 +114,6 @@ public: */ model::SharedPageDescriptor GetPageAt (const Point& rPixelPosition); - /** Return the descriptor of the page that is associated to the page - visible fade symbol at the given position. - @return - When the given position is not over a visible page fade symbol - then NULL is returned. - */ - model::SharedPageDescriptor GetFadePageAt (const Point& rPixelPosition); - PageSelector& GetPageSelector (void); FocusManager& GetFocusManager (void); controller::Clipboard& GetClipboard (void); @@ -189,14 +179,6 @@ public: */ void UpdateAllPages (void); - /** Set the zoom factor. The given value is clipped against an upper - bound. - @param nZoom - An integer percent value, i.e. nZoom/100 is the actual zoom - factor. - */ - void SetZoom (long int nZoom); - /** This factory method creates a selection function. */ virtual FunctionReference CreateSelectionFunction (SfxRequest& rRequest); diff --git a/sd/source/ui/slidesorter/inc/controller/SlsPageSelector.hxx b/sd/source/ui/slidesorter/inc/controller/SlsPageSelector.hxx index 24420160b8cd..57aaf9293301 100644 --- a/sd/source/ui/slidesorter/inc/controller/SlsPageSelector.hxx +++ b/sd/source/ui/slidesorter/inc/controller/SlsPageSelector.hxx @@ -91,7 +91,6 @@ public: /** Deselect the descriptor that is associated with the given page. */ void DeselectPage (int nPageIndex); - void DeselectPage (const SdPage* pPage); void DeselectPage (const model::SharedPageDescriptor& rpDescriptor); /** This convenience method returns the same number of pages that diff --git a/sd/source/ui/slidesorter/inc/controller/SlsScrollBarManager.hxx b/sd/source/ui/slidesorter/inc/controller/SlsScrollBarManager.hxx index 9d4c5a9329e2..c93ed7708650 100644 --- a/sd/source/ui/slidesorter/inc/controller/SlsScrollBarManager.hxx +++ b/sd/source/ui/slidesorter/inc/controller/SlsScrollBarManager.hxx @@ -242,13 +242,6 @@ private: void PlaceHorizontalScrollBar (const Rectangle& aArea); void PlaceVerticalScrollBar (const Rectangle& aArea); void PlaceFiller (const Rectangle& aArea); - - /** Make the height of the content window larger or smaller, so that the - - content size fits exactly in. This is achieved by changing the size - of the parent window and rely on the resulting resize. - */ - void AdaptWindowSize (const Rectangle& rArea); }; } } } // end of namespace ::sd::slidesorter::controller diff --git a/sd/source/ui/slidesorter/inc/controller/SlsSelectionFunction.hxx b/sd/source/ui/slidesorter/inc/controller/SlsSelectionFunction.hxx index ef2bcd7b5617..79b8a1ff5d44 100644 --- a/sd/source/ui/slidesorter/inc/controller/SlsSelectionFunction.hxx +++ b/sd/source/ui/slidesorter/inc/controller/SlsSelectionFunction.hxx @@ -99,7 +99,6 @@ protected: private: class SubstitutionHandler; class EventDescriptor; - class InsertionIndicatorHandler; /// Set in MouseButtonDown this flag indicates that a page has been hit. bool mbPageHit; @@ -121,8 +120,6 @@ private: ::std::auto_ptr mpSubstitutionHandler; - ::std::auto_ptr mpInsertionIndicatorHandler; - DECL_LINK( DragSlideHdl, Timer* ); void StartDrag (void); @@ -182,11 +179,6 @@ private: */ void ProcessRectangleSelection (bool bToggleSelection); - /** Hide and clear the insertion indiciator, substitution display and - selection rectangle. - */ - void ClearOverlays (void); - /** Compute a numerical code that describes a mouse event and that can be used for fast look up of the appropriate reaction. */ diff --git a/sd/source/ui/slidesorter/inc/controller/SlsSlideFunction.hxx b/sd/source/ui/slidesorter/inc/controller/SlsSlideFunction.hxx index 843e6e82b45c..5b8c7d9a08b6 100644 --- a/sd/source/ui/slidesorter/inc/controller/SlsSlideFunction.hxx +++ b/sd/source/ui/slidesorter/inc/controller/SlsSlideFunction.hxx @@ -50,8 +50,6 @@ class SlideFunction public: TYPEINFO(); - static FunctionReference Create( SlideSorter& rSlideSorter, SfxRequest& rRequest ); - virtual BOOL MouseMove (const MouseEvent& rMEvt); virtual BOOL MouseButtonUp (const MouseEvent& rMEvt); virtual BOOL MouseButtonDown (const MouseEvent& rMEvt); diff --git a/sd/source/ui/slidesorter/inc/controller/SlsSlotManager.hxx b/sd/source/ui/slidesorter/inc/controller/SlsSlotManager.hxx index d7b7a0e06831..0e58d5d3b411 100644 --- a/sd/source/ui/slidesorter/inc/controller/SlsSlotManager.hxx +++ b/sd/source/ui/slidesorter/inc/controller/SlsSlotManager.hxx @@ -63,7 +63,6 @@ public: void FuTemporary (SfxRequest& rRequest); void FuPermanent (SfxRequest& rRequest); void FuSupport (SfxRequest& rRequest); - void GetCtrlState (SfxItemSet &rSet); void GetMenuState (SfxItemSet &rSet); void GetClipboardState (SfxItemSet &rSet); void GetStatusBarState (SfxItemSet& rSet); @@ -94,8 +93,6 @@ private: */ void InsertSlide (SfxRequest& rRequest); - void AssignTransitionEffect (void); - DECL_LINK(UserEventCallback, void*); }; diff --git a/sd/source/ui/slidesorter/inc/model/SlideSorterModel.hxx b/sd/source/ui/slidesorter/inc/model/SlideSorterModel.hxx index 42bc6c2140f7..4ade19087304 100644 --- a/sd/source/ui/slidesorter/inc/model/SlideSorterModel.hxx +++ b/sd/source/ui/slidesorter/inc/model/SlideSorterModel.hxx @@ -83,9 +83,6 @@ public: */ bool SetEditMode (EditMode eEditMode); - /** Set the edit mode to that currently used by the controller. - */ - bool SetEditModeFromController (void); EditMode GetEditMode (void) const; PageKind GetPageType (void) const; @@ -147,10 +144,6 @@ public: */ void SynchronizeDocumentSelection (void); - /** Set the selection of the called model to exactly that of the document. - */ - void SynchronizeModelSelection (void); - /** Replace the factory for the creation of the page objects and contacts with the given object. The old factory is destroyed. */ diff --git a/sd/source/ui/slidesorter/inc/model/SlsPageDescriptor.hxx b/sd/source/ui/slidesorter/inc/model/SlsPageDescriptor.hxx index 0854ad5e678a..81877ce7465c 100644 --- a/sd/source/ui/slidesorter/inc/model/SlsPageDescriptor.hxx +++ b/sd/source/ui/slidesorter/inc/model/SlsPageDescriptor.hxx @@ -100,13 +100,6 @@ public: */ css::uno::Reference GetXDrawPage (void) const; - /** Returns the index of the page as it is displayed in the view as page - number. The value may differ from the index returned by the - XDrawPage when there are hidden slides and the XIndexAccess used to - access the model filters them out. - */ - sal_Int32 GetPageIndex (void) const; - /** Return the page shape that is used for visualizing the page. */ view::PageObject* GetPageObject (void); @@ -176,10 +169,6 @@ public: void SetPageNumberAreaModelSize (const Size& rSize); Size GetPageNumberAreaModelSize (void) const; - /** Returns when the slide is the current slide. - */ - bool IsCurrentPage (void) const; - /** Set or revoke the state of this slide being the current slide. */ void SetIsCurrentPage (const bool bIsCurrent); diff --git a/sd/source/ui/slidesorter/inc/view/SlideSorterView.hxx b/sd/source/ui/slidesorter/inc/view/SlideSorterView.hxx index d5c8dd4bf241..6c16a154ecfd 100644 --- a/sd/source/ui/slidesorter/inc/view/SlideSorterView.hxx +++ b/sd/source/ui/slidesorter/inc/view/SlideSorterView.hxx @@ -134,7 +134,6 @@ public: given position. */ sal_Int32 GetPageIndexAtPoint (const Point& rPosition) const; - sal_Int32 GetFadePageIndexAtPoint (const Point& rPosition) const; view::Layouter& GetLayouter (void); @@ -206,8 +205,6 @@ public: */ void SetSelectionRectangleVisibility (bool bVisible); - ::sdr::contact::ObjectContact& GetObjectContact (void) const; - typedef ::std::pair PageRange; /** Return the range of currently visible page objects including the first and last one in that range. @@ -217,16 +214,6 @@ public: */ PageRange GetVisiblePageRange (void); - /** Return the size of the area where the page numbers are displayed. - @return - The returned size is given in model coordinates. - */ - Size GetPageNumberAreaModelSize (void) const; - - /** Return the size of the border around the original SdrPageObj. - */ - SvBorder GetModelBorder (void) const; - /** Add a shape to the page. Typically used from inside PostModelChange(). */ diff --git a/sd/source/ui/slidesorter/inc/view/SlsLayouter.hxx b/sd/source/ui/slidesorter/inc/view/SlsLayouter.hxx index 246dcbc05ee7..9b1fd996e9c0 100644 --- a/sd/source/ui/slidesorter/inc/view/SlsLayouter.hxx +++ b/sd/source/ui/slidesorter/inc/view/SlsLayouter.hxx @@ -69,14 +69,6 @@ public: Layouter (void); ~Layouter (void); - /** Set the minimal, the maximal, and the desired width of the page - objects. The three parameters have to fullfill the constraint - nMinimalWidth <= nPreferredWidth <= nMaximalWidth or the call is - ignored. - */ - void SetObjectWidth (sal_Int32 nMinimalWidth, sal_Int32 nMaximalWidth, - sal_Int32 nPreferredWidth); - /** Set the horizontal and vertical borders in pixel coordinates between the enclosing window and page objects. The borders may be painted larger then the given values when the space for the insertion marker @@ -114,13 +106,6 @@ public: void SetPageBorders (sal_Int32 nLeftBorder, sal_Int32 nRightBorder, sal_Int32 nTopBorder, sal_Int32 nBottomBorder); - /** Set the horizontal and vertical gaps between adjacent page objects. - These gaps are only relevant when there is more than one column or - more than one row. Negative values indicate that the respective gap - is not set. - */ - void SetGaps (sal_Int32 nHorizontalGap, sal_Int32 nVerticalGap); - /** Set the interval of valid column counts. When nMinimalColumnCount <= nMaximalColumnCount is not fullfilled then the call is ignored. @param nMinimalColumnCount @@ -160,19 +145,12 @@ public: /** Change the zoom factor. This does not change the general layout (number of columns). */ - void SetZoom (double nZoomFactor, OutputDevice* pDevice); void SetZoom (Fraction nZoomFactor, OutputDevice* pDevice); /** Return the number of columns. */ sal_Int32 GetColumnCount (void) const; - /** Returns whether the column count is fixed () or variable - (). It is fixed if SetColumnCount() was called with the - same value for minimal and maximal column count. - */ - bool IsColumnCountFixed (void) const; - /** Return the scale factor that can be set at the map mode of the output window. */ @@ -289,7 +267,6 @@ public: const DoublePoint&rLayouterPoint) const; typedef ::std::vector BackgroundRectangleList; - const BackgroundRectangleList& GetBackgroundRectangleList (void) const; private: class ScreenAndModelValue {public: diff --git a/sd/source/ui/slidesorter/inc/view/SlsPageObjectViewContact.hxx b/sd/source/ui/slidesorter/inc/view/SlsPageObjectViewContact.hxx index c0083ff92d73..31899d3b3e44 100644 --- a/sd/source/ui/slidesorter/inc/view/SlsPageObjectViewContact.hxx +++ b/sd/source/ui/slidesorter/inc/view/SlsPageObjectViewContact.hxx @@ -69,8 +69,6 @@ public: SdrPageObj& GetPageObject (void) const; - Rectangle GetPageObjectBoundingBox (void) const; - virtual void ActionChanged (void); protected: diff --git a/sd/source/ui/slidesorter/model/SlideSorterModel.cxx b/sd/source/ui/slidesorter/model/SlideSorterModel.cxx index be298856c066..5ba5344f137a 100644 --- a/sd/source/ui/slidesorter/model/SlideSorterModel.cxx +++ b/sd/source/ui/slidesorter/model/SlideSorterModel.cxx @@ -119,30 +119,6 @@ bool SlideSorterModel::SetEditMode (EditMode eEditMode) -bool SlideSorterModel::SetEditModeFromController (void) -{ - bool bIsMasterPageMode = false; - // Get the edit mode from the controller. - try - { - Reference xSet (mrSlideSorter.GetXController(), UNO_QUERY_THROW); - Any aValue (xSet->getPropertyValue( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsMasterPageMode")))); - aValue >>= bIsMasterPageMode; - } - catch (RuntimeException&) - { - // When the property is not supported then the master - // page mode is not supported, too. - bIsMasterPageMode = false; - } - - return SetEditMode(bIsMasterPageMode ? EM_MASTERPAGE : EM_PAGE); -} - - - - EditMode SlideSorterModel::GetEditMode (void) const { return meEditMode; @@ -313,27 +289,6 @@ void SlideSorterModel::SynchronizeDocumentSelection (void) } } - - - -void SlideSorterModel::SynchronizeModelSelection (void) -{ - ::osl::MutexGuard aGuard (maMutex); - - PageEnumeration aAllPages (PageEnumerationProvider::CreateAllPagesEnumeration(*this)); - while (aAllPages.HasMoreElements()) - { - SharedPageDescriptor pDescriptor (aAllPages.GetNextElement()); - if (pDescriptor->GetPage()->IsSelected()) - pDescriptor->Select (); - else - pDescriptor->Deselect (); - } -} - - - - void SlideSorterModel::SetPageObjectFactory( ::std::auto_ptr pPageObjectFactory) { diff --git a/sd/source/ui/slidesorter/model/SlsPageDescriptor.cxx b/sd/source/ui/slidesorter/model/SlsPageDescriptor.cxx index 2010d313c9dd..ffd93cbf0a13 100644 --- a/sd/source/ui/slidesorter/model/SlsPageDescriptor.cxx +++ b/sd/source/ui/slidesorter/model/SlsPageDescriptor.cxx @@ -92,14 +92,6 @@ Reference PageDescriptor::GetXDrawPage (void) const -sal_Int32 PageDescriptor::GetPageIndex (void) const -{ - return mnIndex; -} - - - - view::PageObject* PageDescriptor::GetPageObject (void) { if (mpPageObject==NULL && mpPageObjectFactory!=NULL && mpPage != NULL) @@ -279,14 +271,6 @@ Size PageDescriptor::GetPageNumberAreaModelSize (void) const -bool PageDescriptor::IsCurrentPage (void) const -{ - return mbIsCurrent; -} - - - - void PageDescriptor::SetIsCurrentPage (const bool bIsCurrent) { mbIsCurrent = bIsCurrent; diff --git a/sd/source/ui/slidesorter/shell/SlideSorterService.cxx b/sd/source/ui/slidesorter/shell/SlideSorterService.cxx index db5d948b52fc..787086b4596e 100644 --- a/sd/source/ui/slidesorter/shell/SlideSorterService.cxx +++ b/sd/source/ui/slidesorter/shell/SlideSorterService.cxx @@ -631,18 +631,6 @@ void SlideSorterService::Resize (void) -void SlideSorterService::Rearrange (void) -{ - if (mxParentWindow.is()) - { - awt::Rectangle aWindowBox = mxParentWindow->getPosSize(); - mpSlideSorter->GetController().Rearrange(); - } -} - - - - void SlideSorterService::ThrowIfDisposed (void) throw (::com::sun::star::lang::DisposedException) { diff --git a/sd/source/ui/slidesorter/shell/SlideSorterService.hxx b/sd/source/ui/slidesorter/shell/SlideSorterService.hxx index a502442ab9f2..9af239c64fd1 100644 --- a/sd/source/ui/slidesorter/shell/SlideSorterService.hxx +++ b/sd/source/ui/slidesorter/shell/SlideSorterService.hxx @@ -204,7 +204,6 @@ private: ::boost::scoped_ptr mpPropertyArrayHelper; void Resize (void); - void Rearrange (void); /** This method throws a DisposedException when the object has already been disposed. diff --git a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx index 83475948fab2..86ec4002cd02 100644 --- a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx +++ b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx @@ -327,22 +327,6 @@ SfxUndoManager* SlideSorterViewShell::ImpGetUndoManager (void) const -SfxShell* SlideSorterViewShell::CreateInstance ( - sal_Int32, - SfxShell*, - void* pUserData, - ViewShellBase& rBase) -{ - return new SlideSorterViewShell ( - rBase.GetViewFrame(), - rBase, - static_cast< ::Window*>(pUserData), - NULL); -} - - - - void SlideSorterViewShell::GetFocus (void) { OSL_ASSERT(mpSlideSorter.get()!=NULL); diff --git a/sd/source/ui/slidesorter/view/SlideSorterView.cxx b/sd/source/ui/slidesorter/view/SlideSorterView.cxx index 82aac5b2cd9e..47ce907be637 100644 --- a/sd/source/ui/slidesorter/view/SlideSorterView.cxx +++ b/sd/source/ui/slidesorter/view/SlideSorterView.cxx @@ -171,52 +171,6 @@ sal_Int32 SlideSorterView::GetPageIndexAtPoint (const Point& rPosition) const -sal_Int32 SlideSorterView::GetFadePageIndexAtPoint ( - const Point& rPosition) const -{ - sal_Int32 nIndex (-1); - - ::sd::Window* pWindow = GetWindow(); - if (pWindow != NULL) - { - Point aModelPosition (pWindow->PixelToLogic (rPosition)); - nIndex = mpLayouter->GetIndexAtPoint( - aModelPosition, - true // Include page borders into hit test - ); - - // Clip the page index against the page count. - if (nIndex >= mrModel.GetPageCount()) - nIndex = -1; - - if (nIndex >= 0) - { - // Now test whether the given position is inside the area of the - // fade effect indicator. - view::PageObjectViewObjectContact* pContact - = mrModel.GetPageDescriptor(nIndex)->GetViewObjectContact(); - if (pContact != NULL) - { - if ( ! pContact->GetBoundingBox( - *pWindow, - PageObjectViewObjectContact::FadeEffectIndicatorBoundingBox, - PageObjectViewObjectContact::ModelCoordinateSystem).IsInside ( - aModelPosition)) - { - nIndex = -1; - } - } - else - nIndex = -1; - } - } - - return nIndex; -} - - - - Layouter& SlideSorterView::GetLayouter (void) { return *mpLayouter.get(); @@ -725,14 +679,6 @@ ViewOverlay& SlideSorterView::GetOverlay (void) -::sdr::contact::ObjectContact& SlideSorterView::GetObjectContact (void) const -{ - return GetSdrPageView()->GetPageWindow(0)->GetObjectContact(); -} - - - - SlideSorterView::PageRange SlideSorterView::GetVisiblePageRange (void) { const int nMaxPageIndex (mrModel.GetPageCount() - 1); @@ -821,22 +767,6 @@ void SlideSorterView::UpdatePageBorders (void) -Size SlideSorterView::GetPageNumberAreaModelSize (void) const -{ - return maPageNumberAreaModelSize; -} - - - - -SvBorder SlideSorterView::GetModelBorder (void) const -{ - return maModelBorder; -} - - - - void SlideSorterView::AddSdrObject (SdrObject& rObject) { mpPage->InsertObject(&rObject); diff --git a/sd/source/ui/slidesorter/view/SlsLayouter.cxx b/sd/source/ui/slidesorter/view/SlsLayouter.cxx index 1ba44caa24b0..3767a655c48b 100644 --- a/sd/source/ui/slidesorter/view/SlsLayouter.cxx +++ b/sd/source/ui/slidesorter/view/SlsLayouter.cxx @@ -71,22 +71,6 @@ Layouter::~Layouter (void) } -void Layouter::SetObjectWidth ( - sal_Int32 nMinimalWidth, - sal_Int32 nMaximalWidth, - sal_Int32 nPreferredWidth) -{ - if (nMinimalWidth <= nPreferredWidth && nPreferredWidth <= nMaximalWidth) - { - mnMinimalWidth = nMinimalWidth; - mnPreferredWidth = nMaximalWidth; - mnMaximalWidth = nPreferredWidth; - } -} - - - - void Layouter::SetBorders ( sal_Int32 nLeftBorder, sal_Int32 nRightBorder, @@ -125,20 +109,6 @@ void Layouter::SetPageBorders ( -void Layouter::SetGaps ( - sal_Int32 nHorizontalGap, - sal_Int32 nVerticalGap) -{ - if (nHorizontalGap >= 0) - mnHorizontalGap.mnScreen = nHorizontalGap; - if (nVerticalGap >= 0) - mnVerticalGap.mnScreen = nVerticalGap; -} - - - - - void Layouter::SetColumnCount ( sal_Int32 nMinimalColumnCount, sal_Int32 nMaximalColumnCount) @@ -337,14 +307,6 @@ bool Layouter::RearrangeVertical ( -void Layouter::SetZoom (double nZoomFactor, OutputDevice* pDevice) -{ - SetZoom(Fraction(nZoomFactor), pDevice); -} - - - - void Layouter::SetZoom (Fraction nZoomFactor, OutputDevice* pDevice) { MapMode aMapMode (pDevice->GetMapMode()); @@ -406,14 +368,6 @@ sal_Int32 Layouter::GetColumnCount (void) const -bool Layouter::IsColumnCountFixed (void) const -{ - return mnMinimalColumnCount == mnMaximalColumnCount; -} - - - - Size Layouter::GetPageObjectSize (void) const { return maPageObjectModelSize; @@ -801,13 +755,4 @@ sal_Int32 Layouter::ResolvePositionInGap ( -const Layouter::BackgroundRectangleList& - Layouter::GetBackgroundRectangleList (void) const -{ - return maBackgroundRectangleList; -} - - - - } } } // end of namespace ::sd::slidesorter::namespace diff --git a/sd/source/ui/slidesorter/view/SlsPageObjectViewContact.cxx b/sd/source/ui/slidesorter/view/SlsPageObjectViewContact.cxx index 5ef90ad2830b..303e78eeff61 100644 --- a/sd/source/ui/slidesorter/view/SlsPageObjectViewContact.cxx +++ b/sd/source/ui/slidesorter/view/SlsPageObjectViewContact.cxx @@ -93,21 +93,6 @@ void PageObjectViewContact::ActionChanged (void) ViewContactOfPageObj::ActionChanged(); } -Rectangle PageObjectViewContact::GetPageObjectBoundingBox (void) const -{ - // use model data directly here - OSL_ASSERT(mpDescriptor.get()!=NULL); - Rectangle aRetval(GetPageObject().GetLastBoundRect()); - const SvBorder aPageDescriptorBorder(mpDescriptor->GetModelBorder()); - - aRetval.Left() -= aPageDescriptorBorder.Left(); - aRetval.Top() -= aPageDescriptorBorder.Top(); - aRetval.Right() += aPageDescriptorBorder.Right(); - aRetval.Bottom() += aPageDescriptorBorder.Bottom(); - - return aRetval; -} - SdrPageObj& PageObjectViewContact::GetPageObject (void) const { return ViewContactOfPageObj::GetPageObj(); diff --git a/sd/source/ui/slidesorter/view/SlsPageObjectViewObjectContact.cxx b/sd/source/ui/slidesorter/view/SlsPageObjectViewObjectContact.cxx index 8f259e2a8c0f..92cbfe8f04d2 100644 --- a/sd/source/ui/slidesorter/view/SlsPageObjectViewObjectContact.cxx +++ b/sd/source/ui/slidesorter/view/SlsPageObjectViewObjectContact.cxx @@ -626,7 +626,6 @@ private: // private helpers const BitmapEx& getFadeEffectIconBitmap() const; - const BitmapEx& getCommentsIconBitmap() const; protected: // method which is to be used to implement the local decomposition of a 2D primitive. @@ -684,21 +683,6 @@ const BitmapEx& SdPageObjectFadeNameNumberPrimitive::getFadeEffectIconBitmap() c const sal_Int32 SdPageObjectFadeNameNumberPrimitive::mnCommentsIndicatorOffset(9); BitmapEx* SdPageObjectFadeNameNumberPrimitive::mpCommentsIconBitmap = 0; -const BitmapEx& SdPageObjectFadeNameNumberPrimitive::getCommentsIconBitmap() const -{ - if(mpCommentsIconBitmap == NULL) - { - // prepare CommentsIconBitmap on demand - const sal_uInt16 nIconId(Application::GetSettings().GetStyleSettings().GetHighContrastMode() - ? BMP_COMMENTS_INDICATOR_H - : BMP_COMMENTS_INDICATOR); - const BitmapEx aCommentsIconBitmap(IconCache::Instance().GetIcon(nIconId).GetBitmapEx()); - const_cast< SdPageObjectFadeNameNumberPrimitive* >(this)->mpCommentsIconBitmap = new BitmapEx(aCommentsIconBitmap); - } - - return *mpCommentsIconBitmap; -} - Primitive2DSequence SdPageObjectFadeNameNumberPrimitive::create2DDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const { const xub_StrLen nTextLength(getPageName().Len()); diff --git a/sd/source/ui/toolpanel/EmptyWindow.cxx b/sd/source/ui/toolpanel/EmptyWindow.cxx deleted file mode 100644 index 2e964fa4e30b..000000000000 --- a/sd/source/ui/toolpanel/EmptyWindow.cxx +++ /dev/null @@ -1,96 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_sd.hxx" - -#include "EmptyWindow.hxx" - -namespace sd { namespace toolpanel { - - -EmptyWindow::EmptyWindow ( - Window* pParentWindow, - Color aBackgroundColor, - const String& rText) - : Window (pParentWindow, WinBits()), - msText (rText) -{ - SetBackground (aBackgroundColor); -} - - - - -EmptyWindow::~EmptyWindow (void) -{ -} - - - - -void EmptyWindow::Paint (const Rectangle& ) -{ - Size aWindowSize (GetOutputSizePixel()); - Point aPosition(aWindowSize.Width()/2,aWindowSize.Height()/2); - - Rectangle aBBox; - aPosition = Point(10,aWindowSize.Height()/2); - if (GetTextBoundRect (aBBox, msText)) - aPosition = Point ( - (aWindowSize.Width()-aBBox.GetWidth())/2, - (aWindowSize.Height()-aBBox.GetHeight())/2); - DrawText (aPosition, msText); - - String sSizeString = String::CreateFromInt32(aWindowSize.Width()); - sSizeString.Append (String::CreateFromAscii(" x ")); - sSizeString.Append (String::CreateFromInt32(aWindowSize.Height())); - if (GetTextBoundRect (aBBox, sSizeString)) - aPosition = Point ( - (aWindowSize.Width()-aBBox.GetWidth())/2, - aPosition.Y() + GetTextHeight() + aBBox.GetHeight()); - DrawText (aPosition, sSizeString); -} - - - - -void EmptyWindow::Resize (void) -{ - Window::Resize(); -} - - - - -void EmptyWindow::GetFocus (void) -{ - GetParent()->GrabFocus(); -} - - -} } // end of namespace ::sd::tpv diff --git a/sd/source/ui/toolpanel/EmptyWindow.hxx b/sd/source/ui/toolpanel/EmptyWindow.hxx deleted file mode 100644 index 4137020874f5..000000000000 --- a/sd/source/ui/toolpanel/EmptyWindow.hxx +++ /dev/null @@ -1,57 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef SD_EMPTY_WINDOW_HXX -#define SD_EMPTY_WINDOW_HXX - -#include - -namespace sd { namespace toolpanel { - -/** Simply paint a solid background and a centered text. -*/ -class EmptyWindow - : public ::Window -{ -public: - EmptyWindow ( - ::Window* pParentWindow, - Color rBackgroundColor, - const String& rText); - virtual ~EmptyWindow (void); - - virtual void Paint (const Rectangle& rBoundingBox); - virtual void Resize (void); - virtual void GetFocus (void); - -private: - String msText; -}; - -} } // end of namespace ::sd::toolpanel - -#endif diff --git a/sd/source/ui/toolpanel/LayoutMenu.cxx b/sd/source/ui/toolpanel/LayoutMenu.cxx index a2bb1d0cbbac..6e5a73c3aecc 100644 --- a/sd/source/ui/toolpanel/LayoutMenu.cxx +++ b/sd/source/ui/toolpanel/LayoutMenu.cxx @@ -305,14 +305,6 @@ LayoutMenu::~LayoutMenu (void) -String LayoutMenu::GetSelectedLayoutName (void) -{ - return GetItemText (GetSelectItemId()); -} - - - - AutoLayout LayoutMenu::GetSelectedAutoLayout (void) { AutoLayout aResult = AUTOLAYOUT_NONE; diff --git a/sd/source/ui/toolpanel/LayoutMenu.hxx b/sd/source/ui/toolpanel/LayoutMenu.hxx index bd121403c2d3..d2f019b5bc34 100644 --- a/sd/source/ui/toolpanel/LayoutMenu.hxx +++ b/sd/source/ui/toolpanel/LayoutMenu.hxx @@ -99,10 +99,6 @@ public: ViewShellBase& rBase, DrawDocShell& rDocShell); - /** Return the name of the currently selected layout. - */ - String GetSelectedLayoutName (void); - /** Return a numerical value representing the currently selected layout. */ diff --git a/sd/source/ui/toolpanel/ScrollPanel.cxx b/sd/source/ui/toolpanel/ScrollPanel.cxx index cff065777235..13bb9c8e8d35 100644 --- a/sd/source/ui/toolpanel/ScrollPanel.cxx +++ b/sd/source/ui/toolpanel/ScrollPanel.cxx @@ -110,15 +110,6 @@ ScrollPanel::~ScrollPanel (void) -void ScrollPanel::ListHasChanged (void) -{ - mpControlContainer->ListHasChanged (); - RequestResize (); -} - - - - TitledControl* ScrollPanel::AddControl ( ::std::auto_ptr pControl, const String& rTitle, diff --git a/sd/source/ui/toolpanel/SimpleLayoutWrapper.cxx b/sd/source/ui/toolpanel/SimpleLayoutWrapper.cxx deleted file mode 100644 index 0aa2d3f91760..000000000000 --- a/sd/source/ui/toolpanel/SimpleLayoutWrapper.cxx +++ /dev/null @@ -1,98 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_sd.hxx" - -#include "SimpleLayoutWrapper.hxx" - -#include - -namespace sd { namespace toolpanel { - -SimpleLayoutWrapper::SimpleLayoutWrapper ( - ::std::auto_ptr< ::Window> pWindow, - int nPreferredWidth, - int nPreferredHeight, - bool bIsResizable) - : mpWindow (pWindow), - mnPreferredWidth(nPreferredWidth), - mnPreferredHeight(nPreferredHeight), - mbIsResizable (bIsResizable) -{ -} - - - - -SimpleLayoutWrapper::~SimpleLayoutWrapper (void) -{ -} - - - - -Size SimpleLayoutWrapper::GetPreferredSize (void) -{ - return Size (mnPreferredWidth, mnPreferredHeight); -} - - - - -sal_Int32 SimpleLayoutWrapper::GetPreferredWidth (sal_Int32) -{ - return mnPreferredWidth; -} - - - - -sal_Int32 SimpleLayoutWrapper::GetPreferredHeight (sal_Int32) -{ - return mnPreferredHeight; -} - - - - -bool SimpleLayoutWrapper::IsResizable (void) -{ - return mbIsResizable; -} - - - - -::Window* SimpleLayoutWrapper::GetWindow (void) -{ - return mpWindow.get(); -} - - -} } // end of namespace ::sd::toolpanel - diff --git a/sd/source/ui/toolpanel/SimpleLayoutWrapper.hxx b/sd/source/ui/toolpanel/SimpleLayoutWrapper.hxx deleted file mode 100644 index a05d9d6ff295..000000000000 --- a/sd/source/ui/toolpanel/SimpleLayoutWrapper.hxx +++ /dev/null @@ -1,70 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef SD_TASKPANE_SIMPLE_LAYOUT_WRAPPER_HXX -#define SD_TASKPANE_SIMPLE_LAYOUT_WRAPPER_HXX - -#include "taskpane/ILayoutableWindow.hxx" - -#include - -namespace sd { namespace toolpanel { - - -/** Simple wrapper arround a regular VCL window that implements the - methods that return the preferred size of the window. They are - given once to the constructor and are not modified by the wrapper. -*/ -class SimpleLayoutWrapper - : public virtual ILayoutableWindow -{ -public: - SimpleLayoutWrapper ( - ::std::auto_ptr< ::Window> pWindow, - int nPreferredWidth, - int nPreferredHeight, - bool bIsResizable); - virtual ~SimpleLayoutWrapper (void); - - virtual Size GetPreferredSize (void); - virtual sal_Int32 GetPreferredWidth (sal_Int32 nHeight); - virtual sal_Int32 GetPreferredHeight (sal_Int32 nWidth); - virtual bool IsResizable (void); - virtual ::Window* GetWindow (void); - - using sd::toolpanel::ILayoutableWindow::GetPreferredWidth; - using sd::toolpanel::ILayoutableWindow::GetPreferredHeight; -private: - ::std::auto_ptr< ::Window> mpWindow; - int mnPreferredWidth; - int mnPreferredHeight; - bool mbIsResizable; -}; - -} } // end of namespace ::sd::toolpanel - -#endif diff --git a/sd/source/ui/toolpanel/SubToolPanel.cxx b/sd/source/ui/toolpanel/SubToolPanel.cxx index 31c29f4f1c08..06b63ae2da85 100644 --- a/sd/source/ui/toolpanel/SubToolPanel.cxx +++ b/sd/source/ui/toolpanel/SubToolPanel.cxx @@ -86,64 +86,6 @@ SubToolPanel::~SubToolPanel (void) -void SubToolPanel::ListHasChanged (void) -{ - mpControlContainer->ListHasChanged (); - RequestResize (); -} - - - - -void SubToolPanel::AddControl ( - ::std::auto_ptr pControl, - const String& rTitle, - ULONG nHelpId) -{ - pControl->GetWindow()->AddEventListener ( - LINK(this,SubToolPanel,WindowEventListener)); - - // We are interested only in the title. The control itself is - // managed by the content object. - TitledControl* pTitledControl = new TitledControl( - this, - pControl, - rTitle, - TitledControlStandardClickHandler(GetControlContainer(), ControlContainer::ES_TOGGLE), - TitleBar::TBT_SUB_CONTROL_HEADLINE); - pTitledControl->GetWindow()->SetParent(this); - pTitledControl->GetWindow()->SetHelpId(nHelpId); - ::std::auto_ptr pChild (pTitledControl); - - // Add a down link only for the first control so that when - // entering the sub tool panel the focus is set to the first control. - if (mpControlContainer->GetControlCount() == 0) - FocusManager::Instance().RegisterDownLink(GetParent(), pTitledControl->GetWindow()); - FocusManager::Instance().RegisterUpLink(pTitledControl->GetWindow(), GetParent()); - - mpControlContainer->AddControl (pChild); -} - - - - -void SubToolPanel::AddControl (::std::auto_ptr pControl) -{ - pControl->GetWindow()->AddEventListener ( - LINK(this,SubToolPanel,WindowEventListener)); - - // Add a down link only for the first control so that when - // entering the sub tool panel the focus is set to the first control. - if (mpControlContainer->GetControlCount() == 0) - FocusManager::Instance().RegisterDownLink(GetParent(), pControl->GetWindow()); - FocusManager::Instance().RegisterUpLink(pControl->GetWindow(), GetParent()); - - mpControlContainer->AddControl (pControl); -} - - - - void SubToolPanel::Paint (const Rectangle& rRect) { if (mbIsRearrangePending) diff --git a/sd/source/ui/toolpanel/TaskPaneShellManager.cxx b/sd/source/ui/toolpanel/TaskPaneShellManager.cxx index 5a4875340840..b1556c53d3d2 100644 --- a/sd/source/ui/toolpanel/TaskPaneShellManager.cxx +++ b/sd/source/ui/toolpanel/TaskPaneShellManager.cxx @@ -76,19 +76,6 @@ void TaskPaneShellManager::ReleaseShell (SfxShell* ) // Nothing to do. } -// hack for annotation panel, better fix? -void TaskPaneShellManager_AddSubShell ( TaskPaneShellManager* pManager, sal_Int32 nId, SfxShell* pShell, ::Window* pWindow ) -{ - if( pManager != NULL ) - pManager->AddSubShell( (ShellId)nId, pShell, pWindow ); -} - -void TaskPaneShellManager_RemoveSubShell ( TaskPaneShellManager* pManager, const SfxShell* pShell) -{ - if( pManager != NULL ) - pManager->RemoveSubShell( pShell ); -} - void TaskPaneShellManager::AddSubShell ( ShellId nId, SfxShell* pShell, diff --git a/sd/source/ui/toolpanel/TaskPaneTreeNode.cxx b/sd/source/ui/toolpanel/TaskPaneTreeNode.cxx index 152f576bd5bc..4e0daacb74b1 100644 --- a/sd/source/ui/toolpanel/TaskPaneTreeNode.cxx +++ b/sd/source/ui/toolpanel/TaskPaneTreeNode.cxx @@ -55,22 +55,6 @@ TreeNode::~TreeNode (void) -bool TreeNode::IsLeaf (void) -{ - return (mpControlContainer.get()==NULL); -} - - - - -bool TreeNode::IsRoot (void) -{ - return (mpParent==NULL); -} - - - - void TreeNode::SetParentNode (TreeNode* pNewParent) { mpParent = pNewParent; @@ -288,18 +272,6 @@ void TreeNode::AddStateChangeListener (const Link& rListener) -void TreeNode::RemoveStateChangeListener (const Link& rListener) -{ - maStateChangeListeners.erase ( - ::std::find ( - maStateChangeListeners.begin(), - maStateChangeListeners.end(), - rListener)); -} - - - - void TreeNode::FireStateChangeEvent ( TreeNodeStateChangeEventId eEventId, TreeNode* pChild) const diff --git a/sd/source/ui/toolpanel/TaskPaneViewShell.cxx b/sd/source/ui/toolpanel/TaskPaneViewShell.cxx index d80beba7cd10..b2f91d8aa0ba 100644 --- a/sd/source/ui/toolpanel/TaskPaneViewShell.cxx +++ b/sd/source/ui/toolpanel/TaskPaneViewShell.cxx @@ -46,8 +46,6 @@ #include "controls/TableDesignPanel.hxx" #include "controls/CustomAnimationPanel.hxx" #include "controls/SlideTransitionPanel.hxx" -#include "controls/AnimationSchemesPanel.hxx" -#include "TitleToolBox.hxx" #include "taskpane/ControlContainer.hxx" #include "FrameView.hxx" #include "Window.hxx" @@ -75,6 +73,7 @@ #include #include #include +#include #include "sdtreelb.hxx" #include "DrawViewShell.hxx" #include "drawdoc.hxx" @@ -135,13 +134,6 @@ public: */ void AddPanel (sal_uInt32 nInternalId, PanelId nPublicId); - /** Return the public id for the given internal one. - @return - When the given public id is not known then PID_UNKNOWN is - returned. - */ - PanelId GetPublicId (sal_uInt32 nInternalId) const; - /** Return the internal id for the given public one. @return When the given public id is not known then mnInvalidId is @@ -622,21 +614,6 @@ SdPage* TaskPaneViewShell::getCurrentPage(void) const -void TaskPaneViewShell::Execute (SfxRequest& ) -{ -} - - - - -void TaskPaneViewShell::GetState (SfxItemSet& rItemSet) -{ - (void)rItemSet; -} - - - - TaskPaneShellManager& TaskPaneViewShell::GetSubShellManager (void) const { return *mpSubShellManager.get(); @@ -675,21 +652,6 @@ void TaskPaneViewShell::ShowPanel (const PanelId nPublicId) -void TaskPaneViewShell::HidePanel (const PanelId nPublicId) -{ - Initialize(); - sal_uInt32 nId (mpImpl->GetInternalId(nPublicId)); - if (nId != Implementation::mnInvalidId) - { - mpTaskPane->GetControlContainer().SetVisibilityState ( - nId, - ControlContainer::VS_HIDE); - } -} - - - - void TaskPaneViewShell::ExpandPanel (const PanelId nPublicId) { Initialize(); @@ -809,19 +771,6 @@ void TaskPaneViewShell::Implementation::AddPanel ( -TaskPaneViewShell::PanelId - TaskPaneViewShell::Implementation::GetPublicId ( - sal_uInt32 nInternalId) const -{ - if (nInternalId < maIndexMap.size()) - return maIndexMap[nInternalId]; - else - return PID_UNKNOWN; -} - - - - sal_uInt32 TaskPaneViewShell::Implementation::GetInternalId ( TaskPaneViewShell::PanelId nPublicId) const @@ -840,27 +789,6 @@ sal_uInt32 -//===== PanelActivation ======================================================= - -PanelActivation::PanelActivation (ViewShellBase& rBase, TaskPaneViewShell::PanelId nPanelId) - : mrBase(rBase), - mnPanelId(nPanelId) -{ -} - -void PanelActivation::operator() (bool) -{ - toolpanel::TaskPaneViewShell* pTaskPane - = dynamic_cast( - framework::FrameworkHelper::Instance(mrBase) - ->GetViewShell(framework::FrameworkHelper::msRightPaneURL).get()); - if (pTaskPane != NULL) - pTaskPane->ShowPanel(mnPanelId); -} - - - - //===== ResourceActivationClickHandler ======================================== ResourceActivationClickHandler::ResourceActivationClickHandler ( diff --git a/sd/source/ui/toolpanel/TestMenu.cxx b/sd/source/ui/toolpanel/TestMenu.cxx index 7bfb6adebe8d..a7396cf36999 100644 --- a/sd/source/ui/toolpanel/TestMenu.cxx +++ b/sd/source/ui/toolpanel/TestMenu.cxx @@ -37,6 +37,7 @@ namespace sd { namespace toolpanel { +#ifdef SHOW_COLOR_MENU /** This factory class is used to create instances of ColorMenu. It can be extended so that its constructor stores arguments that later are passed to new ColorMenu objects. @@ -82,16 +83,12 @@ ColorMenu::~ColorMenu (void) } - - ::std::auto_ptr ColorMenu::CreateControlFactory (void) { return ::std::auto_ptr(new ColorMenuFactory()); } - - /** The preferred size depends on the preferred number of columns, the number of items, and the size of the items. */ @@ -316,5 +313,6 @@ void ColorMenu::Fill (void) maSet.InsertItem (++i, rSettings.GetFontColor()); maSet.SetItemText (i, String::CreateFromAscii("FontColor")); } +#endif } } // end of namespace ::sd::toolpanel diff --git a/sd/source/ui/toolpanel/TestMenu.hxx b/sd/source/ui/toolpanel/TestMenu.hxx index 37ac6542970d..d1df4c9f4f5a 100644 --- a/sd/source/ui/toolpanel/TestMenu.hxx +++ b/sd/source/ui/toolpanel/TestMenu.hxx @@ -39,6 +39,8 @@ namespace sd { namespace toolpanel { class ControlFactory; +#ifdef SHOW_COLOR_MENU + /** This demo menu shows the colors that are available from the StyleSettings. */ @@ -75,6 +77,7 @@ private: int CalculateRowCount (const Size& rItemSize, int nColumnCount); void Fill (void); }; +#endif } } // end of namespace ::sd::toolpanel diff --git a/sd/source/ui/toolpanel/TestPanel.cxx b/sd/source/ui/toolpanel/TestPanel.cxx index e2786e23a0c5..2b05769e0db7 100644 --- a/sd/source/ui/toolpanel/TestPanel.cxx +++ b/sd/source/ui/toolpanel/TestPanel.cxx @@ -37,6 +37,7 @@ namespace sd { namespace toolpanel { +#ifdef SHOW_TEST_PANEL /** This factory class is used to create instances of TestPanel. It can be extended so that its constructor stores arguments that later are passed to new TestPanel objects. @@ -163,13 +164,11 @@ TestPanel::~TestPanel (void) { } - - - std::auto_ptr TestPanel::CreateControlFactory (void) { return std::auto_ptr(new TestPanelFactory()); } +#endif } } // end of namespace ::sd::toolpanel diff --git a/sd/source/ui/toolpanel/TestPanel.hxx b/sd/source/ui/toolpanel/TestPanel.hxx index f883cc08c1e1..77b075df2660 100644 --- a/sd/source/ui/toolpanel/TestPanel.hxx +++ b/sd/source/ui/toolpanel/TestPanel.hxx @@ -36,6 +36,8 @@ namespace sd { namespace toolpanel { class ControlFactory; class TreeNode; +#ifdef SHOW_TEST_PANEL + /** This panel demonstrates how to create a panel for the task pane. */ class TestPanel @@ -48,6 +50,8 @@ public: static std::auto_ptr CreateControlFactory (void); }; +#endif + } } // end of namespace ::sd::toolpanel #endif diff --git a/sd/source/ui/toolpanel/TitleToolBox.cxx b/sd/source/ui/toolpanel/TitleToolBox.cxx deleted file mode 100644 index 57cbac3fe132..000000000000 --- a/sd/source/ui/toolpanel/TitleToolBox.cxx +++ /dev/null @@ -1,116 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_sd.hxx" - -#include "TitleToolBox.hxx" - -#include "res_bmp.hrc" -#include -#include -#include "sdresid.hxx" -#include - -namespace sd { namespace toolpanel { - - -TitleToolBox::TitleToolBox (::Window* pParent, WinBits nStyle ) - : ToolBox( pParent, nStyle ) -{ - lastSize = -1; - - Bitmap aBitmap (SdResId (BMP_CLOSE_DOC)); - Bitmap aBitmapHC (SdResId (BMP_CLOSE_DOC_H)); - Bitmap aTriangleRight (SdResId (BMP_TRIANGLE_RIGHT)); - Bitmap aTriangleDown (SdResId (BMP_TRIANGLE_DOWN)); - - maImage = Image (aBitmap, Color (COL_LIGHTMAGENTA)); - maImageHC = Image (aBitmapHC, Color (BMP_COLOR_HIGHCONTRAST)); - maTriangleRight = Image (aTriangleRight, Color (COL_LIGHTMAGENTA)); - maTriangleDown = Image (aTriangleDown, Color (COL_LIGHTMAGENTA)); - - SetOutStyle (TOOLBOX_STYLE_FLAT); - SetBackground (Wallpaper ( - GetSettings().GetStyleSettings().GetDialogColor())); -} - - - - -void TitleToolBox::AddItem (ToolBoxId aId) -{ - switch (aId) - { - case TBID_PANEL_MENU: - InsertItem (TBID_PANEL_MENU, - String::CreateFromAscii ("Panel"), - TIB_DROPDOWN); - break; - - case TBID_DOCUMENT_CLOSE: - InsertItem (TBID_DOCUMENT_CLOSE, - GetSettings().GetStyleSettings().GetHighContrastMode() - ? maImageHC : maImage, 0 ); - break; - - case TBID_TRIANGLE_RIGHT: - InsertItem (TBID_TRIANGLE_RIGHT, - maTriangleRight, 0); - break; - - case TBID_TRIANGLE_DOWN: - InsertItem (TBID_TRIANGLE_DOWN, - maTriangleDown, 0); - break; - - case TBID_TEST: - InsertItem (TBID_TEST, - String::CreateFromAscii ("Test"), - TIB_DROPDOWN); - break; - } -} - - - - -void TitleToolBox::DataChanged (const DataChangedEvent& rDCEvt) -{ - Window::DataChanged (rDCEvt); - - if (rDCEvt.GetFlags() & SETTINGS_STYLE) - { - SetBackground ( - Wallpaper (GetSettings().GetStyleSettings().GetDialogColor())); - } -} - - - - -} } // end of namespace ::sd::toolbox diff --git a/sd/source/ui/toolpanel/TitleToolBox.hxx b/sd/source/ui/toolpanel/TitleToolBox.hxx deleted file mode 100644 index 9433706579df..000000000000 --- a/sd/source/ui/toolpanel/TitleToolBox.hxx +++ /dev/null @@ -1,70 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef SD_TOOLBOX_TITLETOOLBOX_HXX -#define SD_TOOLBOX_TITLETOOLBOX_HXX - -#include - -class PushButton; - -namespace sd { namespace toolpanel { - -/** Copied from vcl/menu.cxx -// To get the transparent mouse-over look, the TitleToolBox is actually a toolbox -// overload DataChange to handle style changes correctly -*/ -class TitleToolBox - : public ToolBox -{ -public: - enum ToolBoxId { - TBID_DOCUMENT_CLOSE = 1, - TBID_PANEL_MENU = 2, - TBID_TRIANGLE_RIGHT = 3, - TBID_TRIANGLE_DOWN = 4, - TBID_TEST - }; - - TitleToolBox (::Window* pParent, WinBits nStyle = 0); - - void AddItem (ToolBoxId aId); - - void DataChanged (const DataChangedEvent& rDCEvt); - -private: - Image maImage; - Image maImageHC; - Image maTriangleRight; - Image maTriangleDown; - - long lastSize; -}; - -} } // end of namespace ::sd::toolbox - -#endif diff --git a/sd/source/ui/toolpanel/TitledControl.cxx b/sd/source/ui/toolpanel/TitledControl.cxx index 7930bb4cd7f1..eb84e4f72373 100644 --- a/sd/source/ui/toolpanel/TitledControl.cxx +++ b/sd/source/ui/toolpanel/TitledControl.cxx @@ -359,22 +359,6 @@ void TitledControl::SetEnabledState(bool bFlag) -void TitledControl::SetUserData (void* pUserData) -{ - mpUserData = pUserData; -} - - - - -void* TitledControl::GetUserData (void) const -{ - return mpUserData; -} - - - - bool TitledControl::IsShowing (void) const { return mbVisible; diff --git a/sd/source/ui/toolpanel/ToolPanel.cxx b/sd/source/ui/toolpanel/ToolPanel.cxx index 89ab9397d4ee..e6621b1f544d 100644 --- a/sd/source/ui/toolpanel/ToolPanel.cxx +++ b/sd/source/ui/toolpanel/ToolPanel.cxx @@ -125,15 +125,6 @@ sal_uInt32 ToolPanel::AddControl ( -void ToolPanel::ListHasChanged (void) -{ - mpControlContainer->ListHasChanged (); - Rearrange (); -} - - - - void ToolPanel::Resize (void) { Control::Resize(); diff --git a/sd/source/ui/toolpanel/controls/AnimationSchemesPanel.cxx b/sd/source/ui/toolpanel/controls/AnimationSchemesPanel.cxx index c4fc41e97744..730fc74795f2 100644 --- a/sd/source/ui/toolpanel/controls/AnimationSchemesPanel.cxx +++ b/sd/source/ui/toolpanel/controls/AnimationSchemesPanel.cxx @@ -24,7 +24,93 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: AnimationSchemesPanel.cxx,v $ + * $Revision: 1.6 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_sd.hxx" +#include "AnimationSchemesPanel.hxx" + +#include "strings.hrc" +#include "sdresid.hxx" +#include + +namespace sd +{ + + class ViewShellBase; + extern ::Window * createAnimationSchemesPanel( ::Window* pParent, ViewShellBase& rBase ); + +namespace toolpanel { namespace controls { + +AnimationSchemesPanel::AnimationSchemesPanel(TreeNode* pParent, ViewShellBase& rBase) + : SubToolPanel (pParent), + maPreferredSize( 100, 200 ) +{ + mpWrappedControl = createAnimationSchemesPanel( pParent->GetWindow(), rBase ); + mpWrappedControl->Show(); +} + +AnimationSchemesPanel::~AnimationSchemesPanel() +{ + delete mpWrappedControl; +} + +Size AnimationSchemesPanel::GetPreferredSize() +{ + return maPreferredSize; +} +sal_Int32 AnimationSchemesPanel::GetPreferredWidth(sal_Int32 ) +{ + return maPreferredSize.Width(); +} +sal_Int32 AnimationSchemesPanel::GetPreferredHeight(sal_Int32 ) +{ + return maPreferredSize.Height(); +} +::Window* AnimationSchemesPanel::GetWindow() +{ + return mpWrappedControl; +} +bool AnimationSchemesPanel::IsResizable() +{ + return true; +} +bool AnimationSchemesPanel::IsExpandable() const +{ + return true; +} + + +} } } // end of namespace ::sd::toolpanel::controls // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sd.hxx" #include "AnimationSchemesPanel.hxx" diff --git a/sd/source/ui/toolpanel/controls/AnimationSchemesPanel.hxx b/sd/source/ui/toolpanel/controls/AnimationSchemesPanel.hxx index 4cee546dae0d..dd3388fb0342 100644 --- a/sd/source/ui/toolpanel/controls/AnimationSchemesPanel.hxx +++ b/sd/source/ui/toolpanel/controls/AnimationSchemesPanel.hxx @@ -24,6 +24,35 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: AnimationSchemesPanel.hxx,v $ + * $Revision: 1.6 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ #ifndef SD_TASKPANE_CONTROLS_ANIMATION_SCHEMES_PANEL_HXX #define SD_TASKPANE_CONTROLS_ANIMATION_SCHEMES_PANEL_HXX @@ -66,3 +95,44 @@ private: } } } // end of namespace ::sd::toolpanel::controls #endif +#ifndef SD_TASKPANE_CONTROLS_ANIMATION_SCHEMES_PANEL_HXX +#define SD_TASKPANE_CONTROLS_ANIMATION_SCHEMES_PANEL_HXX + +#include "taskpane/SubToolPanel.hxx" + +namespace sd { +class ViewShellBase; +} + +namespace sd { namespace toolpanel { +class TreeNode; +} } + +namespace sd { namespace toolpanel { namespace controls { + +class AnimationSchemesPanel + : public SubToolPanel +{ +public: + AnimationSchemesPanel ( + TreeNode* pParent, + ViewShellBase& rBase); + virtual ~AnimationSchemesPanel (void); + + virtual Size GetPreferredSize (void); + virtual sal_Int32 GetPreferredWidth (sal_Int32 nHeigh); + virtual sal_Int32 GetPreferredHeight (sal_Int32 nWidth); + virtual ::Window* GetWindow (void); + virtual bool IsResizable (void); + virtual bool IsExpandable (void) const; + + using Window::GetWindow; + +private: + Size maPreferredSize; + ::Window* mpWrappedControl; +}; + +} } } // end of namespace ::sd::toolpanel::controls + +#endif diff --git a/sd/source/ui/toolpanel/controls/MasterPageContainer.cxx b/sd/source/ui/toolpanel/controls/MasterPageContainer.cxx index 444ecd6dacb4..80a094ec1a66 100644 --- a/sd/source/ui/toolpanel/controls/MasterPageContainer.cxx +++ b/sd/source/ui/toolpanel/controls/MasterPageContainer.cxx @@ -73,24 +73,6 @@ namespace { typedef ::std::vector MasterPageContainerType; - -class PreviewCreationRequest -{ -public: - PreviewCreationRequest (MasterPageContainer::Token aToken, int nPriority); - MasterPageContainer::Token maToken; - int mnPriority; - class Compare {public: - bool operator() (const PreviewCreationRequest& r1,const PreviewCreationRequest& r2); - }; - class CompareToken {public: - MasterPageContainer::Token maToken; - CompareToken(MasterPageContainer::Token aToken); - bool operator() (const PreviewCreationRequest& rRequest); - }; -}; - - } // end of anonymous namespace @@ -423,28 +405,6 @@ MasterPageContainer::Token MasterPageContainer::GetTokenForURL ( -MasterPageContainer::Token MasterPageContainer::GetTokenForPageName ( - const String& sPageName) -{ - const ::osl::MutexGuard aGuard (mpImpl->maMutex); - - Token aResult (NIL_TOKEN); - if (sPageName.Len() > 0) - { - MasterPageContainerType::iterator iEntry ( - ::std::find_if ( - mpImpl->maContainer.begin(), - mpImpl->maContainer.end(), - MasterPageDescriptor::PageNameComparator(sPageName))); - if (iEntry != mpImpl->maContainer.end()) - aResult = (*iEntry)->maToken; - } - return aResult; -} - - - - MasterPageContainer::Token MasterPageContainer::GetTokenForStyleName (const String& sStyleName) { const ::osl::MutexGuard aGuard (mpImpl->maMutex); @@ -589,46 +549,6 @@ sal_Int32 MasterPageContainer::GetTemplateIndexForToken (Token aToken) -void MasterPageContainer::SetPreviewProviderForToken ( - Token aToken, - const ::boost::shared_ptr& rpPreviewProvider) -{ - const ::osl::MutexGuard aGuard (mpImpl->maMutex); - - SharedMasterPageDescriptor pDescriptor = mpImpl->GetDescriptor(aToken); - if (pDescriptor.get()!=NULL) - { - pDescriptor->mpPreviewProvider = rpPreviewProvider; - mpImpl->InvalidatePreview(aToken); - } -} - - - - -SdPage* MasterPageContainer::GetSlideForToken ( - MasterPageContainer::Token aToken, - bool bLoad) -{ - const ::osl::MutexGuard aGuard (mpImpl->maMutex); - - SdPage* pSlide = NULL; - SharedMasterPageDescriptor pDescriptor = mpImpl->GetDescriptor(aToken); - if (pDescriptor.get() != NULL) - { - pSlide = pDescriptor->mpSlide; - if (pSlide==NULL && bLoad) - { - GetPageObjectForToken(aToken, bLoad); - pSlide = pDescriptor->mpSlide; - } - } - return pSlide; -} - - - - SharedMasterPageDescriptor MasterPageContainer::GetDescriptorForToken ( MasterPageContainer::Token aToken) { @@ -639,19 +559,6 @@ SharedMasterPageDescriptor MasterPageContainer::GetDescriptorForToken ( - -bool MasterPageContainer::UpdateDescriptor ( - const SharedMasterPageDescriptor& rpDescriptor, - bool bForcePageObject, - bool bForcePreview, - bool bSendEvents) -{ - return mpImpl->UpdateDescriptor(rpDescriptor, bForcePageObject, bForcePreview, bSendEvents); -} - - - - void MasterPageContainer::InvalidatePreview (MasterPageContainer::Token aToken) { mpImpl->InvalidatePreview(aToken); @@ -1311,58 +1218,3 @@ void MasterPageContainer::Implementation::FillingDone (void) } } } // end of namespace ::sd::toolpanel::controls - - - - -namespace { - -//===== PreviewCreationRequest ================================================ - -PreviewCreationRequest::PreviewCreationRequest ( - MasterPageContainer::Token aToken, - int nPriority) - : maToken(aToken), - mnPriority(nPriority) -{ -} - - - - -bool PreviewCreationRequest::Compare::operator() ( - const PreviewCreationRequest& aRequest1, - const PreviewCreationRequest& aRequest2) -{ - if (aRequest1.mnPriority != aRequest2.mnPriority) - { - // Prefer requests with higher priority. - return aRequest1.mnPriority > aRequest2.mnPriority; - } - else - { - // Prefer tokens that have been earlier created (those with lower - // value). - return aRequest1.maToken < aRequest2.maToken; - } -} - - - - -PreviewCreationRequest::CompareToken::CompareToken (MasterPageContainer::Token aToken) - : maToken(aToken) -{ -} - - - - -bool PreviewCreationRequest::CompareToken::operator() (const PreviewCreationRequest& aRequest) -{ - return maToken==aRequest.maToken; -} - - - -} // end of anonymous namespace diff --git a/sd/source/ui/toolpanel/controls/MasterPageContainer.hxx b/sd/source/ui/toolpanel/controls/MasterPageContainer.hxx index d922c089ffb4..60f760f63e34 100644 --- a/sd/source/ui/toolpanel/controls/MasterPageContainer.hxx +++ b/sd/source/ui/toolpanel/controls/MasterPageContainer.hxx @@ -143,26 +143,16 @@ public: Token GetTokenForIndex (int nIndex); Token GetTokenForURL (const String& sURL); - Token GetTokenForPageName (const String& sPageName); Token GetTokenForStyleName (const String& sStyleName); Token GetTokenForPageObject (const SdPage* pPage); String GetURLForToken (Token aToken); String GetPageNameForToken (Token aToken); String GetStyleNameForToken (Token aToken); - SdPage* GetSlideForToken (Token aToken, bool bLoad=true); SdPage* GetPageObjectForToken (Token aToken, bool bLoad=true); Origin GetOriginForToken (Token aToken); sal_Int32 GetTemplateIndexForToken (Token aToken); ::boost::shared_ptr GetDescriptorForToken (Token aToken); - bool UpdateDescriptor ( - const ::boost::shared_ptr& rpDescriptor, - bool bForcePageObject, - bool bForcePreview, - bool bSendEvents); - - void SetPreviewProviderForToken (Token aToken, - const ::boost::shared_ptr& rpPreviewProvider); void InvalidatePreview (Token aToken); diff --git a/sd/source/ui/toolpanel/controls/MasterPageContainerProviders.cxx b/sd/source/ui/toolpanel/controls/MasterPageContainerProviders.cxx index 6b9ff09bbed3..e45fed2c9c1b 100644 --- a/sd/source/ui/toolpanel/controls/MasterPageContainerProviders.cxx +++ b/sd/source/ui/toolpanel/controls/MasterPageContainerProviders.cxx @@ -386,46 +386,6 @@ bool DefaultPageObjectProvider::operator== (const PageObjectProvider& rProvider) -//===== DefaultPagePreviewProvider ============================================ - -DefaultPagePreviewProvider::DefaultPagePreviewProvider (void) -{ -} - - - -Image DefaultPagePreviewProvider::operator() ( - int nWidth, - SdPage* pPage, - ::sd::PreviewRenderer& rRenderer) -{ - // Unused parameters. - (void)nWidth; - (void)pPage; - (void)rRenderer; - - return Image(); -} - - - - -int DefaultPagePreviewProvider::GetCostIndex (void) -{ - return 0; -} - - - - -bool DefaultPagePreviewProvider::NeedsPageObject (void) -{ - return false; -} - - - - //===== ExistingPageProvider ================================================== ExistingPageProvider::ExistingPageProvider (SdPage* pPage) diff --git a/sd/source/ui/toolpanel/controls/MasterPageContainerProviders.hxx b/sd/source/ui/toolpanel/controls/MasterPageContainerProviders.hxx index 7cde148b3e3d..071b23cdbb16 100644 --- a/sd/source/ui/toolpanel/controls/MasterPageContainerProviders.hxx +++ b/sd/source/ui/toolpanel/controls/MasterPageContainerProviders.hxx @@ -170,21 +170,6 @@ public: - -/** Used temporarily to avoid the (expensive) creation of the default page - too early. -*/ -class DefaultPagePreviewProvider : public PreviewProvider -{ -public: - DefaultPagePreviewProvider (void); - virtual Image operator() (int nWidth, SdPage* pPage, ::sd::PreviewRenderer& rRenderer); - virtual int GetCostIndex (void); - virtual bool NeedsPageObject (void); -}; - - - /** This implementation of the PageObjectProvider simply returns an already existing master page object. */ diff --git a/sd/source/ui/toolpanel/controls/MasterPageDescriptor.cxx b/sd/source/ui/toolpanel/controls/MasterPageDescriptor.cxx index 49ae6dff264d..6871883d65f5 100644 --- a/sd/source/ui/toolpanel/controls/MasterPageDescriptor.cxx +++ b/sd/source/ui/toolpanel/controls/MasterPageDescriptor.cxx @@ -337,28 +337,6 @@ bool MasterPageDescriptor::URLComparator::operator() ( -//===== PageNameComparator ==================================================== - -MasterPageDescriptor::PageNameComparator::PageNameComparator (const ::rtl::OUString& sPageName) - : msPageName(sPageName) -{ -} - - - - -bool MasterPageDescriptor::PageNameComparator::operator() ( - const SharedMasterPageDescriptor& rDescriptor) -{ - if (rDescriptor.get() == NULL) - return false; - else - return rDescriptor->msPageName.equals(msPageName); -} - - - - // ===== StyleNameComparator ================================================== MasterPageDescriptor::StyleNameComparator::StyleNameComparator (const ::rtl::OUString& sStyleName) diff --git a/sd/source/ui/toolpanel/controls/MasterPageDescriptor.hxx b/sd/source/ui/toolpanel/controls/MasterPageDescriptor.hxx index 1eea46bd1802..0303989e3379 100644 --- a/sd/source/ui/toolpanel/controls/MasterPageDescriptor.hxx +++ b/sd/source/ui/toolpanel/controls/MasterPageDescriptor.hxx @@ -214,11 +214,6 @@ public: URLComparator (const ::rtl::OUString& sURL); bool operator() (const SharedMasterPageDescriptor& rDescriptor); }; - class PageNameComparator { public: - ::rtl::OUString msPageName; - PageNameComparator (const ::rtl::OUString& sPageName); - bool operator() (const SharedMasterPageDescriptor& rDescriptor); - }; class StyleNameComparator { public: ::rtl::OUString msStyleName; StyleNameComparator (const ::rtl::OUString& sStyleName); diff --git a/sd/source/ui/toolpanel/controls/MasterPageObserver.cxx b/sd/source/ui/toolpanel/controls/MasterPageObserver.cxx index 0f485174009d..2ba0cc678403 100644 --- a/sd/source/ui/toolpanel/controls/MasterPageObserver.cxx +++ b/sd/source/ui/toolpanel/controls/MasterPageObserver.cxx @@ -187,15 +187,6 @@ MasterPageObserver::~MasterPageObserver (void) -MasterPageObserver::MasterPageNameSet MasterPageObserver::GetMasterPageNames ( - SdDrawDocument& rDocument) -{ - return mpImpl->GetMasterPageNames (rDocument); -} - - - - //===== MasterPageObserver::Implementation ==================================== void MasterPageObserver::Implementation::RegisterDocument ( diff --git a/sd/source/ui/toolpanel/controls/MasterPagesSelector.cxx b/sd/source/ui/toolpanel/controls/MasterPagesSelector.cxx index 4571d4278140..b321dbf8dd14 100644 --- a/sd/source/ui/toolpanel/controls/MasterPagesSelector.cxx +++ b/sd/source/ui/toolpanel/controls/MasterPagesSelector.cxx @@ -41,7 +41,6 @@ #include "app.hrc" #include "res_bmp.hrc" #include "strings.hrc" -#include "showview.hxx" #include "DrawViewShell.hxx" #include "DrawController.hxx" #include "SlideSorterViewShell.hxx" @@ -699,21 +698,6 @@ void MasterPagesSelector::RemoveTokenToIndexEntry ( -void MasterPagesSelector::InvalidatePreview (MasterPageContainer::Token aToken) -{ - const ::osl::MutexGuard aGuard (maMutex); - - int nIndex (GetIndexForToken(aToken)); - if (nIndex > 0) - { - mpContainer->InvalidatePreview(aToken); - mpContainer->RequestPreview(aToken); - } -} - - - - void MasterPagesSelector::InvalidatePreview (const SdPage* pPage) { const ::osl::MutexGuard aGuard (maMutex); @@ -734,20 +718,6 @@ void MasterPagesSelector::InvalidatePreview (const SdPage* pPage) } } - - - -void MasterPagesSelector::InvalidateAllPreviews (void) -{ - const ::osl::MutexGuard aGuard (maMutex); - - for (USHORT nIndex=1; nIndex<=mpPageSet->GetItemCount(); nIndex++) - InvalidatePreview(nIndex); -} - - - - void MasterPagesSelector::UpdateAllPreviews (void) { const ::osl::MutexGuard aGuard (maMutex); diff --git a/sd/source/ui/toolpanel/controls/MasterPagesSelector.hxx b/sd/source/ui/toolpanel/controls/MasterPagesSelector.hxx index a480729aa9c8..a2df51f2bd4b 100644 --- a/sd/source/ui/toolpanel/controls/MasterPagesSelector.hxx +++ b/sd/source/ui/toolpanel/controls/MasterPagesSelector.hxx @@ -131,14 +131,8 @@ public: Index into the value set control that is used for displaying the previews. */ - void InvalidatePreview (MasterPageContainer::Token aToken); void InvalidatePreview (const SdPage* pPage); - /** Mark all previews as no being up-to-date anymore. This method is - typically called when the size of the previews has changed. - */ - void InvalidateAllPreviews (void); - void UpdateAllPreviews (void); protected: diff --git a/sd/source/ui/toolpanel/controls/makefile.mk b/sd/source/ui/toolpanel/controls/makefile.mk index 33871a415a7e..b2218e55008c 100644 --- a/sd/source/ui/toolpanel/controls/makefile.mk +++ b/sd/source/ui/toolpanel/controls/makefile.mk @@ -59,8 +59,7 @@ SLOFILES = \ $(SLO)$/RecentMasterPagesSelector.obj \ $(SLO)$/CustomAnimationPanel.obj \ $(SLO)$/SlideTransitionPanel.obj \ - $(SLO)$/TableDesignPanel.obj \ - $(SLO)$/AnimationSchemesPanel.obj + $(SLO)$/TableDesignPanel.obj # --- Tagets ------------------------------------------------------- diff --git a/sd/source/ui/toolpanel/makefile.mk b/sd/source/ui/toolpanel/makefile.mk index 08a966fe4061..e59e37ff9e03 100644 --- a/sd/source/ui/toolpanel/makefile.mk +++ b/sd/source/ui/toolpanel/makefile.mk @@ -45,10 +45,8 @@ PRJINC=..$/slidesorter SLOFILES = \ $(SLO)$/ControlContainer.obj \ $(SLO)$/ScrollPanel.obj \ - $(SLO)$/SimpleLayoutWrapper.obj \ $(SLO)$/SubToolPanel.obj \ $(SLO)$/TitleBar.obj \ - $(SLO)$/TitleToolBox.obj \ $(SLO)$/TitledControl.obj \ $(SLO)$/ToolPanel.obj \ $(SLO)$/TaskPaneControlFactory.obj \ @@ -57,7 +55,6 @@ SLOFILES = \ $(SLO)$/TaskPaneTreeNode.obj \ $(SLO)$/TaskPaneViewShell.obj \ \ - $(SLO)$/EmptyWindow.obj \ $(SLO)$/LayoutMenu.obj \ $(SLO)$/TestMenu.obj \ $(SLO)$/TestPanel.obj \ diff --git a/sd/source/ui/tools/PropertySet.cxx b/sd/source/ui/tools/PropertySet.cxx index 010571b10927..9cf24dccd508 100644 --- a/sd/source/ui/tools/PropertySet.cxx +++ b/sd/source/ui/tools/PropertySet.cxx @@ -58,22 +58,6 @@ void SAL_CALL PropertySet::disposing (void) { } - - - -beans::UnknownPropertyException PropertySet::CreateUnknownPropertyException ( - const rtl::OUString& rsPropertyName) -{ - return beans::UnknownPropertyException( - OUString::createFromAscii("property ") - + rsPropertyName - + OUString::createFromAscii(" is not known"), - static_cast(this)); -} - - - - //----- XPropertySet ---------------------------------------------------------- Reference SAL_CALL PropertySet::getPropertySetInfo (void) diff --git a/sd/source/ui/tools/SdGlobalResourceContainer.cxx b/sd/source/ui/tools/SdGlobalResourceContainer.cxx index 878ef16a52f4..4ed95bbf5b99 100644 --- a/sd/source/ui/tools/SdGlobalResourceContainer.cxx +++ b/sd/source/ui/tools/SdGlobalResourceContainer.cxx @@ -152,31 +152,6 @@ void SdGlobalResourceContainer::AddResource (const Reference& rxReso - -::std::auto_ptr SdGlobalResourceContainer::ReleaseResource ( - SdGlobalResource* pResource) -{ - ::std::auto_ptr pResult (NULL); - - ::osl::MutexGuard aGuard (mpImpl->maMutex); - - Implementation::ResourceList::iterator iResource; - iResource = ::std::find ( - mpImpl->maResources.begin(), - mpImpl->maResources.end(), - pResource); - if (iResource != mpImpl->maResources.end()) - { - pResult.reset (*iResource); - mpImpl->maResources.erase(iResource); - } - - return pResult; -} - - - - SdGlobalResourceContainer::SdGlobalResourceContainer (void) : mpImpl (new SdGlobalResourceContainer::Implementation()) { diff --git a/sd/source/ui/tools/SlotStateListener.cxx b/sd/source/ui/tools/SlotStateListener.cxx index e8e2ffb24f2b..b3175b7fdb4a 100644 --- a/sd/source/ui/tools/SlotStateListener.cxx +++ b/sd/source/ui/tools/SlotStateListener.cxx @@ -45,16 +45,6 @@ using namespace ::rtl; namespace sd { namespace tools { -SlotStateListener::SlotStateListener (void) - : SlotStateListenerInterfaceBase(maMutex), - maCallback(), - mxDispatchProviderWeak(NULL) -{ -} - - - - SlotStateListener::SlotStateListener ( Link& rCallback, const uno::Reference& rxDispatchProvider, @@ -125,14 +115,6 @@ void SlotStateListener::ObserveSlot (const ::rtl::OUString& rSlotName) -bool SlotStateListener::IsValid (void) const -{ - return maRegisteredURLList.size() > 0; -} - - - - void SlotStateListener::disposing (void) { ReleaseListeners(); diff --git a/sd/source/ui/unoidl/DrawController.cxx b/sd/source/ui/unoidl/DrawController.cxx index acd57f18d85c..0b2bced0ae65 100644 --- a/sd/source/ui/unoidl/DrawController.cxx +++ b/sd/source/ui/unoidl/DrawController.cxx @@ -368,18 +368,6 @@ void SAL_CALL -::awt::Rectangle DrawController::GetVisArea (void) const -{ - return awt::Rectangle( - maLastVisArea.Left(), - maLastVisArea.Top(), - maLastVisArea.GetWidth(), - maLastVisArea.GetHeight()); -} - - - - // XDrawView void SAL_CALL DrawController::setCurrentPage( const Reference< drawing::XDrawPage >& xPage ) diff --git a/sd/source/ui/unoidl/SdUnoPresView.cxx b/sd/source/ui/unoidl/SdUnoPresView.cxx deleted file mode 100644 index dcd5001ace38..000000000000 --- a/sd/source/ui/unoidl/SdUnoPresView.cxx +++ /dev/null @@ -1,54 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_sd.hxx" - -#include "SdUnoPresView.hxx" - - -namespace sd { - - -SdUnoPresView::SdUnoPresView ( - DrawController& rController, - DrawViewShell& rViewShell, - View& rView) throw() - : SdUnoDrawView (rController, rViewShell, rView) -{ -} - - - - -SdUnoPresView::~SdUnoPresView (void) throw() -{ -} - - - -} // end of namespace sd diff --git a/sd/source/ui/unoidl/makefile.mk b/sd/source/ui/unoidl/makefile.mk index b3e71df86740..cf4910b29186 100644 --- a/sd/source/ui/unoidl/makefile.mk +++ b/sd/source/ui/unoidl/makefile.mk @@ -50,7 +50,6 @@ NOOPTFILES= $(SLO)$/unowcntr.obj SLO1FILES = \ $(SLO)$/DrawController.obj \ - $(SLO)$/SdUnoPresView.obj\ $(SLO)$/SdUnoSlideView.obj\ $(SLO)$/SdUnoOutlineView.obj\ $(SLO)$/SdUnoDrawView.obj \ @@ -66,7 +65,6 @@ SLO1FILES = \ $(SLO)$/unowcntr.obj \ $(SLO)$/unokywds.obj \ $(SLO)$/unopback.obj \ - $(SLO)$/unovwcrs.obj \ $(SLO)$/unodoc.obj \ $(SLO)$/unomodule.obj \ $(SLO)$/randomnode.obj diff --git a/sd/source/ui/unoidl/unocpres.cxx b/sd/source/ui/unoidl/unocpres.cxx index b8f48a6928aa..1935c424ec03 100644 --- a/sd/source/ui/unoidl/unocpres.cxx +++ b/sd/source/ui/unoidl/unocpres.cxx @@ -493,24 +493,3 @@ SdCustomShow * SdXCustomPresentationAccess::getSdCustomShow( const OUString& Nam } return NULL; } - -sal_Int32 SdXCustomPresentationAccess::getSdCustomShowIdx( const OUString& Name ) const throw() -{ - sal_Int32 nIdx = 0; - - List* pList = GetCustomShowList(); - const sal_Int32 nCount = pList?pList->Count():0; - - const String aName( Name ); - - while( nIdx < nCount ) - { - SdCustomShow* pShow = (SdCustomShow*)pList->GetObject(nIdx); - if( pShow->GetName() == aName ) - return nIdx; - nIdx++; - } - return -1; -} - - diff --git a/sd/source/ui/unoidl/unocpres.hxx b/sd/source/ui/unoidl/unocpres.hxx index 1267b3a58b0a..615d5ba7007c 100644 --- a/sd/source/ui/unoidl/unocpres.hxx +++ b/sd/source/ui/unoidl/unocpres.hxx @@ -124,7 +124,6 @@ private: // intern inline List* GetCustomShowList() const throw(); - sal_Int32 getSdCustomShowIdx( const ::rtl::OUString& Name ) const throw(); SdCustomShow * getSdCustomShow( const ::rtl::OUString& Name ) const throw(); public: diff --git a/sd/source/ui/unoidl/unoobj.cxx b/sd/source/ui/unoidl/unoobj.cxx index 54c3f88a6916..fdda65a3d970 100644 --- a/sd/source/ui/unoidl/unoobj.cxx +++ b/sd/source/ui/unoidl/unoobj.cxx @@ -311,14 +311,6 @@ typedef SORT* PSORT; extern "C" int __LOADONCALLAPI SortFunc( const void* p1, const void* p2 ); -SdXShape::SdXShape() throw() -: mpPropSet(lcl_GetEmpty_SdXShapePropertySet_Impl()), - mpMap(lcl_GetEmpty_SdXShapePropertyMap_Impl()), - mpModel(NULL), - mpImplementationId(NULL) -{ -} - SdXShape::SdXShape( SvxShape* pShape, SdXImpressDocument* pModel) throw() : mpShape( pShape ), mpPropSet( pModel? diff --git a/sd/source/ui/unoidl/unoobj.hxx b/sd/source/ui/unoidl/unoobj.hxx index 3e7c3fab7d3c..0e472f41ff16 100644 --- a/sd/source/ui/unoidl/unoobj.hxx +++ b/sd/source/ui/unoidl/unoobj.hxx @@ -75,7 +75,6 @@ private: com::sun::star::uno::Sequence< sal_Int8 >* mpImplementationId; public: - SdXShape() throw(); SdXShape(SvxShape* pShape, SdXImpressDocument* pModel) throw(); virtual ~SdXShape() throw(); diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx index 69d961d7237a..4e012422e471 100644 --- a/sd/source/ui/unoidl/unopage.cxx +++ b/sd/source/ui/unoidl/unopage.cxx @@ -345,7 +345,34 @@ const SvxItemPropertySet* ImplGetMasterPagePropertySet( PageKind ePageKind ) return pRet; } -UNO3_GETIMPLEMENTATION2_IMPL( SdGenericDrawPage, SvxFmDrawPage ); +const ::com::sun::star::uno::Sequence< sal_Int8 > & SdGenericDrawPage::getUnoTunnelId() throw() +{ + static ::com::sun::star::uno::Sequence< sal_Int8 > * pSeq = 0; + if( !pSeq ) + { + ::osl::Guard< ::osl::Mutex > aGuard( ::osl::Mutex::getGlobalMutex() ); + if( !pSeq ) + { + static ::com::sun::star::uno::Sequence< sal_Int8 > aSeq( 16 ); + rtl_createUuid( (sal_uInt8*)aSeq.getArray(), 0, sal_True ); + pSeq = &aSeq; + } + } + return *pSeq; +} + +sal_Int64 SAL_CALL SdGenericDrawPage::getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& rId ) throw(::com::sun::star::uno::RuntimeException) +{ + if( rId.getLength() == 16 && 0 == rtl_compareMemory( getUnoTunnelId().getConstArray(), + rId.getConstArray(), 16 ) ) + { + return sal::static_int_cast(reinterpret_cast(this)); + } + else + { + return SvxFmDrawPage::getSomething( rId ); + } +} /*********************************************************************** * * diff --git a/sd/source/ui/unoidl/unopage.hxx b/sd/source/ui/unoidl/unopage.hxx index 52e5cc061f7d..5d525b0f0f04 100644 --- a/sd/source/ui/unoidl/unopage.hxx +++ b/sd/source/ui/unoidl/unopage.hxx @@ -113,7 +113,8 @@ public: SdPage* GetPage() const { return (SdPage*)SvxDrawPage::mpPage; } SdXImpressDocument* GetModel() const; - UNO3_GETIMPLEMENTATION_DECL( SdGenericDrawPage ) + static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId() throw(); + virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException); // this is called whenever a SdrObject must be created for a empty api shape wrapper virtual SdrObject *_CreateSdrObject( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& xShape ) throw(); diff --git a/sd/source/ui/unoidl/unosrch.cxx b/sd/source/ui/unoidl/unosrch.cxx index a1cd11861d3a..56133e03a375 100644 --- a/sd/source/ui/unoidl/unosrch.cxx +++ b/sd/source/ui/unoidl/unosrch.cxx @@ -105,11 +105,6 @@ SdUnoSearchReplaceShape::SdUnoSearchReplaceShape( drawing::XDrawPage* pPage ) th mpPage = pPage; } -SdUnoSearchReplaceShape::SdUnoSearchReplaceShape( drawing::XShape* pShape ) throw() -{ - mpShape = pShape; -} - SdUnoSearchReplaceShape::~SdUnoSearchReplaceShape() throw() { } diff --git a/sd/source/ui/unoidl/unovwcrs.cxx b/sd/source/ui/unoidl/unovwcrs.cxx deleted file mode 100644 index 8b72cbe1fd96..000000000000 --- a/sd/source/ui/unoidl/unovwcrs.cxx +++ /dev/null @@ -1,209 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_sd.hxx" -#include -#include -#include -#include -#include "View.hxx" -#ifndef SVX_LIGHT -#ifndef SD_DRAW_DOC_SHELL_HXX -#include "DrawDocShell.hxx" -#endif -#endif -#include "ViewShell.hxx" -#include "slideshow.hxx" - -#include -#include - -using namespace ::vos; -using namespace ::rtl; -using namespace ::com::sun::star; - -class SdXTextViewCursor - : public ::cppu::WeakImplHelper2< - text::XTextViewCursor, - view::XScreenCursor > -{ -public: - SdXTextViewCursor(::sd::View* pVw) throw(); - virtual ~SdXTextViewCursor() throw(); - - //XTextViewCursor - virtual sal_Bool SAL_CALL isVisible(void) throw( uno::RuntimeException ); - virtual void SAL_CALL setVisible(sal_Bool bVisible) throw( uno::RuntimeException ); - virtual awt::Point SAL_CALL getPosition(void) throw( uno::RuntimeException ); - - //XTextCursor - virtual void SAL_CALL collapseToStart(void) throw( uno::RuntimeException ); - virtual void SAL_CALL collapseToEnd(void) throw( uno::RuntimeException ); - virtual sal_Bool SAL_CALL isCollapsed(void) throw( uno::RuntimeException ); - virtual sal_Bool SAL_CALL goLeft(sal_Int16 nCount, sal_Bool Expand) throw( uno::RuntimeException ); - virtual sal_Bool SAL_CALL goRight(sal_Int16 nCount, sal_Bool Expand) throw( uno::RuntimeException ); - virtual void SAL_CALL gotoStart(sal_Bool Expand) throw( uno::RuntimeException ); - virtual void SAL_CALL gotoEnd(sal_Bool Expand) throw( uno::RuntimeException ); - virtual void SAL_CALL gotoRange(const uno::Reference< text::XTextRange > & rRange, sal_Bool bExpand ) throw (::com::sun::star::uno::RuntimeException); - - //XTextRange - virtual uno::Reference< text::XText > SAL_CALL getText(void) throw( uno::RuntimeException ); - virtual uno::Reference< text::XTextRange > SAL_CALL getStart(void) throw( uno::RuntimeException ); - virtual uno::Reference< text::XTextRange > SAL_CALL getEnd(void) throw( uno::RuntimeException ); - virtual OUString SAL_CALL getString(void) throw( uno::RuntimeException ); - virtual void SAL_CALL setString(const OUString& aString) throw( uno::RuntimeException ); - - //XScreenCursor - virtual sal_Bool SAL_CALL screenDown(void) throw( uno::RuntimeException ); - virtual sal_Bool SAL_CALL screenUp(void) throw( uno::RuntimeException ); - - void Invalidate() { mpView = 0; } - -private: - ::sd::View* mpView; -}; - - -text::XTextViewCursor* CreateSdXTextViewCursor(::sd::View* mpView ) -{ - return new SdXTextViewCursor( mpView ); -} - -SdXTextViewCursor::SdXTextViewCursor(::sd::View* pSdView ) throw() - : mpView(pSdView) -{ - -} - -SdXTextViewCursor::~SdXTextViewCursor() throw() -{ -} - -sal_Bool SdXTextViewCursor::isVisible(void) throw( uno::RuntimeException ) -{ - DBG_WARNING("not implemented"); - return sal_True; -} - -void SdXTextViewCursor::setVisible(sal_Bool ) throw( uno::RuntimeException ) -{ - DBG_WARNING("not implemented"); -} - -awt::Point SdXTextViewCursor::getPosition(void) throw( uno::RuntimeException ) -{ - DBG_WARNING("not implemented"); - return awt::Point(); -} - -void SdXTextViewCursor::collapseToStart(void) throw( uno::RuntimeException ) -{ - DBG_WARNING("not implemented"); -} - -void SdXTextViewCursor::collapseToEnd(void) throw( uno::RuntimeException ) -{ - DBG_WARNING("not implemented"); -} - -sal_Bool SdXTextViewCursor::isCollapsed(void) throw( uno::RuntimeException ) -{ - DBG_WARNING("not implemented"); - return sal_True; - -} - -sal_Bool SdXTextViewCursor::goLeft(sal_Int16 , sal_Bool ) throw( uno::RuntimeException ) -{ - DBG_WARNING("not implemented"); - return sal_False; -} - -sal_Bool SdXTextViewCursor::goRight(sal_Int16, sal_Bool ) throw( uno::RuntimeException ) -{ - DBG_WARNING("not implemented"); - return sal_False; -} - -void SdXTextViewCursor::gotoRange(const uno::Reference< text::XTextRange > &, sal_Bool ) throw (::com::sun::star::uno::RuntimeException) -{ - DBG_WARNING("not implemented"); -} - -void SdXTextViewCursor::gotoStart(sal_Bool ) throw( uno::RuntimeException ) -{ - DBG_WARNING("not implemented"); -} - -void SdXTextViewCursor::gotoEnd(sal_Bool ) throw( uno::RuntimeException ) -{ - DBG_WARNING("not implemented"); -} - -sal_Bool SdXTextViewCursor::screenDown(void) throw( uno::RuntimeException ) -{ - OGuard aGuard(Application::GetSolarMutex()); - return sal_False; -} - -sal_Bool SdXTextViewCursor::screenUp(void) throw( uno::RuntimeException ) -{ - OGuard aGuard(Application::GetSolarMutex()); - return sal_False; -} - -uno::Reference< text::XText > SdXTextViewCursor::getText(void) throw( uno::RuntimeException ) -{ - DBG_WARNING("not implemented"); - return uno::Reference< text::XText > (); -} - -uno::Reference< text::XTextRange > SdXTextViewCursor::getStart(void) throw( uno::RuntimeException ) -{ - DBG_WARNING("not implemented"); - return uno::Reference< text::XTextRange > (); -} - -uno::Reference< text::XTextRange > SdXTextViewCursor::getEnd(void) throw( uno::RuntimeException ) -{ - DBG_WARNING("not implemented"); - return uno::Reference< text::XTextRange > (); -} - -OUString SdXTextViewCursor::getString(void) throw( uno::RuntimeException ) -{ - DBG_WARNING("not implemented"); - return OUString(); -} - -void SdXTextViewCursor::setString(const OUString& ) throw( uno::RuntimeException ) -{ - DBG_WARNING("not implemented"); -} - - diff --git a/sd/source/ui/unoidl/unowcntr.cxx b/sd/source/ui/unoidl/unowcntr.cxx index fbb9991981f9..e29ee1e1516e 100644 --- a/sd/source/ui/unoidl/unowcntr.cxx +++ b/sd/source/ui/unoidl/unowcntr.cxx @@ -77,31 +77,6 @@ void SvUnoWeakContainer::insert( uno::WeakReference< uno::XInterface > xRef ) th mpList->Insert( new uno::WeakReference< uno::XInterface >( xRef ) ); } -/** removes the given ref from this container */ -void SvUnoWeakContainer::remove( uno::WeakReference< uno::XInterface > xRef ) throw() -{ - uno::WeakReference< uno::XInterface >* pRef = mpList->First(); - while( pRef ) - { - uno::Reference< uno::XInterface > xTestRef( *pRef ); - if(!xTestRef.is()) - { - delete mpList->Remove(); - pRef = mpList->GetCurObject(); - } - else - { - if( *pRef == xRef ) - { - delete mpList->Remove(); - break; - } - - pRef = mpList->Next(); - } - } -} - /** searches the container for a ref that returns true on the given search function */ diff --git a/sd/source/ui/unoidl/unowcntr.hxx b/sd/source/ui/unoidl/unowcntr.hxx index 86d68f3c4d22..a35c27cfd583 100644 --- a/sd/source/ui/unoidl/unowcntr.hxx +++ b/sd/source/ui/unoidl/unowcntr.hxx @@ -46,9 +46,6 @@ public: /** inserts the given ref into this container */ void insert( ::com::sun::star::uno::WeakReference< ::com::sun::star::uno::XInterface > xRef ) throw(); - /** removes the given ref from this container */ - void remove( ::com::sun::star::uno::WeakReference< ::com::sun::star::uno::XInterface > xRef ) throw(); - /** searches the container for a ref that returns true on the given search function */ diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx index 5314f6dbe768..ed3777d49082 100644 --- a/sd/source/ui/view/Outliner.cxx +++ b/sd/source/ui/view/Outliner.cxx @@ -318,11 +318,6 @@ void Outliner::StartSpelling (void) mpSearchItem = NULL; } -/** Proxy for method from base class to avoid compiler warning */ -void Outliner::StartSpelling(EditView& rView, unsigned char c) -{ - SdrOutliner::StartSpelling( rView, c ); -} /** Free all resources acquired during the search/spell check. After a spell check the start position is restored here. @@ -425,23 +420,6 @@ BOOL Outliner::SpellNextDocument (void) } -void Outliner::HandleOutsideChange (ChangeHint eHint) -{ - switch (eHint) - { - case CH_VIEW_SHELL_INVALID: - EndSpelling(); - mbPrepareSpellingPending = true; - mbViewShellValid = false; - break; - - case CH_VIEW_SHELL_VALID: - mbViewShellValid = true; - break; - } -} - - /************************************************************************* |* @@ -1076,23 +1054,6 @@ void Outliner::EndOfSearch (void) } } - - - -void Outliner::InitPage (USHORT nPageIndex) -{ - (void)nPageIndex; - - ::sd::outliner::IteratorPosition aPosition (*maObjectIterator); - if (aPosition.meEditMode == EM_PAGE) - mnPageCount = mpDrawDocument->GetSdPageCount(aPosition.mePageKind); - else - mnPageCount = mpDrawDocument->GetMasterSdPageCount(aPosition.mePageKind); -} - - - - void Outliner::ShowEndOfSearchDialog (void) { String aString; @@ -1475,36 +1436,6 @@ bool Outliner::HandleFailedSearch (void) } -#if ENABLE_LAYOUT -#define SvxSearchDialog Window -#endif - -/** See task #95227# for discussion about correct parent for dialogs/info boxes. -*/ -::Window* Outliner::GetParentForDialog (void) -{ - ::Window* pParent = NULL; - - if (meMode == SEARCH) - pParent = static_cast( - SfxViewFrame::Current()->GetChildWindow( - SvxSearchDialogWrapper::GetChildWindowId())->GetWindow()); - - if (pParent == NULL) - pParent = mpViewShell->GetActiveWindow(); - - if (pParent == NULL) - pParent = Application::GetDefDialogParent(); - //1.30->1.31 of sdoutl.cxx pParent = Application::GetDefModalDialogParent(); - - return pParent; -} - -#if ENABLE_LAYOUT -#undef SvxSearchDialog -#endif - - SdrObject* Outliner::SetObject ( const ::sd::outliner::IteratorPosition& rPosition) { diff --git a/sd/source/ui/view/OutlinerIterator.cxx b/sd/source/ui/view/OutlinerIterator.cxx index 81f9a50d256d..226d767c6c91 100644 --- a/sd/source/ui/view/OutlinerIterator.cxx +++ b/sd/source/ui/view/OutlinerIterator.cxx @@ -67,15 +67,6 @@ IteratorPosition::IteratorPosition (const IteratorPosition& aPosition) { } -IteratorPosition::IteratorPosition (SdrObject* pObject, sal_Int32 nText, sal_Int32 nPageIndex, PageKind ePageKind, EditMode eEditMode) -: mxObject(pObject) -, mnText(nText) -, mnPageIndex(nPageIndex) -, mePageKind(ePageKind) -, meEditMode(eEditMode) -{ -} - IteratorPosition::~IteratorPosition (void) { } @@ -119,11 +110,6 @@ Iterator::Iterator (IteratorImplBase* pObject) mpIterator = pObject; } -Iterator::Iterator (const IteratorImplBase& rObject) -{ - mpIterator = rObject.Clone(); -} - Iterator::~Iterator (void) { delete mpIterator; @@ -266,28 +252,6 @@ Iterator OutlinerContainer::CreateSelectionIterator ( rObjectList, nObjectIndex, pDocument, rpViewShell, bDirectionIsForward)); } -Iterator OutlinerContainer::CreateViewIterator ( - SdDrawDocument* pDocument, - const ::boost::shared_ptr& rpViewShell, - bool bDirectionIsForward, - IteratorLocation aLocation) -{ - OSL_ASSERT(rpViewShell.get()); - - const ::boost::shared_ptr pDrawViewShell( - ::boost::dynamic_pointer_cast(rpViewShell)); - sal_Int32 nPageIndex = GetPageIndex ( - pDocument, - rpViewShell, - pDrawViewShell.get() ? pDrawViewShell->GetPageKind() : PK_STANDARD, - pDrawViewShell.get() ? pDrawViewShell->GetEditMode() : EM_PAGE, - bDirectionIsForward, - aLocation); - - return Iterator (new ViewIteratorImpl ( - nPageIndex, pDocument, rpViewShell, bDirectionIsForward)); -} - Iterator OutlinerContainer::CreateDocumentIterator ( SdDrawDocument* pDocument, const ::boost::shared_ptr& rpViewShell, diff --git a/sd/source/ui/view/ToolBarManager.cxx b/sd/source/ui/view/ToolBarManager.cxx index 4919a9fe2bbb..ce3064392d40 100644 --- a/sd/source/ui/view/ToolBarManager.cxx +++ b/sd/source/ui/view/ToolBarManager.cxx @@ -119,10 +119,9 @@ private: /** Manage tool bars that are implemented as sub shells of a view shell. The typical procedure of updating the sub shells of a view shell is to rebuild a list of sub shells that the caller would like to have active. - The methods ClearGroup(), AddShellId(), and RemoveShellId() allow the - caller to do that. A final call to UpdateShells() activates the - requested shells that are not active and deactivates the active shells - that are not requested. + The methods ClearGroup() and AddShellId() allow the caller to do that. A + final call to UpdateShells() activates the requested shells that are not + active and deactivates the active shells that are not requested . This is done by maintaining two lists. One (the current list) reflects the current state. The other (the requested list) contains the @@ -157,18 +156,6 @@ public: */ void AddShellId (sd::ToolBarManager::ToolBarGroup eGroup, sd::ShellId nId); - /** Remove a shell. This is done only when the specified shell is a - member of the specified group. If it has been requested for another - group or if it has not been requested then this call is ignored. - @param eGroup - The group from which to remove the shell. - @param nId - The id of the shell to remove. - @return - Returns whether the shell is removed. - */ - bool RemoveShellId (sd::ToolBarManager::ToolBarGroup eGroup, sd::ShellId nId); - /** Releasing all shells means that the given ToolBarRules object is informed that every shell mananged by the called ToolBarShellList is about to be removed and that the associated framework tool bars can @@ -296,7 +283,6 @@ public: void AddToolBar (ToolBarGroup eGroup, const ::rtl::OUString& rsToolBarName); void AddToolBarShell (ToolBarGroup eGroup, ShellId nToolBarId); void RemoveToolBar (ToolBarGroup eGroup, const ::rtl::OUString& rsToolBarName); - void RemoveToolBarShell (ToolBarGroup eGroup, ShellId nToolBarId); /** Release all tool bar shells and the associated framework tool bars. Typically called when the main view shell is being replaced by @@ -332,7 +318,6 @@ public: }; void LockViewShellManager (void); - bool IsUpdateLocked (void) const; void LockUpdate (void); void UnlockUpdate (void); @@ -430,15 +415,6 @@ void ToolBarManager::Shutdown (void) -void ToolBarManager::SetValid (bool bValid) -{ - if (mpImpl.get() != NULL) - mpImpl->SetValid(bValid); -} - - - - void ToolBarManager::ResetToolBars (ToolBarGroup eGroup) { if (mpImpl.get() != NULL) @@ -505,20 +481,6 @@ void ToolBarManager::RemoveToolBar ( -void ToolBarManager::RemoveToolBarShell ( - ToolBarGroup eGroup, - ShellId nToolBarId) -{ - if (mpImpl.get() != NULL) - { - UpdateLock aLock (shared_from_this()); - mpImpl->RemoveToolBarShell(eGroup,nToolBarId); - } -} - - - - void ToolBarManager::SetToolBar ( ToolBarGroup eGroup, const ::rtl::OUString& rsToolBarName) @@ -576,17 +538,6 @@ void ToolBarManager::LockViewShellManager (void) -bool ToolBarManager::IsUpdateLocked (void) const -{ - if (mpImpl.get() != NULL) - return mpImpl->IsUpdateLocked(); - else - return false; -} - - - - void ToolBarManager::LockUpdate (void) { if (mpImpl.get()!=NULL) @@ -819,21 +770,6 @@ void ToolBarManager::Implementation::AddToolBarShell ( -void ToolBarManager::Implementation::RemoveToolBarShell ( - ToolBarGroup eGroup, - ShellId nToolBarId) -{ - ViewShell* pMainViewShell = mrBase.GetMainViewShell().get(); - if (pMainViewShell != NULL) - { - GetToolBarRules().SubShellRemoved(eGroup, nToolBarId); - maToolBarShellList.RemoveShellId(eGroup,nToolBarId); - } -} - - - - void ToolBarManager::Implementation::ReleaseAllToolBarShells (void) { maToolBarShellList.ReleaseAllShells(GetToolBarRules()); @@ -946,14 +882,6 @@ void ToolBarManager::Implementation::LockViewShellManager (void) -bool ToolBarManager::Implementation::IsUpdateLocked (void) const -{ - return mnLockCount; -} - - - - void ToolBarManager::Implementation::LockUpdate (void) { #ifdef VERBOSE @@ -1705,26 +1633,6 @@ void ToolBarShellList::AddShellId (sd::ToolBarManager::ToolBarGroup eGroup, sd:: -bool ToolBarShellList::RemoveShellId (sd::ToolBarManager::ToolBarGroup eGroup, sd::ShellId nId) -{ - bool bRemoved (false); - - GroupedShellList::iterator iDescriptor (maNewList.find(ShellDescriptor(nId,eGroup))); - if (iDescriptor != maNewList.end()) - { - if (iDescriptor->meGroup == eGroup) - { - maNewList.erase(iDescriptor); - bRemoved = true; - } - } - - return bRemoved; -} - - - - void ToolBarShellList::ReleaseAllShells (ToolBarRules& rRules) { // Release the currently active tool bars. diff --git a/sd/source/ui/view/ViewShellBase.cxx b/sd/source/ui/view/ViewShellBase.cxx index 6640d2455c20..813302136932 100644 --- a/sd/source/ui/view/ViewShellBase.cxx +++ b/sd/source/ui/view/ViewShellBase.cxx @@ -163,8 +163,6 @@ public: ::boost::shared_ptr mpFormShellManager; - ::boost::shared_ptr mpCustomHandleManager; - Implementation (ViewShellBase& rBase); ~Implementation (void); @@ -460,13 +458,6 @@ ViewShellBase* ViewShellBase::GetViewShellBase (SfxViewFrame* pViewFrame) -void ViewShellBase::GetMenuState (SfxItemSet& ) -{ -} - - - - DrawDocShell* ViewShellBase::GetDocShell (void) const { return mpDocShell; @@ -712,21 +703,6 @@ ErrCode ViewShellBase::DoPrint ( -USHORT ViewShellBase::SetPrinterOptDlg ( - SfxPrinter* pNewPrinter, - USHORT nDiffFlags, - BOOL bShowDialog) -{ - (void)pNewPrinter; - (void)nDiffFlags; - (void)bShowDialog; - return 0; - // return mpImpl->mpPrintManager->SetPrinterOptDlg ( pNewPrinter, nDiffFlags, bShowDialog); -} - - - - void ViewShellBase::PreparePrint (PrintDialog* pPrintDialog) { SfxViewShell::PreparePrint (pPrintDialog); @@ -1247,16 +1223,6 @@ void ViewShellBase::SetViewTabBar (const ::rtl::Reference& rViewTabB -CustomHandleManager& ViewShellBase::getCustomHandleManager() const -{ - OSL_ASSERT(mpImpl.get()!=NULL); - - if( !mpImpl->mpCustomHandleManager.get() ) - mpImpl->mpCustomHandleManager.reset( new ::sd::CustomHandleManager(*const_cast< ViewShellBase* >(this)) ); - - return *mpImpl->mpCustomHandleManager.get(); -} - ::rtl::OUString ViewShellBase::RetrieveLabelFromCommand( const ::rtl::OUString& aCmdURL ) const { ::rtl::OUString aLabel; @@ -1813,34 +1779,4 @@ void FocusForwardingWindow::Command (const CommandEvent& rEvent) } // end of anonymouse namespace -// ==================================================================== - -CustomHandleManager::CustomHandleManager( ViewShellBase& rViewShellBase ) -: mrViewShellBase( rViewShellBase ) -{ -} - -CustomHandleManager::~CustomHandleManager() -{ - DBG_ASSERT( maSupplier.empty(), "sd::CustomHandleManager::~CustomHandleManager(), still suppliers attached!" ); -} - -void CustomHandleManager::registerSupplier( ICustomhandleSupplier* pSupplier ) -{ - maSupplier.insert( pSupplier ); -} - -void CustomHandleManager::unRegisterSupplier( ICustomhandleSupplier* pSupplier ) -{ - maSupplier.erase( pSupplier ); -} - -void CustomHandleManager::addCustomHandler( SdrView& rSourceView, ViewShell::ShellType eShellType, SdrHdlList& rHandlerList ) -{ - for( std::set< ICustomhandleSupplier* >::iterator aIter( maSupplier.begin() ); aIter != maSupplier.end(); aIter++ ) - { - (*aIter)->addCustomHandler( rSourceView, eShellType, rHandlerList ); - } -} - } // end of namespace sd diff --git a/sd/source/ui/view/ViewShellImplementation.cxx b/sd/source/ui/view/ViewShellImplementation.cxx index 8193ae3004d2..463a05b530aa 100644 --- a/sd/source/ui/view/ViewShellImplementation.cxx +++ b/sd/source/ui/view/ViewShellImplementation.cxx @@ -69,48 +69,6 @@ using namespace ::com::sun::star::uno; using namespace ::com::sun::star::drawing::framework; using ::sd::framework::FrameworkHelper; -namespace { - -class ImpUndoDeleteWarning : public ModalDialog -{ -private: - FixedImage maImage; - FixedText maWarningFT; - CheckBox maDisableCB; - OKButton maYesBtn; - CancelButton maNoBtn; - -public: - ImpUndoDeleteWarning(Window* pParent); - BOOL IsWarningDisabled() const { return maDisableCB.IsChecked(); } -}; - -ImpUndoDeleteWarning::ImpUndoDeleteWarning(Window* pParent) -: ModalDialog(pParent, SdResId(RID_UNDO_DELETE_WARNING)), - maImage(this, SdResId(IMG_UNDO_DELETE_WARNING)), - maWarningFT(this, SdResId(FT_UNDO_DELETE_WARNING)), - maDisableCB(this, SdResId(CB_UNDO_DELETE_DISABLE)), - maYesBtn(this, SdResId(BTN_UNDO_DELETE_YES)), - maNoBtn(this, SdResId(BTN_UNDO_DELETE_NO)) -{ - FreeResource(); - - SetHelpId( HID_SD_UNDODELETEWARNING_DLG ); - maDisableCB.SetHelpId( HID_SD_UNDODELETEWARNING_CBX ); - - maYesBtn.SetText(Button::GetStandardText(BUTTON_YES)); - maNoBtn.SetText(Button::GetStandardText(BUTTON_NO)); - maImage.SetImage(WarningBox::GetStandardImage()); - - // #93721# Set focus to YES-Button - maYesBtn.GrabFocus(); -} - -} // end of anonymous namespace - - - - namespace sd { ViewShell::Implementation::Implementation (ViewShell& rViewShell) diff --git a/sd/source/ui/view/ViewShellManager.cxx b/sd/source/ui/view/ViewShellManager.cxx index 3ea4ef7a96f3..681536f34160 100755 --- a/sd/source/ui/view/ViewShellManager.cxx +++ b/sd/source/ui/view/ViewShellManager.cxx @@ -124,10 +124,6 @@ public: void RemoveShellFactory ( const SfxShell* pViewShell, const SharedShellFactory& rpFactory); - ViewShell* ActivateViewShell ( - ShellId nId, - ::Window* pParentWindow, - FrameView* pFrameView); void ActivateViewShell ( ViewShell* pViewShell); void DeactivateViewShell (const ViewShell& rShell); @@ -137,13 +133,10 @@ public: void SetFormShell (const ViewShell* pViewShell, FmFormShell* pFormShell, bool bAbove); void ActivateSubShell (const SfxShell& rParentShell, ShellId nId); void DeactivateSubShell (const SfxShell& rParentShell, ShellId nId); - void DeactivateAllSubShells (const SfxShell& rViewShell); void MoveSubShellToTop (const SfxShell& rParentShell, ShellId nId); void MoveToTop (const SfxShell& rParentShell); SfxShell* GetShell (ShellId nId) const; SfxShell* GetTopShell (void) const; - ShellId GetShellId (const SfxShell* pShell) const; - void ReplaceUndoManager (SfxUndoManager* pManager, SfxUndoManager* pReplacement); void Shutdown (void); void InvalidateAllSubShells (const SfxShell* pParentShell); @@ -235,7 +228,6 @@ private: DECL_LINK(WindowEventHandler, VclWindowEvent*); - void DumpActiveShell (const ActiveShellList& rList); void DumpShellStack (const ShellStack& rStack); void DumpSfxShellStack (void); @@ -246,10 +238,6 @@ private: */ void Deactivate (SfxShell* pShell); - ShellDescriptor CreateViewShell ( - ShellId nShellId, - ::Window* pParentWindow, - FrameView* pFrameView); ShellDescriptor CreateSubShell ( SfxShell* pShell, ShellId nShellId, @@ -304,20 +292,6 @@ void ViewShellManager::RemoveSubShellFactory ( -ViewShell* ViewShellManager::ActivateViewShell ( - ShellId nShellId, - ::Window* pParentWindow, - FrameView* pFrameView) -{ - if (mbValid) - return mpImpl->ActivateViewShell(nShellId,pParentWindow,pFrameView); - else - return NULL; -} - - - - void ViewShellManager::ActivateViewShell (ViewShell* pViewShell) { if (mbValid) @@ -377,15 +351,6 @@ void ViewShellManager::DeactivateSubShell (const ViewShell& rViewShell, ShellId -void ViewShellManager::DeactivateAllSubShells (const ViewShell& rViewShell) -{ - if (mbValid) - mpImpl->DeactivateAllSubShells(rViewShell); -} - - - - void ViewShellManager::InvalidateAllSubShells (ViewShell* pViewShell) { if (mbValid) @@ -413,15 +378,6 @@ void ViewShellManager::DeactivateShell (const SfxShell* pShell) -void ViewShellManager::InvalidateShellStack (const SfxShell* pShell) -{ - if (mbValid) - mpImpl->TakeShellsFromStack(pShell); -} - - - - void ViewShellManager::MoveToTop (const ViewShell& rParentShell) { if (mbValid) @@ -453,26 +409,6 @@ SfxShell* ViewShellManager::GetTopShell (void) const -ShellId ViewShellManager::GetShellId (const SfxShell* pShell) const -{ - if (mbValid) - return mpImpl->GetShellId(pShell); - else - return snInvalidShellId; -} - - - - -void ViewShellManager::ReplaceUndoManager (SfxUndoManager* pManager, SfxUndoManager* pReplacement) -{ - if (mbValid) - mpImpl->ReplaceUndoManager(pManager,pReplacement); -} - - - - void ViewShellManager::Shutdown (void) { if (mbValid) @@ -572,24 +508,6 @@ void ViewShellManager::Implementation::RemoveShellFactory ( -ViewShell* ViewShellManager::Implementation::ActivateViewShell ( - ShellId nShellId, - ::Window* pParentWindow, - FrameView* pFrameView) -{ - ::osl::MutexGuard aGuard (maMutex); - - // Create a new shell or recycle on in the cache. - ShellDescriptor aDescriptor (CreateViewShell(nShellId, pParentWindow, pFrameView)); - - ActivateShell(aDescriptor); - - return dynamic_cast(aDescriptor.mpShell); -} - - - - void ViewShellManager::Implementation::ActivateViewShell (ViewShell* pViewShell) { ::osl::MutexGuard aGuard (maMutex); @@ -953,66 +871,6 @@ SfxShell* ViewShellManager::Implementation::GetTopShell (void) const -ShellId ViewShellManager::Implementation::GetShellId (const SfxShell* pShell) const -{ - ::osl::MutexGuard aGuard (maMutex); - - ShellId nId = snInvalidShellId; - - // First search the active view shells. - const ViewShell* pViewShell = dynamic_cast(pShell); - if (pShell != NULL) - { - ActiveShellList::const_iterator iShell ( - ::std::find_if ( - maActiveViewShells.begin(), - maActiveViewShells.end(), - IsShell(pViewShell))); - if (iShell != maActiveViewShells.end()) - nId = iShell->mnId; - } - if (nId == snInvalidShellId) - { - // Now search the active sub shells of every active view shell. - SubShellList::const_iterator iList; - for (iList=maActiveSubShells.begin(); iList!=maActiveSubShells.end(); ++iList) - { - const SubShellSubList& rList (iList->second); - SubShellSubList::const_iterator iSubShell( - ::std::find_if(rList.begin(),rList.end(), IsShell(pShell))); - if (iSubShell != rList.end()) - { - nId = iSubShell->mnId; - break; - } - } - } - - return nId; -} - - - - -void ViewShellManager::Implementation::ReplaceUndoManager ( - SfxUndoManager* pManager, - SfxUndoManager* pReplacement) -{ - for (USHORT i=0; ;++i) - { - SfxShell* pShell = mrBase.GetSubShell(i); - if (pShell == NULL) - break; - if (pShell->GetUndoManager() == pManager) - pShell->SetUndoManager(pReplacement); - } -} - - - - - - void ViewShellManager::Implementation::LockUpdate (void) { mnUpdateLockCount++; @@ -1333,44 +1191,6 @@ IMPL_LINK(ViewShellManager::Implementation, WindowEventHandler, VclWindowEvent*, -ShellDescriptor ViewShellManager::Implementation::CreateViewShell ( - ShellId nShellId, - ::Window* pParentWindow, - FrameView* pFrameView) -{ - ShellDescriptor aResult; - - if (pParentWindow != NULL) - { - ShellDescriptor aDescriptor ( - CreateSubShell(NULL,nShellId,pParentWindow,pFrameView)); - aResult.mpShell = dynamic_cast(aDescriptor.mpShell); - aResult.mpFactory = aDescriptor.mpFactory; - aResult.mnId = aDescriptor.mnId; - - // Register as window listener so that the shells of the current - // window can be moved to the top of the shell stack. - if (aResult.mpShell != NULL) - { - ::Window* pWindow = aResult.GetWindow(); - if (pWindow != NULL) - pWindow->AddEventListener( - LINK(this, ViewShellManager::Implementation, WindowEventHandler)); - else - { - DBG_ASSERT (false, - "ViewShellManager::ActivateViewShell: " - "new view shell has no active window"); - } - } - } - - return aResult; -} - - - - ShellDescriptor ViewShellManager::Implementation::CreateSubShell ( SfxShell* pParentShell, ShellId nShellId, @@ -1499,15 +1319,6 @@ void ViewShellManager::Implementation::Shutdown (void) -void ViewShellManager::Implementation::DumpActiveShell (const ActiveShellList& rList) -{ - for (ActiveShellList::const_iterator aI=rList.begin(); aI!=rList.end(); ++aI) - OSL_TRACE (" %d %p\r", aI->mnId, aI->mpShell); -} - - - - void ViewShellManager::Implementation::DumpShellStack (const ShellStack& rStack) { ShellStack::const_reverse_iterator iEntry; @@ -1580,24 +1391,6 @@ void ViewShellManager::Implementation::SetFormShell ( -void ViewShellManager::Implementation::DeactivateAllSubShells ( - const SfxShell& rViewShell) -{ - ::osl::MutexGuard aGuard (maMutex); - - SubShellList::iterator iList (maActiveSubShells.find(&rViewShell)); - if (iList != maActiveSubShells.end()) - { - SubShellSubList& rList (iList->second); - UpdateLock aLock (*this); - while ( ! rList.empty()) - DeactivateSubShell(rViewShell, rList.front().mnId); - } -} - - - - namespace { ShellDescriptor::ShellDescriptor (void) diff --git a/sd/source/ui/view/bmcache.cxx b/sd/source/ui/view/bmcache.cxx index d8781733c520..c7f313037ff8 100644 --- a/sd/source/ui/view/bmcache.cxx +++ b/sd/source/ui/view/bmcache.cxx @@ -58,115 +58,6 @@ BitmapCache::~BitmapCache() } } -/************************************************************************* -|* -|* Cache-Eintrag einfuegen -|* -\************************************************************************/ - -void BitmapCache::Add(const SdPage* pPage, const Bitmap& rBmp, long nZoom) -{ - BitmapCacheEntry* pEntry = NULL; - ULONG nSizeOfBitmap = rBmp.GetSizeBytes(); - - if( nSizeOfBitmap < nMaxSize ) - { - while (nCurSize + nSizeOfBitmap > nMaxSize) - { - if( aEntries.Count() ) - { - pEntry = (BitmapCacheEntry*) aEntries.Remove(aEntries.Count() - 1); - - if( pEntry && pEntry->pGraphicObject ) - { - nCurSize -= pEntry->nSizeBytes; - delete pEntry->pGraphicObject; - } - - delete pEntry; - } - else - break; - } - - pEntry = new BitmapCacheEntry; - pEntry->pPage = pPage; - pEntry->pGraphicObject = new GraphicObject( rBmp ); - pEntry->nSizeBytes = nSizeOfBitmap; - pEntry->nZoom = nZoom; - - aEntries.Insert( pEntry, (ULONG) 0 ); - nCurSize += nSizeOfBitmap; - } -} - -/************************************************************************* -|* -|* Cache-Eintrag suchen, Bitmap-Zeiger zurueckgeben (NULL, wenn Bitmap nicht -|* im Cache) -|* - auf rZoomPercent wird der Zoomfaktor der Bitmap geschrieben -|* - abs(nZoomTolerance) gibt die maximal erlaubte Abweichung des -|* Zoomfaktors an; ist die Toleranz negativ, so sucht der Cache den -|* "best fit", sonst den "first fit", -|* - es werden nur Bitmaps mit Zoomfaktoren kleiner oder gleich rZoomPercent -|* beruecksichtigt, um ein Verkleinern der Bitmap beim Zeichnen zu vermeiden -|* -\************************************************************************/ - -const GraphicObject* BitmapCache::Get( const SdPage* pPage, long& rZoomPercent, long nZoomTolerancePercent) -{ - BitmapCacheEntry* pEntry = NULL; - GraphicObject* pGraphicObject = NULL; - - if( nZoomTolerancePercent < 0 ) - { - // "best fit"-Suche - long nTolerance = -nZoomTolerancePercent; - BitmapCacheEntry* pBest = NULL; - long nBest = LONG_MAX; - long nTest = 0L; - - for( ULONG nPos = 0; nPos < aEntries.Count(); nPos++ ) - { - pEntry = (BitmapCacheEntry*) aEntries.GetObject( nPos ); - - if( pEntry->pPage == pPage ) - { - nTest = rZoomPercent - pEntry->nZoom; - - if( nTest >= 0 && nTest < nBest && nTest <= nTolerance ) - pBest = pEntry; - } - } - - pEntry = pBest; - } - else - { - // "first fit"-suche - for( ULONG nPos = 0; nPos < aEntries.Count(); nPos++ ) - { - pEntry = (BitmapCacheEntry*)aEntries.GetObject( nPos ); - - if (pEntry->pPage == pPage && Abs( pEntry->nZoom - rZoomPercent ) <= nZoomTolerancePercent ) - break; - else - pEntry = NULL; - } - } - - // was passendes gefunden? - if( pEntry ) - { - pGraphicObject = pEntry->pGraphicObject; - aEntries.Remove( pEntry ); - aEntries.Insert( pEntry, (ULONG) 0 ); - rZoomPercent = pEntry->nZoom; - } - - return pGraphicObject; -} - void BitmapCache::Remove( const SdPage* pPage ) { for( ULONG nPos = 0; nPos < aEntries.Count(); ) diff --git a/sd/source/ui/view/drviews1.cxx b/sd/source/ui/view/drviews1.cxx index 4b9aecb02ac5..302bdab6f115 100644 --- a/sd/source/ui/view/drviews1.cxx +++ b/sd/source/ui/view/drviews1.cxx @@ -92,7 +92,6 @@ #include "slideshow.hxx" #include "optsitem.hxx" #include "fusearch.hxx" -#include "fuspell.hxx" #include "Outliner.hxx" #include "AnimationChildWindow.hxx" #include "SdUnoDrawView.hxx" diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx index aa1a0f53c15a..9669a33bd402 100644 --- a/sd/source/ui/view/drviews2.cxx +++ b/sd/source/ui/view/drviews2.cxx @@ -103,48 +103,6 @@ using namespace ::com::sun::star::uno; namespace sd { -/************************************************************************* -|* -|* modal dialog for #90356# -|* -\************************************************************************/ - -class ImpUndoDeleteWarning : public ModalDialog -{ -private: - FixedImage maImage; - FixedText maWarningFT; - CheckBox maDisableCB; - OKButton maYesBtn; - CancelButton maNoBtn; - -public: - ImpUndoDeleteWarning(Window* pParent); - BOOL IsWarningDisabled() const { return maDisableCB.IsChecked(); } -}; - -ImpUndoDeleteWarning::ImpUndoDeleteWarning(Window* pParent) -: ModalDialog(pParent, SdResId(RID_UNDO_DELETE_WARNING)), - maImage(this, SdResId(IMG_UNDO_DELETE_WARNING)), - maWarningFT(this, SdResId(FT_UNDO_DELETE_WARNING)), - maDisableCB(this, SdResId(CB_UNDO_DELETE_DISABLE)), - maYesBtn(this, SdResId(BTN_UNDO_DELETE_YES)), - maNoBtn(this, SdResId(BTN_UNDO_DELETE_NO)) -{ - FreeResource(); - - SetHelpId( HID_SD_UNDODELETEWARNING_DLG ); - maDisableCB.SetHelpId( HID_SD_UNDODELETEWARNING_CBX ); - - maYesBtn.SetText(Button::GetStandardText(BUTTON_YES)); - maNoBtn.SetText(Button::GetStandardText(BUTTON_NO)); - maImage.SetImage(WarningBox::GetStandardImage()); - - // #93721# Set focus to YES-Button - maYesBtn.GrabFocus(); -} - - /************************************************************************* |* |* SfxRequests fuer temporaere Funktionen diff --git a/sd/source/ui/view/drviews6.cxx b/sd/source/ui/view/drviews6.cxx index 4dd3c61556e1..3ca5644d040b 100644 --- a/sd/source/ui/view/drviews6.cxx +++ b/sd/source/ui/view/drviews6.cxx @@ -191,32 +191,6 @@ void DrawViewShell::GetFormTextState(SfxItemSet& rSet) } } -/************************************************************************* -|* -|* SfxRequests fuer Objektpalette bearbeiten -|* -\************************************************************************/ - -void DrawViewShell::ExecObjPalette( SfxRequest& ) -{ - // Diese Methode muss erhalten bleiben, bis - // der/die Slots entfernt wurden; - // ==> Voll-Update -} - -/************************************************************************* -|* -|* Statuswerte fuer Objektpalette zurueckgeben -|* -\************************************************************************/ - -void DrawViewShell::GetObjPaletteState(SfxItemSet& ) -{ - // Diese Methode muss erhalten bleiben, bis - // der/die Slots entfernt wurden; - // ==> Voll-Update -} - /************************************************************************* |* |* SfxRequests fuer Animator bearbeiten diff --git a/sd/source/ui/view/drviewsa.cxx b/sd/source/ui/view/drviewsa.cxx index 4d30831f4e2a..882e3040d134 100644 --- a/sd/source/ui/view/drviewsa.cxx +++ b/sd/source/ui/view/drviewsa.cxx @@ -148,21 +148,6 @@ DrawViewShell::DrawViewShell( SfxViewFrame* pFrame, ViewShellBase& rViewShellBas Construct(GetDocSh(), ePageKind); } -/************************************************************************* -|* -|* Copy-Konstruktor -|* -\************************************************************************/ - -DrawViewShell::DrawViewShell( SfxViewFrame* pFrame, ::Window* pParentWindow, const DrawViewShell& rShell ) -: ViewShell(pFrame, pParentWindow, rShell) -, maTabControl(this, pParentWindow) -, mbIsInSwitchPage(false) -{ - mpFrameView = new FrameView(GetDoc()); - Construct (GetDocSh(), PK_STANDARD); -} - /************************************************************************* |* |* Destruktor diff --git a/sd/source/ui/view/grviewsh.cxx b/sd/source/ui/view/grviewsh.cxx index 1c22348f8b87..646a437c42bf 100644 --- a/sd/source/ui/view/grviewsh.cxx +++ b/sd/source/ui/view/grviewsh.cxx @@ -61,24 +61,6 @@ GraphicViewShell::GraphicViewShell ( ConstructGraphicViewShell(); } -/************************************************************************* -|* -|* Copy-Konstruktor -|* -\************************************************************************/ - -GraphicViewShell::GraphicViewShell ( - SfxViewFrame* pFrame, - ::Window* pParentWindow, - const DrawViewShell& rShell) - : DrawViewShell (pFrame, pParentWindow, rShell) -{ - ConstructGraphicViewShell(); -} - - - - GraphicViewShell::~GraphicViewShell (void) { } diff --git a/sd/source/ui/view/makefile.mk b/sd/source/ui/view/makefile.mk index 3b3bca4ff3d5..4acd747adc65 100644 --- a/sd/source/ui/view/makefile.mk +++ b/sd/source/ui/view/makefile.mk @@ -84,7 +84,6 @@ SLOFILES = \ $(SLO)$/presvish.obj \ $(SLO)$/outlview.obj \ $(SLO)$/tabcontr.obj \ - $(SLO)$/showview.obj \ $(SLO)$/bmcache.obj \ $(SLO)$/drbezob.obj \ $(SLO)$/drtxtob.obj \ diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx index 1467e6c24bd0..aa11707cdb32 100644 --- a/sd/source/ui/view/outlnvsh.cxx +++ b/sd/source/ui/view/outlnvsh.cxx @@ -235,31 +235,6 @@ OutlineViewShell::OutlineViewShell ( Construct(GetDocSh()); } - -/************************************************************************* -|* -|* Copy-Konstruktor -|* -\************************************************************************/ - -OutlineViewShell::OutlineViewShell ( - SfxViewFrame* pFrame, - ::Window* pParentWindow, - const OutlineViewShell& rShell) - : ViewShell (pFrame, pParentWindow, rShell), - pOlView(NULL), - pLastPage( NULL ), - pClipEvtLstnr(NULL), - bPastePossible(FALSE), - mbInitialized(false) - -{ - mpFrameView = new FrameView(GetDoc()); - mpFrameView->Connect(); - - Construct(GetDocSh()); -} - /************************************************************************* |* |* Destruktor diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx index 30daec8b636e..dfad4b34c6f2 100644 --- a/sd/source/ui/view/outlview.cxx +++ b/sd/source/ui/view/outlview.cxx @@ -2040,6 +2040,7 @@ IMPL_LINK(OutlineView, PaintingFirstLineHdl, PaintFirstLineInfo*, pInfo) return 0; } +#if 0 sal_Int32 OutlineView::GetPageNumberWidthPixel() { Window* pActWin = mpOutlineViewShell->GetActiveWindow(); @@ -2062,6 +2063,7 @@ sal_Int32 OutlineView::GetPageNumberWidthPixel() } return mnPageNumberWidthPixel; } +#endif // -------------------------------------------------------------------- diff --git a/sd/source/ui/view/sdview.cxx b/sd/source/ui/view/sdview.cxx index 813c6caba95a..3aed9c6c0d9c 100644 --- a/sd/source/ui/view/sdview.cxx +++ b/sd/source/ui/view/sdview.cxx @@ -969,89 +969,6 @@ void View::SetMarkedOriginalSize() delete pUndoGroup; } -/** create a virtual device and paints the slide contents into it. - The caller must delete the returned device */ -VirtualDevice* View::CreatePageVDev(USHORT nSdPage, PageKind ePageKind, ULONG nWidthPixel) -{ - ViewShell* pViewShell = mpDocSh->GetViewShell(); - OutputDevice* pRefDevice = 0; - if( pViewShell ) - pRefDevice = pViewShell->GetActiveWindow(); - - if( !pRefDevice ) - pRefDevice = Application::GetDefaultDevice(); - - DBG_ASSERT( pRefDevice, "sd::View::CreatePageVDev(), I need a reference device to work properly!" ); - - VirtualDevice* pVDev; - if( pRefDevice ) - pVDev = new VirtualDevice( *pRefDevice ); - else - pVDev = new VirtualDevice(); - - MapMode aMM( MAP_100TH_MM ); - - SdPage* pPage = mpDoc->GetSdPage(nSdPage, ePageKind); - DBG_ASSERT(pPage, "sd::View::CreatePageVDev(), slide not found!"); - - if( pPage ) - { - Size aPageSize(pPage->GetSize()); - aPageSize.Width() -= pPage->GetLftBorder(); - aPageSize.Width() -= pPage->GetRgtBorder(); - aPageSize.Height() -= pPage->GetUppBorder(); - aPageSize.Height() -= pPage->GetLwrBorder(); - - // use scaling? - if( nWidthPixel ) - { - const Fraction aFrac( (long) nWidthPixel, pVDev->LogicToPixel( aPageSize, aMM ).Width() ); - - aMM.SetScaleX( aFrac ); - aMM.SetScaleY( aFrac ); - } - - pVDev->SetMapMode( aMM ); - if( pVDev->SetOutputSize(aPageSize) ) - { - std::auto_ptr< SdrView > pView( new SdrView(mpDoc, pVDev) ); - pView->SetPageVisible( FALSE ); - pView->SetBordVisible( FALSE ); - pView->SetGridVisible( FALSE ); - pView->SetHlplVisible( FALSE ); - pView->SetGlueVisible( FALSE ); - pView->ShowSdrPage(pPage); // WAITING FOR SJ , Point(-pPage->GetLftBorder(), -pPage->GetUppBorder())); - SdrPageView* pPageView = pView->GetSdrPageView(); - if( pViewShell ) - { - FrameView* pFrameView = pViewShell->GetFrameView(); - if( pFrameView ) - { - pPageView->SetVisibleLayers( pFrameView->GetVisibleLayers() ); - pPageView->SetLockedLayers( pFrameView->GetLockedLayers() ); - pPageView->SetPrintableLayers( pFrameView->GetPrintableLayers() ); - } - } - - // SJ: i40609, the vdev mapmode seems to be dangled after CompleteRedraw, - // so we are pushing here, because the mapmode is used afterwards - pVDev->Push(); - - Point aPoint( 0, 0 ); - Region aRegion (Rectangle( aPoint, aPageSize ) ); - pView->CompleteRedraw(pVDev, aRegion); - pVDev->Pop(); - } - else - { - DBG_ERROR("sd::View::CreatePageVDev(), virt. device creation failed!"); - } - } - return pVDev; -} - - - /************************************************************************* |* |* OLE-Obj am Client connecten diff --git a/sd/source/ui/view/sdview4.cxx b/sd/source/ui/view/sdview4.cxx index 44e5127bfb25..1767217ebea3 100644 --- a/sd/source/ui/view/sdview4.cxx +++ b/sd/source/ui/view/sdview4.cxx @@ -599,11 +599,6 @@ void View::LockRedraw(BOOL bLock) -bool View::IsRedrawLocked (void) const -{ - return mnLockRedrawSmph>0; -} - /************************************************************************* |* |* StyleSheet aus der Sleketion besorgen diff --git a/sd/source/ui/view/sdwindow.cxx b/sd/source/ui/view/sdwindow.cxx index 7cae5d452a1b..268d77fa8fd8 100644 --- a/sd/source/ui/view/sdwindow.cxx +++ b/sd/source/ui/view/sdwindow.cxx @@ -147,35 +147,6 @@ void Window::SetViewShell (ViewShell* pViewSh) } } - - - -/************************************************************************* -|* -|* Die Haelfte des Sichtbaren Bereich eines anderen Fensters darstellen -|* -\************************************************************************/ - -void Window::ShareViewArea(Window* pOtherWin) -{ - mpShareWin = pOtherWin; - maViewOrigin = pOtherWin->maViewOrigin; - maViewSize = pOtherWin->maViewSize; - mnMinZoom = pOtherWin->mnMinZoom; - mnMaxZoom = pOtherWin->mnMaxZoom; - mbCenterAllowed = pOtherWin->mbCenterAllowed; - - long nZoom = pOtherWin->GetZoom(); - MapMode aMap(GetMapMode()); - aMap.SetScaleX(Fraction(nZoom, 100)); - aMap.SetScaleY(Fraction(nZoom, 100)); - aMap.SetOrigin(pOtherWin->GetMapMode().GetOrigin()); - SetMapMode(aMap); -} - - - - void Window::CalcMinZoom() { // Are we entitled to change the minimal zoom factor? diff --git a/sd/source/ui/view/showview.cxx b/sd/source/ui/view/showview.cxx deleted file mode 100644 index a60195eac1b8..000000000000 --- a/sd/source/ui/view/showview.cxx +++ /dev/null @@ -1,170 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_sd.hxx" - -#include "showview.hxx" -#include -#include - - -#include "drawdoc.hxx" -#include "sdpage.hxx" -#include "ViewShell.hxx" -#include "FrameView.hxx" - -namespace sd { - -#ifndef SO2_DECL_SVINPLACEOBJECT_DEFINED -#define SO2_DECL_SVINPLACEOBJECT_DEFINED -SO2_DECL_REF(SvInPlaceObject) -#endif -#ifndef SO2_DECL_SVINPLACECLIENT_DEFINED -#define SO2_DECL_SVINPLACECLIENT_DEFINED -SO2_DECL_REF(SvInPlaceClient) -#endif - -/************************************************************************* -|* -|* der Konstruktor setzt den MapMode und arrangiert die einzelnen Seiten -|* -\************************************************************************/ - -ShowView::ShowView ( - SdDrawDocument* pDoc, - OutputDevice* pOut, - ViewShell* pViewShell, - ::Window* pWin) - : FmFormView(pDoc, pOut), - pDrDoc(pDoc), - mpViewSh(pViewShell), - pWindowForPlugIns(pWin), - nAllowInvalidateSmph(0), - bAllowMasterPageCaching(TRUE) -{ - // #i73602# Use default from the configuration - SetBufferedOverlayAllowed(getOptionsDrawinglayer().IsOverlayBuffer_DrawImpress()); - - // #i74769#, #i75172# Use default from the configuration - SetBufferedOutputAllowed(getOptionsDrawinglayer().IsPaintBuffer_DrawImpress()); - - EnableExtendedKeyInputDispatcher(FALSE); - EnableExtendedMouseEventDispatcher(FALSE); - EnableExtendedCommandEventDispatcher(FALSE); -} - -/************************************************************************* -|* -|* Destruktor -|* -\************************************************************************/ - -ShowView::~ShowView() -{ -} - -/************************************************************************* -|* -|* Zaehler fuer Invalidierungserlaubnis hoch- oder runter zaehlen -|* -\************************************************************************/ - -void ShowView::SetAllowInvalidate(BOOL bFlag) -{ - if (!bFlag) - { - nAllowInvalidateSmph++; - } - else if (nAllowInvalidateSmph > 0) - { - nAllowInvalidateSmph--; - } -} - -/************************************************************************* -|* -|* ermittelt, ob invalidiert werden darf -|* -\************************************************************************/ - -BOOL ShowView::IsInvalidateAllowed() const -{ - return (nAllowInvalidateSmph == 0); -} - -/************************************************************************* -|* -|* Invalidate abfangen -|* -\************************************************************************/ - -void ShowView::InvalidateOneWin (::Window& rWin) -{ - if (IsInvalidateAllowed()) - { - FmFormView::InvalidateOneWin(rWin); - } -} - -/************************************************************************* -|* -|* Invalidate abfangen -|* -\************************************************************************/ - -void ShowView::InvalidateOneWin (::Window& rWin, const Rectangle& rRect) -{ - if (IsInvalidateAllowed()) - { - FmFormView::InvalidateOneWin(rWin, rRect); - } -} - -/************************************************************************* -|* -|* Paint-Methode: das Ereignis wird an die View weitergeleitet -|* -\************************************************************************/ - -void ShowView::CompleteRedraw(OutputDevice* pOutDev, const Region& rReg, sdr::contact::ViewObjectContactRedirector* pRedirector /*=0L*/) -{ - FmFormView::CompleteRedraw(pOutDev, rReg, pRedirector); -} - -/************************************************************************* -|* -|* DoConnect -|* -\************************************************************************/ - -void ShowView::DoConnect(SdrOle2Obj* ) -{ - // connected wird jetzt in FuSlideShow::ShowPlugIns() -} - -} // end of namespace sd diff --git a/sd/source/ui/view/viewshe2.cxx b/sd/source/ui/view/viewshe2.cxx index 5a3426a42533..616516782be3 100644 --- a/sd/source/ui/view/viewshe2.cxx +++ b/sd/source/ui/view/viewshe2.cxx @@ -526,34 +526,6 @@ void ViewShell::DrawMarkRect(const Rectangle& rRect) const } } - -/************************************************************************* -|* -|* Auf allen Split-Windows ein Rechteck zeichnen. Fuer den Rahmen wird der -|* uebergebene Pen, zum Fuellen die uebergebene Brush benutzt. -|* -\************************************************************************/ - -void ViewShell::DrawFilledRect( const Rectangle& rRect, const Color& rLColor, - const Color& rFColor ) const -{ - if (mpContentWindow.get() != NULL) - { - const Color& rOldLineColor = mpContentWindow->GetLineColor(); - const Color& rOldFillColor = mpContentWindow->GetFillColor(); - - mpContentWindow->SetLineColor( rLColor ); - mpContentWindow->SetFillColor( rFColor ); - - mpContentWindow->DrawRect(rRect); - - mpContentWindow->SetLineColor( rOldLineColor ); - mpContentWindow->SetFillColor( rOldFillColor ); - } -} - - - /************************************************************************* |* |* Groesse und Raender aller Seiten setzen @@ -849,18 +821,6 @@ void ViewShell::WriteFrameViewData() { } -/************************************************************************* -|* -|* Auf allen Split-Windows ein Update erzwingen. -|* -\************************************************************************/ - -void ViewShell::UpdateWindows() -{ - if (mpContentWindow.get() != NULL) - mpContentWindow->Update(); -} - /************************************************************************* |* |* OLE-Object aktivieren diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx index 578026018b9f..c1f4bc070bcf 100644 --- a/sd/source/ui/view/viewshel.cxx +++ b/sd/source/ui/view/viewshel.cxx @@ -173,14 +173,6 @@ ViewShell::ViewShell( SfxViewFrame*, ::Window* pParentWindow, ViewShellBase& rVi construct(); } -ViewShell::ViewShell( SfxViewFrame*, ::Window* pParentWindow, const ViewShell& rShell) -: SfxShell(rShell.GetViewShell()) -, mbCenterAllowed(rShell.mbCenterAllowed) -, mpParentWindow(pParentWindow) -{ - construct(); -} - ViewShell::~ViewShell() { // Keep the content window from accessing in its destructor the diff --git a/sd/source/ui/view/zoomlist.cxx b/sd/source/ui/view/zoomlist.cxx index 6f4d56b6f0a3..9ae178e3d7a6 100644 --- a/sd/source/ui/view/zoomlist.cxx +++ b/sd/source/ui/view/zoomlist.cxx @@ -112,19 +112,6 @@ void ZoomList::InsertZoomRect(const Rectangle& rRect) rBindings.Invalidate( SID_ZOOM_PREV ); } - -/************************************************************************* -|* -|* Aktuelles ZoomRect herausgeben -|* -\************************************************************************/ - -Rectangle ZoomList::GetCurrentZoomRect() const -{ - Rectangle aRect(*(Rectangle*) GetObject(mnCurPos)); - return (aRect); -} - /************************************************************************* |* |* Naechstes ZoomRect herausgeben -- cgit v1.2.3 From bd883027c74030e4bc4f038bdcab091723246360 Mon Sep 17 00:00:00 2001 From: Dirk Voelzke Date: Thu, 6 May 2010 11:04:08 +0200 Subject: dv12#i106373# applied patch to remove unused code --- uui/source/iahndl.cxx | 11 +++++++++-- uui/source/iahndl.hxx | 3 +++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/uui/source/iahndl.cxx b/uui/source/iahndl.cxx index 905faab4051a..0879e3574da3 100755 --- a/uui/source/iahndl.cxx +++ b/uui/source/iahndl.cxx @@ -867,6 +867,8 @@ UUIInteractionHelper::handleRequest_impl( if ( handleCertificateValidationRequest( rRequest ) ) return true; +// @@@ Todo #i29340#: activate! +#if 0 ucb::NameClashResolveRequest aNameClashResolveRequest; if (aAnyRequest >>= aNameClashResolveRequest) { @@ -874,7 +876,7 @@ UUIInteractionHelper::handleRequest_impl( rRequest->getContinuations()); return true; } - +#endif if ( handleMasterPasswordRequest( rRequest ) ) return true; @@ -1186,6 +1188,8 @@ executeMessageBox( return aResult; } +// @@@ Todo #i29340#: activate! +#if 0 enum NameClashResolveDialogResult { ABORT, RENAME, OVERWRITE }; NameClashResolveDialogResult @@ -1213,9 +1217,11 @@ executeSimpleNameClashResolveDialog( "executeSimpleNameClashResolveDialog not yet implemented!" ); return ABORT; } - +#endif } // namespace +// @@@ Todo #i29340#: activate! +#if 0 void UUIInteractionHelper::handleNameClashResolveRequest( ucb::NameClashResolveRequest const & rRequest, @@ -1283,6 +1289,7 @@ UUIInteractionHelper::handleNameClashResolveRequest( break; } } +#endif void UUIInteractionHelper::handleGenericErrorRequest( diff --git a/uui/source/iahndl.hxx b/uui/source/iahndl.hxx index 6402653d3bda..581099462845 100755 --- a/uui/source/iahndl.hxx +++ b/uui/source/iahndl.hxx @@ -215,6 +215,8 @@ private: com::sun::star::task::XInteractionRequest > const & rRequest) SAL_THROW((com::sun::star::uno::RuntimeException)); +// @@@ Todo #i29340#: activate! +#if 0 void handleNameClashResolveRequest( com::sun::star::ucb::NameClashResolveRequest const & rRequest, @@ -223,6 +225,7 @@ private: com::sun::star::task::XInteractionContinuation > > const & rContinuations) SAL_THROW((com::sun::star::uno::RuntimeException)); +#endif bool handleMasterPasswordRequest( -- cgit v1.2.3 From 465099eb825f40ec15af1499444263cbb3d7df19 Mon Sep 17 00:00:00 2001 From: Dirk Voelzke Date: Thu, 6 May 2010 11:15:51 +0200 Subject: dv12#i88957# improved handling of downloading new versions --- extensions/source/update/check/download.cxx | 15 ++++++++++++++- extensions/source/update/check/updatecheck.cxx | 19 +++++++++++-------- extensions/source/update/check/updatecheckconfig.cxx | 2 +- 3 files changed, 26 insertions(+), 10 deletions(-) mode change 100644 => 100755 extensions/source/update/check/download.cxx mode change 100644 => 100755 extensions/source/update/check/updatecheck.cxx mode change 100644 => 100755 extensions/source/update/check/updatecheckconfig.cxx diff --git a/extensions/source/update/check/download.cxx b/extensions/source/update/check/download.cxx old mode 100644 new mode 100755 index 9e10abf27a0e..09d90f1eaa83 --- a/extensions/source/update/check/download.cxx +++ b/extensions/source/update/check/download.cxx @@ -305,6 +305,19 @@ bool curl_run(const rtl::OUString& rURL, OutData& out, const rtl::OString& aProx ret = true; } + if ( CURLE_PARTIAL_FILE == cc ) + { + // this sometimes happens, when a user throws away his user data, but has already + // completed the download of an update. + double fDownloadSize; + curl_easy_getinfo( pCURL, CURLINFO_CONTENT_LENGTH_DOWNLOAD, &fDownloadSize ); + if ( -1 == fDownloadSize ) + { + out.Handler->downloadFinished(out.File); + ret = true; + } + } + // Avoid target file being removed else if( (CURLE_ABORTED_BY_CALLBACK == cc) || out.StopCondition.check() ) ret = true; @@ -388,7 +401,7 @@ Download::start(const rtl::OUString& rURL, const rtl::OUString& rFile, const rtl aFile = rtl::OUString(); } else - m_aHandler->downloadStarted( aFile, 1 ); + m_aHandler->downloadStarted( aFile, 0 ); } else { diff --git a/extensions/source/update/check/updatecheck.cxx b/extensions/source/update/check/updatecheck.cxx old mode 100644 new mode 100755 index d89233e88dc2..d65a97e49dc6 --- a/extensions/source/update/check/updatecheck.cxx +++ b/extensions/source/update/check/updatecheck.cxx @@ -824,7 +824,7 @@ UpdateCheck::initialize(const uno::Sequence< beans::NamedValue >& rValues, if( nDownloadSize > 0 ) { - if ( nDownloadSize == nFileSize ) // we have already downloaded everthing + if ( nDownloadSize <= nFileSize ) // we have already downloaded everthing { bContinueDownload = false; bDownloadAvailable = true; @@ -1177,15 +1177,18 @@ UpdateCheck::downloadProgressAt(sal_Int8 nPercent) void UpdateCheck::downloadStarted(const rtl::OUString& rLocalFileName, sal_Int64 nFileSize) { - osl::MutexGuard aGuard(m_aMutex); + if ( nFileSize > 0 ) + { + osl::MutexGuard aGuard(m_aMutex); - rtl::Reference< UpdateCheckConfig > aModel(UpdateCheckConfig::get(m_xContext)); - aModel->storeLocalFileName(rLocalFileName, nFileSize); + rtl::Reference< UpdateCheckConfig > aModel(UpdateCheckConfig::get(m_xContext)); + aModel->storeLocalFileName(rLocalFileName, nFileSize); - // Bring-up release note for position 1 .. - const rtl::OUString aURL(getReleaseNote(m_aUpdateInfo, 1, aModel->isAutoDownloadEnabled())); - if( aURL.getLength() > 0 ) - showReleaseNote(aURL); + // Bring-up release note for position 1 .. + const rtl::OUString aURL(getReleaseNote(m_aUpdateInfo, 1, aModel->isAutoDownloadEnabled())); + if( aURL.getLength() > 0 ) + showReleaseNote(aURL); + } } //------------------------------------------------------------------------------ diff --git a/extensions/source/update/check/updatecheckconfig.cxx b/extensions/source/update/check/updatecheckconfig.cxx old mode 100644 new mode 100755 index b3e559c5f136..9f78b33270c2 --- a/extensions/source/update/check/updatecheckconfig.cxx +++ b/extensions/source/update/check/updatecheckconfig.cxx @@ -398,7 +398,7 @@ UpdateCheckConfig::storeLocalFileName(const rtl::OUString& rLocalFileName, sal_I if( m_xContainer->hasByName(aNameList[i]) ) m_xContainer->replaceByName(aNameList[i], aValueList[i]); else - m_xContainer->insertByName(aNameList[i],aValueList[i]); + m_xContainer->insertByName(aNameList[i], aValueList[i]); } commitChanges(); -- cgit v1.2.3 From a7c84375db517769035080c8fed33b2f303fc42f Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Thu, 6 May 2010 12:09:28 +0200 Subject: os141: allow the VCLXWindow to process arbitrary callbacks asynchronously, without a locked SolarMutex. Intended for UNO listeners. Employ this mechanism for VCLXButton's actionPerformed callbacks, so we don't get threading problems in those callbacks. Normally, *each and every* UNO notification would need to happen without a SolarMutex, like VCLXWindow itself already does this for mouse events and window enabled/disabled events. However, for each and every event which we migrate to this new mechanism, we need to carefully evaluate which C++ clients might need to be adjusted. Java clients don't have a problem with this, of course. --- toolkit/inc/toolkit/awt/vclxwindow.hxx | 18 +++++++ toolkit/source/awt/vclxwindow.cxx | 99 +++++++++++++++++++++++++++------- toolkit/source/awt/vclxwindows.cxx | 11 +++- 3 files changed, 108 insertions(+), 20 deletions(-) diff --git a/toolkit/inc/toolkit/awt/vclxwindow.hxx b/toolkit/inc/toolkit/awt/vclxwindow.hxx index 97f36850dff9..6ad3c3ab6076 100644 --- a/toolkit/inc/toolkit/awt/vclxwindow.hxx +++ b/toolkit/inc/toolkit/awt/vclxwindow.hxx @@ -51,6 +51,7 @@ #include #include +#include class Window; class VclSimpleEvent; @@ -113,6 +114,23 @@ protected: ::cppu::OInterfaceContainerHelper& GetContainerListeners(); ::cppu::OInterfaceContainerHelper& GetTopWindowListeners(); +public: + typedef ::boost::function0< void > Callback; + +protected: + /** executes the given callback asynchronously + + At the moment the callback is called, the Solar Mutex is not locked. In particular, this implies that + you cannot rely on |this| not being disposed. However, you *can* rely on |this| being still alive (i.e. + having a ref count > 0). + + As a consequence, this can be used for doing listener notifications, using event multiplexers. Those multiplexers + care for the disposed state themself, and are alive as long as |this| is alive. + */ + void ImplExecuteAsyncWithoutSolarLock( + const Callback& i_callback + ); + public: VCLXWindow( bool bWithDefaultProps = false ); ~VCLXWindow(); diff --git a/toolkit/source/awt/vclxwindow.cxx b/toolkit/source/awt/vclxwindow.cxx index 248571819067..bb880fe68b66 100644 --- a/toolkit/source/awt/vclxwindow.cxx +++ b/toolkit/source/awt/vclxwindow.cxx @@ -218,8 +218,8 @@ namespace class SAL_DLLPRIVATE VCLXWindowImpl : public ::comphelper::IEventProcessor { private: - typedef ::std::vector< ::rtl::Reference< ::comphelper::AnyEvent > > - EventArray; + typedef ::std::vector< ::rtl::Reference< ::comphelper::AnyEvent > > LegacyEventArray; + typedef ::std::vector< VCLXWindow::Callback > CallbackArray; private: VCLXWindow& mrAntiImpl; @@ -243,8 +243,11 @@ private: VclContainerListenerMultiplexer maContainerListeners; TopWindowListenerMultiplexer maTopWindowListeners; - EventArray maEvents; - ULONG mnEventId; + LegacyEventArray maLegacyEvents; + ULONG mnLegacyEventId; + + CallbackArray maCallbackEvents; + ULONG mnCallbackEventId; public: bool mbDisposing : 1; @@ -293,6 +296,10 @@ public: */ void notifyPlainEvent( const lang::EventObject& _rPlainEvent, PlainEventType _nType ); + /** impl-version of VCLXWindow::ImplExecuteAsyncWithoutSolarLock + */ + void callBackAsync( const VCLXWindow::Callback& i_callback ); + /** notifies the object that its VCLXWindow is being disposed */ void disposing(); @@ -326,7 +333,8 @@ protected: virtual void processEvent( const ::comphelper::AnyEvent& _rEvent ); private: - DECL_LINK( OnProcessEvent, void* ); + DECL_LINK( OnProcessLegacyEvent, void* ); + DECL_LINK( OnProcessCallbacks, void* ); private: /** notifies an arbitrary event @@ -373,7 +381,8 @@ VCLXWindowImpl::VCLXWindowImpl( VCLXWindow& _rAntiImpl, ::vos::IMutex& _rMutex, ,maPaintListeners( _rAntiImpl ) ,maContainerListeners( _rAntiImpl ) ,maTopWindowListeners( _rAntiImpl ) - ,mnEventId( 0 ) + ,mnLegacyEventId( 0 ) + ,mnCallbackEventId( 0 ) ,mbDisposing( false ) ,mbDesignMode( false ) ,mbSynthesizingVCLEvent( false ) @@ -394,9 +403,14 @@ VCLXWindowImpl::~VCLXWindowImpl() void VCLXWindowImpl::disposing() { ::vos::OGuard aGuard( mrMutex ); - if ( mnEventId ) - Application::RemoveUserEvent( mnEventId ); - mnEventId = 0; + if ( mnLegacyEventId ) + Application::RemoveUserEvent( mnLegacyEventId ); + mnLegacyEventId = 0; + + if ( mnCallbackEventId ) + Application::RemoveUserEvent( mnCallbackEventId ); + mnCallbackEventId = 0; + mbDisposed= true; ::com::sun::star::lang::EventObject aEvent; @@ -417,9 +431,9 @@ void VCLXWindowImpl::disposing() //-------------------------------------------------------------------- void VCLXWindowImpl::impl_notifyAnyEvent( const ::rtl::Reference< ::comphelper::AnyEvent >& _rEvent ) { - maEvents.push_back( _rEvent ); - if ( !mnEventId ) - mnEventId = Application::PostUserEvent( LINK( this, VCLXWindowImpl, OnProcessEvent ) ); + maLegacyEvents.push_back( _rEvent ); + if ( !mnLegacyEventId ) + mnLegacyEventId = Application::PostUserEvent( LINK( this, VCLXWindowImpl, OnProcessLegacyEvent ) ); } //-------------------------------------------------------------------- @@ -439,25 +453,25 @@ void VCLXWindowImpl::notifyPlainEvent( const lang::EventObject& _rPlainEvent, Pl } //-------------------------------------------------------------------- -IMPL_LINK( VCLXWindowImpl, OnProcessEvent, void*, EMPTYARG ) +IMPL_LINK( VCLXWindowImpl, OnProcessLegacyEvent, void*, EMPTYARG ) { // work on a copy of the events array - EventArray aEventsCopy; + LegacyEventArray aEventsCopy; { ::vos::OGuard aGuard( mrMutex ); - aEventsCopy = maEvents; - maEvents.clear(); + aEventsCopy = maLegacyEvents; + maLegacyEvents.clear(); - if ( !mnEventId ) + if ( !mnLegacyEventId ) // we were disposed while waiting for the mutex to lock return 1L; - mnEventId = 0; + mnLegacyEventId = 0; } { ::toolkit::ReleaseSolarMutex aReleaseSolar; - for ( EventArray::const_iterator loop = aEventsCopy.begin(); + for ( LegacyEventArray::const_iterator loop = aEventsCopy.begin(); loop != aEventsCopy.end(); ++loop ) @@ -522,6 +536,46 @@ void VCLXWindowImpl::processEvent( const ::comphelper::AnyEvent& _rEvent ) } } +//-------------------------------------------------------------------- +void VCLXWindowImpl::callBackAsync( const VCLXWindow::Callback& i_callback ) +{ + DBG_TESTSOLARMUTEX(); + maCallbackEvents.push_back( i_callback ); + if ( !mnCallbackEventId ) + mnCallbackEventId = Application::PostUserEvent( LINK( this, VCLXWindowImpl, OnProcessCallbacks ) ); +} + +//---------------------------------------------------------------------------------------------------------------------- +IMPL_LINK( VCLXWindowImpl, OnProcessCallbacks, void*, EMPTYARG ) +{ + // work on a copy of the callback array + CallbackArray aCallbacksCopy; + { + ::vos::OGuard aGuard( mrMutex ); + aCallbacksCopy = maCallbackEvents; + maCallbackEvents.clear(); + + if ( !mnCallbackEventId ) + // we were disposed while waiting for the mutex to lock + return 1L; + + mnCallbackEventId = 0; + } + + { + ::toolkit::ReleaseSolarMutex aReleaseSolar; + for ( CallbackArray::const_iterator loop = aCallbacksCopy.begin(); + loop != aCallbacksCopy.end(); + ++loop + ) + { + (*loop)(); + } + } + + return 0L; +} + //-------------------------------------------------------------------- void SAL_CALL VCLXWindowImpl::acquire() { @@ -581,6 +635,13 @@ VCLXWindow::~VCLXWindow() } } +//---------------------------------------------------------------------------------------------------------------------- +void VCLXWindow::ImplExecuteAsyncWithoutSolarLock( const Callback& i_callback ) +{ + mpImpl->callBackAsync( i_callback ); +} + +//---------------------------------------------------------------------------------------------------------------------- ::toolkit::IAccessibleFactory& VCLXWindow::getAccessibleFactory() { return mpImpl->getAccessibleFactory().getFactory(); diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx index 43e0e50c315d..00124b58ae93 100644 --- a/toolkit/source/awt/vclxwindows.cxx +++ b/toolkit/source/awt/vclxwindows.cxx @@ -63,6 +63,9 @@ #include #include +#include +#include + using ::com::sun::star::uno::Any; using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::makeAny; @@ -634,7 +637,13 @@ void VCLXButton::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) ::com::sun::star::awt::ActionEvent aEvent; aEvent.Source = (::cppu::OWeakObject*)this; aEvent.ActionCommand = maActionCommand; - maActionListeners.actionPerformed( aEvent ); + + Callback aCallback = ::boost::bind( + &ActionListenerMultiplexer::actionPerformed, + &maActionListeners, + aEvent + ); + ImplExecuteAsyncWithoutSolarLock( aCallback ); } } break; -- cgit v1.2.3 From 8edd46f0711d56369dd863b8deea5a98fcc1f31b Mon Sep 17 00:00:00 2001 From: Niklas Nebel Date: Thu, 6 May 2010 12:15:55 +0200 Subject: calc54: #i111421# use lcl_GetTableVars in GetDataResultPositionData --- sc/source/core/data/dpoutput.cxx | 160 ++++++++++++++++++++------------------- 1 file changed, 81 insertions(+), 79 deletions(-) diff --git a/sc/source/core/data/dpoutput.cxx b/sc/source/core/data/dpoutput.cxx index ec384874aa69..91688c6c0e2a 100755 --- a/sc/source/core/data/dpoutput.cxx +++ b/sc/source/core/data/dpoutput.cxx @@ -1087,6 +1087,72 @@ bool ScDPOutput::GetHeaderLayout() const return mbHeaderLayout; } +void lcl_GetTableVars( sal_Int32& rGrandTotalCols, sal_Int32& rGrandTotalRows, sal_Int32& rDataLayoutIndex, + std::vector& rDataNames, std::vector& rGivenNames, + sheet::DataPilotFieldOrientation& rDataOrient, + const uno::Reference& xSource ) +{ + rDataLayoutIndex = -1; // invalid + rGrandTotalCols = 0; + rGrandTotalRows = 0; + rDataOrient = sheet::DataPilotFieldOrientation_HIDDEN; + + uno::Reference xSrcProp( xSource, uno::UNO_QUERY ); + BOOL bColGrand = ScUnoHelpFunctions::GetBoolProperty( xSrcProp, + rtl::OUString::createFromAscii(DP_PROP_COLUMNGRAND) ); + if ( bColGrand ) + rGrandTotalCols = 1; // default if data layout not in columns + + BOOL bRowGrand = ScUnoHelpFunctions::GetBoolProperty( xSrcProp, + rtl::OUString::createFromAscii(DP_PROP_ROWGRAND) ); + if ( bRowGrand ) + rGrandTotalRows = 1; // default if data layout not in rows + + if ( xSource.is() ) + { + // find index and orientation of "data layout" dimension, count data dimensions + + sal_Int32 nDataCount = 0; + + uno::Reference xDims = new ScNameToIndexAccess( xSource->getDimensions() ); + long nDimCount = xDims->getCount(); + for (long nDim=0; nDim xDim = + ScUnoHelpFunctions::AnyToInterface( xDims->getByIndex(nDim) ); + uno::Reference xDimProp( xDim, uno::UNO_QUERY ); + if ( xDimProp.is() ) + { + sheet::DataPilotFieldOrientation eDimOrient = + (sheet::DataPilotFieldOrientation) ScUnoHelpFunctions::GetEnumProperty( + xDimProp, rtl::OUString::createFromAscii(DP_PROP_ORIENTATION), + sheet::DataPilotFieldOrientation_HIDDEN ); + if ( ScUnoHelpFunctions::GetBoolProperty( xDimProp, + rtl::OUString::createFromAscii(DP_PROP_ISDATALAYOUT) ) ) + { + rDataLayoutIndex = nDim; + rDataOrient = eDimOrient; + } + if ( eDimOrient == sheet::DataPilotFieldOrientation_DATA ) + { + String aSourceName; + String aGivenName; + ScDPOutput::GetDataDimensionNames( aSourceName, aGivenName, xDim ); + rDataNames.push_back( aSourceName ); + rGivenNames.push_back( aGivenName ); + + ++nDataCount; + } + } + } + + if ( ( rDataOrient == sheet::DataPilotFieldOrientation_COLUMN ) && bColGrand ) + rGrandTotalCols = nDataCount; + else if ( ( rDataOrient == sheet::DataPilotFieldOrientation_ROW ) && bRowGrand ) + rGrandTotalRows = nDataCount; + } +} + void ScDPOutput::GetPositionData(const ScAddress& rPos, DataPilotTablePositionData& rPosData) { using namespace ::com::sun::star::sheet; @@ -1207,15 +1273,14 @@ bool ScDPOutput::GetDataResultPositionData(vector& // No data field is present in this datapilot table. return false; - bool bColGrand = bool(); - any = xPropSet->getPropertyValue(rtl::OUString::createFromAscii(SC_UNO_COLGRAND)); - if (!(any >>= bColGrand)) - return false; - - bool bRowGrand = bool(); - any = xPropSet->getPropertyValue(rtl::OUString::createFromAscii(SC_UNO_ROWGRAND)); - if (!(any >>= bRowGrand)) - return false; + // #i111421# use lcl_GetTableVars for correct size of totals and data layout position + sal_Int32 nGrandTotalCols; + sal_Int32 nGrandTotalRows; + sal_Int32 nDataLayoutIndex; + std::vector aDataNames; + std::vector aGivenNames; + sheet::DataPilotFieldOrientation eDataOrient; + lcl_GetTableVars( nGrandTotalCols, nGrandTotalRows, nDataLayoutIndex, aDataNames, aGivenNames, eDataOrient, xSource ); SCCOL nCol = rPos.Col(); SCROW nRow = rPos.Row(); @@ -1232,12 +1297,16 @@ bool ScDPOutput::GetDataResultPositionData(vector& return false; } - bool bFilterByCol = !(bColGrand && (nCol == nTabEndCol)); - bool bFilterByRow = !(bRowGrand && (nRow == nTabEndRow)); + bool bFilterByCol = (nCol <= static_cast(nTabEndCol - nGrandTotalCols)); + bool bFilterByRow = (nRow <= static_cast(nTabEndRow - nGrandTotalRows)); // column fields for (SCCOL nColField = 0; nColField < nColFieldCount && bFilterByCol; ++nColField) { + if (pColFields[nColField].nDim == nDataLayoutIndex) + // There is no sense including the data layout field for filtering. + continue; + sheet::DataPilotFieldFilter filter; filter.FieldName = pColFields[nColField].maName; @@ -1256,10 +1325,9 @@ bool ScDPOutput::GetDataResultPositionData(vector& } // row fields - bool bDataLayoutExists = (nDataFieldCount > 1); for (SCROW nRowField = 0; nRowField < nRowFieldCount && bFilterByRow; ++nRowField) { - if (bDataLayoutExists && nRowField == nRowFieldCount - 1) + if (pRowFields[nRowField].nDim == nDataLayoutIndex) // There is no sense including the data layout field for filtering. continue; @@ -1643,72 +1711,6 @@ void ScDPOutput::GetDataDimensionNames( String& rSourceName, String& rGivenName, } } -void lcl_GetTableVars( sal_Int32& rGrandTotalCols, sal_Int32& rGrandTotalRows, sal_Int32& rDataLayoutIndex, - std::vector& rDataNames, std::vector& rGivenNames, - sheet::DataPilotFieldOrientation& rDataOrient, - const uno::Reference& xSource ) -{ - rDataLayoutIndex = -1; // invalid - rGrandTotalCols = 0; - rGrandTotalRows = 0; - rDataOrient = sheet::DataPilotFieldOrientation_HIDDEN; - - uno::Reference xSrcProp( xSource, uno::UNO_QUERY ); - BOOL bColGrand = ScUnoHelpFunctions::GetBoolProperty( xSrcProp, - rtl::OUString::createFromAscii(DP_PROP_COLUMNGRAND) ); - if ( bColGrand ) - rGrandTotalCols = 1; // default if data layout not in columns - - BOOL bRowGrand = ScUnoHelpFunctions::GetBoolProperty( xSrcProp, - rtl::OUString::createFromAscii(DP_PROP_ROWGRAND) ); - if ( bRowGrand ) - rGrandTotalRows = 1; // default if data layout not in rows - - if ( xSource.is() ) - { - // find index and orientation of "data layout" dimension, count data dimensions - - sal_Int32 nDataCount = 0; - - uno::Reference xDims = new ScNameToIndexAccess( xSource->getDimensions() ); - long nDimCount = xDims->getCount(); - for (long nDim=0; nDim xDim = - ScUnoHelpFunctions::AnyToInterface( xDims->getByIndex(nDim) ); - uno::Reference xDimProp( xDim, uno::UNO_QUERY ); - if ( xDimProp.is() ) - { - sheet::DataPilotFieldOrientation eDimOrient = - (sheet::DataPilotFieldOrientation) ScUnoHelpFunctions::GetEnumProperty( - xDimProp, rtl::OUString::createFromAscii(DP_PROP_ORIENTATION), - sheet::DataPilotFieldOrientation_HIDDEN ); - if ( ScUnoHelpFunctions::GetBoolProperty( xDimProp, - rtl::OUString::createFromAscii(DP_PROP_ISDATALAYOUT) ) ) - { - rDataLayoutIndex = nDim; - rDataOrient = eDimOrient; - } - if ( eDimOrient == sheet::DataPilotFieldOrientation_DATA ) - { - String aSourceName; - String aGivenName; - ScDPOutput::GetDataDimensionNames( aSourceName, aGivenName, xDim ); - rDataNames.push_back( aSourceName ); - rGivenNames.push_back( aGivenName ); - - ++nDataCount; - } - } - } - - if ( ( rDataOrient == sheet::DataPilotFieldOrientation_COLUMN ) && bColGrand ) - rGrandTotalCols = nDataCount; - else if ( ( rDataOrient == sheet::DataPilotFieldOrientation_ROW ) && bRowGrand ) - rGrandTotalRows = nDataCount; - } -} - // Returns TRUE on success and stores the result in rTarget // Returns FALSE if rFilters or rTarget describes something that is not visible BOOL ScDPOutput::GetPivotData( ScDPGetPivotDataField& rTarget, -- cgit v1.2.3 From 1678607abe3925444f6d0d282180ab34893e2c0f Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Thu, 6 May 2010 14:18:16 +0200 Subject: os141: before accessing the VCL menu in any public API method, lock the SolarMutex --- toolkit/source/awt/vclxmenu.cxx | 44 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/toolkit/source/awt/vclxmenu.cxx b/toolkit/source/awt/vclxmenu.cxx index 1992a8d721a6..5e44df58318e 100644 --- a/toolkit/source/awt/vclxmenu.cxx +++ b/toolkit/source/awt/vclxmenu.cxx @@ -37,11 +37,13 @@ #include #include #include +#include #include #include #include #include +#include #include @@ -416,6 +418,7 @@ void VCLXMenu::removeMenuListener( const ::com::sun::star::uno::Reference< ::com void VCLXMenu::insertItem( sal_Int16 nItemId, const ::rtl::OUString& aText, sal_Int16 nItemStyle, sal_Int16 nPos ) throw(::com::sun::star::uno::RuntimeException) { + ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); if ( mpMenu ) @@ -424,6 +427,7 @@ void VCLXMenu::insertItem( sal_Int16 nItemId, const ::rtl::OUString& aText, sal_ void VCLXMenu::removeItem( sal_Int16 nPos, sal_Int16 nCount ) throw(::com::sun::star::uno::RuntimeException) { + ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); sal_Int32 nItemCount = (sal_Int32)mpMenu->GetItemCount(); @@ -438,6 +442,7 @@ void VCLXMenu::removeItem( sal_Int16 nPos, sal_Int16 nCount ) throw(::com::sun:: sal_Int16 VCLXMenu::getItemCount( ) throw(::com::sun::star::uno::RuntimeException) { + ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); return mpMenu ? mpMenu->GetItemCount() : 0; @@ -445,6 +450,7 @@ sal_Int16 VCLXMenu::getItemCount( ) throw(::com::sun::star::uno::RuntimeExcepti sal_Int16 VCLXMenu::getItemId( sal_Int16 nPos ) throw(::com::sun::star::uno::RuntimeException) { + ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); return mpMenu ? mpMenu->GetItemId( nPos ) : 0; @@ -452,6 +458,7 @@ sal_Int16 VCLXMenu::getItemId( sal_Int16 nPos ) throw(::com::sun::star::uno::Run sal_Int16 VCLXMenu::getItemPos( sal_Int16 nId ) throw(::com::sun::star::uno::RuntimeException) { + ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); return mpMenu ? mpMenu->GetItemPos( nId ) : 0; @@ -459,6 +466,7 @@ sal_Int16 VCLXMenu::getItemPos( sal_Int16 nId ) throw(::com::sun::star::uno::Run void VCLXMenu::enableItem( sal_Int16 nItemId, sal_Bool bEnable ) throw(::com::sun::star::uno::RuntimeException) { + ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); if ( mpMenu ) @@ -467,6 +475,7 @@ void VCLXMenu::enableItem( sal_Int16 nItemId, sal_Bool bEnable ) throw(::com::su sal_Bool VCLXMenu::isItemEnabled( sal_Int16 nItemId ) throw(::com::sun::star::uno::RuntimeException) { + ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); return mpMenu ? mpMenu->IsItemEnabled( nItemId ) : sal_False; @@ -474,6 +483,7 @@ sal_Bool VCLXMenu::isItemEnabled( sal_Int16 nItemId ) throw(::com::sun::star::un void VCLXMenu::setItemText( sal_Int16 nItemId, const ::rtl::OUString& aText ) throw(::com::sun::star::uno::RuntimeException) { + ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); if ( mpMenu ) @@ -482,6 +492,7 @@ void VCLXMenu::setItemText( sal_Int16 nItemId, const ::rtl::OUString& aText ) th ::rtl::OUString VCLXMenu::getItemText( sal_Int16 nItemId ) throw(::com::sun::star::uno::RuntimeException) { + ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); ::rtl::OUString aItemText; @@ -492,6 +503,7 @@ void VCLXMenu::setItemText( sal_Int16 nItemId, const ::rtl::OUString& aText ) th void VCLXMenu::setPopupMenu( sal_Int16 nItemId, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPopupMenu >& rxPopupMenu ) throw(::com::sun::star::uno::RuntimeException) { + ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); VCLXMenu* pVCLMenu = VCLXMenu::GetImplementation( rxPopupMenu ); @@ -510,6 +522,7 @@ void VCLXMenu::setPopupMenu( sal_Int16 nItemId, const ::com::sun::star::uno::Ref ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPopupMenu > VCLXMenu::getPopupMenu( sal_Int16 nItemId ) throw(::com::sun::star::uno::RuntimeException) { + ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPopupMenu > aRef; @@ -533,6 +546,7 @@ void VCLXMenu::setPopupMenu( sal_Int16 nItemId, const ::com::sun::star::uno::Ref // ::com::sun::star::awt::XPopupMenu void VCLXMenu::insertSeparator( sal_Int16 nPos ) throw(::com::sun::star::uno::RuntimeException) { + ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); if ( mpMenu ) @@ -541,6 +555,7 @@ void VCLXMenu::insertSeparator( sal_Int16 nPos ) throw(::com::sun::star::uno::Ru void VCLXMenu::setDefaultItem( sal_Int16 nItemId ) throw(::com::sun::star::uno::RuntimeException) { + ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); if ( mpMenu ) @@ -549,6 +564,7 @@ void VCLXMenu::setDefaultItem( sal_Int16 nItemId ) throw(::com::sun::star::uno:: sal_Int16 VCLXMenu::getDefaultItem( ) throw(::com::sun::star::uno::RuntimeException) { + ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); return mpMenu ? mpMenu->GetDefaultItem() : 0; @@ -556,6 +572,7 @@ sal_Int16 VCLXMenu::getDefaultItem( ) throw(::com::sun::star::uno::RuntimeExcep void VCLXMenu::checkItem( sal_Int16 nItemId, sal_Bool bCheck ) throw(::com::sun::star::uno::RuntimeException) { + ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); if ( mpMenu ) @@ -564,6 +581,7 @@ void VCLXMenu::checkItem( sal_Int16 nItemId, sal_Bool bCheck ) throw(::com::sun: sal_Bool VCLXMenu::isItemChecked( sal_Int16 nItemId ) throw(::com::sun::star::uno::RuntimeException) { + ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); return mpMenu ? mpMenu->IsItemChecked( nItemId ) : sal_False; @@ -571,6 +589,7 @@ sal_Bool VCLXMenu::isItemChecked( sal_Int16 nItemId ) throw(::com::sun::star::un sal_Int16 VCLXMenu::execute( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& rxWindowPeer, const ::com::sun::star::awt::Rectangle& rArea, sal_Int16 nFlags ) throw(::com::sun::star::uno::RuntimeException) { + ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); sal_Int16 nRet = 0; @@ -582,6 +601,7 @@ sal_Int16 VCLXMenu::execute( const ::com::sun::star::uno::Reference< ::com::sun: void SAL_CALL VCLXMenu::setCommand( sal_Int16 nItemId, const ::rtl::OUString& aCommand ) throw (::com::sun::star::uno::RuntimeException) { + ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); if ( mpMenu ) @@ -590,6 +610,7 @@ void SAL_CALL VCLXMenu::setCommand( sal_Int16 nItemId, const ::rtl::OUString& aC ::rtl::OUString SAL_CALL VCLXMenu::getCommand( sal_Int16 nItemId ) throw (::com::sun::star::uno::RuntimeException) { + ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); ::rtl::OUString aItemCommand; @@ -600,6 +621,7 @@ void SAL_CALL VCLXMenu::setCommand( sal_Int16 nItemId, const ::rtl::OUString& aC void SAL_CALL VCLXMenu::setHelpCommand( sal_Int16 nItemId, const ::rtl::OUString& aHelp ) throw (::com::sun::star::uno::RuntimeException) { + ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); if ( mpMenu ) @@ -608,6 +630,7 @@ void SAL_CALL VCLXMenu::setHelpCommand( sal_Int16 nItemId, const ::rtl::OUString ::rtl::OUString SAL_CALL VCLXMenu::getHelpCommand( sal_Int16 nItemId ) throw (::com::sun::star::uno::RuntimeException) { + ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); ::rtl::OUString aHelpCommand; @@ -708,12 +731,14 @@ namespace ::sal_Bool SAL_CALL VCLXMenu::isPopupMenu( ) throw (::com::sun::star::uno::RuntimeException) { + ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); return IsPopupMenu(); } void SAL_CALL VCLXMenu::clear( ) throw (::com::sun::star::uno::RuntimeException) { + ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); if ( mpMenu ) mpMenu->Clear(); @@ -724,6 +749,7 @@ void SAL_CALL VCLXMenu::clear( ) throw (::com::sun::star::uno::RuntimeException throw ( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException) { + ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); ::com::sun::star::awt::MenuItemType aMenuItemType = @@ -740,6 +766,7 @@ throw ( ::com::sun::star::container::NoSuchElementException, void SAL_CALL VCLXMenu::hideDisabledEntries( ::sal_Bool bHide ) throw (::com::sun::star::uno::RuntimeException) { + ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); if ( mpMenu ) { @@ -761,6 +788,7 @@ throw (::com::sun::star::uno::RuntimeException) ::sal_Bool SAL_CALL VCLXMenu::isInExecute( ) throw (::com::sun::star::uno::RuntimeException) { + ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); if ( mpMenu && IsPopupMenu() ) @@ -773,6 +801,7 @@ throw (::com::sun::star::uno::RuntimeException) void SAL_CALL VCLXMenu::endExecute() throw (::com::sun::star::uno::RuntimeException) { + ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); if ( mpMenu && IsPopupMenu() ) @@ -783,6 +812,7 @@ throw (::com::sun::star::uno::RuntimeException) void SAL_CALL VCLXMenu::setLogo( const ::com::sun::star::awt::MenuLogo& aMenuLogo ) throw (::com::sun::star::uno::RuntimeException) { + ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); if ( mpMenu ) @@ -807,6 +837,7 @@ throw (::com::sun::star::uno::RuntimeException) ::com::sun::star::awt::MenuLogo SAL_CALL VCLXMenu::getLogo( ) throw (::com::sun::star::uno::RuntimeException) { + ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); ::com::sun::star::awt::MenuLogo aAWTMenuLogo; @@ -827,6 +858,7 @@ throw (::com::sun::star::uno::RuntimeException) void SAL_CALL VCLXMenu::enableAutoMnemonics( ::sal_Bool bEnable ) throw (::com::sun::star::uno::RuntimeException) { + ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); if ( mpMenu ) { @@ -843,6 +875,7 @@ void SAL_CALL VCLXMenu::setAcceleratorKeyEvent( ::sal_Int16 nItemId, throw ( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException) { + ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); if ( mpMenu && IsPopupMenu() ) @@ -858,6 +891,7 @@ throw ( ::com::sun::star::container::NoSuchElementException, throw ( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException) { + ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); ::com::sun::star::awt::KeyEvent aKeyEvent; @@ -876,6 +910,7 @@ void SAL_CALL VCLXMenu::setHelpText( ::sal_Int16 nItemId, const ::rtl::OUString& throw ( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException) { + ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); if ( mpMenu && IsPopupMenu() ) @@ -890,6 +925,7 @@ throw ( ::com::sun::star::container::NoSuchElementException, throw ( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException) { + ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); rtl::OUString sHelpText; @@ -907,6 +943,7 @@ void SAL_CALL VCLXMenu::setTipHelpText( ::sal_Int16 nItemId, const ::rtl::OUStri throw ( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException) { + ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); if ( mpMenu && IsPopupMenu() ) @@ -921,6 +958,7 @@ throw ( ::com::sun::star::container::NoSuchElementException, throw ( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException) { + ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); rtl::OUString sTipHelpText; @@ -939,6 +977,7 @@ void SAL_CALL VCLXMenu::setItemImage( throw ( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException) { + ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); if ( mpMenu && IsPopupMenu() ) @@ -954,6 +993,7 @@ throw ( ::com::sun::star::container::NoSuchElementException, throw ( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException) { + ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic > rxGraphic; @@ -973,6 +1013,7 @@ void SAL_CALL VCLXMenu::setItemImageAngle( ::sal_Int16 nItemId, ::sal_Int32 nAng throw ( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException) { + ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); if ( mpMenu && IsPopupMenu() ) @@ -987,6 +1028,7 @@ throw ( ::com::sun::star::container::NoSuchElementException, throw ( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException) { + ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); ::sal_Int32 nItemImageAngle( 0 ); @@ -1003,6 +1045,7 @@ void SAL_CALL VCLXMenu::setItemImageMirrorMode( ::sal_Int16 nItemId, ::sal_Bool throw ( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException) { + ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); if ( mpMenu && IsPopupMenu() ) @@ -1017,6 +1060,7 @@ throw ( ::com::sun::star::container::NoSuchElementException, throw ( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException) { + ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); sal_Bool bMirrorMode( sal_False ); -- cgit v1.2.3 From 4f4296612fa42daf3ec30dc76692a4f390362bd1 Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Thu, 6 May 2010 14:19:59 +0200 Subject: #i111193# added patch to have a working m77 --- desktop/source/migration/migration.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/desktop/source/migration/migration.cxx b/desktop/source/migration/migration.cxx index 2181daab7454..b9be788ebd4b 100644 --- a/desktop/source/migration/migration.cxx +++ b/desktop/source/migration/migration.cxx @@ -232,6 +232,7 @@ static void insertSorted(migrations_available& rAvailableMigrations, supported_m { rAvailableMigrations.insert(pIter, aSupportedMigration ); bInserted = true; + break; } ++pIter; } -- cgit v1.2.3 From ef87f256df12b618d410182c6b70cf5302e92c31 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Thu, 6 May 2010 14:21:12 +0200 Subject: os141: notify mouse events without a locked SolarMutex --- toolkit/source/awt/vclxwindow.cxx | 195 +++++++++++--------------------------- 1 file changed, 55 insertions(+), 140 deletions(-) diff --git a/toolkit/source/awt/vclxwindow.cxx b/toolkit/source/awt/vclxwindow.cxx index bb880fe68b66..d1fb12f2cf6f 100644 --- a/toolkit/source/awt/vclxwindow.cxx +++ b/toolkit/source/awt/vclxwindow.cxx @@ -67,6 +67,8 @@ #include +#include + using namespace ::com::sun::star; using ::com::sun::star::uno::Reference; @@ -111,104 +113,38 @@ namespace }; //................................................................ - //. MouseEventType + //. EventType //................................................................ - enum MouseEventType + enum EventType { - META_FIRST_MOUSE_EVENT = 0, - - EVENT_MOUSE_PRESSED = 0, - EVENT_MOUSE_RELEASED = 1, - EVENT_MOUSE_ENTERED = 2, - EVENT_MOUSE_EXITED = 3, - - META_LAST_MOUSE_EVENT = 3 + EVENT_WINDOW_ENABLED = 1, + EVENT_WINDOW_DISABLED = 2, }; - //................................................................ - //. PlainEventType - //................................................................ - enum PlainEventType - { - META_FIRST_PLAIN_EVENT = 4, - - EVENT_WINDOW_ENABLED = 4, - EVENT_WINDOW_DISABLED = 5, - - META_LAST_PLAIN_EVENT = 5 - }; - -#if OSL_DEBUG_LEVEL > 0 - static void checkEventDefinitions() - { - OSL_ENSURE( (int)META_LAST_MOUSE_EVENT < (int)META_FIRST_PLAIN_EVENT, "checkEventDefinitions: invalid event definitions!" ); - } - #define DBG_CHECK_EVENTS() checkEventDefinitions() -#else - #define DBG_CHECK_EVENTS() -#endif - //................................................................ //. AnyWindowEvent //................................................................ struct AnyWindowEvent : public ::comphelper::AnyEvent { private: - awt::MouseEvent m_aMouseEvent; - lang::EventObject m_aPlainEvent; - - sal_Int32 m_nEventType; + lang::EventObject m_aEvent; + EventType m_nEventType; public: - AnyWindowEvent( const awt::MouseEvent& _rEvent, MouseEventType _nType ) + AnyWindowEvent( const lang::EventObject& _rEvent, EventType _nType ) :comphelper::AnyEvent() - ,m_aMouseEvent( _rEvent ) - ,m_nEventType( static_cast< sal_Int32 >( _nType ) ) + ,m_aEvent( _rEvent ) + ,m_nEventType( _nType ) { - DBG_CHECK_EVENTS(); } - AnyWindowEvent( const lang::EventObject& _rEvent, PlainEventType _nType ) - :comphelper::AnyEvent() - ,m_aPlainEvent( _rEvent ) - ,m_nEventType( static_cast< sal_Int32 >( _nType ) ) + const lang::EventObject& getEvent() const { - DBG_CHECK_EVENTS(); + return m_aEvent; } - bool isMouseEvent() const - { - return ( META_FIRST_MOUSE_EVENT <= m_nEventType ) && ( m_nEventType <= META_LAST_MOUSE_EVENT ); - } + EventType getEventType() const { return m_nEventType; } - bool isPlainEvent() const - { - return ( META_FIRST_PLAIN_EVENT <= m_nEventType ) && ( m_nEventType <= META_LAST_PLAIN_EVENT ); - } - - const awt::MouseEvent& getMouseEvent() const - { - OSL_ENSURE( isMouseEvent(), "AnyWindowEvent::getMouseEvent: no mouse event!" ); - return m_aMouseEvent; - } - - MouseEventType getMouseEventType() const - { - OSL_ENSURE( isMouseEvent(), "AnyWindowEvent::getMouseEventType: no mouse event!" ); - return static_cast< MouseEventType >( m_nEventType ); - } - - const lang::EventObject& getPlainEvent() const - { - OSL_ENSURE( isPlainEvent(), "AnyWindowEvent::getPlainEvent: no plain event!" ); - return m_aPlainEvent; - } - - PlainEventType getPlainEventType() const - { - OSL_ENSURE( isPlainEvent(), "AnyWindowEvent::getPlainEventType: no mouse event!" ); - return static_cast< PlainEventType >( m_nEventType ); - } }; } @@ -288,13 +224,9 @@ public: void setDirectVisible( sal_Bool bDirectVisible ) { mbDirectVisible = bDirectVisible; } sal_Bool isDirectVisible() { return mbDirectVisible; } - /** asynchronously notifies a mouse event to the VCLXWindow's XMouseListeners - */ - void notifyMouseEvent( const awt::MouseEvent& _rMouseEvent, MouseEventType _nType ); - /** asynchronously notifies an event described by an EventObject to the respective listeners */ - void notifyPlainEvent( const lang::EventObject& _rPlainEvent, PlainEventType _nType ); + void notifyEvent( const lang::EventObject& _rEvent, EventType _nType ); /** impl-version of VCLXWindow::ImplExecuteAsyncWithoutSolarLock */ @@ -437,19 +369,11 @@ void VCLXWindowImpl::impl_notifyAnyEvent( const ::rtl::Reference< ::comphelper:: } //-------------------------------------------------------------------- -void VCLXWindowImpl::notifyMouseEvent( const awt::MouseEvent& _rMouseEvent, MouseEventType _nType ) -{ - ::vos::OClearableGuard aGuard( mrMutex ); - if ( maMouseListeners.getLength() ) - impl_notifyAnyEvent( new AnyWindowEvent( _rMouseEvent, _nType ) ); -} - -//-------------------------------------------------------------------- -void VCLXWindowImpl::notifyPlainEvent( const lang::EventObject& _rPlainEvent, PlainEventType _nType ) +void VCLXWindowImpl::notifyEvent( const lang::EventObject& _rEvent, EventType _nType ) { ::vos::OClearableGuard aGuard( mrMutex ); if ( maWindow2Listeners.getLength() ) - impl_notifyAnyEvent( new AnyWindowEvent( _rPlainEvent, _nType ) ); + impl_notifyAnyEvent( new AnyWindowEvent( _rEvent, _nType ) ); } //-------------------------------------------------------------------- @@ -492,47 +416,19 @@ void VCLXWindowImpl::processEvent( const ::comphelper::AnyEvent& _rEvent ) return; const AnyWindowEvent& rEventDescriptor( static_cast< const AnyWindowEvent& >( _rEvent ) ); - if ( rEventDescriptor.isMouseEvent() ) - { - const awt::MouseEvent& rEvent( rEventDescriptor.getMouseEvent() ); - switch ( rEventDescriptor.getMouseEventType() ) - { - case EVENT_MOUSE_PRESSED: - maMouseListeners.mousePressed( rEvent ); - break; - case EVENT_MOUSE_RELEASED: - maMouseListeners.mouseReleased( rEvent ); - break; - case EVENT_MOUSE_ENTERED: - maMouseListeners.mouseEntered( rEvent ); - break; - case EVENT_MOUSE_EXITED: - maMouseListeners.mouseExited( rEvent ); - break; - default: - DBG_ERROR( "VCLXWindowImpl::processEvent: what kind of event *is* this (1)?" ); - break; - } - } - else if ( rEventDescriptor.isPlainEvent() ) - { - const lang::EventObject& rEvent( rEventDescriptor.getPlainEvent() ); - switch ( rEventDescriptor.getPlainEventType() ) - { - case EVENT_WINDOW_ENABLED: - maWindow2Listeners.notifyEach( &XWindowListener2::windowEnabled, rEvent ); - break; - case EVENT_WINDOW_DISABLED: - maWindow2Listeners.notifyEach( &XWindowListener2::windowDisabled, rEvent ); - break; - default: - DBG_ERROR( "VCLXWindowImpl::processEvent: what kind of event *is* this (2)?" ); - break; - } - } - else + + const lang::EventObject& rEvent( rEventDescriptor.getEvent() ); + switch ( rEventDescriptor.getEventType() ) { - DBG_ERROR( "VCLXWindowImpl::processEvent: what kind of event *is* this (3)?" ); + case EVENT_WINDOW_ENABLED: + maWindow2Listeners.notifyEach( &XWindowListener2::windowEnabled, rEvent ); + break; + case EVENT_WINDOW_DISABLED: + maWindow2Listeners.notifyEach( &XWindowListener2::windowDisabled, rEvent ); + break; + default: + DBG_ERROR( "VCLXWindowImpl::processEvent: what kind of event *is* this (2)?" ); + break; } } @@ -713,7 +609,7 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) { bool bEnabled = ( VCLEVENT_WINDOW_ENABLED == rVclWindowEvent.GetId() ); EventObject aEvent( *this ); - mpImpl->notifyPlainEvent( aEvent, + mpImpl->notifyEvent( aEvent, bEnabled ? EVENT_WINDOW_ENABLED : EVENT_WINDOW_DISABLED ); } break; @@ -945,7 +841,13 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) MouseEvent aMEvt( aWhere, 1, MOUSE_SIMPLECLICK, MOUSE_LEFT, 0 ); awt::MouseEvent aEvent( VCLUnoHelper::createMouseEvent( aMEvt, *this ) ); aEvent.PopupTrigger = sal_True; - mpImpl->notifyMouseEvent( aEvent, EVENT_MOUSE_PRESSED ); + + Callback aCallback = ::boost::bind( + &MouseListenerMultiplexer::mousePressed, + &mpImpl->getMouseListeners(), + aEvent + ); + ImplExecuteAsyncWithoutSolarLock( aCallback ); } } break; @@ -955,10 +857,13 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) if ( mpImpl->getMouseListeners().getLength() && ( pMouseEvt->IsEnterWindow() || pMouseEvt->IsLeaveWindow() ) ) { awt::MouseEvent aEvent( VCLUnoHelper::createMouseEvent( *pMouseEvt, *this ) ); - mpImpl->notifyMouseEvent( - aEvent, - pMouseEvt->IsEnterWindow() ? EVENT_MOUSE_ENTERED : EVENT_MOUSE_EXITED + + Callback aCallback = ::boost::bind( + pMouseEvt->IsEnterWindow() ? &MouseListenerMultiplexer::mouseEntered : &MouseListenerMultiplexer::mouseExited, + &mpImpl->getMouseListeners(), + aEvent ); + ImplExecuteAsyncWithoutSolarLock( aCallback ); } if ( mpImpl->getMouseMotionListeners().getLength() && !pMouseEvt->IsEnterWindow() && !pMouseEvt->IsLeaveWindow() ) @@ -977,7 +882,12 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) if ( mpImpl->getMouseListeners().getLength() ) { awt::MouseEvent aEvent( VCLUnoHelper::createMouseEvent( *(MouseEvent*)rVclWindowEvent.GetData(), *this ) ); - mpImpl->notifyMouseEvent( aEvent, EVENT_MOUSE_PRESSED ); + Callback aCallback = ::boost::bind( + &MouseListenerMultiplexer::mousePressed, + &mpImpl->getMouseListeners(), + aEvent + ); + ImplExecuteAsyncWithoutSolarLock( aCallback ); } } break; @@ -986,7 +896,12 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) if ( mpImpl->getMouseListeners().getLength() ) { awt::MouseEvent aEvent( VCLUnoHelper::createMouseEvent( *(MouseEvent*)rVclWindowEvent.GetData(), *this ) ); - mpImpl->notifyMouseEvent( aEvent, EVENT_MOUSE_RELEASED ); + Callback aCallback = ::boost::bind( + &MouseListenerMultiplexer::mouseReleased, + &mpImpl->getMouseListeners(), + aEvent + ); + ImplExecuteAsyncWithoutSolarLock( aCallback ); } } break; -- cgit v1.2.3 From 1afc19fa95b833e68330b91f06e036d908f9e30f Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Thu, 6 May 2010 14:34:00 +0200 Subject: os141: windowEnabled/Disabled events now also using the new mechanism, implies the SolarMutex is not locked when they're called --- toolkit/source/awt/vclxwindow.cxx | 166 +++++++------------------------------- 1 file changed, 29 insertions(+), 137 deletions(-) diff --git a/toolkit/source/awt/vclxwindow.cxx b/toolkit/source/awt/vclxwindow.cxx index d1fb12f2cf6f..fe906d8557d3 100644 --- a/toolkit/source/awt/vclxwindow.cxx +++ b/toolkit/source/awt/vclxwindow.cxx @@ -111,50 +111,14 @@ namespace m_rFlag = false; } }; - - //................................................................ - //. EventType - //................................................................ - enum EventType - { - EVENT_WINDOW_ENABLED = 1, - EVENT_WINDOW_DISABLED = 2, - }; - - //................................................................ - //. AnyWindowEvent - //................................................................ - struct AnyWindowEvent : public ::comphelper::AnyEvent - { - private: - lang::EventObject m_aEvent; - EventType m_nEventType; - - public: - AnyWindowEvent( const lang::EventObject& _rEvent, EventType _nType ) - :comphelper::AnyEvent() - ,m_aEvent( _rEvent ) - ,m_nEventType( _nType ) - { - } - - const lang::EventObject& getEvent() const - { - return m_aEvent; - } - - EventType getEventType() const { return m_nEventType; } - - }; } //==================================================================== //= VCLXWindowImpl //==================================================================== -class SAL_DLLPRIVATE VCLXWindowImpl : public ::comphelper::IEventProcessor +class SAL_DLLPRIVATE VCLXWindowImpl { private: - typedef ::std::vector< ::rtl::Reference< ::comphelper::AnyEvent > > LegacyEventArray; typedef ::std::vector< VCLXWindow::Callback > CallbackArray; private: @@ -179,9 +143,6 @@ private: VclContainerListenerMultiplexer maContainerListeners; TopWindowListenerMultiplexer maTopWindowListeners; - LegacyEventArray maLegacyEvents; - ULONG mnLegacyEventId; - CallbackArray maCallbackEvents; ULONG mnCallbackEventId; @@ -224,10 +185,6 @@ public: void setDirectVisible( sal_Bool bDirectVisible ) { mbDirectVisible = bDirectVisible; } sal_Bool isDirectVisible() { return mbDirectVisible; } - /** asynchronously notifies an event described by an EventObject to the respective listeners - */ - void notifyEvent( const lang::EventObject& _rEvent, EventType _nType ); - /** impl-version of VCLXWindow::ImplExecuteAsyncWithoutSolarLock */ void callBackAsync( const VCLXWindow::Callback& i_callback ); @@ -261,22 +218,10 @@ protected: virtual void SAL_CALL acquire(); virtual void SAL_CALL release(); - // IEventProcessor - virtual void processEvent( const ::comphelper::AnyEvent& _rEvent ); - private: - DECL_LINK( OnProcessLegacyEvent, void* ); DECL_LINK( OnProcessCallbacks, void* ); private: - /** notifies an arbitrary event - @param _rEvent - the event to notify - */ - void impl_notifyAnyEvent( - const ::rtl::Reference< ::comphelper::AnyEvent >& _rEvent - ); - private: /** determines whether the instance is already disposed @precond @@ -313,7 +258,6 @@ VCLXWindowImpl::VCLXWindowImpl( VCLXWindow& _rAntiImpl, ::vos::IMutex& _rMutex, ,maPaintListeners( _rAntiImpl ) ,maContainerListeners( _rAntiImpl ) ,maTopWindowListeners( _rAntiImpl ) - ,mnLegacyEventId( 0 ) ,mnCallbackEventId( 0 ) ,mbDisposing( false ) ,mbDesignMode( false ) @@ -335,10 +279,6 @@ VCLXWindowImpl::~VCLXWindowImpl() void VCLXWindowImpl::disposing() { ::vos::OGuard aGuard( mrMutex ); - if ( mnLegacyEventId ) - Application::RemoveUserEvent( mnLegacyEventId ); - mnLegacyEventId = 0; - if ( mnCallbackEventId ) Application::RemoveUserEvent( mnCallbackEventId ); mnCallbackEventId = 0; @@ -360,78 +300,6 @@ void VCLXWindowImpl::disposing() } -//-------------------------------------------------------------------- -void VCLXWindowImpl::impl_notifyAnyEvent( const ::rtl::Reference< ::comphelper::AnyEvent >& _rEvent ) -{ - maLegacyEvents.push_back( _rEvent ); - if ( !mnLegacyEventId ) - mnLegacyEventId = Application::PostUserEvent( LINK( this, VCLXWindowImpl, OnProcessLegacyEvent ) ); -} - -//-------------------------------------------------------------------- -void VCLXWindowImpl::notifyEvent( const lang::EventObject& _rEvent, EventType _nType ) -{ - ::vos::OClearableGuard aGuard( mrMutex ); - if ( maWindow2Listeners.getLength() ) - impl_notifyAnyEvent( new AnyWindowEvent( _rEvent, _nType ) ); -} - -//-------------------------------------------------------------------- -IMPL_LINK( VCLXWindowImpl, OnProcessLegacyEvent, void*, EMPTYARG ) -{ - // work on a copy of the events array - LegacyEventArray aEventsCopy; - { - ::vos::OGuard aGuard( mrMutex ); - aEventsCopy = maLegacyEvents; - maLegacyEvents.clear(); - - if ( !mnLegacyEventId ) - // we were disposed while waiting for the mutex to lock - return 1L; - - mnLegacyEventId = 0; - } - - { - ::toolkit::ReleaseSolarMutex aReleaseSolar; - for ( LegacyEventArray::const_iterator loop = aEventsCopy.begin(); - loop != aEventsCopy.end(); - ++loop - ) - { - processEvent( *(*loop) ); - } - } - - return 0L; -} - -//-------------------------------------------------------------------- -void VCLXWindowImpl::processEvent( const ::comphelper::AnyEvent& _rEvent ) -{ - ::vos::OGuard aGuard( mrMutex ); - if ( impl_isDisposed() ) - // while we were waiting for our mutex, another thread disposed us - return; - - const AnyWindowEvent& rEventDescriptor( static_cast< const AnyWindowEvent& >( _rEvent ) ); - - const lang::EventObject& rEvent( rEventDescriptor.getEvent() ); - switch ( rEventDescriptor.getEventType() ) - { - case EVENT_WINDOW_ENABLED: - maWindow2Listeners.notifyEach( &XWindowListener2::windowEnabled, rEvent ); - break; - case EVENT_WINDOW_DISABLED: - maWindow2Listeners.notifyEach( &XWindowListener2::windowDisabled, rEvent ); - break; - default: - DBG_ERROR( "VCLXWindowImpl::processEvent: what kind of event *is* this (2)?" ); - break; - } -} - //-------------------------------------------------------------------- void VCLXWindowImpl::callBackAsync( const VCLXWindow::Callback& i_callback ) { @@ -598,6 +466,28 @@ IMPL_LINK( VCLXWindow, WindowEventListener, VclSimpleEvent*, pEvent ) return 0; } +namespace +{ + struct CallWindow2Listener + { + CallWindow2Listener( ::cppu::OInterfaceContainerHelper& i_rWindow2Listeners, const bool i_bEnabled, const EventObject& i_rEvent ) + :m_rWindow2Listeners( i_rWindow2Listeners ) + ,m_bEnabled( i_bEnabled ) + ,m_aEvent( i_rEvent ) + { + } + + void operator()() + { + m_rWindow2Listeners.notifyEach( m_bEnabled ? &XWindowListener2::windowEnabled : &XWindowListener2::windowDisabled, m_aEvent ); + } + + ::cppu::OInterfaceContainerHelper& m_rWindow2Listeners; + const bool m_bEnabled; + const EventObject m_aEvent; + }; +} + void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) { ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xThis( (::cppu::OWeakObject*)this ); @@ -607,10 +497,12 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) case VCLEVENT_WINDOW_ENABLED: case VCLEVENT_WINDOW_DISABLED: { - bool bEnabled = ( VCLEVENT_WINDOW_ENABLED == rVclWindowEvent.GetId() ); - EventObject aEvent( *this ); - mpImpl->notifyEvent( aEvent, - bEnabled ? EVENT_WINDOW_ENABLED : EVENT_WINDOW_DISABLED ); + Callback aCallback = CallWindow2Listener( + mpImpl->getWindow2Listeners(), + ( VCLEVENT_WINDOW_ENABLED == rVclWindowEvent.GetId() ), + EventObject( *this ) + ); + ImplExecuteAsyncWithoutSolarLock( aCallback ); } break; -- cgit v1.2.3 From ac084249c20528bd55092715fff2b124639e0868 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Thu, 6 May 2010 14:43:01 +0200 Subject: os141: ensure the VCLXWindow is not destroyed while the callback event is underway --- toolkit/source/awt/vclxwindow.cxx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/toolkit/source/awt/vclxwindow.cxx b/toolkit/source/awt/vclxwindow.cxx index fe906d8557d3..dd4d56586b03 100644 --- a/toolkit/source/awt/vclxwindow.cxx +++ b/toolkit/source/awt/vclxwindow.cxx @@ -306,12 +306,18 @@ void VCLXWindowImpl::callBackAsync( const VCLXWindow::Callback& i_callback ) DBG_TESTSOLARMUTEX(); maCallbackEvents.push_back( i_callback ); if ( !mnCallbackEventId ) + { + // ensure our VCLXWindow is not destroyed while the event is underway + mrAntiImpl.acquire(); mnCallbackEventId = Application::PostUserEvent( LINK( this, VCLXWindowImpl, OnProcessCallbacks ) ); + } } //---------------------------------------------------------------------------------------------------------------------- IMPL_LINK( VCLXWindowImpl, OnProcessCallbacks, void*, EMPTYARG ) { + const Reference< uno::XInterface > xKeepAlive( mrAntiImpl ); + // work on a copy of the callback array CallbackArray aCallbacksCopy; { @@ -319,6 +325,9 @@ IMPL_LINK( VCLXWindowImpl, OnProcessCallbacks, void*, EMPTYARG ) aCallbacksCopy = maCallbackEvents; maCallbackEvents.clear(); + // we acquired our VCLXWindow once before posting the event, release this one ref now + mrAntiImpl.release(); + if ( !mnCallbackEventId ) // we were disposed while waiting for the mutex to lock return 1L; -- cgit v1.2.3 From bf301e0764af1d9575baf7f156f77d5c51cf4269 Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Thu, 6 May 2010 15:32:15 +0200 Subject: fwk139: #i110801# integrate the patch --- package/source/xstor/owriteablestream.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/source/xstor/owriteablestream.cxx b/package/source/xstor/owriteablestream.cxx index c5381a11cfea..cf2962b28985 100644 --- a/package/source/xstor/owriteablestream.cxx +++ b/package/source/xstor/owriteablestream.cxx @@ -3279,7 +3279,7 @@ uno::Any SAL_CALL OWriteStream::getPropertyValue( const ::rtl::OUString& aProp ) if ( ( ( m_pData->m_nStorageType == PACKAGE_STORAGE || m_pData->m_nStorageType == OFOPXML_STORAGE ) && aPropertyName.equalsAscii( "MediaType" ) ) - || m_pData->m_nStorageType == PACKAGE_STORAGE && aPropertyName.equalsAscii( "Encrypted" ) + || ( m_pData->m_nStorageType == PACKAGE_STORAGE && aPropertyName.equalsAscii( "Encrypted" ) ) || aPropertyName.equalsAscii( "Compressed" ) ) { m_pImpl->GetStreamProperties(); -- cgit v1.2.3 From 637bebf4f13e83ee1eacdc6b158a86613e388080 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Thu, 6 May 2010 15:50:03 +0200 Subject: os141: removed debug code which slipped in with some recent change ... --- svtools/source/uno/treecontrolpeer.cxx | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/svtools/source/uno/treecontrolpeer.cxx b/svtools/source/uno/treecontrolpeer.cxx index 7c202e3b2bdf..7fb1a007960f 100644 --- a/svtools/source/uno/treecontrolpeer.cxx +++ b/svtools/source/uno/treecontrolpeer.cxx @@ -197,9 +197,7 @@ void TreeControlPeer::addEntry( UnoTreeListEntry* pEntry ) mpTreeNodeMap = new TreeNodeMap(); } - const Reference< XTreeNode > xNormalizedNode( pEntry->mxNode, UNO_QUERY ); - (*mpTreeNodeMap)[ xNormalizedNode ] = pEntry; - OSL_TRACE( "tree: adding %p => %p", xNormalizedNode.get(), pEntry ); + (*mpTreeNodeMap)[ pEntry->mxNode ] = pEntry; } } @@ -209,11 +207,9 @@ void TreeControlPeer::removeEntry( UnoTreeListEntry* pEntry ) { if( mpTreeNodeMap && pEntry && pEntry->mxNode.is() ) { - const Reference< XTreeNode > xNormalizedNode( pEntry->mxNode, UNO_QUERY ); - TreeNodeMap::iterator aIter( mpTreeNodeMap->find( xNormalizedNode ) ); + TreeNodeMap::iterator aIter( mpTreeNodeMap->find( pEntry->mxNode ) ); if( aIter != mpTreeNodeMap->end() ) { - OSL_TRACE( "tree: removing %p => %p", xNormalizedNode.get(), pEntry ); mpTreeNodeMap->erase( aIter ); } } @@ -225,8 +221,7 @@ UnoTreeListEntry* TreeControlPeer::getEntry( const Reference< XTreeNode >& xNode { if( mpTreeNodeMap ) { - const Reference< XTreeNode > xNormalizedNode( xNode, UNO_QUERY ); - TreeNodeMap::iterator aIter( mpTreeNodeMap->find( xNormalizedNode ) ); + TreeNodeMap::iterator aIter( mpTreeNodeMap->find( xNode ) ); if( aIter != mpTreeNodeMap->end() ) return (*aIter).second; } -- cgit v1.2.3 From 9ee39d86f51ae10adc6b0b79e81644d13927b2bd Mon Sep 17 00:00:00 2001 From: Niklas Nebel Date: Fri, 7 May 2010 11:59:47 +0200 Subject: calc54: #i111435# in ScDPGroupTableData::CalcResults use dimension indexes including groups --- sc/inc/dpgroup.hxx | 1 - sc/source/core/data/dpgroup.cxx | 41 ++++------------------------------------ sc/source/core/data/dptabdat.cxx | 10 ++++++++-- 3 files changed, 12 insertions(+), 40 deletions(-) diff --git a/sc/inc/dpgroup.hxx b/sc/inc/dpgroup.hxx index 2a66f8b45555..a22b6fd6a2eb 100644 --- a/sc/inc/dpgroup.hxx +++ b/sc/inc/dpgroup.hxx @@ -207,7 +207,6 @@ class ScDPGroupTableData : public ScDPTableData void FillGroupValues( SCROW* pItemDataIndex, long nCount, const long* pDims ); virtual long GetSourceDim( long nDim ); // End Comments - void CopyFields(const ::std::vector& rFieldDims, ::std::vector& rNewFieldDims); bool IsNumGroupDimension( long nDimension ) const; void GetNumGroupInfo( long nDimension, ScDPNumGroupInfo& rInfo, diff --git a/sc/source/core/data/dpgroup.cxx b/sc/source/core/data/dpgroup.cxx index e71ec5c8b82c..edb3b787b9b2 100644 --- a/sc/source/core/data/dpgroup.cxx +++ b/sc/source/core/data/dpgroup.cxx @@ -1324,13 +1324,9 @@ void ScDPGroupTableData::GetDrillDownData(const vectorGetCacheTable(); sal_Int32 nRowSize = rCacheTable.getRowSize(); @@ -1340,7 +1336,7 @@ void ScDPGroupTableData::CalcResults(CalcInfo& rInfo, bool bAutoShow) continue; CalcRowData aData; - FillRowDataFromCacheTable(nRow, rCacheTable, aInfoSrc, aData); + FillRowDataFromCacheTable(nRow, rCacheTable, rInfo, aData); if ( !rInfo.aColLevelDims.empty() ) FillGroupValues(&aData.aColData[0], rInfo.aColLevelDims.size(), &rInfo.aColLevelDims[0]); @@ -1358,35 +1354,6 @@ const ScDPCacheTable& ScDPGroupTableData::GetCacheTable() const return pSourceData->GetCacheTable(); } -void ScDPGroupTableData::CopyFields(const vector& rFieldDims, vector& rNewFieldDims) -{ - size_t nCount = rFieldDims.size(); - if (!nCount) - return; - - long nGroupedColumns = aGroups.size(); - - rNewFieldDims.clear(); - rNewFieldDims.reserve(nCount); - for (size_t i = 0; i < nCount; ++i) - { - if ( rFieldDims[i] >= nSourceCount ) - { - if ( rFieldDims[i] == nSourceCount + nGroupedColumns ) - // data layout in source - rNewFieldDims.push_back(nSourceCount); - else - { - // original dimension - long n = rFieldDims[i] - nSourceCount; - rNewFieldDims.push_back(aGroups[n].GetSourceDim()); - } - } - else - rNewFieldDims.push_back(rFieldDims[i]); - } -} - void ScDPGroupTableData::FillGroupValues( /*ScDPItemData* pItemData*/ SCROW* pItemDataIndex, long nCount, const long* pDims ) { long nGroupedColumns = aGroups.size(); diff --git a/sc/source/core/data/dptabdat.cxx b/sc/source/core/data/dptabdat.cxx index cff18ef925d9..cb68732a237f 100755 --- a/sc/source/core/data/dptabdat.cxx +++ b/sc/source/core/data/dptabdat.cxx @@ -169,13 +169,19 @@ void ScDPTableData::FillRowDataFromCacheTable(sal_Int32 nRow, const ScDPCacheTab // page dimensions GetItemData(rCacheTable, nRow, rInfo.aPageDims, rData.aPageData); + long nCacheColumnCount = rCacheTable.GetCache()->GetColumnCount(); sal_Int32 n = rInfo.aDataSrcCols.size(); for (sal_Int32 i = 0; i < n; ++i) { long nDim = rInfo.aDataSrcCols[i]; rData.aValues.push_back( ScDPValueData() ); - ScDPValueData& rVal = rData.aValues.back(); - rCacheTable.getValue( rVal, static_cast(nDim), static_cast(nRow), false); + // #i111435# GetItemData needs dimension indexes including groups, + // so the index must be checked here (groups aren't useful as data fields). + if ( nDim < nCacheColumnCount ) + { + ScDPValueData& rVal = rData.aValues.back(); + rCacheTable.getValue( rVal, static_cast(nDim), static_cast(nRow), false); + } } } -- cgit v1.2.3 From 719a8ec12a09384e9ef08c671a0b07b7872fa085 Mon Sep 17 00:00:00 2001 From: Ingrid Halama Date: Fri, 7 May 2010 12:20:22 +0200 Subject: chart47: #i111102# remove assertion --- chart2/source/tools/DiagramHelper.cxx | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/chart2/source/tools/DiagramHelper.cxx b/chart2/source/tools/DiagramHelper.cxx index b95e7522943e..53132f73f059 100644 --- a/chart2/source/tools/DiagramHelper.cxx +++ b/chart2/source/tools/DiagramHelper.cxx @@ -466,18 +466,20 @@ sal_Int32 DiagramHelper::getDimension( const Reference< XDiagram > & xDiagram ) try { - Reference< XCoordinateSystemContainer > xCooSysCnt( - xDiagram, uno::UNO_QUERY_THROW ); - Sequence< Reference< XCoordinateSystem > > aCooSysSeq( - xCooSysCnt->getCoordinateSystems()); - - for( sal_Int32 i=0; i xCooSysCnt( xDiagram, uno::UNO_QUERY ); + if( xCooSysCnt.is() ) { - Reference< XCoordinateSystem > xCooSys( aCooSysSeq[i] ); - if(xCooSys.is()) + Sequence< Reference< XCoordinateSystem > > aCooSysSeq( + xCooSysCnt->getCoordinateSystems()); + + for( sal_Int32 i=0; igetDimension(); - break; + Reference< XCoordinateSystem > xCooSys( aCooSysSeq[i] ); + if(xCooSys.is()) + { + nResult = xCooSys->getDimension(); + break; + } } } } -- cgit v1.2.3 From c46278f9a1012448711dae5342803c483b52df70 Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Fri, 7 May 2010 14:42:22 +0200 Subject: #i110981# do nothing when nothing to do --- svx/source/svdraw/svdedtv.cxx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/svx/source/svdraw/svdedtv.cxx b/svx/source/svdraw/svdedtv.cxx index 3b878ce93138..5eae04dbbc87 100644 --- a/svx/source/svdraw/svdedtv.cxx +++ b/svx/source/svdraw/svdedtv.cxx @@ -805,6 +805,12 @@ void SdrEditView::DeleteMarkedList(const SdrMarkList& rMark) void SdrEditView::DeleteMarkedObj() { + // #i110981# return when nothing is to be done at all + if(!GetMarkedObjectCount()) + { + return; + } + // moved breaking action and undo start outside loop BrkAction(); BegUndo(ImpGetResStr(STR_EditDelete),GetDescriptionOfMarkedObjects(),SDRREPFUNC_OBJ_DELETE); -- cgit v1.2.3 From 88572c217b53b10a7d3ce1a0544813bf6fdc8bc0 Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Fri, 7 May 2010 16:40:17 +0200 Subject: #i111392# corrected TextOnCurve for CTL --- .../drawinglayer/primitive2d/textprimitive2d.hxx | 45 ++++++++- svx/source/svdraw/svdotextpathdecomposition.cxx | 104 ++++++++++++--------- 2 files changed, 103 insertions(+), 46 deletions(-) diff --git a/drawinglayer/inc/drawinglayer/primitive2d/textprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/textprimitive2d.hxx index 0f426c6ad2ba..6c67bded2b17 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/textprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/textprimitive2d.hxx @@ -62,11 +62,48 @@ namespace drawinglayer To get better text quality, it is suggested to handle tis primitive directly in a renderer. In that case, e.g. hintings on the system can be supported. + + @param maTextTransform + The text transformation contains the text start position (always baselined) + as translation, the FontSize as scale (where width relative to height defines + font scaling and width == height means no font scaling) and the font rotation + and shear. + When shear is used and a renderer does not support it, it may be better to use + the decomposition which will do everything correctly. Same is true for mirroring + which would be expressed as negative scalings. + + @param rText + The text to be used. Only a part may be used, but a bigger part of the string + may be necessary for correct layouting (e.g. international) + + @param aTextPosition + The index to the first character to use from rText + + @param aTextLength + The number of characters to use from rText + + @param rDXArray + The distances between the characters. This parameter may be empty, in that case + the renderer is responsible to do something useful. If it is given, it has to be of + the size aTextLength. Its values are in logical coordinates and describe the + distance for each character to use. This is independent from the font width which + is given with maTextTransform. The first value is the offset to use from the start + point in FontCoordinateSystem X-Direction (given by maTextTransform) to the start + point of the second character + + @param rFontAttribute + The font definition + + @param rLocale + The locale to use + + @param rFontColor + The font color to use */ class TextSimplePortionPrimitive2D : public BufferedDecompositionPrimitive2D { private: - /// text range transformation from unit range ([0.0 .. 1.0]) to text range + /// text transformation (FontCoordinateSystem) basegfx::B2DHomMatrix maTextTransform; /// The text, used from maTextPosition up to maTextPosition + maTextLength @@ -78,10 +115,10 @@ namespace drawinglayer /// The length for maText usage, starting from maTextPosition xub_StrLen maTextLength; - /// The DX array scale-independent in unit coordinates + /// The DX array in logic units ::std::vector< double > maDXArray; - /// The font to use + /// The font definition attribute::FontAttribute maFontAttribute; /// The Locale for the text @@ -90,7 +127,7 @@ namespace drawinglayer /// font color basegfx::BColor maFontColor; - /// #i96669# add simple range buffering for this primitive + /// #i96669# internal: add simple range buffering for this primitive basegfx::B2DRange maB2DRange; protected: diff --git a/svx/source/svdraw/svdotextpathdecomposition.cxx b/svx/source/svdraw/svdotextpathdecomposition.cxx index f6780bd7c90d..031e8e9dd45b 100644 --- a/svx/source/svdraw/svdotextpathdecomposition.cxx +++ b/svx/source/svdraw/svdotextpathdecomposition.cxx @@ -107,15 +107,13 @@ namespace maLocale(rInfo.mpLocale ? *rInfo.mpLocale : ::com::sun::star::lang::Locale()), mbRTL(rInfo.mrFont.IsVertical() ? false : rInfo.IsRTL()) { - if(mnTextLength) + if(mnTextLength && rInfo.mpDXArray) { maDblDXArray.reserve(mnTextLength); - const sal_Int32 nFontWidth(0L == maFont.GetWidth() ? maFont.GetHeight() : maFont.GetWidth()); - const double fScaleFactor(0L != nFontWidth ? 1.0 / (double)nFontWidth : 1.0); for(xub_StrLen a(0); a < mnTextLength; a++) { - maDblDXArray.push_back((double)rInfo.mpDXArray[a] * fScaleFactor); + maDblDXArray.push_back((double)rInfo.mpDXArray[a]); } } } @@ -291,7 +289,8 @@ namespace const double fPolyLength(basegfx::tools::getLength(aPolygonCandidate)); double fPolyEnd(fPolyLength); double fPolyStart(0.0); - double fScaleFactor(1.0); + double fAutosizeScaleFactor(1.0); + bool bAutosizeScale(false); if(maSdrFormTextAttribute.getFormTextMirror()) { @@ -352,7 +351,8 @@ namespace // if scale, prepare scale factor between curve length and text length if(0.0 != fParagraphTextLength) { - fScaleFactor = (fPolyEnd - fPolyStart) / fParagraphTextLength; + fAutosizeScaleFactor = (fPolyEnd - fPolyStart) / fParagraphTextLength; + bAutosizeScale = true; } } } @@ -382,10 +382,10 @@ namespace // prepare portion length. Takes RTL sections into account. double fPortionLength(pCandidate->getDisplayLength(nUsedTextLength, nNextGlyphLen)); - if(XFT_AUTOSIZE == maSdrFormTextAttribute.getFormTextAdjust()) + if(bAutosizeScale) { - // when scaling, expand portion length - fPortionLength *= fScaleFactor; + // when autosize scaling, expand portion length + fPortionLength *= fAutosizeScaleFactor; } // create transformation @@ -397,10 +397,10 @@ namespace aNewTransformA.scale(aFontScaling.getX(), aFontScaling.getY()); // prepare scaling of text primitive - if(XFT_AUTOSIZE == maSdrFormTextAttribute.getFormTextAdjust()) + if(bAutosizeScale) { - // when scaling, expand text primitive scaling - aNewTransformA.scale(fScaleFactor, fScaleFactor); + // when autosize scaling, expand text primitive scaling to it + aNewTransformA.scale(fAutosizeScaleFactor, fAutosizeScaleFactor); } // eventually create shadow primitives from aDecomposition and add to rDecomposition @@ -497,17 +497,42 @@ namespace aNewTransformB.translate(aPerpendicular.getX(), aPerpendicular.getY()); } - // shadow primitive creation - if(bShadow) + if(pCandidate->getText().Len() && nNextGlyphLen) { - if(pCandidate->getText().Len() && nNextGlyphLen) + const xub_StrLen nPortionIndex(pCandidate->getPortionIndex(nUsedTextLength, nNextGlyphLen)); + ::std::vector< double > aNewDXArray; + + if(nNextGlyphLen > 1 && pCandidate->getDoubleDXArray().size()) { + // copy DXArray for portion + aNewDXArray.insert( + aNewDXArray.begin(), + pCandidate->getDoubleDXArray().begin() + nPortionIndex, + pCandidate->getDoubleDXArray().begin() + (nPortionIndex + nNextGlyphLen)); + + if(nPortionIndex > 0) + { + // adapt to portion start + double fDXOffset= *(pCandidate->getDoubleDXArray().begin() + (nPortionIndex - 1)); + ::std::transform( + aNewDXArray.begin(), aNewDXArray.end(), + aNewDXArray.begin(), ::std::bind2nd(::std::minus(), fDXOffset)); + } + + if(bAutosizeScale) + { + // when autosize scaling, adapt to DXArray, too + ::std::transform( + aNewDXArray.begin(), aNewDXArray.end(), + aNewDXArray.begin(), ::std::bind2nd(::std::multiplies(), fAutosizeScaleFactor)); + } + } + + if(bShadow) + { + // shadow primitive creation const Color aShadowColor(maSdrFormTextAttribute.getFormTextShdwColor()); const basegfx::BColor aRGBShadowColor(aShadowColor.getBColor()); - const xub_StrLen nPortionIndex(pCandidate->getPortionIndex(nUsedTextLength, nNextGlyphLen)); - const ::std::vector< double > aNewDXArray( - pCandidate->getDoubleDXArray().begin() + nPortionIndex, - pCandidate->getDoubleDXArray().begin() + nPortionIndex + nNextGlyphLen); drawinglayer::primitive2d::TextSimplePortionPrimitive2D* pNew = new drawinglayer::primitive2d::TextSimplePortionPrimitive2D( @@ -522,30 +547,25 @@ namespace mrShadowDecomposition.push_back(pNew); } - } - // primitive creation - if(pCandidate->getText().Len() && nNextGlyphLen) - { - const Color aColor(pCandidate->getFont().GetColor()); - const basegfx::BColor aRGBColor(aColor.getBColor()); - const xub_StrLen nPortionIndex(pCandidate->getPortionIndex(nUsedTextLength, nNextGlyphLen)); - const ::std::vector< double > aNewDXArray( - pCandidate->getDoubleDXArray().begin() + nPortionIndex, - pCandidate->getDoubleDXArray().begin() + nPortionIndex + nNextGlyphLen); - - drawinglayer::primitive2d::TextSimplePortionPrimitive2D* pNew = - new drawinglayer::primitive2d::TextSimplePortionPrimitive2D( - aNewTransformB * aNewTransformA, - pCandidate->getText(), - nPortionIndex, - nNextGlyphLen, - aNewDXArray, - aCandidateFontAttribute, - pCandidate->getLocale(), - aRGBColor); - - mrDecomposition.push_back(pNew); + { + // primitive creation + const Color aColor(pCandidate->getFont().GetColor()); + const basegfx::BColor aRGBColor(aColor.getBColor()); + + drawinglayer::primitive2d::TextSimplePortionPrimitive2D* pNew = + new drawinglayer::primitive2d::TextSimplePortionPrimitive2D( + aNewTransformB * aNewTransformA, + pCandidate->getText(), + nPortionIndex, + nNextGlyphLen, + aNewDXArray, + aCandidateFontAttribute, + pCandidate->getLocale(), + aRGBColor); + + mrDecomposition.push_back(pNew); + } } // consume from portion // no += here, xub_StrLen is USHORT and the compiler will gererate a warning here -- cgit v1.2.3 From 47ed47f1c70f4b061545cb6bc0fbb37409021b76 Mon Sep 17 00:00:00 2001 From: Niklas Nebel Date: Fri, 7 May 2010 18:30:51 +0200 Subject: calc54: #i111462# in ScDPResultMember::LateInitFrom, reset InitChild flag only temporarily --- sc/source/core/data/dptabres.cxx | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/sc/source/core/data/dptabres.cxx b/sc/source/core/data/dptabres.cxx index 55f9fb771061..8c92d88b282a 100755 --- a/sc/source/core/data/dptabres.cxx +++ b/sc/source/core/data/dptabres.cxx @@ -1153,11 +1153,16 @@ void ScDPResultMember::LateInitFrom( LateInitParams& rParams/*const vectorgetIsDataLayoutDimension() ) { - if ( !pChildDimension ) - pChildDimension = new ScDPResultDimension( pResultData ); - rParams.SetInitChild( FALSE ); - pChildDimension->LateInitFrom( rParams, pItemData, nPos, rInitState ); - return; + if ( !pChildDimension ) + pChildDimension = new ScDPResultDimension( pResultData ); + + // #i111462# reset InitChild flag only for this child dimension's LateInitFrom call, + // not for following members of parent dimensions + BOOL bWasInitChild = rParams.GetInitChild(); + rParams.SetInitChild( FALSE ); + pChildDimension->LateInitFrom( rParams, pItemData, nPos, rInitState ); + rParams.SetInitChild( bWasInitChild ); + return; } else { //find next dim -- cgit v1.2.3 From e0d2837a01dd60a2103d26b59e96da0d45f2b09a Mon Sep 17 00:00:00 2001 From: Ingrid Halama Date: Fri, 7 May 2010 20:06:36 +0200 Subject: chart47: #i111456# use 9 sub intervals per default for logarithmic scales --- chart2/source/view/axes/ScaleAutomatism.cxx | 2 +- sc/source/filter/excel/xichart.cxx | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/chart2/source/view/axes/ScaleAutomatism.cxx b/chart2/source/view/axes/ScaleAutomatism.cxx index 0a6137af3041..890bf87df96e 100644 --- a/chart2/source/view/axes/ScaleAutomatism.cxx +++ b/chart2/source/view/axes/ScaleAutomatism.cxx @@ -498,7 +498,7 @@ void ScaleAutomatism::calculateExplicitIncrementAndScaleForLogarithmic( { //scaling dependent //@todo autocalculate IntervalCount dependent on MainIncrement and scaling - rExplicitSubIncrement.IntervalCount = 5; + rExplicitSubIncrement.IntervalCount = 9; } lcl_ensureMaximumSubIncrementCount( rExplicitSubIncrement.IntervalCount ); if(!(rSubIncrement.PostEquidistant>>=rExplicitSubIncrement.PostEquidistant)) diff --git a/sc/source/filter/excel/xichart.cxx b/sc/source/filter/excel/xichart.cxx index 6734f90948e4..67cce13a15a2 100644 --- a/sc/source/filter/excel/xichart.cxx +++ b/sc/source/filter/excel/xichart.cxx @@ -2741,7 +2741,8 @@ void XclImpChValueRange::Convert( ScaleData& rScaleData, bool bMirrorOrient ) co Any& rIntervalCount = rSubIncrementSeq[ 0 ].IntervalCount; if( bLogScale ) { - rIntervalCount <<= sal_Int32( 10 ); + if( !bAutoMinor ) + rIntervalCount <<= sal_Int32( 9 ); } else { -- cgit v1.2.3 From 21705873711b1c8665d3604dcd48cffd3ed96b89 Mon Sep 17 00:00:00 2001 From: Ingrid Halama Date: Fri, 7 May 2010 20:06:36 +0200 Subject: chart47: #i111456# use 9 sub intervals per default for logarithmic scales --- oox/source/drawingml/chart/axisconverter.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/oox/source/drawingml/chart/axisconverter.cxx b/oox/source/drawingml/chart/axisconverter.cxx index 3ad1c0023ebe..5fa4c6fe28e0 100644 --- a/oox/source/drawingml/chart/axisconverter.cxx +++ b/oox/source/drawingml/chart/axisconverter.cxx @@ -241,7 +241,8 @@ void AxisConverter::convertFromModel( const Reference< XCoordinateSystem >& rxCo Any& rIntervalCount = rSubIncrementSeq[ 0 ].IntervalCount; if( bLogScale ) { - rIntervalCount <<= sal_Int32( 10 ); + if( mrModel.mofMinorUnit.has() ) + rIntervalCount <<= sal_Int32( 9 ); } else { -- cgit v1.2.3 From 7d676f28e931c0cb87174f7bfa5cf204b7f60812 Mon Sep 17 00:00:00 2001 From: Niklas Nebel Date: Mon, 10 May 2010 12:31:26 +0200 Subject: calc54: #i111482# use right variable for loop in ApplyLanguageOptions --- cui/source/options/treeopt.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx index f1651b0bd1dd..00e74da32557 100644 --- a/cui/source/options/treeopt.cxx +++ b/cui/source/options/treeopt.cxx @@ -1823,7 +1823,7 @@ void OfaTreeOptionsDialog::ApplyLanguageOptions(const SfxItemSet& rSet) while ( _pViewFrame ) { _pViewFrame->GetDispatcher()->Execute(pItem->Which(), SFX_CALLMODE_ASYNCHRON, pItem, 0L); - _pViewFrame = SfxViewFrame::GetNext( *pViewFrame ); + _pViewFrame = SfxViewFrame::GetNext( *_pViewFrame ); } } } -- cgit v1.2.3 From 7e06e1078bfd4066e957e34c0466efcd96828c94 Mon Sep 17 00:00:00 2001 From: Ingrid Halama Date: Mon, 10 May 2010 12:49:43 +0200 Subject: chart47: #i109770# guard drawmodel destructor with solar mutex --- chart2/source/view/main/ChartView.cxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx index 549ef0273595..d3ab5e43fcc7 100644 --- a/chart2/source/view/main/ChartView.cxx +++ b/chart2/source/view/main/ChartView.cxx @@ -210,7 +210,11 @@ void SAL_CALL ChartView::initialize( const uno::Sequence< uno::Any >& aArguments ChartView::~ChartView() { if( m_pDrawModelWrapper.get() ) + { EndListening( m_pDrawModelWrapper->getSdrModel(), FALSE /*bAllDups*/ ); + ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + m_pDrawModelWrapper.reset(); + } m_xDrawPage = NULL; impl_deleteCoordinateSystems(); } -- cgit v1.2.3 From 6d0afcd0db46ad125c243b8854b78da250b5f581 Mon Sep 17 00:00:00 2001 From: Ingrid Halama Date: Mon, 10 May 2010 13:23:57 +0200 Subject: chart47: #i109770# #i110253# remove assertion caused by state without diagram during initialization --- chart2/source/controller/main/ObjectHierarchy.cxx | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/chart2/source/controller/main/ObjectHierarchy.cxx b/chart2/source/controller/main/ObjectHierarchy.cxx index 0fefa3d52310..fe73d15500f5 100644 --- a/chart2/source/controller/main/ObjectHierarchy.cxx +++ b/chart2/source/controller/main/ObjectHierarchy.cxx @@ -194,13 +194,17 @@ ImplObjectHierarchy::ImplObjectHierarchy( void ImplObjectHierarchy::createTree( const Reference< XChartDocument >& xChartDocument ) { + m_aChildMap = tChildMap();//clear tree + if( !xChartDocument.is() ) return; //@todo: change ObjectIdentifier to take an XChartDocument rather than XModel Reference< frame::XModel > xModel( xChartDocument, uno::UNO_QUERY ); Reference< XDiagram > xDiagram( ChartModelHelper::findDiagram( xChartDocument ) ); - ObjectHierarchy::tOID aDiaOID( ObjectIdentifier( ObjectIdentifier::createClassifiedIdentifierForObject( xDiagram, xModel ) ) ); + ObjectHierarchy::tOID aDiaOID; + if( xDiagram.is() ) + aDiaOID = ObjectIdentifier( ObjectIdentifier::createClassifiedIdentifierForObject( xDiagram, xModel ) ); ObjectHierarchy::tChildContainer aTopLevelContainer; // First Level @@ -209,9 +213,12 @@ void ImplObjectHierarchy::createTree( const Reference< XChartDocument >& xChartD if( m_bOrderingForElementSelector ) { aTopLevelContainer.push_back( ObjectIdentifier( ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_PAGE, OUString() ) ) ); - aTopLevelContainer.push_back( aDiaOID ); - createWallAndFloor( aTopLevelContainer, xDiagram ); - createLegendTree( aTopLevelContainer, xChartDocument, xDiagram ); + if( xDiagram.is() ) + { + aTopLevelContainer.push_back( aDiaOID ); + createWallAndFloor( aTopLevelContainer, xDiagram ); + createLegendTree( aTopLevelContainer, xChartDocument, xDiagram ); + } } // Main Title -- cgit v1.2.3 From 953f5e62d7105cf4de1e46c6b3be048d2d60490d Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Mon, 10 May 2010 13:48:23 +0200 Subject: #i111410# reset BoundRects of 3D scenes udes as groups for chart --- svx/source/engine3d/scene3d.cxx | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/svx/source/engine3d/scene3d.cxx b/svx/source/engine3d/scene3d.cxx index d799aec38eb7..036f700e6e96 100644 --- a/svx/source/engine3d/scene3d.cxx +++ b/svx/source/engine3d/scene3d.cxx @@ -336,8 +336,18 @@ UINT16 E3dScene::GetObjIdentifier() const void E3dScene::SetBoundRectDirty() { - // avoid resetting aOutRect which in case of this object is model data, - // not re-creatable view data + E3dScene* pScene = GetScene(); + + if(pScene == this) + { + // avoid resetting aOutRect which in case of a 3D scene used as 2d object + // is model data,not re-creatable view data + } + else + { + // if not the outmost scene it is used as group in 3d, call parent + E3dObject::SetBoundRectDirty(); + } } /************************************************************************* -- cgit v1.2.3 From 8a7501fdc4dce26a4be91eef144b6bae48e55845 Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Mon, 10 May 2010 15:15:32 +0200 Subject: #i110768# use better subdivision for fat beziers when printing --- vcl/source/gdi/outdev.cxx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/vcl/source/gdi/outdev.cxx b/vcl/source/gdi/outdev.cxx index 62be0130e068..bb5e4e3ba36d 100644 --- a/vcl/source/gdi/outdev.cxx +++ b/vcl/source/gdi/outdev.cxx @@ -2383,6 +2383,16 @@ void OutputDevice::impPaintLineGeometryWithEvtlExpand( { const double fHalfLineWidth((rInfo.GetWidth() * 0.5) + 0.5); + if(aLinePolyPolygon.areControlPointsUsed()) + { + // #i110768# When area geometry has to be created, do not + // use the fallback bezier decomposition inside createAreaGeometry, + // but one that is at least as good as ImplSubdivideBezier was. + // There, Polygon::AdaptiveSubdivide was used with default parameter + // 1.0 as quality index. + aLinePolyPolygon = basegfx::tools::adaptiveSubdivideByDistance(aLinePolyPolygon, 1.0); + } + for(sal_uInt32 a(0); a < aLinePolyPolygon.count(); a++) { aFillPolyPolygon.append(basegfx::tools::createAreaGeometry( -- cgit v1.2.3 From acc8dc48697b824297870017239630c1d4f17f12 Mon Sep 17 00:00:00 2001 From: Ingrid Halama Date: Mon, 10 May 2010 18:46:46 +0200 Subject: chart47: #i109770# #i110253# reduce assertions 'already disposed or closed' --- chart2/source/controller/main/ChartController.cxx | 2 +- chart2/source/inc/LifeTime.hxx | 4 ++-- chart2/source/model/main/ChartModel.cxx | 4 ++-- .../source/model/main/ChartModel_Persistence.cxx | 4 ++-- chart2/source/tools/LifeTime.cxx | 22 +++++++++++++++------- 5 files changed, 22 insertions(+), 14 deletions(-) diff --git a/chart2/source/controller/main/ChartController.cxx b/chart2/source/controller/main/ChartController.cxx index 4c0c7dc38ae3..dd2c1c3b6077 100644 --- a/chart2/source/controller/main/ChartController.cxx +++ b/chart2/source/controller/main/ChartController.cxx @@ -874,7 +874,7 @@ void ChartController::impl_deleteDrawViewController() throw(uno::RuntimeException) { ::vos::OGuard aGuard( Application::GetSolarMutex()); - if( m_aLifeTimeManager.impl_isDisposed() ) + if( m_aLifeTimeManager.impl_isDisposed(false) ) return; //behave passive if already disposed or suspended //--remove listener diff --git a/chart2/source/inc/LifeTime.hxx b/chart2/source/inc/LifeTime.hxx index cb199b7c2947..8e278168259f 100644 --- a/chart2/source/inc/LifeTime.hxx +++ b/chart2/source/inc/LifeTime.hxx @@ -52,7 +52,7 @@ public: OOO_DLLPUBLIC_CHARTTOOLS LifeTimeManager( ::com::sun::star::lang::XComponent* pComponent, sal_Bool bLongLastingCallsCancelable = sal_False ); OOO_DLLPUBLIC_CHARTTOOLS virtual ~LifeTimeManager(); -OOO_DLLPUBLIC_CHARTTOOLS sal_Bool impl_isDisposed(); +OOO_DLLPUBLIC_CHARTTOOLS bool impl_isDisposed( bool bAssert=true ); OOO_DLLPUBLIC_CHARTTOOLS sal_Bool dispose() throw(::com::sun::star::uno::RuntimeException); public: @@ -105,7 +105,7 @@ OOO_DLLPUBLIC_CHARTTOOLS CloseableLifeTimeManager( ::com::sun::star::util::XC , sal_Bool bLongLastingCallsCancelable = sal_False ); OOO_DLLPUBLIC_CHARTTOOLS virtual ~CloseableLifeTimeManager(); -OOO_DLLPUBLIC_CHARTTOOLS sal_Bool impl_isDisposedOrClosed(); +OOO_DLLPUBLIC_CHARTTOOLS bool impl_isDisposedOrClosed( bool bAssert=true ); OOO_DLLPUBLIC_CHARTTOOLS sal_Bool g_close_startTryClose(sal_Bool bDeliverOwnership) throw ( ::com::sun::star::uno::Exception ); OOO_DLLPUBLIC_CHARTTOOLS sal_Bool g_close_isNeedToCancelLongLastingCalls( sal_Bool bDeliverOwnership, ::com::sun::star::util::CloseVetoException& ex ) diff --git a/chart2/source/model/main/ChartModel.cxx b/chart2/source/model/main/ChartModel.cxx index dc0931f41fc4..8cbd4c525c8d 100644 --- a/chart2/source/model/main/ChartModel.cxx +++ b/chart2/source/model/main/ChartModel.cxx @@ -550,7 +550,7 @@ void SAL_CALL ChartModel::addEventListener( const uno::Reference< lang::XEventLi void SAL_CALL ChartModel::removeEventListener( const uno::Reference< lang::XEventListener > & xListener ) throw(uno::RuntimeException) { - if( m_aLifeTimeManager.impl_isDisposedOrClosed() ) + if( m_aLifeTimeManager.impl_isDisposedOrClosed(false) ) return; //behave passive if already disposed or closed m_aLifeTimeManager.m_aListenerContainer.removeInterface( ::getCppuType((const uno::Reference< lang::XEventListener >*)0), xListener ); @@ -569,7 +569,7 @@ void SAL_CALL ChartModel::addCloseListener( const uno::Reference< util::XClose void SAL_CALL ChartModel::removeCloseListener( const uno::Reference< util::XCloseListener > & xListener ) throw(uno::RuntimeException) { - if( m_aLifeTimeManager.impl_isDisposedOrClosed() ) + if( m_aLifeTimeManager.impl_isDisposedOrClosed(false) ) return; //behave passive if already disposed or closed m_aLifeTimeManager.m_aListenerContainer.removeInterface( ::getCppuType((const uno::Reference< util::XCloseListener >*)0), xListener ); diff --git a/chart2/source/model/main/ChartModel_Persistence.cxx b/chart2/source/model/main/ChartModel_Persistence.cxx index 4f864ae0fd1c..844c908d0c73 100644 --- a/chart2/source/model/main/ChartModel_Persistence.cxx +++ b/chart2/source/model/main/ChartModel_Persistence.cxx @@ -746,7 +746,7 @@ void SAL_CALL ChartModel::removeModifyListener( const uno::Reference< util::XModifyListener >& xListener ) throw(uno::RuntimeException) { - if( m_aLifeTimeManager.impl_isDisposedOrClosed() ) + if( m_aLifeTimeManager.impl_isDisposedOrClosed(false) ) return; //behave passive if already disposed or closed m_aLifeTimeManager.m_aListenerContainer.removeInterface( @@ -845,7 +845,7 @@ void SAL_CALL ChartModel::addStorageChangeListener( const Reference< document::X void SAL_CALL ChartModel::removeStorageChangeListener( const Reference< document::XStorageChangeListener >& xListener ) throw (uno::RuntimeException) { - if( m_aLifeTimeManager.impl_isDisposedOrClosed() ) + if( m_aLifeTimeManager.impl_isDisposedOrClosed(false) ) return; //behave passive if already disposed or closed m_aLifeTimeManager.m_aListenerContainer.removeInterface( diff --git a/chart2/source/tools/LifeTime.cxx b/chart2/source/tools/LifeTime.cxx index 68ed06208d11..bbc2924e0b56 100644 --- a/chart2/source/tools/LifeTime.cxx +++ b/chart2/source/tools/LifeTime.cxx @@ -62,12 +62,15 @@ LifeTimeManager::~LifeTimeManager() { } - sal_Bool LifeTimeManager -::impl_isDisposed() +bool LifeTimeManager::impl_isDisposed( bool bAssert ) { if( m_bDisposed || m_bInDispose ) { - OSL_ENSURE( sal_False, "This component is already disposed " ); + if( bAssert ) + { + OSL_ENSURE( sal_False, "This component is already disposed " ); + (void)(bAssert); + } return sal_True; } return sal_False; @@ -185,15 +188,18 @@ CloseableLifeTimeManager::~CloseableLifeTimeManager() { } - sal_Bool CloseableLifeTimeManager -::impl_isDisposedOrClosed() +bool CloseableLifeTimeManager::impl_isDisposedOrClosed( bool bAssert ) { - if( impl_isDisposed() ) + if( impl_isDisposed( bAssert ) ) return sal_True; if( m_bClosed ) { - OSL_ENSURE( sal_False, "This object is already closed" ); + if( bAssert ) + { + OSL_ENSURE( sal_False, "This object is already closed" ); + (void)(bAssert);//avoid warnings + } return sal_True; } return sal_False; @@ -206,6 +212,8 @@ CloseableLifeTimeManager::~CloseableLifeTimeManager() //no mutex is allowed to be acquired { osl::ResettableGuard< osl::Mutex > aGuard( m_aAccessMutex ); + if( impl_isDisposedOrClosed(false) ) + return sal_False; //Mutex needs to be acquired exactly ones; will be released inbetween if( !impl_canStartApiCall() ) -- cgit v1.2.3 From de0b00d03dd81bc77b65dd310268b7e523e62630 Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Mon, 10 May 2010 19:22:34 +0200 Subject: removed cygwin_path / added mkdir --- l10ntools/scripts/localize.pl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/l10ntools/scripts/localize.pl b/l10ntools/scripts/localize.pl index a6a370385f21..47f4e91d8b7f 100755 --- a/l10ntools/scripts/localize.pl +++ b/l10ntools/scripts/localize.pl @@ -284,9 +284,11 @@ sub write_sdf foreach my $lang( keys( %{ $string_hash } ) ) { my @sdf_file; + next , if( $lang eq "en-US" ); + + mkdir $l10n_file."/$lang"; + my $current_l10n_file = $l10n_file."/$lang/localize.sdf"; - # mkdir!!!! - my $current_l10n_file = $WIN eq "TRUE" ? $l10n_file."\\$lang\\localize.sdf" : $l10n_file."/$lang/localize.sdf"; print "Writing '$current_l10n_file'\n"; if( open DESTFILE , "< $current_l10n_file" ){ @@ -393,7 +395,7 @@ sub merge_gsicheck{ close ( $TMPHANDLE ); $command = "$ENV{WRAPCMD} " if( $ENV{WRAPCMD} ); - $command .= fix_cygwin_path("$ENV{SOLARVER}/$ENV{INPATH}/bin/gsicheck"); + $command .= "$ENV{SOLARVER}/$ENV{INPATH}/bin/gsicheck"; my $errfile = $sdffile.".err"; $command .= " -k -c -wcf $tmpfile -wef $errfile -l \"\" $sdffile"; -- cgit v1.2.3 From 38179b7dc5d63993c08657ddc74937c42d6f66e3 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 10 May 2010 22:56:05 +0200 Subject: os141: make compile with GCC --- toolkit/source/controls/dialogcontrol.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolkit/source/controls/dialogcontrol.cxx b/toolkit/source/controls/dialogcontrol.cxx index 49065302d217..cf1bff991430 100644 --- a/toolkit/source/controls/dialogcontrol.cxx +++ b/toolkit/source/controls/dialogcontrol.cxx @@ -2095,7 +2095,7 @@ throw (RuntimeException) baseLocation = urlObj.GetMainURL( INetURLObject::NO_DECODE ); ::rtl::OUString testAbsoluteURL; - if ( osl_File_E_None == ::osl::FileBase::getAbsoluteFileURL( baseLocation, url, testAbsoluteURL ) ) + if ( ::osl::FileBase::E_None == ::osl::FileBase::getAbsoluteFileURL( baseLocation, url, testAbsoluteURL ) ) absoluteURL = testAbsoluteURL; } -- cgit v1.2.3 From 94d6333063cb5bc5c145bd205a2578a647a30420 Mon Sep 17 00:00:00 2001 From: Ingrid Halama Date: Tue, 11 May 2010 17:50:04 +0200 Subject: #i111524# crash caused by TickmarkHelper::getMaxTickCount gets Inf interval count --- chart2/source/view/axes/TickmarkHelper.cxx | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/chart2/source/view/axes/TickmarkHelper.cxx b/chart2/source/view/axes/TickmarkHelper.cxx index 4d1f48795fa7..9e2e2707c035 100644 --- a/chart2/source/view/axes/TickmarkHelper.cxx +++ b/chart2/source/view/axes/TickmarkHelper.cxx @@ -472,15 +472,17 @@ sal_Int32 TickmarkHelper::getMaxTickCount( sal_Int32 nDepth ) const if( m_rIncrement.Distance<=0.0) return 0; - sal_Int32 nIntervalCount; + double fSub; if(m_rIncrement.PostEquidistant ) - nIntervalCount = static_cast - ( approxSub( m_fScaledVisibleMax, m_fScaledVisibleMin ) - / m_rIncrement.Distance ); + fSub = approxSub( m_fScaledVisibleMax, m_fScaledVisibleMin ); else - nIntervalCount = static_cast - ( approxSub( m_rScale.Maximum, m_rScale.Minimum ) - / m_rIncrement.Distance ); + fSub = approxSub( m_rScale.Maximum, m_rScale.Minimum ); + + if (!isFinite(fSub)) + return 0; + + sal_Int32 nIntervalCount = static_cast( fSub / m_rIncrement.Distance ); + nIntervalCount+=3; for(sal_Int32 nN=0; nN Date: Tue, 11 May 2010 19:17:59 +0200 Subject: #i111235# corrected transformation usage for ClipRegions --- .../source/primitive2d/metafileprimitive2d.cxx | 220 +++++++++++---------- 1 file changed, 121 insertions(+), 99 deletions(-) diff --git a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx index 238c47419eb9..c15f22b43662 100644 --- a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx @@ -94,8 +94,10 @@ namespace basegfx::BColor maTextLineColor; basegfx::BColor maOverlineColor; - /// clipping, font, etc. - Region maRegion; + /// clipping + basegfx::B2DPolyPolygon maClipPolyPoygon; + + /// font, etc. Font maFont; RasterOp maRasterOp; sal_uInt32 mnLayoutMode; @@ -110,7 +112,7 @@ namespace bool mbTextFillColor : 1; bool mbTextLineColor : 1; bool mbOverlineColor : 1; - bool mbRegion : 1; + bool mbClipPolyPolygonActive : 1; public: PropertyHolder() @@ -122,7 +124,7 @@ namespace maTextFillColor(), maTextLineColor(), maOverlineColor(), - maRegion(), + maClipPolyPoygon(), maFont(), maRasterOp(ROP_OVERPAINT), mnLayoutMode(0), @@ -134,7 +136,7 @@ namespace mbTextFillColor(false), mbTextLineColor(false), mbOverlineColor(false), - mbRegion(false) + mbClipPolyPolygonActive(false) { } @@ -179,10 +181,10 @@ namespace bool getOverlineColorActive() const { return mbOverlineColor; } void setOverlineColorActive(bool bNew) { if(bNew != mbOverlineColor) mbOverlineColor = bNew; } - const Region& getRegion() const { return maRegion; } - void setRegion(const Region& rRegion) { if(rRegion != maRegion) maRegion = rRegion; } - bool getRegionActive() const { return mbRegion; } - void setRegionActive(bool bNew) { if(bNew != mbRegion) mbRegion = bNew; } + const basegfx::B2DPolyPolygon& getClipPolyPolygon() const { return maClipPolyPoygon; } + void setClipPolyPolygon(const basegfx::B2DPolyPolygon& rNew) { if(rNew != maClipPolyPoygon) maClipPolyPoygon = rNew; } + bool getClipPolyPolygonActive() const { return mbClipPolyPolygonActive; } + void setClipPolyPolygonActive(bool bNew) { if(bNew != mbClipPolyPolygonActive) mbClipPolyPolygonActive = bNew; } const Font& getFont() const { return maFont; } void setFont(const Font& rFont) { if(rFont != maFont) maFont = rFont; } @@ -291,8 +293,8 @@ namespace } if(!(nPushFlags & PUSH_CLIPREGION )) { - pLast->setRegion(pTip->getRegion()); - pLast->setRegionActive(pTip->getRegionActive()); + pLast->setClipPolyPolygon(pTip->getClipPolyPolygon()); + pLast->setClipPolyPolygonActive(pTip->getClipPolyPolygonActive()); } if(!(nPushFlags & PUSH_RASTEROP )) { @@ -465,25 +467,18 @@ namespace // the buffer to not delete them in the destructor. aTargets.clear(); - if(xRetval.hasElements() && rPropertyHolder.getRegionActive()) + if(xRetval.hasElements() && rPropertyHolder.getClipPolyPolygonActive()) { - const Region& rRegion = rPropertyHolder.getRegion(); + const basegfx::B2DPolyPolygon& rClipPolyPolygon = rPropertyHolder.getClipPolyPolygon(); - if(!rRegion.IsEmpty()) + if(rClipPolyPolygon.count()) { - basegfx::B2DPolyPolygon aClipPolyPolygon(getB2DPolyPolygonFromRegion(rRegion)); - - if(aClipPolyPolygon.count()) - { - aClipPolyPolygon.transform(rPropertyHolder.getTransformation()); + const drawinglayer::primitive2d::Primitive2DReference xMask( + new drawinglayer::primitive2d::MaskPrimitive2D( + rClipPolyPolygon, + xRetval)); - const drawinglayer::primitive2d::Primitive2DReference xMask( - new drawinglayer::primitive2d::MaskPrimitive2D( - aClipPolyPolygon, - xRetval)); - - xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xMask, 1); - } + xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xMask, 1); } } @@ -969,53 +964,56 @@ namespace a new target for embracing new geometry to the current region */ void HandleNewClipRegion( - const Region* pRegion, + const basegfx::B2DPolyPolygon& rClipPolyPolygon, TargetHolders& rTargetHolders, PropertyHolders& rPropertyHolders) { - const bool bNewActive(pRegion && !pRegion->IsEmpty()); + const bool bNewActive(rClipPolyPolygon.count()); - // #i108636# The handlig of new ClipRegions was not done as good as possible - // in the first version of this interpreter; e.g. when a ClipRegion was set + // #i108636# The handlig of new ClipPolyPolygons was not done as good as possible + // in the first version of this interpreter; e.g. when a ClipPolyPolygon was set // initially and then using a lot of push/pop actions, the pop always leads - // to setting a 'new' ClipRegion which indeed is the return to the ClipRegion + // to setting a 'new' ClipPolyPolygon which indeed is the return to the ClipPolyPolygon // of the properties next on the stack. - // This ClipRegion is identical to the current one, so there is no need to + // + // This ClipPolyPolygon is identical to the current one, so there is no need to // create a MaskPrimitive2D containing the up-to-now created primitives, but // this was done before. While this does not lead to wrong primitive // representations of the metafile data, it creates unneccesarily expensive - // representations. Just detecting when no really 'new' ClipRegion gets set + // representations. Just detecting when no really 'new' ClipPolyPolygon gets set // solves the problem. - if(!rPropertyHolders.Current().getRegionActive() && !bNewActive) + if(!rPropertyHolders.Current().getClipPolyPolygonActive() && !bNewActive) { - // no active region exchanged by no new one, done + // no active ClipPolyPolygon exchanged by no new one, done return; } - if(rPropertyHolders.Current().getRegionActive() && bNewActive) + if(rPropertyHolders.Current().getClipPolyPolygonActive() && bNewActive) { - // active region and new active region - if(rPropertyHolders.Current().getRegion() == *pRegion) + // active ClipPolyPolygon and new active ClipPolyPolygon + if(rPropertyHolders.Current().getClipPolyPolygon() == rClipPolyPolygon) { - // new region is the same as the old region, done + // new is the same as old, done return; } } - // Here the old region and the new one are definitively different, maybe + // Here the old and the new are definitively different, maybe // old one and/or new one is not active. - // Handle deletion of old region.The process evtl. created primitives which - // belong to this active region. These need to be embedded to a + // Handle deletion of old ClipPolyPolygon. The process evtl. created primitives which + // belong to this active ClipPolyPolygon. These need to be embedded to a // MaskPrimitive2D accordingly. - if(rPropertyHolders.Current().getRegionActive() && rTargetHolders.size() > 1) + if(rPropertyHolders.Current().getClipPolyPolygonActive() && rTargetHolders.size() > 1) { drawinglayer::primitive2d::Primitive2DSequence aSubContent; - if(!rPropertyHolders.Current().getRegion().IsEmpty() && rTargetHolders.Current().size()) + if(rPropertyHolders.Current().getClipPolyPolygon().count() + && rTargetHolders.Current().size()) { - aSubContent = rTargetHolders.Current().getPrimitive2DSequence(rPropertyHolders.Current()); + aSubContent = rTargetHolders.Current().getPrimitive2DSequence( + rPropertyHolders.Current()); } rTargetHolders.Pop(); @@ -1030,11 +1028,11 @@ namespace // apply new settings to current properties by setting // the new region now - rPropertyHolders.Current().setRegionActive(bNewActive); + rPropertyHolders.Current().setClipPolyPolygonActive(bNewActive); if(bNewActive) { - rPropertyHolders.Current().setRegion(*pRegion); + rPropertyHolders.Current().setClipPolyPolygon(rClipPolyPolygon); // prepare new content holder for new active region rTargetHolders.Push(); @@ -2411,13 +2409,18 @@ namespace if(pA->IsClipping()) { - // new clipping - HandleNewClipRegion(&pA->GetRegion(), rTargetHolders, rPropertyHolders); + // new clipping. Get PolyPolygon and transform with current transformation + basegfx::B2DPolyPolygon aNewClipPolyPolygon(getB2DPolyPolygonFromRegion(pA->GetRegion())); + + aNewClipPolyPolygon.transform(rPropertyHolders.Current().getTransformation()); + HandleNewClipRegion(aNewClipPolyPolygon, rTargetHolders, rPropertyHolders); } else { // end clipping - HandleNewClipRegion(0, rTargetHolders, rPropertyHolders); + const basegfx::B2DPolyPolygon aEmptyPolyPolygon; + + HandleNewClipRegion(aEmptyPolyPolygon, rTargetHolders, rPropertyHolders); } break; @@ -2431,49 +2434,60 @@ namespace if(rRectangle.IsEmpty()) { // intersect with empty rectangle will always give empty - // region; start new clipping with empty region - const Region aNewRegion; - HandleNewClipRegion(&aNewRegion, rTargetHolders, rPropertyHolders); + // ClipPolyPolygon; start new clipping with empty PolyPolygon + const basegfx::B2DPolyPolygon aEmptyPolyPolygon; + + HandleNewClipRegion(aEmptyPolyPolygon, rTargetHolders, rPropertyHolders); } else { - if(rPropertyHolders.Current().getRegionActive()) + // create transformed ClipRange + basegfx::B2DRange aClipRange( + rRectangle.Left(), rRectangle.Top(), + rRectangle.Right(), rRectangle.Bottom()); + + aClipRange.transform(rPropertyHolders.Current().getTransformation()); + + if(rPropertyHolders.Current().getClipPolyPolygonActive()) { - if(rPropertyHolders.Current().getRegion().IsEmpty()) + if(0 == rPropertyHolders.Current().getClipPolyPolygon().count()) { - // nothing to do, empty active clip region will stay + // nothing to do, empty active clipPolyPolygon will stay // empty when intersecting } else { - // AND existing region and new rectangle + // AND existing region and new ClipRange const basegfx::B2DPolyPolygon aOriginalPolyPolygon( - getB2DPolyPolygonFromRegion(rPropertyHolders.Current().getRegion())); + rPropertyHolders.Current().getClipPolyPolygon()); basegfx::B2DPolyPolygon aClippedPolyPolygon; if(aOriginalPolyPolygon.count()) { - const basegfx::B2DRange aIntersectRange( - rRectangle.Left(), rRectangle.Top(), - rRectangle.Right(), rRectangle.Bottom()); - aClippedPolyPolygon = basegfx::tools::clipPolyPolygonOnRange( - aOriginalPolyPolygon, aIntersectRange, true, false); + aOriginalPolyPolygon, + aClipRange, + true, + false); } if(aClippedPolyPolygon != aOriginalPolyPolygon) { // start new clipping with intersected region - const Region aNewRegion(aClippedPolyPolygon); - HandleNewClipRegion(&aNewRegion, rTargetHolders, rPropertyHolders); + HandleNewClipRegion( + aClippedPolyPolygon, + rTargetHolders, + rPropertyHolders); } } } else { - // start new clipping with rectangle - const Region aNewRegion(rRectangle); - HandleNewClipRegion(&aNewRegion, rTargetHolders, rPropertyHolders); + // start new clipping with ClipRange + const basegfx::B2DPolyPolygon aNewClipPolyPolygon( + basegfx::tools::createPolygonFromRect(aClipRange)); + + HandleNewClipRegion(aNewClipPolyPolygon, rTargetHolders, rPropertyHolders); } } @@ -2488,50 +2502,48 @@ namespace if(rNewRegion.IsEmpty()) { // intersect with empty region will always give empty - // region; start new clipping with empty region - const Region aNewRegion; - HandleNewClipRegion(&aNewRegion, rTargetHolders, rPropertyHolders); + // region; start new clipping with empty PolyPolygon + const basegfx::B2DPolyPolygon aEmptyPolyPolygon; + + HandleNewClipRegion(aEmptyPolyPolygon, rTargetHolders, rPropertyHolders); } else { - if(rPropertyHolders.Current().getRegionActive()) + // get new ClipPolyPolygon, transform it with current transformation + basegfx::B2DPolyPolygon aNewClipPolyPolygon(getB2DPolyPolygonFromRegion(rNewRegion)); + aNewClipPolyPolygon.transform(rPropertyHolders.Current().getTransformation()); + + if(rPropertyHolders.Current().getClipPolyPolygonActive()) { - if(rPropertyHolders.Current().getRegion().IsEmpty()) + if(0 == rPropertyHolders.Current().getClipPolyPolygon().count()) { - // nothing to do, empty active clip region will stay empty + // nothing to do, empty active clipPolyPolygon will stay empty // when intersecting with any region } else { // AND existing and new region const basegfx::B2DPolyPolygon aOriginalPolyPolygon( - getB2DPolyPolygonFromRegion(rPropertyHolders.Current().getRegion())); + rPropertyHolders.Current().getClipPolyPolygon()); basegfx::B2DPolyPolygon aClippedPolyPolygon; if(aOriginalPolyPolygon.count()) { - const basegfx::B2DPolyPolygon aClipPolyPolygon( - getB2DPolyPolygonFromRegion(rNewRegion)); - - if(aClipPolyPolygon.count()) - { - aClippedPolyPolygon = basegfx::tools::clipPolyPolygonOnPolyPolygon( - aOriginalPolyPolygon, aClipPolyPolygon, true, false); - } + aClippedPolyPolygon = basegfx::tools::clipPolyPolygonOnPolyPolygon( + aOriginalPolyPolygon, aNewClipPolyPolygon, true, false); } if(aClippedPolyPolygon != aOriginalPolyPolygon) { - // start new clipping with intersected region - const Region aNewRegion(aClippedPolyPolygon); - HandleNewClipRegion(&aNewRegion, rTargetHolders, rPropertyHolders); + // start new clipping with intersected ClipPolyPolygon + HandleNewClipRegion(aClippedPolyPolygon, rTargetHolders, rPropertyHolders); } } } else { - // start new clipping with new region - HandleNewClipRegion(&rNewRegion, rTargetHolders, rPropertyHolders); + // start new clipping with new ClipPolyPolygon + HandleNewClipRegion(aNewClipPolyPolygon, rTargetHolders, rPropertyHolders); } } @@ -2542,24 +2554,31 @@ namespace /** CHECKED, WORKS WELL */ const MetaMoveClipRegionAction* pA = (const MetaMoveClipRegionAction*)pAction; - if(rPropertyHolders.Current().getRegionActive()) + if(rPropertyHolders.Current().getClipPolyPolygonActive()) { - if(rPropertyHolders.Current().getRegion().IsEmpty()) + if(0 == rPropertyHolders.Current().getClipPolyPolygon().count()) { // nothing to do } else { - // move using old interface - Region aRegion(rPropertyHolders.Current().getRegion()); - const sal_Int32 nHor(pA->GetHorzMove()); const sal_Int32 nVer(pA->GetVertMove()); if(0 != nHor || 0 != nVer) { - aRegion.Move(nHor, nVer); - HandleNewClipRegion(&aRegion, rTargetHolders, rPropertyHolders); + // prepare translation, add current transformation + basegfx::B2DVector aVector(pA->GetHorzMove(), pA->GetVertMove()); + aVector *= rPropertyHolders.Current().getTransformation(); + basegfx::B2DHomMatrix aTransform( + basegfx::tools::createTranslateB2DHomMatrix(aVector)); + + // transform existing region + basegfx::B2DPolyPolygon aClipPolyPolygon( + rPropertyHolders.Current().getClipPolyPolygon()); + + aClipPolyPolygon.transform(aTransform); + HandleNewClipRegion(aClipPolyPolygon, rTargetHolders, rPropertyHolders); } } } @@ -2764,10 +2783,12 @@ namespace const bool bRegionMayChange(rPropertyHolders.Current().getPushFlags() & PUSH_CLIPREGION); const bool bRasterOpMayChange(rPropertyHolders.Current().getPushFlags() & PUSH_RASTEROP); - if(bRegionMayChange && rPropertyHolders.Current().getRegionActive()) + if(bRegionMayChange && rPropertyHolders.Current().getClipPolyPolygonActive()) { // end evtl. clipping - HandleNewClipRegion(0, rTargetHolders, rPropertyHolders); + const basegfx::B2DPolyPolygon aEmptyPolyPolygon; + + HandleNewClipRegion(aEmptyPolyPolygon, rTargetHolders, rPropertyHolders); } if(bRasterOpMayChange && rPropertyHolders.Current().isRasterOpActive()) @@ -2784,10 +2805,11 @@ namespace HandleNewRasterOp(rPropertyHolders.Current().getRasterOp(), rTargetHolders, rPropertyHolders); } - if(bRegionMayChange && rPropertyHolders.Current().getRegionActive()) + if(bRegionMayChange && rPropertyHolders.Current().getClipPolyPolygonActive()) { // start evtl. clipping - HandleNewClipRegion(&rPropertyHolders.Current().getRegion(), rTargetHolders, rPropertyHolders); + HandleNewClipRegion( + rPropertyHolders.Current().getClipPolyPolygon(), rTargetHolders, rPropertyHolders); } break; -- cgit v1.2.3 From 06724c5d66489fcbbb0a3226f327abf5d7f6dcee Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Tue, 11 May 2010 22:41:44 +0200 Subject: ext03: implement XUnitConversion for the control, too (not only for the control's peer) --- toolkit/inc/toolkit/controls/unocontrol.hxx | 12 +++++-- toolkit/source/controls/unocontrol.cxx | 52 +++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+), 2 deletions(-) diff --git a/toolkit/inc/toolkit/controls/unocontrol.hxx b/toolkit/inc/toolkit/controls/unocontrol.hxx index 19d498ef2a85..0515abe27128 100644 --- a/toolkit/inc/toolkit/controls/unocontrol.hxx +++ b/toolkit/inc/toolkit/controls/unocontrol.hxx @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include @@ -46,7 +47,7 @@ #include #include #include -#include +#include #include #include @@ -73,13 +74,14 @@ struct UnoControl_Data; // ---------------------------------------------------- // class UnoControl // ---------------------------------------------------- -typedef ::cppu::WeakAggImplHelper7 < ::com::sun::star::awt::XControl +typedef ::cppu::WeakAggImplHelper8 < ::com::sun::star::awt::XControl , ::com::sun::star::awt::XWindow2 , ::com::sun::star::awt::XView , ::com::sun::star::beans::XPropertiesChangeListener , ::com::sun::star::lang::XServiceInfo , ::com::sun::star::accessibility::XAccessible , ::com::sun::star::util::XModeChangeBroadcaster + , ::com::sun::star::awt::XUnitConversion > UnoControl_Base; class TOOLKIT_DLLPUBLIC UnoControl : public UnoControl_Base @@ -220,6 +222,12 @@ public: virtual void SAL_CALL addModeChangeApproveListener( const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModeChangeApproveListener >& _rxListener ) throw (::com::sun::star::lang::NoSupportException, ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL removeModeChangeApproveListener( const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModeChangeApproveListener >& _rxListener ) throw (::com::sun::star::lang::NoSupportException, ::com::sun::star::uno::RuntimeException); + // XUnitConversion + virtual ::com::sun::star::awt::Point SAL_CALL convertPointToLogic( const ::com::sun::star::awt::Point& Point, ::sal_Int16 TargetUnit ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::awt::Point SAL_CALL convertPointToPixel( const ::com::sun::star::awt::Point& aPoint, ::sal_Int16 SourceUnit ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::awt::Size SAL_CALL convertSizeToLogic( const ::com::sun::star::awt::Size& aSize, ::sal_Int16 TargetUnit ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::awt::Size SAL_CALL convertSizeToPixel( const ::com::sun::star::awt::Size& aSize, ::sal_Int16 SourceUnit ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); + private: // ::com::sun::star::beans::XPropertiesChangeListener void SAL_CALL propertiesChange( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyChangeEvent >& evt ) throw(::com::sun::star::uno::RuntimeException); diff --git a/toolkit/source/controls/unocontrol.cxx b/toolkit/source/controls/unocontrol.cxx index 1abe0b34004f..d91077823495 100644 --- a/toolkit/source/controls/unocontrol.cxx +++ b/toolkit/source/controls/unocontrol.cxx @@ -1535,3 +1535,55 @@ void SAL_CALL UnoControl::removeModeChangeApproveListener( const Reference< XMod throw NoSupportException( ); } +//---------------------------------------------------------------------------------------------------------------------- +awt::Point SAL_CALL UnoControl::convertPointToLogic( const awt::Point& i_Point, ::sal_Int16 i_TargetUnit ) throw (IllegalArgumentException, RuntimeException) +{ + Reference< XUnitConversion > xPeerConversion; + { + ::osl::MutexGuard aGuard( GetMutex() ); + xPeerConversion = xPeerConversion.query( getPeer() ); + } + if ( xPeerConversion.is() ) + return xPeerConversion->convertPointToLogic( i_Point, i_TargetUnit ); + return awt::Point( ); +} + +//---------------------------------------------------------------------------------------------------------------------- +awt::Point SAL_CALL UnoControl::convertPointToPixel( const awt::Point& i_Point, ::sal_Int16 i_SourceUnit ) throw (IllegalArgumentException, RuntimeException) +{ + Reference< XUnitConversion > xPeerConversion; + { + ::osl::MutexGuard aGuard( GetMutex() ); + xPeerConversion = xPeerConversion.query( getPeer() ); + } + if ( xPeerConversion.is() ) + return xPeerConversion->convertPointToPixel( i_Point, i_SourceUnit ); + return awt::Point( ); +} + +//---------------------------------------------------------------------------------------------------------------------- +awt::Size SAL_CALL UnoControl::convertSizeToLogic( const awt::Size& i_Size, ::sal_Int16 i_TargetUnit ) throw (IllegalArgumentException, RuntimeException) +{ + Reference< XUnitConversion > xPeerConversion; + { + ::osl::MutexGuard aGuard( GetMutex() ); + xPeerConversion = xPeerConversion.query( getPeer() ); + } + if ( xPeerConversion.is() ) + return xPeerConversion->convertSizeToLogic( i_Size, i_TargetUnit ); + return awt::Size( ); +} + +//---------------------------------------------------------------------------------------------------------------------- +awt::Size SAL_CALL UnoControl::convertSizeToPixel( const awt::Size& i_Size, ::sal_Int16 i_SourceUnit ) throw (IllegalArgumentException, RuntimeException) +{ + Reference< XUnitConversion > xPeerConversion; + { + ::osl::MutexGuard aGuard( GetMutex() ); + xPeerConversion = xPeerConversion.query( getPeer() ); + } + if ( xPeerConversion.is() ) + return xPeerConversion->convertSizeToPixel( i_Size, i_SourceUnit ); + return awt::Size( ); +} + -- cgit v1.2.3 From 1afc67a4f5ccace415ce76de17913a6fc8256800 Mon Sep 17 00:00:00 2001 From: Ingrid Halama Date: Wed, 12 May 2010 11:15:00 +0200 Subject: chart47: #i111552# ApiTest: LineDash Property is tested with wrong type --- qadevOOo/tests/java/ifc/drawing/_LineProperties.java | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/qadevOOo/tests/java/ifc/drawing/_LineProperties.java b/qadevOOo/tests/java/ifc/drawing/_LineProperties.java index a590bd5c5e1c..b6fb1f2186a1 100644 --- a/qadevOOo/tests/java/ifc/drawing/_LineProperties.java +++ b/qadevOOo/tests/java/ifc/drawing/_LineProperties.java @@ -80,21 +80,7 @@ public class _LineProperties extends MultiPropertyTest { LineDash aLineDash2 = new LineDash(); aLineDash.DashLen = 5; aLineDash2.DashLen = 1; - PropertyValue[] firstValue = new PropertyValue[2]; - firstValue[0] = new PropertyValue(); - firstValue[0].Name = "Name"; - firstValue[0].Value = "Name1"; - firstValue[1] = new PropertyValue(); - firstValue[1].Name = "LineDash"; - firstValue[1].Value = aLineDash; - PropertyValue[] secondValue = new PropertyValue[2]; - secondValue[0] = new PropertyValue(); - secondValue[0].Name = "Name"; - secondValue[0].Value = "Name2"; - secondValue[1] = new PropertyValue(); - secondValue[1].Name = "LineDash"; - secondValue[1].Value = aLineDash2; - testProperty("LineDash",firstValue,secondValue); + testProperty("LineDash",aLineDash,aLineDash2); } } -- cgit v1.2.3 From 22ece58836043457279d52ba0b84f38e5fe9dab6 Mon Sep 17 00:00:00 2001 From: Niklas Nebel Date: Wed, 12 May 2010 14:49:32 +0200 Subject: calc54: #i99904# FillAuto: initialize pStyleSheet outside of the inner loop --- sc/source/core/data/table4.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sc/source/core/data/table4.cxx b/sc/source/core/data/table4.cxx index 4a736e8c11b7..434144d06e00 100644 --- a/sc/source/core/data/table4.cxx +++ b/sc/source/core/data/table4.cxx @@ -586,13 +586,13 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, // Attributierung uebertragen const ScPatternAttr* pSrcPattern = NULL; + const ScStyleSheet* pStyleSheet = NULL; ULONG nAtSrc = nISrcStart; ScPatternAttr* pNewPattern = NULL; BOOL bGetPattern = TRUE; rInner = nIStart; while (true) // #i53728# with "for (;;)" old solaris/x86 compiler mis-optimizes { - const ScStyleSheet* pStyleSheet = NULL; if ( bGetPattern ) { if ( pNewPattern ) -- cgit v1.2.3 From 6417e0a10e9f7ad16342af2ed7f5ff23c0dba036 Mon Sep 17 00:00:00 2001 From: Ingrid Halama Date: Wed, 12 May 2010 20:18:15 +0200 Subject: chart47: #i111560# ApiTest: MAYBEVOID properties are handled wrongly be the api test framework if they are not set initially --- qadevOOo/runner/lib/MultiPropertyTest.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/qadevOOo/runner/lib/MultiPropertyTest.java b/qadevOOo/runner/lib/MultiPropertyTest.java index 286ddf1600a9..3a12d51c0d92 100644 --- a/qadevOOo/runner/lib/MultiPropertyTest.java +++ b/qadevOOo/runner/lib/MultiPropertyTest.java @@ -41,6 +41,7 @@ import java.lang.reflect.Method; import util.ValueChanger; import util.ValueComparer; +import util.utils; import com.sun.star.uno.Any; import com.sun.star.uno.AnyConverter; @@ -179,6 +180,19 @@ public class MultiPropertyTest extends MultiMethodTest { Object oldValue = oObj.getPropertyValue(propName); + if( (oldValue==null) || utils.isVoid(oldValue) ) + { + // #i111560# method getNewValue() does not work with an empty oldValue + Property prop = info.getPropertyByName(propName); + if( (prop.Attributes & PropertyAttribute.MAYBEVOID) != 0 ) + { + // todo: implement a new test independent from method getNewValue() + log.println("changing initially empty MAYBEVOID properties is not supported by the test framework so far - skip test of property: " + propName); + tRes.tested(propName, true); + return; + } + } + Object newValue; // trying to create new value -- cgit v1.2.3 From f93f7d4c56a6cf671e709f03aafadbb11b2a338c Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Fri, 14 May 2010 09:19:38 +0200 Subject: cws tl80: #i106004# name change 'Formula Elements' to 'Elements' --- officecfg/registry/data/org/openoffice/Office/UI/MathCommands.xcu | 2 +- officecfg/registry/schema/org/openoffice/Office/Math.xcs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/officecfg/registry/data/org/openoffice/Office/UI/MathCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/MathCommands.xcu index e69558fc4ef5..202b7927b62f 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/MathCommands.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/MathCommands.xcu @@ -156,7 +156,7 @@ - Formula Elements + Elements diff --git a/officecfg/registry/schema/org/openoffice/Office/Math.xcs b/officecfg/registry/schema/org/openoffice/Office/Math.xcs index c1f9e8aa96b2..caa8726b7c72 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Math.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Math.xcs @@ -351,7 +351,7 @@ - + TL Toggles the visibility of the ToolBox (Selection Box). -- cgit v1.2.3 From b5054d32e6238b8f335f36f794604030a0ac1080 Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Mon, 17 May 2010 10:08:23 +0200 Subject: fwk139: Check popup menu pointer --- framework/source/uielement/macrosmenucontroller.cxx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/framework/source/uielement/macrosmenucontroller.cxx b/framework/source/uielement/macrosmenucontroller.cxx index f0f5d52a47d6..9bb0f2cf9f90 100644 --- a/framework/source/uielement/macrosmenucontroller.cxx +++ b/framework/source/uielement/macrosmenucontroller.cxx @@ -92,6 +92,9 @@ void MacrosMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& rPo if ( pVCLPopupMenu ) pPopupMenu = (PopupMenu *)pVCLPopupMenu->GetMenu(); + if (!pPopupMenu) + return; + // insert basic String aCommand = String::CreateFromAscii( ".uno:MacroDialog" ); String aDisplayName = RetrieveLabelFromCommand( aCommand ); -- cgit v1.2.3 From 4986d0508799b5e743cb6ccc9af6d84824d2e198 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Mon, 17 May 2010 12:40:01 +0200 Subject: vcl111: #i111464# fix frame width (thanks kendy !) --- vcl/unx/kde4/KDESalGraphics.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vcl/unx/kde4/KDESalGraphics.cxx b/vcl/unx/kde4/KDESalGraphics.cxx index 25dd50ce3958..a34bf861b83d 100644 --- a/vcl/unx/kde4/KDESalGraphics.cxx +++ b/vcl/unx/kde4/KDESalGraphics.cxx @@ -744,7 +744,7 @@ BOOL KDESalGraphics::getNativeControlRegion( ControlType type, ControlPart part, { if( part == PART_BORDER ) { - int size = kapp->style()->pixelMetric(QStyle::PM_LayoutLeftMargin); + int size = kapp->style()->pixelMetric(QStyle::PM_DefaultFrameWidth); USHORT nStyle = val.getNumericVal(); if( nStyle & FRAME_DRAW_NODRAW ) { -- cgit v1.2.3 From 4b770dd310a1e1b37abd1728abc2e21f3fb3f129 Mon Sep 17 00:00:00 2001 From: Ingrid Halama Date: Mon, 17 May 2010 13:14:05 +0200 Subject: chart47: #i111560# report error if a property is not set and is not MAYBEVOID --- qadevOOo/runner/lib/MultiPropertyTest.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/qadevOOo/runner/lib/MultiPropertyTest.java b/qadevOOo/runner/lib/MultiPropertyTest.java index 3a12d51c0d92..a02f93c04347 100644 --- a/qadevOOo/runner/lib/MultiPropertyTest.java +++ b/qadevOOo/runner/lib/MultiPropertyTest.java @@ -191,6 +191,12 @@ public class MultiPropertyTest extends MultiMethodTest tRes.tested(propName, true); return; } + else + { + log.println( "property '"+propName+"' is not set but is not MAYBEVOID"); + tRes.tested(propName, false); + return; + } } Object newValue; -- cgit v1.2.3 From 9f124082f800eed4f436203fd309b17fd7584f95 Mon Sep 17 00:00:00 2001 From: Ingrid Halama Date: Mon, 17 May 2010 17:04:26 +0200 Subject: chart47: #i109770# #i110253# reduce assertions 'already disposed or closed' - don't close the document twice --- qadevOOo/tests/java/mod/_sch/AccArea.java | 8 +++++--- qadevOOo/tests/java/mod/_sch/AccAxis.java | 8 +++++--- qadevOOo/tests/java/mod/_sch/AccDataPoint.java | 8 +++++--- qadevOOo/tests/java/mod/_sch/AccDataSeries.java | 8 +++++--- qadevOOo/tests/java/mod/_sch/AccDiagram.java | 8 +++++--- qadevOOo/tests/java/mod/_sch/AccFloor.java | 8 +++++--- qadevOOo/tests/java/mod/_sch/AccGrid.java | 8 +++++--- qadevOOo/tests/java/mod/_sch/AccLegend.java | 8 +++++--- qadevOOo/tests/java/mod/_sch/AccLegendEntry.java | 8 +++++--- qadevOOo/tests/java/mod/_sch/AccStatisticsObject.java | 8 +++++--- qadevOOo/tests/java/mod/_sch/AccTitle.java | 8 +++++--- qadevOOo/tests/java/mod/_sch/AccWall.java | 8 +++++--- qadevOOo/tests/java/mod/_sch/AccessibleDocumentView.java | 7 +++++-- qadevOOo/tests/java/mod/_sch/ChXChartAxis.java | 7 +++++-- qadevOOo/tests/java/mod/_sch/ChXChartData.java | 7 +++++-- qadevOOo/tests/java/mod/_sch/ChXChartDataArray.java | 7 +++++-- qadevOOo/tests/java/mod/_sch/ChXChartDocument.java | 14 ++++++++++---- qadevOOo/tests/java/mod/_sch/ChXChartView.java | 7 +++++-- qadevOOo/tests/java/mod/_sch/ChXDataPoint.java | 7 +++++-- qadevOOo/tests/java/mod/_sch/ChXDataRow.java | 7 +++++-- qadevOOo/tests/java/mod/_sch/ChartArea.java | 7 +++++-- qadevOOo/tests/java/mod/_sch/ChartGrid.java | 7 +++++-- qadevOOo/tests/java/mod/_sch/ChartLegend.java | 7 +++++-- qadevOOo/tests/java/mod/_sch/ChartLine.java | 7 +++++-- qadevOOo/tests/java/mod/_sch/ChartTitle.java | 7 +++++-- qadevOOo/tests/java/mod/_xmloff/Chart/XMLExporter.java | 7 +++++-- 26 files changed, 135 insertions(+), 66 deletions(-) diff --git a/qadevOOo/tests/java/mod/_sch/AccArea.java b/qadevOOo/tests/java/mod/_sch/AccArea.java index dae93e6d3326..b371f1950558 100644 --- a/qadevOOo/tests/java/mod/_sch/AccArea.java +++ b/qadevOOo/tests/java/mod/_sch/AccArea.java @@ -111,9 +111,11 @@ public class AccArea extends TestCase { * @param log writer to log information while testing */ protected void cleanup( TestParameters Param, PrintWriter log) { - log.println( " closing xChartDoc " ); - util.DesktopTools.closeDoc(xChartDoc); - + if( xChartDoc!=null ) { + log.println( " closing xChartDoc" ); + util.DesktopTools.closeDoc(xChartDoc); + xChartDoc = null; + } } } diff --git a/qadevOOo/tests/java/mod/_sch/AccAxis.java b/qadevOOo/tests/java/mod/_sch/AccAxis.java index e0c6b8901345..2cdecae03aca 100644 --- a/qadevOOo/tests/java/mod/_sch/AccAxis.java +++ b/qadevOOo/tests/java/mod/_sch/AccAxis.java @@ -109,9 +109,11 @@ public class AccAxis extends TestCase { * @param log writer to log information while testing */ protected void cleanup( TestParameters Param, PrintWriter log) { - log.println( " closing xChartDoc " ); - util.DesktopTools.closeDoc(xChartDoc); - + if( xChartDoc!=null ) { + log.println( " closing xChartDoc" ); + util.DesktopTools.closeDoc(xChartDoc); + xChartDoc = null; + } } } diff --git a/qadevOOo/tests/java/mod/_sch/AccDataPoint.java b/qadevOOo/tests/java/mod/_sch/AccDataPoint.java index 45bd6e3e4101..3e94364a0559 100644 --- a/qadevOOo/tests/java/mod/_sch/AccDataPoint.java +++ b/qadevOOo/tests/java/mod/_sch/AccDataPoint.java @@ -110,9 +110,11 @@ public class AccDataPoint extends TestCase { * @param log writer to log information while testing */ protected void cleanup( TestParameters Param, PrintWriter log) { - log.println( " closing xChartDoc " ); - util.DesktopTools.closeDoc(xChartDoc); - + if( xChartDoc!=null ) { + log.println( " closing xChartDoc" ); + util.DesktopTools.closeDoc(xChartDoc); + xChartDoc = null; + } } } diff --git a/qadevOOo/tests/java/mod/_sch/AccDataSeries.java b/qadevOOo/tests/java/mod/_sch/AccDataSeries.java index 4eff500ebba7..2d5ec4fde1d5 100644 --- a/qadevOOo/tests/java/mod/_sch/AccDataSeries.java +++ b/qadevOOo/tests/java/mod/_sch/AccDataSeries.java @@ -110,9 +110,11 @@ public class AccDataSeries extends TestCase { * @param log writer to log information while testing */ protected void cleanup( TestParameters Param, PrintWriter log) { - log.println( " closing xChartDoc " ); - util.DesktopTools.closeDoc(xChartDoc); - + if( xChartDoc!=null ) { + log.println( " closing xChartDoc" ); + util.DesktopTools.closeDoc(xChartDoc); + xChartDoc = null; + } } } diff --git a/qadevOOo/tests/java/mod/_sch/AccDiagram.java b/qadevOOo/tests/java/mod/_sch/AccDiagram.java index 50657c0218ac..9b7f90766fdd 100644 --- a/qadevOOo/tests/java/mod/_sch/AccDiagram.java +++ b/qadevOOo/tests/java/mod/_sch/AccDiagram.java @@ -110,9 +110,11 @@ public class AccDiagram extends TestCase { * @param log writer to log information while testing */ protected void cleanup( TestParameters Param, PrintWriter log) { - log.println( " closing xChartDoc " ); - util.DesktopTools.closeDoc(xChartDoc); - + if( xChartDoc!=null ) { + log.println( " closing xChartDoc" ); + util.DesktopTools.closeDoc(xChartDoc); + xChartDoc = null; + } } } diff --git a/qadevOOo/tests/java/mod/_sch/AccFloor.java b/qadevOOo/tests/java/mod/_sch/AccFloor.java index 9ab1f9542111..37d56815983d 100644 --- a/qadevOOo/tests/java/mod/_sch/AccFloor.java +++ b/qadevOOo/tests/java/mod/_sch/AccFloor.java @@ -135,9 +135,11 @@ public class AccFloor extends TestCase { * @param log writer to log information while testing */ protected void cleanup( TestParameters Param, PrintWriter log) { - log.println( " closing xChartDoc " ); - util.DesktopTools.closeDoc(xChartDoc); - + if( xChartDoc!=null ) { + log.println( " closing xChartDoc" ); + util.DesktopTools.closeDoc(xChartDoc); + xChartDoc = null; + } } } diff --git a/qadevOOo/tests/java/mod/_sch/AccGrid.java b/qadevOOo/tests/java/mod/_sch/AccGrid.java index f92aa0fe82a6..268f53ec8b3d 100644 --- a/qadevOOo/tests/java/mod/_sch/AccGrid.java +++ b/qadevOOo/tests/java/mod/_sch/AccGrid.java @@ -111,9 +111,11 @@ public class AccGrid extends TestCase { * @param log writer to log information while testing */ protected void cleanup( TestParameters Param, PrintWriter log) { - log.println( " closing xChartDoc " ); - util.DesktopTools.closeDoc(xChartDoc); - + if( xChartDoc!=null ) { + log.println( " closing xChartDoc" ); + util.DesktopTools.closeDoc(xChartDoc); + xChartDoc = null; + } } } diff --git a/qadevOOo/tests/java/mod/_sch/AccLegend.java b/qadevOOo/tests/java/mod/_sch/AccLegend.java index a0f29e1e0701..aa46cdb8407d 100644 --- a/qadevOOo/tests/java/mod/_sch/AccLegend.java +++ b/qadevOOo/tests/java/mod/_sch/AccLegend.java @@ -109,9 +109,11 @@ public class AccLegend extends TestCase { * @param log writer to log information while testing */ protected void cleanup( TestParameters Param, PrintWriter log) { - log.println( " closing xChartDoc " ); - util.DesktopTools.closeDoc(xChartDoc); - + if( xChartDoc!=null ) { + log.println( " closing xChartDoc" ); + util.DesktopTools.closeDoc(xChartDoc); + xChartDoc = null; + } } } diff --git a/qadevOOo/tests/java/mod/_sch/AccLegendEntry.java b/qadevOOo/tests/java/mod/_sch/AccLegendEntry.java index 78996d84fa2a..61c221df57e0 100644 --- a/qadevOOo/tests/java/mod/_sch/AccLegendEntry.java +++ b/qadevOOo/tests/java/mod/_sch/AccLegendEntry.java @@ -109,9 +109,11 @@ public class AccLegendEntry extends TestCase { * @param log writer to log information while testing */ protected void cleanup( TestParameters Param, PrintWriter log) { - log.println( " closing xChartDoc " ); - util.DesktopTools.closeDoc(xChartDoc); - + if( xChartDoc!=null ) { + log.println( " closing xChartDoc" ); + util.DesktopTools.closeDoc(xChartDoc); + xChartDoc = null; + } } } diff --git a/qadevOOo/tests/java/mod/_sch/AccStatisticsObject.java b/qadevOOo/tests/java/mod/_sch/AccStatisticsObject.java index d72723ebea62..aafe91fdd3d4 100644 --- a/qadevOOo/tests/java/mod/_sch/AccStatisticsObject.java +++ b/qadevOOo/tests/java/mod/_sch/AccStatisticsObject.java @@ -114,9 +114,11 @@ public class AccStatisticsObject extends TestCase { * @param log writer to log information while testing */ protected void cleanup( TestParameters Param, PrintWriter log) { - log.println( " closing xChartDoc " ); - util.DesktopTools.closeDoc(xChartDoc); - + if( xChartDoc!=null ) { + log.println( " closing xChartDoc" ); + util.DesktopTools.closeDoc(xChartDoc); + xChartDoc = null; + } } } diff --git a/qadevOOo/tests/java/mod/_sch/AccTitle.java b/qadevOOo/tests/java/mod/_sch/AccTitle.java index 4fa56ee8f4f1..0639f19ca4cc 100644 --- a/qadevOOo/tests/java/mod/_sch/AccTitle.java +++ b/qadevOOo/tests/java/mod/_sch/AccTitle.java @@ -109,9 +109,11 @@ public class AccTitle extends TestCase { * @param log writer to log information while testing */ protected void cleanup( TestParameters Param, PrintWriter log) { - log.println( " closing xChartDoc " ); - util.DesktopTools.closeDoc(xChartDoc); - + if( xChartDoc!=null ) { + log.println( " closing xChartDoc" ); + util.DesktopTools.closeDoc(xChartDoc); + xChartDoc = null; + } } } diff --git a/qadevOOo/tests/java/mod/_sch/AccWall.java b/qadevOOo/tests/java/mod/_sch/AccWall.java index 4dc94a173fff..66779421cc0b 100644 --- a/qadevOOo/tests/java/mod/_sch/AccWall.java +++ b/qadevOOo/tests/java/mod/_sch/AccWall.java @@ -134,9 +134,11 @@ public class AccWall extends TestCase { * @param log writer to log information while testing */ protected void cleanup( TestParameters Param, PrintWriter log) { - log.println( " closing xChartDoc " ); - util.DesktopTools.closeDoc(xChartDoc); - + if( xChartDoc!=null ) { + log.println( " closing xChartDoc" ); + util.DesktopTools.closeDoc(xChartDoc); + xChartDoc = null; + } } } diff --git a/qadevOOo/tests/java/mod/_sch/AccessibleDocumentView.java b/qadevOOo/tests/java/mod/_sch/AccessibleDocumentView.java index a064e7f05a09..9031680f93f1 100644 --- a/qadevOOo/tests/java/mod/_sch/AccessibleDocumentView.java +++ b/qadevOOo/tests/java/mod/_sch/AccessibleDocumentView.java @@ -102,8 +102,11 @@ public class AccessibleDocumentView extends TestCase { * @param log writer to log information while testing */ protected void cleanup( TestParameters Param, PrintWriter log) { - log.println( " closing xChartDoc " ); - util.DesktopTools.closeDoc(xChartDoc); + if( xChartDoc!=null ) { + log.println( " closing xChartDoc" ); + util.DesktopTools.closeDoc(xChartDoc); + xChartDoc = null; + } } /** diff --git a/qadevOOo/tests/java/mod/_sch/ChXChartAxis.java b/qadevOOo/tests/java/mod/_sch/ChXChartAxis.java index da12c9e6b57a..f796d5530a9c 100644 --- a/qadevOOo/tests/java/mod/_sch/ChXChartAxis.java +++ b/qadevOOo/tests/java/mod/_sch/ChXChartAxis.java @@ -86,8 +86,11 @@ public class ChXChartAxis extends TestCase { * Disposes Chart document. */ protected void cleanup( TestParameters tParam, PrintWriter log ) { - log.println( " closing xChartDoc " ); - util.DesktopTools.closeDoc(xChartDoc); + if( xChartDoc!=null ) { + log.println( " closing xChartDoc" ); + util.DesktopTools.closeDoc(xChartDoc); + xChartDoc = null; + } } /** diff --git a/qadevOOo/tests/java/mod/_sch/ChXChartData.java b/qadevOOo/tests/java/mod/_sch/ChXChartData.java index fe14322933a5..3236e345b8e6 100644 --- a/qadevOOo/tests/java/mod/_sch/ChXChartData.java +++ b/qadevOOo/tests/java/mod/_sch/ChXChartData.java @@ -73,8 +73,11 @@ public class ChXChartData extends TestCase { * Disposes Chart document. */ protected void cleanup( TestParameters tParam, PrintWriter log ) { - log.println( " closing xChartDoc " ); - util.DesktopTools.closeDoc(xChartDoc); + if( xChartDoc!=null ) { + log.println( " closing xChartDoc" ); + util.DesktopTools.closeDoc(xChartDoc); + xChartDoc = null; + } } /** diff --git a/qadevOOo/tests/java/mod/_sch/ChXChartDataArray.java b/qadevOOo/tests/java/mod/_sch/ChXChartDataArray.java index 35d15d634054..14caeefff8c1 100644 --- a/qadevOOo/tests/java/mod/_sch/ChXChartDataArray.java +++ b/qadevOOo/tests/java/mod/_sch/ChXChartDataArray.java @@ -76,8 +76,11 @@ public class ChXChartDataArray extends TestCase { * Disposes Chart document. */ protected void cleanup( TestParameters tParam, PrintWriter log ) { - log.println( " closing xChartDoc " ); - util.DesktopTools.closeDoc(xChartDoc); + if( xChartDoc!=null ) { + log.println( " closing xChartDoc" ); + util.DesktopTools.closeDoc(xChartDoc); + xChartDoc = null; + } } /** diff --git a/qadevOOo/tests/java/mod/_sch/ChXChartDocument.java b/qadevOOo/tests/java/mod/_sch/ChXChartDocument.java index a51457d5cde1..deafa9922043 100644 --- a/qadevOOo/tests/java/mod/_sch/ChXChartDocument.java +++ b/qadevOOo/tests/java/mod/_sch/ChXChartDocument.java @@ -77,10 +77,16 @@ public class ChXChartDocument extends TestCase { * Disposes Chart documents. */ protected void cleanup(TestParameters Param, PrintWriter log) { - log.println( " closing xChartDoc " ); - util.DesktopTools.closeDoc(xChartDoc); - log.println( " closing xChartDoc2 " ); - util.DesktopTools.closeDoc(doc2); + if( xChartDoc!=null ) { + log.println( " closing xChartDoc" ); + util.DesktopTools.closeDoc(xChartDoc); + xChartDoc = null; + } + if( doc2!=null ) { + log.println( " closing xChartDoc2" ); + util.DesktopTools.closeDoc(doc2); + doc2 = null; + } } /** diff --git a/qadevOOo/tests/java/mod/_sch/ChXChartView.java b/qadevOOo/tests/java/mod/_sch/ChXChartView.java index 9d1ea2539bfc..f5476f2d0643 100644 --- a/qadevOOo/tests/java/mod/_sch/ChXChartView.java +++ b/qadevOOo/tests/java/mod/_sch/ChXChartView.java @@ -84,8 +84,11 @@ public class ChXChartView extends TestCase { * Disposes Chart document. */ protected void cleanup( TestParameters tParam, PrintWriter log ) { - log.println( " closing xChartDoc " ); - util.DesktopTools.closeDoc(xChartDoc); + if( xChartDoc!=null ) { + log.println( " closing xChartDoc" ); + util.DesktopTools.closeDoc(xChartDoc); + xChartDoc = null; + } } /** diff --git a/qadevOOo/tests/java/mod/_sch/ChXDataPoint.java b/qadevOOo/tests/java/mod/_sch/ChXDataPoint.java index b6ddb94575b4..0c1647684c75 100644 --- a/qadevOOo/tests/java/mod/_sch/ChXDataPoint.java +++ b/qadevOOo/tests/java/mod/_sch/ChXDataPoint.java @@ -101,8 +101,11 @@ public class ChXDataPoint extends TestCase { * Disposes Chart document. */ protected void cleanup( TestParameters tParam, PrintWriter log ) { - log.println( " closing xChartDoc " ); - util.DesktopTools.closeDoc(xChartDoc); + if( xChartDoc!=null ) { + log.println( " closing xChartDoc" ); + util.DesktopTools.closeDoc(xChartDoc); + xChartDoc = null; + } } /** diff --git a/qadevOOo/tests/java/mod/_sch/ChXDataRow.java b/qadevOOo/tests/java/mod/_sch/ChXDataRow.java index ffc13ad95bb7..69139ea5d902 100644 --- a/qadevOOo/tests/java/mod/_sch/ChXDataRow.java +++ b/qadevOOo/tests/java/mod/_sch/ChXDataRow.java @@ -107,8 +107,11 @@ public class ChXDataRow extends TestCase { * Disposes Chart document. */ protected synchronized void cleanup( TestParameters tParam, PrintWriter log ) { - log.println( " closing xChartDoc " ); - util.DesktopTools.closeDoc(xChartDoc); + if( xChartDoc!=null ) { + log.println( " closing xChartDoc" ); + util.DesktopTools.closeDoc(xChartDoc); + xChartDoc = null; + } } diff --git a/qadevOOo/tests/java/mod/_sch/ChartArea.java b/qadevOOo/tests/java/mod/_sch/ChartArea.java index 17a04276aaca..614327f94a1e 100644 --- a/qadevOOo/tests/java/mod/_sch/ChartArea.java +++ b/qadevOOo/tests/java/mod/_sch/ChartArea.java @@ -92,8 +92,11 @@ public class ChartArea extends TestCase { * Disposes Chart document. */ protected void cleanup( TestParameters tParam, PrintWriter log ) { - log.println( " closing xChartDoc " ); - util.DesktopTools.closeDoc(xChartDoc); + if( xChartDoc!=null ) { + log.println( " closing xChartDoc" ); + util.DesktopTools.closeDoc(xChartDoc); + xChartDoc = null; + } } /** diff --git a/qadevOOo/tests/java/mod/_sch/ChartGrid.java b/qadevOOo/tests/java/mod/_sch/ChartGrid.java index 671cfcfe86e3..73a44b810436 100644 --- a/qadevOOo/tests/java/mod/_sch/ChartGrid.java +++ b/qadevOOo/tests/java/mod/_sch/ChartGrid.java @@ -81,8 +81,11 @@ public class ChartGrid extends TestCase { * Disposes Chart document. */ protected void cleanup( TestParameters tParam, PrintWriter log ) { - log.println( " closing xChartDoc " ); - util.DesktopTools.closeDoc(xChartDoc); + if( xChartDoc!=null ) { + log.println( " closing xChartDoc" ); + util.DesktopTools.closeDoc(xChartDoc); + xChartDoc = null; + } } /** diff --git a/qadevOOo/tests/java/mod/_sch/ChartLegend.java b/qadevOOo/tests/java/mod/_sch/ChartLegend.java index 78770c5f94b6..a0dd4fe3ec64 100644 --- a/qadevOOo/tests/java/mod/_sch/ChartLegend.java +++ b/qadevOOo/tests/java/mod/_sch/ChartLegend.java @@ -109,8 +109,11 @@ public class ChartLegend extends TestCase { * Disposes Chart document. */ protected void cleanup( TestParameters tParam, PrintWriter log ) { - log.println( " closing xChartDoc " ); - util.DesktopTools.closeDoc(xChartDoc); + if( xChartDoc!=null ) { + log.println( " closing xChartDoc" ); + util.DesktopTools.closeDoc(xChartDoc); + xChartDoc = null; + } } /** diff --git a/qadevOOo/tests/java/mod/_sch/ChartLine.java b/qadevOOo/tests/java/mod/_sch/ChartLine.java index e2345ba7edb5..950885060f5f 100644 --- a/qadevOOo/tests/java/mod/_sch/ChartLine.java +++ b/qadevOOo/tests/java/mod/_sch/ChartLine.java @@ -79,8 +79,11 @@ public class ChartLine extends TestCase { * Disposes Chart document. */ protected void cleanup( TestParameters tParam, PrintWriter log ) { - log.println( " closing xChartDoc " ); - util.DesktopTools.closeDoc(xChartDoc); + if( xChartDoc!=null ) { + log.println( " closing xChartDoc" ); + util.DesktopTools.closeDoc(xChartDoc); + xChartDoc = null; + } } /** diff --git a/qadevOOo/tests/java/mod/_sch/ChartTitle.java b/qadevOOo/tests/java/mod/_sch/ChartTitle.java index b1e47c0ea00b..f88c938693bc 100644 --- a/qadevOOo/tests/java/mod/_sch/ChartTitle.java +++ b/qadevOOo/tests/java/mod/_sch/ChartTitle.java @@ -91,8 +91,11 @@ public class ChartTitle extends TestCase { * Disposes Chart document. */ protected void cleanup( TestParameters tParam, PrintWriter log ) { - log.println( " closing xChartDoc " ); - util.DesktopTools.closeDoc(xChartDoc); + if( xChartDoc!=null ) { + log.println( " closing xChartDoc" ); + util.DesktopTools.closeDoc(xChartDoc); + xChartDoc = null; + } } /** diff --git a/qadevOOo/tests/java/mod/_xmloff/Chart/XMLExporter.java b/qadevOOo/tests/java/mod/_xmloff/Chart/XMLExporter.java index 393ddb7492ce..a5027b3f989d 100644 --- a/qadevOOo/tests/java/mod/_xmloff/Chart/XMLExporter.java +++ b/qadevOOo/tests/java/mod/_xmloff/Chart/XMLExporter.java @@ -95,8 +95,11 @@ public class XMLExporter extends TestCase { * Document disposed here. */ protected void cleanup( TestParameters tParam, PrintWriter log ) { - log.println( " close xChartDoc " ); - DesktopTools.closeDoc(xChartDoc); + if( xChartDoc!=null ) { + log.println( " closing xChartDoc" ); + util.DesktopTools.closeDoc(xChartDoc); + xChartDoc = null; + } } /** -- cgit v1.2.3 From 2a1490743fb5da2ddb579967fa93b723b5f851a6 Mon Sep 17 00:00:00 2001 From: Ingrid Halama Date: Mon, 17 May 2010 17:30:46 +0200 Subject: chart47: #i109770# #i110253# reduce assertions caused by a wrong z-axis contained in a 2D bar chart --- .../qa/unoapi/testdocuments/TransparencyChart.sxs | Bin 10846 -> 10810 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/chart2/qa/unoapi/testdocuments/TransparencyChart.sxs b/chart2/qa/unoapi/testdocuments/TransparencyChart.sxs index 95d6d22451c2..c3a5833ae27a 100644 Binary files a/chart2/qa/unoapi/testdocuments/TransparencyChart.sxs and b/chart2/qa/unoapi/testdocuments/TransparencyChart.sxs differ -- cgit v1.2.3 From 417c5223db83a7f5932ecbba12bed63e0f5c6f41 Mon Sep 17 00:00:00 2001 From: Ingrid Halama Date: Mon, 17 May 2010 18:05:05 +0200 Subject: chart47: #i109770# #i110253# don't paint anything if no model is available --- chart2/source/controller/main/ChartController_Window.cxx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/chart2/source/controller/main/ChartController_Window.cxx b/chart2/source/controller/main/ChartController_Window.cxx index 7822c8c1cc21..284b3ff370cf 100644 --- a/chart2/source/controller/main/ChartController_Window.cxx +++ b/chart2/source/controller/main/ChartController_Window.cxx @@ -507,6 +507,11 @@ void ChartController::execute_Paint( const Rectangle& rRect ) { try { + uno::Reference< frame::XModel > xModel( m_aModel->getModel() ); + DBG_ASSERT( xModel.is(), "ChartController::execute_Paint: have no model to paint"); + if( !xModel.is() ) + return; + //better performance for big data uno::Reference< beans::XPropertySet > xProp( m_xChartView, uno::UNO_QUERY ); if( xProp.is() ) -- cgit v1.2.3 From efa9d1559bd91572b9b7806f6387879db88fd669 Mon Sep 17 00:00:00 2001 From: Ingrid Halama Date: Mon, 17 May 2010 18:19:37 +0200 Subject: chart47: #i109770# #i110253# reduce assertions 'already disposed or closed' --- .../source/controller/chartapiwrapper/ChartDocumentWrapper.cxx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx index 14a20e133ff1..04f1ca37de9e 100644 --- a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx @@ -1499,6 +1499,16 @@ void SAL_CALL ChartDocumentWrapper::setDelegator( const uno::Reference< uno::XInterface >& rDelegator ) throw (uno::RuntimeException) { + if( m_bIsDisposed ) + { + if( rDelegator.is() ) + throw lang::DisposedException( + C2U("ChartDocumentWrapper is disposed" ), + static_cast< ::cppu::OWeakObject* >( this )); + else + return; + } + if( rDelegator.is()) { m_xDelegator = rDelegator; -- cgit v1.2.3 From 5d74e58fe163e423f29b075502e726a0e012a038 Mon Sep 17 00:00:00 2001 From: "Herbert Duerr [hdu]" Date: Tue, 18 May 2010 09:43:20 +0200 Subject: #i107915# all TIP/SIP unicodes get the same vertical flags --- vcl/source/gdi/sallayout.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vcl/source/gdi/sallayout.cxx b/vcl/source/gdi/sallayout.cxx index 3e4ca9fc3df6..5e187944c706 100755 --- a/vcl/source/gdi/sallayout.cxx +++ b/vcl/source/gdi/sallayout.cxx @@ -144,10 +144,10 @@ int GetVerticalFlags( sal_UCS4 nChar ) return GF_ROTR; // right return GF_ROTL; // left } - else if( (nChar >= 0x02F800 && nChar <= 0x02FFFF) ) // non-BMP CJK ideographs - return GF_NONE; // not rotated + else if( (nChar >= 0x20000) && (nChar <= 0x3FFFF) ) // all SIP/TIP ideographs + return GF_ROTL; // left - return GF_NONE; + return GF_NONE; // not rotated as default } // ----------------------------------------------------------------------- -- cgit v1.2.3 From df3eba513b2f936e07ac173a61b4599695b1e0e3 Mon Sep 17 00:00:00 2001 From: "Herbert Duerr [hdu]" Date: Tue, 18 May 2010 11:10:00 +0200 Subject: #i111021# #i11575#desc5#b adjust B2D tesselator result to raster --- vcl/unx/source/gdi/salgdi.cxx | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/vcl/unx/source/gdi/salgdi.cxx b/vcl/unx/source/gdi/salgdi.cxx index 32aeed2dbc95..15e391256344 100644 --- a/vcl/unx/source/gdi/salgdi.cxx +++ b/vcl/unx/source/gdi/salgdi.cxx @@ -1224,13 +1224,18 @@ bool X11SalGraphics::drawPolyLine(const ::basegfx::B2DPolygon& rPolygon, const : const SalColor aKeepBrushColor = nBrushColor_; nBrushColor_ = nPenColor_; + // #i11575#desc5#b adjust B2D tesselation result to raster positions + basegfx::B2DPolygon aPolygon = rPolygon; + const double fHalfWidth = 0.5 * rLineWidth.getX(); + aPolygon.transform( basegfx::tools::createTranslateB2DHomMatrix(+fHalfWidth,+fHalfWidth) ); + // shortcut for hairline drawing to improve performance if( bIsHairline ) { // hairlines can benefit from a simplified tesselation // e.g. for hairlines the linejoin style can be ignored basegfx::B2DTrapezoidVector aB2DTrapVector; - basegfx::tools::createLineTrapezoidFromB2DPolygon( aB2DTrapVector, rPolygon, rLineWidth.getX() ); + basegfx::tools::createLineTrapezoidFromB2DPolygon( aB2DTrapVector, aPolygon, rLineWidth.getX() ); // draw tesselation result const int nTrapCount = aB2DTrapVector.size(); @@ -1242,16 +1247,15 @@ bool X11SalGraphics::drawPolyLine(const ::basegfx::B2DPolygon& rPolygon, const : } // get the area polygon for the line polygon - basegfx::B2DPolygon aPolygon = rPolygon; if( (rLineWidth.getX() != rLineWidth.getY()) && !basegfx::fTools::equalZero( rLineWidth.getY() ) ) { // prepare for createAreaGeometry() with anisotropic linewidth - aPolygon.transform(basegfx::tools::createScaleB2DHomMatrix(1.0, rLineWidth.getX() / rLineWidth.getY())); + aPolygon.transform( basegfx::tools::createScaleB2DHomMatrix(1.0, rLineWidth.getX() / rLineWidth.getY())); } // create the area-polygon for the line - const basegfx::B2DPolyPolygon aAreaPolyPoly( basegfx::tools::createAreaGeometry(aPolygon, 0.5*rLineWidth.getX(), eLineJoin) ); + const basegfx::B2DPolyPolygon aAreaPolyPoly( basegfx::tools::createAreaGeometry(aPolygon, fHalfWidth, eLineJoin) ); if( (rLineWidth.getX() != rLineWidth.getY()) && !basegfx::fTools::equalZero( rLineWidth.getX() ) ) @@ -1278,3 +1282,4 @@ bool X11SalGraphics::drawPolyLine(const ::basegfx::B2DPolygon& rPolygon, const : } // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + -- cgit v1.2.3 From f9425a94186c33c2571bdc32b689c3706251f416 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Tue, 18 May 2010 13:26:39 +0200 Subject: unoawt: call UpdateContextBmpWidthVector in the LISTACTION_INSERTED notification. This way, we'll also handle cases where somebody creates and inserts SvLBoxEntry bypassing InsertEntry (and using the base classes Insert) --- svtools/source/contnr/svtreebx.cxx | 42 ++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 22 deletions(-) diff --git a/svtools/source/contnr/svtreebx.cxx b/svtools/source/contnr/svtreebx.cxx index 9f599cbdb22e..bf6e41f93f36 100644 --- a/svtools/source/contnr/svtreebx.cxx +++ b/svtools/source/contnr/svtreebx.cxx @@ -40,6 +40,7 @@ class TabBar; #include #include #include +#include #include #include #include @@ -427,17 +428,6 @@ SvLBoxEntry* SvTreeListBox::InsertEntry( const XubString& aText,SvLBoxEntry* pPa else SvLBox::Insert( pEntry, pParent, nPos ); - short nExpWidth = (short)rDefExpBmp.GetSizePixel().Width(); - short nColWidth = (short)rDefColBmp.GetSizePixel().Width(); - short nMax = Max(nExpWidth, nColWidth); - // #97680# ---------------- - nMax = pImp->UpdateContextBmpWidthVector( pEntry, nMax ); - if( nMax > nContextBmpWidthMax ) - { - nContextBmpWidthMax = nMax; - SetTabs(); - } - aPrevInsertedExpBmp = rDefExpBmp; aPrevInsertedColBmp = rDefColBmp; @@ -468,17 +458,6 @@ SvLBoxEntry* SvTreeListBox::InsertEntry( const XubString& aText, else SvLBox::Insert( pEntry, pParent, nPos ); - short nExpWidth = (short)aExpEntryBmp.GetSizePixel().Width(); - short nColWidth = (short)aCollEntryBmp.GetSizePixel().Width(); - short nMax = Max(nExpWidth, nColWidth); - // #97680# ---------------- - nMax = pImp->UpdateContextBmpWidthVector( pEntry, nMax ); - if( nMax > nContextBmpWidthMax ) - { - nContextBmpWidthMax = nMax; - SetTabs(); - } - aPrevInsertedExpBmp = aExpEntryBmp; aPrevInsertedColBmp = aCollEntryBmp; @@ -2347,6 +2326,25 @@ void SvTreeListBox::ModelNotification( USHORT nActionId, SvListEntry* pEntry1, SvLBox::ModelNotification( nActionId, pEntry1, pEntry2, nPos ); switch( nActionId ) { + case LISTACTION_INSERTED: + { + SvLBoxEntry* pEntry( dynamic_cast< SvLBoxEntry* >( pEntry1 ) ); + ENSURE_OR_BREAK( pEntry, "SvTreeListBox::ModelNotification: invalid entry!" ); + SvLBoxContextBmp* pBmpItem = static_cast< SvLBoxContextBmp* >( pEntry->GetFirstItem( SV_ITEM_ID_LBOXCONTEXTBMP ) ); + if ( !pBmpItem ) + break; + const Image& rBitmap1( pBmpItem->GetBitmap1() ); + const Image& rBitmap2( pBmpItem->GetBitmap2() ); + short nMaxWidth = short( Max( rBitmap1.GetSizePixel().Width(), rBitmap2.GetSizePixel().Width() ) ); + nMaxWidth = pImp->UpdateContextBmpWidthVector( pEntry, nMaxWidth ); + if( nMaxWidth > nContextBmpWidthMax ) + { + nContextBmpWidthMax = nMaxWidth; + SetTabs(); + } + } + break; + case LISTACTION_RESORTING: SetUpdateMode( FALSE ); break; -- cgit v1.2.3 From d6a4da919e7639c6796631ab317dd8f6230b8c7d Mon Sep 17 00:00:00 2001 From: Niklas Nebel Date: Wed, 19 May 2010 15:18:25 +0200 Subject: calc54: #i111710# Strings from EditEngine items are now in editeng resource --- sc/source/core/data/docpool.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sc/source/core/data/docpool.cxx b/sc/source/core/data/docpool.cxx index d6aa91efcca6..cd763cfc0787 100644 --- a/sc/source/core/data/docpool.cxx +++ b/sc/source/core/data/docpool.cxx @@ -705,7 +705,7 @@ SfxItemPresentation lcl_HFPresentation nTmp = rLRItem.GetRight(); nRightMargin = nTmp < 0 ? 0 : USHORT(nTmp); - aText = SVX_RESSTR(RID_SVXITEMS_LRSPACE_LEFT); + aText = EE_RESSTR(RID_SVXITEMS_LRSPACE_LEFT); if ( 100 != nPropLeftMargin ) { aText += String::CreateFromInt32( nPropLeftMargin ); @@ -715,13 +715,13 @@ SfxItemPresentation lcl_HFPresentation { aText += GetMetricText( (long)nLeftMargin, eCoreMetric, ePresentationMetric, pIntl ); - aText += SVX_RESSTR(GetMetricId(ePresentationMetric)); + aText += EE_RESSTR(GetMetricId(ePresentationMetric)); } aText += cpDelim; // nPropFirstLineOfst haben wir nicht - aText += SVX_RESSTR(RID_SVXITEMS_LRSPACE_RIGHT); + aText += EE_RESSTR(RID_SVXITEMS_LRSPACE_RIGHT); if ( 100 != nPropRightMargin ) { aText += String::CreateFromInt32( nPropRightMargin ); @@ -731,7 +731,7 @@ SfxItemPresentation lcl_HFPresentation { aText += GetMetricText( (long)nRightMargin, eCoreMetric, ePresentationMetric, pIntl ); - aText += SVX_RESSTR(GetMetricId(ePresentationMetric)); + aText += EE_RESSTR(GetMetricId(ePresentationMetric)); } } break; -- cgit v1.2.3 From 52a825459618ea98cfa6978ab7eeeace2c2f3a61 Mon Sep 17 00:00:00 2001 From: "Herbert Duerr [hdu]" Date: Wed, 19 May 2010 15:47:51 +0200 Subject: #i110214# fix b2dpoly drawing on aqua --- vcl/aqua/source/gdi/salgdi.cxx | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/vcl/aqua/source/gdi/salgdi.cxx b/vcl/aqua/source/gdi/salgdi.cxx index a54a7fad7ac5..9c2641256cd9 100644 --- a/vcl/aqua/source/gdi/salgdi.cxx +++ b/vcl/aqua/source/gdi/salgdi.cxx @@ -473,7 +473,6 @@ static void AddPolygonToPath( CGMutablePathRef xPath, const CGAffineTransform* pTransform = NULL; const bool bHasCurves = rPolygon.areControlPointsUsed(); - bool bPendingCurve = false; for( int nPointIdx = 0, nPrevIdx = 0;; nPrevIdx = nPointIdx++ ) { int nClosedIdx = nPointIdx; @@ -488,7 +487,7 @@ static void AddPolygonToPath( CGMutablePathRef xPath, ::basegfx::B2DPoint aPoint = rPolygon.getB2DPoint( nClosedIdx ); - if(bPixelSnap) + if( bPixelSnap) { // snap device coordinates to full pixels aPoint.setX( basegfx::fround( aPoint.getX() ) ); @@ -498,9 +497,19 @@ static void AddPolygonToPath( CGMutablePathRef xPath, if( bLineDraw ) aPoint += aHalfPointOfs; - if( !nPointIdx ) // first point + if( nClosedIdx != 0 ) { // first point => just move there CGPathMoveToPoint( xPath, pTransform, aPoint.getX(), aPoint.getY() ); - else if( !bPendingCurve ) // line segment + continue; + } + + bool bPendingCurve = false; + if( bHasCurves ) + { + bPendingCurve = rPolygon.isNextControlPointUsed( nPrevIdx ); + bPendingCurve |= rPolygon.isPrevControlPointUsed( nPointIdx ); + } + + if( !bPendingCurve ) // line segment CGPathAddLineToPoint( xPath, pTransform, aPoint.getX(), aPoint.getY() ); else // cubic bezier segment { @@ -514,9 +523,6 @@ static void AddPolygonToPath( CGMutablePathRef xPath, CGPathAddCurveToPoint( xPath, pTransform, aCP1.getX(), aCP1.getY(), aCP2.getX(), aCP2.getY(), aPoint.getX(), aPoint.getY() ); } - - if( bHasCurves ) - bPendingCurve = rPolygon.isNextControlPointUsed( nClosedIdx ); } if( bClosePath ) -- cgit v1.2.3 From e2c090708e089258087396d46acacf513f70e809 Mon Sep 17 00:00:00 2001 From: "Herbert Duerr [hdu]" Date: Wed, 19 May 2010 16:33:51 +0200 Subject: #i110214# fix typo in b2dpoly drawing on aqua --- vcl/aqua/source/gdi/salgdi.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vcl/aqua/source/gdi/salgdi.cxx b/vcl/aqua/source/gdi/salgdi.cxx index 9c2641256cd9..9c4ae4a40165 100644 --- a/vcl/aqua/source/gdi/salgdi.cxx +++ b/vcl/aqua/source/gdi/salgdi.cxx @@ -497,7 +497,7 @@ static void AddPolygonToPath( CGMutablePathRef xPath, if( bLineDraw ) aPoint += aHalfPointOfs; - if( nClosedIdx != 0 ) { // first point => just move there + if( !nPointIdx ) { // first point => just move there CGPathMoveToPoint( xPath, pTransform, aPoint.getX(), aPoint.getY() ); continue; } @@ -506,7 +506,7 @@ static void AddPolygonToPath( CGMutablePathRef xPath, if( bHasCurves ) { bPendingCurve = rPolygon.isNextControlPointUsed( nPrevIdx ); - bPendingCurve |= rPolygon.isPrevControlPointUsed( nPointIdx ); + bPendingCurve |= rPolygon.isPrevControlPointUsed( nClosedIdx ); } if( !bPendingCurve ) // line segment -- cgit v1.2.3 From 5be9c917443fbf32d934ddf953fbba2e25e5d884 Mon Sep 17 00:00:00 2001 From: Ingrid Halama Date: Wed, 19 May 2010 17:08:43 +0200 Subject: chart47: #i109770# #i110253# prevent null access on empty m_aModel and reduce assertions 'already disposed' --- chart2/source/controller/main/ChartController.cxx | 40 +++-- chart2/source/controller/main/ChartController.hxx | 2 +- .../controller/main/ChartController_EditData.cxx | 4 +- .../controller/main/ChartController_Insert.cxx | 194 ++++++++++----------- .../controller/main/ChartController_Position.cxx | 6 +- .../controller/main/ChartController_Properties.cxx | 32 ++-- .../controller/main/ChartController_TextEdit.cxx | 4 +- .../controller/main/ChartController_Tools.cxx | 58 +++--- .../controller/main/ChartController_Window.cxx | 46 ++--- .../controller/main/CommandDispatchContainer.cxx | 24 +-- .../controller/main/CommandDispatchContainer.hxx | 3 +- 11 files changed, 208 insertions(+), 205 deletions(-) diff --git a/chart2/source/controller/main/ChartController.cxx b/chart2/source/controller/main/ChartController.cxx index dd2c1c3b6077..bf8afc65e78f 100644 --- a/chart2/source/controller/main/ChartController.cxx +++ b/chart2/source/controller/main/ChartController.cxx @@ -410,7 +410,7 @@ APPHELPER_XSERVICEINFO_IMPL(ChartController,CHART_CONTROLLER_SERVICE_IMPLEMENTAT m_apDropTargetHelper.reset(); } { - awt::Size aPageSize( ChartModelHelper::getPageSize(m_aModel->getModel()) ); + awt::Size aPageSize( ChartModelHelper::getPageSize(getModel()) ); // calls to VCL ::vos::OGuard aSolarGuard( Application::GetSolarMutex()); @@ -420,7 +420,7 @@ APPHELPER_XSERVICEINFO_IMPL(ChartController,CHART_CONTROLLER_SERVICE_IMPLEMENTAT m_pChartWindow->Show(); m_apDropTargetHelper.reset( new ChartDropTargetHelper( m_pChartWindow->GetDropTarget(), - uno::Reference< chart2::XChartDocument >( m_aModel->getModel(), uno::UNO_QUERY ))); + uno::Reference< chart2::XChartDocument >( getModel(), uno::UNO_QUERY ))); impl_createDrawViewController(); } @@ -514,7 +514,7 @@ void SAL_CALL ChartController::modeChanged( const util::ModeChangeEvent& rEvent if( m_aSelection.hasSelection() ) this->impl_selectObjectAndNotiy(); else - ChartModelHelper::triggerRangeHighlighting( m_aModel->getModel() ); + ChartModelHelper::triggerRangeHighlighting( getModel() ); impl_initializeAccessible(); @@ -601,7 +601,7 @@ void SAL_CALL ChartController::modeChanged( const util::ModeChangeEvent& rEvent //select chart area per default: select( uno::makeAny( ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_PAGE, rtl::OUString() ) ) ); - uno::Reference< lang::XMultiServiceFactory > xFact( m_aModel->getModel(), uno::UNO_QUERY ); + uno::Reference< lang::XMultiServiceFactory > xFact( getModel(), uno::UNO_QUERY ); if( xFact.is()) { m_xChartView = xFact->createInstance( CHART_VIEW_SERVICE_NAME ); @@ -615,7 +615,7 @@ void SAL_CALL ChartController::modeChanged( const util::ModeChangeEvent& rEvent if( m_pChartWindow ) m_pChartWindow->Invalidate(); - uno::Reference< chart2::XUndoSupplier > xUndoSupplier( m_aModel->getModel(), uno::UNO_QUERY ); + uno::Reference< chart2::XUndoSupplier > xUndoSupplier( getModel(), uno::UNO_QUERY ); if( xUndoSupplier.is()) m_xUndoManager.set( xUndoSupplier->getUndoManager()); @@ -735,7 +735,7 @@ void ChartController::impl_createDrawViewController() if( m_pDrawModelWrapper ) { m_pDrawViewWrapper = new DrawViewWrapper(&m_pDrawModelWrapper->getSdrModel(),m_pChartWindow,true); - m_pDrawViewWrapper->attachParentReferenceDevice( m_aModel->getModel()); + m_pDrawViewWrapper->attachParentReferenceDevice( getModel() ); } } } @@ -776,7 +776,7 @@ void ChartController::impl_deleteDrawViewController() if( m_aModel.is()) { uno::Reference< view::XSelectionChangeListener > xSelectionChangeListener; - uno::Reference< chart2::data::XDataReceiver > xDataReceiver( m_aModel->getModel(), uno::UNO_QUERY ); + uno::Reference< chart2::data::XDataReceiver > xDataReceiver( getModel(), uno::UNO_QUERY ); if( xDataReceiver.is() ) xSelectionChangeListener = uno::Reference< view::XSelectionChangeListener >( xDataReceiver->getRangeHighlighter(), uno::UNO_QUERY ); if( xSelectionChangeListener.is() ) @@ -959,6 +959,8 @@ bool ChartController::impl_releaseThisModel( const uno::Reference< uno::XInterfa bReleaseModel = true; } } + if( bReleaseModel ) + m_aDispatchContainer.setModel( 0 ); return bReleaseModel; } @@ -1059,7 +1061,7 @@ bool lcl_isFormatObjectCommand( const rtl::OString& aCommand ) , sal_Int32 /* nSearchFlags */) throw(uno::RuntimeException) { - if ( !m_aLifeTimeManager.impl_isDisposed() ) + if ( !m_aLifeTimeManager.impl_isDisposed() && getModel().is() ) { if( rTargetFrameName.getLength() && rTargetFrameName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("_self"))) @@ -1103,7 +1105,7 @@ bool lcl_isFormatObjectCommand( const rtl::OString& aCommand ) //---------------------------------- else if(aCommand.equals("Update")) //Update Chart { - ChartViewHelper::setViewToDirtyState( m_aModel->getModel() ); + ChartViewHelper::setViewToDirtyState( getModel() ); if( m_pChartWindow ) m_pChartWindow->Invalidate(); } @@ -1325,12 +1327,12 @@ void SAL_CALL ChartController::executeDispatch_ChartType() { // using assignment for broken gcc 3.3 UndoLiveUpdateGuard aUndoGuard = UndoLiveUpdateGuard( - ::rtl::OUString( String( SchResId( STR_ACTION_EDIT_CHARTTYPE ))), m_xUndoManager, m_aModel->getModel() ); + ::rtl::OUString( String( SchResId( STR_ACTION_EDIT_CHARTTYPE ))), m_xUndoManager, getModel() ); // /-- ::vos::OGuard aSolarGuard( Application::GetSolarMutex()); //prepare and open dialog - ChartTypeDialog aDlg( m_pChartWindow, m_aModel->getModel(), m_xCC ); + ChartTypeDialog aDlg( m_pChartWindow, getModel(), m_xCC ); if( aDlg.Execute() == RET_OK ) { impl_adaptDataSeriesAutoResize(); @@ -1343,14 +1345,14 @@ void SAL_CALL ChartController::executeDispatch_SourceData() { //------------------------------------------------------------- //convert properties to ItemSet - uno::Reference< XChartDocument > xChartDoc( m_aModel->getModel(), uno::UNO_QUERY ); + uno::Reference< XChartDocument > xChartDoc( getModel(), uno::UNO_QUERY ); DBG_ASSERT( xChartDoc.is(), "Invalid XChartDocument" ); if( !xChartDoc.is()) return; // using assignment for broken gcc 3.3 UndoLiveUpdateGuard aUndoGuard = UndoLiveUpdateGuard( - ::rtl::OUString( String( SchResId( STR_ACTION_EDIT_DATA_RANGES ))), m_xUndoManager, m_aModel->getModel() ); + ::rtl::OUString( String( SchResId( STR_ACTION_EDIT_DATA_RANGES ))), m_xUndoManager, getModel() ); if( xChartDoc.is()) { // /-- @@ -1367,20 +1369,20 @@ void SAL_CALL ChartController::executeDispatch_SourceData() void SAL_CALL ChartController::executeDispatch_MoveSeries( sal_Bool bForward ) { - ControllerLockGuard aCLGuard( m_aModel->getModel()); + ControllerLockGuard aCLGuard( getModel() ); //get selected series ::rtl::OUString aObjectCID(m_aSelection.getSelectedCID()); uno::Reference< XDataSeries > xGivenDataSeries( ObjectIdentifier::getDataSeriesForCID( //yyy todo also legendentries and labels? - aObjectCID, m_aModel->getModel() ) ); + aObjectCID, getModel() ) ); UndoGuardWithSelection aUndoGuard( ActionDescriptionProvider::createDescription( (bForward ? ActionDescriptionProvider::MOVE_TOTOP : ActionDescriptionProvider::MOVE_TOBOTTOM), ::rtl::OUString( String( SchResId( STR_OBJECT_DATASERIES )))), - m_xUndoManager, m_aModel->getModel()); + m_xUndoManager, getModel()); - bool bChanged = DiagramHelper::moveSeries( ChartModelHelper::findDiagram( m_aModel->getModel() ), xGivenDataSeries, bForward ); + bool bChanged = DiagramHelper::moveSeries( ChartModelHelper::findDiagram( getModel() ), xGivenDataSeries, bForward ); if( bChanged ) { m_aSelection.setSelection( ObjectIdentifier::getMovedSeriesCID( aObjectCID, bForward ) ); @@ -1432,7 +1434,7 @@ void SAL_CALL ChartController::modified( const lang::EventObject& /* aEvent */ ) { // the source can also be a subobject of the ChartModel // @todo: change the source in ChartModel to always be the model itself ? -// if( m_aModel->getModel() == aEvent.Source ) +// if( getModel() == aEvent.Source ) //todo? update menu states ? @@ -1511,7 +1513,7 @@ void ChartController::impl_initializeAccessible( const uno::Reference< lang::XIn uno::Sequence< uno::Any > aArguments(5); uno::Reference xSelectionSupplier(this); aArguments[0]=uno::makeAny(xSelectionSupplier); - uno::Reference xModel(m_aModel->getModel()); + uno::Reference xModel(getModel()); aArguments[1]=uno::makeAny(xModel); aArguments[2]=uno::makeAny(m_xChartView); uno::Reference< XAccessible > xParent; diff --git a/chart2/source/controller/main/ChartController.hxx b/chart2/source/controller/main/ChartController.hxx index 8deffe47396f..ec03f768501e 100644 --- a/chart2/source/controller/main/ChartController.hxx +++ b/chart2/source/controller/main/ChartController.hxx @@ -597,7 +597,7 @@ private: //private methods sal_Bool impl_isDisposedOrSuspended() const; - ::std::auto_ptr< ReferenceSizeProvider > impl_createReferenceSizeProvider() const; + ::std::auto_ptr< ReferenceSizeProvider > impl_createReferenceSizeProvider(); void impl_adaptDataSeriesAutoResize(); void impl_createDrawViewController(); diff --git a/chart2/source/controller/main/ChartController_EditData.cxx b/chart2/source/controller/main/ChartController_EditData.cxx index 5b6d9c1a60b7..0248732a63a7 100644 --- a/chart2/source/controller/main/ChartController_EditData.cxx +++ b/chart2/source/controller/main/ChartController_EditData.cxx @@ -54,7 +54,7 @@ namespace chart void ChartController::executeDispatch_EditData() { - Reference< chart2::XChartDocument > xChartDoc( m_aModel->getModel(), uno::UNO_QUERY ); + Reference< chart2::XChartDocument > xChartDoc( getModel(), uno::UNO_QUERY ); if( xChartDoc.is()) { Window* pParent( NULL ); @@ -67,7 +67,7 @@ void ChartController::executeDispatch_EditData() // using assignment for broken gcc 3.3 UndoLiveUpdateGuardWithData aUndoGuard = UndoLiveUpdateGuardWithData( ::rtl::OUString( String( SchResId( STR_ACTION_EDIT_CHART_DATA ))), - m_xUndoManager, m_aModel->getModel()); + m_xUndoManager, getModel() ); DataEditor aDataEditorDialog( pParent, xChartDoc, m_xCC ); // the dialog has no OK/Cancel aDataEditorDialog.Execute(); diff --git a/chart2/source/controller/main/ChartController_Insert.cxx b/chart2/source/controller/main/ChartController_Insert.cxx index 13b0174a7d02..0a7a4057ef9a 100644 --- a/chart2/source/controller/main/ChartController_Insert.cxx +++ b/chart2/source/controller/main/ChartController_Insert.cxx @@ -122,12 +122,12 @@ void ChartController::executeDispatch_InsertAxes() UndoGuard aUndoGuard( ActionDescriptionProvider::createDescription( ActionDescriptionProvider::INSERT, ::rtl::OUString( String( SchResId( STR_OBJECT_AXES )))), - m_xUndoManager, m_aModel->getModel() ); + m_xUndoManager, getModel() ); try { InsertAxisOrGridDialogData aDialogInput; - uno::Reference< XDiagram > xDiagram = ChartModelHelper::findDiagram(m_aModel->getModel()); + uno::Reference< XDiagram > xDiagram = ChartModelHelper::findDiagram(getModel()); AxisHelper::getAxisOrGridExcistence( aDialogInput.aExistenceList, xDiagram, sal_True ); AxisHelper::getAxisOrGridPossibilities( aDialogInput.aPossibilityList, xDiagram, sal_True ); @@ -136,7 +136,7 @@ void ChartController::executeDispatch_InsertAxes() if( aDlg.Execute() == RET_OK ) { // lock controllers till end of block - ControllerLockGuard aCLGuard( m_aModel->getModel()); + ControllerLockGuard aCLGuard( getModel() ); InsertAxisOrGridDialogData aDialogOutput; aDlg.getResult( aDialogOutput ); @@ -160,12 +160,12 @@ void ChartController::executeDispatch_InsertGrid() UndoGuard aUndoGuard( ActionDescriptionProvider::createDescription( ActionDescriptionProvider::INSERT, ::rtl::OUString( String( SchResId( STR_OBJECT_GRIDS )))), - m_xUndoManager, m_aModel->getModel() ); + m_xUndoManager, getModel() ); try { InsertAxisOrGridDialogData aDialogInput; - uno::Reference< XDiagram > xDiagram = ChartModelHelper::findDiagram(m_aModel->getModel()); + uno::Reference< XDiagram > xDiagram = ChartModelHelper::findDiagram(getModel()); AxisHelper::getAxisOrGridExcistence( aDialogInput.aExistenceList, xDiagram, sal_False ); AxisHelper::getAxisOrGridPossibilities( aDialogInput.aPossibilityList, xDiagram, sal_False ); @@ -174,7 +174,7 @@ void ChartController::executeDispatch_InsertGrid() if( aDlg.Execute() == RET_OK ) { // lock controllers till end of block - ControllerLockGuard aCLGuard( m_aModel->getModel()); + ControllerLockGuard aCLGuard( getModel() ); InsertAxisOrGridDialogData aDialogOutput; aDlg.getResult( aDialogOutput ); bool bChanged = AxisHelper::changeVisibilityOfGrids( xDiagram @@ -197,22 +197,22 @@ void ChartController::executeDispatch_InsertTitles() UndoGuard aUndoGuard( ActionDescriptionProvider::createDescription( ActionDescriptionProvider::INSERT, ::rtl::OUString( String( SchResId( STR_OBJECT_TITLES )))), - m_xUndoManager, m_aModel->getModel() ); + m_xUndoManager, getModel() ); try { TitleDialogData aDialogInput; - aDialogInput.readFromModel( m_aModel->getModel() ); + aDialogInput.readFromModel( getModel() ); ::vos::OGuard aGuard( Application::GetSolarMutex()); SchTitleDlg aDlg( m_pChartWindow, aDialogInput ); if( aDlg.Execute() == RET_OK ) { // lock controllers till end of block - ControllerLockGuard aCLGuard( m_aModel->getModel()); + ControllerLockGuard aCLGuard( getModel() ); TitleDialogData aDialogOutput( impl_createReferenceSizeProvider()); aDlg.getResult( aDialogOutput ); - bool bChanged = aDialogOutput.writeDifferenceToModel( m_aModel->getModel(), m_xCC, &aDialogInput ); + bool bChanged = aDialogOutput.writeDifferenceToModel( getModel(), m_xCC, &aDialogInput ); if( bChanged ) aUndoGuard.commitAction(); } @@ -228,9 +228,9 @@ void ChartController::executeDispatch_DeleteLegend() UndoGuard aUndoGuard( ActionDescriptionProvider::createDescription( ActionDescriptionProvider::DELETE, ::rtl::OUString( String( SchResId( STR_OBJECT_LEGEND )))), - m_xUndoManager, m_aModel->getModel() ); + m_xUndoManager, getModel() ); - LegendHelper::hideLegend( m_aModel->getModel() ); + LegendHelper::hideLegend( getModel() ); aUndoGuard.commitAction(); } @@ -239,9 +239,9 @@ void ChartController::executeDispatch_InsertLegend() UndoGuard aUndoGuard( ActionDescriptionProvider::createDescription( ActionDescriptionProvider::INSERT, ::rtl::OUString( String( SchResId( STR_OBJECT_LEGEND )))), - m_xUndoManager, m_aModel->getModel() ); + m_xUndoManager, getModel() ); - Reference< chart2::XLegend > xLegend = LegendHelper::showLegend( m_aModel->getModel(), m_xCC ); + Reference< chart2::XLegend > xLegend = LegendHelper::showLegend( getModel(), m_xCC ); aUndoGuard.commitAction(); } @@ -250,19 +250,19 @@ void ChartController::executeDispatch_OpenLegendDialog() UndoGuard aUndoGuard( ActionDescriptionProvider::createDescription( ActionDescriptionProvider::INSERT, ::rtl::OUString( String( SchResId( STR_OBJECT_LEGEND )))), - m_xUndoManager, m_aModel->getModel() ); + m_xUndoManager, getModel() ); try { //prepare and open dialog ::vos::OGuard aGuard( Application::GetSolarMutex()); SchLegendDlg aDlg( m_pChartWindow, m_xCC ); - aDlg.init( m_aModel->getModel() ); + aDlg.init( getModel() ); if( aDlg.Execute() == RET_OK ) { // lock controllers till end of block - ControllerLockGuard aCLGuard( m_aModel->getModel() ); - bool bChanged = aDlg.writeToModel( m_aModel->getModel() ); + ControllerLockGuard aCLGuard( getModel() ); + bool bChanged = aDlg.writeToModel( getModel() ); if( bChanged ) aUndoGuard.commitAction(); } @@ -281,11 +281,11 @@ void ChartController::executeDispatch_InsertMenu_DataLabels() UndoGuard aUndoGuard( ActionDescriptionProvider::createDescription( ActionDescriptionProvider::INSERT, ::rtl::OUString( String( SchResId( STR_OBJECT_DATALABELS )))), - m_xUndoManager, m_aModel->getModel() ); + m_xUndoManager, getModel() ); //if a series is selected insert labels for that series only: uno::Reference< chart2::XDataSeries > xSeries( - ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), m_aModel->getModel()), uno::UNO_QUERY ); + ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), getModel()), uno::UNO_QUERY ); if( xSeries.is() ) { // add labels @@ -305,10 +305,10 @@ void ChartController::executeDispatch_InsertMenu_DataLabels() try { wrapper::AllDataLabelItemConverter aItemConverter( - m_aModel->getModel(), + getModel(), m_pDrawModelWrapper->GetItemPool(), m_pDrawModelWrapper->getSdrModel(), - uno::Reference< lang::XMultiServiceFactory >( m_aModel->getModel(), uno::UNO_QUERY )); + uno::Reference< lang::XMultiServiceFactory >( getModel(), uno::UNO_QUERY )); SfxItemSet aItemSet = aItemConverter.CreateEmptyItemSet(); aItemConverter.FillItemSet( aItemSet ); @@ -316,7 +316,7 @@ void ChartController::executeDispatch_InsertMenu_DataLabels() ::vos::OGuard aGuard( Application::GetSolarMutex()); //get number formatter - uno::Reference< util::XNumberFormatsSupplier > xNumberFormatsSupplier( m_aModel->getModel(), uno::UNO_QUERY ); + uno::Reference< util::XNumberFormatsSupplier > xNumberFormatsSupplier( getModel(), uno::UNO_QUERY ); NumberFormatterWrapper aNumberFormatterWrapper( xNumberFormatsSupplier ); SvNumberFormatter* pNumberFormatter = aNumberFormatterWrapper.getSvNumberFormatter(); @@ -327,7 +327,7 @@ void ChartController::executeDispatch_InsertMenu_DataLabels() SfxItemSet aOutItemSet = aItemConverter.CreateEmptyItemSet(); aDlg.FillItemSet( aOutItemSet ); // lock controllers till end of block - ControllerLockGuard aCLGuard( m_aModel->getModel()); + ControllerLockGuard aCLGuard( getModel() ); bool bChanged = aItemConverter.ApplyItemSet( aOutItemSet );//model should be changed now if( bChanged ) aUndoGuard.commitAction(); @@ -343,7 +343,7 @@ void ChartController::executeDispatch_InsertMenu_YErrorBars() { //if a series is selected insert error bars for that series only: uno::Reference< chart2::XDataSeries > xSeries( - ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), m_aModel->getModel()), uno::UNO_QUERY ); + ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), getModel() ), uno::UNO_QUERY ); if( xSeries.is()) { executeDispatch_InsertYErrorBars(); @@ -354,12 +354,12 @@ void ChartController::executeDispatch_InsertMenu_YErrorBars() UndoGuard aUndoGuard( ActionDescriptionProvider::createDescription( ActionDescriptionProvider::INSERT, ObjectNameProvider::getName_ObjectForAllSeries( OBJECTTYPE_DATA_ERRORS ) ), - m_xUndoManager, m_aModel->getModel() ); + m_xUndoManager, getModel() ); try { wrapper::AllSeriesStatisticsConverter aItemConverter( - m_aModel->getModel(), m_pDrawModelWrapper->GetItemPool() ); + getModel(), m_pDrawModelWrapper->GetItemPool() ); SfxItemSet aItemSet = aItemConverter.CreateEmptyItemSet(); aItemConverter.FillItemSet( aItemSet ); @@ -367,9 +367,9 @@ void ChartController::executeDispatch_InsertMenu_YErrorBars() ::vos::OGuard aGuard( Application::GetSolarMutex()); InsertErrorBarsDialog aDlg( m_pChartWindow, aItemSet, - uno::Reference< chart2::XChartDocument >( m_aModel->getModel(), uno::UNO_QUERY )); + uno::Reference< chart2::XChartDocument >( getModel(), uno::UNO_QUERY )); aDlg.SetAxisMinorStepWidthForErrorBarDecimals( - InsertErrorBarsDialog::getAxisMinorStepWidthForErrorBarDecimals( m_aModel->getModel(), m_xChartView, rtl::OUString() ) ); + InsertErrorBarsDialog::getAxisMinorStepWidthForErrorBarDecimals( getModel(), m_xChartView, rtl::OUString() ) ); if( aDlg.Execute() == RET_OK ) { @@ -377,7 +377,7 @@ void ChartController::executeDispatch_InsertMenu_YErrorBars() aDlg.FillItemSet( aOutItemSet ); // lock controllers till end of block - ControllerLockGuard aCLGuard( m_aModel->getModel()); + ControllerLockGuard aCLGuard( getModel() ); bool bChanged = aItemConverter.ApplyItemSet( aOutItemSet );//model should be changed now if( bChanged ) aUndoGuard.commitAction(); @@ -394,9 +394,9 @@ void ChartController::executeDispatch_InsertMeanValue() UndoGuard aUndoGuard( ActionDescriptionProvider::createDescription( ActionDescriptionProvider::INSERT, ::rtl::OUString( String( SchResId( STR_OBJECT_AVERAGE_LINE )))), - m_xUndoManager, m_aModel->getModel()); + m_xUndoManager, getModel() ); lcl_InsertMeanValueLine( m_xCC ).operator()( - ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), m_aModel->getModel())); + ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), getModel() )); aUndoGuard.commitAction(); } @@ -405,10 +405,10 @@ void ChartController::executeDispatch_InsertMenu_MeanValues() UndoGuard aUndoGuard( ActionDescriptionProvider::createDescription( ActionDescriptionProvider::INSERT, ::rtl::OUString( String( SchResId( STR_OBJECT_AVERAGE_LINE )))), - m_xUndoManager, m_aModel->getModel() ); + m_xUndoManager, getModel() ); uno::Reference< chart2::XDataSeries > xSeries( - ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), m_aModel->getModel()), uno::UNO_QUERY ); + ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), getModel() ), uno::UNO_QUERY ); if( xSeries.is() ) { //if a series is selected insert mean value only for that series: @@ -417,7 +417,7 @@ void ChartController::executeDispatch_InsertMenu_MeanValues() else { ::std::vector< uno::Reference< chart2::XDataSeries > > aSeries( - DiagramHelper::getDataSeriesFromDiagram( ChartModelHelper::findDiagram( m_aModel->getModel()))); + DiagramHelper::getDataSeriesFromDiagram( ChartModelHelper::findDiagram( getModel() ))); ::std::for_each( aSeries.begin(), aSeries.end(), lcl_InsertMeanValueLine( m_xCC )); } aUndoGuard.commitAction(); @@ -427,7 +427,7 @@ void ChartController::executeDispatch_InsertMenu_Trendlines() { //if a series is selected insert only for that series: uno::Reference< chart2::XDataSeries > xSeries( - ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), m_aModel->getModel()), uno::UNO_QUERY ); + ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), getModel() ), uno::UNO_QUERY ); if( xSeries.is()) { executeDispatch_InsertTrendline(); @@ -437,12 +437,12 @@ void ChartController::executeDispatch_InsertMenu_Trendlines() UndoGuard aUndoGuard( ActionDescriptionProvider::createDescription( ActionDescriptionProvider::INSERT, ObjectNameProvider::getName_ObjectForAllSeries( OBJECTTYPE_DATA_CURVE ) ), - m_xUndoManager, m_aModel->getModel() ); + m_xUndoManager, getModel() ); try { wrapper::AllSeriesStatisticsConverter aItemConverter( - m_aModel->getModel(), m_pDrawModelWrapper->GetItemPool() ); + getModel(), m_pDrawModelWrapper->GetItemPool() ); SfxItemSet aItemSet = aItemConverter.CreateEmptyItemSet(); aItemConverter.FillItemSet( aItemSet ); @@ -457,7 +457,7 @@ void ChartController::executeDispatch_InsertMenu_Trendlines() aDlg.FillItemSet( aOutItemSet ); // lock controllers till end of block - ControllerLockGuard aCLGuard( m_aModel->getModel()); + ControllerLockGuard aCLGuard( getModel() ); bool bChanged = aItemConverter.ApplyItemSet( aOutItemSet );//model should be changed now if( bChanged ) aUndoGuard.commitAction(); @@ -472,13 +472,13 @@ void ChartController::executeDispatch_InsertMenu_Trendlines() void ChartController::executeDispatch_InsertTrendline() { uno::Reference< chart2::XRegressionCurveContainer > xRegCurveCnt( - ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), m_aModel->getModel()), uno::UNO_QUERY ); + ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), getModel()), uno::UNO_QUERY ); if( xRegCurveCnt.is()) { UndoLiveUpdateGuard aUndoGuard( ActionDescriptionProvider::createDescription( ActionDescriptionProvider::INSERT, ::rtl::OUString( String( SchResId( STR_OBJECT_CURVE )))), - m_xUndoManager, m_aModel->getModel() ); + m_xUndoManager, getModel() ); // add a linear curve RegressionCurveHelper::addRegressionCurve( @@ -493,7 +493,7 @@ void ChartController::executeDispatch_InsertTrendline() wrapper::RegressionCurveItemConverter aItemConverter( xCurveProp, xRegCurveCnt, m_pDrawModelWrapper->getSdrModel().GetItemPool(), m_pDrawModelWrapper->getSdrModel(), - uno::Reference< lang::XMultiServiceFactory >( m_aModel->getModel(), uno::UNO_QUERY )); + uno::Reference< lang::XMultiServiceFactory >( getModel(), uno::UNO_QUERY )); // open dialog SfxItemSet aItemSet = aItemConverter.CreateEmptyItemSet(); @@ -502,11 +502,11 @@ void ChartController::executeDispatch_InsertTrendline() ObjectIdentifier::createDataCurveCID( ObjectIdentifier::getSeriesParticleFromCID( m_aSelection.getSelectedCID()), RegressionCurveHelper::getRegressionCurveIndex( xRegCurveCnt, xCurve ), false )); - aDialogParameter.init( m_aModel->getModel() ); + aDialogParameter.init( getModel() ); ViewElementListProvider aViewElementListProvider( m_pDrawModelWrapper.get()); ::vos::OGuard aGuard( Application::GetSolarMutex()); SchAttribTabDlg aDlg( m_pChartWindow, &aItemSet, &aDialogParameter, &aViewElementListProvider, - uno::Reference< util::XNumberFormatsSupplier >( m_aModel->getModel(), uno::UNO_QUERY )); + uno::Reference< util::XNumberFormatsSupplier >( getModel(), uno::UNO_QUERY )); // note: when a user pressed "OK" but didn't change any settings in the // dialog, the SfxTabDialog returns "Cancel" @@ -515,7 +515,7 @@ void ChartController::executeDispatch_InsertTrendline() const SfxItemSet* pOutItemSet = aDlg.GetOutputItemSet(); if( pOutItemSet ) { - ControllerLockGuard aCLGuard( m_aModel->getModel()); + ControllerLockGuard aCLGuard( getModel() ); aItemConverter.ApplyItemSet( *pOutItemSet ); } aUndoGuard.commitAction(); @@ -526,13 +526,13 @@ void ChartController::executeDispatch_InsertTrendline() void ChartController::executeDispatch_InsertYErrorBars() { uno::Reference< chart2::XDataSeries > xSeries( - ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), m_aModel->getModel()), uno::UNO_QUERY ); + ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), getModel() ), uno::UNO_QUERY ); if( xSeries.is()) { UndoLiveUpdateGuard aUndoGuard( ActionDescriptionProvider::createDescription( ActionDescriptionProvider::INSERT, ::rtl::OUString( String( SchResId( STR_OBJECT_ERROR_BARS )))), - m_xUndoManager, m_aModel->getModel() ); + m_xUndoManager, getModel() ); // add error bars with standard deviation uno::Reference< beans::XPropertySet > xErrorBarProp( @@ -540,9 +540,9 @@ void ChartController::executeDispatch_InsertYErrorBars() // get an appropriate item converter wrapper::ErrorBarItemConverter aItemConverter( - m_aModel->getModel(), xErrorBarProp, m_pDrawModelWrapper->getSdrModel().GetItemPool(), + getModel(), xErrorBarProp, m_pDrawModelWrapper->getSdrModel().GetItemPool(), m_pDrawModelWrapper->getSdrModel(), - uno::Reference< lang::XMultiServiceFactory >( m_aModel->getModel(), uno::UNO_QUERY )); + uno::Reference< lang::XMultiServiceFactory >( getModel(), uno::UNO_QUERY )); // open dialog SfxItemSet aItemSet = aItemConverter.CreateEmptyItemSet(); @@ -550,13 +550,13 @@ void ChartController::executeDispatch_InsertYErrorBars() ObjectPropertiesDialogParameter aDialogParameter = ObjectPropertiesDialogParameter( ObjectIdentifier::createClassifiedIdentifierWithParent( OBJECTTYPE_DATA_ERRORS, ::rtl::OUString(), m_aSelection.getSelectedCID())); - aDialogParameter.init( m_aModel->getModel() ); + aDialogParameter.init( getModel() ); ViewElementListProvider aViewElementListProvider( m_pDrawModelWrapper.get()); ::vos::OGuard aGuard( Application::GetSolarMutex()); SchAttribTabDlg aDlg( m_pChartWindow, &aItemSet, &aDialogParameter, &aViewElementListProvider, - uno::Reference< util::XNumberFormatsSupplier >( m_aModel->getModel(), uno::UNO_QUERY )); + uno::Reference< util::XNumberFormatsSupplier >( getModel(), uno::UNO_QUERY )); aDlg.SetAxisMinorStepWidthForErrorBarDecimals( - InsertErrorBarsDialog::getAxisMinorStepWidthForErrorBarDecimals( m_aModel->getModel(), m_xChartView, m_aSelection.getSelectedCID())); + InsertErrorBarsDialog::getAxisMinorStepWidthForErrorBarDecimals( getModel(), m_xChartView, m_aSelection.getSelectedCID())); // note: when a user pressed "OK" but didn't change any settings in the // dialog, the SfxTabDialog returns "Cancel" @@ -565,7 +565,7 @@ void ChartController::executeDispatch_InsertYErrorBars() const SfxItemSet* pOutItemSet = aDlg.GetOutputItemSet(); if( pOutItemSet ) { - ControllerLockGuard aCLGuard( m_aModel->getModel()); + ControllerLockGuard aCLGuard( getModel() ); aItemConverter.ApplyItemSet( *pOutItemSet ); } aUndoGuard.commitAction(); @@ -576,11 +576,11 @@ void ChartController::executeDispatch_InsertYErrorBars() void ChartController::executeDispatch_InsertTrendlineEquation( bool bInsertR2 ) { uno::Reference< chart2::XRegressionCurve > xRegCurve( - ObjectIdentifier::getObjectPropertySet( m_aSelection.getSelectedCID(), m_aModel->getModel()), uno::UNO_QUERY ); + ObjectIdentifier::getObjectPropertySet( m_aSelection.getSelectedCID(), getModel() ), uno::UNO_QUERY ); if( !xRegCurve.is() ) { uno::Reference< chart2::XRegressionCurveContainer > xRegCurveCnt( - ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), m_aModel->getModel()), uno::UNO_QUERY ); + ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), getModel() ), uno::UNO_QUERY ); xRegCurve.set( RegressionCurveHelper::getFirstCurveNotMeanValueLine( xRegCurveCnt ) ); } if( xRegCurve.is()) @@ -592,7 +592,7 @@ void ChartController::executeDispatch_InsertTrendlineEquation( bool bInsertR2 ) UndoGuard aUndoGuard = UndoGuard( ActionDescriptionProvider::createDescription( ActionDescriptionProvider::INSERT, ::rtl::OUString( String( SchResId( STR_OBJECT_CURVE_EQUATION )))), - m_xUndoManager, m_aModel->getModel() ); + m_xUndoManager, getModel() ); xEqProp->setPropertyValue( C2U("ShowEquation"), uno::makeAny( true )); xEqProp->setPropertyValue( C2U("ShowCorrelationCoefficient"), uno::makeAny( bInsertR2 )); aUndoGuard.commitAction(); @@ -603,13 +603,13 @@ void ChartController::executeDispatch_InsertTrendlineEquation( bool bInsertR2 ) void ChartController::executeDispatch_InsertR2Value() { uno::Reference< beans::XPropertySet > xEqProp( - ObjectIdentifier::getObjectPropertySet( m_aSelection.getSelectedCID(), m_aModel->getModel()), uno::UNO_QUERY ); + ObjectIdentifier::getObjectPropertySet( m_aSelection.getSelectedCID(), getModel() ), uno::UNO_QUERY ); if( xEqProp.is()) { UndoGuard aUndoGuard = UndoGuard( ActionDescriptionProvider::createDescription( ActionDescriptionProvider::INSERT, ::rtl::OUString( String( SchResId( STR_OBJECT_CURVE_EQUATION )))), - m_xUndoManager, m_aModel->getModel() ); + m_xUndoManager, getModel() ); xEqProp->setPropertyValue( C2U("ShowCorrelationCoefficient"), uno::makeAny( true )); aUndoGuard.commitAction(); } @@ -618,13 +618,13 @@ void ChartController::executeDispatch_InsertR2Value() void ChartController::executeDispatch_DeleteR2Value() { uno::Reference< beans::XPropertySet > xEqProp( - ObjectIdentifier::getObjectPropertySet( m_aSelection.getSelectedCID(), m_aModel->getModel()), uno::UNO_QUERY ); + ObjectIdentifier::getObjectPropertySet( m_aSelection.getSelectedCID(), getModel() ), uno::UNO_QUERY ); if( xEqProp.is()) { UndoGuard aUndoGuard = UndoGuard( ActionDescriptionProvider::createDescription( ActionDescriptionProvider::INSERT, ::rtl::OUString( String( SchResId( STR_OBJECT_CURVE_EQUATION )))), - m_xUndoManager, m_aModel->getModel() ); + m_xUndoManager, getModel() ); xEqProp->setPropertyValue( C2U("ShowCorrelationCoefficient"), uno::makeAny( false )); aUndoGuard.commitAction(); } @@ -633,13 +633,13 @@ void ChartController::executeDispatch_DeleteR2Value() void ChartController::executeDispatch_DeleteMeanValue() { uno::Reference< chart2::XRegressionCurveContainer > xRegCurveCnt( - ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), m_aModel->getModel()), uno::UNO_QUERY ); + ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), getModel() ), uno::UNO_QUERY ); if( xRegCurveCnt.is()) { UndoGuard aUndoGuard( ActionDescriptionProvider::createDescription( ActionDescriptionProvider::DELETE, ::rtl::OUString( String( SchResId( STR_OBJECT_AVERAGE_LINE )))), - m_xUndoManager, m_aModel->getModel()); + m_xUndoManager, getModel() ); RegressionCurveHelper::removeMeanValueLine( xRegCurveCnt ); aUndoGuard.commitAction(); } @@ -648,13 +648,13 @@ void ChartController::executeDispatch_DeleteMeanValue() void ChartController::executeDispatch_DeleteTrendline() { uno::Reference< chart2::XRegressionCurveContainer > xRegCurveCnt( - ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), m_aModel->getModel()), uno::UNO_QUERY ); + ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), getModel() ), uno::UNO_QUERY ); if( xRegCurveCnt.is()) { UndoGuard aUndoGuard( ActionDescriptionProvider::createDescription( ActionDescriptionProvider::DELETE, ::rtl::OUString( String( SchResId( STR_OBJECT_CURVE )))), - m_xUndoManager, m_aModel->getModel()); + m_xUndoManager, getModel() ); RegressionCurveHelper::removeAllExceptMeanValueLine( xRegCurveCnt ); aUndoGuard.commitAction(); } @@ -663,13 +663,13 @@ void ChartController::executeDispatch_DeleteTrendline() void ChartController::executeDispatch_DeleteTrendlineEquation() { uno::Reference< chart2::XRegressionCurveContainer > xRegCurveCnt( - ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), m_aModel->getModel()), uno::UNO_QUERY ); + ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), getModel() ), uno::UNO_QUERY ); if( xRegCurveCnt.is()) { UndoGuard aUndoGuard( ActionDescriptionProvider::createDescription( ActionDescriptionProvider::DELETE, ::rtl::OUString( String( SchResId( STR_OBJECT_CURVE_EQUATION )))), - m_xUndoManager, m_aModel->getModel()); + m_xUndoManager, getModel() ); RegressionCurveHelper::removeEquations( xRegCurveCnt ); aUndoGuard.commitAction(); } @@ -678,13 +678,13 @@ void ChartController::executeDispatch_DeleteTrendlineEquation() void ChartController::executeDispatch_DeleteYErrorBars() { uno::Reference< chart2::XDataSeries > xDataSeries( - ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), m_aModel->getModel())); + ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), getModel() )); if( xDataSeries.is()) { UndoGuard aUndoGuard( ActionDescriptionProvider::createDescription( ActionDescriptionProvider::DELETE, ::rtl::OUString( String( SchResId( STR_OBJECT_CURVE )))), - m_xUndoManager, m_aModel->getModel()); + m_xUndoManager, getModel() ); StatisticsHelper::removeErrorBars( xDataSeries ); aUndoGuard.commitAction(); } @@ -693,12 +693,12 @@ void ChartController::executeDispatch_DeleteYErrorBars() void ChartController::executeDispatch_InsertDataLabels() { uno::Reference< chart2::XDataSeries > xSeries( - ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), m_aModel->getModel()), uno::UNO_QUERY ); + ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), getModel() ), uno::UNO_QUERY ); if( xSeries.is() ) { UndoGuard aUndoGuard = UndoGuard( ActionDescriptionProvider::createDescription( ActionDescriptionProvider::INSERT, ::rtl::OUString( String( SchResId( STR_OBJECT_DATALABELS )))), - m_xUndoManager, m_aModel->getModel() ); + m_xUndoManager, getModel() ); DataSeriesHelper::insertDataLabelsToSeriesAndAllPoints( xSeries ); aUndoGuard.commitAction(); } @@ -708,20 +708,20 @@ void ChartController::executeDispatch_InsertDataLabel() { UndoGuard aUndoGuard = UndoGuard( ActionDescriptionProvider::createDescription( ActionDescriptionProvider::INSERT, ::rtl::OUString( String( SchResId( STR_OBJECT_LABEL )))), - m_xUndoManager, m_aModel->getModel() ); - DataSeriesHelper::insertDataLabelToPoint( ObjectIdentifier::getObjectPropertySet( m_aSelection.getSelectedCID(), m_aModel->getModel() ) ); + m_xUndoManager, getModel() ); + DataSeriesHelper::insertDataLabelToPoint( ObjectIdentifier::getObjectPropertySet( m_aSelection.getSelectedCID(), getModel() ) ); aUndoGuard.commitAction(); } void ChartController::executeDispatch_DeleteDataLabels() { uno::Reference< chart2::XDataSeries > xSeries( - ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), m_aModel->getModel()), uno::UNO_QUERY ); + ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), getModel() ), uno::UNO_QUERY ); if( xSeries.is() ) { UndoGuard aUndoGuard( ActionDescriptionProvider::createDescription( ActionDescriptionProvider::DELETE, ::rtl::OUString( String( SchResId( STR_OBJECT_DATALABELS )))), - m_xUndoManager, m_aModel->getModel()); + m_xUndoManager, getModel() ); DataSeriesHelper::deleteDataLabelsFromSeriesAndAllPoints( xSeries ); aUndoGuard.commitAction(); } @@ -731,8 +731,8 @@ void ChartController::executeDispatch_DeleteDataLabel() { UndoGuard aUndoGuard( ActionDescriptionProvider::createDescription( ActionDescriptionProvider::DELETE, ::rtl::OUString( String( SchResId( STR_OBJECT_LABEL )))), - m_xUndoManager, m_aModel->getModel()); - DataSeriesHelper::deleteDataLabelsFromPoint( ObjectIdentifier::getObjectPropertySet( m_aSelection.getSelectedCID(), m_aModel->getModel() ) ); + m_xUndoManager, getModel() ); + DataSeriesHelper::deleteDataLabelsFromPoint( ObjectIdentifier::getObjectPropertySet( m_aSelection.getSelectedCID(), getModel() ) ); aUndoGuard.commitAction(); } @@ -740,8 +740,8 @@ void ChartController::executeDispatch_ResetAllDataPoints() { UndoGuard aUndoGuard( ActionDescriptionProvider::createDescription( ActionDescriptionProvider::FORMAT, ::rtl::OUString( String( SchResId( STR_OBJECT_DATAPOINTS )))), - m_xUndoManager, m_aModel->getModel()); - uno::Reference< chart2::XDataSeries > xSeries( ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), m_aModel->getModel()), uno::UNO_QUERY ); + m_xUndoManager, getModel() ); + uno::Reference< chart2::XDataSeries > xSeries( ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), getModel() ), uno::UNO_QUERY ); if( xSeries.is() ) xSeries->resetAllDataPoints(); aUndoGuard.commitAction(); @@ -750,8 +750,8 @@ void ChartController::executeDispatch_ResetDataPoint() { UndoGuard aUndoGuard( ActionDescriptionProvider::createDescription( ActionDescriptionProvider::FORMAT, ::rtl::OUString( String( SchResId( STR_OBJECT_DATAPOINT )))), - m_xUndoManager, m_aModel->getModel()); - uno::Reference< chart2::XDataSeries > xSeries( ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), m_aModel->getModel()), uno::UNO_QUERY ); + m_xUndoManager, getModel() ); + uno::Reference< chart2::XDataSeries > xSeries( ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), getModel() ), uno::UNO_QUERY ); if( xSeries.is() ) { sal_Int32 nPointIndex = ObjectIdentifier::getIndexFromParticleOrCID( m_aSelection.getSelectedCID() ); @@ -769,13 +769,13 @@ void ChartController::executeDispatch_InsertAxisTitle() UndoGuard aUndoGuard( ActionDescriptionProvider::createDescription( ActionDescriptionProvider::INSERT, ::rtl::OUString( String( SchResId( STR_OBJECT_TITLE )))), - m_xUndoManager, m_aModel->getModel() ); + m_xUndoManager, getModel() ); - Reference< XAxis > xAxis = ObjectIdentifier::getAxisForCID( m_aSelection.getSelectedCID(), m_aModel->getModel() ); + Reference< XAxis > xAxis = ObjectIdentifier::getAxisForCID( m_aSelection.getSelectedCID(), getModel() ); sal_Int32 nDimensionIndex = -1; sal_Int32 nCooSysIndex = -1; sal_Int32 nAxisIndex = -1; - AxisHelper::getIndicesForAxis( xAxis, ChartModelHelper::findDiagram(m_aModel->getModel()), nCooSysIndex, nDimensionIndex, nAxisIndex ); + AxisHelper::getIndicesForAxis( xAxis, ChartModelHelper::findDiagram(getModel()), nCooSysIndex, nDimensionIndex, nAxisIndex ); TitleHelper::eTitleType eTitleType = TitleHelper::X_AXIS_TITLE; if( nDimensionIndex==0 ) @@ -786,14 +786,14 @@ void ChartController::executeDispatch_InsertAxisTitle() eTitleType = TitleHelper::Z_AXIS_TITLE; ::std::auto_ptr< ReferenceSizeProvider > apRefSizeProvider( impl_createReferenceSizeProvider()); - xTitle = TitleHelper::createTitle( eTitleType, ObjectNameProvider::getTitleNameByType(eTitleType), m_aModel->getModel(), m_xCC, apRefSizeProvider.get() ); + xTitle = TitleHelper::createTitle( eTitleType, ObjectNameProvider::getTitleNameByType(eTitleType), getModel(), m_xCC, apRefSizeProvider.get() ); aUndoGuard.commitAction(); } /* if( xTitle.is() ) { - OUString aTitleCID = ObjectIdentifier::createClassifiedIdentifierForObject( xTitle, m_aModel->getModel() ); + OUString aTitleCID = ObjectIdentifier::createClassifiedIdentifierForObject( xTitle, getModel() ); select( uno::makeAny(aTitleCID) ); executeDispatch_EditText(); } @@ -810,11 +810,11 @@ void ChartController::executeDispatch_InsertAxis() UndoGuard aUndoGuard( ActionDescriptionProvider::createDescription( ActionDescriptionProvider::INSERT, ::rtl::OUString( String( SchResId( STR_OBJECT_AXIS )))), - m_xUndoManager, m_aModel->getModel() ); + m_xUndoManager, getModel() ); try { - Reference< XAxis > xAxis = ObjectIdentifier::getAxisForCID( m_aSelection.getSelectedCID(), m_aModel->getModel() ); + Reference< XAxis > xAxis = ObjectIdentifier::getAxisForCID( m_aSelection.getSelectedCID(), getModel() ); if( xAxis.is() ) { AxisHelper::makeAxisVisible( xAxis ); @@ -832,11 +832,11 @@ void ChartController::executeDispatch_DeleteAxis() UndoGuard aUndoGuard( ActionDescriptionProvider::createDescription( ActionDescriptionProvider::DELETE, ::rtl::OUString( String( SchResId( STR_OBJECT_AXIS )))), - m_xUndoManager, m_aModel->getModel() ); + m_xUndoManager, getModel() ); try { - Reference< XAxis > xAxis = ObjectIdentifier::getAxisForCID( m_aSelection.getSelectedCID(), m_aModel->getModel() ); + Reference< XAxis > xAxis = ObjectIdentifier::getAxisForCID( m_aSelection.getSelectedCID(), getModel() ); if( xAxis.is() ) { AxisHelper::makeAxisInvisible( xAxis ); @@ -854,11 +854,11 @@ void ChartController::executeDispatch_InsertMajorGrid() UndoGuard aUndoGuard( ActionDescriptionProvider::createDescription( ActionDescriptionProvider::INSERT, ::rtl::OUString( String( SchResId( STR_OBJECT_GRID )))), - m_xUndoManager, m_aModel->getModel() ); + m_xUndoManager, getModel() ); try { - Reference< XAxis > xAxis = ObjectIdentifier::getAxisForCID( m_aSelection.getSelectedCID(), m_aModel->getModel() ); + Reference< XAxis > xAxis = ObjectIdentifier::getAxisForCID( m_aSelection.getSelectedCID(), getModel() ); if( xAxis.is() ) { AxisHelper::makeGridVisible( xAxis->getGridProperties() ); @@ -876,11 +876,11 @@ void ChartController::executeDispatch_DeleteMajorGrid() UndoGuard aUndoGuard( ActionDescriptionProvider::createDescription( ActionDescriptionProvider::DELETE, ::rtl::OUString( String( SchResId( STR_OBJECT_GRID )))), - m_xUndoManager, m_aModel->getModel() ); + m_xUndoManager, getModel() ); try { - Reference< XAxis > xAxis = ObjectIdentifier::getAxisForCID( m_aSelection.getSelectedCID(), m_aModel->getModel() ); + Reference< XAxis > xAxis = ObjectIdentifier::getAxisForCID( m_aSelection.getSelectedCID(), getModel() ); if( xAxis.is() ) { AxisHelper::makeGridInvisible( xAxis->getGridProperties() ); @@ -898,11 +898,11 @@ void ChartController::executeDispatch_InsertMinorGrid() UndoGuard aUndoGuard( ActionDescriptionProvider::createDescription( ActionDescriptionProvider::INSERT, ::rtl::OUString( String( SchResId( STR_OBJECT_GRID )))), - m_xUndoManager, m_aModel->getModel() ); + m_xUndoManager, getModel() ); try { - Reference< XAxis > xAxis = ObjectIdentifier::getAxisForCID( m_aSelection.getSelectedCID(), m_aModel->getModel() ); + Reference< XAxis > xAxis = ObjectIdentifier::getAxisForCID( m_aSelection.getSelectedCID(), getModel() ); if( xAxis.is() ) { Sequence< Reference< beans::XPropertySet > > aSubGrids( xAxis->getSubGridProperties() ); @@ -922,11 +922,11 @@ void ChartController::executeDispatch_DeleteMinorGrid() UndoGuard aUndoGuard( ActionDescriptionProvider::createDescription( ActionDescriptionProvider::DELETE, ::rtl::OUString( String( SchResId( STR_OBJECT_GRID )))), - m_xUndoManager, m_aModel->getModel() ); + m_xUndoManager, getModel() ); try { - Reference< XAxis > xAxis = ObjectIdentifier::getAxisForCID( m_aSelection.getSelectedCID(), m_aModel->getModel() ); + Reference< XAxis > xAxis = ObjectIdentifier::getAxisForCID( m_aSelection.getSelectedCID(), getModel() ); if( xAxis.is() ) { Sequence< Reference< beans::XPropertySet > > aSubGrids( xAxis->getSubGridProperties() ); diff --git a/chart2/source/controller/main/ChartController_Position.cxx b/chart2/source/controller/main/ChartController_Position.cxx index 6c988ebf22d5..7e7bb150ac21 100644 --- a/chart2/source/controller/main/ChartController_Position.cxx +++ b/chart2/source/controller/main/ChartController_Position.cxx @@ -139,7 +139,7 @@ void SAL_CALL ChartController::executeDispatch_PositionAndSize() ActionDescriptionProvider::createDescription( ActionDescriptionProvider::POS_SIZE, ObjectNameProvider::getName( ObjectIdentifier::getObjectType( aCID ))), - m_xUndoManager, m_aModel->getModel() ); + m_xUndoManager, getModel() ); SfxAbstractTabDialog * pDlg = NULL; try @@ -166,11 +166,11 @@ void SAL_CALL ChartController::executeDispatch_PositionAndSize() Rectangle aObjectRect; aItemSet.Put(*pOutItemSet);//overwrite old values with new values (-> all items are set) lcl_getPositionAndSizeFromItemSet( aItemSet, aObjectRect, aSelectedSize ); - awt::Size aPageSize( ChartModelHelper::getPageSize( m_aModel->getModel() ) ); + awt::Size aPageSize( ChartModelHelper::getPageSize( getModel() ) ); Rectangle aPageRect( 0,0,aPageSize.Width,aPageSize.Height ); bool bChanged = PositionAndSizeHelper::moveObject( m_aSelection.getSelectedCID() - , m_aModel->getModel() + , getModel() , awt::Rectangle(aObjectRect.getX(),aObjectRect.getY(),aObjectRect.getWidth(),aObjectRect.getHeight()) , awt::Rectangle(aPageRect.getX(),aPageRect.getY(),aPageRect.getWidth(),aPageRect.getHeight()) , m_xChartView ); diff --git a/chart2/source/controller/main/ChartController_Properties.cxx b/chart2/source/controller/main/ChartController_Properties.cxx index 3c5a0b135622..649b9cb62f9d 100644 --- a/chart2/source/controller/main/ChartController_Properties.cxx +++ b/chart2/source/controller/main/ChartController_Properties.cxx @@ -676,7 +676,7 @@ rtl::OUString lcl_getObjectCIDForCommand( const ::rtl::OString& rDispatchCommand void SAL_CALL ChartController::executeDispatch_FormatObject(const ::rtl::OUString& rDispatchCommand) { - uno::Reference< XChartDocument > xChartDocument( m_aModel->getModel(), uno::UNO_QUERY ); + uno::Reference< XChartDocument > xChartDocument( getModel(), uno::UNO_QUERY ); rtl::OString aCommand( rtl::OUStringToOString( rDispatchCommand, RTL_TEXTENCODING_ASCII_US ) ); rtl::OUString rObjectCID = lcl_getObjectCIDForCommand( aCommand, xChartDocument, m_aSelection.getSelectedCID() ); executeDlg_ObjectProperties( rObjectCID ); @@ -720,7 +720,7 @@ void SAL_CALL ChartController::executeDlg_ObjectProperties( const ::rtl::OUStrin UndoGuard aUndoGuard( ActionDescriptionProvider::createDescription( ActionDescriptionProvider::FORMAT, ObjectNameProvider::getName( ObjectIdentifier::getObjectType( aObjectCID ))), - m_xUndoManager, m_aModel->getModel() ); + m_xUndoManager, getModel() ); bool bSuccess = ChartController::executeDlg_ObjectProperties_withoutUndoGuard( aObjectCID, false ); if( bSuccess ) @@ -738,7 +738,7 @@ bool ChartController::executeDlg_ObjectProperties_withoutUndoGuard( const ::rtl: } try { - NumberFormatterWrapper aNumberFormatterWrapper( uno::Reference< util::XNumberFormatsSupplier >(m_aModel->getModel(), uno::UNO_QUERY) ); + NumberFormatterWrapper aNumberFormatterWrapper( uno::Reference< util::XNumberFormatsSupplier >(getModel(), uno::UNO_QUERY) ); //------------------------------------------------------------- //get type of object @@ -750,19 +750,19 @@ bool ChartController::executeDlg_ObjectProperties_withoutUndoGuard( const ::rtl: } if( OBJECTTYPE_DIAGRAM_WALL==eObjectType || OBJECTTYPE_DIAGRAM_FLOOR==eObjectType ) { - if( !DiagramHelper::isSupportingFloorAndWall( ChartModelHelper::findDiagram( m_aModel->getModel() ) ) ) + if( !DiagramHelper::isSupportingFloorAndWall( ChartModelHelper::findDiagram( getModel() ) ) ) return bRet; } //------------------------------------------------------------- //convert properties to ItemSet - awt::Size aPageSize( ChartModelHelper::getPageSize(m_aModel->getModel()) ); + awt::Size aPageSize( ChartModelHelper::getPageSize(getModel()) ); ::std::auto_ptr< ReferenceSizeProvider > pRefSizeProv( impl_createReferenceSizeProvider()); ::std::auto_ptr< ::comphelper::ItemConverter > apItemConverter( - createItemConverter( rObjectCID, m_aModel->getModel(), m_xCC, + createItemConverter( rObjectCID, getModel(), m_xCC, m_pDrawModelWrapper->getSdrModel(), &aNumberFormatterWrapper, ExplicitValueProvider::getExplicitValueProvider(m_xChartView), @@ -776,24 +776,24 @@ bool ChartController::executeDlg_ObjectProperties_withoutUndoGuard( const ::rtl: //------------------------------------------------------------- //prepare dialog ObjectPropertiesDialogParameter aDialogParameter = ObjectPropertiesDialogParameter( rObjectCID ); - aDialogParameter.init( m_aModel->getModel() ); + aDialogParameter.init( getModel() ); ViewElementListProvider aViewElementListProvider( m_pDrawModelWrapper.get() ); ::vos::OGuard aGuard( Application::GetSolarMutex()); SchAttribTabDlg aDlg( m_pChartWindow, &aItemSet, &aDialogParameter, &aViewElementListProvider - , uno::Reference< util::XNumberFormatsSupplier >( m_aModel->getModel(), uno::UNO_QUERY ) ); + , uno::Reference< util::XNumberFormatsSupplier >( getModel(), uno::UNO_QUERY ) ); if(aDialogParameter.HasSymbolProperties()) { SfxItemSet* pSymbolShapeProperties=NULL; uno::Reference< beans::XPropertySet > xObjectProperties = - ObjectIdentifier::getObjectPropertySet( rObjectCID, m_aModel->getModel() ); - wrapper::DataPointItemConverter aSymbolItemConverter( m_aModel->getModel(), m_xCC - , xObjectProperties, ObjectIdentifier::getDataSeriesForCID( rObjectCID, m_aModel->getModel() ) + ObjectIdentifier::getObjectPropertySet( rObjectCID, getModel() ); + wrapper::DataPointItemConverter aSymbolItemConverter( getModel(), m_xCC + , xObjectProperties, ObjectIdentifier::getDataSeriesForCID( rObjectCID, getModel() ) , m_pDrawModelWrapper->getSdrModel().GetItemPool() , m_pDrawModelWrapper->getSdrModel() , &aNumberFormatterWrapper - , uno::Reference< lang::XMultiServiceFactory >( m_aModel->getModel(), uno::UNO_QUERY ) + , uno::Reference< lang::XMultiServiceFactory >( getModel(), uno::UNO_QUERY ) , wrapper::GraphicPropertyItemConverter::FILLED_DATA_POINT ); pSymbolShapeProperties = new SfxItemSet( aSymbolItemConverter.CreateEmptyItemSet() ); @@ -807,7 +807,7 @@ bool ChartController::executeDlg_ObjectProperties_withoutUndoGuard( const ::rtl: if( aDialogParameter.HasStatisticProperties() ) { aDlg.SetAxisMinorStepWidthForErrorBarDecimals( - InsertErrorBarsDialog::getAxisMinorStepWidthForErrorBarDecimals( m_aModel->getModel(), m_xChartView, rObjectCID ) ); + InsertErrorBarsDialog::getAxisMinorStepWidthForErrorBarDecimals( getModel(), m_xChartView, rObjectCID ) ); } //------------------------------------------------------------- @@ -817,7 +817,7 @@ bool ChartController::executeDlg_ObjectProperties_withoutUndoGuard( const ::rtl: const SfxItemSet* pOutItemSet = aDlg.GetOutputItemSet(); if(pOutItemSet) { - ControllerLockGuard aCLGuard( m_aModel->getModel()); + ControllerLockGuard aCLGuard( getModel()); apItemConverter->ApplyItemSet( *pOutItemSet );//model should be changed now bRet = true; } @@ -839,12 +839,12 @@ void SAL_CALL ChartController::executeDispatch_View3D() // using assignment for broken gcc 3.3 UndoLiveUpdateGuard aUndoGuard = UndoLiveUpdateGuard( ::rtl::OUString( String( SchResId( STR_ACTION_EDIT_3D_VIEW ))), - m_xUndoManager, m_aModel->getModel()); + m_xUndoManager, getModel()); // /-- //open dialog ::vos::OGuard aSolarGuard( Application::GetSolarMutex()); - View3DDialog aDlg( m_pChartWindow, m_aModel->getModel(), m_pDrawModelWrapper->GetColorTable() ); + View3DDialog aDlg( m_pChartWindow, getModel(), m_pDrawModelWrapper->GetColorTable() ); if( aDlg.Execute() == RET_OK ) aUndoGuard.commitAction(); // \-- diff --git a/chart2/source/controller/main/ChartController_TextEdit.cxx b/chart2/source/controller/main/ChartController_TextEdit.cxx index 4df362ee80d2..a6e82430d8f6 100644 --- a/chart2/source/controller/main/ChartController_TextEdit.cxx +++ b/chart2/source/controller/main/ChartController_TextEdit.cxx @@ -80,7 +80,7 @@ void ChartController::StartTextEdit( const Point* pMousePixel ) if(!pTextObj) return; - m_xUndoManager->preAction( m_aModel->getModel()); + m_xUndoManager->preAction( getModel()); SdrOutliner* pOutliner = m_pDrawViewWrapper->getOutliner(); //pOutliner->SetRefDevice(m_pChartWindow); //pOutliner->SetStyleSheetPool((SfxStyleSheetPool*)pStyleSheetPool); @@ -159,7 +159,7 @@ bool ChartController::EndTextEdit() ObjectIdentifier::getObjectPropertySet( aObjectCID, getModel() ); // lock controllers till end of block - ControllerLockGuard aCLGuard( m_aModel->getModel()); + ControllerLockGuard aCLGuard( getModel() ); TitleHelper::setCompleteString( aString, uno::Reference< ::com::sun::star::chart2::XTitle >::query( xPropSet ), m_xCC ); diff --git a/chart2/source/controller/main/ChartController_Tools.cxx b/chart2/source/controller/main/ChartController_Tools.cxx index ff567636ba0e..d3cf8e2247ad 100644 --- a/chart2/source/controller/main/ChartController_Tools.cxx +++ b/chart2/source/controller/main/ChartController_Tools.cxx @@ -204,13 +204,13 @@ bool lcl_deleteDataCurve( namespace chart { -::std::auto_ptr< ReferenceSizeProvider > ChartController::impl_createReferenceSizeProvider() const +::std::auto_ptr< ReferenceSizeProvider > ChartController::impl_createReferenceSizeProvider() { - awt::Size aPageSize( ChartModelHelper::getPageSize( m_aModel->getModel()) ); + awt::Size aPageSize( ChartModelHelper::getPageSize( getModel() ) ); return ::std::auto_ptr< ReferenceSizeProvider >( new ReferenceSizeProvider( aPageSize, - Reference< chart2::XChartDocument >( m_aModel->getModel(), uno::UNO_QUERY ))); + Reference< chart2::XChartDocument >( getModel(), uno::UNO_QUERY ))); } void ChartController::impl_adaptDataSeriesAutoResize() @@ -228,7 +228,7 @@ void ChartController::executeDispatch_NewArrangement() try { - Reference< frame::XModel > xModel( m_aModel->getModel()); + Reference< frame::XModel > xModel( getModel() ); Reference< chart2::XDiagram > xDiagram( ChartModelHelper::findDiagram( xModel )); if( xDiagram.is()) { @@ -284,8 +284,8 @@ void ChartController::executeDispatch_ScaleText() // using assignment for broken gcc 3.3 UndoGuard aUndoGuard = UndoGuard( ::rtl::OUString( String( SchResId( STR_ACTION_SCALE_TEXT ))), - m_xUndoManager, m_aModel->getModel()); - ControllerLockGuard aCtlLockGuard( m_aModel->getModel()); + m_xUndoManager, getModel() ); + ControllerLockGuard aCtlLockGuard( getModel() ); ::std::auto_ptr< ReferenceSizeProvider > apRefSizeProv( impl_createReferenceSizeProvider()); OSL_ASSERT( apRefSizeProv.get()); if( apRefSizeProv.get()) @@ -377,7 +377,7 @@ void ChartController::impl_PasteGraphic( { // note: the XPropertySet of the model is the old API. Also the property // "AdditionalShapes" that is used there. - uno::Reference< beans::XPropertySet > xModelProp( m_aModel->getModel(), uno::UNO_QUERY ); + uno::Reference< beans::XPropertySet > xModelProp( getModel(), uno::UNO_QUERY ); DrawModelWrapper * pDrawModelWrapper( this->GetDrawModelWrapper()); if( ! (xGraphic.is() && xModelProp.is())) return; @@ -393,7 +393,7 @@ void ChartController::impl_PasteGraphic( xPage->add( xGraphicShape ); //need to change the model state manually { - uno::Reference< util::XModifiable > xModifiable( m_aModel->getModel(), uno::UNO_QUERY ); + uno::Reference< util::XModifiable > xModifiable( getModel(), uno::UNO_QUERY ); if( xModifiable.is() ) xModifiable->setModified( true ); } @@ -457,7 +457,7 @@ void ChartController::impl_PasteShapes( SdrModel* pModel ) } } - Reference< util::XModifiable > xModifiable( m_aModel->getModel(), uno::UNO_QUERY ); + Reference< util::XModifiable > xModifiable( getModel(), uno::UNO_QUERY ); if ( xModifiable.is() ) { xModifiable->setModified( true ); @@ -637,7 +637,7 @@ bool ChartController::executeDispatch_Delete() return false; //remove chart object - uno::Reference< chart2::XChartDocument > xChartDoc( m_aModel->getModel(), uno::UNO_QUERY ); + uno::Reference< chart2::XChartDocument > xChartDoc( getModel(), uno::UNO_QUERY ); if( !xChartDoc.is() ) return false; @@ -650,9 +650,9 @@ bool ChartController::executeDispatch_Delete() UndoGuard aUndoGuard = UndoGuard( ActionDescriptionProvider::createDescription( ActionDescriptionProvider::DELETE, ::rtl::OUString( String( SchResId( STR_OBJECT_TITLE )))), - m_xUndoManager, m_aModel->getModel() ); + m_xUndoManager, getModel()); TitleHelper::removeTitle( - ObjectIdentifier::getTitleTypeForCID( aCID ), m_aModel->getModel()); + ObjectIdentifier::getTitleTypeForCID( aCID ), getModel() ); bReturn = true; aUndoGuard.commitAction(); break; @@ -669,7 +669,7 @@ bool ChartController::executeDispatch_Delete() UndoGuard aUndoGuard = UndoGuard( ActionDescriptionProvider::createDescription( ActionDescriptionProvider::DELETE, ::rtl::OUString( String( SchResId( STR_OBJECT_LEGEND )))), - m_xUndoManager, m_aModel->getModel() ); + m_xUndoManager, getModel() ); xLegendProp->setPropertyValue( C2U("Show"), uno::makeAny( false )); bReturn = true; aUndoGuard.commitAction(); @@ -679,7 +679,7 @@ bool ChartController::executeDispatch_Delete() } case OBJECTTYPE_DATA_SERIES: - bReturn = lcl_deleteDataSeries( aCID, m_aModel->getModel(), m_xUndoManager ); + bReturn = lcl_deleteDataSeries( aCID, getModel(), m_xUndoManager ); break; case OBJECTTYPE_LEGEND_ENTRY: @@ -687,9 +687,9 @@ bool ChartController::executeDispatch_Delete() ObjectType eParentObjectType = ObjectIdentifier::getObjectType( ObjectIdentifier::getFullParentParticle( aCID )); if( eParentObjectType == OBJECTTYPE_DATA_SERIES ) - bReturn = lcl_deleteDataSeries( aCID, m_aModel->getModel(), m_xUndoManager ); + bReturn = lcl_deleteDataSeries( aCID, getModel(), m_xUndoManager ); else if( eParentObjectType == OBJECTTYPE_DATA_CURVE ) - bReturn = lcl_deleteDataCurve( aCID, m_aModel->getModel(), m_xUndoManager ); + bReturn = lcl_deleteDataCurve( aCID, getModel(), m_xUndoManager ); break; } @@ -697,14 +697,14 @@ bool ChartController::executeDispatch_Delete() { uno::Reference< chart2::XRegressionCurveContainer > xRegCurveCnt( ObjectIdentifier::getObjectPropertySet( - ObjectIdentifier::getFullParentParticle( aCID ), m_aModel->getModel()), uno::UNO_QUERY ); + ObjectIdentifier::getFullParentParticle( aCID ), getModel()), uno::UNO_QUERY ); if( xRegCurveCnt.is()) { // using assignment for broken gcc 3.3 UndoGuard aUndoGuard = UndoGuard( ActionDescriptionProvider::createDescription( ActionDescriptionProvider::DELETE, ::rtl::OUString( String( SchResId( STR_OBJECT_AVERAGE_LINE )))), - m_xUndoManager, m_aModel->getModel() ); + m_xUndoManager, getModel() ); RegressionCurveHelper::removeMeanValueLine( xRegCurveCnt ); bReturn = true; aUndoGuard.commitAction(); @@ -713,16 +713,16 @@ bool ChartController::executeDispatch_Delete() } case OBJECTTYPE_DATA_CURVE: - bReturn = lcl_deleteDataCurve( aCID, m_aModel->getModel(), m_xUndoManager ); + bReturn = lcl_deleteDataCurve( aCID, getModel(), m_xUndoManager ); break; case OBJECTTYPE_DATA_CURVE_EQUATION: { uno::Reference< beans::XPropertySet > xEqProp( - ObjectIdentifier::getObjectPropertySet( aCID, m_aModel->getModel())); + ObjectIdentifier::getObjectPropertySet( aCID, getModel())); if( xEqProp.is()) { - uno::Reference< frame::XModel > xModel( m_aModel->getModel()); + uno::Reference< frame::XModel > xModel( getModel() ); // using assignment for broken gcc 3.3 UndoGuard aUndoGuard = UndoGuard( ActionDescriptionProvider::createDescription( @@ -742,10 +742,10 @@ bool ChartController::executeDispatch_Delete() case OBJECTTYPE_DATA_ERRORS: { uno::Reference< beans::XPropertySet > xErrorBarProp( - ObjectIdentifier::getObjectPropertySet( aCID, m_aModel->getModel())); + ObjectIdentifier::getObjectPropertySet( aCID, getModel() )); if( xErrorBarProp.is()) { - uno::Reference< frame::XModel > xModel( m_aModel->getModel()); + uno::Reference< frame::XModel > xModel( getModel() ); // using assignment for broken gcc 3.3 UndoGuard aUndoGuard = UndoGuard( ActionDescriptionProvider::createDescription( @@ -767,14 +767,14 @@ bool ChartController::executeDispatch_Delete() case OBJECTTYPE_DATA_LABEL: { uno::Reference< beans::XPropertySet > xObjectProperties = - ObjectIdentifier::getObjectPropertySet( aCID, m_aModel->getModel() ); + ObjectIdentifier::getObjectPropertySet( aCID, getModel() ); if( xObjectProperties.is() ) { UndoGuard aUndoGuard = UndoGuard( ActionDescriptionProvider::createDescription( ActionDescriptionProvider::DELETE, ::rtl::OUString( String( SchResId( aObjectType == OBJECTTYPE_DATA_LABEL ? STR_OBJECT_LABEL : STR_OBJECT_DATALABELS )))), - m_xUndoManager, m_aModel->getModel() ); + m_xUndoManager, getModel() ); chart2::DataPointLabel aLabel; xObjectProperties->getPropertyValue( C2U( "Label" ) ) >>= aLabel; aLabel.ShowNumber = false; @@ -783,7 +783,7 @@ bool ChartController::executeDispatch_Delete() aLabel.ShowLegendSymbol = false; if( aObjectType == OBJECTTYPE_DATA_LABELS ) { - uno::Reference< chart2::XDataSeries > xSeries( ObjectIdentifier::getDataSeriesForCID( aCID, m_aModel->getModel() )); + uno::Reference< chart2::XDataSeries > xSeries( ObjectIdentifier::getDataSeriesForCID( aCID, getModel() )); ::chart::DataSeriesHelper::setPropertyAlsoToAllAttributedDataPoints( xSeries, C2U( "Label" ), uno::makeAny(aLabel) ); } else @@ -838,7 +838,7 @@ bool ChartController::executeDispatch_Delete() void ChartController::executeDispatch_ToggleLegend() { - Reference< frame::XModel > xModel( m_aModel->getModel()); + Reference< frame::XModel > xModel( getModel() ); UndoGuard aUndoGuard = UndoGuard( ::rtl::OUString( String( SchResId( STR_ACTION_TOGGLE_LEGEND ))), m_xUndoManager, xModel ); Reference< beans::XPropertySet > xLegendProp( LegendHelper::getLegend( xModel ), uno::UNO_QUERY ); @@ -872,10 +872,10 @@ void ChartController::executeDispatch_ToggleLegend() void ChartController::executeDispatch_ToggleGridHorizontal() { - Reference< frame::XModel > xModel( m_aModel->getModel()); + Reference< frame::XModel > xModel( getModel() ); UndoGuard aUndoGuard = UndoGuard( ::rtl::OUString( String( SchResId( STR_ACTION_TOGGLE_GRID_HORZ ))), m_xUndoManager, xModel ); - Reference< chart2::XDiagram > xDiagram( ChartModelHelper::findDiagram( m_aModel->getModel())); + Reference< chart2::XDiagram > xDiagram( ChartModelHelper::findDiagram( getModel() )); if( xDiagram.is()) { sal_Int32 nDimensionIndex = 1; diff --git a/chart2/source/controller/main/ChartController_Window.cxx b/chart2/source/controller/main/ChartController_Window.cxx index 284b3ff370cf..e0fd830180e5 100644 --- a/chart2/source/controller/main/ChartController_Window.cxx +++ b/chart2/source/controller/main/ChartController_Window.cxx @@ -255,7 +255,7 @@ const short HITPIX=2; //hit-tolerance in pixel if( bIsEmbedded ) { //change map mode to fit new size - awt::Size aModelPageSize = ChartModelHelper::getPageSize( m_aModel->getModel() ); + awt::Size aModelPageSize = ChartModelHelper::getPageSize( getModel() ); sal_Int32 nScaleXNumerator = aLogicSize.Width(); sal_Int32 nScaleXDenominator = aModelPageSize.Width; sal_Int32 nScaleYNumerator = aLogicSize.Height(); @@ -292,7 +292,7 @@ const short HITPIX=2; //hit-tolerance in pixel else { //change visarea - ChartModelHelper::setPageSize( awt::Size( aLogicSize.Width(), aLogicSize.Height() ), m_aModel->getModel() ); + ChartModelHelper::setPageSize( awt::Size( aLogicSize.Width(), aLogicSize.Height() ), getModel() ); pWindow->SetPosSizePixel( X, Y, Width, Height, Flags ); } pWindow->Invalidate(); @@ -507,8 +507,8 @@ void ChartController::execute_Paint( const Rectangle& rRect ) { try { - uno::Reference< frame::XModel > xModel( m_aModel->getModel() ); - DBG_ASSERT( xModel.is(), "ChartController::execute_Paint: have no model to paint"); + uno::Reference< frame::XModel > xModel( getModel() ); + //DBG_ASSERT( xModel.is(), "ChartController::execute_Paint: have no model to paint"); if( !xModel.is() ) return; @@ -698,7 +698,7 @@ void ChartController::execute_MouseButtonDown( const MouseEvent& rMEvt ) m_aSelection.adaptSelectionToNewPos( aMPos, pDrawViewWrapper , rMEvt.IsRight(), m_bWaitingForDoubleClick ); - if( !m_aSelection.isRotateableObjectSelected( m_aModel->getModel() ) ) + if( !m_aSelection.isRotateableObjectSelected( getModel() ) ) { m_eDragMode = SDRDRAG_MOVE; pDrawViewWrapper->SetDragMode(m_eDragMode); @@ -731,14 +731,14 @@ void ChartController::execute_MouseButtonDown( const MouseEvent& rMEvt ) else if( eKind==HDL_UPLFT || eKind==HDL_UPRGT || eKind==HDL_LWLFT || eKind==HDL_LWRGT ) eRotationDirection = DragMethod_RotateDiagram::ROTATIONDIRECTION_Z; } - pDragMethod = new DragMethod_RotateDiagram( *pDrawViewWrapper, m_aSelection.getSelectedCID(), m_aModel->getModel(), eRotationDirection ); + pDragMethod = new DragMethod_RotateDiagram( *pDrawViewWrapper, m_aSelection.getSelectedCID(), getModel(), eRotationDirection ); } } else { rtl::OUString aDragMethodServiceName( ObjectIdentifier::getDragMethodServiceName( m_aSelection.getSelectedCID() ) ); if( aDragMethodServiceName.equals( ObjectIdentifier::getPieSegmentDragMethodServiceName() ) ) - pDragMethod = new DragMethod_PieSegment( *pDrawViewWrapper, m_aSelection.getSelectedCID(), m_aModel->getModel() ); + pDragMethod = new DragMethod_PieSegment( *pDrawViewWrapper, m_aSelection.getSelectedCID(), getModel() ); } pDrawViewWrapper->SdrView::BegDragObj(aMPos, NULL, pHitSelectionHdl, nDrgLog, pDragMethod); } @@ -778,7 +778,7 @@ void ChartController::execute_Tracking( const TrackingEvent& /* rTEvt */ ) void ChartController::execute_MouseButtonUp( const MouseEvent& rMEvt ) { - ControllerLockGuard aCLGuard( m_aModel->getModel()); + ControllerLockGuard aCLGuard( getModel() ); m_bWaitingForMouseUp = false; bool bNotifySelectionChange = false; { @@ -837,7 +837,7 @@ void ChartController::execute_MouseButtonUp( const MouseEvent& rMEvt ) if( pChartDragMethod ) { UndoGuard aUndoGuard( pChartDragMethod->getUndoDescription(), - m_xUndoManager, m_aModel->getModel() ); + m_xUndoManager, getModel() ); if( pDrawViewWrapper->EndDragObj(false) ) { @@ -855,7 +855,7 @@ void ChartController::execute_MouseButtonUp( const MouseEvent& rMEvt ) if( pObj ) { Rectangle aObjectRect = pObj->GetSnapRect(); - awt::Size aPageSize( ChartModelHelper::getPageSize( m_aModel->getModel() ) ); + awt::Size aPageSize( ChartModelHelper::getPageSize( getModel() ) ); Rectangle aPageRect( 0,0,aPageSize.Width,aPageSize.Height ); const E3dObject* pE3dObject = dynamic_cast< const E3dObject*>( pObj ); @@ -870,9 +870,9 @@ void ChartController::execute_MouseButtonUp( const MouseEvent& rMEvt ) ActionDescriptionProvider::createDescription( eActionType, ObjectNameProvider::getName( ObjectIdentifier::getObjectType( m_aSelection.getSelectedCID() ))), - m_xUndoManager, m_aModel->getModel() ); + m_xUndoManager, getModel() ); bool bChanged = PositionAndSizeHelper::moveObject( m_aSelection.getSelectedCID() - , m_aModel->getModel() + , getModel() , awt::Rectangle(aObjectRect.getX(),aObjectRect.getY(),aObjectRect.getWidth(),aObjectRect.getHeight()) , awt::Rectangle(aPageRect.getX(),aPageRect.getY(),aPageRect.getWidth(),aPageRect.getHeight()) , m_xChartView ); @@ -894,7 +894,7 @@ void ChartController::execute_MouseButtonUp( const MouseEvent& rMEvt ) if( !bDraggingDone ) //mouse wasn't moved while dragging { bool bClickedTwiceOnDragableObject = SelectionHelper::isDragableObjectHitTwice( aMPos, m_aSelection.getSelectedCID(), *pDrawViewWrapper ); - bool bIsRotateable = m_aSelection.isRotateableObjectSelected( m_aModel->getModel() ); + bool bIsRotateable = m_aSelection.isRotateableObjectSelected( getModel() ); //toggel between move and rotate if( bIsRotateable && bClickedTwiceOnDragableObject && SDRDRAG_MOVE==m_eDragMode ) @@ -1035,7 +1035,7 @@ void ChartController::execute_Command( const CommandEvent& rCEvt ) { sal_Int16 nUniqueId = 1; ObjectType eObjectType = ObjectIdentifier::getObjectType( m_aSelection.getSelectedCID() ); - Reference< XDiagram > xDiagram = ChartModelHelper::findDiagram( m_aModel->getModel() ); + Reference< XDiagram > xDiagram = ChartModelHelper::findDiagram( getModel() ); OUString aFormatCommand( lcl_getFormatCommandForObjectCID( m_aSelection.getSelectedCID() ) ); lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, aFormatCommand ); @@ -1045,7 +1045,7 @@ void ChartController::execute_Command( const CommandEvent& rCEvt ) if( OBJECTTYPE_DATA_SERIES == eObjectType || OBJECTTYPE_DATA_POINT == eObjectType ) { bool bIsPoint = ( OBJECTTYPE_DATA_POINT == eObjectType ); - uno::Reference< XDataSeries > xSeries = ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), m_aModel->getModel() ); + uno::Reference< XDataSeries > xSeries = ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), getModel() ); uno::Reference< chart2::XRegressionCurveContainer > xCurveCnt( xSeries, uno::UNO_QUERY ); Reference< chart2::XRegressionCurve > xTrendline( RegressionCurveHelper::getFirstCurveNotMeanValueLine( xCurveCnt ) ); bool bHasEquation = RegressionCurveHelper::hasEquation( xTrendline ); @@ -1210,7 +1210,7 @@ void ChartController::execute_Command( const CommandEvent& rCEvt ) //----- else if( OBJECTTYPE_AXIS == eObjectType || OBJECTTYPE_GRID == eObjectType || OBJECTTYPE_SUBGRID == eObjectType ) { - Reference< XAxis > xAxis = ObjectIdentifier::getAxisForCID( m_aSelection.getSelectedCID(), m_aModel->getModel() ); + Reference< XAxis > xAxis = ObjectIdentifier::getAxisForCID( m_aSelection.getSelectedCID(), getModel() ); if( xAxis.is() && xDiagram.is() ) { sal_Int32 nDimensionIndex = -1; @@ -1354,7 +1354,7 @@ bool ChartController::execute_KeyInput( const KeyEvent& rKEvt ) if( ! bReturn ) { // Natvigation (Tab/F3/Home/End) - uno::Reference< XChartDocument > xChartDoc( m_aModel->getModel(), uno::UNO_QUERY ); + uno::Reference< XChartDocument > xChartDoc( getModel(), uno::UNO_QUERY ); ObjectKeyNavigation aObjNav( m_aSelection.getSelectedOID(), xChartDoc, ExplicitValueProvider::getExplicitValueProvider( m_xChartView )); awt::KeyEvent aKeyEvent( ::svt::AcceleratorExecute::st_VCLKey2AWTKey( aKeyCode )); bReturn = aObjNav.handleKeyEvent( aKeyEvent ); @@ -1366,7 +1366,7 @@ bool ChartController::execute_KeyInput( const KeyEvent& rKEvt ) { aNewSelection = aNewOID.getAny(); } - if ( m_eDragMode == SDRDRAG_ROTATE && !SelectionHelper::isRotateableObject( aNewOID.getObjectCID(), m_aModel->getModel() ) ) + if ( m_eDragMode == SDRDRAG_ROTATE && !SelectionHelper::isRotateableObject( aNewOID.getObjectCID(), getModel() ) ) { m_eDragMode = SDRDRAG_MOVE; } @@ -1499,7 +1499,7 @@ bool ChartController::execute_KeyInput( const KeyEvent& rKEvt ) { awt::Point aPos( xShape->getPosition() ); awt::Size aSize( xShape->getSize() ); - awt::Size aPageSize( ChartModelHelper::getPageSize( m_aModel->getModel() ) ); + awt::Size aPageSize( ChartModelHelper::getPageSize( getModel() ) ); aPos.X = static_cast< long >( static_cast< double >( aPos.X ) + fShiftAmountX ); aPos.Y = static_cast< long >( static_cast< double >( aPos.Y ) + fShiftAmountY ); if( aPos.X + aSize.Width > aPageSize.Width ) @@ -1587,7 +1587,7 @@ bool ChartController::requestQuickHelp( { uno::Reference< frame::XModel > xChartModel; if( m_aModel.is()) - xChartModel.set( m_aModel->getModel()); + xChartModel.set( getModel() ); if( !xChartModel.is()) return false; @@ -1744,7 +1744,7 @@ bool ChartController::impl_moveOrResizeObject( bool bNeedShift = true; bool bNeedResize = ( eType == CENTERED_RESIZE_OBJECT ); - uno::Reference< frame::XModel > xChartModel( m_aModel->getModel()); + uno::Reference< frame::XModel > xChartModel( getModel() ); uno::Reference< beans::XPropertySet > xObjProp( ObjectIdentifier::getObjectPropertySet( rCID, xChartModel )); if( xObjProp.is()) @@ -1826,7 +1826,7 @@ bool ChartController::impl_DragDataPoint( const ::rtl::OUString & rCID, double f sal_Int32 nDataPointIndex = ObjectIdentifier::getIndexFromParticleOrCID( rCID ); uno::Reference< chart2::XDataSeries > xSeries( - ObjectIdentifier::getDataSeriesForCID( rCID, m_aModel->getModel())); + ObjectIdentifier::getDataSeriesForCID( rCID, getModel() )); if( xSeries.is()) { try @@ -1997,7 +1997,7 @@ void ChartController::impl_SetMousePointer( const MouseEvent & rEvent ) { if( (m_eDragMode == SDRDRAG_ROTATE) && SelectionHelper::isRotateableObject( aHitObjectCID - , m_aModel->getModel() ) ) + , getModel() ) ) pWindow->SetPointer( Pointer( POINTER_ROTATE ) ); else { diff --git a/chart2/source/controller/main/CommandDispatchContainer.cxx b/chart2/source/controller/main/CommandDispatchContainer.cxx index 3761d0c33ce0..e0d689340760 100644 --- a/chart2/source/controller/main/CommandDispatchContainer.cxx +++ b/chart2/source/controller/main/CommandDispatchContainer.cxx @@ -72,7 +72,7 @@ void CommandDispatchContainer::setModel( m_aCachedDispatches.clear(); DisposeHelper::DisposeAllElements( m_aToBeDisposedDispatches ); m_aToBeDisposedDispatches.clear(); - m_xModel.set( xModel ); + m_xModel = xModel; } // void CommandDispatchContainer::setUndoManager( @@ -102,33 +102,33 @@ Reference< frame::XDispatch > CommandDispatchContainer::getDispatchForURL( } else { - if( rURL.Path.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Undo" )) - || rURL.Path.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Redo" ))) + uno::Reference< frame::XModel > xModel( m_xModel ); + + if( xModel.is() && (rURL.Path.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Undo" )) + || rURL.Path.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Redo" ))) ) { - CommandDispatch * pDispatch = new UndoCommandDispatch( m_xContext, m_xModel ); + CommandDispatch * pDispatch = new UndoCommandDispatch( m_xContext, xModel ); xResult.set( pDispatch ); pDispatch->initialize(); m_aCachedDispatches[ C2U(".uno:Undo") ].set( xResult ); m_aCachedDispatches[ C2U(".uno:Redo") ].set( xResult ); m_aToBeDisposedDispatches.push_back( xResult ); } - else if( rURL.Path.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Context" )) - || rURL.Path.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ModifiedStatus" ))) + else if( xModel.is() && (rURL.Path.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Context" )) + || rURL.Path.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ModifiedStatus" ))) ) { - Reference< view::XSelectionSupplier > xSelSupp; - if( m_xModel.is()) - xSelSupp.set( m_xModel->getCurrentController(), uno::UNO_QUERY ); - CommandDispatch * pDispatch = new StatusBarCommandDispatch( m_xContext, m_xModel, xSelSupp ); + Reference< view::XSelectionSupplier > xSelSupp( xModel->getCurrentController(), uno::UNO_QUERY ); + CommandDispatch * pDispatch = new StatusBarCommandDispatch( m_xContext, xModel, xSelSupp ); xResult.set( pDispatch ); pDispatch->initialize(); m_aCachedDispatches[ C2U(".uno:Context") ].set( xResult ); m_aCachedDispatches[ C2U(".uno:ModifiedStatus") ].set( xResult ); m_aToBeDisposedDispatches.push_back( xResult ); } - else if( m_xModel.is() && + else if( xModel.is() && (m_aContainerDocumentCommands.find( rURL.Path ) != m_aContainerDocumentCommands.end()) ) { - xResult.set( getContainerDispatchForURL( m_xModel->getCurrentController(), rURL )); + xResult.set( getContainerDispatchForURL( xModel->getCurrentController(), rURL )); // ToDo: can those dispatches be cached? m_aCachedDispatches[ rURL.Complete ].set( xResult ); } diff --git a/chart2/source/controller/main/CommandDispatchContainer.hxx b/chart2/source/controller/main/CommandDispatchContainer.hxx index 2cee65405ef4..1c8769e0a6d9 100644 --- a/chart2/source/controller/main/CommandDispatchContainer.hxx +++ b/chart2/source/controller/main/CommandDispatchContainer.hxx @@ -33,6 +33,7 @@ #include #include +#include #include #include @@ -140,7 +141,7 @@ private: mutable tDisposeVector m_aToBeDisposedDispatches; ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext; - ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > m_xModel; + ::com::sun::star::uno::WeakReference< ::com::sun::star::frame::XModel > m_xModel; ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XUndoManager > m_xUndoManager; ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > m_xChartDispatcher; -- cgit v1.2.3 From 468f644cf2e9b0eb58c1c4fd808158fb01657807 Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Thu, 20 May 2010 10:59:04 +0200 Subject: fwk139: #i105125# Fix state of selection check box in system file picker --- sfx2/source/dialog/filedlghelper.cxx | 59 +++++++++++++++++++++--------------- sfx2/source/dialog/filedlgimpl.hxx | 2 ++ 2 files changed, 36 insertions(+), 25 deletions(-) diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx index 5270eb5d4207..29d4ac78ccb8 100644 --- a/sfx2/source/dialog/filedlghelper.cxx +++ b/sfx2/source/dialog/filedlghelper.cxx @@ -542,33 +542,13 @@ void FileDialogHelper_Impl::updateExportButton() // ------------------------------------------------------------------------ void FileDialogHelper_Impl::updateSelectionBox() { - if ( !mbExport ) + if ( !mbHasSelectionBox ) return; - // Does the selection box exist? - bool bSelectionBoxFound = false; - uno::Reference< XControlInformation > xCtrlInfo( mxFileDlg, UNO_QUERY ); - if ( xCtrlInfo.is() ) - { - Sequence< ::rtl::OUString > aCtrlList = xCtrlInfo->getSupportedControls(); - sal_uInt32 nCount = aCtrlList.getLength(); - for ( sal_uInt32 nCtrl = 0; nCtrl < nCount; ++nCtrl ) - if ( aCtrlList[ nCtrl ].equalsAscii("SelectionBox") ) - { - bSelectionBoxFound = true; - break; - } - } - - if ( bSelectionBoxFound ) - { - const SfxFilter* pFilter = getCurentSfxFilter(); - updateExtendedControl( - ExtendedFilePickerElementIds::CHECKBOX_SELECTION, - ( mbSelectionEnabled && pFilter && ( pFilter->GetFilterFlags() & SFX_FILTER_SUPPORTSSELECTION ) != 0 ) ); - uno::Reference< XFilePickerControlAccess > xCtrlAccess( mxFileDlg, UNO_QUERY ); - xCtrlAccess->setValue( ExtendedFilePickerElementIds::CHECKBOX_SELECTION, 0, makeAny( (sal_Bool)mbSelection ) ); - } + const SfxFilter* pFilter = getCurentSfxFilter(); + mbSelectionFltrEnabled = updateExtendedControl( + ExtendedFilePickerElementIds::CHECKBOX_SELECTION, + ( mbSelectionEnabled && pFilter && ( pFilter->GetFilterFlags() & SFX_FILTER_SUPPORTSSELECTION ) != 0 ) ); } // ------------------------------------------------------------------------ @@ -956,6 +936,8 @@ FileDialogHelper_Impl::FileDialogHelper_Impl( mbPwdCheckBoxState = sal_False; mbSelection = sal_False; mbSelectionEnabled = sal_True; + mbHasSelectionBox = sal_False; + mbSelectionFltrEnabled = sal_False; // default settings m_nDontFlags = SFX_FILTER_INTERNAL | SFX_FILTER_NOTINFILEDLG | SFX_FILTER_NOTINSTALLED; @@ -1025,6 +1007,7 @@ FileDialogHelper_Impl::FileDialogHelper_Impl( nTemplateDescription = TemplateDescription::FILESAVE_AUTOEXTENSION_SELECTION; mbHasAutoExt = sal_True; mbIsSaveDlg = sal_True; + mbHasSelectionBox = sal_True; if ( mbExport && !mxFilterCFG.is() && xFactory.is() ) { mxFilterCFG = uno::Reference< XNameAccess >( @@ -2073,6 +2056,21 @@ void FileDialogHelper_Impl::saveConfig() } } + if( mbHasSelectionBox && mbSelectionFltrEnabled ) + { + try + { + aValue = xDlg->getValue( ExtendedFilePickerElementIds::CHECKBOX_SELECTION, 0 ); + sal_Bool bSelection = sal_True; + aValue >>= bSelection; + if ( aUserData.GetTokenCount(' ') < 3 ) + aUserData.Append(' '); + aUserData.SetToken( 2, ' ', String::CreateFromInt32( (sal_Int32) bSelection ) ); + bWriteConfig = sal_True; + } + catch( IllegalArgumentException ){} + } + if ( bWriteConfig ) aDlgOpt.SetUserItem( USERITEM_NAME, makeAny( OUString( aUserData ) ) ); } @@ -2206,6 +2204,17 @@ void FileDialogHelper_Impl::loadConfig() catch( IllegalArgumentException ){} } + if( mbHasSelectionBox ) + { + sal_Int32 nFlag = aUserData.GetToken( 2, ' ' ).ToInt32(); + aValue <<= (sal_Bool) nFlag; + try + { + xDlg->setValue( ExtendedFilePickerElementIds::CHECKBOX_SELECTION, 0, aValue ); + } + catch( IllegalArgumentException ){} + } + if ( !maPath.getLength() ) displayFolder( SvtPathOptions().GetWorkPath() ); } diff --git a/sfx2/source/dialog/filedlgimpl.hxx b/sfx2/source/dialog/filedlgimpl.hxx index b023b8fb53a9..6965e14ae84d 100644 --- a/sfx2/source/dialog/filedlgimpl.hxx +++ b/sfx2/source/dialog/filedlgimpl.hxx @@ -107,6 +107,8 @@ namespace sfx2 sal_Bool mbPwdCheckBoxState : 1; sal_Bool mbSelection : 1; sal_Bool mbSelectionEnabled : 1; + sal_Bool mbHasSelectionBox : 1; + sal_Bool mbSelectionFltrEnabled : 1; private: void addFilters( sal_Int64 nFlags, -- cgit v1.2.3 From 7b822aa1a80c6adc847495c584ddde1f88f20072 Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Thu, 20 May 2010 11:00:14 +0200 Subject: fwk139: #i105546# Remove unused MenuManager ctor --- framework/inc/classes/menumanager.hxx | 3 ++- framework/source/classes/menumanager.cxx | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/framework/inc/classes/menumanager.hxx b/framework/inc/classes/menumanager.hxx index 5c14edde9c03..8826716f1d6f 100644 --- a/framework/inc/classes/menumanager.hxx +++ b/framework/inc/classes/menumanager.hxx @@ -82,13 +82,14 @@ class MenuManager : public ThreadHelpBase , Menu* pMenu, sal_Bool bDelete, sal_Bool bDeleteChildren ); - +#if 0 MenuManager( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory, REFERENCE< XFRAME >& rFrame, AddonMenu* pAddonMenu, sal_Bool bDelete, sal_Bool bDeleteChildren ); +#endif virtual ~MenuManager(); diff --git a/framework/source/classes/menumanager.cxx b/framework/source/classes/menumanager.cxx index 0b2f30093ca8..61cb8eb4a253 100644 --- a/framework/source/classes/menumanager.cxx +++ b/framework/source/classes/menumanager.cxx @@ -357,6 +357,7 @@ MenuManager::MenuManager( SetHdl(); } +#if 0 // #110897# MenuManager::MenuManager( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory, @@ -413,6 +414,7 @@ MenuManager::MenuManager( SetHdl(); } +#endif void MenuManager::SetHdl() { -- cgit v1.2.3 From 99711432fed03368f8dccecabda19cfcc99d014c Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Thu, 20 May 2010 11:52:02 +0200 Subject: fwk139: #i104125# Vista file picker: Fixed settings values of check boxes is defect --- fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx | 4 ++++ fpicker/source/win32/filepicker/VistaFilePickerImpl.hxx | 2 ++ 2 files changed, 6 insertions(+) diff --git a/fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx b/fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx index c0296892cb65..ac59a4f65b99 100644 --- a/fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx +++ b/fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx @@ -147,6 +147,7 @@ VistaFilePickerImpl::VistaFilePickerImpl() , m_lLastFiles () , m_iEventHandler(new VistaFilePickerEventHandler(this)) , m_bInExecute (sal_False) + , m_bWasExecuted (sal_False) , m_sDirectory () , m_sFilename () { @@ -851,6 +852,8 @@ void VistaFilePickerImpl::impl_sta_ShowDialogModal(const RequestRef& rRequest) // tasks must be done differently .-) (e.g. see impl_sta_getSelectedFiles()) m_bInExecute = sal_True; + m_bWasExecuted = sal_True; + aLock.clear(); // <- SYNCHRONIZED @@ -1092,6 +1095,7 @@ void VistaFilePickerImpl::impl_sta_GetControlValue(const RequestRef& rRequest) return; css::uno::Any aValue; + if( m_bWasExecuted ) switch (nId) { case css::ui::dialogs::ExtendedFilePickerElementIds::CHECKBOX_PASSWORD : diff --git a/fpicker/source/win32/filepicker/VistaFilePickerImpl.hxx b/fpicker/source/win32/filepicker/VistaFilePickerImpl.hxx index 3b0fa43b0dad..6be17935609b 100644 --- a/fpicker/source/win32/filepicker/VistaFilePickerImpl.hxx +++ b/fpicker/source/win32/filepicker/VistaFilePickerImpl.hxx @@ -329,6 +329,8 @@ class VistaFilePickerImpl : private ::cppu::BaseMutex /// @todo document me ::sal_Bool m_bInExecute; + ::sal_Bool m_bWasExecuted; + // handle to parent window HWND m_hParentWindow; -- cgit v1.2.3 From ffe5faef611a17abf300a049f5158dd6662c46de Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Thu, 20 May 2010 12:38:21 +0200 Subject: unoawt: MultiSelectionSimpleMode property for list boxes, allowing 'browser-like' multi selection (where a single click onto an entry only toggles this entry) --- toolkit/inc/toolkit/helper/property.hxx | 3 ++- toolkit/source/awt/vclxwindows.cxx | 9 +++++++++ toolkit/source/controls/unocontrolmodel.cxx | 1 + toolkit/source/helper/property.cxx | 1 + vcl/source/control/lstbox.cxx | 2 ++ 5 files changed, 15 insertions(+), 1 deletion(-) diff --git a/toolkit/inc/toolkit/helper/property.hxx b/toolkit/inc/toolkit/helper/property.hxx index d5f484145316..ed86c3fe4ded 100644 --- a/toolkit/inc/toolkit/helper/property.hxx +++ b/toolkit/inc/toolkit/helper/property.hxx @@ -199,7 +199,8 @@ namespace rtl { #define BASEPROPERTY_GRID_EVEN_ROW_BACKGROUND 148 #define BASEPROPERTY_GRID_HEADER_BACKGROUND 149 #define BASEPROPERTY_GRID_LINE_COLOR 150 -#define BASEPROPERTY_GRID_ROW_BACKGROUND 151 +#define BASEPROPERTY_GRID_ROW_BACKGROUND 151 +#define BASEPROPERTY_MULTISELECTION_SIMPLEMODE 152 // Keine gebundenen Properties, werden immer aus der Property BASEPROPERTY_FONTDESCRIPTOR entnommen. diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx index 00124b58ae93..5649ed4248dd 100644 --- a/toolkit/source/awt/vclxwindows.cxx +++ b/toolkit/source/awt/vclxwindows.cxx @@ -1546,6 +1546,7 @@ void VCLXListBox::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds ) BASEPROPERTY_HELPURL, BASEPROPERTY_LINECOUNT, BASEPROPERTY_MULTISELECTION, + BASEPROPERTY_MULTISELECTION_SIMPLEMODE, BASEPROPERTY_PRINTABLE, BASEPROPERTY_SELECTEDITEMS, BASEPROPERTY_STRINGITEMLIST, @@ -1929,6 +1930,9 @@ void VCLXListBox::setProperty( const ::rtl::OUString& PropertyName, const ::com: pListBox->EnableMultiSelection( b ); } break; + case BASEPROPERTY_MULTISELECTION_SIMPLEMODE: + ::toolkit::adjustBooleanWindowStyle( Value, pListBox, WB_SIMPLEMODE, sal_False ); + break; case BASEPROPERTY_LINECOUNT: { sal_Int16 n = sal_Int16(); @@ -1993,6 +1997,11 @@ void VCLXListBox::setProperty( const ::rtl::OUString& PropertyName, const ::com: aProp <<= (sal_Bool) pListBox->IsMultiSelectionEnabled(); } break; + case BASEPROPERTY_MULTISELECTION_SIMPLEMODE: + { + aProp <<= (sal_Bool)( ( pListBox->GetStyle() & WB_SIMPLEMODE ) == 0 ); + } + break; case BASEPROPERTY_LINECOUNT: { aProp <<= (sal_Int16) pListBox->GetDropDownLineCount(); diff --git a/toolkit/source/controls/unocontrolmodel.cxx b/toolkit/source/controls/unocontrolmodel.cxx index d34f5d9d9006..c5e1f70b15b8 100644 --- a/toolkit/source/controls/unocontrolmodel.cxx +++ b/toolkit/source/controls/unocontrolmodel.cxx @@ -338,6 +338,7 @@ sal_Bool UnoControlModel::ImplHasProperty( sal_uInt16 nPropId ) const case BASEPROPERTY_HARDLINEBREAKS: case BASEPROPERTY_NOLABEL: aDefault <<= (sal_Bool) sal_False; break; + case BASEPROPERTY_MULTISELECTION_SIMPLEMODE: case BASEPROPERTY_HIDEINACTIVESELECTION: case BASEPROPERTY_ENFORCE_FORMAT: case BASEPROPERTY_AUTOCOMPLETE: diff --git a/toolkit/source/helper/property.cxx b/toolkit/source/helper/property.cxx index 6711e4503511..b878112eed69 100644 --- a/toolkit/source/helper/property.cxx +++ b/toolkit/source/helper/property.cxx @@ -203,6 +203,7 @@ ImplPropertyInfo* ImplGetPropertyInfos( sal_uInt16& rElementCount ) DECL_PROP_1 ( "MouseTransparent", MOUSETRANSPARENT, bool, BOUND ), DECL_PROP_2 ( "MultiLine", MULTILINE, bool, BOUND, MAYBEDEFAULT ), DECL_PROP_2 ( "MultiSelection", MULTISELECTION, bool, BOUND, MAYBEDEFAULT ), + DECL_PROP_2 ( "MultiSelectionSimpleMode", MULTISELECTION_SIMPLEMODE, bool, BOUND, MAYBEDEFAULT ), DECL_PROP_2 ( "NativeWidgetLook", NATIVE_WIDGET_LOOK, bool, BOUND, MAYBEDEFAULT ), DECL_PROP_2 ( "NoLabel", NOLABEL, bool, BOUND, MAYBEDEFAULT ), DECL_PROP_2 ( "Orientation", ORIENTATION, sal_Int32, BOUND, MAYBEDEFAULT ), diff --git a/vcl/source/control/lstbox.cxx b/vcl/source/control/lstbox.cxx index dde34d52806c..6c7df5b106bf 100644 --- a/vcl/source/control/lstbox.cxx +++ b/vcl/source/control/lstbox.cxx @@ -885,6 +885,8 @@ void ListBox::StateChanged( StateChangedType nType ) { SetStyle( ImplInitStyle( GetStyle() ) ); mpImplLB->GetMainWindow()->EnableSort( ( GetStyle() & WB_SORT ) ? TRUE : FALSE ); + BOOL bSimpleMode = ( GetStyle() & WB_SIMPLEMODE ) ? TRUE : FALSE; + mpImplLB->SetMultiSelectionSimpleMode( bSimpleMode ); } else if( nType == STATE_CHANGE_MIRRORING ) { -- cgit v1.2.3 From b393dc5d63ffdf35459a7a6a1863df066ee82ae1 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Thu, 20 May 2010 12:45:50 +0200 Subject: unoawt: UNO API for generic wizards, wrapping around the existing C++ RoadmapWizard --- svtools/inc/svtools/roadmapwizard.hxx | 9 +- svtools/inc/svtools/wizardmachine.hxx | 8 +- svtools/prj/build.lst | 3 +- svtools/source/dialogs/roadmapwizard.cxx | 40 +++ svtools/source/dialogs/wizardmachine.cxx | 54 ++-- svtools/source/uno/makefile.mk | 2 +- svtools/source/uno/miscservices.cxx | 23 +- svtools/source/uno/unowizard.hxx | 111 ++++++++ svtools/source/uno/wizard/makefile.mk | 48 ++++ svtools/source/uno/wizard/unowizard.cxx | 374 ++++++++++++++++++++++++++ svtools/source/uno/wizard/wizardpageshell.cxx | 170 ++++++++++++ svtools/source/uno/wizard/wizardpageshell.hxx | 73 +++++ svtools/source/uno/wizard/wizardshell.cxx | 251 +++++++++++++++++ svtools/source/uno/wizard/wizardshell.hxx | 115 ++++++++ svtools/util/makefile.mk | 1 + 15 files changed, 1260 insertions(+), 22 deletions(-) create mode 100644 svtools/source/uno/unowizard.hxx create mode 100644 svtools/source/uno/wizard/makefile.mk create mode 100644 svtools/source/uno/wizard/unowizard.cxx create mode 100644 svtools/source/uno/wizard/wizardpageshell.cxx create mode 100644 svtools/source/uno/wizard/wizardpageshell.hxx create mode 100644 svtools/source/uno/wizard/wizardshell.cxx create mode 100644 svtools/source/uno/wizard/wizardshell.hxx diff --git a/svtools/inc/svtools/roadmapwizard.hxx b/svtools/inc/svtools/roadmapwizard.hxx index 49a0f441c49c..ee02f3b33ed7 100644 --- a/svtools/inc/svtools/roadmapwizard.hxx +++ b/svtools/inc/svtools/roadmapwizard.hxx @@ -80,6 +80,11 @@ namespace svt const ResId& _rRes, sal_uInt32 _nButtonFlags = WZB_NEXT | WZB_PREVIOUS | WZB_FINISH | WZB_CANCEL | WZB_HELP ); + RoadmapWizard( + Window* _pParent, + const WinBits i_nStyle, + sal_uInt32 _nButtonFlags = WZB_NEXT | WZB_PREVIOUS | WZB_FINISH | WZB_CANCEL | WZB_HELP + ); ~RoadmapWizard( ); void SetRoadmapBitmap( const BitmapEx& _rBitmap ); @@ -230,13 +235,15 @@ protected: private: SVT_DLLPRIVATE void ResizeFixedLine(); - private: DECL_DLLPRIVATE_LINK( OnRoadmapItemSelected, void* ); /** updates the roadmap control to show the given path, as far as possible (modulo conflicts with other paths) */ SVT_DLLPRIVATE void implUpdateRoadmap( ); + + private: + SVT_DLLPRIVATE void impl_construct(); }; //........................................................................ diff --git a/svtools/inc/svtools/wizardmachine.hxx b/svtools/inc/svtools/wizardmachine.hxx index f45087f78705..45d15390440f 100644 --- a/svtools/inc/svtools/wizardmachine.hxx +++ b/svtools/inc/svtools/wizardmachine.hxx @@ -62,8 +62,7 @@ namespace svt eTravelForward, // traveling forward (maybe with skipping pages) eTravelBackward, // traveling backward (maybe with skipping pages) eFinish, // the wizard is about to be finished - eValidate, // the data should be validated only, no traveling wll happen - eValidateNoUI // the data should be validated only, without displaying error messages and other UI + eValidate // the data should be validated only, no traveling wll happen }; }; @@ -189,6 +188,7 @@ namespace svt For the button flags, use any combination of the WZB_* flags. */ OWizardMachine(Window* _pParent, const ResId& _rRes, sal_uInt32 _nButtonFlags ); + OWizardMachine(Window* _pParent, const WinBits i_nStyle, sal_uInt32 _nButtonFlags ); ~OWizardMachine(); /// enable (or disable) buttons @@ -355,6 +355,9 @@ namespace svt void resumeTraveling( AccessGuard ); bool isTravelingSuspended() const; + protected: + TabPage* GetOrCreatePage( const WizardState i_nState ); + private: // long OnNextPage( PushButton* ); DECL_DLLPRIVATE_LINK(OnNextPage, PushButton*); @@ -363,6 +366,7 @@ namespace svt SVT_DLLPRIVATE void implResetDefault(Window* _pWindow); SVT_DLLPRIVATE void implUpdateTitle(); + SVT_DLLPRIVATE void implConstruct( const sal_uInt32 _nButtonFlags ); }; /// helper class to temporarily suspend any traveling in the wizard diff --git a/svtools/prj/build.lst b/svtools/prj/build.lst index 2645b9e6bf6a..a7d8569de301 100644 --- a/svtools/prj/build.lst +++ b/svtools/prj/build.lst @@ -23,8 +23,9 @@ st svtools\source\svrtf nmake - all st_rtf st_inc NULL st svtools\source\table nmake - all st_table st_inc NULL st svtools\source\toolpanel nmake - all st_toolpanel st_inc NULL st svtools\source\uno nmake - all st_uno st_inc NULL +st svtools\source\uno\wizard nmake - all st_uno_wiz st_inc NULL st svtools\source\urlobj nmake - all st__url st_inc NULL -st svtools\util nmake - all st_util st_svtgraphic st__brw st__ctr st_conf st_ctl st_dial st_edit st__misc st__url st_html st_papp st_rtf st_table st_toolpanel st_uno st_vfilt st_vigif st_vixbm st_vixpm st_vjpeg st_vwmf st_svtjava NULL +st svtools\util nmake - all st_util st_svtgraphic st__brw st__ctr st_conf st_ctl st_dial st_edit st__misc st__url st_html st_papp st_rtf st_table st_toolpanel st_uno st_uno_wiz st_vfilt st_vigif st_vixbm st_vixpm st_vjpeg st_vwmf st_svtjava NULL st svtools\source\hatchwindow nmake - all st_hatchwin st_inc NULL st svtools\source\productregistration nmake - all st_prodreg st_util st_inc NULL st svtools\workben\unodialog nmake - all st_workben_udlg st_util NULL diff --git a/svtools/source/dialogs/roadmapwizard.cxx b/svtools/source/dialogs/roadmapwizard.cxx index 9a03a9b16c2d..32a04bae7d5f 100644 --- a/svtools/source/dialogs/roadmapwizard.cxx +++ b/svtools/source/dialogs/roadmapwizard.cxx @@ -182,7 +182,45 @@ namespace svt ,m_pImpl( new RoadmapWizardImpl ) { DBG_CTOR( RoadmapWizard, CheckInvariants ); + impl_construct(); + } + + //-------------------------------------------------------------------- + RoadmapWizard::RoadmapWizard( Window* _pParent, const WinBits i_nStyle, sal_uInt32 _nButtonFlags ) + :OWizardMachine( _pParent, i_nStyle, _nButtonFlags ) + ,m_pImpl( new RoadmapWizardImpl ) + { + DBG_CTOR( RoadmapWizard, CheckInvariants ); + impl_construct(); + } + + namespace + { + void lcl_dump( const Window& i_rWindow, const size_t i_level ) + { + for ( size_t i=0; iGetWindow( WINDOW_NEXT ); + } + fflush( stderr ); + } + } + + //-------------------------------------------------------------------- + void RoadmapWizard::impl_construct() + { SetLeftAlignedButtonCount( 1 ); SetEmptyViewMargin(); @@ -534,6 +572,8 @@ namespace svt enableButtons( WZB_PREVIOUS, bHaveEnabledState ); implUpdateRoadmap(); + + lcl_dump( *this, 0 ); } //-------------------------------------------------------------------- diff --git a/svtools/source/dialogs/wizardmachine.cxx b/svtools/source/dialogs/wizardmachine.cxx index 3aaf279889d8..1d1293334a3a 100644 --- a/svtools/source/dialogs/wizardmachine.cxx +++ b/svtools/source/dialogs/wizardmachine.cxx @@ -160,6 +160,25 @@ namespace svt ,m_pPrevPage(NULL) ,m_pHelp(NULL) ,m_pImpl( new WizardMachineImplData ) + { + implConstruct( _nButtonFlags ); + } + + //--------------------------------------------------------------------- + OWizardMachine::OWizardMachine(Window* _pParent, const WinBits i_nStyle, sal_uInt32 _nButtonFlags ) + :WizardDialog( _pParent, i_nStyle ) + ,m_pFinish(NULL) + ,m_pCancel(NULL) + ,m_pNextPage(NULL) + ,m_pPrevPage(NULL) + ,m_pHelp(NULL) + ,m_pImpl( new WizardMachineImplData ) + { + implConstruct( _nButtonFlags ); + } + + //--------------------------------------------------------------------- + void OWizardMachine::implConstruct( const sal_uInt32 _nButtonFlags ) { m_pImpl->sTitleBase = GetText(); @@ -225,8 +244,6 @@ namespace svt AddButton( m_pCancel, WIZARDDIALOG_BUTTON_STDOFFSET_X ); } - - } //--------------------------------------------------------------------- @@ -274,35 +291,42 @@ namespace svt } //--------------------------------------------------------------------- - void OWizardMachine::ActivatePage() + TabPage* OWizardMachine::GetOrCreatePage( const WizardState i_nState ) { - WizardDialog::ActivatePage(); - - WizardState nCurrentLevel = GetCurLevel(); - if (NULL == GetPage(nCurrentLevel)) + if ( NULL == GetPage( i_nState ) ) { - TabPage* pNewPage = createPage(nCurrentLevel); - DBG_ASSERT(pNewPage, "OWizardMachine::ActivatePage: invalid new page (NULL)!"); + TabPage* pNewPage = createPage( i_nState ); + DBG_ASSERT( pNewPage, "OWizardMachine::GetOrCreatePage: invalid new page (NULL)!" ); // fill up the page sequence of our base class (with dummies) - while (m_pImpl->nFirstUnknownPage < nCurrentLevel) + while ( m_pImpl->nFirstUnknownPage < i_nState ) { - AddPage(NULL); + AddPage( NULL ); ++m_pImpl->nFirstUnknownPage; } - if (m_pImpl->nFirstUnknownPage == nCurrentLevel) + if ( m_pImpl->nFirstUnknownPage == i_nState ) { // encountered this page number the first time - AddPage(pNewPage); + AddPage( pNewPage ); ++m_pImpl->nFirstUnknownPage; } else // already had this page - just change it - SetPage(nCurrentLevel, pNewPage); + SetPage( i_nState, pNewPage ); } + return GetPage( i_nState ); + } + + //--------------------------------------------------------------------- + void OWizardMachine::ActivatePage() + { + WizardDialog::ActivatePage(); + + WizardState nCurrentLevel = GetCurLevel(); + GetOrCreatePage( nCurrentLevel ); - enterState(nCurrentLevel); + enterState( nCurrentLevel ); } //--------------------------------------------------------------------- diff --git a/svtools/source/uno/makefile.mk b/svtools/source/uno/makefile.mk index 4a52960f448c..d207b1effd97 100644 --- a/svtools/source/uno/makefile.mk +++ b/svtools/source/uno/makefile.mk @@ -52,7 +52,7 @@ SLOFILES= \ $(SLO)$/unoevent.obj \ $(SLO)$/unoiface.obj \ $(SLO)$/unoimap.obj \ - $(SLO)$/svtxgridcontrol.obj + $(SLO)$/svtxgridcontrol.obj # --- Targets ------------------------------------------------------ diff --git a/svtools/source/uno/miscservices.cxx b/svtools/source/uno/miscservices.cxx index 433c1e1acbcb..e16a1ecb56dc 100644 --- a/svtools/source/uno/miscservices.cxx +++ b/svtools/source/uno/miscservices.cxx @@ -38,10 +38,13 @@ #include #include "provider.hxx" #include "renderer.hxx" +#include "unowizard.hxx" #include #include "comphelper/servicedecl.hxx" +#include "cppuhelper/implementationentry.hxx" + using namespace ::com::sun::star::uno; using namespace ::com::sun::star::registry; using namespace ::com::sun::star::lang; @@ -67,6 +70,20 @@ extern sdecl::ServiceDecl const serviceDecl; Reference< XInterface > SAL_CALL ImplName##_CreateInstance( const Reference< XMultiServiceFactory >& ); \ } +namespace +{ + static struct ::cppu::ImplementationEntry s_aServiceEntries[] = + { + { + ::svt::uno::Wizard::Create, + ::svt::uno::Wizard::getImplementationName_static, + ::svt::uno::Wizard::getSupportedServiceNames_static, + ::cppu::createSingleComponentFactory, NULL, 0 + }, + { 0, 0, 0, 0, 0, 0 } + }; +} + // ------------------------------------------------------------------------------------- DECLARE_CREATEINSTANCE_NAMESPACE( svt, OAddressBookSourceDialogUno ) @@ -126,9 +143,9 @@ SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo ( xNewKey->createKey( aServices.getConstArray()[ i ] ); if ( !component_writeInfoHelper( reinterpret_cast< lang::XMultiServiceFactory* >( pServiceManager ), reinterpret_cast< registry::XRegistryKey* >( _pRegistryKey ), serviceDecl ) ) - return false; + return false; - return sal_True; + return ::cppu::component_writeInfoHelper( pServiceManager, _pRegistryKey, s_aServiceEntries ); } return sal_False; } @@ -185,6 +202,8 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory ( else { pResult = component_getFactoryHelper( pImplementationName, reinterpret_cast< lang::XMultiServiceFactory * >( _pServiceManager ),reinterpret_cast< registry::XRegistryKey* >( pRegistryKey ), serviceDecl ); + if ( !pResult ) + pResult = ::cppu::component_getFactoryHelper( pImplementationName, _pServiceManager, pRegistryKey, s_aServiceEntries ); } if ( xFactory.is() ) diff --git a/svtools/source/uno/unowizard.hxx b/svtools/source/uno/unowizard.hxx new file mode 100644 index 000000000000..cf09646a690e --- /dev/null +++ b/svtools/source/uno/unowizard.hxx @@ -0,0 +1,111 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef SVT_UNO_WIZARD_HXX +#define SVT_UNO_WIZARD_HXX + +#include "svtools/genericunodialog.hxx" + +/** === begin UNO includes === **/ +#include +#include +#include +/** === end UNO includes === **/ + +#include +#include + +//...................................................................................................................... +namespace svt { namespace uno +{ +//...................................................................................................................... + + //================================================================================================================== + //= Wizard - declaration + //================================================================================================================== + typedef ::cppu::ImplInheritanceHelper1 < ::svt::OGenericUnoDialog + , ::com::sun::star::ui::dialogs::XWizard + > Wizard_Base; + class Wizard; + typedef ::comphelper::OPropertyArrayUsageHelper< Wizard > Wizard_PBase; + class Wizard : public Wizard_Base + , public Wizard_PBase + { + public: + Wizard( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& i_rContext ); + + // ::com::sun::star::lang::XServiceInfo - static version + static ::rtl::OUString SAL_CALL getImplementationName_static() throw(::com::sun::star::uno::RuntimeException); + static ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames_static() throw(::com::sun::star::uno::RuntimeException); + static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL Create( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& i_rContext ); + + protected: + // ::com::sun::star::lang::XServiceInfo + virtual ::rtl::OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException); + + // ::com::sun::star::beans::XPropertySet + virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() throw(::com::sun::star::uno::RuntimeException); + virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); + + // OPropertyArrayUsageHelper + virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const; + + // ::com::sun::star::ui::dialogs::XWizard + virtual void SAL_CALL enableButton( ::sal_Int16 WizardButton, ::sal_Bool Enable ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setDefaultButton( ::sal_Int16 WizardButton ) throw (::com::sun::star::uno::RuntimeException); + virtual ::sal_Bool SAL_CALL travelNext( ) throw (::com::sun::star::uno::RuntimeException); + virtual ::sal_Bool SAL_CALL travelPrevious( ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL updateTravelUI( ) throw (::com::sun::star::uno::RuntimeException); + virtual ::sal_Bool SAL_CALL advanceTo( ::sal_Int16 PageId ) throw (::com::sun::star::uno::RuntimeException); + virtual ::sal_Bool SAL_CALL goBackTo( ::sal_Int16 PageId ) throw (::com::sun::star::uno::RuntimeException); + virtual ::sal_Int16 SAL_CALL getCurrentPage( ) throw (::com::sun::star::uno::RuntimeException); + + // ::com::sun::star::ui::dialogs::XExecutableDialog + virtual void SAL_CALL setTitle( const ::rtl::OUString& aTitle ) throw (::com::sun::star::uno::RuntimeException); + virtual ::sal_Int16 SAL_CALL execute( ) throw (::com::sun::star::uno::RuntimeException); + + // ::com::sun::star::lang::XInitialization + virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException); + + protected: + ~Wizard(); + + protected: + virtual Dialog* createDialog( Window* _pParent ); + virtual void destroyDialog(); + + private: + ::comphelper::ComponentContext m_aContext; + ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< sal_Int16 > > m_aWizardSteps; + ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XWizardController > m_xController; + }; + +//...................................................................................................................... +} } // namespace svt::uno +//...................................................................................................................... + +#endif // SVT_UNO_WIZARD_HXX diff --git a/svtools/source/uno/wizard/makefile.mk b/svtools/source/uno/wizard/makefile.mk new file mode 100644 index 000000000000..2beef5060475 --- /dev/null +++ b/svtools/source/uno/wizard/makefile.mk @@ -0,0 +1,48 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +PRJ=../../.. + +PRJNAME=svtools +TARGET=unowiz +ENABLE_EXCEPTIONS=TRUE + +# --- Settings ----------------------------------------------------- + +.INCLUDE : settings.mk +.INCLUDE : $(PRJ)$/util$/svt.pmk + +# --- Files -------------------------------------------------------- + +SLOFILES= \ + $(SLO)$/unowizard.obj \ + $(SLO)$/wizardshell.obj \ + $(SLO)$/wizardpageshell.obj + +# --- Targets ------------------------------------------------------ + +.INCLUDE : target.mk diff --git a/svtools/source/uno/wizard/unowizard.cxx b/svtools/source/uno/wizard/unowizard.cxx new file mode 100644 index 000000000000..b832162ef92f --- /dev/null +++ b/svtools/source/uno/wizard/unowizard.cxx @@ -0,0 +1,374 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#include "precompiled_svtools.hxx" + +#include "../unowizard.hxx" +#include "wizardshell.hxx" + +/** === begin UNO includes === **/ +#include +#include +#include +#include +#include +#include +/** === end UNO includes === **/ + +#include +#include +#include +#include + +//...................................................................................................................... +namespace svt { namespace uno +{ +//...................................................................................................................... + + /** === begin UNO using === **/ + using ::com::sun::star::uno::Reference; + using ::com::sun::star::uno::XInterface; + using ::com::sun::star::uno::UNO_QUERY; + using ::com::sun::star::uno::UNO_QUERY_THROW; + using ::com::sun::star::uno::UNO_SET_THROW; + using ::com::sun::star::uno::Exception; + using ::com::sun::star::uno::RuntimeException; + using ::com::sun::star::uno::Any; + using ::com::sun::star::uno::makeAny; + using ::com::sun::star::uno::Sequence; + using ::com::sun::star::uno::Type; + using ::com::sun::star::lang::XServiceInfo; + using ::com::sun::star::ui::dialogs::XWizard; + using ::com::sun::star::lang::XInitialization; + using ::com::sun::star::beans::XPropertySetInfo; + using ::com::sun::star::uno::XComponentContext; + using ::com::sun::star::beans::Property; + using ::com::sun::star::lang::IllegalArgumentException; + using ::com::sun::star::ucb::AlreadyInitializedException; + using ::com::sun::star::ui::dialogs::XWizardController; + /** === end UNO using === **/ + namespace WizardButton = ::com::sun::star::ui::dialogs::WizardButton; + + //------------------------------------------------------------------------------------------------------------------ + namespace + { + sal_uInt32 lcl_convertWizardButtonToWZB( const sal_Int16 i_nWizardButton ) + { + switch ( i_nWizardButton ) + { + case WizardButton::NEXT: return WZB_NEXT; + case WizardButton::PREVIOUS: return WZB_PREVIOUS; + case WizardButton::FINISH: return WZB_FINISH; + case WizardButton::CANCEL: return WZB_CANCEL; + case WizardButton::HELP: return WZB_HELP; + } + OSL_ENSURE( false, "lcl_convertWizardButtonToWZB: invalid WizardButton constant!" ); + return 0; + } + } + + //================================================================================================================== + //= Wizard - implementation + //================================================================================================================== + //------------------------------------------------------------------------------------------------------------------ + Wizard::Wizard( const Reference< XComponentContext >& _rxContext ) + :Wizard_Base( _rxContext ) + ,m_aContext( _rxContext ) + { + } + + //-------------------------------------------------------------------- + Wizard::~Wizard() + { + // we do this here cause the base class' call to destroyDialog won't reach us anymore : we're within an dtor, + // so this virtual-method-call the base class does does not work, we're already dead then ... + if ( m_pDialog ) + { + ::osl::MutexGuard aGuard( m_aMutex ); + if ( m_pDialog ) + destroyDialog(); + } + } + + //-------------------------------------------------------------------- + Reference< XInterface > SAL_CALL Wizard::Create( const Reference< XComponentContext >& _rxContext ) + { + return *(new Wizard( _rxContext ) ); + } + + //-------------------------------------------------------------------- + namespace + { + static void lcl_checkPaths( const Sequence< Sequence< sal_Int16 > >& i_rPaths, const Reference< XInterface >& i_rContext ) + { + // need at least one path + if ( i_rPaths.getLength() == 0 ) + throw IllegalArgumentException( ::rtl::OUString(), i_rContext, 2 ); + + // each path must be of length 1, at least + for ( sal_Int32 i = 0; i < i_rPaths.getLength(); ++i ) + { + if ( i_rPaths[i].getLength() == 0 ) + throw IllegalArgumentException( ::rtl::OUString(), i_rContext, 2 ); + + // page IDs must be in ascending order + sal_Int16 nPreviousPageID = i_rPaths[i][0]; + for ( sal_Int32 j=1; j& i_Arguments ) throw (Exception, RuntimeException) + { + ::osl::MutexGuard aGuard( m_aMutex ); + if ( m_bInitialized ) + throw AlreadyInitializedException( ::rtl::OUString(), *this ); + + if ( i_Arguments.getLength() != 2 ) + throw IllegalArgumentException( ::rtl::OUString(), *this, -1 ); + + // the second argument must be a XWizardController, for each constructor + m_xController.set( i_Arguments[1], UNO_QUERY ); + if ( !m_xController.is() ) + throw IllegalArgumentException( ::rtl::OUString(), *this, 2 ); + + // the first arg is either a single path (short[]), or multiple paths (short[][]) + Sequence< sal_Int16 > aSinglePath; + i_Arguments[0] >>= aSinglePath; + Sequence< Sequence< sal_Int16 > > aMultiplePaths; + i_Arguments[0] >>= aMultiplePaths; + + if ( !aMultiplePaths.getLength() ) + { + aMultiplePaths.realloc(1); + aMultiplePaths[0] = aSinglePath; + } + lcl_checkPaths( aMultiplePaths, *this ); + // if we survived this, the paths are valid, and we're done here ... + m_aWizardSteps = aMultiplePaths; + + m_bInitialized = true; + } + + //-------------------------------------------------------------------- + Dialog* Wizard::createDialog( Window* i_pParent ) + { + return new WizardShell( i_pParent, this, m_xController, m_aWizardSteps ); + } + + //-------------------------------------------------------------------- + void Wizard::destroyDialog() + { + Wizard_Base::destroyDialog(); + } + + //-------------------------------------------------------------------- + ::rtl::OUString SAL_CALL Wizard::getImplementationName_static() throw(RuntimeException) + { + return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.svtools.uno.Wizard" ) ); + } + + //-------------------------------------------------------------------- + Sequence< ::rtl::OUString > SAL_CALL Wizard::getSupportedServiceNames_static() throw(RuntimeException) + { + Sequence< ::rtl::OUString > aServices(1); + aServices[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.dialogs.Wizard" ) ); + return aServices; + } + + //-------------------------------------------------------------------- + ::rtl::OUString SAL_CALL Wizard::getImplementationName() throw(RuntimeException) + { + return getImplementationName_static(); + } + + //-------------------------------------------------------------------- + Sequence< ::rtl::OUString > SAL_CALL Wizard::getSupportedServiceNames() throw(RuntimeException) + { + return getSupportedServiceNames_static(); + } + + //-------------------------------------------------------------------- + Reference< XPropertySetInfo > SAL_CALL Wizard::getPropertySetInfo() throw(RuntimeException) + { + return createPropertySetInfo( getInfoHelper() ); + } + + //-------------------------------------------------------------------- + ::cppu::IPropertyArrayHelper& SAL_CALL Wizard::getInfoHelper() + { + return *const_cast< Wizard* >( this )->getArrayHelper(); + } + + //-------------------------------------------------------------------- + ::cppu::IPropertyArrayHelper* Wizard::createArrayHelper( ) const + { + Sequence< Property > aProps; + describeProperties( aProps ); + return new ::cppu::OPropertyArrayHelper( aProps ); + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL Wizard::enableButton( ::sal_Int16 i_WizardButton, ::sal_Bool i_Enable ) throw (RuntimeException) + { + ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + ::osl::MutexGuard aGuard( m_aMutex ); + + WizardShell* pWizardImpl = dynamic_cast< WizardShell* >( m_pDialog ); + ENSURE_OR_RETURN_VOID( pWizardImpl, "Wizard::enableButtons: invalid dialog implementation!" ); + + pWizardImpl->enableButtons( lcl_convertWizardButtonToWZB( i_WizardButton ), i_Enable ); + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL Wizard::setDefaultButton( ::sal_Int16 i_WizardButton ) throw (RuntimeException) + { + ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + ::osl::MutexGuard aGuard( m_aMutex ); + + WizardShell* pWizardImpl = dynamic_cast< WizardShell* >( m_pDialog ); + ENSURE_OR_RETURN_VOID( pWizardImpl, "Wizard::setDefaultButton: invalid dialog implementation!" ); + + pWizardImpl->defaultButton( lcl_convertWizardButtonToWZB( i_WizardButton ) ); + } + + //------------------------------------------------------------------------------------------------------------------ + sal_Bool SAL_CALL Wizard::travelNext( ) throw (RuntimeException) + { + ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + ::osl::MutexGuard aGuard( m_aMutex ); + + WizardShell* pWizardImpl = dynamic_cast< WizardShell* >( m_pDialog ); + ENSURE_OR_RETURN_FALSE( pWizardImpl, "Wizard::travelNext: invalid dialog implementation!" ); + + return pWizardImpl->travelNext(); + } + + //------------------------------------------------------------------------------------------------------------------ + sal_Bool SAL_CALL Wizard::travelPrevious( ) throw (RuntimeException) + { + ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + ::osl::MutexGuard aGuard( m_aMutex ); + + WizardShell* pWizardImpl = dynamic_cast< WizardShell* >( m_pDialog ); + ENSURE_OR_RETURN_FALSE( pWizardImpl, "Wizard::travelPrevious: invalid dialog implementation!" ); + + return pWizardImpl->travelPrevious(); + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL Wizard::updateTravelUI( ) throw (RuntimeException) + { + ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + ::osl::MutexGuard aGuard( m_aMutex ); + + WizardShell* pWizardImpl = dynamic_cast< WizardShell* >( m_pDialog ); + ENSURE_OR_RETURN_VOID( pWizardImpl, "Wizard::updateTravelUI: invalid dialog implementation!" ); + + pWizardImpl->updateTravelUI(); + } + + //------------------------------------------------------------------------------------------------------------------ + ::sal_Bool SAL_CALL Wizard::advanceTo( ::sal_Int16 i_PageId ) throw (RuntimeException) + { + ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + ::osl::MutexGuard aGuard( m_aMutex ); + + WizardShell* pWizardImpl = dynamic_cast< WizardShell* >( m_pDialog ); + ENSURE_OR_RETURN_FALSE( pWizardImpl, "Wizard::advanceTo: invalid dialog implementation!" ); + + return pWizardImpl->advanceTo( i_PageId ); + } + + //------------------------------------------------------------------------------------------------------------------ + ::sal_Bool SAL_CALL Wizard::goBackTo( ::sal_Int16 i_PageId ) throw (RuntimeException) + { + ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + ::osl::MutexGuard aGuard( m_aMutex ); + + WizardShell* pWizardImpl = dynamic_cast< WizardShell* >( m_pDialog ); + ENSURE_OR_RETURN_FALSE( pWizardImpl, "Wizard::goBackTo: invalid dialog implementation!" ); + + return pWizardImpl->goBackTo( i_PageId ); + } + + //------------------------------------------------------------------------------------------------------------------ + ::sal_Int16 SAL_CALL Wizard::getCurrentPage( ) throw (RuntimeException) + { + ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + ::osl::MutexGuard aGuard( m_aMutex ); + + WizardShell* pWizardImpl = dynamic_cast< WizardShell* >( m_pDialog ); + ENSURE_OR_RETURN_FALSE( pWizardImpl, "Wizard::getCurrentPage: invalid dialog implementation!" ); + + return pWizardImpl->getCurrentPage(); + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL Wizard::setTitle( const ::rtl::OUString& i_Title ) throw (RuntimeException) + { + // simply disambiguate + Wizard_Base::OGenericUnoDialog::setTitle( i_Title ); + } + + //------------------------------------------------------------------------------------------------------------------ + ::sal_Int16 SAL_CALL Wizard::execute( ) throw (RuntimeException) + { + // simply disambiguate + return Wizard_Base::OGenericUnoDialog::execute(); + } + +//...................................................................................................................... +} } // namespace svt::uno +//...................................................................................................................... diff --git a/svtools/source/uno/wizard/wizardpageshell.cxx b/svtools/source/uno/wizard/wizardpageshell.cxx new file mode 100644 index 000000000000..f75efe05da3d --- /dev/null +++ b/svtools/source/uno/wizard/wizardpageshell.cxx @@ -0,0 +1,170 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#include "precompiled_svtools.hxx" + +#include "wizardpageshell.hxx" +#include "wizardshell.hxx" + +/** === begin UNO includes === **/ +#include +/** === end UNO includes === **/ + +#include + +//...................................................................................................................... +namespace svt { namespace uno +{ +//...................................................................................................................... + + /** === begin UNO using === **/ + using ::com::sun::star::uno::Reference; + using ::com::sun::star::uno::XInterface; + using ::com::sun::star::uno::UNO_QUERY; + using ::com::sun::star::uno::UNO_QUERY_THROW; + using ::com::sun::star::uno::UNO_SET_THROW; + using ::com::sun::star::uno::Exception; + using ::com::sun::star::uno::RuntimeException; + using ::com::sun::star::uno::Any; + using ::com::sun::star::uno::makeAny; + using ::com::sun::star::uno::Sequence; + using ::com::sun::star::uno::Type; + using ::com::sun::star::ui::dialogs::XWizardController; + using ::com::sun::star::awt::XWindow; + using ::com::sun::star::lang::XComponent; + /** === end UNO using === **/ + using namespace ::com::sun::star; + + //================================================================================================================== + //= WizardPageShell + //================================================================================================================== + //------------------------------------------------------------------------------------------------------------------ + WizardPageShell::WizardPageShell( WizardShell& i_rParent, const Reference< XWizardController >& i_rController, + const sal_Int16 i_nPageId ) + :OWizardPage( &i_rParent, WB_CHILDDLGCTRL | WB_NODIALOGCONTROL ) + ,m_xController( i_rController ) + ,m_xWizardPage() + ,m_nPageId( i_nPageId ) + { + ENSURE_OR_THROW( m_xController.is(), "no controller" ); + try + { + m_xWizardPage.set( m_xController->createPage( + Reference< XWindow >( GetComponentInterface( TRUE ), UNO_QUERY_THROW ), + m_nPageId + ), UNO_SET_THROW ); + + Reference< XWindow > xPageWindow( m_xWizardPage->getWindow(), UNO_SET_THROW ); + + awt::Rectangle aContentRect( xPageWindow->getPosSize() ); + SetSizePixel( Size( aContentRect.X + aContentRect.Width, aContentRect.Y + aContentRect.Height ) ); + + xPageWindow->setVisible( sal_True ); + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } + + Show(); + } + + //------------------------------------------------------------------------------------------------------------------ + WizardPageShell::~WizardPageShell() + { + try + { + if ( m_xWizardPage.is() ) + m_xWizardPage->dispose(); + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } + } + + //------------------------------------------------------------------------------------------------------------------ + void WizardPageShell::initializePage() + { + OWizardPage::initializePage(); + if ( !m_xWizardPage.is() ) + return; + + try + { + m_xWizardPage->activatePage(); + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } + } + + //------------------------------------------------------------------------------------------------------------------ + sal_Bool WizardPageShell::commitPage( CommitPageReason i_eReason ) + { + if ( !OWizardPage::commitPage( i_eReason ) ) + return sal_False; + + if ( !m_xWizardPage.is() ) + return sal_True; + + try + { + return m_xWizardPage->commitPage( WizardShell::convertCommitReasonToTravelType( i_eReason ) ); + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } + + return sal_True; + } + + //------------------------------------------------------------------------------------------------------------------ + bool WizardPageShell::canAdvance() const + { + if ( !OWizardPage::canAdvance() ) + return false; + + if ( !m_xWizardPage.is() ) + return true; + + try + { + return m_xWizardPage->canAdvance(); + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } + + return true; + } + +//...................................................................................................................... +} } // namespace svt::uno +//...................................................................................................................... diff --git a/svtools/source/uno/wizard/wizardpageshell.hxx b/svtools/source/uno/wizard/wizardpageshell.hxx new file mode 100644 index 000000000000..8f36a19c0fe4 --- /dev/null +++ b/svtools/source/uno/wizard/wizardpageshell.hxx @@ -0,0 +1,73 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef SVT_UNOWIZ_WIZARDPAGESHELL_HXX +#define SVT_UNOWIZ_WIZARDPAGESHELL_HXX + +#include "svtools/wizardmachine.hxx" + +/** === begin UNO includes === **/ +#include +/** === end UNO includes === **/ + +//...................................................................................................................... +namespace svt { namespace uno +{ +//...................................................................................................................... + + class WizardShell; + + //================================================================================================================== + //= WizardPageShell + //================================================================================================================== + class WizardPageShell : public OWizardPage + { + public: + WizardPageShell( + WizardShell& i_rParent, + const ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XWizardController >& i_rController, + const sal_Int16 i_nPageId + ); + ~WizardPageShell(); + + // IWizardPage overridables + virtual void initializePage(); + virtual sal_Bool commitPage( CommitPageReason _eReason ); + + // OWizardPage overridables (why isn't this method part of IWizardPage?) + virtual bool canAdvance() const; + + private: + const ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XWizardController > m_xController; + ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XWizardPage > m_xWizardPage; + const sal_Int16 m_nPageId; + }; + +//...................................................................................................................... +} } // namespace svt::uno +//...................................................................................................................... + +#endif // SVT_UNOWIZ_WIZARDPAGESHELL_HXX diff --git a/svtools/source/uno/wizard/wizardshell.cxx b/svtools/source/uno/wizard/wizardshell.cxx new file mode 100644 index 000000000000..859ab38a3f3a --- /dev/null +++ b/svtools/source/uno/wizard/wizardshell.cxx @@ -0,0 +1,251 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#include "precompiled_svtools.hxx" + +#include "wizardshell.hxx" +#include "wizardpageshell.hxx" + +#include + +/** === begin UNO includes === **/ +#include +/** === end UNO includes === **/ + +#include + +//...................................................................................................................... +namespace svt { namespace uno +{ +//...................................................................................................................... + + /** === begin UNO using === **/ + using ::com::sun::star::uno::Reference; + using ::com::sun::star::uno::XInterface; + using ::com::sun::star::uno::UNO_QUERY; + using ::com::sun::star::uno::UNO_QUERY_THROW; + using ::com::sun::star::uno::UNO_SET_THROW; + using ::com::sun::star::uno::Exception; + using ::com::sun::star::uno::RuntimeException; + using ::com::sun::star::uno::Any; + using ::com::sun::star::uno::makeAny; + using ::com::sun::star::uno::Sequence; + using ::com::sun::star::uno::Type; + using ::com::sun::star::ui::dialogs::XWizardController; + using ::com::sun::star::ui::dialogs::XWizard; + /** === end UNO using === **/ + namespace WizardTravelType = ::com::sun::star::ui::dialogs::WizardTravelType; + + //================================================================================================================== + namespace + { + //-------------------------------------------------------------------------------------------------------------- + sal_Int16 lcl_determineFirstPageID( const Sequence< Sequence< sal_Int16 > >& i_rPaths ) + { + ENSURE_OR_THROW( ( i_rPaths.getLength() > 0 ) && ( i_rPaths[0].getLength() > 0 ), "illegal paths" ); + return i_rPaths[0][0]; + } + } + + //================================================================================================================== + //= WizardShell + //================================================================================================================== + //------------------------------------------------------------------------------------------------------------------ + WizardShell::WizardShell( Window* i_pParent, const Reference< XWizard >& i_rWizard, const Reference< XWizardController >& i_rController, + const Sequence< Sequence< sal_Int16 > >& i_rPaths ) + :WizardShell_Base( i_pParent, WB_MOVEABLE | WB_CLOSEABLE ) + ,m_xWizard( i_rWizard ) + ,m_xController( i_rController ) + ,m_nFirstPageID( lcl_determineFirstPageID( i_rPaths ) ) + { + ENSURE_OR_THROW( m_xWizard.is() && m_xController.is(), "invalid wizard/controller" ); + + // declare the paths + for ( sal_Int32 i=0; i& rPath( i_rPaths[i] ); + WizardPath aPath( rPath.getLength() ); + for ( sal_Int32 j=0; jGetSizePixel() ); + + // some defaults + ShowButtonFixedLine( true ); + SetRoadmapInteractive( true ); + enableAutomaticNextButtonState(); + + // activate the first page + ActivatePage(); + } + + //------------------------------------------------------------------------------------------------------------------ + WizardShell::~WizardShell() + { + } + + //------------------------------------------------------------------------------------------------------------------ + sal_Int16 WizardShell::convertCommitReasonToTravelType( const CommitPageReason i_eReason ) + { + switch ( i_eReason ) + { + case WizardTypes::eTravelForward: + return WizardTravelType::FORWARD; + + case WizardTypes::eTravelBackward: + return WizardTravelType::BACKWARD; + + case WizardTypes::eFinish: + return WizardTravelType::FINISH; + } + OSL_ENSURE( false, "WizardShell::convertCommitReasonToTravelType: unsupported CommitPageReason!" ); + return WizardTravelType::FINISH; + } + + //------------------------------------------------------------------------------------------------------------------ + void WizardShell::enterState( WizardState i_nState ) + { + WizardShell_Base::enterState( i_nState ); + + if ( !m_xController.is() ) + return; + + try + { + m_xController->onActivatePage( impl_stateToPageId( i_nState ) ); + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } + } + + //------------------------------------------------------------------------------------------------------------------ + sal_Bool WizardShell::prepareLeaveCurrentState( CommitPageReason i_eReason ) + { + if ( !WizardShell_Base::prepareLeaveCurrentState( i_eReason ) ) + return sal_False; + + if ( !m_xController.is() ) + return sal_True; + + try + { + return m_xController->confirmDeactivatePage( + impl_stateToPageId( getCurrentState() ), + convertCommitReasonToTravelType( i_eReason ) + ); + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } + + return sal_True; + } + + //------------------------------------------------------------------------------------------------------------------ + sal_Bool WizardShell::leaveState( WizardState i_nState ) + { + if ( !WizardShell_Base::leaveState( i_nState ) ) + return sal_False; + + if ( !m_xController.is() ) + return sal_True; + + try + { + m_xController->onDeactivatePage( impl_stateToPageId( i_nState ) ); + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } + + return sal_True; + } + + //------------------------------------------------------------------------------------------------------------------ + TabPage* WizardShell::createPage( WizardState i_nState ) + { + ENSURE_OR_RETURN( m_xController.is(), "WizardShell::createPage: no WizardController!", NULL ); + return new WizardPageShell( *this, m_xController, impl_stateToPageId( i_nState ) ); + } + + //------------------------------------------------------------------------------------------------------------------ + String WizardShell::getStateDisplayName( WizardState i_nState ) const + { + try + { + if ( m_xController.is() ) + return m_xController->getPageTitle( impl_stateToPageId( i_nState ) ); + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } + return String::CreateFromInt32( i_nState ); + } + + //------------------------------------------------------------------------------------------------------------------ + bool WizardShell::canAdvance() const + { + try + { + if ( m_xController.is() && !m_xController->canAdvance() ) + return false; + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } + + return WizardShell_Base::canAdvance(); + } + + //------------------------------------------------------------------------------------------------------------------ + sal_Bool WizardShell::onFinish( sal_Int32 i_nResult ) + { + try + { + if ( ( i_nResult == RET_OK ) && m_xController.is() && !m_xController->confirmFinish() ) + return sal_False; + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } + + return WizardShell_Base::onFinish( i_nResult ); + } + +//...................................................................................................................... +} } // namespace svt::uno +//...................................................................................................................... diff --git a/svtools/source/uno/wizard/wizardshell.hxx b/svtools/source/uno/wizard/wizardshell.hxx new file mode 100644 index 000000000000..0d2ba7836ebc --- /dev/null +++ b/svtools/source/uno/wizard/wizardshell.hxx @@ -0,0 +1,115 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef SVT_UNO_WIZARD_SHELL +#define SVT_UNO_WIZARD_SHELL + +/** === begin UNO includes === **/ +#include +#include +/** === end UNO includes === **/ + +#include + +//...................................................................................................................... +namespace svt { namespace uno +{ +//...................................................................................................................... + + //================================================================================================================== + //= WizardShell + //================================================================================================================== + typedef ::svt::RoadmapWizard WizardShell_Base; + class WizardShell : public WizardShell_Base + { + public: + WizardShell( + Window* _pParent, + const ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XWizard >& i_rWizard, + const ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XWizardController >& i_rController, + const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< sal_Int16 > >& i_rPaths + ); + virtual ~WizardShell(); + + // OWizardMachine overridables + virtual TabPage* createPage( WizardState i_nState ); + virtual void enterState( WizardState i_nState ); + virtual sal_Bool prepareLeaveCurrentState( CommitPageReason _eReason ); + virtual sal_Bool leaveState( WizardState i_nState ); + virtual String getStateDisplayName( WizardState i_nState ) const; + virtual bool canAdvance() const; + virtual sal_Bool onFinish( sal_Int32 _nResult ); + + // attribute access + const ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XWizard >& + getWizard() const { return m_xWizard; } + + static sal_Int16 convertCommitReasonToTravelType( const CommitPageReason i_eReason ); + + // operations + sal_Bool advanceTo( const sal_Int16 i_nPageId ) + { + return skipUntil( impl_pageIdToState( i_nPageId ) ); + } + sal_Bool goBackTo( const sal_Int16 i_nPageId ) + { + return skipBackwardUntil( impl_pageIdToState( i_nPageId ) ); + } + sal_Int16 getCurrentPage() const + { + return impl_stateToPageId( getCurrentState() ); + } + sal_Bool travelNext() { return WizardShell_Base::travelNext(); } + sal_Bool travelPrevious() { return WizardShell_Base::travelPrevious(); } + + private: + sal_Int16 impl_stateToPageId( const WizardTypes::WizardState i_nState ) const + { + return static_cast< sal_Int16 >( i_nState + m_nFirstPageID ); + } + + WizardState impl_pageIdToState( const sal_Int16 i_nPageId ) const + { + return static_cast< WizardState >( i_nPageId - m_nFirstPageID ); + } + + // prevent outside access to some base class members + using WizardShell_Base::skip; + using WizardShell_Base::skipUntil; + using WizardShell_Base::skipBackwardUntil; + using WizardShell_Base::getCurrentState; + + private: + const ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XWizard > m_xWizard; + const ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XWizardController > m_xController; + const sal_Int16 m_nFirstPageID; + }; + +//...................................................................................................................... +} } // namespace svt::uno +//...................................................................................................................... + +#endif // SVT_UNO_WIZARD_SHELL diff --git a/svtools/util/makefile.mk b/svtools/util/makefile.mk index 0040b1d1ee65..f9c14a540410 100644 --- a/svtools/util/makefile.mk +++ b/svtools/util/makefile.mk @@ -71,6 +71,7 @@ LIB1FILES= \ $(SLB)/svrtf.lib \ $(SLB)/table.lib \ $(SLB)/unoiface.lib \ + $(SLB)/unowiz.lib \ $(SLB)/urlobj.lib \ $(SLB)/toolpanel.lib -- cgit v1.2.3 From 3edcb9564ce9b11d75f76eff6c2eef7f830803ba Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Thu, 20 May 2010 12:45:50 +0200 Subject: unoawt: UNO API for generic wizards, wrapping around the existing C++ RoadmapWizard --- offapi/com/sun/star/ui/dialogs/Wizard.idl | 75 +++++++++++++++++++ offapi/com/sun/star/ui/dialogs/WizardButton.idl | 53 ++++++++++++++ .../com/sun/star/ui/dialogs/WizardTravelType.idl | 51 +++++++++++++ offapi/com/sun/star/ui/dialogs/XWizard.idl | 72 +++++++++++++++++++ .../com/sun/star/ui/dialogs/XWizardController.idl | 75 +++++++++++++++++++ offapi/com/sun/star/ui/dialogs/XWizardPage.idl | 83 ++++++++++++++++++++++ offapi/com/sun/star/ui/dialogs/makefile.mk | 8 ++- 7 files changed, 416 insertions(+), 1 deletion(-) create mode 100644 offapi/com/sun/star/ui/dialogs/Wizard.idl create mode 100644 offapi/com/sun/star/ui/dialogs/WizardButton.idl create mode 100644 offapi/com/sun/star/ui/dialogs/WizardTravelType.idl create mode 100644 offapi/com/sun/star/ui/dialogs/XWizard.idl create mode 100644 offapi/com/sun/star/ui/dialogs/XWizardController.idl create mode 100644 offapi/com/sun/star/ui/dialogs/XWizardPage.idl diff --git a/offapi/com/sun/star/ui/dialogs/Wizard.idl b/offapi/com/sun/star/ui/dialogs/Wizard.idl new file mode 100644 index 000000000000..36c0f17dedb5 --- /dev/null +++ b/offapi/com/sun/star/ui/dialogs/Wizard.idl @@ -0,0 +1,75 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef __com_sun_star_ui_dialogs_Wizard_idl__ +#define __com_sun_star_ui_dialogs_Wizard_idl__ + +#include +#include + +//================================================================================================================== + +module com { module sun { module star { module ui { module dialogs { + +interface XWizardController; + +//================================================================================================================== + +/** + */ +service Wizard : XWizard +{ + /** creates a wizard with a single execution path + @param PageIds + the IDs of the pages which constitute the execution path. IDs must be in ascending order. + */ + createSinglePathWizard( + [in] sequence< short > PageIds, + [in] XWizardController Controller + ) + raises ( ::com::sun::star::lang::IllegalArgumentException + ); + + /** creates a wizard with a multiple possible execution paths + + @param PageIds + the IDs of the pages which constitute the execution paths. IDs in each path must be in ascending order. + */ + createMultiplePathsWizard( + [in] sequence< sequence< short > > PageIds, + [in] XWizardController Controller + ) + raises ( ::com::sun::star::lang::IllegalArgumentException + ); +}; + +//================================================================================================================== + +}; }; }; }; }; + +//================================================================================================================== + +#endif diff --git a/offapi/com/sun/star/ui/dialogs/WizardButton.idl b/offapi/com/sun/star/ui/dialogs/WizardButton.idl new file mode 100644 index 000000000000..3169adeab95c --- /dev/null +++ b/offapi/com/sun/star/ui/dialogs/WizardButton.idl @@ -0,0 +1,53 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef __com_sun_star_ui_dialogs_WizardButton_idl__ +#define __com_sun_star_ui_dialogs_WizardButton_idl__ + +//================================================================================================================== + +module com { module sun { module star { module ui { module dialogs { + +//================================================================================================================== + +/** + */ +constants WizardButton +{ + const short NEXT = 1; + const short PREVIOUS = 2; + const short FINISH = 3; + const short CANCEL = 4; + const short HELP = 5; +}; + +//================================================================================================================== + +}; }; }; }; }; + +//================================================================================================================== + +#endif diff --git a/offapi/com/sun/star/ui/dialogs/WizardTravelType.idl b/offapi/com/sun/star/ui/dialogs/WizardTravelType.idl new file mode 100644 index 000000000000..9efd822ffe33 --- /dev/null +++ b/offapi/com/sun/star/ui/dialogs/WizardTravelType.idl @@ -0,0 +1,51 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef __com_sun_star_ui_dialogs_WizardTravelType_idl__ +#define __com_sun_star_ui_dialogs_WizardTravelType_idl__ + +//================================================================================================================== + +module com { module sun { module star { module ui { module dialogs { + +//================================================================================================================== + +/** + */ +constants WizardTravelType +{ + const short FORWARD = 1; + const short BACKWARD = 2; + const short FINISH = 3; +}; + +//================================================================================================================== + +}; }; }; }; }; + +//================================================================================================================== + +#endif diff --git a/offapi/com/sun/star/ui/dialogs/XWizard.idl b/offapi/com/sun/star/ui/dialogs/XWizard.idl new file mode 100644 index 000000000000..76b4af66ffa1 --- /dev/null +++ b/offapi/com/sun/star/ui/dialogs/XWizard.idl @@ -0,0 +1,72 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef __com_sun_star_ui_dialogs_XWizard_idl__ +#define __com_sun_star_ui_dialogs_XWizard_idl__ + +#include + +//================================================================================================================== + +module com { module sun { module star { module ui { module dialogs { + +//================================================================================================================== + +/** + */ +interface XWizard +{ + interface XExecutableDialog; + + void enableButton( [in] short WizardButton, [in] boolean Enable ); + void setDefaultButton( [in] short WizardButton ); + + boolean travelNext(); + boolean travelPrevious(); + + /** updates the wizard elements which are related to traveling. + +

For instance, the Next button is disabled if the current page's XWizardPage::canAdvance + method returns .

+ +

You usually call this method from within a wizard page whose state changed in a way that it affects the + user's ability to reach other pages.

+ */ + void updateTravelUI(); + + boolean advanceTo( [in] short PageId ); + boolean goBackTo( [in] short PageId ); + + short getCurrentPage(); +}; + +//================================================================================================================== + +}; }; }; }; }; + +//================================================================================================================== + +#endif diff --git a/offapi/com/sun/star/ui/dialogs/XWizardController.idl b/offapi/com/sun/star/ui/dialogs/XWizardController.idl new file mode 100644 index 000000000000..e38bcb1a5f1f --- /dev/null +++ b/offapi/com/sun/star/ui/dialogs/XWizardController.idl @@ -0,0 +1,75 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef __com_sun_star_ui_dialogs_XWizardController_idl__ +#define __com_sun_star_ui_dialogs_XWizardController_idl__ + +#include + +//================================================================================================================== + +module com { module sun { module star { module ui { module dialogs { + +interface XWizard; + +//================================================================================================================== + +/** + */ +interface XWizardController +{ + XWizardPage createPage( [in] ::com::sun::star::awt::XWindow ParentWindow, [in] short PageId ); + + string getPageTitle( [in] short PageId ); + + boolean canAdvance(); + + void onActivatePage( [in] short PageId ); + + /** called when the current page is about to be left + +

In opposite to XWizardPage::commitPage, confirmDeactivatePage is intended for checking + conditions which involve more than the state of the currently active page.

+ + @param PageId + the ID of the page which is about to be left. + @param Reason + is one of the WizardTravelType contants denoting the reason why the page is about to be left. + */ + boolean confirmDeactivatePage( [in] short PageId, [in] short Reason ); + + void onDeactivatePage( [in] short PageId ); + + boolean confirmFinish(); +}; + +//================================================================================================================== + +}; }; }; }; }; + +//================================================================================================================== + +#endif diff --git a/offapi/com/sun/star/ui/dialogs/XWizardPage.idl b/offapi/com/sun/star/ui/dialogs/XWizardPage.idl new file mode 100644 index 000000000000..8e0ea1b6be67 --- /dev/null +++ b/offapi/com/sun/star/ui/dialogs/XWizardPage.idl @@ -0,0 +1,83 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef __com_sun_star_ui_dialogs_XWizardPage_idl__ +#define __com_sun_star_ui_dialogs_XWizardPage_idl__ + +#include + +//================================================================================================================== + +module com { module sun { module star { module ui { module dialogs { + +//================================================================================================================== + +/** + */ +interface XWizardPage : ::com::sun::star::lang::XComponent +{ + /** provides read-only access to the window of the page + */ + [attribute, readonly] ::com::sun::star::awt::XWindow Window; + + /** called when the page is activated + */ + void activatePage(); + + /** is called when the page is about to be left + +

An implementation can veto the leave by returning here. Usually, the decision about this + depends on the current state of the page.

+ +

Note that XWizardPage::commitPage is called before XWizardController::confirmDeactivatePage + gets called.

+ + @param Reason + is one of the WizardTravelType contants denoting the reason why the page should be + committed. + */ + boolean commitPage( [in] short Reason ); + + /** determines whether it is allowed to travel to a later page in the wizard + +

You should base this decision on the state of the page only, not on a global state of the wizard. Usually, + you return here if and only if not all necessary input on the page has been provided by the user, + or the provided input is not valid.

+ +

If checked for validity is expensive, or if you prefer giving your user more detailed feedback on validity + than a disabled Next button in the wizard, then move your checks to the commitPage + method.

+ */ + boolean canAdvance(); +}; + +//================================================================================================================== + +}; }; }; }; }; + +//================================================================================================================== + +#endif diff --git a/offapi/com/sun/star/ui/dialogs/makefile.mk b/offapi/com/sun/star/ui/dialogs/makefile.mk index fa11ba35e173..07d762fb0ec6 100644 --- a/offapi/com/sun/star/ui/dialogs/makefile.mk +++ b/offapi/com/sun/star/ui/dialogs/makefile.mk @@ -64,7 +64,13 @@ IDLFILES=\ XControlInformation.idl \ XAsynchronousExecutableDialog.idl \ XDialogClosedListener.idl \ - DialogClosedEvent.idl + DialogClosedEvent.idl \ + XWizard.idl \ + XWizardController.idl \ + Wizard.idl \ + XWizardPage.idl \ + WizardButton.idl \ + WizardTravelType.idl # ------------------------------------------------------------------ -- cgit v1.2.3 From a1441026696609083bafd0034e7aa663da33f91b Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Thu, 20 May 2010 12:45:50 +0200 Subject: unoawt: UNO API for generic wizards, wrapping around the existing C++ RoadmapWizard --- extensions/source/abpilot/abspilot.cxx | 4 +--- extensions/source/abpilot/typeselectionpage.cxx | 7 ++----- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/extensions/source/abpilot/abspilot.cxx b/extensions/source/abpilot/abspilot.cxx index b315893b6447..105ab39655f0 100644 --- a/extensions/source/abpilot/abspilot.cxx +++ b/extensions/source/abpilot/abspilot.cxx @@ -283,9 +283,7 @@ namespace abp if ( aTables.empty() ) { - if ( ( _eReason == eValidateNoUI ) - || ( RET_YES != QueryBox( this, ModuleRes( RID_QRY_NOTABLES ) ).Execute() ) - ) + if ( RET_YES != QueryBox( this, ModuleRes( RID_QRY_NOTABLES ) ).Execute() ) { // cannot ask the user, or the user chose to use this data source, though there are no tables bAllow = sal_False; diff --git a/extensions/source/abpilot/typeselectionpage.cxx b/extensions/source/abpilot/typeselectionpage.cxx index 6188b7d21628..adc173f84290 100644 --- a/extensions/source/abpilot/typeselectionpage.cxx +++ b/extensions/source/abpilot/typeselectionpage.cxx @@ -214,11 +214,8 @@ namespace abp if (AST_INVALID == getSelectedType( )) { - if ( _eReason != eValidateNoUI ) - { - ErrorBox aError(this, ModuleRes(RID_ERR_NEEDTYPESELECTION)); - aError.Execute(); - } + ErrorBox aError(this, ModuleRes(RID_ERR_NEEDTYPESELECTION)); + aError.Execute(); return sal_False; } -- cgit v1.2.3 From e11315fea42a010fb2248b54be599bdbf98be127 Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Thu, 20 May 2010 12:45:50 +0200 Subject: fwk139: #i110066# Fixed typo for Malay string --- svtools/source/misc/langtab.src | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/svtools/source/misc/langtab.src b/svtools/source/misc/langtab.src index 39f9362e3940..0e4117b52e35 100644 --- a/svtools/source/misc/langtab.src +++ b/svtools/source/misc/langtab.src @@ -138,7 +138,7 @@ StringArray STR_ARR_SVT_LANGUAGE_TABLE < "Lithuanian" ; LANGUAGE_LITHUANIAN ; > ; < "Macedonian" ; LANGUAGE_MACEDONIAN ; > ; < "Malay (Malaysia)" ; LANGUAGE_MALAY_MALAYSIA ; > ; - < "Malay (Brunei Darusalam)" ; LANGUAGE_MALAY_BRUNEI_DARUSSALAM ; > ; + < "Malay (Brunei Darussalam)" ; LANGUAGE_MALAY_BRUNEI_DARUSSALAM ; > ; < "Malayalam" ; LANGUAGE_MALAYALAM ; > ; < "Manipuri" ; LANGUAGE_MANIPURI ; > ; < "Marathi" ; LANGUAGE_MARATHI ; > ; -- cgit v1.2.3 From e1fc491b8a3cdea1be576873f121fb580ebb3ee1 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Thu, 20 May 2010 13:23:25 +0200 Subject: unoawt: compile with GCC --- svtools/source/uno/wizard/wizardshell.cxx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/svtools/source/uno/wizard/wizardshell.cxx b/svtools/source/uno/wizard/wizardshell.cxx index 859ab38a3f3a..dfc14ba53cc1 100644 --- a/svtools/source/uno/wizard/wizardshell.cxx +++ b/svtools/source/uno/wizard/wizardshell.cxx @@ -124,6 +124,9 @@ namespace svt { namespace uno case WizardTypes::eFinish: return WizardTravelType::FINISH; + + default: + break; } OSL_ENSURE( false, "WizardShell::convertCommitReasonToTravelType: unsupported CommitPageReason!" ); return WizardTravelType::FINISH; -- cgit v1.2.3 From ca69909c1f7d45e42edd4752bca3e98661d40f84 Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Thu, 20 May 2010 13:43:32 +0200 Subject: fwk139: #i96288# Fixed disable command 'Digital Signature' doesn't disable button with the sam efunction --- sfx2/source/dialog/dinfdlg.cxx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index 81c2da0ce78d..45ebfeac69f9 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include @@ -119,6 +120,8 @@ const USHORT HI_TYPE = 2; const USHORT HI_VALUE = 3; const USHORT HI_ACTION = 4; +static const char DOCUMENT_SIGNATURE_MENU_CMD[] = "Signature"; + //------------------------------------------------------------------------ String CreateSizeText( ULONG nSize, BOOL bExtraBytes = TRUE, BOOL bSmartExtraBytes = FALSE ); String CreateSizeText( ULONG nSize, BOOL bExtraBytes, BOOL bSmartExtraBytes ) @@ -858,6 +861,13 @@ SfxDocumentPage::SfxDocumentPage( Window* pParent, const SfxItemSet& rItemSet ) aNewSize.Width() -= nDelta; aUseUserDataCB.SetSizePixel( aNewSize ); } + // See i96288 + // Check if the document signature command is enabled + // on the main list enable/disable the pushbutton accordingly + SvtCommandOptions aCmdOptions; + if ( aCmdOptions.Lookup( SvtCommandOptions::CMDOPTION_DISABLED, + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( DOCUMENT_SIGNATURE_MENU_CMD ) ) ) ) + aSignatureBtn.Disable(); } //------------------------------------------------------------------------ -- cgit v1.2.3 From 7687340730f26a559367fad971f95c0bd15a995a Mon Sep 17 00:00:00 2001 From: Ingrid Halama Date: Thu, 20 May 2010 17:28:14 +0200 Subject: chart47: #i111102# close chart documents after testing --- .../tests/java/mod/_xmloff/Chart/XMLContentExporter.java | 9 ++++++--- .../tests/java/mod/_xmloff/Chart/XMLContentImporter.java | 12 ++++++++---- qadevOOo/tests/java/mod/_xmloff/Chart/XMLExporter.java | 2 +- qadevOOo/tests/java/mod/_xmloff/Chart/XMLImporter.java | 12 ++++++++---- .../tests/java/mod/_xmloff/Chart/XMLStylesExporter.java | 9 ++++++--- .../tests/java/mod/_xmloff/Chart/XMLStylesImporter.java | 14 +++++++++----- 6 files changed, 38 insertions(+), 20 deletions(-) diff --git a/qadevOOo/tests/java/mod/_xmloff/Chart/XMLContentExporter.java b/qadevOOo/tests/java/mod/_xmloff/Chart/XMLContentExporter.java index 8ec11a9360b9..6fe4765389da 100644 --- a/qadevOOo/tests/java/mod/_xmloff/Chart/XMLContentExporter.java +++ b/qadevOOo/tests/java/mod/_xmloff/Chart/XMLContentExporter.java @@ -91,11 +91,14 @@ public class XMLContentExporter extends TestCase { } /** - * Document disposed here. + * Close document */ protected void cleanup( TestParameters tParam, PrintWriter log ) { - log.println( " disposing xChartDoc " ); - xChartDoc.dispose(); + if( xChartDoc!=null ) { + log.println( " closing xChartDoc" ); + util.DesktopTools.closeDoc(xChartDoc); + xChartDoc = null; + } } /** diff --git a/qadevOOo/tests/java/mod/_xmloff/Chart/XMLContentImporter.java b/qadevOOo/tests/java/mod/_xmloff/Chart/XMLContentImporter.java index 1c5970c7d5e0..5e48b073fc9f 100644 --- a/qadevOOo/tests/java/mod/_xmloff/Chart/XMLContentImporter.java +++ b/qadevOOo/tests/java/mod/_xmloff/Chart/XMLContentImporter.java @@ -91,11 +91,15 @@ public class XMLContentImporter extends TestCase { } /** - * Disposes document. - */ + * Close document + */ protected void cleanup( TestParameters tParam, PrintWriter log ) { - log.println( " disposing document " ); - comp.dispose(); + if( xChartDoc!=null ) { + log.println( " closing xChartDoc" ); + util.DesktopTools.closeDoc(xChartDoc); + xChartDoc = null; + comp = null; + } } /** diff --git a/qadevOOo/tests/java/mod/_xmloff/Chart/XMLExporter.java b/qadevOOo/tests/java/mod/_xmloff/Chart/XMLExporter.java index a5027b3f989d..c0edd4f82cda 100644 --- a/qadevOOo/tests/java/mod/_xmloff/Chart/XMLExporter.java +++ b/qadevOOo/tests/java/mod/_xmloff/Chart/XMLExporter.java @@ -92,7 +92,7 @@ public class XMLExporter extends TestCase { } /** - * Document disposed here. + * Close document */ protected void cleanup( TestParameters tParam, PrintWriter log ) { if( xChartDoc!=null ) { diff --git a/qadevOOo/tests/java/mod/_xmloff/Chart/XMLImporter.java b/qadevOOo/tests/java/mod/_xmloff/Chart/XMLImporter.java index b8d441751540..83a422df9128 100644 --- a/qadevOOo/tests/java/mod/_xmloff/Chart/XMLImporter.java +++ b/qadevOOo/tests/java/mod/_xmloff/Chart/XMLImporter.java @@ -91,11 +91,15 @@ public class XMLImporter extends TestCase { } /** - * Disposes document. - */ + * Close document + */ protected void cleanup( TestParameters tParam, PrintWriter log ) { - log.println( " disposing document " ); - comp.dispose(); + if( xChartDoc!=null ) { + log.println( " closing xChartDoc" ); + util.DesktopTools.closeDoc(xChartDoc); + xChartDoc = null; + comp = null; + } } /** diff --git a/qadevOOo/tests/java/mod/_xmloff/Chart/XMLStylesExporter.java b/qadevOOo/tests/java/mod/_xmloff/Chart/XMLStylesExporter.java index 9435907adb3c..4405b5c5ac60 100644 --- a/qadevOOo/tests/java/mod/_xmloff/Chart/XMLStylesExporter.java +++ b/qadevOOo/tests/java/mod/_xmloff/Chart/XMLStylesExporter.java @@ -90,11 +90,14 @@ public class XMLStylesExporter extends TestCase { } /** - * Document disposed here. + * Close document */ protected void cleanup( TestParameters tParam, PrintWriter log ) { - log.println( " disposing xChartDoc " ); - xChartDoc.dispose(); + if( xChartDoc!=null ) { + log.println( " closing xChartDoc" ); + util.DesktopTools.closeDoc(xChartDoc); + xChartDoc = null; + } } /** diff --git a/qadevOOo/tests/java/mod/_xmloff/Chart/XMLStylesImporter.java b/qadevOOo/tests/java/mod/_xmloff/Chart/XMLStylesImporter.java index 617b2f92cbc4..7bd02228203d 100644 --- a/qadevOOo/tests/java/mod/_xmloff/Chart/XMLStylesImporter.java +++ b/qadevOOo/tests/java/mod/_xmloff/Chart/XMLStylesImporter.java @@ -88,12 +88,16 @@ public class XMLStylesImporter extends TestCase { comp = xChartDoc; } - /** - * Disposes document. - */ + /** + * Close document + */ protected void cleanup( TestParameters tParam, PrintWriter log ) { - log.println( " disposing document " ); - comp.dispose(); + if( xChartDoc!=null ) { + log.println( " closing xChartDoc" ); + util.DesktopTools.closeDoc(xChartDoc); + xChartDoc = null; + comp = null; + } } /** -- cgit v1.2.3 From 095cebd34144f8923545967af7faa5c6acd5c725 Mon Sep 17 00:00:00 2001 From: Niklas Nebel Date: Thu, 20 May 2010 19:47:55 +0200 Subject: calc54: #i105964# IsHidden in CellProtection must always be saved as hidden-and-protected --- sc/source/filter/xml/xmlstyle.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sc/source/filter/xml/xmlstyle.cxx b/sc/source/filter/xml/xmlstyle.cxx index f9f0d063a843..733a11c9a1da 100644 --- a/sc/source/filter/xml/xmlstyle.cxx +++ b/sc/source/filter/xml/xmlstyle.cxx @@ -1039,8 +1039,10 @@ sal_Bool XmlScPropHdl_CellProtection::exportXML( rStrExpValue = GetXMLToken(XML_NONE); bRetval = sal_True; } - else if (aCellProtection.IsHidden && aCellProtection.IsLocked) + else if (aCellProtection.IsHidden) { + // #i105964# "Hide all" implies "Protected" in the UI, so it must be saved as "hidden-and-protected" + // even if "IsLocked" is not set in the CellProtection struct. rStrExpValue = GetXMLToken(XML_HIDDEN_AND_PROTECTED); bRetval = sal_True; } -- cgit v1.2.3 From 0df478c6a9b27fef126cfd6aa8c6700d9407645d Mon Sep 17 00:00:00 2001 From: Niklas Nebel Date: Fri, 21 May 2010 10:56:10 +0200 Subject: calc54: #i111745# don't access GetObjectManager for BIFF5 export --- sc/source/filter/excel/excdoc.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sc/source/filter/excel/excdoc.cxx b/sc/source/filter/excel/excdoc.cxx index bba1543dd403..5534f8e775a9 100644 --- a/sc/source/filter/excel/excdoc.cxx +++ b/sc/source/filter/excel/excdoc.cxx @@ -437,7 +437,8 @@ void ExcTable::FillAsTable( size_t nCodeNameIdx ) DBG_ASSERT( nExcTab <= static_cast(MAXTAB), "-ExcTable::Table(): nExcTab - no ordinary table!" ); // create a new OBJ list for this sheet (may be used by notes, autofilter, data validation) - GetObjectManager().StartSheet(); + if( eBiff == EXC_BIFF8 ) + GetObjectManager().StartSheet(); // cell table: DEFROWHEIGHT, DEFCOLWIDTH, COLINFO, DIMENSIONS, ROW, cell records mxCellTable.reset( new XclExpCellTable( GetRoot() ) ); -- cgit v1.2.3 From af0a5febf954c46655bc5392ffbaeb4e49c317cd Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 21 May 2010 13:17:30 +0200 Subject: unoawt: evolution of the UNO-API for wizards --- svtools/source/uno/unowizard.hxx | 2 +- svtools/source/uno/wizard/unowizard.cxx | 6 +++--- svtools/source/uno/wizard/wizardpageshell.hxx | 3 +++ svtools/source/uno/wizard/wizardshell.cxx | 20 +++++++++++++++++--- svtools/source/uno/wizard/wizardshell.hxx | 16 ++++++++++++---- 5 files changed, 36 insertions(+), 11 deletions(-) diff --git a/svtools/source/uno/unowizard.hxx b/svtools/source/uno/unowizard.hxx index cf09646a690e..1aa639597d05 100644 --- a/svtools/source/uno/unowizard.hxx +++ b/svtools/source/uno/unowizard.hxx @@ -82,7 +82,7 @@ namespace svt { namespace uno virtual void SAL_CALL updateTravelUI( ) throw (::com::sun::star::uno::RuntimeException); virtual ::sal_Bool SAL_CALL advanceTo( ::sal_Int16 PageId ) throw (::com::sun::star::uno::RuntimeException); virtual ::sal_Bool SAL_CALL goBackTo( ::sal_Int16 PageId ) throw (::com::sun::star::uno::RuntimeException); - virtual ::sal_Int16 SAL_CALL getCurrentPage( ) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XWizardPage > SAL_CALL getCurrentPage( ) throw (::com::sun::star::uno::RuntimeException); // ::com::sun::star::ui::dialogs::XExecutableDialog virtual void SAL_CALL setTitle( const ::rtl::OUString& aTitle ) throw (::com::sun::star::uno::RuntimeException); diff --git a/svtools/source/uno/wizard/unowizard.cxx b/svtools/source/uno/wizard/unowizard.cxx index b832162ef92f..c01d7eb5f4cc 100644 --- a/svtools/source/uno/wizard/unowizard.cxx +++ b/svtools/source/uno/wizard/unowizard.cxx @@ -69,6 +69,7 @@ namespace svt { namespace uno using ::com::sun::star::lang::IllegalArgumentException; using ::com::sun::star::ucb::AlreadyInitializedException; using ::com::sun::star::ui::dialogs::XWizardController; + using ::com::sun::star::ui::dialogs::XWizardPage; /** === end UNO using === **/ namespace WizardButton = ::com::sun::star::ui::dialogs::WizardButton; @@ -344,7 +345,7 @@ namespace svt { namespace uno } //------------------------------------------------------------------------------------------------------------------ - ::sal_Int16 SAL_CALL Wizard::getCurrentPage( ) throw (RuntimeException) + Reference< XWizardPage > SAL_CALL Wizard::getCurrentPage( ) throw (RuntimeException) { ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); ::osl::MutexGuard aGuard( m_aMutex ); @@ -352,7 +353,7 @@ namespace svt { namespace uno WizardShell* pWizardImpl = dynamic_cast< WizardShell* >( m_pDialog ); ENSURE_OR_RETURN_FALSE( pWizardImpl, "Wizard::getCurrentPage: invalid dialog implementation!" ); - return pWizardImpl->getCurrentPage(); + return pWizardImpl->getCurrentWizardPage(); } //------------------------------------------------------------------------------------------------------------------ @@ -365,7 +366,6 @@ namespace svt { namespace uno //------------------------------------------------------------------------------------------------------------------ ::sal_Int16 SAL_CALL Wizard::execute( ) throw (RuntimeException) { - // simply disambiguate return Wizard_Base::OGenericUnoDialog::execute(); } diff --git a/svtools/source/uno/wizard/wizardpageshell.hxx b/svtools/source/uno/wizard/wizardpageshell.hxx index 8f36a19c0fe4..25cfbb8b8505 100644 --- a/svtools/source/uno/wizard/wizardpageshell.hxx +++ b/svtools/source/uno/wizard/wizardpageshell.hxx @@ -60,6 +60,9 @@ namespace svt { namespace uno // OWizardPage overridables (why isn't this method part of IWizardPage?) virtual bool canAdvance() const; + const ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XWizardPage >& + getWizardPage() const { return m_xWizardPage; } + private: const ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XWizardController > m_xController; ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XWizardPage > m_xWizardPage; diff --git a/svtools/source/uno/wizard/wizardshell.cxx b/svtools/source/uno/wizard/wizardshell.cxx index dfc14ba53cc1..140a65455f8e 100644 --- a/svtools/source/uno/wizard/wizardshell.cxx +++ b/svtools/source/uno/wizard/wizardshell.cxx @@ -56,6 +56,7 @@ namespace svt { namespace uno using ::com::sun::star::uno::Type; using ::com::sun::star::ui::dialogs::XWizardController; using ::com::sun::star::ui::dialogs::XWizard; + using ::com::sun::star::ui::dialogs::XWizardPage; /** === end UNO using === **/ namespace WizardTravelType = ::com::sun::star::ui::dialogs::WizardTravelType; @@ -101,9 +102,6 @@ namespace svt { namespace uno ShowButtonFixedLine( true ); SetRoadmapInteractive( true ); enableAutomaticNextButtonState(); - - // activate the first page - ActivatePage(); } //------------------------------------------------------------------------------------------------------------------ @@ -111,6 +109,13 @@ namespace svt { namespace uno { } + //------------------------------------------------------------------------------------------------------------------ + short WizardShell::Execute() + { + ActivatePage(); + return WizardShell_Base::Execute(); + } + //------------------------------------------------------------------------------------------------------------------ sal_Int16 WizardShell::convertCommitReasonToTravelType( const CommitPageReason i_eReason ) { @@ -195,6 +200,15 @@ namespace svt { namespace uno return sal_True; } + //------------------------------------------------------------------------------------------------------------------ + Reference< XWizardPage > WizardShell::getCurrentWizardPage() const + { + const WizardState eState = getCurrentState(); + const WizardPageShell* pPage = dynamic_cast< const WizardPageShell* >( GetPage( eState ) ); + ENSURE_OR_RETURN( pPage, "WizardShell::getCurrentWizardPage: invalid page/implementation!", NULL ); + return pPage->getWizardPage(); + } + //------------------------------------------------------------------------------------------------------------------ TabPage* WizardShell::createPage( WizardState i_nState ) { diff --git a/svtools/source/uno/wizard/wizardshell.hxx b/svtools/source/uno/wizard/wizardshell.hxx index 0d2ba7836ebc..f61666f46cc3 100644 --- a/svtools/source/uno/wizard/wizardshell.hxx +++ b/svtools/source/uno/wizard/wizardshell.hxx @@ -54,6 +54,9 @@ namespace svt { namespace uno ); virtual ~WizardShell(); + // Dialog overridables + virtual short Execute(); + // OWizardMachine overridables virtual TabPage* createPage( WizardState i_nState ); virtual void enterState( WizardState i_nState ); @@ -78,13 +81,18 @@ namespace svt { namespace uno { return skipBackwardUntil( impl_pageIdToState( i_nPageId ) ); } - sal_Int16 getCurrentPage() const - { - return impl_stateToPageId( getCurrentState() ); - } sal_Bool travelNext() { return WizardShell_Base::travelNext(); } sal_Bool travelPrevious() { return WizardShell_Base::travelPrevious(); } + void preExecute() + { + // activate the first page + ActivatePage(); + } + + ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XWizardPage > + getCurrentWizardPage() const; + private: sal_Int16 impl_stateToPageId( const WizardTypes::WizardState i_nState ) const { -- cgit v1.2.3 From d6dd1c27f9ea664978ceb48825b8e8417cc01e61 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 21 May 2010 13:17:30 +0200 Subject: unoawt: evolution of the UNO-API for wizards --- offapi/com/sun/star/ui/dialogs/XWizard.idl | 5 ++++- offapi/com/sun/star/ui/dialogs/XWizardPage.idl | 6 ++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/offapi/com/sun/star/ui/dialogs/XWizard.idl b/offapi/com/sun/star/ui/dialogs/XWizard.idl index 76b4af66ffa1..0d6a92cbd164 100644 --- a/offapi/com/sun/star/ui/dialogs/XWizard.idl +++ b/offapi/com/sun/star/ui/dialogs/XWizard.idl @@ -33,6 +33,8 @@ module com { module sun { module star { module ui { module dialogs { +interface XWizardPage; + //================================================================================================================== /** @@ -60,7 +62,8 @@ interface XWizard boolean advanceTo( [in] short PageId ); boolean goBackTo( [in] short PageId ); - short getCurrentPage(); + XWizardPage + getCurrentPage(); }; //================================================================================================================== diff --git a/offapi/com/sun/star/ui/dialogs/XWizardPage.idl b/offapi/com/sun/star/ui/dialogs/XWizardPage.idl index 8e0ea1b6be67..7c49db499214 100644 --- a/offapi/com/sun/star/ui/dialogs/XWizardPage.idl +++ b/offapi/com/sun/star/ui/dialogs/XWizardPage.idl @@ -43,6 +43,12 @@ interface XWizardPage : ::com::sun::star::lang::XComponent */ [attribute, readonly] ::com::sun::star::awt::XWindow Window; + /** denotes the ID of the page. + +

Within a wizard, no two pages are allowed to have the same ID.

+ */ + [attribute, readonly] short PageId; + /** called when the page is activated */ void activatePage(); -- cgit v1.2.3 From 89d95059bdf9530e6e9b1a9aadf3573364cd1718 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 21 May 2010 13:18:39 +0200 Subject: unoawt: removed debug code used for diagnostics --- svtools/source/dialogs/roadmapwizard.cxx | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/svtools/source/dialogs/roadmapwizard.cxx b/svtools/source/dialogs/roadmapwizard.cxx index 32a04bae7d5f..e3e2350c62da 100644 --- a/svtools/source/dialogs/roadmapwizard.cxx +++ b/svtools/source/dialogs/roadmapwizard.cxx @@ -194,30 +194,6 @@ namespace svt impl_construct(); } - namespace - { - void lcl_dump( const Window& i_rWindow, const size_t i_level ) - { - for ( size_t i=0; iGetWindow( WINDOW_NEXT ); - } - fflush( stderr ); - } - } - //-------------------------------------------------------------------- void RoadmapWizard::impl_construct() { @@ -572,8 +548,6 @@ namespace svt enableButtons( WZB_PREVIOUS, bHaveEnabledState ); implUpdateRoadmap(); - - lcl_dump( *this, 0 ); } //-------------------------------------------------------------------- -- cgit v1.2.3 From 1f8a320a9caec6354f3a2f6bbc38ba8f85e7f16c Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Fri, 21 May 2010 14:06:12 +0200 Subject: vcl111: #i102694# metacity and compiz need the same workaround --- vcl/unx/gtk/window/gtkframe.cxx | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/vcl/unx/gtk/window/gtkframe.cxx b/vcl/unx/gtk/window/gtkframe.cxx index c0eae3d2f0d0..11d567c85098 100644 --- a/vcl/unx/gtk/window/gtkframe.cxx +++ b/vcl/unx/gtk/window/gtkframe.cxx @@ -1353,15 +1353,11 @@ void GtkSalFrame::Show( BOOL bVisible, BOOL bNoActivate ) // // i.e. having a time < that of the toplevel frame means that the toplevel frame gets unfocused. // awesome. - bool bMetaCity = getDisplay()->getWMAdaptor()->getWindowManagerName().EqualsAscii("Metacity"); - if( nUserTime == 0 && - ( bMetaCity || - ( - getDisplay()->getWMAdaptor()->getWindowManagerName().EqualsAscii("compiz") && - (m_nStyle & (SAL_FRAME_STYLE_OWNERDRAWDECORATION)) - ) - ) - ) + bool bHack = + getDisplay()->getWMAdaptor()->getWindowManagerName().EqualsAscii("Metacity") || + getDisplay()->getWMAdaptor()->getWindowManagerName().EqualsAscii("compiz") + ; + if( nUserTime == 0 && bHack ) { /* #i99360# ugly workaround an X11 library bug */ nUserTime= getDisplay()->GetLastUserEventTime( true ); @@ -1369,7 +1365,7 @@ void GtkSalFrame::Show( BOOL bVisible, BOOL bNoActivate ) } lcl_set_user_time( GTK_WIDGET(m_pWindow)->window, nUserTime ); - if( bMetaCity && ! bNoActivate && (m_nStyle & SAL_FRAME_STYLE_TOOLWINDOW) ) + if( bHack && ! bNoActivate && (m_nStyle & SAL_FRAME_STYLE_TOOLWINDOW) ) m_bSetFocusOnMap = true; gtk_widget_show( m_pWindow ); -- cgit v1.2.3 From 57ddb0e9d87cb519bc06eda7645ded43a6decc83 Mon Sep 17 00:00:00 2001 From: Niklas Nebel Date: Fri, 21 May 2010 14:35:37 +0200 Subject: calc54: #i111754# leave out source-service password attribute as long as DataPilotSource doesn't specify the content --- sc/source/filter/xml/XMLExportDataPilot.cxx | 4 ++-- sc/source/filter/xml/xmlimprt.cxx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sc/source/filter/xml/XMLExportDataPilot.cxx b/sc/source/filter/xml/XMLExportDataPilot.cxx index a37617e0b8b9..e43ff21a114d 100644 --- a/sc/source/filter/xml/XMLExportDataPilot.cxx +++ b/sc/source/filter/xml/XMLExportDataPilot.cxx @@ -880,8 +880,8 @@ void ScXMLExportDataPilot::WriteDataPilots(const uno::Reference aParSource)); rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_OBJECT_NAME, rtl::OUString(pServSource->aParName)); rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_USER_NAME, rtl::OUString(pServSource->aParUser)); - // How to write the Passwort? We must know, whether the passwort shoulb be written encrypted and how or not - rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_PASSWORT, rtl::OUString(pServSource->aParPass)); + // #i111754# leave out password attribute as long as DataPilotSource doesn't specify the content + // rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_PASSWORD, rtl::OUString(pServSource->aParPass)); SvXMLElementExport aElemSD(rExport, XML_NAMESPACE_TABLE, XML_SOURCE_SERVICE, sal_True, sal_True); rExport.CheckAttrList(); } diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx index d1ef48bfa9ed..69c7144191d6 100644 --- a/sc/source/filter/xml/xmlimprt.cxx +++ b/sc/source/filter/xml/xmlimprt.cxx @@ -1368,7 +1368,7 @@ const SvXMLTokenMap& ScXMLImport::GetDataPilotTableSourceServiceAttrTokenMap() { XML_NAMESPACE_TABLE, XML_SOURCE_NAME, XML_TOK_SOURCE_SERVICE_ATTR_SOURCE_NAME }, { XML_NAMESPACE_TABLE, XML_OBJECT_NAME, XML_TOK_SOURCE_SERVICE_ATTR_OBJECT_NAME }, { XML_NAMESPACE_TABLE, XML_USER_NAME, XML_TOK_SOURCE_SERVICE_ATTR_USER_NAME }, - { XML_NAMESPACE_TABLE, XML_PASSWORT, XML_TOK_SOURCE_SERVICE_ATTR_PASSWORD }, + { XML_NAMESPACE_TABLE, XML_PASSWORD, XML_TOK_SOURCE_SERVICE_ATTR_PASSWORD }, XML_TOKEN_MAP_END }; -- cgit v1.2.3 From bdb2890c55676da4b4a569ff914bf1a5bd717725 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 21 May 2010 15:03:31 +0200 Subject: unoawt: added more functionality to XWizard --- svtools/inc/svtools/roadmapwizard.hxx | 6 ++- svtools/source/dialogs/roadmapwizard.cxx | 31 ++++++++++++-- svtools/source/uno/unowizard.hxx | 7 +++- svtools/source/uno/wizard/unowizard.cxx | 67 ++++++++++++++++++++++++++++++- svtools/source/uno/wizard/wizardshell.cxx | 6 +++ svtools/source/uno/wizard/wizardshell.hxx | 17 ++++++-- 6 files changed, 124 insertions(+), 10 deletions(-) diff --git a/svtools/inc/svtools/roadmapwizard.hxx b/svtools/inc/svtools/roadmapwizard.hxx index ee02f3b33ed7..5d8e0d9b01bb 100644 --- a/svtools/inc/svtools/roadmapwizard.hxx +++ b/svtools/inc/svtools/roadmapwizard.hxx @@ -142,7 +142,7 @@ protected: You can only activate paths which share the first k states with the path which is previously active (if any), where k is the index of the - current state within the current page. + current state within the current path. Say you have paths, (0,1,2,5) and (0,1,4,5). This means that after @@ -202,6 +202,10 @@ protected: */ void enableState( WizardState _nState, bool _bEnable = true ); + /** returns true if and only if the given state is known in at least one declared path + */ + bool knowsState( WizardState _nState ) const; + // OWizardMachine overriables virtual void enterState( WizardState _nState ); diff --git a/svtools/source/dialogs/roadmapwizard.cxx b/svtools/source/dialogs/roadmapwizard.cxx index e3e2350c62da..a2ffb8ad5849 100644 --- a/svtools/source/dialogs/roadmapwizard.cxx +++ b/svtools/source/dialogs/roadmapwizard.cxx @@ -342,15 +342,16 @@ namespace svt if ( (sal_Int32)aNewPathPos->second.size() <= nCurrentStatePathIndex ) return; -#if OSL_DEBUG_LEVEL > 0 // assert that the current and the new path are equal, up to nCurrentStatePathIndex Paths::const_iterator aActivePathPos = m_pImpl->aPaths.find( m_pImpl->nActivePath ); if ( aActivePathPos != m_pImpl->aPaths.end() ) { - DBG_ASSERT( m_pImpl->getFirstDifferentIndex( aActivePathPos->second, aNewPathPos->second ) > nCurrentStatePathIndex, - "RoadmapWizard::activate: you cannot activate a path which conflicts with the current one *before* the current state!" ); + if ( m_pImpl->getFirstDifferentIndex( aActivePathPos->second, aNewPathPos->second ) <= nCurrentStatePathIndex ) + { + OSL_ENSURE( false, "RoadmapWizard::activate: you cannot activate a path which conflicts with the current one *before* the current state!" ); + return; + } } -#endif m_pImpl->nActivePath = _nPathId; m_pImpl->bActivePathIsDefinite = _bDecideForIt; @@ -655,11 +656,33 @@ namespace svt // if the state is currently in the roadmap, reflect it's new status m_pImpl->pRoadmap->EnableRoadmapItem( (RoadmapTypes::ItemId)_nState, _bEnable ); } + + //-------------------------------------------------------------------- + bool RoadmapWizard::knowsState( WizardState i_nState ) const + { + for ( Paths::const_iterator path = m_pImpl->aPaths.begin(); + path != m_pImpl->aPaths.end(); + ++path + ) + { + for ( WizardPath::const_iterator state = path->second.begin(); + state != path->second.end(); + ++state + ) + { + if ( *state == i_nState ) + return true; + } + } + return false; + } + //-------------------------------------------------------------------- bool RoadmapWizard::isStateEnabled( WizardState _nState ) const { return m_pImpl->aDisabledStates.find( _nState ) == m_pImpl->aDisabledStates.end(); } + //-------------------------------------------------------------------- void RoadmapWizard::Resize() { diff --git a/svtools/source/uno/unowizard.hxx b/svtools/source/uno/unowizard.hxx index 1aa639597d05..f227160f96bc 100644 --- a/svtools/source/uno/unowizard.hxx +++ b/svtools/source/uno/unowizard.hxx @@ -75,14 +75,18 @@ namespace svt { namespace uno virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const; // ::com::sun::star::ui::dialogs::XWizard + virtual ::rtl::OUString SAL_CALL getHelpURL() throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setHelpURL( const ::rtl::OUString& _helpurl ) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XWizardPage > SAL_CALL getCurrentPage( ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL enableButton( ::sal_Int16 WizardButton, ::sal_Bool Enable ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL setDefaultButton( ::sal_Int16 WizardButton ) throw (::com::sun::star::uno::RuntimeException); virtual ::sal_Bool SAL_CALL travelNext( ) throw (::com::sun::star::uno::RuntimeException); virtual ::sal_Bool SAL_CALL travelPrevious( ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL enablePage( ::sal_Int16 PageID, ::sal_Bool Enable ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::util::InvalidStateException, ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL updateTravelUI( ) throw (::com::sun::star::uno::RuntimeException); virtual ::sal_Bool SAL_CALL advanceTo( ::sal_Int16 PageId ) throw (::com::sun::star::uno::RuntimeException); virtual ::sal_Bool SAL_CALL goBackTo( ::sal_Int16 PageId ) throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XWizardPage > SAL_CALL getCurrentPage( ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL activatePath( ::sal_Int16 PathIndex, ::sal_Bool Final ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::util::InvalidStateException, ::com::sun::star::uno::RuntimeException); // ::com::sun::star::ui::dialogs::XExecutableDialog virtual void SAL_CALL setTitle( const ::rtl::OUString& aTitle ) throw (::com::sun::star::uno::RuntimeException); @@ -102,6 +106,7 @@ namespace svt { namespace uno ::comphelper::ComponentContext m_aContext; ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< sal_Int16 > > m_aWizardSteps; ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XWizardController > m_xController; + ::rtl::OUString m_sHelpURL; }; //...................................................................................................................... diff --git a/svtools/source/uno/wizard/unowizard.cxx b/svtools/source/uno/wizard/unowizard.cxx index c01d7eb5f4cc..3169f5342f50 100644 --- a/svtools/source/uno/wizard/unowizard.cxx +++ b/svtools/source/uno/wizard/unowizard.cxx @@ -70,6 +70,8 @@ namespace svt { namespace uno using ::com::sun::star::ucb::AlreadyInitializedException; using ::com::sun::star::ui::dialogs::XWizardController; using ::com::sun::star::ui::dialogs::XWizardPage; + using ::com::sun::star::container::NoSuchElementException; + using ::com::sun::star::util::InvalidStateException; /** === end UNO using === **/ namespace WizardButton = ::com::sun::star::ui::dialogs::WizardButton; @@ -205,12 +207,17 @@ namespace svt { namespace uno //-------------------------------------------------------------------- Dialog* Wizard::createDialog( Window* i_pParent ) { - return new WizardShell( i_pParent, this, m_xController, m_aWizardSteps ); + Dialog* pDialog( new WizardShell( i_pParent, this, m_xController, m_aWizardSteps ) ); + pDialog->SetSmartHelpId( SmartId( m_sHelpURL ) ); + return pDialog; } //-------------------------------------------------------------------- void Wizard::destroyDialog() { + if ( m_pDialog ) + m_sHelpURL = m_pDialog->GetSmartHelpId().GetStr(); + Wizard_Base::destroyDialog(); } @@ -260,6 +267,31 @@ namespace svt { namespace uno return new ::cppu::OPropertyArrayHelper( aProps ); } + //------------------------------------------------------------------------------------------------------------------ + ::rtl::OUString SAL_CALL Wizard::getHelpURL() throw (RuntimeException) + { + ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + ::osl::MutexGuard aGuard( m_aMutex ); + + if ( !m_pDialog ) + return m_sHelpURL; + + const SmartId aSmartId( m_pDialog->GetSmartHelpId() ); + return aSmartId.GetStr(); + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL Wizard::setHelpURL( const ::rtl::OUString& i_HelpURL ) throw (RuntimeException) + { + ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + ::osl::MutexGuard aGuard( m_aMutex ); + + if ( !m_pDialog ) + m_sHelpURL = i_HelpURL; + else + m_pDialog->SetSmartHelpId( SmartId( i_HelpURL ) ); + } + //------------------------------------------------------------------------------------------------------------------ void SAL_CALL Wizard::enableButton( ::sal_Int16 i_WizardButton, ::sal_Bool i_Enable ) throw (RuntimeException) { @@ -308,6 +340,24 @@ namespace svt { namespace uno return pWizardImpl->travelPrevious(); } + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL Wizard::enablePage( ::sal_Int16 i_PageID, ::sal_Bool i_Enable ) throw (NoSuchElementException, InvalidStateException, RuntimeException) + { + ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + ::osl::MutexGuard aGuard( m_aMutex ); + + WizardShell* pWizardImpl = dynamic_cast< WizardShell* >( m_pDialog ); + ENSURE_OR_RETURN_VOID( pWizardImpl, "Wizard::updateTravelUI: invalid dialog implementation!" ); + + if ( !pWizardImpl->knowsPage( i_PageID ) ) + throw NoSuchElementException( ::rtl::OUString(), *this ); + + if ( i_PageID == pWizardImpl->getCurrentPage() ) + throw InvalidStateException( ::rtl::OUString(), *this ); + + pWizardImpl->enablePage( i_PageID, i_Enable ); + } + //------------------------------------------------------------------------------------------------------------------ void SAL_CALL Wizard::updateTravelUI( ) throw (RuntimeException) { @@ -356,6 +406,21 @@ namespace svt { namespace uno return pWizardImpl->getCurrentWizardPage(); } + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL Wizard::activatePath( ::sal_Int16 i_PathIndex, ::sal_Bool i_Final ) throw (NoSuchElementException, InvalidStateException, RuntimeException) + { + ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + ::osl::MutexGuard aGuard( m_aMutex ); + + if ( ( i_PathIndex < 0 ) || ( i_PathIndex >= m_aWizardSteps.getLength() ) ) + throw NoSuchElementException( ::rtl::OUString(), *this ); + + WizardShell* pWizardImpl = dynamic_cast< WizardShell* >( m_pDialog ); + ENSURE_OR_RETURN_VOID( pWizardImpl, "Wizard::activatePath: invalid dialog implementation!" ); + + pWizardImpl->activatePath( i_PathIndex ); + } + //------------------------------------------------------------------------------------------------------------------ void SAL_CALL Wizard::setTitle( const ::rtl::OUString& i_Title ) throw (RuntimeException) { diff --git a/svtools/source/uno/wizard/wizardshell.cxx b/svtools/source/uno/wizard/wizardshell.cxx index 140a65455f8e..1db8588ca713 100644 --- a/svtools/source/uno/wizard/wizardshell.cxx +++ b/svtools/source/uno/wizard/wizardshell.cxx @@ -209,6 +209,12 @@ namespace svt { namespace uno return pPage->getWizardPage(); } + //------------------------------------------------------------------------------------------------------------------ + void WizardShell::enablePage( const sal_Int16 i_nPageID, const sal_Bool i_bEnable ) + { + enableState( impl_pageIdToState( i_nPageID ), i_bEnable ); + } + //------------------------------------------------------------------------------------------------------------------ TabPage* WizardShell::createPage( WizardState i_nState ) { diff --git a/svtools/source/uno/wizard/wizardshell.hxx b/svtools/source/uno/wizard/wizardshell.hxx index f61666f46cc3..4c44f5512d58 100644 --- a/svtools/source/uno/wizard/wizardshell.hxx +++ b/svtools/source/uno/wizard/wizardshell.hxx @@ -84,15 +84,26 @@ namespace svt { namespace uno sal_Bool travelNext() { return WizardShell_Base::travelNext(); } sal_Bool travelPrevious() { return WizardShell_Base::travelPrevious(); } - void preExecute() + void activatePath( const sal_Int16 i_nPathID ) { - // activate the first page - ActivatePage(); + WizardShell_Base::activatePath( PathId( i_nPathID ) ); } ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XWizardPage > getCurrentWizardPage() const; + sal_Int16 getCurrentPage() const + { + return impl_stateToPageId( getCurrentState() ); + } + + void enablePage( const sal_Int16 i_PageID, const sal_Bool i_Enable ); + + bool knowsPage( const sal_Int16 i_nPageID ) const + { + return knowsState( impl_pageIdToState( i_nPageID ) ); + } + private: sal_Int16 impl_stateToPageId( const WizardTypes::WizardState i_nState ) const { -- cgit v1.2.3 From 45a8100e42492335d5423efa2ad512c2ba1dbfca Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 21 May 2010 15:03:31 +0200 Subject: unoawt: added more functionality to XWizard --- offapi/com/sun/star/ui/dialogs/XWizard.idl | 120 ++++++++++++++++++++- offapi/com/sun/star/util/InvalidStateException.idl | 50 +++++++++ offapi/com/sun/star/util/makefile.mk | 1 + 3 files changed, 166 insertions(+), 5 deletions(-) create mode 100644 offapi/com/sun/star/util/InvalidStateException.idl diff --git a/offapi/com/sun/star/ui/dialogs/XWizard.idl b/offapi/com/sun/star/ui/dialogs/XWizard.idl index 0d6a92cbd164..a3aa93b9cc62 100644 --- a/offapi/com/sun/star/ui/dialogs/XWizard.idl +++ b/offapi/com/sun/star/ui/dialogs/XWizard.idl @@ -28,27 +28,87 @@ #define __com_sun_star_ui_dialogs_XWizard_idl__ #include +#include +#include //================================================================================================================== - module com { module sun { module star { module ui { module dialogs { -interface XWizardPage; - //================================================================================================================== +interface XWizardPage; + /** */ interface XWizard { interface XExecutableDialog; + /** is the help URL of the wizard's main window. + */ + [attribute] string HelpURL; + + /** provides access to the current page of the wizard + */ + XWizardPage + getCurrentPage(); + + /** enables or disables a certain button in the wizard + +

Normally, you will want to use this method for the Finish button only: The Next + and Back buttons are usually maintained automatically, the Help and Cancel + buttons are unlikely to ever being disabled.

+ + @param WizardButton + denotes the button to enable or disable, as one of the WizardButton constants + @param Enable + specifies whether the button should be enabled () or disabled () + */ void enableButton( [in] short WizardButton, [in] boolean Enable ); + + /** sets a button in the wizard as default button + +

In general, the default button in a wizard is the one which is activated when the user presses + the return key while the focus is in a control which does not handle this key itself (such as + ordinary input controls).

+ +

You can use this method, for instance, to make the Next button the default button on all pages + except the last one, where Finish should be defaulted.

+ */ void setDefaultButton( [in] short WizardButton ); + /** travels to the next page, if possible + +

Calling this method is equivalent to the user pressing the Next button in the wizard. Consequently, + the method will fail if in the current state of the wizard, it is not allowed to advance to a next page.

+ */ boolean travelNext(); + + /** travels to the next page, if possible + +

Calling this method is equivalent to the user pressing the Back button in the wizard.

+ */ boolean travelPrevious(); + /** enables or disables the given page + +

You can use this method when not all pages of your wizard are necessarily needed in all cases. For instance, + assume that your first wizard page contains a check box, which the user can check to enter additional data. + If you place this data on the second page, then you will want to enable this second page if and only if the + checkbox is checked.

+ +

If a page is disabled, it can reached neither by clicking the respective item in the wizard's roadmap, + nor by sequential traveling. Still, the page's item is displayed in the roadmap, though disabled.

+ + @throws ::com::sun::star::container::NoSuchElementException + if there is no page with the given ID + @throws ::com::sun::star::util::InvalidStateException + if the page shall be disabled, but is active currently. + */ + void enablePage( [in] short PageID, [in] boolean Enable ) + raises ( ::com::sun::star::container::NoSuchElementException + , ::com::sun::star::util::InvalidStateException ); + /** updates the wizard elements which are related to traveling.

For instance, the Next button is disabled if the current page's XWizardPage::canAdvance @@ -59,11 +119,61 @@ interface XWizard */ void updateTravelUI(); + /** advances to the given page, if possible. + +

Calling this method is equivalent to the user repeatedly pressing the Next button, until the + given page is reached. Consequently, the method will fail if one of the intermediate pages does not allow + advancing to the next page.

+ */ boolean advanceTo( [in] short PageId ); + + /** goes back to the given page, if possible. + +

Calling this method is equivalent to the user repeatedly pressing the Back button, until the + given page is reached.

+ */ boolean goBackTo( [in] short PageId ); - XWizardPage - getCurrentPage(); + /** activates a path + +

If the wizard has been created with multiple paths of control flow, then this method allows switching to + another path.

+ +

You can only activate a path which shares the first k pages with the path + which is previously active (if any), where k is the index of the current page within the current + path.

+ +

Example: Say you have paths, (0,1,2,5) and (0,1,4,5) (with + the numbers denoting page IDs). This means that after page 1, you either continue with page + 2 or state 4,and after this, you finish in state 5.
+ Now if the first path is active, and your current state is 1, then you can easily switch to the + second path, since both paths start with (0,1).
+ However, if your current state is 2, then you can not switch to the second path anymore.

+ + @param PathIndex + the index of the path, as used in the Wizard::createMultiplePathsWizard constructor. + @param Final +

If , the path will be completely activated, even if it is a conflicting path (i.e. there is another + path which shares the first k states with the to-be-activated path.)

+ +

If , then the new path is checked for conflicts with other paths. If such conflicts exists, the path + is not completely activated, but only up to the point where it does not conflict.

+ +

In this latter case, you need another activatePath method (usually triggered by the user doing some decisions + and entering some data on the reachable pages) before the wizard can actually be finished.

+ +

With the paths in the example above, if you activate the second path, then only steps 0 and + 1 are activated, since they are common to both paths. Steps 2, 4, + and 5 are not reachable, yet.

+ + @throws ::com::sun::star::container::NoSuchElementException + if there is no path with the given index + @throws ::com::sun::star::util::InvalidStateException + if the path cannot be activated in the current state of the wizard. + */ + void activatePath( [in] short PathIndex, [in] boolean Final ) + raises ( ::com::sun::star::container::NoSuchElementException + , ::com::sun::star::util::InvalidStateException ); }; //================================================================================================================== diff --git a/offapi/com/sun/star/util/InvalidStateException.idl b/offapi/com/sun/star/util/InvalidStateException.idl new file mode 100644 index 000000000000..7d59abbcbac6 --- /dev/null +++ b/offapi/com/sun/star/util/InvalidStateException.idl @@ -0,0 +1,50 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef __com_sun_star_util_InvalidStateException_idl__ +#define __com_sun_star_util_InvalidStateException_idl__ + +#include + +//================================================================================================================== + +module com { module sun { module star { module util { + +//================================================================================================================== + +/** is thrown when an object's state does not allow to call requested functionality. + */ +exception InvalidStateException : com::sun::star::uno::Exception +{ +}; + +//================================================================================================================== + +}; }; }; }; + +//================================================================================================================== + +#endif diff --git a/offapi/com/sun/star/util/makefile.mk b/offapi/com/sun/star/util/makefile.mk index 75b5dde890c0..aa0374296ddb 100644 --- a/offapi/com/sun/star/util/makefile.mk +++ b/offapi/com/sun/star/util/makefile.mk @@ -53,6 +53,7 @@ IDLFILES=\ ElementChange.idl \ Endianness.idl \ FileIOException.idl\ + InvalidStateException.idl\ Language.idl\ NumberFormat.idl\ NumberFormatProperties.idl\ -- cgit v1.2.3 From 0a19bf808bd6871825296c03993f5a6b49286802 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 21 May 2010 15:44:37 +0200 Subject: unoawt: fixed a bug found by GCC's compiler warning --- svtools/source/uno/wizard/unowizard.cxx | 2 +- svtools/source/uno/wizard/wizardshell.hxx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/svtools/source/uno/wizard/unowizard.cxx b/svtools/source/uno/wizard/unowizard.cxx index 3169f5342f50..ae9109fdfa00 100644 --- a/svtools/source/uno/wizard/unowizard.cxx +++ b/svtools/source/uno/wizard/unowizard.cxx @@ -418,7 +418,7 @@ namespace svt { namespace uno WizardShell* pWizardImpl = dynamic_cast< WizardShell* >( m_pDialog ); ENSURE_OR_RETURN_VOID( pWizardImpl, "Wizard::activatePath: invalid dialog implementation!" ); - pWizardImpl->activatePath( i_PathIndex ); + pWizardImpl->activatePath( i_PathIndex, i_Final ); } //------------------------------------------------------------------------------------------------------------------ diff --git a/svtools/source/uno/wizard/wizardshell.hxx b/svtools/source/uno/wizard/wizardshell.hxx index 4c44f5512d58..b20c9bd6678a 100644 --- a/svtools/source/uno/wizard/wizardshell.hxx +++ b/svtools/source/uno/wizard/wizardshell.hxx @@ -84,9 +84,9 @@ namespace svt { namespace uno sal_Bool travelNext() { return WizardShell_Base::travelNext(); } sal_Bool travelPrevious() { return WizardShell_Base::travelPrevious(); } - void activatePath( const sal_Int16 i_nPathID ) + void activatePath( const sal_Int16 i_nPathID, const sal_Bool i_bFinal ) { - WizardShell_Base::activatePath( PathId( i_nPathID ) ); + WizardShell_Base::activatePath( PathId( i_nPathID ), i_bFinal ); } ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XWizardPage > -- cgit v1.2.3 From a945465b157aa23f25531fa3b984541428a27fb4 Mon Sep 17 00:00:00 2001 From: Ingrid Halama Date: Fri, 21 May 2010 15:53:45 +0200 Subject: chart47: #i83831# problems with character properties at title --- .../chartapiwrapper/ChartDocumentWrapper.cxx | 2 ++ .../controller/chartapiwrapper/TitleWrapper.cxx | 32 ++++++++++++++++++++++ .../controller/chartapiwrapper/TitleWrapper.hxx | 3 ++ 3 files changed, 37 insertions(+) diff --git a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx index 04f1ca37de9e..5bc61d0fc0b3 100644 --- a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx @@ -742,6 +742,7 @@ Reference< drawing::XShape > SAL_CALL ChartDocumentWrapper::getTitle() { if( !m_xTitle.is() ) { + ControllerLockGuard aCtrlLockGuard( Reference< frame::XModel >( m_spChart2ModelContact->getChart2Document(), uno::UNO_QUERY )); m_xTitle = new TitleWrapper( TitleHelper::MAIN_TITLE, m_spChart2ModelContact ); } return m_xTitle; @@ -752,6 +753,7 @@ Reference< drawing::XShape > SAL_CALL ChartDocumentWrapper::getSubTitle() { if( !m_xSubTitle.is() ) { + ControllerLockGuard aCtrlLockGuard( Reference< frame::XModel >( m_spChart2ModelContact->getChart2Document(), uno::UNO_QUERY )); m_xSubTitle = new TitleWrapper( TitleHelper::SUB_TITLE, m_spChart2ModelContact ); } return m_xSubTitle; diff --git a/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx b/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx index ec972f8b21ba..20785faa8b66 100644 --- a/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx @@ -30,6 +30,8 @@ #include "TitleWrapper.hxx" #include "macros.hxx" #include "ContainerHelper.hxx" +#include "ControllerLockGuard.hxx" + #include #include #include @@ -225,6 +227,9 @@ TitleWrapper::TitleWrapper( ::chart::TitleHelper::eTitleType eTitleType, m_aEventListenerContainer( m_aMutex ), m_eTitleType(eTitleType) { + ControllerLockGuard aCtrlLockGuard( Reference< frame::XModel >( m_spChart2ModelContact->getChart2Document(), uno::UNO_QUERY )); + if( !getTitleObject().is() ) //#i83831# create an empty title at the model, thus references to properties can be mapped mapped correctly + TitleHelper::createTitle( m_eTitleType, OUString(), m_spChart2ModelContact->getChartModel(), m_spChart2ModelContact->m_xContext ); } TitleWrapper::~TitleWrapper() @@ -451,6 +456,33 @@ Any SAL_CALL TitleWrapper::getPropertyDefault( const OUString& rPropertyName ) return aRet; } +void SAL_CALL TitleWrapper::addPropertyChangeListener( const OUString& rPropertyName, const Reference< beans::XPropertyChangeListener >& xListener ) + throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) +{ + sal_Int32 nHandle = getInfoHelper().getHandleByName( rPropertyName ); + if( CharacterProperties::IsCharacterPropertyHandle( nHandle ) ) + { + Reference< beans::XPropertySet > xPropSet( getFirstCharacterPropertySet(), uno::UNO_QUERY ); + if( xPropSet.is() ) + xPropSet->addPropertyChangeListener( rPropertyName, xListener ); + } + else + WrappedPropertySet::addPropertyChangeListener( rPropertyName, xListener ); +} +void SAL_CALL TitleWrapper::removePropertyChangeListener( const OUString& rPropertyName, const Reference< beans::XPropertyChangeListener >& xListener ) + throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) +{ + sal_Int32 nHandle = getInfoHelper().getHandleByName( rPropertyName ); + if( CharacterProperties::IsCharacterPropertyHandle( nHandle ) ) + { + Reference< beans::XPropertySet > xPropSet( getFirstCharacterPropertySet(), uno::UNO_QUERY ); + if( xPropSet.is() ) + xPropSet->removePropertyChangeListener( rPropertyName, xListener ); + } + else + WrappedPropertySet::removePropertyChangeListener( rPropertyName, xListener ); +} + // ================================================================================ //ReferenceSizePropertyProvider diff --git a/chart2/source/controller/chartapiwrapper/TitleWrapper.hxx b/chart2/source/controller/chartapiwrapper/TitleWrapper.hxx index fba346702d2a..63902e452ee3 100644 --- a/chart2/source/controller/chartapiwrapper/TitleWrapper.hxx +++ b/chart2/source/controller/chartapiwrapper/TitleWrapper.hxx @@ -104,6 +104,9 @@ protected: virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::beans::PropertyState SAL_CALL getPropertyState( const ::rtl::OUString& PropertyName ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL setPropertyToDefault( const ::rtl::OUString& PropertyName ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); -- cgit v1.2.3 From a5bd7ab9d12517a3dacfc9201a616acad855c4cd Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 21 May 2010 16:01:22 +0200 Subject: unoawt: some SolarMutex locks in the notification methods, to prevent deadlocks --- svtools/source/uno/svtxgridcontrol.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/svtools/source/uno/svtxgridcontrol.cxx b/svtools/source/uno/svtxgridcontrol.cxx index 1514d585cd98..264dfd6342f7 100755 --- a/svtools/source/uno/svtxgridcontrol.cxx +++ b/svtools/source/uno/svtxgridcontrol.cxx @@ -437,6 +437,8 @@ void SAL_CALL SVTXGridControl::setFocus() throw(::com::sun::star::uno::RuntimeEx } void SAL_CALL SVTXGridControl::rowAdded(const ::com::sun::star::awt::grid::GridDataEvent& Event ) throw (::com::sun::star::uno::RuntimeException) { + ::vos::OGuard aGuard( GetMutex() ); + std::vector< Any > newRow; Sequence< Any > rawRowData = Event.rowData; int colCount = m_xColumnModel->getColumnCount(); @@ -483,6 +485,8 @@ void SAL_CALL SVTXGridControl::rowAdded(const ::com::sun::star::awt::grid::GridD void SAL_CALL SVTXGridControl::rowRemoved(const ::com::sun::star::awt::grid::GridDataEvent& Event ) throw (::com::sun::star::uno::RuntimeException) { + ::vos::OGuard aGuard( GetMutex() ); + TableControl* pTable = (TableControl*)GetWindow(); if(Event.index == -1) { @@ -524,6 +528,8 @@ void SAL_CALL SVTXGridControl::rowRemoved(const ::com::sun::star::awt::grid::Gri void SAL_CALL SVTXGridControl::columnChanged(const ::com::sun::star::awt::grid::GridColumnEvent& Event ) throw (::com::sun::star::uno::RuntimeException) { + ::vos::OGuard aGuard( GetMutex() ); + TableControl* pTable = (TableControl*)GetWindow(); if(Event.valueName == rtl::OUString::createFromAscii("ColumnResize")) { @@ -571,6 +577,8 @@ void SAL_CALL SVTXGridControl::columnChanged(const ::com::sun::star::awt::grid: } void SAL_CALL SVTXGridControl::dataChanged(const ::com::sun::star::awt::grid::GridDataEvent& Event ) throw (::com::sun::star::uno::RuntimeException) { + ::vos::OGuard aGuard( GetMutex() ); + TableControl* pTable = (TableControl*)GetWindow(); if(Event.valueName == rtl::OUString::createFromAscii("RowHeight")) { -- cgit v1.2.3 From 6760ebfafbd8da1fb907211621079e96c2d11741 Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Fri, 21 May 2010 16:07:16 +0200 Subject: fwk139: #i110002# Remove unused code from desktop project --- desktop/source/deployment/dp_xml.cxx | 209 ++------------------- .../deployment/inc/dp_descriptioninfoset.hxx | 10 - desktop/source/deployment/inc/dp_xml.h | 104 ---------- .../deployment/misc/dp_descriptioninfoset.cxx | 6 - .../migration/services/oo3extensionmigration.cxx | 73 +------ .../migration/services/oo3extensionmigration.hxx | 8 - desktop/source/migration/wizard.cxx | 5 - desktop/source/migration/wizard.hxx | 1 - 8 files changed, 15 insertions(+), 401 deletions(-) diff --git a/desktop/source/deployment/dp_xml.cxx b/desktop/source/deployment/dp_xml.cxx index 0453ab8372c0..65c48d70c92d 100644 --- a/desktop/source/deployment/dp_xml.cxx +++ b/desktop/source/deployment/dp_xml.cxx @@ -42,6 +42,20 @@ using ::rtl::OUString; namespace dp_misc { +//============================================================================== +void xml_parse( + Reference const & xRoot, + ::ucbhelper::Content & ucb_content, + Reference const & xContext ) +{ + const Any arg(xRoot); + const Reference xDocHandler( + xContext->getServiceManager()->createInstanceWithArgumentsAndContext( + OUSTR("com.sun.star.xml.input.SaxDocumentHandler"), + Sequence( &arg, 1 ), xContext ), UNO_QUERY_THROW ); + xml_parse( xDocHandler, ucb_content, xContext ); + } + //============================================================================== void xml_parse( Reference const & xDocHandler, @@ -61,199 +75,4 @@ void xml_parse( xParser->parseStream( source ); } -//============================================================================== -void xml_parse( - Reference const & xRoot, - ::ucbhelper::Content & ucb_content, - Reference const & xContext ) -{ - const Any arg(xRoot); - const Reference xDocHandler( - xContext->getServiceManager()->createInstanceWithArgumentsAndContext( - OUSTR("com.sun.star.xml.input.SaxDocumentHandler"), - Sequence( &arg, 1 ), xContext ), UNO_QUERY_THROW ); - xml_parse( xDocHandler, ucb_content, xContext ); -} - -//############################################################################## - -//______________________________________________________________________________ -XmlRootElement::XmlRootElement( - OUString const & uri, OUString const & localname ) - : m_uri( uri ) -{ - m_localname = localname; -} - -//______________________________________________________________________________ -XmlRootElement::~XmlRootElement() -{ -} - -// XRoot -//______________________________________________________________________________ -void XmlRootElement::startDocument( - Reference const & xMapping ) - throw (xml::sax::SAXException, RuntimeException) -{ - m_xNamespaceMapping = xMapping; - - try { - m_uid = m_xNamespaceMapping->getUidByUri( m_uri ); - } - catch (container::NoSuchElementException & exc) { - throw xml::sax::SAXException( - exc.Message, static_cast(this), Any(exc) ); - } -} - -//______________________________________________________________________________ -void XmlRootElement::endDocument() - throw (xml::sax::SAXException, RuntimeException) -{ -} - -//______________________________________________________________________________ -void XmlRootElement::processingInstruction( - OUString const &, OUString const & ) - throw (xml::sax::SAXException, RuntimeException) -{ -} - -//______________________________________________________________________________ -void XmlRootElement::setDocumentLocator( - Reference const & ) - throw (xml::sax::SAXException, RuntimeException) -{ -} - -//______________________________________________________________________________ -Reference XmlRootElement::startRootElement( - sal_Int32 uid, OUString const & localname, - Reference const & xAttributes ) - throw (xml::sax::SAXException, RuntimeException) -{ - check_xmlns( uid ); - if (! localname.equals( m_localname )) { - throw xml::sax::SAXException( - OUSTR("unexpected root element ") + localname, - static_cast(this), Any() ); - } - m_xAttributes = xAttributes; - - return this; -} - -//############################################################################## - -//______________________________________________________________________________ -XmlElement::~XmlElement() -{ -} - -//______________________________________________________________________________ -void XmlElement::check_xmlns( sal_Int32 uid ) const - throw (xml::sax::SAXException) -{ - if (uid != m_uid) - { - ::rtl::OUStringBuffer buf; - buf.appendAscii( - RTL_CONSTASCII_STRINGPARAM("illegal xml namespace uri=\"") ); - try { - buf.append( m_xNamespaceMapping->getUriByUid( uid ) ); - } - catch (container::NoSuchElementException & exc) { - throw xml::sax::SAXException( - exc.Message, static_cast( - const_cast(this) ), Any(exc) ); - } - buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("\"!") ); - throw xml::sax::SAXException( - buf.makeStringAndClear(), - static_cast( const_cast(this) ), - Any() ); - } -} - -// XElement -//______________________________________________________________________________ -Reference XmlElement::getParent() - throw (RuntimeException) -{ - return m_xParent; -} - -//______________________________________________________________________________ -OUString XmlElement::getLocalName() - throw (RuntimeException) -{ - return m_localname; -} - -//______________________________________________________________________________ -sal_Int32 XmlElement::getUid() - throw (RuntimeException) -{ - return m_uid; -} - -//______________________________________________________________________________ -Reference XmlElement::getAttributes() - throw (RuntimeException) -{ - return m_xAttributes; -} - -//______________________________________________________________________________ -void XmlElement::ignorableWhitespace( - OUString const & ) - throw (xml::sax::SAXException, RuntimeException) -{ -} - -//______________________________________________________________________________ -void XmlElement::characters( OUString const & chars ) - throw (xml::sax::SAXException, RuntimeException) -{ - m_characters += chars; -} - -//______________________________________________________________________________ -void XmlElement::processingInstruction( - OUString const &, OUString const & ) - throw (xml::sax::SAXException, RuntimeException) -{ -} - -//______________________________________________________________________________ -void XmlElement::endElement() - throw (xml::sax::SAXException, RuntimeException) -{ - m_got_endElement = true; -} - -//______________________________________________________________________________ -Reference XmlElement::startChildElement( - sal_Int32 uid, OUString const & localName, - Reference const & ) - throw (xml::sax::SAXException, RuntimeException) -{ - ::rtl::OUStringBuffer buf; - buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("unexpected element " - "{ tag=\"") ); - buf.append( localName ); - buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("\", uri=\"") ); - try { - buf.append( m_xNamespaceMapping->getUriByUid( uid ) ); - } - catch (container::NoSuchElementException & exc) { - throw xml::sax::SAXException( - exc.Message, static_cast(this), Any(exc) ); - } - buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("\" }!") ); - throw xml::sax::SAXException( - buf.makeStringAndClear(), static_cast(this), Any() ); -} - } diff --git a/desktop/source/deployment/inc/dp_descriptioninfoset.hxx b/desktop/source/deployment/inc/dp_descriptioninfoset.hxx index 38a1870782ed..e58ff1e71acd 100644 --- a/desktop/source/deployment/inc/dp_descriptioninfoset.hxx +++ b/desktop/source/deployment/inc/dp_descriptioninfoset.hxx @@ -216,16 +216,6 @@ public: */ ::rtl::OUString getIconURL( sal_Bool bHighContrast ) const; - /** - Allow direct access to the XPath functionality. - - @return - direct access to the XPath functionality; null iff this instance was - constructed with a null element - */ - ::com::sun::star::uno::Reference< ::com::sun::star::xml::xpath::XXPathAPI > - getXpath() const; - private: SAL_DLLPRIVATE ::boost::optional< ::rtl::OUString > getOptionalValue( ::rtl::OUString const & expression) const; diff --git a/desktop/source/deployment/inc/dp_xml.h b/desktop/source/deployment/inc/dp_xml.h index 41c12f282428..300051bd1512 100644 --- a/desktop/source/deployment/inc/dp_xml.h +++ b/desktop/source/deployment/inc/dp_xml.h @@ -52,110 +52,6 @@ void xml_parse( ::ucbhelper::Content & ucb_content, css::uno::Reference< css::uno::XComponentContext > const & xContext ); -//============================================================================== -void xml_parse( - css::uno::Reference< css::xml::input::XRoot > const & xRoot, - ::ucbhelper::Content & ucb_content, - css::uno::Reference< css::uno::XComponentContext > const & xContext ); - -//============================================================================== -class XmlElement : public ::cppu::WeakImplHelper1< css::xml::input::XElement > -{ -protected: - css::uno::Reference m_xNamespaceMapping; - const css::uno::Reference m_xParent; - sal_Int32 m_uid; - ::rtl::OUString m_localname; - css::uno::Reference m_xAttributes; - ::rtl::OUString m_characters; - bool m_got_endElement; - - void check_xmlns( sal_Int32 uid ) const throw (css::xml::sax::SAXException); - - inline XmlElement() - : m_uid( -1 ), - m_got_endElement( false ) - {} - virtual ~XmlElement(); -public: - inline bool isParsed() const { return m_got_endElement; } - - inline XmlElement( - css::uno::Reference - const & xMapping, - css::uno::Reference const & xParent, - sal_Int32 uid, ::rtl::OUString const & localname, - css::uno::Reference< css::xml::input::XAttributes > - const & xAttributes ) - : m_xNamespaceMapping( xMapping ), - m_xParent( xParent ), - m_uid( uid ), - m_localname( localname ), - m_xAttributes( xAttributes ), - m_got_endElement( false ) - {} - - // XElement - virtual css::uno::Reference SAL_CALL - getParent() throw (css::uno::RuntimeException); - virtual ::rtl::OUString SAL_CALL getLocalName() - throw (css::uno::RuntimeException); - virtual sal_Int32 SAL_CALL getUid() - throw (css::uno::RuntimeException); - virtual css::uno::Reference SAL_CALL - getAttributes() throw (css::uno::RuntimeException); - virtual void SAL_CALL ignorableWhitespace( - ::rtl::OUString const & rWhitespaces ) - throw (css::xml::sax::SAXException, css::uno::RuntimeException); - virtual void SAL_CALL characters( ::rtl::OUString const & rChars ) - throw (css::xml::sax::SAXException, css::uno::RuntimeException); - virtual void SAL_CALL processingInstruction( - ::rtl::OUString const & Target, ::rtl::OUString const & Data ) - throw (css::xml::sax::SAXException, css::uno::RuntimeException); - virtual void SAL_CALL endElement() - throw (css::xml::sax::SAXException, css::uno::RuntimeException); - virtual css::uno::Reference SAL_CALL - startChildElement( - sal_Int32 nUid, ::rtl::OUString const & rLocalName, - css::uno::Reference const & xAttributes ) - throw (css::xml::sax::SAXException, css::uno::RuntimeException); -}; - -//============================================================================== -class XmlRootElement : public ::cppu::ImplInheritanceHelper1< - XmlElement, css::xml::input::XRoot > -{ - const ::rtl::OUString m_uri; - -protected: - virtual ~XmlRootElement(); -public: - inline ::rtl::OUString const & getUri() const - { return m_uri; } - - XmlRootElement( - ::rtl::OUString const & uri, ::rtl::OUString const & localname ); - - // XRoot - virtual void SAL_CALL startDocument( - css::uno::Reference - const & xMapping ) - throw (css::xml::sax::SAXException, css::uno::RuntimeException); - virtual void SAL_CALL endDocument() - throw (css::xml::sax::SAXException, css::uno::RuntimeException); - virtual void SAL_CALL processingInstruction( - ::rtl::OUString const & target, ::rtl::OUString const & data ) - throw (css::xml::sax::SAXException, css::uno::RuntimeException); - virtual void SAL_CALL setDocumentLocator( - css::uno::Reference const & xLocator ) - throw (css::xml::sax::SAXException, css::uno::RuntimeException); - virtual css::uno::Reference SAL_CALL - startRootElement( - sal_Int32 uid, ::rtl::OUString const & localname, - css::uno::Reference const & xAttributes ) - throw (css::xml::sax::SAXException, css::uno::RuntimeException); -}; - } #endif diff --git a/desktop/source/deployment/misc/dp_descriptioninfoset.cxx b/desktop/source/deployment/misc/dp_descriptioninfoset.cxx index 28f45918e9e2..049f781dfd90 100644 --- a/desktop/source/deployment/misc/dp_descriptioninfoset.cxx +++ b/desktop/source/deployment/misc/dp_descriptioninfoset.cxx @@ -264,12 +264,6 @@ DescriptionInfoset::getUpdateDownloadUrls() const ::boost::optional< ::rtl::OUString >(); } -css::uno::Reference< css::xml::xpath::XXPathAPI > DescriptionInfoset::getXpath() - const -{ - return m_xpath; -} - ::boost::optional< ::rtl::OUString > DescriptionInfoset::getOptionalValue( ::rtl::OUString const & expression) const { diff --git a/desktop/source/migration/services/oo3extensionmigration.cxx b/desktop/source/migration/services/oo3extensionmigration.cxx index 11bf8129cc04..b7da88b85013 100755 --- a/desktop/source/migration/services/oo3extensionmigration.cxx +++ b/desktop/source/migration/services/oo3extensionmigration.cxx @@ -139,17 +139,7 @@ OO3ExtensionMigration::~OO3ExtensionMigration() } } -void OO3ExtensionMigration::registerConfigurationPackage( const uno::Reference< deployment::XPackage > & xPkg) -{ - const ::rtl::OUString sMediaType = xPkg->getPackageType()->getMediaType(); - if ( (sMediaType.equals(sConfigurationDataType) || sMediaType.equals(sConfigurationSchemaType) ) ) - { - xPkg->revokePackage(uno::Reference< task::XAbortChannel >(), uno::Reference< ucb::XCommandEnvironment> ()); - xPkg->registerPackage(uno::Reference< task::XAbortChannel >(), uno::Reference< ucb::XCommandEnvironment> ()); - } -} - - void OO3ExtensionMigration::scanUserExtensions( const ::rtl::OUString& sSourceDir, TStringVector& aMigrateExtensions ) +void OO3ExtensionMigration::scanUserExtensions( const ::rtl::OUString& sSourceDir, TStringVector& aMigrateExtensions ) { osl::Directory aScanRootDir( sSourceDir ); osl::FileStatus fs(FileStatusMask_Type | FileStatusMask_FileURL); @@ -382,35 +372,6 @@ bool OO3ExtensionMigration::migrateExtension( const ::rtl::OUString& sSourceDir return false; } -bool OO3ExtensionMigration::copy( const ::rtl::OUString& sSourceDir, const ::rtl::OUString& sTargetDir ) -{ - bool bRet = false; - - INetURLObject aSourceObj( sSourceDir ); - INetURLObject aDestObj( sTargetDir ); - String aName = aDestObj.getName(); - aDestObj.removeSegment(); - aDestObj.setFinalSlash(); - - try - { - ::ucbhelper::Content aDestPath( aDestObj.GetMainURL( INetURLObject::NO_DECODE ), uno::Reference< ucb::XCommandEnvironment > () ); - uno::Reference< ucb::XCommandInfo > xInfo = aDestPath.getCommands(); - ::rtl::OUString aTransferName = ::rtl::OUString::createFromAscii( "transfer" ); - if ( xInfo->hasCommandByName( aTransferName ) ) - { - aDestPath.executeCommand( aTransferName, uno::makeAny( - ucb::TransferInfo( sal_False, aSourceObj.GetMainURL( INetURLObject::NO_DECODE ), aName, ucb::NameClash::OVERWRITE ) ) ); - bRet = true; - } - } - catch( uno::Exception& ) - { - } - - return bRet; -} - // ----------------------------------------------------------------------------- // XServiceInfo @@ -496,32 +457,6 @@ TStringVectorPtr getContent( const ::rtl::OUString& rBaseURL ) return aResult; } -// ----------------------------------------------------------------------------- -// XJob -// ----------------------------------------------------------------------------- - -void OO3ExtensionMigration::copyConfig( const ::rtl::OUString& sSourceDir, const ::rtl::OUString& sTargetDir ) -{ - ::rtl::OUString sEx1( m_sSourceDir ); - sEx1 += sExcludeDir1; - ::rtl::OUString sEx2( m_sSourceDir ); - sEx2 += sExcludeDir2; - - TStringVectorPtr aList = getContent( sSourceDir ); - TStringVector::const_iterator aI = aList->begin(); - while ( aI != aList->end() ) - { - ::rtl::OUString sSourceLocalName = aI->copy( sSourceDir.getLength() ); - ::rtl::OUString aTemp = aI->copy( m_sSourceDir.getLength() ); - if ( aTemp != sExcludeDir1 && aTemp != sExcludeDir2 ) - { - ::rtl::OUString sTargetName = sTargetDir + sSourceLocalName; - copy( (*aI), sTargetName ); - } - ++aI; - } -} - Any OO3ExtensionMigration::execute( const Sequence< beans::NamedValue >& ) throw (lang::IllegalArgumentException, Exception, RuntimeException) { @@ -559,12 +494,6 @@ TmpRepositoryCommandEnv::TmpRepositoryCommandEnv() { } -TmpRepositoryCommandEnv::TmpRepositoryCommandEnv( - uno::Reference< task::XInteractionHandler> const & handler) - : m_forwardHandler(handler) -{ -} - TmpRepositoryCommandEnv::~TmpRepositoryCommandEnv() { } diff --git a/desktop/source/migration/services/oo3extensionmigration.hxx b/desktop/source/migration/services/oo3extensionmigration.hxx index a001f41d92c5..fb7e69c2b87f 100755 --- a/desktop/source/migration/services/oo3extensionmigration.hxx +++ b/desktop/source/migration/services/oo3extensionmigration.hxx @@ -97,16 +97,10 @@ namespace migration }; ::osl::FileBase::RC checkAndCreateDirectory( INetURLObject& rDirURL ); - void copyConfig( const ::rtl::OUString& sSourceDir, const ::rtl::OUString& sTargetDir ); - bool copy( const ::rtl::OUString& sSourceDir, const ::rtl::OUString& sTargetDir ); ScanResult scanExtensionFolder( const ::rtl::OUString& sExtFolder ); void scanUserExtensions( const ::rtl::OUString& sSourceDir, TStringVector& aMigrateExtensions ); bool scanDescriptionXml( const ::rtl::OUString& sDescriptionXmlFilePath ); bool migrateExtension( const ::rtl::OUString& sSourceDir ); - /* fills m_scriptElements and m_dialogElements - */ - void registerConfigurationPackage( - const ::com::sun::star::uno::Reference< ::com::sun::star::deployment::XPackage > & xPkg); public: OO3ExtensionMigration(::com::sun::star::uno::Reference< @@ -142,8 +136,6 @@ namespace migration public: virtual ~TmpRepositoryCommandEnv(); TmpRepositoryCommandEnv(); - TmpRepositoryCommandEnv( - ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler> const & handler); // XCommandEnvironment virtual ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler > SAL_CALL diff --git a/desktop/source/migration/wizard.cxx b/desktop/source/migration/wizard.cxx index 48ee2abc71ca..d3f5b0a9d66f 100644 --- a/desktop/source/migration/wizard.cxx +++ b/desktop/source/migration/wizard.cxx @@ -219,11 +219,6 @@ FirstStartWizard::FirstStartWizard( Window* pParent, sal_Bool bLicenseNeedsAccep defaultButton(WZB_NEXT); } -void FirstStartWizard::EnableButtonsWhileMigration() -{ - enableButtons(0xff, sal_True); -} - void FirstStartWizard::DisableButtonsWhileMigration() { enableButtons(0xff, sal_False); diff --git a/desktop/source/migration/wizard.hxx b/desktop/source/migration/wizard.hxx index e41bfe373cde..018b68dead1c 100644 --- a/desktop/source/migration/wizard.hxx +++ b/desktop/source/migration/wizard.hxx @@ -62,7 +62,6 @@ public: virtual short Execute(); virtual long PreNotify( NotifyEvent& rNEvt ); - void EnableButtonsWhileMigration(); void DisableButtonsWhileMigration(); private: -- cgit v1.2.3 From 03e633da1c0379dbee2b18d505706c709c7a89c7 Mon Sep 17 00:00:00 2001 From: Niklas Nebel Date: Fri, 21 May 2010 18:18:01 +0200 Subject: calc54: #i54993# when fitting pages to width or height, ignore manual breaks in that direction --- sc/source/core/data/table5.cxx | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/sc/source/core/data/table5.cxx b/sc/source/core/data/table5.cxx index 3a7117dfcd10..a3a0153a4b97 100644 --- a/sc/source/core/data/table5.cxx +++ b/sc/source/core/data/table5.cxx @@ -114,14 +114,25 @@ void ScTable::UpdatePageBreaks( const ScRange* pUserArea ) } // sonst alles } - // bSkipBreaks holen: + // get bSkipColBreaks/bSkipRowBreaks flags: - BOOL bSkipBreaks = FALSE; + bool bSkipColBreaks = false; + bool bSkipRowBreaks = false; if ( pStyleSet->GetItemState( ATTR_PAGE_SCALETOPAGES, FALSE, &pItem ) == SFX_ITEM_SET ) { DBG_ASSERT( pItem->ISA(SfxUInt16Item), "falsches Item" ); - bSkipBreaks = ( ((const SfxUInt16Item*)pItem)->GetValue() > 0 ); + bSkipColBreaks = bSkipRowBreaks = ( ((const SfxUInt16Item*)pItem)->GetValue() > 0 ); + } + + if ( !bSkipColBreaks && pStyleSet->GetItemState(ATTR_PAGE_SCALETO, FALSE, &pItem) == SFX_ITEM_SET ) + { + // #i54993# when fitting to width or height, ignore only manual breaks in that direction + const ScPageScaleToItem* pScaleToItem = static_cast(pItem); + if ( pScaleToItem->GetWidth() > 0 ) + bSkipColBreaks = true; + if ( pScaleToItem->GetHeight() > 0 ) + bSkipRowBreaks = true; } //-------------------------------------------------------------------------- @@ -149,7 +160,7 @@ void ScTable::UpdatePageBreaks( const ScRange* pUserArea ) { BOOL bStartOfPage = FALSE; long nThisX = ( pColFlags[nX] & CR_HIDDEN ) ? 0 : pColWidth[nX]; - if ( (nSizeX+nThisX > nPageSizeX) || ((pColFlags[nX] & CR_MANUALBREAK) && !bSkipBreaks) ) + if ( (nSizeX+nThisX > nPageSizeX) || ((pColFlags[nX] & CR_MANUALBREAK) && !bSkipColBreaks) ) { pColFlags[nX] |= CR_PAGEBREAK; nSizeX = 0; @@ -187,7 +198,7 @@ void ScTable::UpdatePageBreaks( const ScRange* pUserArea ) BOOL bStartOfPage = FALSE; BYTE nFlags = *aFlagsIter; long nThisY = (nFlags & CR_HIDDEN) ? 0 : *aHeightIter; - if ( (nSizeY+nThisY > nPageSizeY) || ((nFlags & CR_MANUALBREAK) && !bSkipBreaks) ) + if ( (nSizeY+nThisY > nPageSizeY) || ((nFlags & CR_MANUALBREAK) && !bSkipRowBreaks) ) { pRowFlags->SetValue( nY, nFlags | CR_PAGEBREAK); aFlagsIter.Resync( nY); -- cgit v1.2.3 From f786d740fb0e108efbd471c8628daf3bf5f4bfe9 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Tue, 25 May 2010 10:17:24 +0200 Subject: unoawt: completely separated the controller functionality of a wizard page from the wizard page itself, by moving the canAdvance method from OWizardPage to the IWizardPage interface, which in this course has been renamed to IWizardPageController. This will later on allow to have implementations where the TabPage is provided by an external component (e.g. as UNO Service), but the controlling of those pages is still intercepted and handled internally. --- svtools/inc/svtools/wizardmachine.hxx | 37 +++--- svtools/source/dialogs/roadmapwizard.cxx | 10 +- svtools/source/dialogs/wizardmachine.cxx | 30 ++--- svtools/source/uno/wizard/wizardpageshell.cxx | 170 -------------------------- svtools/source/uno/wizard/wizardpageshell.hxx | 76 ------------ 5 files changed, 41 insertions(+), 282 deletions(-) delete mode 100644 svtools/source/uno/wizard/wizardpageshell.cxx delete mode 100644 svtools/source/uno/wizard/wizardpageshell.hxx diff --git a/svtools/inc/svtools/wizardmachine.hxx b/svtools/inc/svtools/wizardmachine.hxx index 45d15390440f..9c1b8e2a6867 100644 --- a/svtools/inc/svtools/wizardmachine.hxx +++ b/svtools/inc/svtools/wizardmachine.hxx @@ -66,7 +66,7 @@ namespace svt }; }; - class SAL_NO_VTABLE IWizardPage : public WizardTypes + class SAL_NO_VTABLE IWizardPageController { public: //----------------------------------------------------------------- @@ -77,7 +77,16 @@ namespace svt // to be committed for this. // So initializePage and commitPage are designated to initialitzing/committing data on the page. virtual void initializePage() = 0; - virtual sal_Bool commitPage( CommitPageReason _eReason ) = 0; + virtual sal_Bool commitPage( WizardTypes::CommitPageReason _eReason ) = 0; + + /** determines whether or not it is allowed to advance to a next page + + You should make this dependent on the current state of the page only, not on + states on other pages of the whole dialog. + + The default implementation always returns . + */ + virtual bool canAdvance() const = 0; }; //===================================================================== @@ -86,7 +95,7 @@ namespace svt class OWizardMachine; struct WizardPageImplData; - class SVT_DLLPUBLIC OWizardPage : public TabPage, public IWizardPage + class SVT_DLLPUBLIC OWizardPage : public TabPage, public IWizardPageController { private: WizardPageImplData* m_pImpl; @@ -100,23 +109,10 @@ namespace svt OWizardPage( Window* _pParent, const ResId& _rResId ); ~OWizardPage(); - // This methods behave somewhat different than ActivatePage/DeactivatePage - // The latter are handled by the base class itself whenever changing the pages is in the offing, - // i.e., when it's already decided which page is the next. - // We may have situations where the next page depends on the state of the current, which needs - // to be committed for this. - // So initializePage and commitPage are designated to initialitzing/committing data on the page. + // IWizardPageController overridables virtual void initializePage(); - virtual sal_Bool commitPage( CommitPageReason _eReason ); - - /** determines whether or not it is allowed to advance to a next page - - You should make this dependent on the current state of the page only, not on - states on other pages of the whole dialog. - - The default implementation always returns . - */ - virtual bool canAdvance() const; + virtual sal_Bool commitPage( WizardTypes::CommitPageReason _eReason ); + virtual bool canAdvance() const; protected: // TabPage overridables @@ -342,7 +338,8 @@ namespace svt */ WizardState getCurrentState() const { return WizardDialog::GetCurLevel(); } - virtual IWizardPage* getWizardPage(TabPage* _pCurrentPage) const; + virtual IWizardPageController* + getPageController( TabPage* _pCurrentPage ) const; /** retrieves a copy of the state history, i.e. all states we already visited */ diff --git a/svtools/source/dialogs/roadmapwizard.cxx b/svtools/source/dialogs/roadmapwizard.cxx index a2ffb8ad5849..c28cfe1d4b18 100644 --- a/svtools/source/dialogs/roadmapwizard.cxx +++ b/svtools/source/dialogs/roadmapwizard.cxx @@ -398,8 +398,14 @@ namespace svt } // can we advance from the current page? - const OWizardPage* pCurrentPage = dynamic_cast< const OWizardPage* >( GetPage( getCurrentState() ) ); - const bool bCurrentPageCanAdvance = !pCurrentPage || pCurrentPage->canAdvance(); + bool bCurrentPageCanAdvance = true; + TabPage* pCurrentPage = GetPage( getCurrentState() ); + if ( pCurrentPage ) + { + const IWizardPageController* pController = getPageController( GetPage( getCurrentState() ) ); + OSL_ENSURE( pController != NULL, "RoadmapWizard::implUpdateRoadmap: no controller for the current page!" ); + bCurrentPageCanAdvance = !pController || pController->canAdvance(); + } // now, we have to remove all items after nCurrentStatePathIndex, and insert the items from the active // path, up to (excluding) nUpperStepBoundary diff --git a/svtools/source/dialogs/wizardmachine.cxx b/svtools/source/dialogs/wizardmachine.cxx index 1d1293334a3a..bc19a588a204 100644 --- a/svtools/source/dialogs/wizardmachine.cxx +++ b/svtools/source/dialogs/wizardmachine.cxx @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #ifndef _SVTOOLS_HRC @@ -101,7 +102,7 @@ namespace svt } //--------------------------------------------------------------------- - sal_Bool OWizardPage::commitPage( CommitPageReason ) + sal_Bool OWizardPage::commitPage( WizardTypes::CommitPageReason ) { return sal_True; } @@ -419,9 +420,10 @@ namespace svt void OWizardMachine::enterState(WizardState _nState) { // tell the page - IWizardPage* pCurrentPage = getWizardPage(GetPage(_nState)); - if ( pCurrentPage ) - pCurrentPage->initializePage(); + IWizardPageController* pController = getPageController( GetPage( _nState ) ); + OSL_ENSURE( pController, "OWizardMachine::enterState: no controller for the given page!" ); + if ( pController ) + pController->initializePage(); if ( isAutomaticNextButtonStateEnabled() ) enableButtons( WZB_NEXT, canAdvance() ); @@ -471,10 +473,9 @@ namespace svt //--------------------------------------------------------------------- sal_Bool OWizardMachine::prepareLeaveCurrentState( CommitPageReason _eReason ) { - IWizardPage* pCurrentPage = getWizardPage(GetPage(getCurrentState())); - if ( pCurrentPage ) - return pCurrentPage->commitPage( _eReason ); - return sal_True; + IWizardPageController* pController = getPageController( GetPage( getCurrentState() ) ); + ENSURE_OR_RETURN( pController != NULL, "OWizardMachine::prepareLeaveCurrentState: no controller for the current page!", sal_True ); + return pController->commitPage( _eReason ); } //--------------------------------------------------------------------- @@ -688,10 +689,10 @@ namespace svt } //--------------------------------------------------------------------- - IWizardPage* OWizardMachine::getWizardPage(TabPage* _pCurrentPage) const + IWizardPageController* OWizardMachine::getPageController( TabPage* _pCurrentPage ) const { - OWizardPage* pPage = dynamic_cast< OWizardPage* >( _pCurrentPage ); - return pPage; + IWizardPageController* pController = dynamic_cast< IWizardPageController* >( _pCurrentPage ); + return pController; } //--------------------------------------------------------------------- @@ -714,11 +715,12 @@ namespace svt //--------------------------------------------------------------------- void OWizardMachine::updateTravelUI() { - OWizardPage* pPage = dynamic_cast< OWizardPage* >( GetPage( getCurrentState() ) ); + const IWizardPageController* pController = getPageController( GetPage( getCurrentState() ) ); + OSL_ENSURE( pController != NULL, "RoadmapWizard::updateTravelUI: no controller for the current page!" ); bool bCanAdvance = - ( !pPage || pPage->canAdvance() ) // the current page allows to advance - && canAdvance(); // the dialog as a whole allows to advance + ( !pController || pController->canAdvance() ) // the current page allows to advance + && canAdvance(); // the dialog as a whole allows to advance enableButtons( WZB_NEXT, bCanAdvance ); } diff --git a/svtools/source/uno/wizard/wizardpageshell.cxx b/svtools/source/uno/wizard/wizardpageshell.cxx deleted file mode 100644 index f75efe05da3d..000000000000 --- a/svtools/source/uno/wizard/wizardpageshell.cxx +++ /dev/null @@ -1,170 +0,0 @@ -/************************************************************************* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#include "precompiled_svtools.hxx" - -#include "wizardpageshell.hxx" -#include "wizardshell.hxx" - -/** === begin UNO includes === **/ -#include -/** === end UNO includes === **/ - -#include - -//...................................................................................................................... -namespace svt { namespace uno -{ -//...................................................................................................................... - - /** === begin UNO using === **/ - using ::com::sun::star::uno::Reference; - using ::com::sun::star::uno::XInterface; - using ::com::sun::star::uno::UNO_QUERY; - using ::com::sun::star::uno::UNO_QUERY_THROW; - using ::com::sun::star::uno::UNO_SET_THROW; - using ::com::sun::star::uno::Exception; - using ::com::sun::star::uno::RuntimeException; - using ::com::sun::star::uno::Any; - using ::com::sun::star::uno::makeAny; - using ::com::sun::star::uno::Sequence; - using ::com::sun::star::uno::Type; - using ::com::sun::star::ui::dialogs::XWizardController; - using ::com::sun::star::awt::XWindow; - using ::com::sun::star::lang::XComponent; - /** === end UNO using === **/ - using namespace ::com::sun::star; - - //================================================================================================================== - //= WizardPageShell - //================================================================================================================== - //------------------------------------------------------------------------------------------------------------------ - WizardPageShell::WizardPageShell( WizardShell& i_rParent, const Reference< XWizardController >& i_rController, - const sal_Int16 i_nPageId ) - :OWizardPage( &i_rParent, WB_CHILDDLGCTRL | WB_NODIALOGCONTROL ) - ,m_xController( i_rController ) - ,m_xWizardPage() - ,m_nPageId( i_nPageId ) - { - ENSURE_OR_THROW( m_xController.is(), "no controller" ); - try - { - m_xWizardPage.set( m_xController->createPage( - Reference< XWindow >( GetComponentInterface( TRUE ), UNO_QUERY_THROW ), - m_nPageId - ), UNO_SET_THROW ); - - Reference< XWindow > xPageWindow( m_xWizardPage->getWindow(), UNO_SET_THROW ); - - awt::Rectangle aContentRect( xPageWindow->getPosSize() ); - SetSizePixel( Size( aContentRect.X + aContentRect.Width, aContentRect.Y + aContentRect.Height ) ); - - xPageWindow->setVisible( sal_True ); - } - catch( const Exception& ) - { - DBG_UNHANDLED_EXCEPTION(); - } - - Show(); - } - - //------------------------------------------------------------------------------------------------------------------ - WizardPageShell::~WizardPageShell() - { - try - { - if ( m_xWizardPage.is() ) - m_xWizardPage->dispose(); - } - catch( const Exception& ) - { - DBG_UNHANDLED_EXCEPTION(); - } - } - - //------------------------------------------------------------------------------------------------------------------ - void WizardPageShell::initializePage() - { - OWizardPage::initializePage(); - if ( !m_xWizardPage.is() ) - return; - - try - { - m_xWizardPage->activatePage(); - } - catch( const Exception& ) - { - DBG_UNHANDLED_EXCEPTION(); - } - } - - //------------------------------------------------------------------------------------------------------------------ - sal_Bool WizardPageShell::commitPage( CommitPageReason i_eReason ) - { - if ( !OWizardPage::commitPage( i_eReason ) ) - return sal_False; - - if ( !m_xWizardPage.is() ) - return sal_True; - - try - { - return m_xWizardPage->commitPage( WizardShell::convertCommitReasonToTravelType( i_eReason ) ); - } - catch( const Exception& ) - { - DBG_UNHANDLED_EXCEPTION(); - } - - return sal_True; - } - - //------------------------------------------------------------------------------------------------------------------ - bool WizardPageShell::canAdvance() const - { - if ( !OWizardPage::canAdvance() ) - return false; - - if ( !m_xWizardPage.is() ) - return true; - - try - { - return m_xWizardPage->canAdvance(); - } - catch( const Exception& ) - { - DBG_UNHANDLED_EXCEPTION(); - } - - return true; - } - -//...................................................................................................................... -} } // namespace svt::uno -//...................................................................................................................... diff --git a/svtools/source/uno/wizard/wizardpageshell.hxx b/svtools/source/uno/wizard/wizardpageshell.hxx deleted file mode 100644 index 25cfbb8b8505..000000000000 --- a/svtools/source/uno/wizard/wizardpageshell.hxx +++ /dev/null @@ -1,76 +0,0 @@ -/************************************************************************* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef SVT_UNOWIZ_WIZARDPAGESHELL_HXX -#define SVT_UNOWIZ_WIZARDPAGESHELL_HXX - -#include "svtools/wizardmachine.hxx" - -/** === begin UNO includes === **/ -#include -/** === end UNO includes === **/ - -//...................................................................................................................... -namespace svt { namespace uno -{ -//...................................................................................................................... - - class WizardShell; - - //================================================================================================================== - //= WizardPageShell - //================================================================================================================== - class WizardPageShell : public OWizardPage - { - public: - WizardPageShell( - WizardShell& i_rParent, - const ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XWizardController >& i_rController, - const sal_Int16 i_nPageId - ); - ~WizardPageShell(); - - // IWizardPage overridables - virtual void initializePage(); - virtual sal_Bool commitPage( CommitPageReason _eReason ); - - // OWizardPage overridables (why isn't this method part of IWizardPage?) - virtual bool canAdvance() const; - - const ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XWizardPage >& - getWizardPage() const { return m_xWizardPage; } - - private: - const ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XWizardController > m_xController; - ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XWizardPage > m_xWizardPage; - const sal_Int16 m_nPageId; - }; - -//...................................................................................................................... -} } // namespace svt::uno -//...................................................................................................................... - -#endif // SVT_UNOWIZ_WIZARDPAGESHELL_HXX -- cgit v1.2.3 From d2b0dc2ee3de5158a1bf130e42bcfd46d997e74b Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Tue, 25 May 2010 10:17:24 +0200 Subject: unoawt: completely separated the controller functionality of a wizard page from the wizard page itself, by moving the canAdvance method from OWizardPage to the IWizardPage interface, which in this course has been renamed to IWizardPageController. This will later on allow to have implementations where the TabPage is provided by an external component (e.g. as UNO Service), but the controlling of those pages is still intercepted and handled internally. --- extensions/source/abpilot/abpfinalpage.cxx | 4 ++-- extensions/source/abpilot/abpfinalpage.hxx | 2 +- extensions/source/abpilot/tableselectionpage.cxx | 2 +- extensions/source/abpilot/tableselectionpage.hxx | 2 +- extensions/source/abpilot/typeselectionpage.cxx | 2 +- extensions/source/abpilot/typeselectionpage.hxx | 2 +- extensions/source/dbpilots/commonpagesdbp.cxx | 4 ++-- extensions/source/dbpilots/commonpagesdbp.hxx | 4 ++-- extensions/source/dbpilots/controlwizard.cxx | 6 +++--- extensions/source/dbpilots/gridwizard.cxx | 2 +- extensions/source/dbpilots/gridwizard.hxx | 2 +- extensions/source/dbpilots/groupboxwiz.cxx | 20 ++++++++++---------- extensions/source/dbpilots/groupboxwiz.hxx | 11 ++++++----- extensions/source/dbpilots/listcombowizard.cxx | 8 ++++---- extensions/source/dbpilots/listcombowizard.hxx | 6 +++--- 15 files changed, 39 insertions(+), 38 deletions(-) diff --git a/extensions/source/abpilot/abpfinalpage.cxx b/extensions/source/abpilot/abpfinalpage.cxx index d633b597878d..2ffeb0d09739 100644 --- a/extensions/source/abpilot/abpfinalpage.cxx +++ b/extensions/source/abpilot/abpfinalpage.cxx @@ -141,12 +141,12 @@ namespace abp } //--------------------------------------------------------------------- - sal_Bool FinalPage::commitPage( CommitPageReason _eReason ) + sal_Bool FinalPage::commitPage( ::svt::WizardTypes::CommitPageReason _eReason ) { if (!AddressBookSourcePage::commitPage(_eReason)) return sal_False; - if ( ( eTravelBackward != _eReason ) + if ( ( ::svt::WizardTypes::eTravelBackward != _eReason ) && ( !m_aLocationController.prepareCommit() ) ) return sal_False; diff --git a/extensions/source/abpilot/abpfinalpage.hxx b/extensions/source/abpilot/abpfinalpage.hxx index 415bc31f2bc1..27d6522d7df6 100644 --- a/extensions/source/abpilot/abpfinalpage.hxx +++ b/extensions/source/abpilot/abpfinalpage.hxx @@ -66,7 +66,7 @@ namespace abp protected: // OWizardPage overridables virtual void initializePage(); - virtual sal_Bool commitPage( CommitPageReason _eReason ); + virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason ); // TabDialog overridables virtual void ActivatePage(); diff --git a/extensions/source/abpilot/tableselectionpage.cxx b/extensions/source/abpilot/tableselectionpage.cxx index 0cefba92ab5a..869c806ea819 100644 --- a/extensions/source/abpilot/tableselectionpage.cxx +++ b/extensions/source/abpilot/tableselectionpage.cxx @@ -109,7 +109,7 @@ namespace abp } //--------------------------------------------------------------------- - sal_Bool TableSelectionPage::commitPage( CommitPageReason _eReason ) + sal_Bool TableSelectionPage::commitPage( ::svt::WizardTypes::CommitPageReason _eReason ) { if (!AddressBookSourcePage::commitPage(_eReason)) return sal_False; diff --git a/extensions/source/abpilot/tableselectionpage.hxx b/extensions/source/abpilot/tableselectionpage.hxx index 36bc792fd0e7..d2d878c65d5f 100644 --- a/extensions/source/abpilot/tableselectionpage.hxx +++ b/extensions/source/abpilot/tableselectionpage.hxx @@ -51,7 +51,7 @@ namespace abp protected: // OWizardPage overridables virtual void initializePage(); - virtual sal_Bool commitPage( CommitPageReason _eReason ); + virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason ); // TabDialog overridables virtual void ActivatePage(); diff --git a/extensions/source/abpilot/typeselectionpage.cxx b/extensions/source/abpilot/typeselectionpage.cxx index adc173f84290..fd83630e81d9 100644 --- a/extensions/source/abpilot/typeselectionpage.cxx +++ b/extensions/source/abpilot/typeselectionpage.cxx @@ -207,7 +207,7 @@ namespace abp } //--------------------------------------------------------------------- - sal_Bool TypeSelectionPage::commitPage( CommitPageReason _eReason ) + sal_Bool TypeSelectionPage::commitPage( ::svt::WizardTypes::CommitPageReason _eReason ) { if (!AddressBookSourcePage::commitPage(_eReason)) return sal_False; diff --git a/extensions/source/abpilot/typeselectionpage.hxx b/extensions/source/abpilot/typeselectionpage.hxx index 18c8d6b9697d..9df17bb1d77f 100644 --- a/extensions/source/abpilot/typeselectionpage.hxx +++ b/extensions/source/abpilot/typeselectionpage.hxx @@ -83,7 +83,7 @@ namespace abp protected: // OWizardPage overridables virtual void initializePage(); - virtual sal_Bool commitPage( CommitPageReason _eReason ); + virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason ); // TabDialog overridables virtual void ActivatePage(); diff --git a/extensions/source/dbpilots/commonpagesdbp.cxx b/extensions/source/dbpilots/commonpagesdbp.cxx index 7b58c8de8560..88d8e2eb352e 100644 --- a/extensions/source/dbpilots/commonpagesdbp.cxx +++ b/extensions/source/dbpilots/commonpagesdbp.cxx @@ -164,7 +164,7 @@ namespace dbp } //--------------------------------------------------------------------- - sal_Bool OTableSelectionPage::commitPage( CommitPageReason _eReason ) + sal_Bool OTableSelectionPage::commitPage( ::svt::WizardTypes::CommitPageReason _eReason ) { if (!OControlWizardPage::commitPage(_eReason)) return sal_False; @@ -493,7 +493,7 @@ namespace dbp } //--------------------------------------------------------------------- - sal_Bool ODBFieldPage::commitPage( CommitPageReason _eReason ) + sal_Bool ODBFieldPage::commitPage( ::svt::WizardTypes::CommitPageReason _eReason ) { if (!OMaybeListSelectionPage::commitPage(_eReason)) return sal_False; diff --git a/extensions/source/dbpilots/commonpagesdbp.hxx b/extensions/source/dbpilots/commonpagesdbp.hxx index 3cbe1ac2b514..a20587b36d72 100644 --- a/extensions/source/dbpilots/commonpagesdbp.hxx +++ b/extensions/source/dbpilots/commonpagesdbp.hxx @@ -64,7 +64,7 @@ namespace dbp // OWizardPage overridables virtual void initializePage(); - virtual sal_Bool commitPage( CommitPageReason _eReason ); + virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason ); protected: DECL_LINK( OnListboxSelection, ListBox* ); @@ -131,7 +131,7 @@ namespace dbp // OWizardPage overridables virtual void initializePage(); - virtual sal_Bool commitPage( CommitPageReason _eReason ); + virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason ); // own overridables virtual String& getDBFieldSetting() = 0; diff --git a/extensions/source/dbpilots/controlwizard.cxx b/extensions/source/dbpilots/controlwizard.cxx index b97eb60504b4..c5d816486ecc 100644 --- a/extensions/source/dbpilots/controlwizard.cxx +++ b/extensions/source/dbpilots/controlwizard.cxx @@ -156,7 +156,7 @@ namespace dbp _rList.Clear(); const ::rtl::OUString* pItems = _rItems.getConstArray(); const ::rtl::OUString* pEnd = pItems + _rItems.getLength(); - WizardState nPos; + ::svt::WizardTypes::WizardState nPos; sal_Int32 nIndex = 0; for (;pItems < pEnd; ++pItems, ++nIndex) { @@ -172,7 +172,7 @@ namespace dbp _rList.Clear(); const ::rtl::OUString* pItems = _rItems.getConstArray(); const ::rtl::OUString* pEnd = pItems + _rItems.getLength(); - WizardState nPos; + ::svt::WizardTypes::WizardState nPos; sal_Int32 nIndex = 0; for (;pItems < pEnd; ++pItems) { @@ -254,7 +254,7 @@ namespace dbp m_pFormDatasource->SetText(sDataSource); m_pFormTable->SetText(sCommand); - WizardState nCommandTypeResourceId = 0; + ::svt::WizardTypes::WizardState nCommandTypeResourceId = 0; switch (nCommandType) { case CommandType::TABLE: diff --git a/extensions/source/dbpilots/gridwizard.cxx b/extensions/source/dbpilots/gridwizard.cxx index 6e28567aef62..ec42cf346450 100644 --- a/extensions/source/dbpilots/gridwizard.cxx +++ b/extensions/source/dbpilots/gridwizard.cxx @@ -362,7 +362,7 @@ namespace dbp } //--------------------------------------------------------------------- - sal_Bool OGridFieldsSelection::commitPage( CommitPageReason _eReason ) + sal_Bool OGridFieldsSelection::commitPage( ::svt::WizardTypes::CommitPageReason _eReason ) { if (!OGridPage::commitPage(_eReason)) return sal_False; diff --git a/extensions/source/dbpilots/gridwizard.hxx b/extensions/source/dbpilots/gridwizard.hxx index d0f255ede729..1ab0d3186440 100644 --- a/extensions/source/dbpilots/gridwizard.hxx +++ b/extensions/source/dbpilots/gridwizard.hxx @@ -114,7 +114,7 @@ namespace dbp // OWizardPage overridables virtual void initializePage(); - virtual sal_Bool commitPage( CommitPageReason _eReason ); + virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason ); virtual bool canAdvance() const; protected: diff --git a/extensions/source/dbpilots/groupboxwiz.cxx b/extensions/source/dbpilots/groupboxwiz.cxx index 7bf3138bf5fe..f35ed890fde5 100644 --- a/extensions/source/dbpilots/groupboxwiz.cxx +++ b/extensions/source/dbpilots/groupboxwiz.cxx @@ -79,7 +79,7 @@ namespace dbp } //--------------------------------------------------------------------- - OWizardPage* OGroupBoxWizard::createPage(WizardState _nState) + OWizardPage* OGroupBoxWizard::createPage(::svt::WizardTypes::WizardState _nState) { switch (_nState) { @@ -106,7 +106,7 @@ namespace dbp } //--------------------------------------------------------------------- - WizardTypes::WizardState OGroupBoxWizard::determineNextState( WizardState _nCurrentState ) const + WizardTypes::WizardState OGroupBoxWizard::determineNextState( ::svt::WizardTypes::WizardState _nCurrentState ) const { switch (_nCurrentState) { @@ -133,7 +133,7 @@ namespace dbp } //--------------------------------------------------------------------- - void OGroupBoxWizard::enterState(WizardState _nState) + void OGroupBoxWizard::enterState(::svt::WizardTypes::WizardState _nState) { // some stuff to do before calling the base class (modifying our settings) switch (_nState) @@ -265,7 +265,7 @@ namespace dbp } //--------------------------------------------------------------------- - sal_Bool ORadioSelectionPage::commitPage( CommitPageReason _eReason ) + sal_Bool ORadioSelectionPage::commitPage( ::svt::WizardTypes::CommitPageReason _eReason ) { if (!OGBWPage::commitPage(_eReason)) return sal_False; @@ -277,7 +277,7 @@ namespace dbp rSettings.aValues.clear(); rSettings.aLabels.reserve(m_aExistingRadios.GetEntryCount()); rSettings.aValues.reserve(m_aExistingRadios.GetEntryCount()); - for (WizardState i=0; i(getDialog())->getSettings(); } }; @@ -164,7 +164,8 @@ namespace dbp ListBox m_aOptions; StringArray m_aUncommittedValues; - WizardState m_nLastSelection; + ::svt::WizardTypes::WizardState + m_nLastSelection; public: OOptionValuesPage( OControlWizard* _pParent ); @@ -175,7 +176,7 @@ namespace dbp // OWizardPage overridables virtual void initializePage(); - virtual sal_Bool commitPage( CommitPageReason _eReason ); + virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason ); void implTraveledOptions(); @@ -217,7 +218,7 @@ namespace dbp // OWizardPage overridables virtual void initializePage(); - virtual sal_Bool commitPage( CommitPageReason _eReason ); + virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason ); virtual bool canAdvance() const; }; diff --git a/extensions/source/dbpilots/listcombowizard.cxx b/extensions/source/dbpilots/listcombowizard.cxx index 2e810654baa4..63659f613460 100644 --- a/extensions/source/dbpilots/listcombowizard.cxx +++ b/extensions/source/dbpilots/listcombowizard.cxx @@ -362,14 +362,14 @@ namespace dbp } //--------------------------------------------------------------------- - sal_Bool OContentTableSelection::commitPage( CommitPageReason _eReason ) + sal_Bool OContentTableSelection::commitPage( ::svt::WizardTypes::CommitPageReason _eReason ) { if (!OLCPage::commitPage(_eReason)) return sal_False; OListComboSettings& rSettings = getSettings(); rSettings.sListContentTable = m_aSelectTable.GetSelectEntry(); - if (!rSettings.sListContentTable.Len() && (eTravelBackward != _eReason)) + if (!rSettings.sListContentTable.Len() && (::svt::WizardTypes::eTravelBackward != _eReason)) // need to select a table return sal_False; @@ -440,7 +440,7 @@ namespace dbp } //--------------------------------------------------------------------- - sal_Bool OContentFieldSelection::commitPage( CommitPageReason _eReason ) + sal_Bool OContentFieldSelection::commitPage( ::svt::WizardTypes::CommitPageReason _eReason ) { if (!OLCPage::commitPage(_eReason)) return sal_False; @@ -518,7 +518,7 @@ namespace dbp } //--------------------------------------------------------------------- - sal_Bool OLinkFieldsPage::commitPage( CommitPageReason _eReason ) + sal_Bool OLinkFieldsPage::commitPage( ::svt::WizardTypes::CommitPageReason _eReason ) { if (!OLCPage::commitPage(_eReason)) return sal_False; diff --git a/extensions/source/dbpilots/listcombowizard.hxx b/extensions/source/dbpilots/listcombowizard.hxx index 7dcf32316236..c30a19a77a00 100644 --- a/extensions/source/dbpilots/listcombowizard.hxx +++ b/extensions/source/dbpilots/listcombowizard.hxx @@ -129,7 +129,7 @@ namespace dbp // OWizardPage overridables virtual void initializePage(); - virtual sal_Bool commitPage( CommitPageReason _eReason ); + virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason ); virtual bool canAdvance() const; protected: @@ -163,7 +163,7 @@ namespace dbp // OWizardPage overridables virtual void initializePage(); - virtual sal_Bool commitPage( CommitPageReason _eReason ); + virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason ); virtual bool canAdvance() const; }; @@ -190,7 +190,7 @@ namespace dbp // OWizardPage overridables virtual void initializePage(); - virtual sal_Bool commitPage( CommitPageReason _eReason ); + virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason ); virtual bool canAdvance() const; private: -- cgit v1.2.3 From 3f4c0ab3ae9035d3c7cb09c7258f4c8d30b4db8a Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Tue, 25 May 2010 10:17:24 +0200 Subject: unoawt: completely separated the controller functionality of a wizard page from the wizard page itself, by moving the canAdvance method from OWizardPage to the IWizardPage interface, which in this course has been renamed to IWizardPageController. This will later on allow to have implementations where the TabPage is provided by an external component (e.g. as UNO Service), but the controlling of those pages is still intercepted and handled internally. --- dbaccess/source/ext/macromigration/macromigrationpages.cxx | 4 ++-- dbaccess/source/ext/macromigration/macromigrationpages.hxx | 9 ++++----- dbaccess/source/ui/dlg/ConnectionPageSetup.cxx | 2 +- dbaccess/source/ui/dlg/ConnectionPageSetup.hxx | 2 +- dbaccess/source/ui/dlg/adminpages.cxx | 7 ++++++- dbaccess/source/ui/dlg/adminpages.hxx | 8 +++++--- dbaccess/source/ui/dlg/dbwiz.cxx | 2 +- dbaccess/source/ui/dlg/dbwizsetup.cxx | 2 +- dbaccess/source/ui/inc/dbwiz.hxx | 5 +++-- dbaccess/source/ui/inc/dbwizsetup.hxx | 2 +- 10 files changed, 25 insertions(+), 18 deletions(-) diff --git a/dbaccess/source/ext/macromigration/macromigrationpages.cxx b/dbaccess/source/ext/macromigration/macromigrationpages.cxx index 4e35663c5a81..c2bd3986e27a 100644 --- a/dbaccess/source/ext/macromigration/macromigrationpages.cxx +++ b/dbaccess/source/ext/macromigration/macromigrationpages.cxx @@ -188,12 +188,12 @@ namespace dbmm } //-------------------------------------------------------------------- - sal_Bool SaveDBDocPage::commitPage( CommitPageReason _eReason ) + sal_Bool SaveDBDocPage::commitPage( ::svt::WizardTypes::CommitPageReason _eReason ) { if ( !MacroMigrationPage::commitPage( _eReason ) ) return sal_False; - if ( eTravelBackward == _eReason ) + if ( ::svt::WizardTypes::eTravelBackward == _eReason ) return sal_True; if ( !m_aLocationController.prepareCommit() ) diff --git a/dbaccess/source/ext/macromigration/macromigrationpages.hxx b/dbaccess/source/ext/macromigration/macromigrationpages.hxx index 550e134e6db3..8c269982999d 100644 --- a/dbaccess/source/ext/macromigration/macromigrationpages.hxx +++ b/dbaccess/source/ext/macromigration/macromigrationpages.hxx @@ -109,11 +109,10 @@ namespace dbmm m_aLocationController; protected: - // OWizardPage overridables - virtual void initializePage(); - virtual bool canAdvance() const; - // IWizardPage overridables - virtual sal_Bool commitPage( CommitPageReason _eReason ); + // IWizardPageController overridables + virtual void initializePage(); + virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason ); + virtual bool canAdvance() const; private: DECL_LINK( OnLocationModified, Edit* ); diff --git a/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx b/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx index 367d95a2ed23..f53054d37339 100644 --- a/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx +++ b/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx @@ -289,7 +289,7 @@ namespace dbaui callModifiedHdl(); } // ----------------------------------------------------------------------- - sal_Bool OConnectionTabPageSetup::commitPage( CommitPageReason /*_eReason*/ ) + sal_Bool OConnectionTabPageSetup::commitPage( ::svt::WizardTypes::CommitPageReason /*_eReason*/ ) { return commitURL(); } diff --git a/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx b/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx index 2a4380f0c70b..79a16c880c54 100644 --- a/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx +++ b/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx @@ -89,7 +89,7 @@ namespace dbaui virtual BOOL FillItemSet (SfxItemSet& _rCoreAttrs); virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue); - virtual sal_Bool commitPage( CommitPageReason _eReason ); + virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason ); inline void enableConnectionURL() { m_aConnectionURL.SetReadOnly(sal_False); } diff --git a/dbaccess/source/ui/dlg/adminpages.cxx b/dbaccess/source/ui/dlg/adminpages.cxx index bf4b691cac55..f363b5bc2fb3 100644 --- a/dbaccess/source/ui/dlg/adminpages.cxx +++ b/dbaccess/source/ui/dlg/adminpages.cxx @@ -201,11 +201,16 @@ namespace dbaui Reset(*m_pItemSetHelper->getOutputSet()); } // ----------------------------------------------------------------------- - sal_Bool OGenericAdministrationPage::commitPage( CommitPageReason ) + sal_Bool OGenericAdministrationPage::commitPage( ::svt::WizardTypes::CommitPageReason ) { return sal_True; } // ----------------------------------------------------------------------- + bool OGenericAdministrationPage::canAdvance() const + { + return true; + } + // ----------------------------------------------------------------------- void OGenericAdministrationPage::fillBool( SfxItemSet& _rSet, CheckBox* _pCheckBox, USHORT _nID, sal_Bool& _bChangedSomething, bool _bRevertValue ) { if ( (_pCheckBox != NULL ) && ( _pCheckBox->GetState() != _pCheckBox->GetSavedValue() ) ) diff --git a/dbaccess/source/ui/dlg/adminpages.hxx b/dbaccess/source/ui/dlg/adminpages.hxx index 20bb0ea688cc..32ba0064a824 100644 --- a/dbaccess/source/ui/dlg/adminpages.hxx +++ b/dbaccess/source/ui/dlg/adminpages.hxx @@ -113,7 +113,8 @@ namespace dbaui //========================================================================= class IDatabaseSettingsDialog; class IItemSetHelper; - class OGenericAdministrationPage : public SfxTabPage, public svt::IWizardPage + class OGenericAdministrationPage :public SfxTabPage + ,public ::svt::IWizardPageController { private: Link m_aModifiedHandler; /// to be called if something on the page has been modified @@ -165,9 +166,10 @@ namespace dbaui */ sal_Bool getSelectedDataSource(::rtl::OUString& _sReturn,::rtl::OUString& _sCurr); - // svt::IWizardPage + // svt::IWizardPageController virtual void initializePage(); - virtual sal_Bool commitPage( CommitPageReason _eReason ); + virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason ); + virtual bool canAdvance() const; void SetRoadmapStateValue( sal_Bool _bDoEnable ) { m_abEnableRoadmap = _bDoEnable; } bool GetRoadmapStateValue() const { return m_abEnableRoadmap; } diff --git a/dbaccess/source/ui/dlg/dbwiz.cxx b/dbaccess/source/ui/dlg/dbwiz.cxx index cdecbd295df6..e6f9c2024212 100644 --- a/dbaccess/source/ui/dlg/dbwiz.cxx +++ b/dbaccess/source/ui/dlg/dbwiz.cxx @@ -405,7 +405,7 @@ sal_Bool ODbTypeWizDialog::saveDatasource() return sal_True; } // ----------------------------------------------------------------------------- -IWizardPage* ODbTypeWizDialog::getWizardPage(TabPage* _pCurrentPage) const +IWizardPageController* ODbTypeWizDialog::getPageController( TabPage* _pCurrentPage ) const { OGenericAdministrationPage* pPage = static_cast(_pCurrentPage); return pPage; diff --git a/dbaccess/source/ui/dlg/dbwizsetup.cxx b/dbaccess/source/ui/dlg/dbwizsetup.cxx index 5a601bd56c92..3be4b8d663cc 100644 --- a/dbaccess/source/ui/dlg/dbwizsetup.cxx +++ b/dbaccess/source/ui/dlg/dbwizsetup.cxx @@ -1078,7 +1078,7 @@ sal_Bool ODbTypeWizDialogSetup::SaveDatabaseDocument() return aExistenceCheck.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET ); } // ----------------------------------------------------------------------------- - IWizardPage* ODbTypeWizDialogSetup::getWizardPage(TabPage* _pCurrentPage) const + IWizardPageController* ODbTypeWizDialogSetup::getPageController( TabPage* _pCurrentPage ) const { OGenericAdministrationPage* pPage = static_cast(_pCurrentPage); return pPage; diff --git a/dbaccess/source/ui/inc/dbwiz.hxx b/dbaccess/source/ui/inc/dbwiz.hxx index 3f36739fc08c..8b1852031776 100644 --- a/dbaccess/source/ui/inc/dbwiz.hxx +++ b/dbaccess/source/ui/inc/dbwiz.hxx @@ -111,8 +111,9 @@ protected: virtual TabPage* createPage(WizardState _nState); virtual WizardState determineNextState(WizardState _nCurrentState) const; virtual sal_Bool leaveState(WizardState _nState); - virtual ::svt::IWizardPage* getWizardPage(TabPage* _pCurrentPage) const; - virtual sal_Bool onFinish(sal_Int32 _nResult); + virtual ::svt::IWizardPageController* + getPageController( TabPage* _pCurrentPage ) const; + virtual sal_Bool onFinish(sal_Int32 _nResult); protected: inline sal_Bool isUIEnabled() const { return m_bUIEnabled; } diff --git a/dbaccess/source/ui/inc/dbwizsetup.hxx b/dbaccess/source/ui/inc/dbwizsetup.hxx index 0fcdd989a850..31ff642bf0d9 100644 --- a/dbaccess/source/ui/inc/dbwizsetup.hxx +++ b/dbaccess/source/ui/inc/dbwizsetup.hxx @@ -149,7 +149,7 @@ protected: virtual TabPage* createPage(WizardState _nState); virtual sal_Bool leaveState(WizardState _nState); virtual void enterState(WizardState _nState); - virtual ::svt::IWizardPage* getWizardPage(TabPage* _pCurrentPage) const; + virtual ::svt::IWizardPageController* getPageController( TabPage* _pCurrentPage ) const; virtual sal_Bool onFinish(sal_Int32 _nResult); protected: -- cgit v1.2.3 From cb16c0615a79235f74d3675549f39a1851157a06 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Tue, 25 May 2010 10:17:24 +0200 Subject: unoawt: completely separated the controller functionality of a wizard page from the wizard page itself, by moving the canAdvance method from OWizardPage to the IWizardPage interface, which in this course has been renamed to IWizardPageController. This will later on allow to have implementations where the TabPage is provided by an external component (e.g. as UNO Service), but the controlling of those pages is still intercepted and handled internally. --- sw/source/ui/dbui/mailmergewizard.cxx | 2 +- sw/source/ui/dbui/mmaddressblockpage.cxx | 4 ++-- sw/source/ui/dbui/mmaddressblockpage.hxx | 2 +- sw/source/ui/dbui/mmdocselectpage.cxx | 8 ++++---- sw/source/ui/dbui/mmdocselectpage.hxx | 2 +- sw/source/ui/dbui/mmgreetingspage.cxx | 2 +- sw/source/ui/dbui/mmgreetingspage.hxx | 2 +- sw/source/ui/dbui/mmlayoutpage.cxx | 4 ++-- sw/source/ui/dbui/mmlayoutpage.hxx | 2 +- sw/source/ui/dbui/mmpreparemergepage.cxx | 4 ++-- sw/source/ui/dbui/mmpreparemergepage.hxx | 2 +- 11 files changed, 17 insertions(+), 17 deletions(-) diff --git a/sw/source/ui/dbui/mailmergewizard.cxx b/sw/source/ui/dbui/mailmergewizard.cxx index 54cf6edac512..365c56b4c0ea 100644 --- a/sw/source/ui/dbui/mailmergewizard.cxx +++ b/sw/source/ui/dbui/mailmergewizard.cxx @@ -260,7 +260,7 @@ void SwMailMergeWizard::UpdateRoadmap() //#i97436# if a document has to be loaded then enable output type page only m_bDocumentLoad = false; bool bEnableOutputTypePage = (nCurPage != MM_DOCUMENTSELECTPAGE) || - static_cast(pCurPage)->commitPage( eValidate ); + static_cast(pCurPage)->commitPage( ::svt::WizardTypes::eValidate ); for(sal_uInt16 nPage = MM_DOCUMENTSELECTPAGE; nPage <= MM_OUTPUTPAGE; ++nPage) { diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx index b2d8c790c25d..a35b0727c1ed 100644 --- a/sw/source/ui/dbui/mmaddressblockpage.cxx +++ b/sw/source/ui/dbui/mmaddressblockpage.cxx @@ -175,9 +175,9 @@ void SwMailMergeAddressBlockPage::ActivatePage() /*-- 27.05.2004 13:59:15--------------------------------------------------- -----------------------------------------------------------------------*/ -sal_Bool SwMailMergeAddressBlockPage::commitPage( CommitPageReason _eReason ) +sal_Bool SwMailMergeAddressBlockPage::commitPage( ::svt::WizardTypes::CommitPageReason _eReason ) { - if ( eTravelForward == _eReason && !m_pWizard->GetConfigItem().GetResultSet().is() ) + if ( ::svt::WizardTypes::eTravelForward == _eReason && !m_pWizard->GetConfigItem().GetResultSet().is() ) return sal_False; return sal_True; } diff --git a/sw/source/ui/dbui/mmaddressblockpage.hxx b/sw/source/ui/dbui/mmaddressblockpage.hxx index b47b71f1a561..eddaca225e9b 100644 --- a/sw/source/ui/dbui/mmaddressblockpage.hxx +++ b/sw/source/ui/dbui/mmaddressblockpage.hxx @@ -98,7 +98,7 @@ class SwMailMergeAddressBlockPage : public svt::OWizardPage void EnableAddressBlock(sal_Bool bAll, sal_Bool bSelective); virtual void ActivatePage(); - virtual sal_Bool commitPage( CommitPageReason _eReason ); + virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason ); virtual bool canAdvance() const; public: diff --git a/sw/source/ui/dbui/mmdocselectpage.cxx b/sw/source/ui/dbui/mmdocselectpage.cxx index 698e12f44882..e125b4f8ed2e 100644 --- a/sw/source/ui/dbui/mmdocselectpage.cxx +++ b/sw/source/ui/dbui/mmdocselectpage.cxx @@ -197,11 +197,11 @@ IMPL_LINK(SwMailMergeDocSelectPage, FileSelectHdl, PushButton*, pButton) /*-- 06.04.2004 12:52:24--------------------------------------------------- -----------------------------------------------------------------------*/ -sal_Bool SwMailMergeDocSelectPage::commitPage( CommitPageReason _eReason ) +sal_Bool SwMailMergeDocSelectPage::commitPage( ::svt::WizardTypes::CommitPageReason _eReason ) { sal_Bool bReturn = sal_False; - bool bNext = _eReason == eTravelForward; - if(bNext || _eReason == eValidate ) + bool bNext = _eReason == ::svt::WizardTypes::eTravelForward; + if(bNext || _eReason == ::svt::WizardTypes::eValidate ) { ::rtl::OUString sReloadDocument; bReturn = m_aCurrentDocRB.IsChecked() || @@ -209,7 +209,7 @@ sal_Bool SwMailMergeDocSelectPage::commitPage( CommitPageReason _eReason ) ((sReloadDocument = m_sLoadFileName).getLength() && m_aLoadDocRB.IsChecked() )|| ((sReloadDocument = m_sLoadTemplateName).getLength() && m_aLoadTemplateRB.IsChecked())|| (m_aRecentDocRB.IsChecked() && (sReloadDocument = m_aRecentDocLB.GetSelectEntry()).getLength()); - if( _eReason == eValidate ) + if( _eReason == ::svt::WizardTypes::eValidate ) m_pWizard->SetDocumentLoad(!m_aCurrentDocRB.IsChecked()); if(bNext && !m_aCurrentDocRB.IsChecked()) diff --git a/sw/source/ui/dbui/mmdocselectpage.hxx b/sw/source/ui/dbui/mmdocselectpage.hxx index 2785846b39e8..6483025f88ed 100644 --- a/sw/source/ui/dbui/mmdocselectpage.hxx +++ b/sw/source/ui/dbui/mmdocselectpage.hxx @@ -61,7 +61,7 @@ class SwMailMergeDocSelectPage : public svt::OWizardPage DECL_LINK(DocSelectHdl, RadioButton*); DECL_LINK(FileSelectHdl, PushButton*); - virtual sal_Bool commitPage( CommitPageReason _eReason ); + virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason ); public: SwMailMergeDocSelectPage( SwMailMergeWizard* _pParent); diff --git a/sw/source/ui/dbui/mmgreetingspage.cxx b/sw/source/ui/dbui/mmgreetingspage.cxx index c7613055d6ab..7281880c593d 100644 --- a/sw/source/ui/dbui/mmgreetingspage.cxx +++ b/sw/source/ui/dbui/mmgreetingspage.cxx @@ -390,7 +390,7 @@ void SwMailMergeGreetingsPage::ActivatePage() /*-- 11.05.2004 14:47:10--------------------------------------------------- -----------------------------------------------------------------------*/ -sal_Bool SwMailMergeGreetingsPage::commitPage( CommitPageReason ) +sal_Bool SwMailMergeGreetingsPage::commitPage( ::svt::WizardTypes::CommitPageReason ) { SwMailMergeConfigItem& rConfig = m_pWizard->GetConfigItem(); diff --git a/sw/source/ui/dbui/mmgreetingspage.hxx b/sw/source/ui/dbui/mmgreetingspage.hxx index 1756f78a29d8..3e237d797e2f 100644 --- a/sw/source/ui/dbui/mmgreetingspage.hxx +++ b/sw/source/ui/dbui/mmgreetingspage.hxx @@ -122,7 +122,7 @@ class SwMailMergeGreetingsPage : public svt::OWizardPage, virtual void UpdatePreview(); virtual void ActivatePage(); - virtual sal_Bool commitPage( CommitPageReason _eReason ); + virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason ); public: SwMailMergeGreetingsPage( SwMailMergeWizard* _pParent); ~SwMailMergeGreetingsPage(); diff --git a/sw/source/ui/dbui/mmlayoutpage.cxx b/sw/source/ui/dbui/mmlayoutpage.cxx index 366eb23e9352..d9ae7b9c518f 100644 --- a/sw/source/ui/dbui/mmlayoutpage.cxx +++ b/sw/source/ui/dbui/mmlayoutpage.cxx @@ -254,11 +254,11 @@ void SwMailMergeLayoutPage::ActivatePage() /*-- 11.05.2004 10:41:26--------------------------------------------------- -----------------------------------------------------------------------*/ -sal_Bool SwMailMergeLayoutPage::commitPage( CommitPageReason _eReason ) +sal_Bool SwMailMergeLayoutPage::commitPage( ::svt::WizardTypes::CommitPageReason _eReason ) { //now insert the frame and the greeting SwMailMergeConfigItem& rConfigItem = m_pWizard->GetConfigItem(); - if(eTravelForward == _eReason) + if(::svt::WizardTypes::eTravelForward == _eReason) { long nLeft = static_cast< long >(m_aLeftMF.Denormalize(m_aLeftMF.GetValue(FUNIT_TWIP))); long nTop = static_cast< long >(m_aTopMF.Denormalize(m_aTopMF.GetValue(FUNIT_TWIP))); diff --git a/sw/source/ui/dbui/mmlayoutpage.hxx b/sw/source/ui/dbui/mmlayoutpage.hxx index 0a4569c71437..b7dd9dfab2e6 100644 --- a/sw/source/ui/dbui/mmlayoutpage.hxx +++ b/sw/source/ui/dbui/mmlayoutpage.hxx @@ -98,7 +98,7 @@ class SwMailMergeLayoutPage : public svt::OWizardPage static void InsertGreeting(SwWrtShell& rShell, SwMailMergeConfigItem& rConfigItem, bool bExample); virtual void ActivatePage(); - virtual sal_Bool commitPage(CommitPageReason _eReason); + virtual sal_Bool commitPage(::svt::WizardTypes::CommitPageReason _eReason); public: SwMailMergeLayoutPage( SwMailMergeWizard* _pParent); ~SwMailMergeLayoutPage(); diff --git a/sw/source/ui/dbui/mmpreparemergepage.cxx b/sw/source/ui/dbui/mmpreparemergepage.cxx index a8650c4b37c9..8539f037ecdc 100644 --- a/sw/source/ui/dbui/mmpreparemergepage.cxx +++ b/sw/source/ui/dbui/mmpreparemergepage.cxx @@ -191,10 +191,10 @@ void SwMailMergePrepareMergePage::ActivatePage() /*-- 13.05.2004 15:38:32--------------------------------------------------- merge the data into a new file -----------------------------------------------------------------------*/ -sal_Bool SwMailMergePrepareMergePage::commitPage( CommitPageReason _eReason ) +sal_Bool SwMailMergePrepareMergePage::commitPage( ::svt::WizardTypes::CommitPageReason _eReason ) { SwMailMergeConfigItem& rConfigItem = m_pWizard->GetConfigItem(); - if(eTravelForward == _eReason && !rConfigItem.IsMergeDone()) + if(::svt::WizardTypes::eTravelForward == _eReason && !rConfigItem.IsMergeDone()) { m_pWizard->CreateTargetDocument(); m_pWizard->SetRestartPage(MM_MERGEPAGE); diff --git a/sw/source/ui/dbui/mmpreparemergepage.hxx b/sw/source/ui/dbui/mmpreparemergepage.hxx index 90298711dd88..8fb7ad938996 100644 --- a/sw/source/ui/dbui/mmpreparemergepage.hxx +++ b/sw/source/ui/dbui/mmpreparemergepage.hxx @@ -64,7 +64,7 @@ class SwMailMergePrepareMergePage : public svt::OWizardPage DECL_LINK(MoveHdl_Impl, void*); virtual void ActivatePage(); - virtual sal_Bool commitPage( CommitPageReason _eReason ); + virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason ); public: SwMailMergePrepareMergePage( SwMailMergeWizard* _pParent); -- cgit v1.2.3 From 7c54ab539e0b8d52df758cec4cafab675ce313c7 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Tue, 25 May 2010 10:17:24 +0200 Subject: unoawt: completely separated the controller functionality of a wizard page from the wizard page itself, by moving the canAdvance method from OWizardPage to the IWizardPage interface, which in this course has been renamed to IWizardPageController. This will later on allow to have implementations where the TabPage is provided by an external component (e.g. as UNO Service), but the controlling of those pages is still intercepted and handled internally. --- chart2/source/controller/dialogs/tp_ChartType.cxx | 2 +- chart2/source/controller/dialogs/tp_ChartType.hxx | 2 +- chart2/source/controller/dialogs/tp_DataSource.cxx | 4 ++-- chart2/source/controller/dialogs/tp_DataSource.hxx | 2 +- chart2/source/controller/dialogs/tp_RangeChooser.cxx | 4 ++-- chart2/source/controller/dialogs/tp_RangeChooser.hxx | 2 +- chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.cxx | 2 +- chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.hxx | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/chart2/source/controller/dialogs/tp_ChartType.cxx b/chart2/source/controller/dialogs/tp_ChartType.cxx index 244d23ed8eff..1696fcdc17c2 100644 --- a/chart2/source/controller/dialogs/tp_ChartType.cxx +++ b/chart2/source/controller/dialogs/tp_ChartType.cxx @@ -1133,7 +1133,7 @@ void ChartTypeTabPage::initializePage() } } -sal_Bool ChartTypeTabPage::commitPage( CommitPageReason /*eReason*/ ) +sal_Bool ChartTypeTabPage::commitPage( ::svt::WizardTypes::CommitPageReason /*eReason*/ ) { //commit changes to model if( !m_bDoLiveUpdate && m_pCurrentMainType ) diff --git a/chart2/source/controller/dialogs/tp_ChartType.hxx b/chart2/source/controller/dialogs/tp_ChartType.hxx index 233d9ee910c6..b40cbb1956db 100644 --- a/chart2/source/controller/dialogs/tp_ChartType.hxx +++ b/chart2/source/controller/dialogs/tp_ChartType.hxx @@ -73,7 +73,7 @@ public: virtual ~ChartTypeTabPage(); virtual void initializePage(); - virtual sal_Bool commitPage( CommitPageReason eReason ); + virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason eReason ); virtual ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartTypeTemplate > getCurrentTemplate() const; diff --git a/chart2/source/controller/dialogs/tp_DataSource.cxx b/chart2/source/controller/dialogs/tp_DataSource.cxx index 10f0421d4013..7c5f0fb3967b 100644 --- a/chart2/source/controller/dialogs/tp_DataSource.cxx +++ b/chart2/source/controller/dialogs/tp_DataSource.cxx @@ -382,10 +382,10 @@ void DataSourceTabPage::DeactivatePage() void DataSourceTabPage::commitPage() { - commitPage(eFinish); + commitPage(::svt::WizardTypes::eFinish); } -sal_Bool DataSourceTabPage::commitPage( CommitPageReason /*eReason*/ ) +sal_Bool DataSourceTabPage::commitPage( ::svt::WizardTypes::CommitPageReason /*eReason*/ ) { //ranges may have been edited in the meanwhile (dirty is true in that case here) if( isValid() ) diff --git a/chart2/source/controller/dialogs/tp_DataSource.hxx b/chart2/source/controller/dialogs/tp_DataSource.hxx index 44ffa2b3cdf2..e65b503bfcc2 100644 --- a/chart2/source/controller/dialogs/tp_DataSource.hxx +++ b/chart2/source/controller/dialogs/tp_DataSource.hxx @@ -89,7 +89,7 @@ public: protected: // OWizardPage virtual void ActivatePage(); - virtual sal_Bool commitPage( CommitPageReason eReason ); + virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason eReason ); //TabPage virtual void DeactivatePage(); diff --git a/chart2/source/controller/dialogs/tp_RangeChooser.cxx b/chart2/source/controller/dialogs/tp_RangeChooser.cxx index f1e4a1e5ff64..3ba6ca0f74b2 100644 --- a/chart2/source/controller/dialogs/tp_RangeChooser.cxx +++ b/chart2/source/controller/dialogs/tp_RangeChooser.cxx @@ -221,10 +221,10 @@ void RangeChooserTabPage::DeactivatePage() void RangeChooserTabPage::commitPage() { - commitPage(eFinish); + commitPage(::svt::WizardTypes::eFinish); } -sal_Bool RangeChooserTabPage::commitPage( CommitPageReason /*eReason*/ ) +sal_Bool RangeChooserTabPage::commitPage( ::svt::WizardTypes::CommitPageReason /*eReason*/ ) { //ranges may have been edited in the meanwhile (dirty is true in that case here) if( isValid() ) diff --git a/chart2/source/controller/dialogs/tp_RangeChooser.hxx b/chart2/source/controller/dialogs/tp_RangeChooser.hxx index 9a2b05628fa2..4d985669195c 100644 --- a/chart2/source/controller/dialogs/tp_RangeChooser.hxx +++ b/chart2/source/controller/dialogs/tp_RangeChooser.hxx @@ -73,7 +73,7 @@ protected: //methods //OWizardPage virtual void ActivatePage(); - virtual sal_Bool commitPage( CommitPageReason eReason ); + virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason eReason ); //TabPage virtual void DeactivatePage(); diff --git a/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.cxx b/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.cxx index 8c97de81dd5d..03988116854e 100644 --- a/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.cxx +++ b/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.cxx @@ -125,7 +125,7 @@ void TitlesAndObjectsTabPage::initializePage() m_bCommitToModel = true; } -sal_Bool TitlesAndObjectsTabPage::commitPage( CommitPageReason /*eReason*/ ) +sal_Bool TitlesAndObjectsTabPage::commitPage( ::svt::WizardTypes::CommitPageReason /*eReason*/ ) { if( m_apTitleResources->IsModified() ) //titles may have changed in the meanwhile commitToModel(); diff --git a/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.hxx b/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.hxx index d6bb869c2f6d..1cd9c6162a46 100644 --- a/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.hxx +++ b/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.hxx @@ -59,7 +59,7 @@ public: virtual ~TitlesAndObjectsTabPage(); virtual void initializePage(); - virtual sal_Bool commitPage( CommitPageReason eReason ); + virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason eReason ); virtual bool canAdvance() const; protected: -- cgit v1.2.3 From 054dcada5c1432a70d20834445a248678b3318c7 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Tue, 25 May 2010 11:27:01 +0200 Subject: unoawt: now that we can separate the WizardPageController from the actual page, there's no need for a TabPage whose sole purpose was being a container for the externally-provided TabPage - hopefully this change will allow us fixing the keyboard traveling --- svtools/source/uno/wizard/makefile.mk | 2 +- svtools/source/uno/wizard/wizardpagecontroller.cxx | 186 +++++++++++++++++++++ svtools/source/uno/wizard/wizardpagecontroller.hxx | 75 +++++++++ svtools/source/uno/wizard/wizardshell.cxx | 32 +++- svtools/source/uno/wizard/wizardshell.hxx | 13 ++ 5 files changed, 302 insertions(+), 6 deletions(-) create mode 100644 svtools/source/uno/wizard/wizardpagecontroller.cxx create mode 100644 svtools/source/uno/wizard/wizardpagecontroller.hxx diff --git a/svtools/source/uno/wizard/makefile.mk b/svtools/source/uno/wizard/makefile.mk index 2beef5060475..521496fc5d48 100644 --- a/svtools/source/uno/wizard/makefile.mk +++ b/svtools/source/uno/wizard/makefile.mk @@ -41,7 +41,7 @@ ENABLE_EXCEPTIONS=TRUE SLOFILES= \ $(SLO)$/unowizard.obj \ $(SLO)$/wizardshell.obj \ - $(SLO)$/wizardpageshell.obj + $(SLO)$/wizardpagecontroller.obj # --- Targets ------------------------------------------------------ diff --git a/svtools/source/uno/wizard/wizardpagecontroller.cxx b/svtools/source/uno/wizard/wizardpagecontroller.cxx new file mode 100644 index 000000000000..fae58a6d6dcd --- /dev/null +++ b/svtools/source/uno/wizard/wizardpagecontroller.cxx @@ -0,0 +1,186 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#include "precompiled_svtools.hxx" + +#include "wizardpagecontroller.hxx" +#include "wizardshell.hxx" + +/** === begin UNO includes === **/ +#include +#include +/** === end UNO includes === **/ + +#include +#include + +//...................................................................................................................... +namespace svt { namespace uno +{ +//...................................................................................................................... + + /** === begin UNO using === **/ + using ::com::sun::star::uno::Reference; + using ::com::sun::star::uno::XInterface; + using ::com::sun::star::uno::UNO_QUERY; + using ::com::sun::star::uno::UNO_QUERY_THROW; + using ::com::sun::star::uno::UNO_SET_THROW; + using ::com::sun::star::uno::Exception; + using ::com::sun::star::uno::RuntimeException; + using ::com::sun::star::uno::Any; + using ::com::sun::star::uno::makeAny; + using ::com::sun::star::uno::Sequence; + using ::com::sun::star::uno::Type; + using ::com::sun::star::ui::dialogs::XWizardController; + using ::com::sun::star::awt::XWindow; + using ::com::sun::star::lang::XComponent; + using ::com::sun::star::awt::XControl; + /** === end UNO using === **/ + using namespace ::com::sun::star; + + //================================================================================================================== + //= WizardPageController + //================================================================================================================== + //------------------------------------------------------------------------------------------------------------------ + WizardPageController::WizardPageController( WizardShell& i_rParent, const Reference< XWizardController >& i_rController, + const sal_Int16 i_nPageId ) + :m_xController( i_rController ) + ,m_xWizardPage() + ,m_nPageId( i_nPageId ) + { + ENSURE_OR_THROW( m_xController.is(), "no controller" ); + try + { + m_xWizardPage.set( m_xController->createPage( + Reference< XWindow >( i_rParent.GetComponentInterface( TRUE ), UNO_QUERY_THROW ), + m_nPageId + ), UNO_SET_THROW ); + + Reference< XWindow > xPageWindow( m_xWizardPage->getWindow(), UNO_SET_THROW ); + xPageWindow->setVisible( sal_True ); + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } + } + + //------------------------------------------------------------------------------------------------------------------ + WizardPageController::~WizardPageController() + { + try + { + if ( m_xWizardPage.is() ) + m_xWizardPage->dispose(); + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } + } + + //------------------------------------------------------------------------------------------------------------------ + TabPage* WizardPageController::getTabPage() const + { + ENSURE_OR_RETURN( m_xWizardPage.is(), "WizardPageController::getTabPage: no external wizard page!", NULL ); + try + { + Reference< XWindow > xPageWindow( m_xWizardPage->getWindow(), UNO_SET_THROW ); + Window* pPageWindow = VCLUnoHelper::GetWindow( xPageWindow ); + if ( pPageWindow == NULL ) + { + // windows created via the XContainerWindowProvider might be controls, not real windows, so resolve + // that one indirection + const Reference< XControl > xPageControl( m_xWizardPage->getWindow(), UNO_QUERY_THROW ); + xPageWindow.set( xPageControl->getPeer(), UNO_QUERY_THROW ); + pPageWindow = VCLUnoHelper::GetWindow( xPageWindow ); + } + + OSL_ENSURE( pPageWindow != NULL, "WizardPageController::getTabPage: unable to find the Window implementation for the page's window!" ); + return dynamic_cast< TabPage* >( pPageWindow ); + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } + return NULL; + } + + //------------------------------------------------------------------------------------------------------------------ + void WizardPageController::initializePage() + { + if ( !m_xWizardPage.is() ) + return; + + try + { + m_xWizardPage->activatePage(); + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } + } + + //------------------------------------------------------------------------------------------------------------------ + sal_Bool WizardPageController::commitPage( WizardTypes::CommitPageReason i_eReason ) + { + if ( !m_xWizardPage.is() ) + return sal_True; + + try + { + return m_xWizardPage->commitPage( WizardShell::convertCommitReasonToTravelType( i_eReason ) ); + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } + + return sal_True; + } + + //------------------------------------------------------------------------------------------------------------------ + bool WizardPageController::canAdvance() const + { + if ( !m_xWizardPage.is() ) + return true; + + try + { + return m_xWizardPage->canAdvance(); + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } + + return true; + } + +//...................................................................................................................... +} } // namespace svt::uno +//...................................................................................................................... diff --git a/svtools/source/uno/wizard/wizardpagecontroller.hxx b/svtools/source/uno/wizard/wizardpagecontroller.hxx new file mode 100644 index 000000000000..9de04d2f0dd4 --- /dev/null +++ b/svtools/source/uno/wizard/wizardpagecontroller.hxx @@ -0,0 +1,75 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef SVT_UNOWIZ_WIZARDPAGECONTROLLER_HXX +#define SVT_UNOWIZ_WIZARDPAGECONTROLLER_HXX + +#include "svtools/wizardmachine.hxx" + +/** === begin UNO includes === **/ +#include +/** === end UNO includes === **/ + +//...................................................................................................................... +namespace svt { namespace uno +{ +//...................................................................................................................... + + class WizardShell; + + //================================================================================================================== + //= WizardPageController + //================================================================================================================== + class WizardPageController : public IWizardPageController + { + public: + WizardPageController( + WizardShell& i_rParent, + const ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XWizardController >& i_rController, + const sal_Int16 i_nPageId + ); + ~WizardPageController(); + + // IWizardPageController overridables + virtual void initializePage(); + virtual sal_Bool commitPage( WizardTypes::CommitPageReason _eReason ); + virtual bool canAdvance() const; + + const ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XWizardPage >& + getWizardPage() const { return m_xWizardPage; } + TabPage* getTabPage() const; + + private: + const ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XWizardController > m_xController; + ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XWizardPage > m_xWizardPage; + const sal_Int16 m_nPageId; + }; + +//...................................................................................................................... +} } // namespace svt::uno +//...................................................................................................................... + +#endif // SVT_UNOWIZ_WIZARDPAGECONTROLLER_HXX diff --git a/svtools/source/uno/wizard/wizardshell.cxx b/svtools/source/uno/wizard/wizardshell.cxx index 1db8588ca713..51dbbe3f2013 100644 --- a/svtools/source/uno/wizard/wizardshell.cxx +++ b/svtools/source/uno/wizard/wizardshell.cxx @@ -27,7 +27,7 @@ #include "precompiled_svtools.hxx" #include "wizardshell.hxx" -#include "wizardpageshell.hxx" +#include "wizardpagecontroller.hxx" #include @@ -200,13 +200,23 @@ namespace svt { namespace uno return sal_True; } + //------------------------------------------------------------------------------------------------------------------ + PWizardPageController WizardShell::impl_getController( TabPage* i_pPage ) const + { + Page2ControllerMap::const_iterator pos = m_aPageControllers.find( i_pPage ); + ENSURE_OR_RETURN( pos != m_aPageControllers.end(), "WizardShell::impl_getController: no controller for this page!", PWizardPageController() ); + return pos->second; + } + //------------------------------------------------------------------------------------------------------------------ Reference< XWizardPage > WizardShell::getCurrentWizardPage() const { const WizardState eState = getCurrentState(); - const WizardPageShell* pPage = dynamic_cast< const WizardPageShell* >( GetPage( eState ) ); - ENSURE_OR_RETURN( pPage, "WizardShell::getCurrentWizardPage: invalid page/implementation!", NULL ); - return pPage->getWizardPage(); + + PWizardPageController pController( impl_getController( GetPage( eState ) ) ); + ENSURE_OR_RETURN( pController, "WizardShell::getCurrentWizardPage: invalid page/controller!", NULL ); + + return pController->getWizardPage(); } //------------------------------------------------------------------------------------------------------------------ @@ -219,7 +229,19 @@ namespace svt { namespace uno TabPage* WizardShell::createPage( WizardState i_nState ) { ENSURE_OR_RETURN( m_xController.is(), "WizardShell::createPage: no WizardController!", NULL ); - return new WizardPageShell( *this, m_xController, impl_stateToPageId( i_nState ) ); + + ::boost::shared_ptr< WizardPageController > pController( new WizardPageController( *this, m_xController, impl_stateToPageId( i_nState ) ) ); + TabPage* pPage = pController->getTabPage(); + ENSURE_OR_RETURN( pPage != NULL, "WizardShell::createPage: illegal tab page!", NULL ); + + m_aPageControllers[ pPage ] = pController; + return pPage; + } + + //------------------------------------------------------------------------------------------------------------------ + IWizardPageController* WizardShell::getPageController( TabPage* i_pCurrentPage ) const + { + return impl_getController( i_pCurrentPage ).get(); } //------------------------------------------------------------------------------------------------------------------ diff --git a/svtools/source/uno/wizard/wizardshell.hxx b/svtools/source/uno/wizard/wizardshell.hxx index b20c9bd6678a..b21e1c4756e5 100644 --- a/svtools/source/uno/wizard/wizardshell.hxx +++ b/svtools/source/uno/wizard/wizardshell.hxx @@ -34,11 +34,17 @@ #include +#include +#include + //...................................................................................................................... namespace svt { namespace uno { //...................................................................................................................... + class WizardPageController; + typedef ::boost::shared_ptr< WizardPageController > PWizardPageController; + //================================================================================================================== //= WizardShell //================================================================================================================== @@ -65,6 +71,8 @@ namespace svt { namespace uno virtual String getStateDisplayName( WizardState i_nState ) const; virtual bool canAdvance() const; virtual sal_Bool onFinish( sal_Int32 _nResult ); + virtual IWizardPageController* + getPageController( TabPage* _pCurrentPage ) const; // attribute access const ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XWizard >& @@ -115,6 +123,8 @@ namespace svt { namespace uno return static_cast< WizardState >( i_nPageId - m_nFirstPageID ); } + PWizardPageController impl_getController( TabPage* i_pPage ) const; + // prevent outside access to some base class members using WizardShell_Base::skip; using WizardShell_Base::skipUntil; @@ -122,9 +132,12 @@ namespace svt { namespace uno using WizardShell_Base::getCurrentState; private: + typedef ::std::map< TabPage*, PWizardPageController > Page2ControllerMap; + const ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XWizard > m_xWizard; const ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XWizardController > m_xController; const sal_Int16 m_nFirstPageID; + Page2ControllerMap m_aPageControllers; }; //...................................................................................................................... -- cgit v1.2.3 From 07030790f7a7fb4d16806cd1f70047717cc07129 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Tue, 25 May 2010 11:43:39 +0200 Subject: unoawt: onFinish does not need this parameter, it's always called with RET_OK --- svtools/inc/svtools/wizardmachine.hxx | 2 +- svtools/source/dialogs/wizardmachine.cxx | 7 +++---- svtools/source/uno/wizard/wizardshell.cxx | 6 +++--- svtools/source/uno/wizard/wizardshell.hxx | 2 +- svtools/workben/unodialog/roadmapskeleton.cxx | 4 ++-- svtools/workben/unodialog/roadmapskeleton.hxx | 2 +- 6 files changed, 11 insertions(+), 12 deletions(-) diff --git a/svtools/inc/svtools/wizardmachine.hxx b/svtools/inc/svtools/wizardmachine.hxx index 9c1b8e2a6867..05e796646253 100644 --- a/svtools/inc/svtools/wizardmachine.hxx +++ b/svtools/inc/svtools/wizardmachine.hxx @@ -259,7 +259,7 @@ namespace svt /** called when the finish button is pressed

By default, only the base class' Finnish method (which is not virtual) is called

*/ - virtual sal_Bool onFinish(sal_Int32 _nResult); + virtual sal_Bool onFinish(); /// travel to the next state sal_Bool travelNext(); diff --git a/svtools/source/dialogs/wizardmachine.cxx b/svtools/source/dialogs/wizardmachine.cxx index bc19a588a204..5a5c094c1572 100644 --- a/svtools/source/dialogs/wizardmachine.cxx +++ b/svtools/source/dialogs/wizardmachine.cxx @@ -445,9 +445,9 @@ namespace svt } //--------------------------------------------------------------------- - sal_Bool OWizardMachine::onFinish(sal_Int32 _nResult) + sal_Bool OWizardMachine::onFinish() { - return Finnish(_nResult); + return Finnish( RET_OK ); } //--------------------------------------------------------------------- @@ -460,8 +460,7 @@ namespace svt { return 0L; } - long nRet = onFinish( RET_OK ); - return nRet; + return onFinish() ? 1L : 0L; } //--------------------------------------------------------------------- diff --git a/svtools/source/uno/wizard/wizardshell.cxx b/svtools/source/uno/wizard/wizardshell.cxx index 51dbbe3f2013..fb78e4a7bd11 100644 --- a/svtools/source/uno/wizard/wizardshell.cxx +++ b/svtools/source/uno/wizard/wizardshell.cxx @@ -276,11 +276,11 @@ namespace svt { namespace uno } //------------------------------------------------------------------------------------------------------------------ - sal_Bool WizardShell::onFinish( sal_Int32 i_nResult ) + sal_Bool WizardShell::onFinish() { try { - if ( ( i_nResult == RET_OK ) && m_xController.is() && !m_xController->confirmFinish() ) + if ( m_xController.is() && !m_xController->confirmFinish() ) return sal_False; } catch( const Exception& ) @@ -288,7 +288,7 @@ namespace svt { namespace uno DBG_UNHANDLED_EXCEPTION(); } - return WizardShell_Base::onFinish( i_nResult ); + return WizardShell_Base::onFinish(); } //...................................................................................................................... diff --git a/svtools/source/uno/wizard/wizardshell.hxx b/svtools/source/uno/wizard/wizardshell.hxx index b21e1c4756e5..ffe4c1fc37f8 100644 --- a/svtools/source/uno/wizard/wizardshell.hxx +++ b/svtools/source/uno/wizard/wizardshell.hxx @@ -70,7 +70,7 @@ namespace svt { namespace uno virtual sal_Bool leaveState( WizardState i_nState ); virtual String getStateDisplayName( WizardState i_nState ) const; virtual bool canAdvance() const; - virtual sal_Bool onFinish( sal_Int32 _nResult ); + virtual sal_Bool onFinish(); virtual IWizardPageController* getPageController( TabPage* _pCurrentPage ) const; diff --git a/svtools/workben/unodialog/roadmapskeleton.cxx b/svtools/workben/unodialog/roadmapskeleton.cxx index f261f219c3fd..e3ed06707f14 100644 --- a/svtools/workben/unodialog/roadmapskeleton.cxx +++ b/svtools/workben/unodialog/roadmapskeleton.cxx @@ -103,9 +103,9 @@ namespace udlg } //-------------------------------------------------------------------- - sal_Bool RoadmapSkeletonDialog::onFinish( sal_Int32 _nResult ) + sal_Bool RoadmapSkeletonDialog::onFinish() { - return RoadmapSkeletonDialog_Base::onFinish( _nResult ); + return RoadmapSkeletonDialog_Base::onFinish(); } //........................................................................ diff --git a/svtools/workben/unodialog/roadmapskeleton.hxx b/svtools/workben/unodialog/roadmapskeleton.hxx index 216c940b842a..8859390c4b58 100644 --- a/svtools/workben/unodialog/roadmapskeleton.hxx +++ b/svtools/workben/unodialog/roadmapskeleton.hxx @@ -52,7 +52,7 @@ namespace udlg virtual sal_Bool prepareLeaveCurrentState( CommitPageReason _eReason ); virtual sal_Bool leaveState( WizardState _nState ); virtual WizardState determineNextState( WizardState _nCurrentState ) const; - virtual sal_Bool onFinish( sal_Int32 _nResult ); + virtual sal_Bool onFinish(); private: ::comphelper::ComponentContext m_aContext; -- cgit v1.2.3 From 4c8dadc628186e05ead435f06ec76dafee693a0b Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Tue, 25 May 2010 11:43:39 +0200 Subject: unoawt: onFinish does not need this parameter, it's always called with RET_OK --- extensions/source/abpilot/abspilot.cxx | 7 ++----- extensions/source/abpilot/abspilot.hxx | 2 +- extensions/source/dbpilots/gridwizard.cxx | 4 ++-- extensions/source/dbpilots/gridwizard.hxx | 3 +-- extensions/source/dbpilots/groupboxwiz.cxx | 7 ++----- extensions/source/dbpilots/groupboxwiz.hxx | 3 +-- extensions/source/dbpilots/listcombowizard.cxx | 7 ++----- extensions/source/dbpilots/listcombowizard.hxx | 3 +-- 8 files changed, 12 insertions(+), 24 deletions(-) diff --git a/extensions/source/abpilot/abspilot.cxx b/extensions/source/abpilot/abspilot.cxx index 105ab39655f0..d8007873a2c4 100644 --- a/extensions/source/abpilot/abspilot.cxx +++ b/extensions/source/abpilot/abspilot.cxx @@ -213,14 +213,11 @@ namespace abp } //--------------------------------------------------------------------- - sal_Bool OAddessBookSourcePilot::onFinish(sal_Int32 _nResult) + sal_Bool OAddessBookSourcePilot::onFinish() { - if (!OAddessBookSourcePilot_Base::onFinish(_nResult)) + if ( !OAddessBookSourcePilot_Base::onFinish() ) return sal_False; - if (RET_OK != _nResult) - return sal_True; - implCommitAll(); addressconfig::markPilotSuccess( getORB() ); diff --git a/extensions/source/abpilot/abspilot.hxx b/extensions/source/abpilot/abspilot.hxx index b0f3b900871b..0abdacd0281d 100644 --- a/extensions/source/abpilot/abspilot.hxx +++ b/extensions/source/abpilot/abspilot.hxx @@ -79,7 +79,7 @@ namespace abp virtual ::svt::OWizardPage* createPage( WizardState _nState ); virtual void enterState( WizardState _nState ); virtual sal_Bool prepareLeaveCurrentState( CommitPageReason _eReason ); - virtual sal_Bool onFinish( sal_Int32 _nResult ); + virtual sal_Bool onFinish(); // RoadmapWizard virtual String getStateDisplayName( WizardState _nState ) const; diff --git a/extensions/source/dbpilots/gridwizard.cxx b/extensions/source/dbpilots/gridwizard.cxx index ec42cf346450..a54ed2f4b879 100644 --- a/extensions/source/dbpilots/gridwizard.cxx +++ b/extensions/source/dbpilots/gridwizard.cxx @@ -285,9 +285,9 @@ namespace dbp } //--------------------------------------------------------------------- - sal_Bool OGridWizard::onFinish(sal_Int32 _nResult) + sal_Bool OGridWizard::onFinish() { - if (!OControlWizard::onFinish(_nResult)) + if ( !OControlWizard::onFinish() ) return sal_False; implApplySettings(); diff --git a/extensions/source/dbpilots/gridwizard.hxx b/extensions/source/dbpilots/gridwizard.hxx index 1ab0d3186440..85b91d274345 100644 --- a/extensions/source/dbpilots/gridwizard.hxx +++ b/extensions/source/dbpilots/gridwizard.hxx @@ -68,8 +68,7 @@ namespace dbp virtual WizardState determineNextState( WizardState _nCurrentState ) const; virtual void enterState( WizardState _nState ); virtual sal_Bool leaveState( WizardState _nState ); - - virtual sal_Bool onFinish(sal_Int32 _nResult); + virtual sal_Bool onFinish(); virtual sal_Bool approveControl(sal_Int16 _nClassId); diff --git a/extensions/source/dbpilots/groupboxwiz.cxx b/extensions/source/dbpilots/groupboxwiz.cxx index f35ed890fde5..9956cfe86428 100644 --- a/extensions/source/dbpilots/groupboxwiz.cxx +++ b/extensions/source/dbpilots/groupboxwiz.cxx @@ -187,18 +187,15 @@ namespace dbp } //--------------------------------------------------------------------- - sal_Bool OGroupBoxWizard::onFinish(sal_Int32 _nResult) + sal_Bool OGroupBoxWizard::onFinish() { - if (RET_OK != _nResult) - return OControlWizard::onFinish(_nResult); - // commit the basic control setttings commitControlSettings(&m_aSettings); // create the radio buttons createRadios(); - return OControlWizard::onFinish(_nResult); + return OControlWizard::onFinish(); } //===================================================================== diff --git a/extensions/source/dbpilots/groupboxwiz.hxx b/extensions/source/dbpilots/groupboxwiz.hxx index cba4895e8664..de0f9767f3a4 100644 --- a/extensions/source/dbpilots/groupboxwiz.hxx +++ b/extensions/source/dbpilots/groupboxwiz.hxx @@ -73,8 +73,7 @@ namespace dbp virtual ::svt::OWizardPage* createPage( WizardState _nState ); virtual WizardState determineNextState( WizardState _nCurrentState ) const; virtual void enterState( WizardState _nState ); - - virtual sal_Bool onFinish(sal_Int32 _nResult); + virtual sal_Bool onFinish(); virtual sal_Bool approveControl(sal_Int16 _nClassId); diff --git a/extensions/source/dbpilots/listcombowizard.cxx b/extensions/source/dbpilots/listcombowizard.cxx index 63659f613460..bf3f56781d63 100644 --- a/extensions/source/dbpilots/listcombowizard.cxx +++ b/extensions/source/dbpilots/listcombowizard.cxx @@ -226,14 +226,11 @@ namespace dbp } //--------------------------------------------------------------------- - sal_Bool OListComboWizard::onFinish(sal_Int32 _nResult) + sal_Bool OListComboWizard::onFinish() { - if (!OControlWizard::onFinish(_nResult)) + if ( !OControlWizard::onFinish() ) return sal_False; - if (RET_OK != _nResult) - return sal_True; - implApplySettings(); return sal_True; } diff --git a/extensions/source/dbpilots/listcombowizard.hxx b/extensions/source/dbpilots/listcombowizard.hxx index c30a19a77a00..05f7f70ea65d 100644 --- a/extensions/source/dbpilots/listcombowizard.hxx +++ b/extensions/source/dbpilots/listcombowizard.hxx @@ -80,8 +80,7 @@ namespace dbp virtual WizardState determineNextState( WizardState _nCurrentState ) const; virtual void enterState( WizardState _nState ); virtual sal_Bool leaveState( WizardState _nState ); - - virtual sal_Bool onFinish(sal_Int32 _nResult); + virtual sal_Bool onFinish(); virtual sal_Bool approveControl(sal_Int16 _nClassId); -- cgit v1.2.3 From 6d599d17f761fbe7be3c84e02d8b24f0978051c8 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Tue, 25 May 2010 11:43:39 +0200 Subject: unoawt: onFinish does not need this parameter, it's always called with RET_OK --- dbaccess/source/ext/macromigration/macromigrationdialog.cxx | 4 ++-- dbaccess/source/ext/macromigration/macromigrationdialog.hxx | 2 +- dbaccess/source/ui/dlg/dbwiz.cxx | 4 ++-- dbaccess/source/ui/dlg/dbwizsetup.cxx | 8 ++++---- dbaccess/source/ui/inc/dbwiz.hxx | 2 +- dbaccess/source/ui/inc/dbwizsetup.hxx | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/dbaccess/source/ext/macromigration/macromigrationdialog.cxx b/dbaccess/source/ext/macromigration/macromigrationdialog.cxx index 53bcfb581d91..5ee29ff5d35f 100644 --- a/dbaccess/source/ext/macromigration/macromigrationdialog.cxx +++ b/dbaccess/source/ext/macromigration/macromigrationdialog.cxx @@ -314,9 +314,9 @@ namespace dbmm } //-------------------------------------------------------------------- - sal_Bool MacroMigrationDialog::onFinish( sal_Int32 _nResult ) + sal_Bool MacroMigrationDialog::onFinish() { - return MacroMigrationDialog_Base::onFinish( _nResult ); + return MacroMigrationDialog_Base::onFinish(); } //-------------------------------------------------------------------- diff --git a/dbaccess/source/ext/macromigration/macromigrationdialog.hxx b/dbaccess/source/ext/macromigration/macromigrationdialog.hxx index 68137db3eb80..d2af622316da 100644 --- a/dbaccess/source/ext/macromigration/macromigrationdialog.hxx +++ b/dbaccess/source/ext/macromigration/macromigrationdialog.hxx @@ -68,7 +68,7 @@ namespace dbmm virtual sal_Bool prepareLeaveCurrentState( CommitPageReason _eReason ); virtual sal_Bool leaveState( WizardState _nState ); virtual WizardState determineNextState( WizardState _nCurrentState ) const; - virtual sal_Bool onFinish( sal_Int32 _nResult ); + virtual sal_Bool onFinish(); // Dialog overridables virtual BOOL Close(); diff --git a/dbaccess/source/ui/dlg/dbwiz.cxx b/dbaccess/source/ui/dlg/dbwiz.cxx index e6f9c2024212..7fcf2ae8429d 100644 --- a/dbaccess/source/ui/dlg/dbwiz.cxx +++ b/dbaccess/source/ui/dlg/dbwiz.cxx @@ -411,10 +411,10 @@ IWizardPageController* ODbTypeWizDialog::getPageController( TabPage* _pCurrentPa return pPage; } // ----------------------------------------------------------------------------- -sal_Bool ODbTypeWizDialog::onFinish(sal_Int32 _nResult) +sal_Bool ODbTypeWizDialog::onFinish() { saveDatasource(); - return m_pImpl->saveChanges(*m_pOutSet) ? OWizardMachine::onFinish(_nResult) : sal_False; + return m_pImpl->saveChanges(*m_pOutSet) ? OWizardMachine::onFinish() : sal_False; } //......................................................................... } // namespace dbaui diff --git a/dbaccess/source/ui/dlg/dbwizsetup.cxx b/dbaccess/source/ui/dlg/dbwizsetup.cxx index 3be4b8d663cc..b09c691864a3 100644 --- a/dbaccess/source/ui/dlg/dbwizsetup.cxx +++ b/dbaccess/source/ui/dlg/dbwizsetup.cxx @@ -789,7 +789,7 @@ IMPL_LINK(ODbTypeWizDialogSetup, OnRecentDocumentSelected, OGeneralPage*, /*_pGe IMPL_LINK(ODbTypeWizDialogSetup, OnSingleDocumentChosen, OGeneralPage*, /*_pGeneralPage*/) { if ( prepareLeaveCurrentState( eFinish ) ) - onFinish( RET_OK ); + onFinish(); return 0L; } @@ -1206,7 +1206,7 @@ sal_Bool ODbTypeWizDialogSetup::SaveDatabaseDocument() } // ----------------------------------------------------------------------------- - sal_Bool ODbTypeWizDialogSetup::onFinish(sal_Int32 _nResult) + sal_Bool ODbTypeWizDialogSetup::onFinish() { if ( m_pGeneralPage->GetDatabaseCreationMode() == OGeneralPage::eOpenExisting ) { @@ -1214,7 +1214,7 @@ sal_Bool ODbTypeWizDialogSetup::SaveDatabaseDocument() // wants us to load could be a non-database document. Instead, we asynchronously // open the selected document. Thus, the wizard's return value is RET_CANCEL, // which means to not continue loading the database document - if ( !OWizardMachine::onFinish( RET_CANCEL ) ) + if ( !OWizardMachine::Finnish( RET_CANCEL ) ) return sal_False; Reference< XComponentLoader > xFrameLoader; @@ -1237,7 +1237,7 @@ sal_Bool ODbTypeWizDialogSetup::SaveDatabaseDocument() skipUntil(PAGE_DBSETUPWIZARD_FINAL); } if (getCurrentState() == PAGE_DBSETUPWIZARD_FINAL) - return SaveDatabaseDocument() ? OWizardMachine::onFinish( _nResult ) : sal_False; + return SaveDatabaseDocument() ? OWizardMachine::onFinish() : sal_False; else { enableButtons( WZB_FINISH, sal_False ); diff --git a/dbaccess/source/ui/inc/dbwiz.hxx b/dbaccess/source/ui/inc/dbwiz.hxx index 8b1852031776..94b3fd683336 100644 --- a/dbaccess/source/ui/inc/dbwiz.hxx +++ b/dbaccess/source/ui/inc/dbwiz.hxx @@ -113,7 +113,7 @@ protected: virtual sal_Bool leaveState(WizardState _nState); virtual ::svt::IWizardPageController* getPageController( TabPage* _pCurrentPage ) const; - virtual sal_Bool onFinish(sal_Int32 _nResult); + virtual sal_Bool onFinish(); protected: inline sal_Bool isUIEnabled() const { return m_bUIEnabled; } diff --git a/dbaccess/source/ui/inc/dbwizsetup.hxx b/dbaccess/source/ui/inc/dbwizsetup.hxx index 31ff642bf0d9..039fc64392de 100644 --- a/dbaccess/source/ui/inc/dbwizsetup.hxx +++ b/dbaccess/source/ui/inc/dbwizsetup.hxx @@ -150,7 +150,7 @@ protected: virtual sal_Bool leaveState(WizardState _nState); virtual void enterState(WizardState _nState); virtual ::svt::IWizardPageController* getPageController( TabPage* _pCurrentPage ) const; - virtual sal_Bool onFinish(sal_Int32 _nResult); + virtual sal_Bool onFinish(); protected: inline sal_Bool isUIEnabled() const { return m_bUIEnabled; } -- cgit v1.2.3 From 55ddf84a5f06e93afe9e03ccc4a97b5af280e17f Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Tue, 25 May 2010 12:23:56 +0200 Subject: unoawt: set the WB_CHILDDLGCTRL bit at the tab page, this ensures proper keyboard (TAB) traveling --- svtools/source/uno/wizard/wizardpagecontroller.cxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/svtools/source/uno/wizard/wizardpagecontroller.cxx b/svtools/source/uno/wizard/wizardpagecontroller.cxx index fae58a6d6dcd..d6f7029b477c 100644 --- a/svtools/source/uno/wizard/wizardpagecontroller.cxx +++ b/svtools/source/uno/wizard/wizardpagecontroller.cxx @@ -81,6 +81,10 @@ namespace svt { namespace uno Reference< XWindow > xPageWindow( m_xWizardPage->getWindow(), UNO_SET_THROW ); xPageWindow->setVisible( sal_True ); + + TabPage* pTabPage( getTabPage() ); + if ( pTabPage ) + pTabPage->SetStyle( pTabPage->GetStyle() | WB_CHILDDLGCTRL | WB_DIALOGCONTROL ); } catch( const Exception& ) { -- cgit v1.2.3 From 780bcf3625211e970d1b2c3ac610a088fdb02d5e Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Tue, 25 May 2010 13:00:57 +0200 Subject: unoawt: added missing documentation of the new Wizard API --- offapi/com/sun/star/ui/dialogs/Wizard.idl | 2 +- offapi/com/sun/star/ui/dialogs/WizardButton.idl | 7 +++- .../com/sun/star/ui/dialogs/WizardTravelType.idl | 5 ++- offapi/com/sun/star/ui/dialogs/XWizard.idl | 42 ++++++++++++++++++++-- .../com/sun/star/ui/dialogs/XWizardController.idl | 28 +++++++++++++-- offapi/com/sun/star/ui/dialogs/XWizardPage.idl | 2 +- 6 files changed, 77 insertions(+), 9 deletions(-) diff --git a/offapi/com/sun/star/ui/dialogs/Wizard.idl b/offapi/com/sun/star/ui/dialogs/Wizard.idl index 36c0f17dedb5..4e6b13f44ca2 100644 --- a/offapi/com/sun/star/ui/dialogs/Wizard.idl +++ b/offapi/com/sun/star/ui/dialogs/Wizard.idl @@ -38,7 +38,7 @@ interface XWizardController; //================================================================================================================== -/** +/** provides a framework for implementing a wizard dialog. */ service Wizard : XWizard { diff --git a/offapi/com/sun/star/ui/dialogs/WizardButton.idl b/offapi/com/sun/star/ui/dialogs/WizardButton.idl index 3169adeab95c..aeb22910996c 100644 --- a/offapi/com/sun/star/ui/dialogs/WizardButton.idl +++ b/offapi/com/sun/star/ui/dialogs/WizardButton.idl @@ -33,14 +33,19 @@ module com { module sun { module star { module ui { module dialogs { //================================================================================================================== -/** +/** denotes the buttons found in a Wizard */ constants WizardButton { + /// denotes the button used to travel forward through the wizard const short NEXT = 1; + /// denotes the button used to travel backward through the wizard const short PREVIOUS = 2; + /// denotes the button used to finish the wizard const short FINISH = 3; + /// denotes the button used to cancel the wizard const short CANCEL = 4; + /// denotes the button used to request help const short HELP = 5; }; diff --git a/offapi/com/sun/star/ui/dialogs/WizardTravelType.idl b/offapi/com/sun/star/ui/dialogs/WizardTravelType.idl index 9efd822ffe33..271a006346b7 100644 --- a/offapi/com/sun/star/ui/dialogs/WizardTravelType.idl +++ b/offapi/com/sun/star/ui/dialogs/WizardTravelType.idl @@ -33,12 +33,15 @@ module com { module sun { module star { module ui { module dialogs { //================================================================================================================== -/** +/** denotes ways to leave a Wizard's page */ constants WizardTravelType { + /// indicates the wizard page is left due to forward traveling through the wizard const short FORWARD = 1; + /// indicates the wizard page is left due to backward traveling through the wizard const short BACKWARD = 2; + /// indicates the wizard page is left since the wizard is about to be finished const short FINISH = 3; }; diff --git a/offapi/com/sun/star/ui/dialogs/XWizard.idl b/offapi/com/sun/star/ui/dialogs/XWizard.idl index a3aa93b9cc62..d894c85db1fd 100644 --- a/offapi/com/sun/star/ui/dialogs/XWizard.idl +++ b/offapi/com/sun/star/ui/dialogs/XWizard.idl @@ -38,7 +38,45 @@ module com { module sun { module star { module ui { module dialogs { interface XWizardPage; -/** +/** is the main interface implemented by the Wizard services. + +

A wizard is a dialog which guides the user through a number of tasks (usually input of data), which the user can + accomplish either sequentially or out-of-order. For this, a wizard is comprised of a number of tab pages, + each page representing a single step.

+ +

Sequential navigation in a wizard is done via a Next and a Back button. Non-sequential navigation + is done via a roadmap, which is displayed on the left hand side of the wizard dialog, lists all available + steps, and allows jumping to a certain step (where the creator of the wizard can restrict the available steps + depending on the current situation in the wizard, see below).

+ +

A sequence of steps in a wizard dialog is called a path. A given wizard can support one or multiple paths, + which are declared at the time of construction of the wizard.

+ +

In the simplest case, where the wizard supports only one path, all available steps are displayed in the roadmap, + and the user can simply travel through them as desired.

+ +

If the wizard is more complex, and supports multiple paths, things become more complicated. In a given situation + of the wizard, where the user is at step k of the current path, the potential or conflicting + paths are those whose first k steps are the same as in the current path. Obviously, there's at least one + potential path in every situation: the current one. If there is more than one, then the future steps in the dialog + are not finally decided. In such a case, the roadmap will display future steps up to the point where the potential + paths diverge, and then an item ... indicating that the order of steps is undecided.

+ +

An XWizardController can declare a certain path as active path by calling the activatePath + method. Usually, this is done depending on user input. For instance, your wizard could have radio buttons on the + first page which effectively decide about which path to take in the wizard.

+ +

Single steps in the wizard can be freely enabled and disabled, using the enablePage method. + Disabled pages are skipped during sequential traveling, and not selectable in the roadmap.

+ +

The state of the Next button in the dialog will be automatically maintained in most situations, + depending on the results of calls to the XWizardController::canAdvance and XWizardPage::canAdvance + methods. More sophisticated wizard logic, however, will need manual calls to the enableButton method. + Also, the Finish button needs to be maintained by the wizard's controller, too, as it cannot be decided + generically in which situations it should be enabled or disabled.

+ + @see XWizardController + @see XWizardPage */ interface XWizard { @@ -111,7 +149,7 @@ interface XWizard /** updates the wizard elements which are related to traveling. -

For instance, the Next button is disabled if the current page's XWizardPage::canAdvance +

For instance, the Next button is disabled if the current page's XWizardPage::canAdvance method returns .

You usually call this method from within a wizard page whose state changed in a way that it affects the diff --git a/offapi/com/sun/star/ui/dialogs/XWizardController.idl b/offapi/com/sun/star/ui/dialogs/XWizardController.idl index e38bcb1a5f1f..abcec1ce6ef6 100644 --- a/offapi/com/sun/star/ui/dialogs/XWizardController.idl +++ b/offapi/com/sun/star/ui/dialogs/XWizardController.idl @@ -33,20 +33,36 @@ module com { module sun { module star { module ui { module dialogs { -interface XWizard; - //================================================================================================================== -/** +/** is the interface of a client-provided controller of a custom Wizard. */ interface XWizardController { + /** creates a page + +

Wizard pages are created on demand, when the respective page is reached during traveling through the + wizard. Effectively, this means the method is called at most once for each possible page ID.

+ + @param ParentWindow + the parent window to use for the page window + @param PageId + the ID of the page. + @return + the requested page. + */ XWizardPage createPage( [in] ::com::sun::star::awt::XWindow ParentWindow, [in] short PageId ); + /** provides the title of a page given by ID + +

The page titles are displayed in the wizard's roadmap.

+ */ string getPageTitle( [in] short PageId ); boolean canAdvance(); + /** called when a new page in the wizard is being activated + */ void onActivatePage( [in] short PageId ); /** called when the current page is about to be left @@ -61,8 +77,14 @@ interface XWizardController */ boolean confirmDeactivatePage( [in] short PageId, [in] short Reason ); + /** called when a page in the wizard is being deactivated + */ void onDeactivatePage( [in] short PageId ); + /** called when the wizard is about to be finished. + +

This method allows the controller to do any final checks, and ultimatively veto finishing the wizard.

+ */ boolean confirmFinish(); }; diff --git a/offapi/com/sun/star/ui/dialogs/XWizardPage.idl b/offapi/com/sun/star/ui/dialogs/XWizardPage.idl index 7c49db499214..50f3212e1cf2 100644 --- a/offapi/com/sun/star/ui/dialogs/XWizardPage.idl +++ b/offapi/com/sun/star/ui/dialogs/XWizardPage.idl @@ -35,7 +35,7 @@ module com { module sun { module star { module ui { module dialogs { //================================================================================================================== -/** +/** is a single page of a Wizard */ interface XWizardPage : ::com::sun::star::lang::XComponent { -- cgit v1.2.3 From 4e5d6754bfc3b3c9f726483be467e7c0ea59c43c Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Tue, 25 May 2010 14:15:22 +0200 Subject: unoawt: set Title as TitleBase --- svtools/source/uno/wizard/unowizard.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/svtools/source/uno/wizard/unowizard.cxx b/svtools/source/uno/wizard/unowizard.cxx index ae9109fdfa00..08b0211d6173 100644 --- a/svtools/source/uno/wizard/unowizard.cxx +++ b/svtools/source/uno/wizard/unowizard.cxx @@ -207,8 +207,9 @@ namespace svt { namespace uno //-------------------------------------------------------------------- Dialog* Wizard::createDialog( Window* i_pParent ) { - Dialog* pDialog( new WizardShell( i_pParent, this, m_xController, m_aWizardSteps ) ); + WizardShell* pDialog( new WizardShell( i_pParent, this, m_xController, m_aWizardSteps ) ); pDialog->SetSmartHelpId( SmartId( m_sHelpURL ) ); + pDialog->setTitleBase( m_sTitle ); return pDialog; } -- cgit v1.2.3 From 0a10dd5257f045a3ec7f1387c16f20d7e2b6bb48 Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Tue, 25 May 2010 16:21:30 +0200 Subject: #i110629# corrected usage of aRect and maBoundRect in connector shape --- svx/source/svdraw/svdoedge.cxx | 41 ++++++++++++++++++++++++++++++----------- 1 file changed, 30 insertions(+), 11 deletions(-) diff --git a/svx/source/svdraw/svdoedge.cxx b/svx/source/svdraw/svdoedge.cxx index dc76855f05cc..6482c28befb9 100644 --- a/svx/source/svdraw/svdoedge.cxx +++ b/svx/source/svdraw/svdoedge.cxx @@ -1674,6 +1674,11 @@ void SdrEdgeObj::SetEdgeTrackPath( const basegfx::B2DPolyPolygon& rPoly ) *pEdgeTrack = XPolygon( rPoly.getB2DPolygon( 0 ) ); bEdgeTrackDirty = sal_False; bEdgeTrackUserDefined = sal_True; + + // #i110629# also set aRect and maSnapeRect dependent from pEdgeTrack + const Rectangle aPolygonBounds(pEdgeTrack->GetBoundRect()); + aRect = aPolygonBounds; + maSnapRect = aPolygonBounds; } } @@ -2206,17 +2211,31 @@ FASTBOOL SdrEdgeObj::ImpFindConnector(const Point& rPt, const SdrPageView& rPV, void SdrEdgeObj::NbcSetSnapRect(const Rectangle& rRect) { - Rectangle aOld(GetSnapRect()); - long nMulX = rRect.Right() - rRect.Left(); - long nDivX = aOld.Right() - aOld.Left(); - long nMulY = rRect.Bottom() - rRect.Top(); - long nDivY = aOld.Bottom() - aOld.Top(); - if ( nDivX == 0 ) { nMulX = 1; nDivX = 1; } - if ( nDivY == 0 ) { nMulY = 1; nDivY = 1; } - Fraction aX(nMulX, nDivX); - Fraction aY(nMulY, nDivY); - NbcResize(aOld.TopLeft(), aX, aY); - NbcMove(Size(rRect.Left() - aOld.Left(), rRect.Top() - aOld.Top())); + const Rectangle aOld(GetSnapRect()); + + if(aOld != rRect) + { + if(aRect.IsEmpty() && 0 == pEdgeTrack->GetPointCount()) + { + // #i110629# When initializing, do not scale on empty Rectangle; this + // will mirror the underlying text object (!) + aRect = rRect; + maSnapRect = rRect; + } + else + { + long nMulX = rRect.Right() - rRect.Left(); + long nDivX = aOld.Right() - aOld.Left(); + long nMulY = rRect.Bottom() - rRect.Top(); + long nDivY = aOld.Bottom() - aOld.Top(); + if ( nDivX == 0 ) { nMulX = 1; nDivX = 1; } + if ( nDivY == 0 ) { nMulY = 1; nDivY = 1; } + Fraction aX(nMulX, nDivX); + Fraction aY(nMulY, nDivY); + NbcResize(aOld.TopLeft(), aX, aY); + NbcMove(Size(rRect.Left() - aOld.Left(), rRect.Top() - aOld.Top())); + } + } } void SdrEdgeObj::NbcMove(const Size& rSiz) -- cgit v1.2.3 From f46cc6b4b7fdee1fe9fa86c94c62721c8c7f0305 Mon Sep 17 00:00:00 2001 From: Ingrid Halama Date: Wed, 26 May 2010 10:21:48 +0200 Subject: chart47: #i83868# correct test and assertion for property 'SymbolBitmapURL' --- chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx index ea0b8361ae45..4ca8f7161f6e 100644 --- a/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx +++ b/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx @@ -386,7 +386,6 @@ void WrappedSymbolBitmapURLProperty::setValueToSeries( { bool bMatchesPrefix = aNewGraphicURL.matchAsciiL( RTL_CONSTASCII_STRINGPARAM( UNO_NAME_GRAPHOBJ_URLPREFIX )); - OSL_ENSURE( bMatchesPrefix, "Invalid URL for Symbol Bitmap" ); if( bMatchesPrefix ) { GraphicObject aGrObj = GraphicObject( @@ -407,6 +406,7 @@ void WrappedSymbolBitmapURLProperty::setValueToSeries( C2U("URL"), -1, uno::makeAny( aNewGraphicURL ), beans::PropertyState_DIRECT_VALUE ); aSymbol.Graphic.set( xGraphProv->queryGraphic( aArgs )); + OSL_ENSURE( aSymbol.Graphic.is(), "Invalid URL for Symbol Bitmap" ); xSeriesPropertySet->setPropertyValue( C2U("Symbol"), uno::makeAny( aSymbol ) ); } catch( const uno::Exception & ex ) -- cgit v1.2.3 From 5cbe50652eaa9fb8279d9b1cf90255ff7b1a037b Mon Sep 17 00:00:00 2001 From: Ingrid Halama Date: Wed, 26 May 2010 10:21:48 +0200 Subject: chart47: #i83868# correct test and assertion for property 'SymbolBitmapURL' --- qadevOOo/tests/java/ifc/chart/_ChartDataPointProperties.java | 4 ++-- qadevOOo/tests/java/ifc/chart/_LineDiagram.java | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/qadevOOo/tests/java/ifc/chart/_ChartDataPointProperties.java b/qadevOOo/tests/java/ifc/chart/_ChartDataPointProperties.java index 99a89cf3373d..2ae9ac7fa36b 100644 --- a/qadevOOo/tests/java/ifc/chart/_ChartDataPointProperties.java +++ b/qadevOOo/tests/java/ifc/chart/_ChartDataPointProperties.java @@ -45,7 +45,7 @@ import com.sun.star.chart.XDiagram; *

* The following predefined files needed to complete the test: *

    -*
  • poliball.gif : +*
  • space-metal.jpg : * for test of property 'SymbolBitmapURL'
  • *

      * This test needs the following object relations : @@ -79,7 +79,7 @@ public class _ChartDataPointProperties extends MultiPropertyTest { protected PropertyTester URLTester = new PropertyTester() { protected Object getNewValue(String propName, Object oldValue) throws java.lang.IllegalArgumentException { - return utils.getFullTestURL("poliball.gif"); + return utils.getFullTestURL("space-metal.jpg"); } }; diff --git a/qadevOOo/tests/java/ifc/chart/_LineDiagram.java b/qadevOOo/tests/java/ifc/chart/_LineDiagram.java index 37635266715d..a2555ea26f69 100644 --- a/qadevOOo/tests/java/ifc/chart/_LineDiagram.java +++ b/qadevOOo/tests/java/ifc/chart/_LineDiagram.java @@ -48,7 +48,7 @@ import com.sun.star.uno.UnoRuntime; *

    * The following predefined files needed to complete the test: *

      -*
    • poliball.gif : +*
    • space-metal.jpg : * for test of property 'SymbolBitmapURL'
    • *
    • crazy-blue.jpg : * for test of property 'SymbolBitmapURL'
    • @@ -97,9 +97,9 @@ public class _LineDiagram extends MultiPropertyTest { protected PropertyTester URLTester = new PropertyTester() { protected Object getNewValue(String propName, Object oldValue) throws java.lang.IllegalArgumentException { - if (oldValue.equals(util.utils.getFullTestURL("poliball.gif"))) + if (oldValue.equals(util.utils.getFullTestURL("space-metal.jpg"))) return util.utils.getFullTestURL("crazy-blue.jpg"); else - return util.utils.getFullTestURL("poliball.gif"); + return util.utils.getFullTestURL("space-metal.jpg"); } } ; -- cgit v1.2.3 From 7ac5261f789e58e489652ed988319568185b681b Mon Sep 17 00:00:00 2001 From: Ingrid Halama Date: Wed, 26 May 2010 10:39:54 +0200 Subject: chart47: #i79087# reduce assertions 'Trying to set a read-only property' --- chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx | 1 - 1 file changed, 1 deletion(-) diff --git a/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx index fef3e1c10b05..1c7b495bd566 100644 --- a/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx +++ b/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx @@ -976,7 +976,6 @@ void WrappedStatisticPropertySetProperty::setValueToSeries( const Reference< beans::XPropertySet >& /* xSeriesPropertySet */ , Reference< beans::XPropertySet > /* xNewValue */ ) const { - OSL_ENSURE( false, "Trying to set a read-only property" ); } //----------------------------------------------------------------------------- -- cgit v1.2.3 From 1e96d7d75ab2fd674d80788d7ebd52ce97fb0d17 Mon Sep 17 00:00:00 2001 From: Ingo Schmidt Date: Wed, 26 May 2010 14:44:44 +0200 Subject: native305 #i92977# new Windows INSTALLLOCATION settings --- .../windows/msi_templates/ControlE.idt | 1 - .../windows/msi_templates/CustomAc.idt | 3 - .../windows/msi_templates/InstallE.idt | 3 - .../windows/msi_templates/AdminExe.idt | 3 - .../windows/msi_templates/AppSearc.idt | 12 -- .../windows/msi_templates/CustomAc.idt | 3 - .../windows/msi_templates/InstallE.idt | 3 - .../windows/msi_templates/RegLocat.idt | 6 - .../inc_ure/windows/msi_templates/AdminExe.idt | 1 - .../inc_ure/windows/msi_templates/CustomAc.idt | 1 - .../inc_ure/windows/msi_templates/InstallE.idt | 1 - instsetoo_native/util/makefile.mk | 4 +- instsetoo_native/util/openoffice.lst | 7 - scp2/source/javafilter/registryitem_javafilter.scp | 8 +- scp2/source/ooo/common_brand.scp | 6 +- scp2/source/ooo/ooo_brand.scp | 2 +- scp2/source/ooo/registryitem_ooo.scp | 22 +-- scp2/source/ooo/ure.scp | 2 +- scp2/source/ooo/ure_standalone.scp | 18 +- scp2/source/sdkoo/sdkoo.scp | 10 +- .../winexplorerext/registryitem_winexplorerext.scp | 24 +-- solenv/bin/make_installer.pl | 6 +- solenv/bin/modules/installer/globals.pm | 8 +- solenv/bin/modules/installer/scriptitems.pm | 12 -- solenv/bin/modules/installer/windows/component.pm | 16 +- solenv/bin/modules/installer/windows/directory.pm | 193 ++++++++++----------- solenv/bin/modules/installer/windows/idtglobal.pm | 38 ---- solenv/bin/modules/installer/windows/property.pm | 12 -- solenv/bin/modules/installer/windows/registry.pm | 8 +- solenv/bin/modules/installer/windows/shortcut.pm | 4 +- solenv/bin/modules/installer/worker.pm | 3 +- 31 files changed, 158 insertions(+), 282 deletions(-) mode change 100755 => 100644 scp2/source/winexplorerext/registryitem_winexplorerext.scp diff --git a/instsetoo_native/inc_ooolangpack/windows/msi_templates/ControlE.idt b/instsetoo_native/inc_ooolangpack/windows/msi_templates/ControlE.idt index 3ab09afdb990..dea5e9767a6e 100644 --- a/instsetoo_native/inc_ooolangpack/windows/msi_templates/ControlE.idt +++ b/instsetoo_native/inc_ooolangpack/windows/msi_templates/ControlE.idt @@ -56,7 +56,6 @@ InstallChangeFolder Cancel NewDialog DestinationFolder 1 2 InstallChangeFolder Cancel Reset 0 1 1 InstallChangeFolder OK NewDialog DestinationFolder 1 3 InstallChangeFolder OK SetTargetPath [_BrowseProperty] 1 2 -InstallChangeFolder OK DoAction SetOfficeInstallLocation 1 4 InstallChangeFolder Up DirectoryListUp 0 1 0 InstallWelcome Back NewDialog SplashBitmap Display_IsBitmapDlg 1 InstallWelcome Cancel SpawnDialog CancelSetup 1 0 diff --git a/instsetoo_native/inc_ooolangpack/windows/msi_templates/CustomAc.idt b/instsetoo_native/inc_ooolangpack/windows/msi_templates/CustomAc.idt index d9971918d3f5..7af1c7b26429 100644 --- a/instsetoo_native/inc_ooolangpack/windows/msi_templates/CustomAc.idt +++ b/instsetoo_native/inc_ooolangpack/windows/msi_templates/CustomAc.idt @@ -5,9 +5,6 @@ setAllUsersProfile2K 51 ALLUSERSPROFILE [%ALLUSERSPROFILE] SetAllUsersProfileNT 51 ALLUSERSPROFILE [%SystemRoot]\Profiles\All Users setUserProfileNT 51 USERPROFILE [%USERPROFILE] SetARPInstallLocation 51 ARPINSTALLLOCATION [INSTALLLOCATION] -SetOfficeInstallLocation 51 OFFICEINSTALLLOCATION [OFFICEDIRECTORYGID] -SetBasisInstallLocation 51 BASISINSTALLLOCATION [BASISDIRECTORYGID] -SetUreInstallLocation 51 UREINSTALLLOCATION [UREDIRECTORYGID] NewProductFound 19 OOO_CUSTOMACTION_1 SameProductFound 19 OOO_CUSTOMACTION_2 RunningOffice 19 OOO_CUSTOMACTION_4 diff --git a/instsetoo_native/inc_ooolangpack/windows/msi_templates/InstallE.idt b/instsetoo_native/inc_ooolangpack/windows/msi_templates/InstallE.idt index 5db654cb045c..90ba9c6a6005 100644 --- a/instsetoo_native/inc_ooolangpack/windows/msi_templates/InstallE.idt +++ b/instsetoo_native/inc_ooolangpack/windows/msi_templates/InstallE.idt @@ -56,9 +56,6 @@ ScheduleReboot ISSCHEDULEREBOOT 3125 SelfRegModules 2850 SelfUnregModules 1100 SetARPInstallLocation 990 -SetOfficeInstallLocation Not Installed 575 -SetBasisInstallLocation Not Installed 576 -SetUreInstallLocation Not Installed 577 SetODBCFolders 550 StartServices VersionNT 2800 StopServices VersionNT 950 diff --git a/instsetoo_native/inc_openoffice/windows/msi_templates/AdminExe.idt b/instsetoo_native/inc_openoffice/windows/msi_templates/AdminExe.idt index 0be369431d84..ede3f7cb4f42 100644 --- a/instsetoo_native/inc_openoffice/windows/msi_templates/AdminExe.idt +++ b/instsetoo_native/inc_openoffice/windows/msi_templates/AdminExe.idt @@ -11,6 +11,3 @@ InstallFinalize 400 InstallInitialize 250 InstallValidate 200 ScheduleReboot ISSCHEDULEREBOOT 375 -SetOfficeInstallLocation 410 -SetBasisInstallLocation 420 -SetUreInstallLocation 430 diff --git a/instsetoo_native/inc_openoffice/windows/msi_templates/AppSearc.idt b/instsetoo_native/inc_openoffice/windows/msi_templates/AppSearc.idt index a4a5415fd928..9bb051e56492 100644 --- a/instsetoo_native/inc_openoffice/windows/msi_templates/AppSearc.idt +++ b/instsetoo_native/inc_openoffice/windows/msi_templates/AppSearc.idt @@ -1,17 +1,5 @@ Property Signature_ s72 s72 AppSearch Property Signature_ -UREUNINSTALLLOCATION ureuninstalluser -UREUNINSTALLLOCATION ureuninstallmachine -BASISUNINSTALLLOCATION basisuninstalluser -BASISUNINSTALLLOCATION basisuninstallmachine -OFFICEUNINSTALLLOCATION officeuninstalluser -OFFICEUNINSTALLLOCATION officeuninstallmachine -UREINSTALLLOCATION ureuninstalluser -UREINSTALLLOCATION ureuninstallmachine -BASISINSTALLLOCATION basisuninstalluser -BASISINSTALLLOCATION basisuninstallmachine -OFFICEINSTALLLOCATION officeuninstalluser -OFFICEINSTALLLOCATION officeuninstallmachine INSTALLLOCATION installuser INSTALLLOCATION installmachine diff --git a/instsetoo_native/inc_openoffice/windows/msi_templates/CustomAc.idt b/instsetoo_native/inc_openoffice/windows/msi_templates/CustomAc.idt index 80514fd1904b..17a47e8e9889 100644 --- a/instsetoo_native/inc_openoffice/windows/msi_templates/CustomAc.idt +++ b/instsetoo_native/inc_openoffice/windows/msi_templates/CustomAc.idt @@ -122,9 +122,6 @@ setAllUsersProfile2K 51 ALLUSERSPROFILE [%ALLUSERSPROFILE] SetAllUsersProfileNT 51 ALLUSERSPROFILE [%SystemRoot]\Profiles\All Users setUserProfileNT 51 USERPROFILE [%USERPROFILE] SetARPInstallLocation 51 ARPINSTALLLOCATION [INSTALLLOCATION] -SetOfficeInstallLocation 51 OFFICEINSTALLLOCATION [OFFICEDIRECTORYGID] -SetBasisInstallLocation 51 BASISINSTALLLOCATION [BASISDIRECTORYGID] -SetUreInstallLocation 51 UREINSTALLLOCATION [UREDIRECTORYGID] NewProductFound 19 OOO_CUSTOMACTION_1 SameProductFound 19 OOO_CUSTOMACTION_2 SetLanguageSelected 51 LANG_SELECTED 1 diff --git a/instsetoo_native/inc_openoffice/windows/msi_templates/InstallE.idt b/instsetoo_native/inc_openoffice/windows/msi_templates/InstallE.idt index 11f97a0bb797..defde2299409 100644 --- a/instsetoo_native/inc_openoffice/windows/msi_templates/InstallE.idt +++ b/instsetoo_native/inc_openoffice/windows/msi_templates/InstallE.idt @@ -173,9 +173,6 @@ ScheduleReboot ISSCHEDULEREBOOT 3125 SelfRegModules 2850 SelfUnregModules 1100 SetARPInstallLocation 990 -SetOfficeInstallLocation Not Installed 575 -SetBasisInstallLocation Not Installed 576 -SetUreInstallLocation Not Installed 577 SetODBCFolders 550 StartServices VersionNT 2800 StopServices VersionNT 950 diff --git a/instsetoo_native/inc_openoffice/windows/msi_templates/RegLocat.idt b/instsetoo_native/inc_openoffice/windows/msi_templates/RegLocat.idt index 349aa0604ca3..2fb2d2963727 100644 --- a/instsetoo_native/inc_openoffice/windows/msi_templates/RegLocat.idt +++ b/instsetoo_native/inc_openoffice/windows/msi_templates/RegLocat.idt @@ -1,11 +1,5 @@ Signature_ Root Key Name Type s72 i2 s255 S255 I2 RegLocator Signature_ -ureuninstalluser 1 Software\OpenOffice.org\LAYERNAMETEMPLATE\[DEFINEDPRODUCT]\[BRANDPACKAGEVERSION] UREINSTALLLOCATION 2 -ureuninstallmachine 2 Software\OpenOffice.org\LAYERNAMETEMPLATE\[DEFINEDPRODUCT]\[BRANDPACKAGEVERSION] UREINSTALLLOCATION 2 -basisuninstalluser 1 Software\OpenOffice.org\LAYERNAMETEMPLATE\[DEFINEDPRODUCT]\[BRANDPACKAGEVERSION] BASISINSTALLLOCATION 2 -basisuninstallmachine 2 Software\OpenOffice.org\LAYERNAMETEMPLATE\[DEFINEDPRODUCT]\[BRANDPACKAGEVERSION] BASISINSTALLLOCATION 2 -officeuninstalluser 1 Software\OpenOffice.org\LAYERNAMETEMPLATE\[DEFINEDPRODUCT]\[BRANDPACKAGEVERSION] OFFICEINSTALLLOCATION 2 -officeuninstallmachine 2 Software\OpenOffice.org\LAYERNAMETEMPLATE\[DEFINEDPRODUCT]\[BRANDPACKAGEVERSION] OFFICEINSTALLLOCATION 2 installuser 1 Software\OpenOffice.org\LAYERNAMETEMPLATE\[DEFINEDPRODUCT]\[BRANDPACKAGEVERSION] INSTALLLOCATION 2 installmachine 2 Software\OpenOffice.org\LAYERNAMETEMPLATE\[DEFINEDPRODUCT]\[BRANDPACKAGEVERSION] INSTALLLOCATION 2 diff --git a/instsetoo_native/inc_ure/windows/msi_templates/AdminExe.idt b/instsetoo_native/inc_ure/windows/msi_templates/AdminExe.idt index b9a99b9fb502..ede3f7cb4f42 100644 --- a/instsetoo_native/inc_ure/windows/msi_templates/AdminExe.idt +++ b/instsetoo_native/inc_ure/windows/msi_templates/AdminExe.idt @@ -11,4 +11,3 @@ InstallFinalize 400 InstallInitialize 250 InstallValidate 200 ScheduleReboot ISSCHEDULEREBOOT 375 -SetUreInstallLocation 430 diff --git a/instsetoo_native/inc_ure/windows/msi_templates/CustomAc.idt b/instsetoo_native/inc_ure/windows/msi_templates/CustomAc.idt index c6607481274c..ed030dc3e17c 100644 --- a/instsetoo_native/inc_ure/windows/msi_templates/CustomAc.idt +++ b/instsetoo_native/inc_ure/windows/msi_templates/CustomAc.idt @@ -6,6 +6,5 @@ setAllUsersProfile2K 51 ALLUSERSPROFILE [%ALLUSERSPROFILE] SetAllUsersProfileNT 51 ALLUSERSPROFILE [%SystemRoot]\Profiles\All Users setUserProfileNT 51 USERPROFILE [%USERPROFILE] SetARPInstallLocation 51 ARPINSTALLLOCATION [INSTALLLOCATION] -SetUreInstallLocation 51 UREINSTALLLOCATION [UREDIRECTORYGID] SameProductFound 19 The same version of this product is already installed. NewProductFound 19 A newer version of [ProductName] was found. To install an older version, the newer version needs to be removed first. diff --git a/instsetoo_native/inc_ure/windows/msi_templates/InstallE.idt b/instsetoo_native/inc_ure/windows/msi_templates/InstallE.idt index 0fbfa4bcf8b6..c1de8e4a19fe 100644 --- a/instsetoo_native/inc_ure/windows/msi_templates/InstallE.idt +++ b/instsetoo_native/inc_ure/windows/msi_templates/InstallE.idt @@ -56,7 +56,6 @@ ScheduleReboot ISSCHEDULEREBOOT 3125 SelfRegModules 2850 SelfUnregModules 1100 SetARPInstallLocation Not Installed 990 -SetUreInstallLocation Not Installed 577 SetODBCFolders 550 StartServices VersionNT 2800 StopServices VersionNT 950 diff --git a/instsetoo_native/util/makefile.mk b/instsetoo_native/util/makefile.mk index b2f014f6ad58..c18f2dad2098 100644 --- a/instsetoo_native/util/makefile.mk +++ b/instsetoo_native/util/makefile.mk @@ -105,7 +105,7 @@ PKGFORMAT+=$(MAKETARGETS:e:s/.//) # Independent of PKGFORMAT, always build a default-language openoffice product # also in archive format, so that tests that require an OOo installation (like # smoketestoo_native) have one available: -openoffice_$(defaultlangiso) : $$@.archive +# openoffice_$(defaultlangiso) : $$@.archive .IF "$(VERBOSE)"=="TRUE" VERBOSESWITCH=-verbose @@ -209,7 +209,7 @@ $(MAKETARGETS){$(PKGFORMAT:^".")} : $(ADDDEPS) .ENDIF # "$(MAKETARGETS:e)"=="" && "$(MAKETARGETS:s/_//)"!="$(MAKETARGETS)" .ENDIF # "$(MAKETARGETS)"!="" openoffice_%{$(PKGFORMAT:^".") .archive} : - $(PERL) -w $(SOLARENV)$/bin$/make_installer.pl -f $(PRJ)$/util$/openoffice.lst -l $(subst,$(@:s/_/ /:1)_, $(@:b)) -p OpenOffice -u $(OUT) -buildid $(BUILD) -msitemplate $(MSIOFFICETEMPLATEDIR) -msilanguage $(COMMONMISC)$/win_ulffiles -format $(@:e:s/.//) $(VERBOSESWITCH) + $(PERL) -w $(SOLARENV)$/bin$/make_installer.pl -f $(PRJ)$/util$/openoffice.lst -l $(subst,$(@:s/_/ /:1)_, $(@:b)) -p OpenOffice -u $(OUT) -buildid $(BUILD) -msitemplate $(MSIOFFICETEMPLATEDIR) -msilanguage $(COMMONMISC)$/win_ulffiles -format $(@:e:s/.//) $(VERBOSESWITCH) -log $(PERL) -w $(SOLARENV)$/bin$/gen_update_info.pl --buildid $(BUILD) --arch "$(RTL_ARCH)" --os "$(RTL_OS)" --lstfile $(PRJ)$/util$/openoffice.lst --product OpenOffice --languages $(subst,$(@:s/_/ /:1)_, $(@:b)) $(PRJ)$/util$/update.xml > $(MISC)/$(@:b)_$(RTL_OS)_$(RTL_ARCH)$(@:e).update.xml $(foreach,i,$(alllangiso) openofficewithjre_$i) : $$@{$(PKGFORMAT:^".")} diff --git a/instsetoo_native/util/openoffice.lst b/instsetoo_native/util/openoffice.lst index 5ce50111d519..4715beabcc27 100644 --- a/instsetoo_native/util/openoffice.lst +++ b/instsetoo_native/util/openoffice.lst @@ -82,7 +82,6 @@ OpenOffice OPENSOURCE 1 SETSTATICPATH 1 OOODOWNLOADNAME 1 - PROGRAMFILESROOT 1 XPDINSTALLER 0 BETAUPGRADECODE STUBUPGRADECODE {0E7B27B8-D658-4BF9-98D6-EC361582EB4A} @@ -148,7 +147,6 @@ OpenOffice_wJRE OPENSOURCE 1 SETSTATICPATH 1 OOODOWNLOADNAME 1 - PROGRAMFILESROOT 1 XPDINSTALLER 1 BETAUPGRADECODE STUBUPGRADECODE {0E7B27B8-D658-4BF9-98D6-EC361582EB4A} @@ -220,7 +218,6 @@ OpenOffice_Dev OPENSOURCE 1 SETSTATICPATH 1 OOODOWNLOADNAME 1 - PROGRAMFILESROOT 1 XPDINSTALLER 1 BETAUPGRADECODE STUBUPGRADECODE {0E7B27B8-D658-4BF9-98D6-EC361582EB4A} @@ -270,7 +267,6 @@ URE SERVICESPROJEKT 1 SETSTATICPATH 1 NOVERSIONINDIRNAME 1 - PROGRAMFILESROOT 1 PCPFILENAME ure.pcp POOLPRODUCT 0 GLOBALFILEGID gid_File_Dl_Cppu @@ -429,7 +425,6 @@ BrOffice SPELLCHECKERFILE spellchecker_selection.txt OPENSOURCE 1 OOODOWNLOADNAME 1 - PROGRAMFILESROOT 1 XPDINSTALLER 0 BETAUPGRADECODE STUBUPGRADECODE {0E7B27B8-D658-4BF9-98D6-EC361582EB4A} @@ -500,7 +495,6 @@ BrOffice_wJRE SPELLCHECKERFILE spellchecker_selection.txt OPENSOURCE 1 OOODOWNLOADNAME 1 - PROGRAMFILESROOT 1 XPDINSTALLER 1 BETAUPGRADECODE STUBUPGRADECODE {0E7B27B8-D658-4BF9-98D6-EC361582EB4A} @@ -572,7 +566,6 @@ BrOffice_Dev SPELLCHECKERFILE spellchecker_selection.txt OPENSOURCE 1 OOODOWNLOADNAME 1 - PROGRAMFILESROOT 1 XPDINSTALLER 1 BETAUPGRADECODE STUBUPGRADECODE {0E7B27B8-D658-4BF9-98D6-EC361582EB4A} diff --git a/scp2/source/javafilter/registryitem_javafilter.scp b/scp2/source/javafilter/registryitem_javafilter.scp index 593c6177edad..1340d637e009 100644 --- a/scp2/source/javafilter/registryitem_javafilter.scp +++ b/scp2/source/javafilter/registryitem_javafilter.scp @@ -46,7 +46,7 @@ RegistryItem gid_Regitem_Clsid__43887c67_4d5d_4127_Baac_87a288494c7c__Inprocserv ParentID = PREDEFINED_HKEY_CLASSES_ROOT; Subkey = "CLSID\{43887C67-4D5D-4127-BAAC-87A288494C7C}\InProcServer32"; ModuleID = gid_Module_Optional_Javafilter_Pocketpc_Pocket_Excel; - Value = "[BASISINSTALLLOCATION]program\xmergesync.dll"; + Value = "[INSTALLLOCATION]Basis\program\xmergesync.dll"; End RegistryItem gid_Regitem_Clsid__43887c67_4d5d_4127_Baac_87a288494c7c__Inprocserver32_Threadingmodel @@ -106,7 +106,7 @@ RegistryItem gid_Regitem_Clsid__Bdd611c3_7bab_460f_8711_5b9ac9ef6020__Inprocserv ParentID = PREDEFINED_HKEY_CLASSES_ROOT; Subkey = "CLSID\{BDD611C3-7BAB-460F-8711-5B9AC9EF6020}\InProcServer32"; ModuleID = gid_Module_Optional_Javafilter_Pocketpc_Pocket_Word; - Value = "[BASISINSTALLLOCATION]program\xmergesync.dll"; + Value = "[INSTALLLOCATION]Basis\program\xmergesync.dll"; End RegistryItem gid_Regitem_Clsid__Bdd611c3_7bab_460f_8711_5b9ac9ef6020__Inprocserver32_Threadingmodel @@ -166,7 +166,7 @@ RegistryItem gid_Regitem_Clsid__C6ab3e74_9f4f_4370_8120_A8a6fabb7a7c__Inprocserv ParentID = PREDEFINED_HKEY_CLASSES_ROOT; Subkey = "CLSID\{C6AB3E74-9F4F-4370-8120-A8A6FABB7A7C}\InProcServer32"; ModuleID = gid_Module_Optional_Javafilter_Pocketpc_Pocket_Excel; - Value = "[BASISINSTALLLOCATION]program\xmergesync.dll"; + Value = "[INSTALLLOCATION]Basis\program\xmergesync.dll"; End RegistryItem gid_Regitem_Clsid__C6ab3e74_9f4f_4370_8120_A8a6fabb7a7c__Inprocserver32_Threadingmodel @@ -226,7 +226,7 @@ RegistryItem gid_Regitem_Clsid__Cb43f086_838d_4fa4_B5f6_3406b9a57439__Inprocserv ParentID = PREDEFINED_HKEY_CLASSES_ROOT; Subkey = "CLSID\{CB43F086-838D-4FA4-B5F6-3406B9A57439}\InProcServer32"; ModuleID = gid_Module_Optional_Javafilter_Pocketpc_Pocket_Word; - Value = "[BASISINSTALLLOCATION]program\xmergesync.dll"; + Value = "[INSTALLLOCATION]Basis\program\xmergesync.dll"; End RegistryItem gid_Regitem_Clsid__Cb43f086_838d_4fa4_B5f6_3406b9a57439__Inprocserver32_Threadingmodel diff --git a/scp2/source/ooo/common_brand.scp b/scp2/source/ooo/common_brand.scp index b2023aabecd7..6558dd1a55ff 100644 --- a/scp2/source/ooo/common_brand.scp +++ b/scp2/source/ooo/common_brand.scp @@ -1190,7 +1190,7 @@ ProfileItem gid_Brand_Profileitem_Setup_Ureinstall Section = "Bootstrap"; Order = 4; Key = "UREINSTALLLOCATION"; - Value = "[UREINSTALLLOCATION]"; + Value = "[INSTALLLOCATION]URE\\"; Inifiletablekey = "UreInstallLocation"; Inifiletableaction = "1"; Styles = (INIFILETABLE); @@ -1204,7 +1204,7 @@ ProfileItem gid_Brand_Profileitem_Setup_Basisinstall Section = "Bootstrap"; Order = 4; Key = "BASISINSTALLLOCATION"; - Value = "[BASISINSTALLLOCATION]"; + Value = "[INSTALLLOCATION]Basis\\"; Inifiletablekey = "BasisInstallLocation"; Inifiletableaction = "1"; Styles = (INIFILETABLE); @@ -1218,7 +1218,7 @@ ProfileItem gid_Brand_Profileitem_Setup_Officeinstall Section = "Bootstrap"; Order = 4; Key = "OFFICEINSTALLLOCATION"; - Value = "[OFFICEINSTALLLOCATION]"; + Value = "[INSTALLLOCATION]"; Inifiletablekey = "OfficeInstallLocation"; Inifiletableaction = "1"; Styles = (INIFILETABLE); diff --git a/scp2/source/ooo/ooo_brand.scp b/scp2/source/ooo/ooo_brand.scp index 7021f02efc4a..3cd20ef97142 100644 --- a/scp2/source/ooo/ooo_brand.scp +++ b/scp2/source/ooo/ooo_brand.scp @@ -35,7 +35,7 @@ Directory gid_Dir_Brand_Root #else HostName = "${UNIXPRODUCTNAME}${BRANDPACKAGEVERSION}"; #endif - Styles = (OFFICEDIRECTORY); + Styles = (OFFICEDIRECTORY,ISINSTALLLOCATION); End #endif diff --git a/scp2/source/ooo/registryitem_ooo.scp b/scp2/source/ooo/registryitem_ooo.scp index 47a053f225cd..59ef1673d727 100644 --- a/scp2/source/ooo/registryitem_ooo.scp +++ b/scp2/source/ooo/registryitem_ooo.scp @@ -289,7 +289,7 @@ RegistryItem gid_Regitem_Software_Manufacturer_Productname_Productversion_Produc Subkey = "Software\%MANUFACTURER\%PRODUCTNAME%PRODUCTADDON\%PRODUCTVERSION\%PRODUCTCODE"; ModuleID = gid_Module_Root; Name = "OFFICEINSTALLLOCATION"; - Value = "[OFFICEINSTALLLOCATION]"; + Value = "[INSTALLLOCATION]"; Styles = (LANGUAGEPACK,ALWAYS_REQUIRED,UPGRADEKEY); End @@ -307,7 +307,7 @@ RegistryItem gid_Regitem_Software_Manufacturer_Productname_Productversion_Upgrad Subkey = "Software\%MANUFACTURER\%PRODUCTNAME%PRODUCTADDON\%PRODUCTVERSION\%UPGRADECODE"; ModuleID = gid_Module_Root; Name = "OFFICEINSTALLLOCATION"; - Value = "[OFFICEINSTALLLOCATION]"; + Value = "[INSTALLLOCATION]"; Styles = (LANGUAGEPACK,ALWAYS_REQUIRED); End @@ -325,7 +325,7 @@ RegistryItem gid_Regitem_Software_OpenOfficeorg_Ooobaseversion_Officeinstall Subkey = "Software\OpenOffice.org\${REGISTRYLAYERNAME}\%PRODUCTNAME\%BRANDPACKAGEVERSION"; ModuleID = gid_Module_Root; Name = "OFFICEINSTALLLOCATION"; - Value = "[OFFICEINSTALLLOCATION]"; + Value = "[INSTALLLOCATION]"; Styles = (ALWAYS_REQUIRED); End @@ -334,7 +334,7 @@ RegistryItem gid_Regitem_Software_Manufacturer_Productname_Productversion_Produc Subkey = "Software\%MANUFACTURER\%PRODUCTNAME%PRODUCTADDON\%PRODUCTVERSION\%PRODUCTCODE"; ModuleID = gid_Module_Root; Name = "BASISINSTALLLOCATION"; - Value = "[BASISINSTALLLOCATION]"; + Value = "[INSTALLLOCATION]Basis\\"; Styles = (LANGUAGEPACK,ALWAYS_REQUIRED); End @@ -343,7 +343,7 @@ RegistryItem gid_Regitem_Software_Manufacturer_Productname_Productversion_Upgrad Subkey = "Software\%MANUFACTURER\%PRODUCTNAME%PRODUCTADDON\%PRODUCTVERSION\%UPGRADECODE"; ModuleID = gid_Module_Root; Name = "BASISINSTALLLOCATION"; - Value = "[BASISINSTALLLOCATION]"; + Value = "[INSTALLLOCATION]Basis\\"; Styles = (LANGUAGEPACK,ALWAYS_REQUIRED); End @@ -352,7 +352,7 @@ RegistryItem gid_Regitem_Software_OpenOfficeorg_Ooobaseversion_Basisinstall Subkey = "Software\OpenOffice.org\${REGISTRYLAYERNAME}\Basis\%OOOBASEVERSION"; ModuleID = gid_Module_Root; Name = "BASISINSTALLLOCATION"; - Value = "[BASISINSTALLLOCATION]"; + Value = "[INSTALLLOCATION]Basis\\"; Styles = (ALWAYS_REQUIRED,LAYER_REGISTRY,USE_OOOBASEVERSION); End @@ -361,7 +361,7 @@ RegistryItem gid_Regitem_Software_OpenOfficeorg_Ooobaseversion_Layer_Basisinstal Subkey = "Software\OpenOffice.org\${REGISTRYLAYERNAME}\%PRODUCTNAME\%BRANDPACKAGEVERSION"; ModuleID = gid_Module_Root; Name = "BASISINSTALLLOCATION"; - Value = "[BASISINSTALLLOCATION]"; + Value = "[INSTALLLOCATION]Basis\\"; Styles = (ALWAYS_REQUIRED); End @@ -370,7 +370,7 @@ RegistryItem gid_Regitem_Software_Manufacturer_Productname_Productversion_Produc Subkey = "Software\%MANUFACTURER\%PRODUCTNAME%PRODUCTADDON\%PRODUCTVERSION\%PRODUCTCODE"; ModuleID = gid_Module_Root; Name = "UREINSTALLLOCATION"; - Value = "[UREINSTALLLOCATION]"; + Value = "[INSTALLLOCATION]URE\\"; Styles = (LANGUAGEPACK,ALWAYS_REQUIRED); End @@ -379,7 +379,7 @@ RegistryItem gid_Regitem_Software_Manufacturer_Productname_Productversion_Upgrad Subkey = "Software\%MANUFACTURER\%PRODUCTNAME%PRODUCTADDON\%PRODUCTVERSION\%UPGRADECODE"; ModuleID = gid_Module_Root; Name = "UREINSTALLLOCATION"; - Value = "[UREINSTALLLOCATION]"; + Value = "[INSTALLLOCATION]URE\\"; Styles = (LANGUAGEPACK,ALWAYS_REQUIRED); End @@ -388,7 +388,7 @@ RegistryItem gid_Regitem_Software_OpenOfficeorg_Ooobaseversion_Ureinstall Subkey = "Software\OpenOffice.org\${REGISTRYLAYERNAME}\URE\%URELAYERVERSION"; ModuleID = gid_Module_Root; Name = "UREINSTALLLOCATION"; - Value = "[UREINSTALLLOCATION]"; + Value = "[INSTALLLOCATION]URE\\"; Styles = (ALWAYS_REQUIRED,LAYER_REGISTRY,USE_URELAYERVERSION); End @@ -397,7 +397,7 @@ RegistryItem gid_Regitem_Software_OpenOfficeorg_Ooobaseversion_Layer_Ureinstall Subkey = "Software\OpenOffice.org\${REGISTRYLAYERNAME}\%PRODUCTNAME\%BRANDPACKAGEVERSION"; ModuleID = gid_Module_Root; Name = "UREINSTALLLOCATION"; - Value = "[UREINSTALLLOCATION]"; + Value = "[INSTALLLOCATION]URE\\"; Styles = (ALWAYS_REQUIRED); End diff --git a/scp2/source/ooo/ure.scp b/scp2/source/ooo/ure.scp index ca7a7222b074..ea0492235e91 100755 --- a/scp2/source/ooo/ure.scp +++ b/scp2/source/ooo/ure.scp @@ -1263,5 +1263,5 @@ RegistryItem gid_Regitem_Path ParentID = PREDEFINED_HKEY_CLASSES_ROOT; Subkey = "Software\OpenOffice.org\%PRODUCTNAME"; Name = "Path"; - Value = "[UREINSTALLLOCATION]"; + Value = "[INSTALLLOCATION]"; End diff --git a/scp2/source/ooo/ure_standalone.scp b/scp2/source/ooo/ure_standalone.scp index caa78335e509..5fad8fadcbba 100755 --- a/scp2/source/ooo/ure_standalone.scp +++ b/scp2/source/ooo/ure_standalone.scp @@ -46,6 +46,7 @@ Directory gid_Dir_Ooo_Openofficeorg #else HostName = "openoffice.org"; #endif + Styles = (ISINSTALLLOCATION); End Directory gid_Dir_Common_Ure @@ -105,21 +106,4 @@ RegistryItem gid_Regitem_Ure_Software_Manufacturer_Productname_Productversion_Up Styles = (ALWAYS_REQUIRED); End -RegistryItem gid_Regitem_Ure_Software_Manufacturer_Productname_Productversion_Productcode_Ureinstall - ParentID = PREDEFINED_HKEY_LOCAL_MACHINE; - Subkey = "Software\%MANUFACTURER\%PRODUCTNAME%PRODUCTADDON\%PRODUCTVERSION\%PRODUCTCODE"; - ModuleID = gid_Module_Root; - Name = "UREINSTALLLOCATION"; - Value = "[UREINSTALLLOCATION]"; - Styles = (ALWAYS_REQUIRED); -End - -RegistryItem gid_Regitem_Ure_Software_Manufacturer_Productname_Productversion_Upgradecode_Ureinstall - ParentID = PREDEFINED_HKEY_LOCAL_MACHINE; - Subkey = "Software\%MANUFACTURER\%PRODUCTNAME%PRODUCTADDON\%PRODUCTVERSION\%UPGRADECODE"; - ModuleID = gid_Module_Root; - Name = "UREINSTALLLOCATION"; - Value = "[UREINSTALLLOCATION]"; - Styles = (ALWAYS_REQUIRED); -End diff --git a/scp2/source/sdkoo/sdkoo.scp b/scp2/source/sdkoo/sdkoo.scp index 9794fa06719e..d47e14d0a63a 100644 --- a/scp2/source/sdkoo/sdkoo.scp +++ b/scp2/source/sdkoo/sdkoo.scp @@ -46,6 +46,14 @@ End #ifndef MACOSX +#ifdef WNT +Directory gid_Dir_Sdkoo_Root + ParentID = PREDEFINED_PROGDIR; + HostName = "${PRODUCTNAME}_${PRODUCTVERSION}_${POSTVERSIONEXTENSION}"; + Styles = (OFFICEDIRECTORY, ISINSTALLLOCATION); +End +#endif + #ifndef WNT Directory gid_Dir_Ooo_Openofficeorg_Sdk ParentID = PREDEFINED_PROGDIR; @@ -77,7 +85,7 @@ Directory gid_Dir_Basis_Sdk DosName = "OpenOffice.org${OOOBASEVERSION}_SDK"; #else #if defined WNT - ParentID = PREDEFINED_PROGDIR; + ParentID = gid_Dir_Sdkoo_Root; #else ParentID = gid_Dir_Ooo_Basis_Sdk; #endif diff --git a/scp2/source/winexplorerext/registryitem_winexplorerext.scp b/scp2/source/winexplorerext/registryitem_winexplorerext.scp old mode 100755 new mode 100644 index 7c932bac1f28..62911d24fd0e --- a/scp2/source/winexplorerext/registryitem_winexplorerext.scp +++ b/scp2/source/winexplorerext/registryitem_winexplorerext.scp @@ -35,8 +35,8 @@ RegistryItem gid_Regitem_Clsid_087B3AE3_E237_4467_B8DB_5A38AB959AC9_InProcServer ModuleID = gid_Module_Optional_Winexplorerext; Styles = (X64); Subkey = "CLSID\{087B3AE3-E237-4467-B8DB-5A38AB959AC9}\InprocServer32"; - Value = "[BASISINSTALLLOCATION]program\shlxthdl\shlxthdl.dll"; - Val64 = "[BASISINSTALLLOCATION]program\shlxthdl\shlxthdl_x64.dll"; + Value = "[INSTALLLOCATION]Basis\program\shlxthdl\shlxthdl.dll"; + Val64 = "[INSTALLLOCATION]Basis\program\shlxthdl\shlxthdl_x64.dll"; End RegistryItem gid_Regitem_Clsid_087B3AE3_E237_4467_B8DB_5A38AB959AC9_InProcServer32_ThreadingModel @@ -58,8 +58,8 @@ RegistryItem gid_Regitem_Clsid_3B092F0C_7696_40E3_A80F_68D74DA84210_InProcServer ModuleID = gid_Module_Optional_Winexplorerext; Styles = (X64); Subkey = "CLSID\{3B092F0C-7696-40E3-A80F-68D74DA84210}\InprocServer32"; - Value = "[BASISINSTALLLOCATION]program\shlxthdl\shlxthdl.dll"; - Val64 = "[BASISINSTALLLOCATION]program\shlxthdl\shlxthdl_x64.dll"; + Value = "[INSTALLLOCATION]Basis\program\shlxthdl\shlxthdl.dll"; + Val64 = "[INSTALLLOCATION]Basis\program\shlxthdl\shlxthdl_x64.dll"; End RegistryItem gid_Regitem_Clsid_3B092F0C_7696_40E3_A80F_68D74DA84210_InProcServer32_ThreadingModel @@ -90,8 +90,8 @@ RegistryItem gid_Regitem_Clsid_C52AF81D_F7A0_4AAB_8E87_F80A60CCD396_InProcServer ModuleID = gid_Module_Optional_Winexplorerext; Styles = (X64); Subkey = "CLSID\{C52AF81D-F7A0-4AAB-8E87-F80A60CCD396}\InprocServer32"; - Value = "[BASISINSTALLLOCATION]program\shlxthdl\shlxthdl.dll"; - Val64 = "[BASISINSTALLLOCATION]program\shlxthdl\shlxthdl_x64.dll"; + Value = "[INSTALLLOCATION]Basis\program\shlxthdl\shlxthdl.dll"; + Val64 = "[INSTALLLOCATION]Basis\program\shlxthdl\shlxthdl_x64.dll"; End RegistryItem gid_Regitem_Clsid_C52AF81D_F7A0_4AAB_8E87_F80A60CCD396_InProcServer32_ThreadingModel @@ -124,8 +124,8 @@ RegistryItem gid_Regitem_Clsid_7BC0E710_5703_45BE_A29D_5D46D8B39262_InProcServer ModuleID = gid_Module_Root; Subkey = "CLSID\{7BC0E710-5703-45BE-A29D-5D46D8B39262}\InprocServer32"; Styles = (X64); // Values: X64 / X64_ONLY - Value = "[BASISINSTALLLOCATION]program\shlxthdl\ooofilt.dll"; - Val64 = "[BASISINSTALLLOCATION]program\shlxthdl\ooofilt_x64.dll"; + Value = "[INSTALLLOCATION]Basis\program\shlxthdl\ooofilt.dll"; + Val64 = "[INSTALLLOCATION]Basis\program\shlxthdl\ooofilt_x64.dll"; End RegistryItem gid_Regitem_Clsid_7BC0E710_5703_45BE_A29D_5D46D8B39262_InProcServer32_ThreadingModel @@ -167,8 +167,8 @@ RegistryItem gid_Regitem_Clsid_63542C48_9552_494A_84F7_73AA6A7C99C1_InProcServer ModuleID = gid_Module_Optional_Winexplorerext; Styles = (X64); Subkey = "CLSID\{63542C48-9552-494A-84F7-73AA6A7C99C1}\InprocServer32"; - Value = "[BASISINSTALLLOCATION]program\shlxthdl\shlxthdl.dll"; - Val64 = "[BASISINSTALLLOCATION]program\shlxthdl\shlxthdl_x64.dll"; + Value = "[INSTALLLOCATION]Basis\program\shlxthdl\shlxthdl.dll"; + Val64 = "[INSTALLLOCATION]Basis\program\shlxthdl\shlxthdl_x64.dll"; End RegistryItem gid_Regitem_Clsid_63542C48_9552_494A_84F7_73AA6A7C99C1_InProcServer32_ThreadingModel @@ -201,8 +201,8 @@ RegistryItem gid_Regitem_Clsid_AE424E85_F6DF_4910_A6A9_438797986431_InProcServer ComponentCondition = "VersionNT >= 600"; Styles = (X64); Subkey = "CLSID\{AE424E85-F6DF-4910-A6A9-438797986431}\InprocServer32"; - Value = "[BASISINSTALLLOCATION]program\shlxthdl\propertyhdl.dll"; - Val64 = "[BASISINSTALLLOCATION]program\shlxthdl\propertyhdl_x64.dll"; + Value = "[INSTALLLOCATION]Basis\program\shlxthdl\propertyhdl.dll"; + Val64 = "[INSTALLLOCATION]Basis\program\shlxthdl\propertyhdl_x64.dll"; End RegistryItem gid_Regitem_Clsid_AE424E85_F6DF_4910_A6A9_438797986431_InProcServer32_ThreadingModel diff --git a/solenv/bin/make_installer.pl b/solenv/bin/make_installer.pl index 197f985bbf83..e844be9d5736 100644 --- a/solenv/bin/make_installer.pl +++ b/solenv/bin/make_installer.pl @@ -1982,7 +1982,7 @@ for ( my $n = 0; $n <= $#installer::globals::languageproducts; $n++ ) if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productfiles17c.log", $filesinproductlanguageresolvedarrayref); } if ( $installer::globals::updatedatabase ) { installer::windows::file::check_file_sequences($allupdatefileorder, $allupdatecomponentorder); } - installer::windows::directory::create_directory_table($directoriesforepmarrayref, $newidtdir, $allvariableshashref, $shortdirname); + installer::windows::directory::create_directory_table($directoriesforepmarrayref, $newidtdir, $allvariableshashref, $shortdirname, $loggingdir); if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productfiles18.log", $filesinproductlanguageresolvedarrayref); } if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "directoriesforidt1.log", $directoriesforepmarrayref); } @@ -2143,10 +2143,6 @@ for ( my $n = 0; $n <= $#installer::globals::languageproducts; $n++ ) push(@installer::globals::logfileinfo, $infoline); } - # include office directory in CustomAction table - - installer::windows::idtglobal::add_officedir_to_database($languageidtdir, $allvariableshashref); - # include a component into environment table if required installer::windows::component::set_component_in_environment_table($languageidtdir, $filesinproductlanguageresolvedarrayref); diff --git a/solenv/bin/modules/installer/globals.pm b/solenv/bin/modules/installer/globals.pm index 564df06e79e2..1b71bd33ecd2 100644 --- a/solenv/bin/modules/installer/globals.pm +++ b/solenv/bin/modules/installer/globals.pm @@ -378,6 +378,8 @@ BEGIN %spellcheckerfilehash = (); $registryrootcomponent = ""; + $installlocationdirectory = ""; + $installlocationdirectoryset = 0; $officeinstalldirectory = ""; $officeinstalldirectoryset = 0; $basisinstalldirectory = ""; @@ -396,9 +398,9 @@ BEGIN $sundirgid = ""; %sign_extensions = ("dll" => "1", "exe" => "1", "cab" => "1"); - %treestyles = ("UREDIRECTORY" => "INSTALLURE", "BASISDIRECTORY" => "INSTALLBASIS", "OFFICEDIRECTORY" => "INSTALLOFFICE"); - %installlocations = ("INSTALLLOCATION" => "1", "BASISINSTALLLOCATION" => "1", "OFFICEINSTALLLOCATION" => "1", "UREINSTALLLOCATION" => "1"); - %treelayername = ("UREDIRECTORY" => "URE", "BASISDIRECTORY" => "BASIS", "OFFICEDIRECTORY" => "BRAND"); + %treestyles = (); + %installlocations = ("INSTALLLOCATION" => "1"); + %treelayername = (); %hostnametreestyles = (); %treeconditions = (); %usedtreeconditions = (); diff --git a/solenv/bin/modules/installer/scriptitems.pm b/solenv/bin/modules/installer/scriptitems.pm index ecda4f9a4e0b..0b60f5e6240b 100644 --- a/solenv/bin/modules/installer/scriptitems.pm +++ b/solenv/bin/modules/installer/scriptitems.pm @@ -541,18 +541,6 @@ sub set_global_directory_hostnames $installer::globals::officedirgid = $onedir->{'gid'}; $allvariables->{'OFFICEDIRECTORYHOSTNAME'} = $installer::globals::officedirhostname; } - if ( $styles =~ /\bBASISDIRECTORY\b/ ) - { - $installer::globals::basisdirhostname = $onedir->{'HostName'}; - $installer::globals::basisdirgid = $onedir->{'gid'}; - $allvariables->{'BASISDIRECTORYHOSTNAME'} = $installer::globals::basisdirhostname; - } - if ( $styles =~ /\bUREDIRECTORY\b/ ) - { - $installer::globals::uredirhostname = $onedir->{'HostName'}; - $installer::globals::uredirgid = $onedir->{'gid'}; - $allvariables->{'UREDIRECTORYHOSTNAME'} = $installer::globals::uredirhostname; - } if ( $styles =~ /\bSUNDIRECTORY\b/ ) { $installer::globals::sundirhostname = $onedir->{'HostName'}; diff --git a/solenv/bin/modules/installer/windows/component.pm b/solenv/bin/modules/installer/windows/component.pm index 125c8607f249..38989858a4b6 100644 --- a/solenv/bin/modules/installer/windows/component.pm +++ b/solenv/bin/modules/installer/windows/component.pm @@ -162,6 +162,11 @@ sub get_file_component_directory } $uniquedir = $onedir->{'uniquename'}; + + if ( $uniquedir eq $installer::globals::officeinstalldirectory ) + { + $uniquedir = "INSTALLLOCATION"; + } } $onefile->{'uniquedirname'} = $uniquedir; # saving it in the file collection @@ -176,16 +181,7 @@ sub get_file_component_directory sub get_registry_component_directory { - my $componentdir = ""; - - if ( $installer::globals::officeinstalldirectoryset ) - { - $componentdir = $installer::globals::officeinstalldirectory; - } - else - { - $componentdir = "INSTALLLOCATION"; - } + my $componentdir = "INSTALLLOCATION"; return $componentdir; } diff --git a/solenv/bin/modules/installer/windows/directory.pm b/solenv/bin/modules/installer/windows/directory.pm index 2a9463f508a1..6dde28120a44 100644 --- a/solenv/bin/modules/installer/windows/directory.pm +++ b/solenv/bin/modules/installer/windows/directory.pm @@ -110,7 +110,7 @@ sub create_unique_directorynames } else { - $uniqueparentname = "INSTALLLOCATION"; + $uniqueparentname = $installer::globals::programfilesfolder; } if ( $styles =~ /\bPROGRAMFILESFOLDER\b/ ) { $uniqueparentname = $installer::globals::programfilesfolder; } @@ -130,29 +130,50 @@ sub create_unique_directorynames $onedir->{'uniquename'} = $uniquename; $onedir->{'uniqueparentname'} = $uniqueparentname; - # setting the office installation directory - if ( $styles =~ /\bOFFICEDIRECTORY\b/ ) + # setting the installlocation directory + if ( $styles =~ /\bISINSTALLLOCATION\b/ ) { - if ( $installer::globals::officeinstalldirectoryset ) { installer::exiter::exit_program("ERROR: Directory with flag OFFICEDIRECTORY alread set: \"$installer::globals::officeinstalldirectory\".", "create_unique_directorynames"); } - $installer::globals::officeinstalldirectory = $uniquename; - $installer::globals::officeinstalldirectoryset = 1; - if ( $installer::globals::officeinstalldirectory =~ /sun_/i ) { $installer::globals::sundirexists = 1; } + if ( $installer::globals::installlocationdirectoryset ) { installer::exiter::exit_program("ERROR: Directory with flag ISINSTALLLOCATION alread set: \"$installer::globals::installlocationdirectory\".", "create_unique_directorynames"); } + $installer::globals::installlocationdirectory = $uniquename; + $installer::globals::installlocationdirectoryset = 1; + if ( $installer::globals::installlocationdirectory =~ /oracle_/i ) { $installer::globals::sundirexists = 1; } } + } +} + +##################################################### +# The directory with the style ISINSTALLLOCATION +# will be replaced by INSTALLLOCATION +##################################################### + +sub set_installlocation_directory +{ + my ( $directoryref ) = @_; + + if ( ! $installer::globals::installlocationdirectoryset ) { installer::exiter::exit_program("ERROR: Directory with flag ISINSTALLLOCATION not set!", "set_installlocation_directory"); } - # setting the bais installation directory - if ( $styles =~ /\bBASISDIRECTORY\b/ ) + for ( my $i = 0; $i <= $#{$directoryref}; $i++ ) + { + my $onedir = ${$directoryref}[$i]; + + if ( $onedir->{'uniquename'} eq $installer::globals::installlocationdirectory ) { - if ( $installer::globals::basisinstalldirectoryset ) { installer::exiter::exit_program("ERROR: Directory with flag BASISDIRECTORY alread set: \"$installer::globals::basisinstalldirectory\".", "create_unique_directorynames"); } - $installer::globals::basisinstalldirectory = $uniquename; - $installer::globals::basisinstalldirectoryset = 1; + $onedir->{'uniquename'} = "INSTALLLOCATION"; + + if (($installer::globals::addchildprojects) || + ($installer::globals::patch) || + ($installer::globals::languagepack) || + ($allvariableshashref->{'CHANGETARGETDIR'})) + { + + my $sourcediraddon = "\:\."; + $onedir->{'defaultdir'} = $onedir->{'defaultdir'} . $sourcediraddon; + } } - # setting the ure installation directory - if ( $styles =~ /\bUREDIRECTORY\b/ ) + if ( $onedir->{'uniqueparentname'} eq $installer::globals::installlocationdirectory ) { - if ( $installer::globals::ureinstalldirectoryset ) { installer::exiter::exit_program("ERROR: Directory with flag UREDIRECTORY alread set: \"$installer::globals::ureinstalldirectory\".", "create_unique_directorynames"); } - $installer::globals::ureinstalldirectory = $uniquename; - $installer::globals::ureinstalldirectoryset = 1; + $onedir->{'uniqueparentname'} = "INSTALLLOCATION"; } } } @@ -266,27 +287,19 @@ sub add_root_directories { my ($directorytableref, $allvariableshashref) = @_; - my $oneline = "TARGETDIR\t\tSourceDir\n"; - push(@{$directorytableref}, $oneline); +# my $sourcediraddon = ""; +# if (($installer::globals::addchildprojects) || +# ($installer::globals::patch) || +# ($installer::globals::languagepack) || +# ($allvariableshashref->{'CHANGETARGETDIR'})) +# { +# $sourcediraddon = "\:\."; +# } - my $sourcediraddon = ""; - if (($installer::globals::addchildprojects) || - ($installer::globals::patch) || - ($installer::globals::languagepack) || - ($allvariableshashref->{'CHANGETARGETDIR'})) - { - $sourcediraddon = "\:\."; - } + my $oneline = ""; - if (!($installer::globals::product =~ /ada/i )) # the following directories not for ada products + if (( ! $installer::globals::patch ) && ( ! $installer::globals::languagepack ) && ( ! $allvariableshashref->{'DONTUSESTARTMENUFOLDER'} )) { - $oneline = "$installer::globals::programfilesfolder\tTARGETDIR\t.\n"; - push(@{$directorytableref}, $oneline); - - # my $manufacturer = $installer::globals::manufacturer; - # my $shortmanufacturer = installer::windows::idtglobal::make_eight_three_conform($manufacturer, "dir"); # third parameter not used - # $shortmanufacturer =~ s/\s/\_/g; # changing empty space to underline - my $productname = $allvariableshashref->{'PRODUCTNAME'}; my $productversion = $allvariableshashref->{'PRODUCTVERSION'}; my $baseproductversion = $productversion; @@ -318,83 +331,63 @@ sub add_root_directories my $shortproductkey = installer::windows::idtglobal::make_eight_three_conform($productkey, "dir"); # third parameter not used $shortproductkey =~ s/\s/\_/g; # changing empty space to underline - if ( $allvariableshashref->{'SUNDIR'} ) - { - if ( $allvariableshashref->{'SUNDIRNAME'} ) { $installer::globals::sundirname = $allvariableshashref->{'SUNDIRNAME'}; } - $oneline = "sundirectory\t$installer::globals::programfilesfolder\t$installer::globals::sundirname$sourcediraddon\n"; - push(@{$directorytableref}, $oneline); - - $oneline = "INSTALLLOCATION\tsundirectory\t$shortproductkey|$productkey$sourcediraddon\n"; - push(@{$directorytableref}, $oneline); - } - else - { - if ( $allvariableshashref->{'PROGRAMFILESROOT'} ) - { - $oneline = "INSTALLLOCATION\t$installer::globals::programfilesfolder\t.\n"; - } - else - { - $oneline = "INSTALLLOCATION\t$installer::globals::programfilesfolder\t$shortproductkey|$productkey$sourcediraddon\n"; - } - - push(@{$directorytableref}, $oneline); - } - - $oneline = "$installer::globals::programmenufolder\tTARGETDIR\t.\n"; + $oneline = "$installer::globals::officemenufolder\t$installer::globals::programmenufolder\t$shortproductkey|$realproductkey\n"; push(@{$directorytableref}, $oneline); + } - if (( ! $installer::globals::patch ) && ( ! $installer::globals::languagepack ) && ( ! $allvariableshashref->{'DONTUSESTARTMENUFOLDER'} )) - { - $oneline = "$installer::globals::officemenufolder\t$installer::globals::programmenufolder\t$shortproductkey|$realproductkey\n"; - push(@{$directorytableref}, $oneline); - } + $oneline = "TARGETDIR\t\tSourceDir\n"; + push(@{$directorytableref}, $oneline); - $oneline = "$installer::globals::startupfolder\tTARGETDIR\t.\n"; - push(@{$directorytableref}, $oneline); + $oneline = "$installer::globals::programfilesfolder\tTARGETDIR\t.\n"; + push(@{$directorytableref}, $oneline); - $oneline = "$installer::globals::desktopfolder\tTARGETDIR\t.\n"; - push(@{$directorytableref}, $oneline); + $oneline = "$installer::globals::programmenufolder\tTARGETDIR\t.\n"; + push(@{$directorytableref}, $oneline); - $oneline = "$installer::globals::startmenufolder\tTARGETDIR\t.\n"; - push(@{$directorytableref}, $oneline); + $oneline = "$installer::globals::startupfolder\tTARGETDIR\t.\n"; + push(@{$directorytableref}, $oneline); - $oneline = "$installer::globals::commonfilesfolder\tTARGETDIR\t.\n"; - push(@{$directorytableref}, $oneline); + $oneline = "$installer::globals::desktopfolder\tTARGETDIR\t.\n"; + push(@{$directorytableref}, $oneline); - $oneline = "$installer::globals::commonappdatafolder\tTARGETDIR\t.\n"; - push(@{$directorytableref}, $oneline); + $oneline = "$installer::globals::startmenufolder\tTARGETDIR\t.\n"; + push(@{$directorytableref}, $oneline); - $oneline = "$installer::globals::localappdatafolder\tTARGETDIR\t.\n"; - push(@{$directorytableref}, $oneline); + $oneline = "$installer::globals::commonfilesfolder\tTARGETDIR\t.\n"; + push(@{$directorytableref}, $oneline); - if ( $installer::globals::usesharepointpath ) - { - $oneline = "SHAREPOINTPATH\tTARGETDIR\t.\n"; - push(@{$directorytableref}, $oneline); - } + $oneline = "$installer::globals::commonappdatafolder\tTARGETDIR\t.\n"; + push(@{$directorytableref}, $oneline); - $oneline = "$installer::globals::systemfolder\tTARGETDIR\t.\n"; - push(@{$directorytableref}, $oneline); + $oneline = "$installer::globals::localappdatafolder\tTARGETDIR\t.\n"; + push(@{$directorytableref}, $oneline); - my $localtemplatefoldername = $installer::globals::templatefoldername; - my $directorytableentry = $localtemplatefoldername; - my $shorttemplatefoldername = installer::windows::idtglobal::make_eight_three_conform($localtemplatefoldername, "dir"); - if ( $shorttemplatefoldername ne $localtemplatefoldername ) { $directorytableentry = "$shorttemplatefoldername|$localtemplatefoldername"; } - $oneline = "$installer::globals::templatefolder\tTARGETDIR\t$directorytableentry\n"; + if ( $installer::globals::usesharepointpath ) + { + $oneline = "SHAREPOINTPATH\tTARGETDIR\t.\n"; push(@{$directorytableref}, $oneline); + } - if ( $installer::globals::fontsdirname ) - { - $oneline = "$installer::globals::fontsfolder\t$installer::globals::fontsdirparent\t$installer::globals::fontsfoldername\:$installer::globals::fontsdirname\n"; - } - else - { - $oneline = "$installer::globals::fontsfolder\tTARGETDIR\t$installer::globals::fontsfoldername\n"; - } + $oneline = "$installer::globals::systemfolder\tTARGETDIR\t.\n"; + push(@{$directorytableref}, $oneline); - push(@{$directorytableref}, $oneline); + my $localtemplatefoldername = $installer::globals::templatefoldername; + my $directorytableentry = $localtemplatefoldername; + my $shorttemplatefoldername = installer::windows::idtglobal::make_eight_three_conform($localtemplatefoldername, "dir"); + if ( $shorttemplatefoldername ne $localtemplatefoldername ) { $directorytableentry = "$shorttemplatefoldername|$localtemplatefoldername"; } + $oneline = "$installer::globals::templatefolder\tTARGETDIR\t$directorytableentry\n"; + push(@{$directorytableref}, $oneline); + + if ( $installer::globals::fontsdirname ) + { + $oneline = "$installer::globals::fontsfolder\t$installer::globals::fontsdirparent\t$installer::globals::fontsfoldername\:$installer::globals::fontsdirname\n"; } + else + { + $oneline = "$installer::globals::fontsfolder\tTARGETDIR\t$installer::globals::fontsfoldername\n"; + } + + push(@{$directorytableref}, $oneline); } @@ -404,7 +397,7 @@ sub add_root_directories sub create_directory_table { - my ($directoryref, $basedir, $allvariableshashref, $shortdirnamehashref) = @_; + my ($directoryref, $basedir, $allvariableshashref, $shortdirnamehashref, $loggingdir) = @_; # Structure of the directory table: # Directory Directory_Parent DefaultDir @@ -419,7 +412,11 @@ sub create_directory_table overwrite_programfilesfolder($allvariableshashref); create_unique_directorynames($directoryref); + if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "directoriesforidt_local_1.log", $directoryref); } create_defaultdir_directorynames($directoryref, $shortdirnamehashref); # only destdir! + if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "directoriesforidt_local_2.log", $directoryref); } + set_installlocation_directory($directoryref); + if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "directoriesforidt_local_3.log", $directoryref); } installer::windows::idtglobal::write_idt_header(\@directorytable, "directory"); add_root_directories(\@directorytable, $allvariableshashref); create_directorytable_from_collection(\@directorytable, $directoryref); diff --git a/solenv/bin/modules/installer/windows/idtglobal.pm b/solenv/bin/modules/installer/windows/idtglobal.pm index b82f5175250b..dd8151485afc 100644 --- a/solenv/bin/modules/installer/windows/idtglobal.pm +++ b/solenv/bin/modules/installer/windows/idtglobal.pm @@ -1023,44 +1023,6 @@ sub add_officedir_to_database } } - if ( $installer::globals::basisinstalldirectoryset ) - { - $found = 0; - - for ( my $i = 0; $i <= $#{$customacfile}; $i++ ) - { - if ( ${$customacfile}[$i] =~ /\bBASISDIRECTORYGID\b/ ) - { - ${$customacfile}[$i] =~ s/\bBASISDIRECTORYGID\b/$installer::globals::basisinstalldirectory/; - $found = 1; - } - } - - if (( ! $found ) && ( ! $allvariables->{'IGNOREDIRECTORYLAYER'} )) - { - installer::exiter::exit_program("ERROR: \"BASISDIRECTORYGID\" not found in \"$customactionfilename\" !", "add_officedir_to_database"); - } - } - - if ( $installer::globals::ureinstalldirectoryset ) - { - $found = 0; - - for ( my $i = 0; $i <= $#{$customacfile}; $i++ ) - { - if ( ${$customacfile}[$i] =~ /\bUREDIRECTORYGID\b/ ) - { - ${$customacfile}[$i] =~ s/\bUREDIRECTORYGID\b/$installer::globals::ureinstalldirectory/; - $found = 1; - } - } - - if (( ! $found ) && ( ! $allvariables->{'IGNOREDIRECTORYLAYER'} )) - { - installer::exiter::exit_program("ERROR: \"UREDIRECTORYGID\" not found in \"$customactionfilename\" !", "add_officedir_to_database"); - } - } - # Saving the file installer::files::save_file($customactionfilename ,$customacfile); diff --git a/solenv/bin/modules/installer/windows/property.pm b/solenv/bin/modules/installer/windows/property.pm index 2ef083178122..e9f122a54d86 100644 --- a/solenv/bin/modules/installer/windows/property.pm +++ b/solenv/bin/modules/installer/windows/property.pm @@ -318,18 +318,6 @@ sub set_important_properties push(@{$propertyfile}, $onepropertyline); } - if ( $installer::globals::basisdirhostname ) - { - my $onepropertyline = "BASISDIRHOSTNAME" . "\t" . $installer::globals::basisdirhostname . "\n"; - push(@{$propertyfile}, $onepropertyline); - } - - if ( $installer::globals::uredirhostname ) - { - my $onepropertyline = "UREDIRHOSTNAME" . "\t" . $installer::globals::uredirhostname . "\n"; - push(@{$propertyfile}, $onepropertyline); - } - if ( $installer::globals::sundirhostname ) { my $onepropertyline = "SUNDIRHOSTNAME" . "\t" . $installer::globals::sundirhostname . "\n"; diff --git a/solenv/bin/modules/installer/windows/registry.pm b/solenv/bin/modules/installer/windows/registry.pm index f2edd8d0e830..33583ce711a2 100644 --- a/solenv/bin/modules/installer/windows/registry.pm +++ b/solenv/bin/modules/installer/windows/registry.pm @@ -203,8 +203,8 @@ sub get_registry_value if ( $registry->{'Value'} ) { $value = $registry->{'Value'}; } $value =~ s/\\\"/\"/g; # no more masquerading of '"' - $value =~ s/\/\[OFFICEINSTALLLOCATION\]/; - $value =~ s/\[OFFICEINSTALLLOCATION\]\\/\[OFFICEINSTALLLOCATION\]/; # removing "\" after "[OFFICEINSTALLLOCATION]" + $value =~ s/\/\[INSTALLLOCATION\]/; + $value =~ s/\[INSTALLLOCATION\]\\/\[INSTALLLOCATION\]/; # removing "\" after "[INSTALLLOCATION]" if ( $value =~ /\%/ ) { $value = installer::worker::replace_variables_in_string($value, $allvariableshashref); } @@ -224,8 +224,8 @@ sub get_registry_val64 if ( $registry->{'Val64'} ) { $value = $registry->{'Val64'}; } $value =~ s/\\\"/\"/g; # no more masquerading of '"' - $value =~ s/\/\[OFFICEINSTALLLOCATION\]/; - $value =~ s/\[OFFICEINSTALLLOCATION\]\\/\[OFFICEINSTALLLOCATION\]/; # removing "\" after "[OFFICEINSTALLLOCATION]" + $value =~ s/\/\[INSTALLLOCATION\]/; + $value =~ s/\[INSTALLLOCATION\]\\/\[INSTALLLOCATION\]/; # removing "\" after "[INSTALLLOCATION]" if ( $value =~ /\%/ ) { $value = installer::worker::replace_variables_in_string($value, $allvariableshashref); } diff --git a/solenv/bin/modules/installer/windows/shortcut.pm b/solenv/bin/modules/installer/windows/shortcut.pm index b15c7418352f..76039baf10c9 100644 --- a/solenv/bin/modules/installer/windows/shortcut.pm +++ b/solenv/bin/modules/installer/windows/shortcut.pm @@ -111,7 +111,7 @@ sub get_shortcut_directory $directory = $onedir->{'uniquename'}; - if ($directory eq "") { $directory = "OFFICEINSTALLLOCATION"; } # Shortcuts in the root directory + if ($directory eq "") { $directory = "INSTALLLOCATION"; } # Shortcuts in the root directory return $directory; } @@ -343,7 +343,7 @@ sub get_folderitem_wkdir $directory = $onedir->{'uniquename'}; - if ($directory eq "") { $directory = "OFFICEINSTALLLOCATION"; } + if ($directory eq "") { $directory = "INSTALLLOCATION"; } } return $directory; diff --git a/solenv/bin/modules/installer/worker.pm b/solenv/bin/modules/installer/worker.pm index 6cc3c1e3f5db..3a2eb46817ee 100644 --- a/solenv/bin/modules/installer/worker.pm +++ b/solenv/bin/modules/installer/worker.pm @@ -1059,8 +1059,7 @@ sub write_content_into_inf_file if ( $registryitem->{'Value'} ) { $value = $registryitem->{'Value'}; } if ( $value =~ /\/ ) { $value =~ s/\\\"/\"\"/g; } # Quoting for INF is done by double "" $value =~ s/\\\"/\"/g; # no more masquerading of '"' - $value =~ s/\/\%OFFICEINSTALLLOCATION\%/g; - # $value =~ s/\%OFFICEINSTALLLOCATION\%\\/\%OFFICEINSTALLLOCATION\%/g; # removing "\" after "%OFFICEINSTALLLOCATION%" + $value =~ s/\/\%INSTALLLOCATION\%/g; if ( $value ne "" ) { $value = "\"" . $value . "\""; } my $oneline = $regroot . "," . $subkey . "," . $valueentryname . "," . $flag . "," . $value . "\n"; -- cgit v1.2.3 From c8384bf5dc91ed25d30ca3582b286fb06bb794a2 Mon Sep 17 00:00:00 2001 From: Ingo Schmidt Date: Wed, 26 May 2010 14:44:44 +0200 Subject: native305 #i92977# new Windows INSTALLLOCATION settings --- .../checkrunningofficelanguagepack.cxx | 4 +-- .../customactions/languagepacks/respintest.cxx | 2 +- .../win32/customactions/patch/swappatchfiles.cxx | 26 +++++--------- .../customactions/quickstarter/quickstarter.cxx | 4 +-- .../source/win32/customactions/rebase/rebase.cxx | 10 +++--- .../win32/customactions/reg4msdoc/msihelper.cxx | 2 +- .../win32/customactions/regactivex/regactivex.cxx | 2 +- .../shellextensions/checkrunningoffice.cxx | 6 ++-- .../shellextensions/copyeditiondata.cxx | 2 +- .../shellextensions/copyextensiondata.cxx | 2 +- .../customactions/shellextensions/dotnetcheck.cxx | 12 ------- .../customactions/shellextensions/layerlinks.cxx | 20 ++++++----- .../shellextensions/migrateinstallpath.cxx | 42 ---------------------- .../shellextensions/postuninstall.cxx | 4 +-- .../shellextensions/registerextensions.cxx | 10 +++--- .../shellextensions/startmenuicon.cxx | 2 +- .../customactions/shellextensions/vistaspecial.cxx | 6 ++-- 17 files changed, 47 insertions(+), 109 deletions(-) diff --git a/setup_native/source/win32/customactions/languagepacks/checkrunningofficelanguagepack.cxx b/setup_native/source/win32/customactions/languagepacks/checkrunningofficelanguagepack.cxx index 86cba0908bbb..9a933eea0334 100755 --- a/setup_native/source/win32/customactions/languagepacks/checkrunningofficelanguagepack.cxx +++ b/setup_native/source/win32/customactions/languagepacks/checkrunningofficelanguagepack.cxx @@ -177,8 +177,8 @@ static BOOL MoveFileExImpl( LPCSTR lpExistingFileNameA, LPCSTR lpNewFileNameA, D extern "C" UINT __stdcall IsOfficeRunning( MSIHANDLE handle ) { - std::_tstring sInstDir = GetMsiProperty( handle, TEXT("BASISINSTALLLOCATION") ); - std::_tstring sResourceDir = sInstDir + TEXT("program\\resource\\"); + std::_tstring sInstDir = GetMsiProperty( handle, TEXT("INSTALLLOCATION") ); + std::_tstring sResourceDir = sInstDir + TEXT("Basis\\program\\resource\\"); std::_tstring sPattern = sResourceDir + TEXT("vcl*.res"); WIN32_FIND_DATA aFindFileData; diff --git a/setup_native/source/win32/customactions/languagepacks/respintest.cxx b/setup_native/source/win32/customactions/languagepacks/respintest.cxx index bdfb97dfb3e1..6a98af8a3f30 100644 --- a/setup_native/source/win32/customactions/languagepacks/respintest.cxx +++ b/setup_native/source/win32/customactions/languagepacks/respintest.cxx @@ -88,7 +88,7 @@ namespace extern "C" UINT __stdcall GetUserInstallMode(MSIHANDLE handle) { - string sOfficeInstallPath = GetMsiProperty(handle, TEXT("OFFICEINSTALLLOCATION")); + string sOfficeInstallPath = GetMsiProperty(handle, TEXT("INSTALLLOCATION")); // MessageBox(NULL, sOfficeInstallPath.c_str(), "DEBUG", MB_OK); diff --git a/setup_native/source/win32/customactions/patch/swappatchfiles.cxx b/setup_native/source/win32/customactions/patch/swappatchfiles.cxx index d6f0933077fc..6285d64ebe3f 100755 --- a/setup_native/source/win32/customactions/patch/swappatchfiles.cxx +++ b/setup_native/source/win32/customactions/patch/swappatchfiles.cxx @@ -544,8 +544,7 @@ static std::queue< std::_tstring > getProfileKeys( const std::_tstring& aFileNam extern "C" UINT __stdcall InstallPatchedFiles( MSIHANDLE handle ) { std::_tstring sInstDir = GetMsiProperty( handle, TEXT("INSTALLLOCATION") ); - std::_tstring sBasisInstDir = GetMsiProperty( handle, TEXT("BASISINSTALLLOCATION") ); - std::_tstring sProgramDir = sBasisInstDir + TEXT("program\\"); + std::_tstring sProgramDir = sInstDir + TEXT("Basis\\program\\"); std::_tstring sPatchFile = sProgramDir + TEXT("patchlist.txt"); std::queue< std::_tstring > aSectionNames; @@ -605,16 +604,11 @@ extern "C" UINT __stdcall UninstallPatchedFiles( MSIHANDLE handle ) HKEY hKey; std::_tstring sInstDir; - std::_tstring sBasisInstDir; std::_tstring sProductKey = GetMsiProperty( handle, TEXT("FINDPRODUCT") ); if ( ERROR_SUCCESS == RegOpenKey( HKEY_CURRENT_USER, sProductKey.c_str(), &hKey ) ) { - if ( ERROR_SUCCESS == RegQueryValueEx( hKey, TEXT("BASISINSTALLLOCATION"), NULL, NULL, (LPBYTE)szValue, &nValueSize ) ) - { - sBasisInstDir = szValue; - } if ( ERROR_SUCCESS == RegQueryValueEx( hKey, TEXT("INSTALLLOCATION"), NULL, NULL, (LPBYTE)szValue, &nValueSize ) ) { sInstDir = szValue; @@ -623,10 +617,6 @@ extern "C" UINT __stdcall UninstallPatchedFiles( MSIHANDLE handle ) } else if ( ERROR_SUCCESS == RegOpenKey( HKEY_LOCAL_MACHINE, sProductKey.c_str(), &hKey ) ) { - if ( ERROR_SUCCESS == RegQueryValueEx( hKey, TEXT("BASISINSTALLLOCATION"), NULL, NULL, (LPBYTE)szValue, &nValueSize ) ) - { - sBasisInstDir = szValue; - } if ( ERROR_SUCCESS == RegQueryValueEx( hKey, TEXT("INSTALLLOCATION"), NULL, NULL, (LPBYTE)szValue, &nValueSize ) ) { sInstDir = szValue; @@ -636,7 +626,7 @@ extern "C" UINT __stdcall UninstallPatchedFiles( MSIHANDLE handle ) else return ERROR_SUCCESS; - std::_tstring sProgramDir = sBasisInstDir + TEXT("program\\"); + std::_tstring sProgramDir = sInstDir + TEXT("Basis\\program\\"); std::_tstring sPatchFile = sProgramDir + TEXT("patchlist.txt"); std::queue< std::_tstring > aSectionNames; @@ -689,8 +679,8 @@ extern "C" UINT __stdcall UninstallPatchedFiles( MSIHANDLE handle ) extern "C" UINT __stdcall IsOfficeRunning( MSIHANDLE handle ) { - std::_tstring sInstDir = GetMsiProperty( handle, TEXT("BASISINSTALLLOCATION") ); - std::_tstring sResourceDir = sInstDir + TEXT("program\\resource\\"); + std::_tstring sInstDir = GetMsiProperty( handle, TEXT("INSTALLLOCATION") ); + std::_tstring sResourceDir = sInstDir + TEXT("Basis\\program\\resource\\"); std::_tstring sPattern = sResourceDir + TEXT("vcl*.res"); WIN32_FIND_DATA aFindFileData; @@ -733,8 +723,8 @@ extern "C" UINT __stdcall SetFeatureState( MSIHANDLE handle ) // 1. Reading Product Code from setup.ini of installed Office - std::_tstring sInstallPath = GetMsiProperty(handle, TEXT("OFFICEINSTALLLOCATION")); - // MessageBox(NULL, sInstallPath.c_str(), "BASISINSTALLLOCATION", MB_OK); + std::_tstring sInstallPath = GetMsiProperty(handle, TEXT("INSTALLLOCATION")); + // MessageBox(NULL, sInstallPath.c_str(), "INSTALLLOCATION", MB_OK); std::_tstring sSetupiniPath = sInstallPath + TEXT("program\\setup.ini"); TCHAR szProductCode[32767]; @@ -869,8 +859,8 @@ extern "C" UINT __stdcall ShowOnlineUpdateDialog( MSIHANDLE handle ) // Online Update functionality is always available. Then the dialog // that offers the Online Update is superfluous. - std::_tstring sInstDir = GetMsiProperty( handle, TEXT("BASISINSTALLLOCATION") ); - std::_tstring sProgramDir = sInstDir + TEXT("program\\"); + std::_tstring sInstDir = GetMsiProperty( handle, TEXT("INSTALLLOCATION") ); + std::_tstring sProgramDir = sInstDir + TEXT("Basis\\program\\"); std::_tstring sSearchFile = sProgramDir + TEXT("updchk.uno.dll"); WIN32_FIND_DATA data; diff --git a/setup_native/source/win32/customactions/quickstarter/quickstarter.cxx b/setup_native/source/win32/customactions/quickstarter/quickstarter.cxx index f732a3a8ad57..25659a0b4109 100644 --- a/setup_native/source/win32/customactions/quickstarter/quickstarter.cxx +++ b/setup_native/source/win32/customactions/quickstarter/quickstarter.cxx @@ -15,13 +15,13 @@ std::string GetOfficeInstallationPath(MSIHANDLE handle) DWORD sz = 0; LPTSTR dummy = TEXT(""); - if (MsiGetProperty(handle, TEXT("OFFICEINSTALLLOCATION"), dummy, &sz) == ERROR_MORE_DATA) + if (MsiGetProperty(handle, TEXT("INSTALLLOCATION"), dummy, &sz) == ERROR_MORE_DATA) { sz++; // space for the final '\0' DWORD nbytes = sz * sizeof(TCHAR); LPTSTR buff = reinterpret_cast(_alloca(nbytes)); ZeroMemory(buff, nbytes); - MsiGetProperty(handle, TEXT("OFFICEINSTALLLOCATION"), buff, &sz); + MsiGetProperty(handle, TEXT("INSTALLLOCATION"), buff, &sz); progpath = buff; } return progpath; diff --git a/setup_native/source/win32/customactions/rebase/rebase.cxx b/setup_native/source/win32/customactions/rebase/rebase.cxx index 4d031bee908a..dfe1e82e1e9b 100644 --- a/setup_native/source/win32/customactions/rebase/rebase.cxx +++ b/setup_native/source/win32/customactions/rebase/rebase.cxx @@ -126,13 +126,11 @@ static BOOL rebaseImagesInFolder( MSIHANDLE handle, const std::string& sPath, LP static BOOL rebaseImages( MSIHANDLE handle, LPVOID pAddress ) { - std::string sOfficeInstallPath = GetMsiProperty(handle, TEXT("OFFICEINSTALLLOCATION")); - std::string sBasisInstallPath = GetMsiProperty(handle, TEXT("BASISINSTALLLOCATION")); - std::string sUreInstallPath = GetMsiProperty(handle, TEXT("UREINSTALLLOCATION")); + std::string sInstallPath = GetMsiProperty(handle, TEXT("INSTALLLOCATION")); - std::string sBasisDir = sBasisInstallPath + TEXT("program\\"); - std::string sOfficeDir = sOfficeInstallPath + TEXT("program\\"); - std::string sUreDir = sUreInstallPath + TEXT("bin\\"); + std::string sBasisDir = sInstallPath + TEXT("Basis\\program\\"); + std::string sOfficeDir = sInstallPath + TEXT("program\\"); + std::string sUreDir = sInstallPath + TEXT("URE\\bin\\"); BOOL bResult = rebaseImagesInFolder( handle, sBasisDir, pAddress ); bResult &= rebaseImagesInFolder( handle, sOfficeDir, pAddress ); diff --git a/setup_native/source/win32/customactions/reg4msdoc/msihelper.cxx b/setup_native/source/win32/customactions/reg4msdoc/msihelper.cxx index 8cfc1fb08597..2941ba5a8e27 100644 --- a/setup_native/source/win32/customactions/reg4msdoc/msihelper.cxx +++ b/setup_native/source/win32/customactions/reg4msdoc/msihelper.cxx @@ -52,7 +52,7 @@ bool IsAllUserInstallation(MSIHANDLE handle) std::wstring GetOfficeInstallationPath(MSIHANDLE handle) { std::wstring progpath; - GetMsiProp(handle, TEXT("OFFICEINSTALLLOCATION"), progpath); + GetMsiProp(handle, TEXT("INSTALLLOCATION"), progpath); return progpath; } diff --git a/setup_native/source/win32/customactions/regactivex/regactivex.cxx b/setup_native/source/win32/customactions/regactivex/regactivex.cxx index 1e91ccbd8599..037824689a47 100644 --- a/setup_native/source/win32/customactions/regactivex/regactivex.cxx +++ b/setup_native/source/win32/customactions/regactivex/regactivex.cxx @@ -170,7 +170,7 @@ BOOL GetMsiProp( MSIHANDLE hMSI, const wchar_t* pPropName, wchar_t** ppValue ) BOOL GetActiveXControlPath( MSIHANDLE hMSI, char** ppActiveXPath ) { wchar_t* pProgPath = NULL; - if ( GetMsiProp( hMSI, L"OFFICEINSTALLLOCATION", &pProgPath ) && pProgPath ) + if ( GetMsiProp( hMSI, L"INSTALLLOCATION", &pProgPath ) && pProgPath ) { char* pCharProgPath = UnicodeToAnsiString( pProgPath ); #ifdef OWN_DEBUG_PRINT diff --git a/setup_native/source/win32/customactions/shellextensions/checkrunningoffice.cxx b/setup_native/source/win32/customactions/shellextensions/checkrunningoffice.cxx index 09f60b7a66d5..9a028953fef1 100755 --- a/setup_native/source/win32/customactions/shellextensions/checkrunningoffice.cxx +++ b/setup_native/source/win32/customactions/shellextensions/checkrunningoffice.cxx @@ -184,12 +184,12 @@ extern "C" UINT __stdcall IsOfficeRunning( MSIHANDLE handle ) // renaming the vcl resource doesn't work reliable with OS >= Windows Vista if (osverinfo.dwMajorVersion < 6 ) { - std::_tstring sInstDir = GetMsiProperty( handle, TEXT("BASISINSTALLLOCATION") ); + std::_tstring sInstDir = GetMsiProperty( handle, TEXT("INSTALLLOCATION") ); // Property empty -> no office installed if ( sInstDir.length() == 0 ) return ERROR_SUCCESS; - std::_tstring sResourceDir = sInstDir + TEXT("program\\resource\\"); + std::_tstring sResourceDir = sInstDir + TEXT("Basis\\program\\resource\\"); std::_tstring sPattern = sResourceDir + TEXT("vcl*.res"); // std::_tstring mystr; @@ -233,7 +233,7 @@ extern "C" UINT __stdcall IsOfficeRunning( MSIHANDLE handle ) } else { - std::_tstring sOfficeInstallPath = GetMsiProperty(handle, TEXT("OFFICEINSTALLLOCATION")); + std::_tstring sOfficeInstallPath = GetMsiProperty(handle, TEXT("INSTALLLOCATION")); // Property empty -> no office installed if ( sOfficeInstallPath.length() == 0 ) return ERROR_SUCCESS; diff --git a/setup_native/source/win32/customactions/shellextensions/copyeditiondata.cxx b/setup_native/source/win32/customactions/shellextensions/copyeditiondata.cxx index 28dfcc0e18b6..7dc5194a18cb 100644 --- a/setup_native/source/win32/customactions/shellextensions/copyeditiondata.cxx +++ b/setup_native/source/win32/customactions/shellextensions/copyeditiondata.cxx @@ -100,7 +100,7 @@ extern "C" UINT __stdcall copyEditionData(MSIHANDLE install) { wchar_t * end; boost::scoped_array to( getProperty( - install, L"OFFICEINSTALLLOCATION", + install, L"INSTALLLOCATION", LCL_STRING0(L"program\\edition\0"), &end)); if (!to) { return ERROR_INSTALL_FAILURE; diff --git a/setup_native/source/win32/customactions/shellextensions/copyextensiondata.cxx b/setup_native/source/win32/customactions/shellextensions/copyextensiondata.cxx index 522c52a9aac9..517915cb831f 100644 --- a/setup_native/source/win32/customactions/shellextensions/copyextensiondata.cxx +++ b/setup_native/source/win32/customactions/shellextensions/copyextensiondata.cxx @@ -93,7 +93,7 @@ extern "C" UINT __stdcall copyExtensionData(MSIHANDLE handle) { bool fSuccess = true; bool bFailIfExist = true; - std::_tstring sDestDir = GetMsiProperty( handle, TEXT("OFFICEINSTALLLOCATION") ); + std::_tstring sDestDir = GetMsiProperty( handle, TEXT("INSTALLLOCATION") ); std::_tstring sShareInstallDir = sDestDir + TEXT("share\\extension\\install\\"); // creating directories diff --git a/setup_native/source/win32/customactions/shellextensions/dotnetcheck.cxx b/setup_native/source/win32/customactions/shellextensions/dotnetcheck.cxx index 2b022cfb3b8e..f7cf0247c631 100644 --- a/setup_native/source/win32/customactions/shellextensions/dotnetcheck.cxx +++ b/setup_native/source/win32/customactions/shellextensions/dotnetcheck.cxx @@ -161,18 +161,6 @@ extern "C" UINT __stdcall ShowProperties(MSIHANDLE handle) string myText = TEXT("INSTALLLOCATION: ") + property; MessageBox(NULL, myText.c_str(), "INSTALLLOCATION", MB_OK); - property = GetMsiProperty(handle, TEXT("UREINSTALLLOCATION")); - myText = TEXT("UREINSTALLLOCATION: ") + property; - MessageBox(NULL, myText.c_str(), "UREINSTALLLOCATION", MB_OK); - - property = GetMsiProperty(handle, TEXT("BASISINSTALLLOCATION")); - myText = TEXT("BASISINSTALLLOCATION: ") + property; - MessageBox(NULL, myText.c_str(), "BASISINSTALLLOCATION", MB_OK); - - property = GetMsiProperty(handle, TEXT("OFFICEINSTALLLOCATION")); - myText = TEXT("OFFICEINSTALLLOCATION: ") + property; - MessageBox(NULL, myText.c_str(), "OFFICEINSTALLLOCATION", MB_OK); - property = GetMsiProperty(handle, TEXT("Installed")); myText = TEXT("Installed: ") + property; MessageBox(NULL, myText.c_str(), "Installed", MB_OK); diff --git a/setup_native/source/win32/customactions/shellextensions/layerlinks.cxx b/setup_native/source/win32/customactions/shellextensions/layerlinks.cxx index 114e24955820..fb0897e728fe 100644 --- a/setup_native/source/win32/customactions/shellextensions/layerlinks.cxx +++ b/setup_native/source/win32/customactions/shellextensions/layerlinks.cxx @@ -98,12 +98,14 @@ namespace extern "C" UINT __stdcall CreateLayerLinks(MSIHANDLE handle) { - string sOfficeInstallPath = GetMsiProperty(handle, TEXT("OFFICEINSTALLLOCATION")); - string sBasisInstallPath = GetMsiProperty(handle, TEXT("BASISINSTALLLOCATION")); - string sUreInstallPath = GetMsiProperty(handle, TEXT("UREINSTALLLOCATION")); + string sInstallPath = GetMsiProperty(handle, TEXT("INSTALLLOCATION")); - string sBasisLinkPath = sOfficeInstallPath + TEXT("basis-link"); - string sUreLinkPath = sBasisInstallPath + TEXT("ure-link"); + string sOfficeInstallPath = sInstallPath; + string sBasisInstallPath = sInstallPath + TEXT("Basis\\"); + string sUreInstallPath = sInstallPath + TEXT("URE\\"); + + string sBasisLinkPath = sInstallPath + TEXT("basis-link"); + string sUreLinkPath = sInstallPath + TEXT("Basis\\ure-link"); if ( IsSetMsiProperty(handle, TEXT("ADMININSTALL")) ) { @@ -208,9 +210,11 @@ extern "C" UINT __stdcall CreateLayerLinks(MSIHANDLE handle) extern "C" UINT __stdcall RemoveLayerLinks(MSIHANDLE handle) { - string sOfficeInstallPath = GetMsiProperty(handle, TEXT("OFFICEUNINSTALLLOCATION")); - string sBasisInstallPath = GetMsiProperty(handle, TEXT("BASISUNINSTALLLOCATION")); - string sUreInstallPath = GetMsiProperty(handle, TEXT("UREUNINSTALLLOCATION")); + string sInstallPath = GetMsiProperty(handle, TEXT("INSTALLLOCATION")); + + string sOfficeInstallPath = sInstallPath; + string sBasisInstallPath = sInstallPath + TEXT("Basis\\"); + string sUreInstallPath = sInstallPath + TEXT("URE\\"); string sBasisLinkPath = sOfficeInstallPath + TEXT("basis-link"); string sUreLinkPath = sBasisInstallPath + TEXT("ure-link"); diff --git a/setup_native/source/win32/customactions/shellextensions/migrateinstallpath.cxx b/setup_native/source/win32/customactions/shellextensions/migrateinstallpath.cxx index 1d3692e456b0..c8035799a539 100755 --- a/setup_native/source/win32/customactions/shellextensions/migrateinstallpath.cxx +++ b/setup_native/source/win32/customactions/shellextensions/migrateinstallpath.cxx @@ -91,27 +91,6 @@ extern "C" UINT __stdcall MigrateInstallPath( MSIHANDLE handle ) if ( ERROR_SUCCESS == RegOpenKey( HKEY_CURRENT_USER, sProductKey.c_str(), &hKey ) ) { - if ( ERROR_SUCCESS == RegQueryValueEx( hKey, TEXT("OFFICEINSTALLLOCATION"), NULL, NULL, (LPBYTE)szValue, &nValueSize ) ) - { - sInstDir = szValue; - MsiSetProperty(handle, TEXT("OFFICEINSTALLLOCATION"), sInstDir.c_str()); - // MessageBox( NULL, sInstDir.c_str(), "Found in HKEY_CURRENT_USER", MB_OK ); - } - - if ( ERROR_SUCCESS == RegQueryValueEx( hKey, TEXT("BASISINSTALLLOCATION"), NULL, NULL, (LPBYTE)szValue, &nValueSize ) ) - { - sInstDir = szValue; - MsiSetProperty(handle, TEXT("BASISINSTALLLOCATION"), sInstDir.c_str()); - // MessageBox( NULL, sInstDir.c_str(), "Found in HKEY_CURRENT_USER", MB_OK ); - } - - if ( ERROR_SUCCESS == RegQueryValueEx( hKey, TEXT("UREINSTALLLOCATION"), NULL, NULL, (LPBYTE)szValue, &nValueSize ) ) - { - sInstDir = szValue; - MsiSetProperty(handle, TEXT("UREINSTALLLOCATION"), sInstDir.c_str()); - // MessageBox( NULL, sInstDir.c_str(), "Found in HKEY_CURRENT_USER", MB_OK ); - } - if ( ERROR_SUCCESS == RegQueryValueEx( hKey, TEXT("INSTALLLOCATION"), NULL, NULL, (LPBYTE)szValue, &nValueSize ) ) { sInstDir = szValue; @@ -123,27 +102,6 @@ extern "C" UINT __stdcall MigrateInstallPath( MSIHANDLE handle ) } else if ( ERROR_SUCCESS == RegOpenKey( HKEY_LOCAL_MACHINE, sProductKey.c_str(), &hKey ) ) { - if ( ERROR_SUCCESS == RegQueryValueEx( hKey, TEXT("OFFICEINSTALLLOCATION"), NULL, NULL, (LPBYTE)szValue, &nValueSize ) ) - { - sInstDir = szValue; - MsiSetProperty(handle, TEXT("OFFICEINSTALLLOCATION"), sInstDir.c_str()); - // MessageBox( NULL, sInstDir.c_str(), "Found in HKEY_LOCAL_MACHINE", MB_OK ); - } - - if ( ERROR_SUCCESS == RegQueryValueEx( hKey, TEXT("BASISINSTALLLOCATION"), NULL, NULL, (LPBYTE)szValue, &nValueSize ) ) - { - sInstDir = szValue; - MsiSetProperty(handle, TEXT("BASISINSTALLLOCATION"), sInstDir.c_str()); - // MessageBox( NULL, sInstDir.c_str(), "Found in HKEY_LOCAL_MACHINE", MB_OK ); - } - - if ( ERROR_SUCCESS == RegQueryValueEx( hKey, TEXT("UREINSTALLLOCATION"), NULL, NULL, (LPBYTE)szValue, &nValueSize ) ) - { - sInstDir = szValue; - MsiSetProperty(handle, TEXT("UREINSTALLLOCATION"), sInstDir.c_str()); - // MessageBox( NULL, sInstDir.c_str(), "Found in HKEY_LOCAL_MACHINE", MB_OK ); - } - if ( ERROR_SUCCESS == RegQueryValueEx( hKey, TEXT("INSTALLLOCATION"), NULL, NULL, (LPBYTE)szValue, &nValueSize ) ) { sInstDir = szValue; diff --git a/setup_native/source/win32/customactions/shellextensions/postuninstall.cxx b/setup_native/source/win32/customactions/shellextensions/postuninstall.cxx index bb339953ff34..ea9bfae3864b 100755 --- a/setup_native/source/win32/customactions/shellextensions/postuninstall.cxx +++ b/setup_native/source/win32/customactions/shellextensions/postuninstall.cxx @@ -115,7 +115,7 @@ extern "C" UINT __stdcall ExecutePostUninstallScript( MSIHANDLE handle ) if ( ERROR_SUCCESS == RegOpenKey( HKEY_CURRENT_USER, sProductKey.c_str(), &hKey ) ) { - if ( ERROR_SUCCESS == RegQueryValueEx( hKey, TEXT("OFFICEINSTALLLOCATION"), NULL, NULL, (LPBYTE)szValue, &nValueSize ) ) + if ( ERROR_SUCCESS == RegQueryValueEx( hKey, TEXT("INSTALLLOCATION"), NULL, NULL, (LPBYTE)szValue, &nValueSize ) ) { sInstDir = szValue; } @@ -123,7 +123,7 @@ extern "C" UINT __stdcall ExecutePostUninstallScript( MSIHANDLE handle ) } else if ( ERROR_SUCCESS == RegOpenKey( HKEY_LOCAL_MACHINE, sProductKey.c_str(), &hKey ) ) { - if ( ERROR_SUCCESS == RegQueryValueEx( hKey, TEXT("OFFICEINSTALLLOCATION"), NULL, NULL, (LPBYTE)szValue, &nValueSize ) ) + if ( ERROR_SUCCESS == RegQueryValueEx( hKey, TEXT("INSTALLLOCATION"), NULL, NULL, (LPBYTE)szValue, &nValueSize ) ) { sInstDir = szValue; } diff --git a/setup_native/source/win32/customactions/shellextensions/registerextensions.cxx b/setup_native/source/win32/customactions/shellextensions/registerextensions.cxx index 191bb5fad393..3906d2584fd1 100644 --- a/setup_native/source/win32/customactions/shellextensions/registerextensions.cxx +++ b/setup_native/source/win32/customactions/shellextensions/registerextensions.cxx @@ -317,7 +317,7 @@ static BOOL RemoveCompleteDirectory( std::_tstring sPath ) extern "C" UINT __stdcall RegisterExtensions(MSIHANDLE handle) { - std::_tstring sInstDir = GetMsiProperty( handle, TEXT("OFFICEINSTALLLOCATION") ); + std::_tstring sInstDir = GetMsiProperty( handle, TEXT("INSTALLLOCATION") ); std::_tstring sUnoPkgFile = sInstDir + TEXT("program\\unopkg.exe"); std::_tstring sShareInstallDir = sInstDir + TEXT("share\\extension\\install\\"); std::_tstring sPattern = sShareInstallDir + TEXT("*.oxt"); @@ -415,7 +415,7 @@ extern "C" UINT __stdcall DeregisterExtensions(MSIHANDLE handle) if ( ERROR_SUCCESS == RegOpenKey( HKEY_CURRENT_USER, sProductKey.c_str(), &hKey ) ) { - if ( ERROR_SUCCESS == RegQueryValueEx( hKey, TEXT("OFFICEINSTALLLOCATION"), NULL, NULL, (LPBYTE)szValue, &nValueSize ) ) + if ( ERROR_SUCCESS == RegQueryValueEx( hKey, TEXT("INSTALLLOCATION"), NULL, NULL, (LPBYTE)szValue, &nValueSize ) ) { sInstDir = szValue; } @@ -423,7 +423,7 @@ extern "C" UINT __stdcall DeregisterExtensions(MSIHANDLE handle) } else if ( ERROR_SUCCESS == RegOpenKey( HKEY_LOCAL_MACHINE, sProductKey.c_str(), &hKey ) ) { - if ( ERROR_SUCCESS == RegQueryValueEx( hKey, TEXT("OFFICEINSTALLLOCATION"), NULL, NULL, (LPBYTE)szValue, &nValueSize ) ) + if ( ERROR_SUCCESS == RegQueryValueEx( hKey, TEXT("INSTALLLOCATION"), NULL, NULL, (LPBYTE)szValue, &nValueSize ) ) { sInstDir = szValue; } @@ -533,7 +533,7 @@ extern "C" UINT __stdcall RemoveExtensions(MSIHANDLE handle) if ( ERROR_SUCCESS == RegOpenKey( HKEY_CURRENT_USER, sProductKey.c_str(), &hKey ) ) { - if ( ERROR_SUCCESS == RegQueryValueEx( hKey, TEXT("OFFICEINSTALLLOCATION"), NULL, NULL, (LPBYTE)szValue, &nValueSize ) ) + if ( ERROR_SUCCESS == RegQueryValueEx( hKey, TEXT("INSTALLLOCATION"), NULL, NULL, (LPBYTE)szValue, &nValueSize ) ) { sInstDir = szValue; } @@ -541,7 +541,7 @@ extern "C" UINT __stdcall RemoveExtensions(MSIHANDLE handle) } else if ( ERROR_SUCCESS == RegOpenKey( HKEY_LOCAL_MACHINE, sProductKey.c_str(), &hKey ) ) { - if ( ERROR_SUCCESS == RegQueryValueEx( hKey, TEXT("OFFICEINSTALLLOCATION"), NULL, NULL, (LPBYTE)szValue, &nValueSize ) ) + if ( ERROR_SUCCESS == RegQueryValueEx( hKey, TEXT("INSTALLLOCATION"), NULL, NULL, (LPBYTE)szValue, &nValueSize ) ) { sInstDir = szValue; } diff --git a/setup_native/source/win32/customactions/shellextensions/startmenuicon.cxx b/setup_native/source/win32/customactions/shellextensions/startmenuicon.cxx index 49d5e50be426..5adab408139d 100644 --- a/setup_native/source/win32/customactions/shellextensions/startmenuicon.cxx +++ b/setup_native/source/win32/customactions/shellextensions/startmenuicon.cxx @@ -78,7 +78,7 @@ extern "C" UINT __stdcall InstallStartmenuFolderIcon( MSIHANDLE handle ) // MessageBox(NULL, sDesktopFile.c_str(), TEXT("OfficeMenuFolder"), MB_OK | MB_ICONINFORMATION); - std::_tstring sIconFile = GetMsiProperty( handle, TEXT("OFFICEINSTALLLOCATION") ) + TEXT("program\\soffice.exe"); + std::_tstring sIconFile = GetMsiProperty( handle, TEXT("INSTALLLOCATION") ) + TEXT("program\\soffice.exe"); OSVERSIONINFO osverinfo; osverinfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); diff --git a/setup_native/source/win32/customactions/shellextensions/vistaspecial.cxx b/setup_native/source/win32/customactions/shellextensions/vistaspecial.cxx index d9c271133ac0..70064b58807c 100644 --- a/setup_native/source/win32/customactions/shellextensions/vistaspecial.cxx +++ b/setup_native/source/win32/customactions/shellextensions/vistaspecial.cxx @@ -183,12 +183,12 @@ static BOOL RemoveCompleteDirectory( std::_tstring sPath ) extern "C" UINT __stdcall RenamePrgFolder( MSIHANDLE handle ) { - std::_tstring sOfficeInstallPath = GetMsiProperty(handle, TEXT("OFFICEINSTALLLOCATION")); + std::_tstring sOfficeInstallPath = GetMsiProperty(handle, TEXT("INSTALLLOCATION")); std::_tstring sRenameSrc = sOfficeInstallPath + TEXT("program"); std::_tstring sRenameDst = sOfficeInstallPath + TEXT("program_old"); -// MessageBox(NULL, sRenameSrc.c_str(), "OFFICEINSTALLLOCATION", MB_OK); +// MessageBox(NULL, sRenameSrc.c_str(), "INSTALLLOCATION", MB_OK); bool bSuccess = MoveFile( sRenameSrc.c_str(), sRenameDst.c_str() ); if ( !bSuccess ) @@ -216,7 +216,7 @@ extern "C" UINT __stdcall RenamePrgFolder( MSIHANDLE handle ) extern "C" UINT __stdcall RemovePrgFolder( MSIHANDLE handle ) { - std::_tstring sOfficeInstallPath = GetMsiProperty(handle, TEXT("OFFICEINSTALLLOCATION")); + std::_tstring sOfficeInstallPath = GetMsiProperty(handle, TEXT("INSTALLLOCATION")); std::_tstring sRemoveDir = sOfficeInstallPath + TEXT("program_old"); // MessageBox(NULL, sRemoveDir.c_str(), "REMOVING OLD DIR", MB_OK); -- cgit v1.2.3 From bfafc3a17eb47e87565aaa60cb1c4ba513177ba4 Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Wed, 26 May 2010 15:15:37 +0200 Subject: fwk139: #i110802# integrate patch --- package/source/xstor/xstorage.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package/source/xstor/xstorage.cxx b/package/source/xstor/xstorage.cxx index 55ff5a87e78d..9c2a9617d6c9 100644 --- a/package/source/xstor/xstorage.cxx +++ b/package/source/xstor/xstorage.cxx @@ -4807,11 +4807,11 @@ void SAL_CALL OStorage::setPropertyValue( const ::rtl::OUString& aPropertyName, m_pImpl->m_bIsModified = sal_True; } } - else if ( m_pData->m_bIsRoot && ( aPropertyName.equalsAscii( "HasEncryptedEntries" ) + else if ( ( m_pData->m_bIsRoot && ( aPropertyName.equalsAscii( "HasEncryptedEntries" ) || aPropertyName.equalsAscii( "HasNonEncryptedEntries" ) || aPropertyName.equalsAscii( "IsInconsistent" ) || aPropertyName.equalsAscii( "URL" ) - || aPropertyName.equalsAscii( "RepairPackage" ) ) + || aPropertyName.equalsAscii( "RepairPackage" ) ) ) || aPropertyName.equalsAscii( "IsRoot" ) || aPropertyName.equalsAscii( "MediaTypeFallbackUsed" ) ) throw beans::PropertyVetoException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); @@ -4855,8 +4855,8 @@ void SAL_CALL OStorage::setPropertyValue( const ::rtl::OUString& aPropertyName, else throw lang::IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >(), 0 ); } - else if ( m_pData->m_bIsRoot && ( aPropertyName.equalsAscii( "URL" ) - || aPropertyName.equalsAscii( "RepairPackage" ) ) + else if ( ( m_pData->m_bIsRoot && ( aPropertyName.equalsAscii( "URL" ) + || aPropertyName.equalsAscii( "RepairPackage" ) ) ) || aPropertyName.equalsAscii( "IsRoot" ) ) throw beans::PropertyVetoException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); else -- cgit v1.2.3 From d806a700d8a3145225d224f6d83295772a95bbd9 Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Wed, 26 May 2010 15:20:34 +0200 Subject: fwk139: #i110803# integrate patch --- package/source/xstor/xfactory.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/source/xstor/xfactory.cxx b/package/source/xstor/xfactory.cxx index e78742641a0b..ab3c682d6d35 100644 --- a/package/source/xstor/xfactory.cxx +++ b/package/source/xstor/xfactory.cxx @@ -257,7 +257,7 @@ uno::Reference< uno::XInterface > SAL_CALL OStorageFactory::createInstanceWithAr } else if ( xStream.is() ) { - if ( ( nStorageMode & embed::ElementModes::WRITE ) && !xStream->getOutputStream().is() + if ( ( ( nStorageMode & embed::ElementModes::WRITE ) && !xStream->getOutputStream().is() ) || !xStream->getInputStream().is() ) throw uno::Exception(); // TODO: access denied -- cgit v1.2.3 From 23182295444d78babd716bad26c8ec31559e543a Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Wed, 26 May 2010 15:38:21 +0200 Subject: fwk139: #i108330# integrate patch --- embeddedobj/source/msole/oleembed.cxx | 105 +++++++++++++++++++++++++++++++++- embeddedobj/source/msole/olemisc.cxx | 3 + 2 files changed, 107 insertions(+), 1 deletion(-) diff --git a/embeddedobj/source/msole/oleembed.cxx b/embeddedobj/source/msole/oleembed.cxx index f57dcb8e7fd8..81c1bd708fcb 100644 --- a/embeddedobj/source/msole/oleembed.cxx +++ b/embeddedobj/source/msole/oleembed.cxx @@ -46,10 +46,16 @@ #include #include #include +#include +#include +#include +#include +#include #include #include #include +#include #include @@ -674,6 +680,85 @@ sal_Int32 SAL_CALL OleEmbeddedObject::getCurrentState() return m_nObjectState; } +namespace +{ + bool lcl_CopyStream(uno::Reference xIn, uno::Reference xOut) + { + const sal_Int32 nChunkSize = 4096; + uno::Sequence< sal_Int8 > aData(nChunkSize); + sal_Int32 nTotalRead = 0; + sal_Int32 nRead; + do + { + nRead = xIn->readBytes(aData, nChunkSize); + nTotalRead += nRead; + xOut->writeBytes(aData); + } while (nRead == nChunkSize); + return nTotalRead != 0; + } + + //Dump the objects content to a tempfile, just the "CONTENTS" stream if + //there is one for non-compound documents, otherwise the whole content. + // + //On success a file is returned which must be removed by the caller + rtl::OUString lcl_ExtractObject(::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xFactory, + ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream > xObjectStream) + { + rtl::OUString sUrl; + + // the solution is only active for Unix systems +#ifndef WNT + uno::Reference xNativeTempFile( + xFactory->createInstance( + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.io.TempFile"))), uno::UNO_QUERY_THROW); + uno::Reference < io::XStream > xStream(xNativeTempFile, uno::UNO_QUERY_THROW); + + uno::Sequence< uno::Any > aArgs( 2 ); + aArgs[0] <<= xObjectStream; + aArgs[1] <<= (sal_Bool)sal_True; // do not create copy + uno::Reference< container::XNameContainer > xNameContainer( + xFactory->createInstanceWithArguments( + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.embed.OLESimpleStorage")), + aArgs ), uno::UNO_QUERY_THROW ); + + uno::Reference< io::XStream > xCONTENTS; + xNameContainer->getByName(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CONTENTS"))) >>= xCONTENTS; + + sal_Bool bCopied = xCONTENTS.is() && lcl_CopyStream(xCONTENTS->getInputStream(), xStream->getOutputStream()); + + uno::Reference< io::XSeekable > xSeekableStor(xObjectStream, uno::UNO_QUERY); + if (xSeekableStor.is()) + xSeekableStor->seek(0); + + if (!bCopied) + bCopied = lcl_CopyStream(xObjectStream->getInputStream(), xStream->getOutputStream()); + + if (bCopied) + { + xNativeTempFile->setPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RemoveFile")), + uno::makeAny(sal_False)); + uno::Any aUrl = xNativeTempFile->getPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Uri"))); + aUrl >>= sUrl; + + xNativeTempFile = uno::Reference(); + + uno::Reference xSimpleFileAccess( + xFactory->createInstance( + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.SimpleFileAccess"))), + uno::UNO_QUERY_THROW); + + xSimpleFileAccess->setReadOnly(sUrl, sal_True); + } + else + { + xNativeTempFile->setPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RemoveFile")), + uno::makeAny(sal_True)); + } +#endif + return sUrl; + } +} + //---------------------------------------------- void SAL_CALL OleEmbeddedObject::doVerb( sal_Int32 nVerbID ) throw ( lang::IllegalArgumentException, @@ -789,10 +874,28 @@ void SAL_CALL OleEmbeddedObject::doVerb( sal_Int32 nVerbID ) } if ( !m_pOwnView || !m_pOwnView->Open() ) - throw embed::UnreachableStateException(); + { + //Make a RO copy and see if the OS can find something to at + //least display the content for us + if (!m_aTempDumpURL.getLength()) + m_aTempDumpURL = lcl_ExtractObject(m_xFactory, m_xObjectStream); + + if (m_aTempDumpURL.getLength()) + { + uno::Reference< system::XSystemShellExecute > xSystemShellExecute( m_xFactory->createInstance( + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.system.SystemShellExecute"))), + uno::UNO_QUERY_THROW); + xSystemShellExecute->execute(m_aTempDumpURL, ::rtl::OUString(), system::SystemShellExecuteFlags::DEFAULTS); + } + else + throw embed::UnreachableStateException(); + } } else + { + throw embed::UnreachableStateException(); + } } } diff --git a/embeddedobj/source/msole/olemisc.cxx b/embeddedobj/source/msole/olemisc.cxx index 698ae719fbf0..adf07e1f522e 100644 --- a/embeddedobj/source/msole/olemisc.cxx +++ b/embeddedobj/source/msole/olemisc.cxx @@ -158,6 +158,9 @@ OleEmbeddedObject::~OleEmbeddedObject() if ( m_aTempURL.getLength() ) KillFile_Impl( m_aTempURL, m_xFactory ); + + if ( m_aTempDumpURL.getLength() ) + KillFile_Impl( m_aTempDumpURL, m_xFactory ); } //------------------------------------------------------ -- cgit v1.2.3 From 13b8478fc7c3c3b87997f78af3b43680b728e7e5 Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Wed, 26 May 2010 15:38:57 +0200 Subject: fwk139: #i108330# integrate patch --- embeddedobj/source/inc/oleembobj.hxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/embeddedobj/source/inc/oleembobj.hxx b/embeddedobj/source/inc/oleembobj.hxx index 11ecce69834b..fa25274b3136 100644 --- a/embeddedobj/source/inc/oleembobj.hxx +++ b/embeddedobj/source/inc/oleembobj.hxx @@ -186,6 +186,8 @@ class OleEmbeddedObject : public ::cppu::WeakImplHelper5 ::rtl::OUString m_aTempURL; + ::rtl::OUString m_aTempDumpURL; + // STAMPIT solution // the following member is used during verb execution to detect whether the verb execution modifies the object VerbExecutionController m_aVerbExecutionController; -- cgit v1.2.3 From f383c9a98f285dbe51bcd5990aa7b3c9ba962659 Mon Sep 17 00:00:00 2001 From: Christian Lippka Date: Wed, 26 May 2010 15:47:54 +0200 Subject: #i111538# fix high contrast rendering for annotations in impress --- sd/source/ui/annotations/annotationwindow.cxx | 104 ++++++++++++++------------ 1 file changed, 55 insertions(+), 49 deletions(-) diff --git a/sd/source/ui/annotations/annotationwindow.cxx b/sd/source/ui/annotations/annotationwindow.cxx index 3ba99307fd41..a4642bb68096 100644 --- a/sd/source/ui/annotations/annotationwindow.cxx +++ b/sd/source/ui/annotations/annotationwindow.cxx @@ -136,14 +136,25 @@ AnnotationTextWindow::~AnnotationTextWindow() void AnnotationTextWindow::Paint( const Rectangle& rRect) { - if ( !Application::GetSettings().GetStyleSettings().GetHighContrastMode() ) + const bool bHighContrast = Application::GetSettings().GetStyleSettings().GetHighContrastMode(); + if ( !bHighContrast ) { DrawGradient(Rectangle(Point(0,0),PixelToLogic(GetSizePixel())), Gradient(GRADIENT_LINEAR,mpAnnotationWindow->maColorLight,mpAnnotationWindow->maColor)); } if( mpOutlinerView ) + { + Color aBackgroundColor( mpAnnotationWindow->maColor ); + if( bHighContrast ) + { + aBackgroundColor = GetSettings().GetStyleSettings().GetWindowColor(); + } + + mpOutlinerView->SetBackgroundColor( aBackgroundColor ); + mpOutlinerView->Paint( rRect ); + } } void AnnotationTextWindow::KeyInput( const KeyEvent& rKeyEvt ) @@ -609,16 +620,34 @@ void AnnotationWindow::SetColor() { sal_uInt16 nAuthorIdx = mpDoc->GetAnnotationAuthorIndex( mxAnnotation->getAuthor() ); - maColor = mrManager.GetColor( nAuthorIdx ); - maColorDark = mrManager.GetColorDark( nAuthorIdx ); - maColorLight = mrManager.GetColorLight( nAuthorIdx ); + const bool bHighContrast = Application::GetSettings().GetStyleSettings().GetHighContrastMode(); + if( bHighContrast ) + { + StyleSettings aStyleSettings = GetSettings().GetStyleSettings(); + + maColor = aStyleSettings.GetWindowColor(); + maColorDark = maColor; + maColorLight = aStyleSettings.GetWindowTextColor(); + } + else + { + maColor = mrManager.GetColor( nAuthorIdx ); + maColorDark = mrManager.GetColorDark( nAuthorIdx ); + maColorLight = mrManager.GetColorLight( nAuthorIdx ); + } mpOutlinerView->SetBackgroundColor(maColor); + Engine()->SetBackgroundColor(maColor); + + { + SvtAccessibilityOptions aOptions; + Engine()->ForceAutoColor( bHighContrast || aOptions.GetIsAutomaticFontColor() ); + } mpMeta->SetControlBackground(maColor); AllSettings aSettings = mpMeta->GetSettings(); StyleSettings aStyleSettings = aSettings.GetStyleSettings(); - aStyleSettings.SetFieldTextColor(maColorDark); + aStyleSettings.SetFieldTextColor( bHighContrast ? maColorLight : maColorDark); aSettings.SetStyleSettings(aStyleSettings); mpMeta->SetSettings(aSettings); @@ -635,59 +664,35 @@ void AnnotationWindow::SetColor() void AnnotationWindow::Deactivate() { Reference< XAnnotation > xAnnotation( mxAnnotation ); -/* - // check if text is empty - Paragraph* p1stPara=Engine()->GetParagraph( 0 ); - ULONG nParaAnz=Engine()->GetParagraphCount(); - if(p1stPara==NULL) - nParaAnz=0; - if(nParaAnz==1) + // write changed text back to annotation + if ( Engine()->IsModified() ) { - // if it is only one paragraph, check if that paragraph is empty - XubString aStr(Engine()->GetText(p1stPara)); - - if(!aStr.Len()) - nParaAnz = 0; - } + TextApiObject* pTextApi = getTextApiObject( xAnnotation ); - if( nParaAnz == 0 ) - { - // text is empty, delete postit - DeleteAnnotation( xAnnotation ); - } - else -*/ - { - // write changed text back to annotation - if ( Engine()->IsModified() ) + if( pTextApi ) { - TextApiObject* pTextApi = getTextApiObject( xAnnotation ); - - if( pTextApi ) + OutlinerParaObject* pOPO = Engine()->CreateParaObject(); + if( pOPO ) { - OutlinerParaObject* pOPO = Engine()->CreateParaObject(); - if( pOPO ) - { - if( mpDoc->IsUndoEnabled() ) - mpDoc->BegUndo( String( SdResId( STR_ANNOTATION_UNDO_EDIT ) ) ); - - pTextApi->SetText( *pOPO ); - delete pOPO; + if( mpDoc->IsUndoEnabled() ) + mpDoc->BegUndo( String( SdResId( STR_ANNOTATION_UNDO_EDIT ) ) ); - // set current time to changed annotation - xAnnotation->setDateTime( getCurrentDateTime() ); + pTextApi->SetText( *pOPO ); + delete pOPO; - if( mpDoc->IsUndoEnabled() ) - mpDoc->EndUndo(); + // set current time to changed annotation + xAnnotation->setDateTime( getCurrentDateTime() ); - DocView()->GetDocSh()->SetModified(sal_True); - } + if( mpDoc->IsUndoEnabled() ) + mpDoc->EndUndo(); + DocView()->GetDocSh()->SetModified(sal_True); } + } - Engine()->ClearModifyFlag(); } + Engine()->ClearModifyFlag(); Engine()->GetUndoManager().Clear(); } @@ -698,15 +703,16 @@ void AnnotationWindow::Paint( const Rectangle& rRect) if(mpMeta->IsVisible() && !mbReadonly) { + const bool bHighContrast = Application::GetSettings().GetStyleSettings().GetHighContrastMode(); //draw left over space - if ( Application::GetSettings().GetStyleSettings().GetHighContrastMode() ) + if ( bHighContrast ) SetFillColor(COL_BLACK); else SetFillColor(maColor); SetLineColor(); DrawRect(PixelToLogic(Rectangle(Point(mpMeta->GetPosPixel().X()+mpMeta->GetSizePixel().Width(),mpMeta->GetPosPixel().Y()),Size(METABUTTON_AREA_WIDTH,mpMeta->GetSizePixel().Height())))); - if ( Application::GetSettings().GetStyleSettings().GetHighContrastMode()) + if ( bHighContrast ) { //draw rect around button SetFillColor(COL_BLACK); @@ -728,7 +734,7 @@ void AnnotationWindow::Paint( const Rectangle& rRect) DrawRect(maRectMetaButton); //draw arrow - if ( Application::GetSettings().GetStyleSettings().GetHighContrastMode() ) + if( bHighContrast ) SetFillColor(COL_WHITE); else SetFillColor(COL_BLACK); -- cgit v1.2.3 From 0713976e5581b5269aa9d766c1b9cc6c27342f58 Mon Sep 17 00:00:00 2001 From: Christian Lippka Date: Wed, 26 May 2010 15:47:54 +0200 Subject: #i111538# fix high contrast rendering for annotations in impress --- editeng/source/editeng/impedit3.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx index dbc6767d1f91..08f50a0da884 100644 --- a/editeng/source/editeng/impedit3.cxx +++ b/editeng/source/editeng/impedit3.cxx @@ -3613,7 +3613,7 @@ void ImpEditEngine::Paint( ImpEditView* pView, const Rectangle& rRec, sal_Bool b ContentNode* pNode = GetEditDoc().SaveGetObject( 0 ); SeekCursor( pNode, 1, aTmpFont ); Color aFontColor( aTmpFont.GetColor() ); - if( aFontColor == COL_AUTO ) + if( (aFontColor == COL_AUTO) || IsForceAutoColor() ) aFontColor = GetAutoColor(); // #i69346# check for reverse color of input method attribute -- cgit v1.2.3 From 27ed1825a087bedfb0e1f117a7bfc2a2f405333a Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Wed, 26 May 2010 15:50:21 +0200 Subject: fwk139: #i101937# integrate patch --- comphelper/source/misc/makefile.mk | 1 + comphelper/source/misc/mediadescriptor.cxx | 121 +---------------------------- 2 files changed, 2 insertions(+), 120 deletions(-) diff --git a/comphelper/source/misc/makefile.mk b/comphelper/source/misc/makefile.mk index 94837ce49df9..5ad7e3ed289e 100644 --- a/comphelper/source/misc/makefile.mk +++ b/comphelper/source/misc/makefile.mk @@ -92,6 +92,7 @@ SLOFILES= \ $(SLO)$/comphelper_module.obj \ $(SLO)$/comphelper_services.obj \ $(SLO)$/componentbase.obj \ + $(SLO)$/stillreadwriteinteraction.obj \ # --- Targets ---------------------------------- diff --git a/comphelper/source/misc/mediadescriptor.cxx b/comphelper/source/misc/mediadescriptor.cxx index 7e3be338992b..23daea5543a9 100644 --- a/comphelper/source/misc/mediadescriptor.cxx +++ b/comphelper/source/misc/mediadescriptor.cxx @@ -28,6 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_comphelper.hxx" #include +#include //_______________________________________________ // includes @@ -59,22 +60,10 @@ #include #endif -#ifndef __COM_SUN_STAR_UCB_INTERACTIVEIOEXCEPTION_HPP__ -#include -#endif - -#ifndef __COM_SUN_STAR_UCB_UNSUPPORTEDDATASINKEXCEPTION_HPP__ -#include -#endif - #ifndef __COM_SUN_STAR_UCB_COMMANDFAILEDEXCEPTION_HPP__ #include #endif -#ifndef __COM_SUN_STAR_TASK_XINTERACTIONABORT_HPP__ -#include -#endif - #ifndef __COM_SUN_STAR_URI_XURIREFERENCEFACTORY_HPP__ #include #endif @@ -667,114 +656,6 @@ sal_Bool MediaDescriptor::impl_openStreamWithPostData( const css::uno::Reference } /*-----------------------------------------------*/ -class StillReadWriteInteraction : public ::ucbhelper::InterceptedInteraction -{ - private: - static const sal_Int32 HANDLE_INTERACTIVEIOEXCEPTION = 0; - static const sal_Int32 HANDLE_UNSUPPORTEDDATASINKEXCEPTION = 1; - - sal_Bool m_bUsed; - sal_Bool m_bHandledByMySelf; - sal_Bool m_bHandledByInternalHandler; - - public: - StillReadWriteInteraction(const css::uno::Reference< css::task::XInteractionHandler >& xHandler) - : m_bUsed (sal_False) - , m_bHandledByMySelf (sal_False) - , m_bHandledByInternalHandler(sal_False) - { - ::std::vector< ::ucbhelper::InterceptedInteraction::InterceptedRequest > lInterceptions; - ::ucbhelper::InterceptedInteraction::InterceptedRequest aInterceptedRequest; - - aInterceptedRequest.Handle = HANDLE_INTERACTIVEIOEXCEPTION; - aInterceptedRequest.Request <<= css::ucb::InteractiveIOException(); - aInterceptedRequest.Continuation = ::getCppuType(static_cast< css::uno::Reference< css::task::XInteractionAbort >* >(0)); - aInterceptedRequest.MatchExact = sal_False; - lInterceptions.push_back(aInterceptedRequest); - - aInterceptedRequest.Handle = HANDLE_UNSUPPORTEDDATASINKEXCEPTION; - aInterceptedRequest.Request <<= css::ucb::UnsupportedDataSinkException(); - aInterceptedRequest.Continuation = ::getCppuType(static_cast< css::uno::Reference< css::task::XInteractionAbort >* >(0)); - aInterceptedRequest.MatchExact = sal_False; - lInterceptions.push_back(aInterceptedRequest); - - setInterceptedHandler(xHandler); - setInterceptions(lInterceptions); - } - - void resetInterceptions() - { - setInterceptions(::std::vector< ::ucbhelper::InterceptedInteraction::InterceptedRequest >()); - } - - void resetErrorStates() - { - m_bUsed = sal_False; - m_bHandledByMySelf = sal_False; - m_bHandledByInternalHandler = sal_False; - } - - sal_Bool wasWriteError() - { - return (m_bUsed && m_bHandledByMySelf); - } - - private: - virtual ucbhelper::InterceptedInteraction::EInterceptionState intercepted(const ::ucbhelper::InterceptedInteraction::InterceptedRequest& aRequest, - const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionRequest >& xRequest) - { - // we are used! - m_bUsed = sal_True; - - // check if its a real interception - might some parameters are not the right ones ... - sal_Bool bAbort = sal_False; - switch(aRequest.Handle) - { - case HANDLE_INTERACTIVEIOEXCEPTION: - { - css::ucb::InteractiveIOException exIO; - xRequest->getRequest() >>= exIO; - bAbort = ( - (exIO.Code == css::ucb::IOErrorCode_ACCESS_DENIED ) - || (exIO.Code == css::ucb::IOErrorCode_LOCKING_VIOLATION ) -#ifdef MACOSX - // this is a workaround for MAC, on this platform if the file is locked - // the returned error code looks to be wrong - || (exIO.Code == css::ucb::IOErrorCode_GENERAL ) -#endif - ); - } - break; - - case HANDLE_UNSUPPORTEDDATASINKEXCEPTION: - { - bAbort = sal_True; - } - break; - } - - // handle interaction by ourself - if (bAbort) - { - m_bHandledByMySelf = sal_True; - css::uno::Reference< css::task::XInteractionContinuation > xAbort = ::ucbhelper::InterceptedInteraction::extractContinuation( - xRequest->getContinuations(), - ::getCppuType(static_cast< css::uno::Reference< css::task::XInteractionAbort >* >(0))); - if (!xAbort.is()) - return ::ucbhelper::InterceptedInteraction::E_NO_CONTINUATION_FOUND; - xAbort->select(); - return ::ucbhelper::InterceptedInteraction::E_INTERCEPTED; - } - - // Otherwhise use internal handler. - if (m_xInterceptedHandler.is()) - { - m_bHandledByInternalHandler = sal_True; - m_xInterceptedHandler->handle(xRequest); - } - return ::ucbhelper::InterceptedInteraction::E_INTERCEPTED; - } -}; /*----------------------------------------------- 25.03.2004 12:29 -- cgit v1.2.3 From fe90e521ed48a0b697f94f383340498e550fe6c8 Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Wed, 26 May 2010 15:50:21 +0200 Subject: fwk139: #i101937# integrate patch --- sfx2/source/dialog/filedlghelper.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx index 29d4ac78ccb8..9c2cb46b15f2 100644 --- a/sfx2/source/dialog/filedlghelper.cxx +++ b/sfx2/source/dialog/filedlghelper.cxx @@ -57,6 +57,7 @@ #include #include #include +#include #include #include #include @@ -2673,10 +2674,12 @@ static int impl_isFolder( const OUString& rPath ) { } + ::rtl::Reference <::comphelper::StillReadWriteInteraction> aHandler = new ::comphelper::StillReadWriteInteraction( xHandler ); + try { ::ucbhelper::Content aContent( - rPath, new ::ucbhelper::CommandEnvironment( xHandler, uno::Reference< ucb::XProgressHandler >() ) ); + rPath, new ::ucbhelper::CommandEnvironment( static_cast< task::XInteractionHandler* > ( aHandler.get() ), uno::Reference< ucb::XProgressHandler >() ) ); if ( aContent.isFolder() ) return 1; -- cgit v1.2.3 From d4837c2805f73af95e5234ad4bb2546f9501d910 Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Wed, 26 May 2010 15:54:55 +0200 Subject: fwk139: #i111034# integrate patch --- sw/source/ui/app/apphdl.cxx | 35 +++++++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/sw/source/ui/app/apphdl.cxx b/sw/source/ui/app/apphdl.cxx index 8d8fc095b5be..653208aaf250 100644 --- a/sw/source/ui/app/apphdl.cxx +++ b/sw/source/ui/app/apphdl.cxx @@ -765,16 +765,31 @@ void SwModule::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint ) DELETEZ(pWebToolbarConfig) ; DELETEZ(pAuthorNames) ; DELETEZ(pDBConfig); - pColorConfig->RemoveListener(this); - DELETEZ(pColorConfig); - pAccessibilityOptions->RemoveListener(this); - DELETEZ(pAccessibilityOptions); - pCTLOptions->RemoveListener(this); - DELETEZ(pCTLOptions); - pUserOptions->RemoveListener(this); - DELETEZ(pUserOptions); - pUndoOptions->RemoveListener(this); - DELETEZ(pUndoOptions); + if( pColorConfig ) + { + pColorConfig->RemoveListener(this); + DELETEZ(pColorConfig); + } + if( pAccessibilityOptions ) + { + pAccessibilityOptions->RemoveListener(this); + DELETEZ(pAccessibilityOptions); + } + if( pCTLOptions ) + { + pCTLOptions->RemoveListener(this); + DELETEZ(pCTLOptions); + } + if( pUserOptions ) + { + pUserOptions->RemoveListener(this); + DELETEZ(pUserOptions); + } + if( pUndoOptions ) + { + pUndoOptions->RemoveListener(this); + DELETEZ(pUndoOptions); + } } } } -- cgit v1.2.3 From 8134108d479d5671577a4680c4f912fd8fbdc5e3 Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Wed, 26 May 2010 15:59:27 +0200 Subject: fwk139: #i101937# integrate patch --- .../inc/comphelper/stillreadwriteinteraction.hxx | 69 ++++++++++ .../source/misc/stillreadwriteinteraction.cxx | 144 +++++++++++++++++++++ 2 files changed, 213 insertions(+) create mode 100644 comphelper/inc/comphelper/stillreadwriteinteraction.hxx create mode 100644 comphelper/source/misc/stillreadwriteinteraction.cxx diff --git a/comphelper/inc/comphelper/stillreadwriteinteraction.hxx b/comphelper/inc/comphelper/stillreadwriteinteraction.hxx new file mode 100644 index 000000000000..1ade47220c6f --- /dev/null +++ b/comphelper/inc/comphelper/stillreadwriteinteraction.hxx @@ -0,0 +1,69 @@ +/************************************************************************* +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2010 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* This file is part of OpenOffice.org. +* +* OpenOffice.org is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License version 3 +* only, as published by the Free Software Foundation. +* +* OpenOffice.org is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License version 3 for more details +* (a copy is included in the LICENSE file that accompanied this code). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* +* for a copy of the LGPLv3 License. +* +************************************************************************/ + +#ifndef _COMPHELPER_STILLREADWRITEINTERACTION_HXX_ +#define _COMPHELPER_STRILLREADWRITEINTERACTION_HXX_ + +//_______________________________________________ +// includes +#include + +#ifndef __COM_SUN_STAR_TASK_XINTERACTIONHANDLER_HPP__ +#include +#endif + +#include +#include "comphelper/comphelperdllapi.h" + +//_______________________________________________ +// namespace + +namespace comphelper{ +class COMPHELPER_DLLPUBLIC StillReadWriteInteraction : public ::ucbhelper::InterceptedInteraction +{ +private: + static const sal_Int32 HANDLE_INTERACTIVEIOEXCEPTION = 0; + static const sal_Int32 HANDLE_UNSUPPORTEDDATASINKEXCEPTION = 1; + + sal_Bool m_bUsed; + sal_Bool m_bHandledByMySelf; + sal_Bool m_bHandledByInternalHandler; + +public: + StillReadWriteInteraction(const com::sun::star::uno::Reference< com::sun::star::task::XInteractionHandler >& xHandler); + + void resetInterceptions(); + void resetErrorStates(); + sal_Bool wasWriteError(); + +private: + virtual ucbhelper::InterceptedInteraction::EInterceptionState intercepted(const ::ucbhelper::InterceptedInteraction::InterceptedRequest& aRequest, + const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionRequest >& xRequest); + +}; +} +#endif diff --git a/comphelper/source/misc/stillreadwriteinteraction.cxx b/comphelper/source/misc/stillreadwriteinteraction.cxx new file mode 100644 index 000000000000..9054f0754b5e --- /dev/null +++ b/comphelper/source/misc/stillreadwriteinteraction.cxx @@ -0,0 +1,144 @@ +/************************************************************************* +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2010 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* This file is part of OpenOffice.org. +* +* OpenOffice.org is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License version 3 +* only, as published by the Free Software Foundation. +* +* OpenOffice.org is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License version 3 for more details +* (a copy is included in the LICENSE file that accompanied this code). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* +* for a copy of the LGPLv3 License. +* +************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_comphelper.hxx" +#include + +#ifndef __COM_SUN_STAR_UCB_INTERACTIVEIOEXCEPTION_HPP__ +#include +#endif + +#ifndef __COM_SUN_STAR_TASK_XINTERACTIONABORT_HPP__ +#include +#endif + +#ifndef __COM_SUN_STAR_UCB_UNSUPPORTEDDATASINKEXCEPTION_HPP__ +#include +#endif + +namespace comphelper{ + + namespace css = ::com::sun::star; + +StillReadWriteInteraction::StillReadWriteInteraction(const css::uno::Reference< css::task::XInteractionHandler >& xHandler) + : m_bUsed (sal_False) + , m_bHandledByMySelf (sal_False) + , m_bHandledByInternalHandler(sal_False) +{ + ::std::vector< ::ucbhelper::InterceptedInteraction::InterceptedRequest > lInterceptions; + ::ucbhelper::InterceptedInteraction::InterceptedRequest aInterceptedRequest; + + aInterceptedRequest.Handle = HANDLE_INTERACTIVEIOEXCEPTION; + aInterceptedRequest.Request <<= css::ucb::InteractiveIOException(); + aInterceptedRequest.Continuation = ::getCppuType(static_cast< css::uno::Reference< css::task::XInteractionAbort >* >(0)); + aInterceptedRequest.MatchExact = sal_False; + lInterceptions.push_back(aInterceptedRequest); + + aInterceptedRequest.Handle = HANDLE_UNSUPPORTEDDATASINKEXCEPTION; + aInterceptedRequest.Request <<= css::ucb::UnsupportedDataSinkException(); + aInterceptedRequest.Continuation = ::getCppuType(static_cast< css::uno::Reference< css::task::XInteractionAbort >* >(0)); + aInterceptedRequest.MatchExact = sal_False; + lInterceptions.push_back(aInterceptedRequest); + + setInterceptedHandler(xHandler); + setInterceptions(lInterceptions); +} + +void StillReadWriteInteraction::resetInterceptions() +{ + setInterceptions(::std::vector< ::ucbhelper::InterceptedInteraction::InterceptedRequest >()); +} + +void StillReadWriteInteraction::resetErrorStates() +{ + m_bUsed = sal_False; + m_bHandledByMySelf = sal_False; + m_bHandledByInternalHandler = sal_False; +} + +sal_Bool StillReadWriteInteraction::wasWriteError() +{ + return (m_bUsed && m_bHandledByMySelf); +} + +ucbhelper::InterceptedInteraction::EInterceptionState StillReadWriteInteraction::intercepted(const ::ucbhelper::InterceptedInteraction::InterceptedRequest& aRequest, + const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionRequest >& xRequest) +{ + // we are used! + m_bUsed = sal_True; + + // check if its a real interception - might some parameters are not the right ones ... + sal_Bool bAbort = sal_False; + switch(aRequest.Handle) + { + case HANDLE_INTERACTIVEIOEXCEPTION: + { + css::ucb::InteractiveIOException exIO; + xRequest->getRequest() >>= exIO; + bAbort = ( + (exIO.Code == css::ucb::IOErrorCode_ACCESS_DENIED ) + || (exIO.Code == css::ucb::IOErrorCode_LOCKING_VIOLATION ) + || (exIO.Code == css::ucb::IOErrorCode_NOT_EXISTING ) +#ifdef MACOSX + // this is a workaround for MAC, on this platform if the file is locked + // the returned error code looks to be wrong + || (exIO.Code == css::ucb::IOErrorCode_GENERAL ) +#endif + ); + } + break; + + case HANDLE_UNSUPPORTEDDATASINKEXCEPTION: + { + bAbort = sal_True; + } + break; + } + + // handle interaction by ourself + if (bAbort) + { + m_bHandledByMySelf = sal_True; + css::uno::Reference< css::task::XInteractionContinuation > xAbort = ::ucbhelper::InterceptedInteraction::extractContinuation( + xRequest->getContinuations(), + ::getCppuType(static_cast< css::uno::Reference< css::task::XInteractionAbort >* >(0))); + if (!xAbort.is()) + return ::ucbhelper::InterceptedInteraction::E_NO_CONTINUATION_FOUND; + xAbort->select(); + return ::ucbhelper::InterceptedInteraction::E_INTERCEPTED; + } + + // Otherwhise use internal handler. + if (m_xInterceptedHandler.is()) + { + m_bHandledByInternalHandler = sal_True; + m_xInterceptedHandler->handle(xRequest); + } + return ::ucbhelper::InterceptedInteraction::E_INTERCEPTED; +} +} -- cgit v1.2.3 From ba856bbd9981bf72f5729b1ee36bc71f3a54eb6a Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Wed, 26 May 2010 16:04:10 +0200 Subject: fwk139: #i40233# integrate the patch --- officecfg/registry/data/org/openoffice/Setup.xcu | 27 +++++ officecfg/registry/schema/org/openoffice/Setup.xcs | 6 + sfx2/inc/sfx2/docfac.hxx | 1 + sfx2/source/doc/docfac.cxx | 124 +++++++++++++++++++++ sfx2/source/doc/makefile.mk | 3 +- sfx2/source/doc/syspath.hxx | 44 ++++++++ sfx2/source/doc/syspathw32.cxx | 79 +++++++++++++ 7 files changed, 283 insertions(+), 1 deletion(-) create mode 100644 sfx2/source/doc/syspath.hxx create mode 100644 sfx2/source/doc/syspathw32.cxx diff --git a/officecfg/registry/data/org/openoffice/Setup.xcu b/officecfg/registry/data/org/openoffice/Setup.xcu index 6d7259b00ac2..5bf3d88ecb4d 100755 --- a/officecfg/registry/data/org/openoffice/Setup.xcu +++ b/officecfg/registry/data/org/openoffice/Setup.xcu @@ -86,6 +86,9 @@ + + false + scalc @@ -127,6 +130,9 @@ + + false + sdraw @@ -168,6 +174,9 @@ + + false + simpress @@ -207,6 +216,9 @@ + + false + smath @@ -246,6 +258,9 @@ + + false + sglobal @@ -287,6 +302,9 @@ + + false + swriter @@ -434,6 +452,9 @@ + + false + sweb @@ -686,6 +707,9 @@ + + false + schart @@ -725,6 +749,9 @@ + + false + dbapp diff --git a/officecfg/registry/schema/org/openoffice/Setup.xcs b/officecfg/registry/schema/org/openoffice/Setup.xcs index de8a64e2b0d8..da1ebda07ea0 100644 --- a/officecfg/registry/schema/org/openoffice/Setup.xcs +++ b/officecfg/registry/schema/org/openoffice/Setup.xcs @@ -160,6 +160,12 @@ Specifies the name of the standard template file for the factory. + + + + Indicates if the system default template has been changed. + + diff --git a/sfx2/inc/sfx2/docfac.hxx b/sfx2/inc/sfx2/docfac.hxx index 3cc3eecc7ce7..7468394d2617 100644 --- a/sfx2/inc/sfx2/docfac.hxx +++ b/sfx2/inc/sfx2/docfac.hxx @@ -101,6 +101,7 @@ public: const SfxFilter* GetTemplateFilter() const; static String GetStandardTemplate( const String& rServiceName ); static void SetStandardTemplate( const String& rServiceName, const String& rTemplateName ); + static void SetSystemTemplate( const String& rServiceName, const String& rTemplateName ); void SetDocumentServiceName( const rtl::OUString& rServiceName ); const rtl::OUString& GetDocumentServiceName() const; diff --git a/sfx2/source/doc/docfac.cxx b/sfx2/source/doc/docfac.cxx index 48c01a1ac3fe..88ae54d1c58a 100644 --- a/sfx2/source/doc/docfac.cxx +++ b/sfx2/source/doc/docfac.cxx @@ -30,13 +30,19 @@ #include #include #include +#include +#include +#include +#include #include #include #include #include #include #include +#include #include +#include #include #include @@ -49,9 +55,15 @@ #include #include "sfxresid.hxx" #include +#include "syspath.hxx" +#include +#include #include "doc.hrc" +#include + namespace css = ::com::sun::star; +using namespace ::com::sun::star; //======================================================================== @@ -182,13 +194,125 @@ void SfxObjectFactory::SetModule_Impl( SfxModule *pMod ) pImpl->pModule = pMod; } +void SfxObjectFactory::SetSystemTemplate( const String& rServiceName, const String& rTemplateName ) +{ + static ::rtl::OUString SERVICE_FILTER_FACTORY = ::rtl::OUString::createFromAscii( "com.sun.star.document.FilterFactory" ); + static ::rtl::OUString SERVICE_TYPE_DECTECTION = ::rtl::OUString::createFromAscii( "com.sun.star.document.TypeDetection" ); + static ::rtl::OUString SERVICE_SIMPLE_ACCESS = ::rtl::OUString::createFromAscii( "com.sun.star.ucb.SimpleFileAccess" ); + + static ::rtl::OUString CONF_ROOT = ::rtl::OUString::createFromAscii( "/org.openoffice.Setup"); + static ::rtl::OUString CONF_PATH = ::rtl::OUString::createFromAscii( "Office/Factories/" ) + ::rtl::OUString( rServiceName ); + static ::rtl::OUString PROP_DEF_TEMPL_CHANGED = ::rtl::OUString::createFromAscii( "ooSetupFactorySystemDefaultTemplateChanged" ); + static ::rtl::OUString PROP_ACTUAL_FILTER = ::rtl::OUString::createFromAscii( "ooSetupFactoryActualFilter" ); + + static ::rtl::OUString DEF_TPL_STR = ::rtl::OUString::createFromAscii("/soffice."); + + String sURL; + ::utl::LocalFileHelper::ConvertPhysicalNameToURL( String( SystemPath::GetUserTemplateLocation()), sURL ); + + ::rtl::OUString aUserTemplateURL( sURL ); + if ( aUserTemplateURL.getLength() != 0) + { + try + { + uno::Reference< lang::XMultiServiceFactory > xFactory = ::comphelper::getProcessServiceFactory(); + uno::Reference< uno::XInterface > xConfig = ::comphelper::ConfigurationHelper::openConfig( + xFactory, CONF_ROOT, ::comphelper::ConfigurationHelper::E_STANDARD ); + + ::rtl::OUString aActualFilter; + ::comphelper::ConfigurationHelper::readRelativeKey( xConfig, CONF_PATH, PROP_ACTUAL_FILTER ) >>= aActualFilter; + sal_Bool bChanged; + ::comphelper::ConfigurationHelper::readRelativeKey( xConfig, CONF_PATH, PROP_DEF_TEMPL_CHANGED ) >>= bChanged; + + uno::Reference< container::XNameAccess > xFilterFactory( + xFactory->createInstance( SERVICE_FILTER_FACTORY ), uno::UNO_QUERY_THROW ); + uno::Reference< container::XNameAccess > xTypeDetection( + xFactory->createInstance( SERVICE_TYPE_DECTECTION ), uno::UNO_QUERY_THROW ); + + ::rtl::OUString aActualFilterTypeName; + uno::Sequence< beans::PropertyValue > aActuralFilterData; + xFilterFactory->getByName( aActualFilter ) >>= aActuralFilterData; + for ( sal_Int32 nInd = 0; nInd < aActuralFilterData.getLength(); nInd++ ) + if ( aActuralFilterData[nInd].Name.equalsAscii( "Type" ) ) + aActuralFilterData[nInd].Value >>= aActualFilterTypeName; + ::comphelper::SequenceAsHashMap aProps1( xTypeDetection->getByName( aActualFilterTypeName ) ); + uno::Sequence< ::rtl::OUString > aAllExt = + aProps1.getUnpackedValueOrDefault( ::rtl::OUString::createFromAscii( "Extensions" ), uno::Sequence< ::rtl::OUString >() ); + //To-do: check if aAllExt is empty first + ::rtl::OUString aExt = aAllExt[0]; + + aUserTemplateURL += DEF_TPL_STR; + aUserTemplateURL += aExt; + + uno::Reference< ucb::XSimpleFileAccess > xSimpleFileAccess( + xFactory->createInstance( SERVICE_SIMPLE_ACCESS ), uno::UNO_QUERY_THROW ); + + ::rtl::OUString aBackupURL; + ::osl::Security().getConfigDir(aBackupURL); + aBackupURL += ::rtl::OUString::createFromAscii( "/temp" ); + + if ( !xSimpleFileAccess->exists( aBackupURL ) ) + xSimpleFileAccess->createFolder( aBackupURL ); + + aBackupURL += DEF_TPL_STR; + aBackupURL += aExt; + + if ( rTemplateName.Len() != 0 ) + { + if ( xSimpleFileAccess->exists( aUserTemplateURL ) && !bChanged ) + xSimpleFileAccess->copy( aUserTemplateURL, aBackupURL ); + + uno::Reference< document::XTypeDetection > xTypeDetector( xTypeDetection, uno::UNO_QUERY ); + ::comphelper::SequenceAsHashMap aProps2( xTypeDetection->getByName( xTypeDetector->queryTypeByURL( rTemplateName ) ) ); + ::rtl::OUString aFilterName = + aProps2.getUnpackedValueOrDefault( ::rtl::OUString::createFromAscii("PreferredFilter"), ::rtl::OUString() ); + + uno::Sequence< beans::PropertyValue > aArgs( 3 ); + aArgs[0].Name = ::rtl::OUString::createFromAscii( "FilterName" ); + aArgs[0].Value <<= aFilterName; + aArgs[1].Name = ::rtl::OUString::createFromAscii( "AsTemplate" ); + aArgs[1].Value <<= sal_True; + aArgs[2].Name = ::rtl::OUString::createFromAscii( "URL" ); + aArgs[2].Value <<= ::rtl::OUString( rTemplateName ); + + uno::Reference< frame::XLoadable > xLoadable( xFactory->createInstance( ::rtl::OUString( rServiceName ) ), uno::UNO_QUERY ); + xLoadable->load( aArgs ); + + aArgs.realloc( 2 ); + aArgs[1].Name = ::rtl::OUString::createFromAscii( "Overwrite" ); + aArgs[1].Value <<= sal_True; + + uno::Reference< frame::XStorable > xStorable( xLoadable, uno::UNO_QUERY ); + xStorable->storeToURL( aUserTemplateURL, aArgs ); + ::comphelper::ConfigurationHelper::writeRelativeKey( xConfig, CONF_PATH, PROP_DEF_TEMPL_CHANGED, uno::makeAny( sal_True )); + ::comphelper::ConfigurationHelper::flush( xConfig ); + } + else + { + DBG_ASSERT( bChanged, "invalid ooSetupFactorySystemDefaultTemplateChanged value!" ); + + xSimpleFileAccess->copy( aBackupURL, aUserTemplateURL ); + xSimpleFileAccess->kill( aBackupURL ); + ::comphelper::ConfigurationHelper::writeRelativeKey( xConfig, CONF_PATH, PROP_DEF_TEMPL_CHANGED, uno::makeAny( sal_False )); + ::comphelper::ConfigurationHelper::flush( xConfig ); + } + } + catch( uno::Exception& ) + { + } + } +} + void SfxObjectFactory::SetStandardTemplate( const String& rServiceName, const String& rTemplate ) { SvtModuleOptions::EFactory eFac = SvtModuleOptions::ClassifyFactoryByServiceName(rServiceName); if (eFac == SvtModuleOptions::E_UNKNOWN_FACTORY) eFac = SvtModuleOptions::ClassifyFactoryByShortName(rServiceName); if (eFac != SvtModuleOptions::E_UNKNOWN_FACTORY) + { + SetSystemTemplate( rServiceName, rTemplate ); SvtModuleOptions().SetFactoryStandardTemplate(eFac, rTemplate); + } } String SfxObjectFactory::GetStandardTemplate( const String& rServiceName ) diff --git a/sfx2/source/doc/makefile.mk b/sfx2/source/doc/makefile.mk index b766921e346b..fd812297a8ab 100644 --- a/sfx2/source/doc/makefile.mk +++ b/sfx2/source/doc/makefile.mk @@ -83,7 +83,8 @@ SLOFILES = \ $(SLO)$/sfxmodelfactory.obj \ $(SLO)$/sfxacldetect.obj \ $(SLO)$/docstoragemodifylistener.obj \ - $(SLO)$/querytemplate.obj + $(SLO)$/querytemplate.obj \ + $(SLO)$/syspathw32.obj # $(SLO)$/applet.obj \ diff --git a/sfx2/source/doc/syspath.hxx b/sfx2/source/doc/syspath.hxx new file mode 100644 index 000000000000..a41836775421 --- /dev/null +++ b/sfx2/source/doc/syspath.hxx @@ -0,0 +1,44 @@ +/************************************************************************* +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2008 by Sun Microsystems, Inc. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* $RCSfile: shutdowniconw32.cxx,v $ +* $Revision: 1.48 $ +* +* This file is part of OpenOffice.org. +* +* OpenOffice.org is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License version 3 +* only, as published by the Free Software Foundation. +* +* OpenOffice.org is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License version 3 for more details +* (a copy is included in the LICENSE file that accompanied this code). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* +* for a copy of the LGPLv3 License. +* +************************************************************************/ + +#ifndef __SYSPATH_HXX__ +#define __SYSPATH_HXX__ +//#pragma warning(disable:4917) + +#include +#include + +class SFX2_DLLPUBLIC SystemPath +{ +public: + static ::rtl::OUString GetUserTemplateLocation(); +}; + +#endif \ No newline at end of file diff --git a/sfx2/source/doc/syspathw32.cxx b/sfx2/source/doc/syspathw32.cxx new file mode 100644 index 000000000000..9919df2f65a3 --- /dev/null +++ b/sfx2/source/doc/syspathw32.cxx @@ -0,0 +1,79 @@ +/************************************************************************* +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2008 by Sun Microsystems, Inc. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* $RCSfile: shutdowniconw32.cxx,v $ +* $Revision: 1.48 $ +* +* This file is part of OpenOffice.org. +* +* OpenOffice.org is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License version 3 +* only, as published by the Free Software Foundation. +* +* OpenOffice.org is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License version 3 for more details +* (a copy is included in the LICENSE file that accompanied this code). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* +* for a copy of the LGPLv3 License. +* +************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_sfx2.hxx" + +#include "syspath.hxx" + +using namespace ::rtl; + +#ifdef WNT +#include + +#define ALLOC(type, n) ((type *) HeapAlloc(GetProcessHeap(), 0, sizeof(type) * n )) +#define FREE(p) HeapFree(GetProcessHeap(), 0, p) + +static OUString _SHGetSpecialFolderW32( int nFolderID ) +{ + LPITEMIDLIST pidl; + HRESULT hHdl = SHGetSpecialFolderLocation( NULL, nFolderID, &pidl ); + OUString aFolder; + + if( hHdl == NOERROR ) + { + WCHAR *lpFolderA; + lpFolderA = ALLOC( WCHAR, 16000 ); + + SHGetPathFromIDListW( pidl, lpFolderA ); + aFolder = OUString( reinterpret_cast(lpFolderA) ); + + FREE( lpFolderA ); + IMalloc *pMalloc; + if( NOERROR == SHGetMalloc(&pMalloc) ) + { + pMalloc->Free( pidl ); + pMalloc->Release(); + } + } + return aFolder; +} + +#endif + +OUString SystemPath::GetUserTemplateLocation() +{ +#ifdef WNT + return _SHGetSpecialFolderW32(CSIDL_TEMPLATES); +#endif +#ifdef UNX + return OUString(); +#endif +} -- cgit v1.2.3 From 497ecdcb53b21c41382e4873926d5f41f252e4be Mon Sep 17 00:00:00 2001 From: Thorsten Bosbach Date: Wed, 26 May 2010 16:33:49 +0200 Subject: #i111851 macos X masking --- testautomation/graphics/optional/includes/global/export_graphic.inc | 4 ++++ testautomation/math/required/includes/m_005_.inc | 4 ++++ 2 files changed, 8 insertions(+) mode change 100644 => 100755 testautomation/graphics/optional/includes/global/export_graphic.inc mode change 100644 => 100755 testautomation/math/required/includes/m_005_.inc diff --git a/testautomation/graphics/optional/includes/global/export_graphic.inc b/testautomation/graphics/optional/includes/global/export_graphic.inc old mode 100644 new mode 100755 index d60872022166..7c16129e41ae --- a/testautomation/graphics/optional/includes/global/export_graphic.inc +++ b/testautomation/graphics/optional/includes/global/export_graphic.inc @@ -119,7 +119,11 @@ testcase tEPS sleep 5 hNewDocument() sleep 5 + if ( lcase( gPlatform ) <> "osx" ) then Call hGrafikEinfuegen ( OutputGrafikTBO+sExt ) + else + qaErrorLog "#i100253# crash on MacOS X 10.4" + endif endif call hCloseDocument diff --git a/testautomation/math/required/includes/m_005_.inc b/testautomation/math/required/includes/m_005_.inc old mode 100644 new mode 100755 index 2b567c628b18..bb580b9bd9c3 --- a/testautomation/math/required/includes/m_005_.inc +++ b/testautomation/math/required/includes/m_005_.inc @@ -168,6 +168,7 @@ testcase tToolsExtensionManager dim sTemp2 as string dim x as integer + if ( lcase( gPlatform ) <> "osx" ) then sPath = convertPath(gTestToolPath+"math/required/input/") '/// open application ///' Call hNewDocument @@ -306,4 +307,7 @@ testcase tToolsExtensionManager warnlog "Couldn't call Tools -> Package manager - aborting test" endif Call hCloseDocument + else + qaErrorLog "Do not run on macosx - not reproduceable error" + endif endcase -- cgit v1.2.3 From ab9ef20ecba8d507bfcd76e7cc35a4a84bda1c60 Mon Sep 17 00:00:00 2001 From: Thorsten Bosbach Date: Wed, 26 May 2010 17:03:41 +0200 Subject: #i111851 macos X masking --- .../optional/includes/basic_gridcontrol.inc | 79 ++++----------------- .../framework/optional/input/gridcontrol.odt | Bin 11602 -> 12063 bytes 2 files changed, 15 insertions(+), 64 deletions(-) mode change 100644 => 100755 testautomation/framework/optional/includes/basic_gridcontrol.inc diff --git a/testautomation/framework/optional/includes/basic_gridcontrol.inc b/testautomation/framework/optional/includes/basic_gridcontrol.inc old mode 100644 new mode 100755 index dc96ef30e16c..0056032435ee --- a/testautomation/framework/optional/includes/basic_gridcontrol.inc +++ b/testautomation/framework/optional/includes/basic_gridcontrol.inc @@ -54,72 +54,23 @@ testcase tGridcontrolLoad call sleep 1 printlog "Start the macro, that performs the test" - printlog "Tools->Macros->Run Macro..." - ToolsMacrosRunMacro - Kontext "ScriptSelector" - if ScriptSelector.exists(10) then - x = LibraryTreeList.getItemCount - printlog "Look for library 'gridcontrol'" - for i = 1 to x - sTemp = LibraryTreeList.getItemText(i) - 'printlog "("+i+"/"+x+"): '" + sTemp + "'" - if (instr(sTemp,"gridcontrol")>0 OR instr(sTemp,"GRIDCONTROL")) then - a = i - printlog "Found library ("+i+"/"+x+"): '" + sTemp + "'" - endif + Kontext "GridControlDialogStarter" + ShowGridcontrol.typeKeys "" + Kontext "GridControlDialog" + if GridControlDialog.exists(5) then + for i=1 to gridcontrolcontrol.getcolumncount + for a=1 to gridcontrolcontrol.getrowcount + printlog " " + i + ":"+a+": '" + gridcontrolcontrol.getitemtype (i,a) + "' '" + gridcontrolcontrol.getitemtext (i,a) + "'" + next a next i - if 0 <> a then - printlog "Select the library and unfold it" - LibraryTreeList.select(a) - LibraryTreeList.typeKeys("+") - printlog "Go to 'Standard' and unfold" - LibraryTreeList.typeKeys("") - LibraryTreeList.typeKeys("+") - printlog "Go to 'Module1'" - LibraryTreeList.typeKeys("") - - printlog "Select macro name 'VclTestTool'" - x = ScriptList.getItemCount - for i = 1 to x - sTemp = ScriptList.getItemText(i) - 'printlog "("+i+"/"+x+"): '" + sTemp + "'" - if "VclTestTool" = sTemp then - a = i - printlog "Found macro ("+i+"/"+x+"): '" + sTemp + "'" - endif - next i - if (0 <> a) then - printlog "Select the macro" - ScriptList.select(a) - printlog "Start the macro by pressing the button 'run'" - ScriptSelector.ok - printlog "sleep... at least 60 seconds" - call sleep(60) - printlog "If macro fails for whatever reason, a message comes up" - Kontext - if active.exists() then - warnlog "" + active.getText - active.ok - try - EditCopy - warnlog getclipboard() - catch - endcatch - printlog "close basic ide" - call hCloseDocument() - printlog "close document" - call hCloseDocument() - goto endsub - endif - - else - warnlog sLocation + "Macro not found: 'Main'" - endif - else - warnlog sLocation + "Library not found: 'gridcontrol'" - endif + gridcontrolcontrol.select 5 + gridcontrolcontrol.typeKeys("") + gridcontrolcontrol.typeKeys("") + gridcontrolcontrol.typeKeys("") + gridcontrolcontrol.typeKeys("") + GridControlDialog.close else - warnlog sLocation + "'Run macro dialog' didn't came up" + warnlog "Gridcontrol Dialog did not come up after pressing button" endif printlog "clean up" diff --git a/testautomation/framework/optional/input/gridcontrol.odt b/testautomation/framework/optional/input/gridcontrol.odt index b3e5c6fb40bb..eed0bbaba84c 100755 Binary files a/testautomation/framework/optional/input/gridcontrol.odt and b/testautomation/framework/optional/input/gridcontrol.odt differ -- cgit v1.2.3 From dbabefbcf1457f88d58c205c1da1630671ba9efd Mon Sep 17 00:00:00 2001 From: Ingrid Halama Date: Wed, 26 May 2010 17:39:17 +0200 Subject: chart47: #i86555# prevent deadlock while changing title vie API --- chart2/source/model/main/FormattedString.cxx | 10 ++++++---- chart2/source/model/main/Title.cxx | 17 +++++++++-------- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/chart2/source/model/main/FormattedString.cxx b/chart2/source/model/main/FormattedString.cxx index ae810266df29..9d38fafd3cf7 100644 --- a/chart2/source/model/main/FormattedString.cxx +++ b/chart2/source/model/main/FormattedString.cxx @@ -122,11 +122,13 @@ uno::Reference< util::XCloneable > SAL_CALL FormattedString::createClone() void SAL_CALL FormattedString::setString( const ::rtl::OUString& String ) throw (uno::RuntimeException) { - // /-- - MutexGuard aGuard( GetMutex()); - m_aString = String; + { + MutexGuard aGuard( GetMutex()); + m_aString = String; + } + //don't keep the mutex locked while calling out fireModifyEvent(); - // \-- + } // ____ XModifyBroadcaster ____ diff --git a/chart2/source/model/main/Title.cxx b/chart2/source/model/main/Title.cxx index 0a215c2d4c15..8b3235636964 100644 --- a/chart2/source/model/main/Title.cxx +++ b/chart2/source/model/main/Title.cxx @@ -265,15 +265,16 @@ uno::Sequence< uno::Reference< chart2::XFormattedString > > SAL_CALL Title::getT void SAL_CALL Title::setText( const uno::Sequence< uno::Reference< chart2::XFormattedString > >& Strings ) throw (uno::RuntimeException) { - // /-- - MutexGuard aGuard( GetMutex() ); - ModifyListenerHelper::removeListenerFromAllElements( - ContainerHelper::SequenceToVector( m_aStrings ), m_xModifyEventForwarder ); - m_aStrings = Strings; - ModifyListenerHelper::addListenerToAllElements( - ContainerHelper::SequenceToVector( m_aStrings ), m_xModifyEventForwarder ); + { + MutexGuard aGuard( GetMutex() ); + ModifyListenerHelper::removeListenerFromAllElements( + ContainerHelper::SequenceToVector( m_aStrings ), m_xModifyEventForwarder ); + m_aStrings = Strings; + ModifyListenerHelper::addListenerToAllElements( + ContainerHelper::SequenceToVector( m_aStrings ), m_xModifyEventForwarder ); + } + //don't keep the mutex locked while calling out fireModifyEvent(); - // \-- } // ================================================================================ -- cgit v1.2.3 From c508a49bd3c171a0203f85bb5270b02fd6a920b7 Mon Sep 17 00:00:00 2001 From: Niklas Nebel Date: Wed, 26 May 2010 18:29:31 +0200 Subject: calc54: #i111857# don't always create empty mpTableData for external service in BuildAllDimensionMembers --- sc/source/core/data/dpobject.cxx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx index 44c998fb4ede..5394605969d0 100755 --- a/sc/source/core/data/dpobject.cxx +++ b/sc/source/core/data/dpobject.cxx @@ -623,6 +623,11 @@ void ScDPObject::BuildAllDimensionMembers() if (!pSaveData) return; + // #i111857# don't always create empty mpTableData for external service. + // Ideally, xSource should be used instead of mpTableData. + if (pServDesc) + return; + pSaveData->BuildAllDimensionMembers(GetTableData()); } -- cgit v1.2.3 From c0df6fa7c33026ad716235ba40caf22595d494bf Mon Sep 17 00:00:00 2001 From: Thorsten Bosbach Date: Wed, 26 May 2010 18:55:09 +0200 Subject: #i111822 macos X masking --- .../required/includes/script_organizers.inc | 49 +++++++++++++++------- 1 file changed, 34 insertions(+), 15 deletions(-) diff --git a/testautomation/framework/required/includes/script_organizers.inc b/testautomation/framework/required/includes/script_organizers.inc index feb72680c9c3..6d14b7f77f6e 100755 --- a/testautomation/framework/required/includes/script_organizers.inc +++ b/testautomation/framework/required/includes/script_organizers.inc @@ -32,21 +32,39 @@ '\****************************************************************************** testcase tUpdtScriptCount + dim sDialog as string printlog( "Resource test for macros and scripts / related dialogs" ) const SCRIPTING_DIALOGS = 5 dim aScriptCount( SCRIPTING_DIALOGS ) + ' JavaScript aScriptCount( 1 ) = 10 + ' BeanShell aScriptCount( 2 ) = 14 - aScriptCount( 3 ) = 10 - if ( gOOo ) then - aScriptCount( 4 ) = 585 - aScriptCount( 5 ) = 601 - else - aScriptCount( 4 ) = 586 - aScriptCount( 5 ) = 602 - endif + if ( lcase( gPlatform ) = "osx" ) then + ' Python + aScriptCount( 3 ) = 8 + else + ' Python + aScriptCount( 3 ) = 10 + endif + if ( lcase( gPlatform ) = "osx" ) then + ' Run Macro + aScriptCount( 5 ) = 600 + else + ' Run Macro + aScriptCount( 5 ) = 602 + endif + if ( gOOo ) then + ' Makro Organizer + aScriptCount( 4 ) = 585 + ' Run Macro + aScriptCount( 5 ) = aScriptCount( 5 ) - 1 + else + ' Makro Organizer + aScriptCount( 4 ) = 586 + endif dim iCurrentDialog as integer dim iCurrentScriptCount as integer @@ -57,37 +75,39 @@ testcase tUpdtScriptCount printlog( "" ) select case iCurrentDialog - case 1: printlog( "JavaScript" ) + case 1: sDialog = "JavaScript" ToolsMacrosOrganizeMacrosJavaScript kontext "ScriptOrganizer" iCurrentScriptCount = hExpandAllNodes( ScriptTreeList ) ScriptOrganizer.cancel() - case 2: printlog( "BeanShell" ) + case 2: sDialog = "BeanShell" ToolsMacrosOrganizeMacrosBeanShell kontext "ScriptOrganizer" iCurrentScriptCount = hExpandAllNodes( ScriptTreeList ) ScriptOrganizer.cancel() - case 3: printlog( "Python" ) + case 3: sDialog = "Python" ToolsMacrosOrganizeMacrosPython kontext "ScriptOrganizer" iCurrentScriptCount = hExpandAllNodes( ScriptTreeList ) ScriptOrganizer.cancel() - case 4: printlog( "Makro Organizer" ) + case 4: sDialog = "Makro Organizer" ToolsMacro_uno Kontext "Makro" hExpandAllNodes( MakroAus ) iCurrentScriptCount = hGetScriptCount( MakroAus, MakroListe ) Makro.close() - case 5: printlog( "Run Macro" ) + case 5: sDialog = "Run Macro" ToolsMacrosRunMacro kontext "ScriptSelector" hExpandAllNodes( LibraryTreeList ) iCurrentScriptCount = hGetScriptCount( LibraryTreeList, ScriptList ) ScriptSelector.cancel() end select + + printlog sDialog if ( aScriptCount( iCurrentDialog ) <> iCurrentScriptCount ) then - warnlog( "Incorrect number of scripts for this dialog: " & iCurrentScriptCount ) + warnlog( "Incorrect number of scripts for this dialog: '" + sDialog + "' expected:" + aScriptCount( iCurrentDialog ) + ", but is:" & iCurrentScriptCount ) else printlog( "Number of scripts is ok" ) endif @@ -95,7 +115,6 @@ testcase tUpdtScriptCount next iCurrentDialog hCloseDocument() - endcase -- cgit v1.2.3 From cbba191cf0fff148935f24d111cb124bd5a5328b Mon Sep 17 00:00:00 2001 From: Henning Brinkmann Date: Thu, 27 May 2010 11:57:15 +0200 Subject: hb33issues01: #b6951450# export table spacing --- sw/source/filter/ww8/attributeoutputbase.hxx | 2 ++ sw/source/filter/ww8/docxattributeoutput.cxx | 7 +++++ sw/source/filter/ww8/wrtww8.cxx | 38 ++++++++++++++++++++++++++++ sw/source/filter/ww8/ww8attributeoutput.hxx | 2 ++ 4 files changed, 49 insertions(+) diff --git a/sw/source/filter/ww8/attributeoutputbase.hxx b/sw/source/filter/ww8/attributeoutputbase.hxx index 51a0d9de4374..9a3885e8b5b3 100644 --- a/sw/source/filter/ww8/attributeoutputbase.hxx +++ b/sw/source/filter/ww8/attributeoutputbase.hxx @@ -232,6 +232,8 @@ public: virtual void TableOrientation( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) = 0; + virtual void TableSpacing( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) = 0; + virtual void TableRowEnd( sal_uInt32 nDepth ) = 0; /// Start of the styles table. diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index bb26e670928a..594978e260dc 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -1460,6 +1460,13 @@ void DocxAttributeOutput::TableOrientation( ww8::WW8TableNodeInfoInner::Pointer_ #endif } +void DocxAttributeOutput::TableSpacing( ww8::WW8TableNodeInfoInner::Pointer_t /*pTableTextNodeInfoInner*/ ) +{ +#if OSL_DEBUG_LEVEL > 0 + fprintf( stderr, "TODO: DocxAttributeOutput::TableSpacing( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner )\n" ); +#endif +} + void DocxAttributeOutput::TableRowEnd( sal_uInt32 /*nDepth*/ ) { #if OSL_DEBUG_LEVEL > 0 diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index 6bf7ecbb8cdf..0e06aac836a2 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -58,10 +58,12 @@ #include #include #include +#include #include #include #include #include +#include #include #include #include @@ -1910,6 +1912,7 @@ void WW8AttributeOutput::TableInfoRow( ww8::WW8TableNodeInfoInner::Pointer_t pTa TableBidi( pTableTextNodeInfoInner ); TableVerticalCell( pTableTextNodeInfoInner ); TableOrientation( pTableTextNodeInfoInner ); + TableSpacing( pTableTextNodeInfoInner ); } } } @@ -2091,6 +2094,41 @@ void WW8AttributeOutput::TableOrientation( ww8::WW8TableNodeInfoInner::Pointer_t } } +void WW8AttributeOutput::TableSpacing(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) +{ + const SwTable * pTable = pTableTextNodeInfoInner->getTable(); + const SwTableFmt * pTableFmt = dynamic_cast(pTable->GetRegisteredIn()); + + if (pTableFmt != NULL) + { + const SvxULSpaceItem & rUL = pTableFmt->GetULSpace(); + + if (rUL.GetUpper() > 0) + { + sal_uInt8 nPadding = 2; + sal_uInt8 nPcVert = 0; + sal_uInt8 nPcHorz = 0; + + sal_uInt8 nTPc = (nPadding << 4) | (nPcVert << 2) | nPcHorz; + + m_rWW8Export.InsUInt16(NS_sprm::LN_TPc); + m_rWW8Export.pO->Insert( nTPc, m_rWW8Export.pO->Count() ); + + m_rWW8Export.InsUInt16(NS_sprm::LN_TDyaAbs); + m_rWW8Export.InsUInt16(rUL.GetUpper()); + + m_rWW8Export.InsUInt16(NS_sprm::LN_TDyaFromText); + m_rWW8Export.InsUInt16(rUL.GetUpper()); + } + + if (rUL.GetLower() > 0) + { + m_rWW8Export.InsUInt16(NS_sprm::LN_TDyaFromTextBottom); + m_rWW8Export.InsUInt16(rUL.GetLower()); + } + } +} + void WW8AttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) { const SwTableBox * pTabBox = pTableTextNodeInfoInner->getTableBox(); diff --git a/sw/source/filter/ww8/ww8attributeoutput.hxx b/sw/source/filter/ww8/ww8attributeoutput.hxx index b9d9038b484b..b9d9ba38c246 100644 --- a/sw/source/filter/ww8/ww8attributeoutput.hxx +++ b/sw/source/filter/ww8/ww8attributeoutput.hxx @@ -124,6 +124,8 @@ public: virtual void TableOrientation( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ); + virtual void TableSpacing( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ); + virtual void TableRowEnd( sal_uInt32 nDepth = 1 ); /// Start of the styles table. -- cgit v1.2.3 From 4edbc52ee91b396f667bf2eaaf8ad48ebb3d199d Mon Sep 17 00:00:00 2001 From: Henning Brinkmann Date: Thu, 27 May 2010 11:57:15 +0200 Subject: hb33issues01: #b6951450# export table spacing --- writerfilter/source/doctok/resources.xmi | 402 +++++++++++++++++++++++++++++++ 1 file changed, 402 insertions(+) diff --git a/writerfilter/source/doctok/resources.xmi b/writerfilter/source/doctok/resources.xmi index bc3bd81761a5..cfcd2ac7e67e 100644 --- a/writerfilter/source/doctok/resources.xmi +++ b/writerfilter/source/doctok/resources.xmi @@ -43327,6 +43327,408 @@ + + + + + + + + + + + 0x360D + + + + + + + + rtf:sprmTPc + + + + + + + + table + + + + + + + + + + + + + + + + + + 0 + + + + + + + + 4 + + + + + + + + 0xf0 + + + + + + + + 4 + + + + + + + + rtf:padding + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + 2 + + + + + + + + 0xc + + + + + + + + 2 + + + + + + + + rtf:pcVert + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + 0 + + + + + + + + 0x3 + + + + + + + + 2 + + + + + + + + rtf:pcHorz + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0x940F + + + + + + + + rtf:sprmTDyaAbs + + + + + + + + table + + + + + + + + + + + + + + + 0x9410 + + + + + + + + rtf:sprmTDxaFromText + + + + + + + + table + + + + + + + + + + + + + + + 0x9411 + + + + + + + + rtf:sprmTDyaFromText + + + + + + + + table + + + + + + + + + + + + + + + 0x941E + + + + + + + + rtf:sprmTDxaFromTextRight + + + + + + + + table + + + + + + + + + + + + + + + 0x941F + + + + + + + + rtf:sprmTDyaFromTextBottom + + + + + + + + table + + + + + + + + + + + + + + + 0x3465 + + + + + + + + rtf:sprmTFNoAllowOverlap + + + + + + + + table + + + + + + + -- cgit v1.2.3 From 31319bc6b2191cc95fac058347578e3ad54a95bb Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Thu, 27 May 2010 12:08:21 +0200 Subject: cws tl80: #i111753# fixed Calc spezific spell check problem introduced by fix for #i110341 --- editeng/source/editeng/impedit4.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx index 4f56faae8548..482cd6d71338 100755 --- a/editeng/source/editeng/impedit4.cxx +++ b/editeng/source/editeng/impedit4.cxx @@ -2299,9 +2299,10 @@ void ImpEditEngine::ApplyChangedSentence(EditView& rEditView, aNext = EditPaM( aOldSel.Max().GetNode(), nEndOfSentence ); } rEditView.pImpEditView->SetEditSelection( aNext ); + + FormatAndUpdate(); + aEditDoc.SetModified(TRUE); } - FormatAndUpdate(); - aEditDoc.SetModified(TRUE); #endif } /*-- 08.09.2008 11:33:02--------------------------------------------------- -- cgit v1.2.3 From 003e2a179cad743b26a4c5ca5636b1c783370631 Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Thu, 27 May 2010 12:34:12 +0200 Subject: #i111715# corrected numerical cases for polygon clipper and geometry creator --- svx/source/svdraw/svdocirc.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/svx/source/svdraw/svdocirc.cxx b/svx/source/svdraw/svdocirc.cxx index 12cdeac9ef85..4c600cba821f 100644 --- a/svx/source/svdraw/svdocirc.cxx +++ b/svx/source/svdraw/svdocirc.cxx @@ -239,8 +239,9 @@ basegfx::B2DPolygon SdrCircObj::ImpCalcXPolyCirc(const SdrObjKind eCicrleKind, c else { // mirror start, end for geometry creation since model coordinate system is mirrored in Y - const double fStart(((36000 - nEnd) % 36000) * F_PI18000); - const double fEnd(((36000 - nStart) % 36000) * F_PI18000); + // #i111715# increase numerical correctness by first dividing and not using F_PI1800 + const double fStart((((36000 - nEnd) % 36000) / 18000.0) * F_PI); + const double fEnd((((36000 - nStart) % 36000) / 18000.0) * F_PI); // create circle segment. This is not closed by default aCircPolygon = basegfx::tools::createPolygonFromEllipseSegment( -- cgit v1.2.3 From f02b283bb7a6264f33cbfc106ff8f93a19ad4d6f Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Thu, 27 May 2010 12:34:12 +0200 Subject: #i111715# corrected numerical cases for polygon clipper and geometry creator --- basegfx/source/polygon/b2dpolygoncutandtouch.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/basegfx/source/polygon/b2dpolygoncutandtouch.cxx b/basegfx/source/polygon/b2dpolygoncutandtouch.cxx index 11955ceb22f9..e03aadfe1577 100644 --- a/basegfx/source/polygon/b2dpolygoncutandtouch.cxx +++ b/basegfx/source/polygon/b2dpolygoncutandtouch.cxx @@ -364,7 +364,8 @@ namespace basegfx if(fTools::moreOrEqual(fCutB, fZero) && fTools::less(fCutB, fOne)) { // cut is in both ranges. Add points for A and B - if(fTools::equalZero(fCutA)) + // #i111715# use fTools::equal instead of fTools::equalZero for better accuracy + if(fTools::equal(fCutA, fZero)) { // ignore for start point in first edge; this is handled // by outer methods and would just produce a double point @@ -379,7 +380,8 @@ namespace basegfx rTempPointsA.push_back(temporaryPoint(aCutPoint, a, fCutA)); } - if(fTools::equalZero(fCutB)) + // #i111715# use fTools::equal instead of fTools::equalZero for better accuracy + if(fTools::equal(fCutB, fZero)) { // ignore for start point in first edge; this is handled // by outer methods and would just produce a double point -- cgit v1.2.3 From 625015106bca562b0120cdf6aedf96cb4cf60b59 Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Thu, 27 May 2010 13:38:41 +0200 Subject: #i111846# added drawing BackgroundFill for hatch when not AAed --- drawinglayer/source/processor2d/vclpixelprocessor2d.cxx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx index a1b1393a2fac..228e34030401 100644 --- a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx @@ -469,19 +469,29 @@ namespace drawinglayer // This is wrong in principle, but looks nicer. This could also be done here directly // without VCL usage if needed const primitive2d::FillHatchPrimitive2D& rFillHatchPrimitive = static_cast< const primitive2d::FillHatchPrimitive2D& >(rCandidate); + const attribute::FillHatchAttribute& rFillHatchAttributes = rFillHatchPrimitive.getFillHatch(); // create hatch polygon in range size and discrete coordinates basegfx::B2DRange aHatchRange(rFillHatchPrimitive.getObjectRange()); aHatchRange.transform(maCurrentTransformation); const basegfx::B2DPolygon aHatchPolygon(basegfx::tools::createPolygonFromRect(aHatchRange)); + if(rFillHatchAttributes.isFillBackground()) + { + // #i111846# background fill is active; draw fill polygon + const basegfx::BColor aPolygonColor(maBColorModifierStack.getModifiedColor(rFillHatchPrimitive.getBColor())); + + mpOutputDevice->SetFillColor(Color(aPolygonColor)); + mpOutputDevice->SetLineColor(); + mpOutputDevice->DrawPolygon(aHatchPolygon); + } + // set hatch line color const basegfx::BColor aHatchColor(maBColorModifierStack.getModifiedColor(rFillHatchPrimitive.getBColor())); mpOutputDevice->SetFillColor(); mpOutputDevice->SetLineColor(Color(aHatchColor)); // get hatch style - const attribute::FillHatchAttribute& rFillHatchAttributes = rFillHatchPrimitive.getFillHatch(); HatchStyle eHatchStyle(HATCH_SINGLE); switch(rFillHatchAttributes.getStyle()) -- cgit v1.2.3 From 03772c9d2d0261426fe455fcd191677579131d0c Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Thu, 27 May 2010 14:50:17 +0200 Subject: l10ntooling18: fixed some windows build issues --- l10ntools/source/localize.cxx | 2 +- l10ntools/source/merge.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/l10ntools/source/localize.cxx b/l10ntools/source/localize.cxx index 9379590d089c..ec34650060ea 100644 --- a/l10ntools/source/localize.cxx +++ b/l10ntools/source/localize.cxx @@ -965,7 +965,7 @@ int _cdecl main( int argc, char *argv[] ) { ByteString sFileNameWithExt( sFileName ); sFileNameWithExt += ByteString( "." ); - sFileNameWithExt += ByteString( (*iter).c_str() , (*iter).length() ); + sFileNameWithExt += ByteString( (*iter).c_str() ); aIter.Extract( sFileNameWithExt ); } if( bQuiet2 ){ printf("\n%d files found!\n",aIter.GetFileCnt());} diff --git a/l10ntools/source/merge.cxx b/l10ntools/source/merge.cxx index ace119da106c..b98bc53a6adb 100644 --- a/l10ntools/source/merge.cxx +++ b/l10ntools/source/merge.cxx @@ -55,7 +55,7 @@ BOOL PFormEntrys::GetTransex3Text( ByteString &rReturn, { BOOL rc = GetText( rReturn , nTyp , nLangIndex , bDel ); ByteString test( rReturn ); - for( int idx = 0; idx < rReturn.Len(); idx++ ) + for( USHORT idx = 0; idx < rReturn.Len(); idx++ ) { if( rReturn.GetChar( idx ) == '\"' && ( idx-1 > 0 ) && rReturn.GetChar( idx-1 ) == '\\' ) { -- cgit v1.2.3 From a76e94f5f77b03807a01635d9d95eb0fb31fc934 Mon Sep 17 00:00:00 2001 From: Ingo Schmidt Date: Thu, 27 May 2010 14:50:25 +0200 Subject: native305 #i92977# new Windows INSTALLLOCATION settings --- .../windows/msi_templates/Property.idt | 2 +- instsetoo_native/util/openoffice.lst | 3 -- solenv/bin/modules/installer/globals.pm | 2 + solenv/bin/modules/installer/windows/directory.pm | 45 ++++++++++++++++------ solenv/bin/modules/installer/windows/idtglobal.pm | 3 +- solenv/bin/modules/installer/windows/registry.pm | 2 + 6 files changed, 41 insertions(+), 16 deletions(-) diff --git a/instsetoo_native/inc_openoffice/windows/msi_templates/Property.idt b/instsetoo_native/inc_openoffice/windows/msi_templates/Property.idt index 6009edf00041..edc952694014 100644 --- a/instsetoo_native/inc_openoffice/windows/msi_templates/Property.idt +++ b/instsetoo_native/inc_openoffice/windows/msi_templates/Property.idt @@ -44,7 +44,7 @@ Quickstarterlinkname QUICKSTARTERLINKNAMETEMPLATE RebootYesNo Yes ReinstallModeText omus REMOVEOLDPRODUCTS 1 -SecureCustomProperties NEWPRODUCTS;SAMEPRODUCTS;OLDPRODUCTS;OLDPRODUCTSSAMEMAJOR;OLDPRODUCTS2;BETAPRODUCTS;STUBPRODUCTS;O2LPENUS;O2LPPT;O2LPRU;O2LPEL;O2LPNL;O2LPFR;O2LPES;O2LPFI;O2LPHU;O2LPCA;O2LPIT;O2LPCS;O2LPSK;O2LPENGB;O2LPDA;O2LPSV;O2LPNO;O2LPPL;O2LPDE;O2LPPTBR;O2LPTH;O2LPET;O2LPJA;O2LPKO;O2LPZHCN;O2LPZHTW;O2LPTR;O2LPHI;O2LPAR;O2LPHE +SecureCustomProperties NEWPRODUCTS;SAMEPRODUCTS;OLDPRODUCTS;OLDPRODUCTSSAMEMAJOR;OLDPRODUCTS2;BETAPRODUCTS;STUBPRODUCTS;O2LPAF;O2LPAR;O2LPASIN;O2LPBEBY;O2LPBO;O2LPBG;O2LPBR;O2LPBRX;O2LPBN;O2LPBNBD;O2LPBNIN;O2LPBS;O2LPBY;O2LPCA;O2LPCS;O2LPCY;O2LPDA;O2LPDE;O2LPDGO;O2LPDZ;O2LPEL;O2LPENGB;O2LPENUS;O2LPENZA;O2LPEO;O2LPES;O2LPET;O2LPEU;O2LPFA;O2LPFI;O2LPFR;O2LPGA;O2LPGD;O2LPGL;O2LPGU;O2LPGUIN;O2LPHE;O2LPHI;O2LPHIIN;O2LPHR;O2LPHU;O2LPIS;O2LPIT;O2LPJA;O2LPKID;O2LPKY;O2LPKA;O2LPKK;O2LPKM;O2LPKN;O2LPKO;O2LPKOK;O2LPKS;O2LPKU;O2LPLO;O2LPLT;O2LPLV;O2LPMAI;O2LPMK;O2LPMN;O2LPMNI;O2LPMS;O2LPMLIN;O2LPMRIN;O2LPMY;O2LPNE;O2LPNB;O2LPNL;O2LPNN;O2LPNO;O2LPNR;O2LPNS;O2LPOM;O2LPOC;O2LPORIN;O2LPPAP;O2LPPAIN;O2LPPL;O2LPPS;O2LPPT;O2LPPTBR;O2LPRU;O2LPRW;O2LPSAT;O2LPSAIN;O2LPSI;O2LPSC;O2LPSD;O2LPSK;O2LPSL;O2LPSH;O2LPSR;O2LPSS;O2LPST;O2LPSV;O2LPSW;O2LPSWTZ;O2LPTEIN;O2LPTIER;O2LPTAIN;O2LPTH;O2LPTN;O2LPTR;O2LPTS;O2LPTG;O2LPUG;O2LPURIN;O2LPUK;O2LPUZ;O2LPVE;O2LPVI;O2LPXH;O2LPZHCN;O2LPZHTW;O2LPZU SetupType Typical SELECT_WORD 0 SELECT_EXCEL 0 diff --git a/instsetoo_native/util/openoffice.lst b/instsetoo_native/util/openoffice.lst index 4715beabcc27..c7ce93820104 100644 --- a/instsetoo_native/util/openoffice.lst +++ b/instsetoo_native/util/openoffice.lst @@ -92,7 +92,6 @@ OpenOffice DOWNLOADBANNER ooobanner.bmp DOWNLOADBITMAP ooobitmap.bmp DOWNLOADSETUPICO ooosetup.ico - WINDOWSBITMAPDIRECTORY ..\inc_broffice\windows\msi_templates\Binary RELATIVE_PATHES_IN_DDF 1 STARTCENTER_ADDFEATURE_URL http://tools.services.openoffice.org/forward/OpenOffice.org/extensions.jsp?cid=920794 STARTCENTER_INFO_URL http://tools.services.openoffice.org/forward/OpenOffice.org/homepage.jsp @@ -158,7 +157,6 @@ OpenOffice_wJRE DOWNLOADBANNER ooobanner.bmp DOWNLOADBITMAP ooobitmap.bmp DOWNLOADSETUPICO ooosetup.ico - WINDOWSBITMAPDIRECTORY ..\inc_broffice\windows\msi_templates\Binary RELATIVE_PATHES_IN_DDF 1 STARTCENTER_ADDFEATURE_URL http://tools.services.openoffice.org/forward/OpenOffice.org/extensions.jsp?cid=920794 STARTCENTER_INFO_URL http://tools.services.openoffice.org/forward/OpenOffice.org/homepage.jsp @@ -230,7 +228,6 @@ OpenOffice_Dev DOWNLOADBANNER ooobanner.bmp DOWNLOADBITMAP ooobitmap.bmp DOWNLOADSETUPICO ooosetup.ico - WINDOWSBITMAPDIRECTORY ..\inc_broffice\windows\msi_templates\Binary LOCALUSERDIR $ORIGIN/.. RELATIVE_PATHES_IN_DDF 1 STARTCENTER_ADDFEATURE_URL http://tools.services.openoffice.org/forward/OpenOffice.org/extensions.jsp?cid=920794 diff --git a/solenv/bin/modules/installer/globals.pm b/solenv/bin/modules/installer/globals.pm index 1b71bd33ecd2..788fca64f130 100644 --- a/solenv/bin/modules/installer/globals.pm +++ b/solenv/bin/modules/installer/globals.pm @@ -380,6 +380,8 @@ BEGIN $installlocationdirectory = ""; $installlocationdirectoryset = 0; + $vendordirectory = ""; + $vendordirectoryset = 0; $officeinstalldirectory = ""; $officeinstalldirectoryset = 0; $basisinstalldirectory = ""; diff --git a/solenv/bin/modules/installer/windows/directory.pm b/solenv/bin/modules/installer/windows/directory.pm index 6dde28120a44..ba6f9a3b75bd 100644 --- a/solenv/bin/modules/installer/windows/directory.pm +++ b/solenv/bin/modules/installer/windows/directory.pm @@ -138,9 +138,36 @@ sub create_unique_directorynames $installer::globals::installlocationdirectoryset = 1; if ( $installer::globals::installlocationdirectory =~ /oracle_/i ) { $installer::globals::sundirexists = 1; } } + + # setting the sundirectory + if ( $styles =~ /\bSUNDIRECTORY\b/ ) + { + if ( $installer::globals::vendordirectoryset ) { installer::exiter::exit_program("ERROR: Directory with flag SUNDIRECTORY alread set: \"$installer::globals::vendordirectory\".", "create_unique_directorynames"); } + $installer::globals::vendordirectory = $uniquename; + $installer::globals::vendordirectoryset = 1; + } } } +##################################################### +# Adding ":." to selected default directory names +##################################################### + +sub check_sourcedir_addon +{ + my ( $onedir, $allvariableshashref ) = @_; + + if (($installer::globals::addchildprojects) || + ($installer::globals::patch) || + ($installer::globals::languagepack) || + ($allvariableshashref->{'CHANGETARGETDIR'})) + { + my $sourcediraddon = "\:\."; + $onedir->{'defaultdir'} = $onedir->{'defaultdir'} . $sourcediraddon; + } + +} + ##################################################### # The directory with the style ISINSTALLLOCATION # will be replaced by INSTALLLOCATION @@ -148,7 +175,7 @@ sub create_unique_directorynames sub set_installlocation_directory { - my ( $directoryref ) = @_; + my ( $directoryref, $allvariableshashref ) = @_; if ( ! $installer::globals::installlocationdirectoryset ) { installer::exiter::exit_program("ERROR: Directory with flag ISINSTALLLOCATION not set!", "set_installlocation_directory"); } @@ -159,16 +186,12 @@ sub set_installlocation_directory if ( $onedir->{'uniquename'} eq $installer::globals::installlocationdirectory ) { $onedir->{'uniquename'} = "INSTALLLOCATION"; + check_sourcedir_addon($onedir, $allvariableshashref); + } - if (($installer::globals::addchildprojects) || - ($installer::globals::patch) || - ($installer::globals::languagepack) || - ($allvariableshashref->{'CHANGETARGETDIR'})) - { - - my $sourcediraddon = "\:\."; - $onedir->{'defaultdir'} = $onedir->{'defaultdir'} . $sourcediraddon; - } + if ( $onedir->{'uniquename'} eq $installer::globals::vendordirectory ) + { + check_sourcedir_addon($onedir, $allvariableshashref); } if ( $onedir->{'uniqueparentname'} eq $installer::globals::installlocationdirectory ) @@ -415,7 +438,7 @@ sub create_directory_table if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "directoriesforidt_local_1.log", $directoryref); } create_defaultdir_directorynames($directoryref, $shortdirnamehashref); # only destdir! if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "directoriesforidt_local_2.log", $directoryref); } - set_installlocation_directory($directoryref); + set_installlocation_directory($directoryref, $allvariableshashref); if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "directoriesforidt_local_3.log", $directoryref); } installer::windows::idtglobal::write_idt_header(\@directorytable, "directory"); add_root_directories(\@directorytable, $allvariableshashref); diff --git a/solenv/bin/modules/installer/windows/idtglobal.pm b/solenv/bin/modules/installer/windows/idtglobal.pm index dd8151485afc..64dc2f34a12a 100644 --- a/solenv/bin/modules/installer/windows/idtglobal.pm +++ b/solenv/bin/modules/installer/windows/idtglobal.pm @@ -1596,7 +1596,8 @@ sub include_subdirname_into_directory_table { my $newuniquename = "sub" . $subdir; $newdir = $newuniquename; - my $newparent = $parent; + # my $newparent = $parent; + my $newparent = "INSTALLLOCATION"; my $newname = $name . "\:" . $subdir; my $newline = $line = "$newuniquename\t$newparent\t$newname\n"; diff --git a/solenv/bin/modules/installer/windows/registry.pm b/solenv/bin/modules/installer/windows/registry.pm index 33583ce711a2..cf87ba174dd0 100644 --- a/solenv/bin/modules/installer/windows/registry.pm +++ b/solenv/bin/modules/installer/windows/registry.pm @@ -203,6 +203,7 @@ sub get_registry_value if ( $registry->{'Value'} ) { $value = $registry->{'Value'}; } $value =~ s/\\\"/\"/g; # no more masquerading of '"' + $value =~ s/\\\\\s*$/\\/g; # making "\\" at end of value to "\" $value =~ s/\/\[INSTALLLOCATION\]/; $value =~ s/\[INSTALLLOCATION\]\\/\[INSTALLLOCATION\]/; # removing "\" after "[INSTALLLOCATION]" @@ -224,6 +225,7 @@ sub get_registry_val64 if ( $registry->{'Val64'} ) { $value = $registry->{'Val64'}; } $value =~ s/\\\"/\"/g; # no more masquerading of '"' + $value =~ s/\\\\\s*$/\\/g; # making "\\" at end of value to "\" $value =~ s/\/\[INSTALLLOCATION\]/; $value =~ s/\[INSTALLLOCATION\]\\/\[INSTALLLOCATION\]/; # removing "\" after "[INSTALLLOCATION]" -- cgit v1.2.3 From da1dd3a4f1f4fff933b47179cbe615958a0cdb07 Mon Sep 17 00:00:00 2001 From: Thorsten Bosbach Date: Thu, 27 May 2010 17:23:30 +0200 Subject: #i111881 new testtool script fixes --- testautomation/writer/optional/includes/regexp/search.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/testautomation/writer/optional/includes/regexp/search.inc b/testautomation/writer/optional/includes/regexp/search.inc index ce3d946fe3b9..352ce5a2e35e 100755 --- a/testautomation/writer/optional/includes/regexp/search.inc +++ b/testautomation/writer/optional/includes/regexp/search.inc @@ -79,13 +79,13 @@ testcase tCheckDialog if SearchAll.IsEnabled then Warnlog "Without Search-for-entry Find-All is active!" if SearchNow.IsEnabled then Warnlog "Without Search-for-entry Find is active!" if ReplaceAll.IsEnabled then Warnlog "Without Search-for-entry Replace-All is active!" - if Replace.IsEnabled then Warnlog "Without Search-for-entry Replace is active!" + if ReplaceBtn.IsEnabled then Warnlog "Without Search-for-entry Replace is active!" if NoFormat.IsEnabled then Warnlog "Without selecting Formats , No-Format is active!" SearchFor.SetText "Hallo" if NOT SearchAll.IsEnabled then Warnlog "Containing Search-for-entry Find-All is inactive!" if NOT SearchNow.IsEnabled then Warnlog "Containing Search-for-entry Find inactive!" if NOT ReplaceAll.IsEnabled then Warnlog "Containing Search-for-entry Replace-All is inactive!" - if NOT Replace.IsEnabled then Warnlog "Containing Search-for-entry Replace is inactive!" + if NOT ReplaceBtn.IsEnabled then Warnlog "Containing Search-for-entry Replace is inactive!" Sleep 5 printlog "- Dependencies of Format-Properties" -- cgit v1.2.3 From f4fcb73d73ae90be1464cbdf2af879574659c3d9 Mon Sep 17 00:00:00 2001 From: Ingrid Halama Date: Thu, 27 May 2010 18:32:16 +0200 Subject: chart47: #i79087# prevent deadlock while changing scale vie API --- chart2/source/model/main/Axis.cxx | 101 +++++++++++++++++++++++++------------- 1 file changed, 66 insertions(+), 35 deletions(-) diff --git a/chart2/source/model/main/Axis.cxx b/chart2/source/model/main/Axis.cxx index cab49e8d0149..fd1d78ebe071 100644 --- a/chart2/source/model/main/Axis.cxx +++ b/chart2/source/model/main/Axis.cxx @@ -299,6 +299,7 @@ Axis::Axis( Reference< uno::XComponentContext > const & /* xContext */ ) : m_aSubGridProperties(), m_xTitle() { + osl_incrementInterlockedCount(&m_refCount); setFastPropertyValue_NoBroadcast( ::chart::LineProperties::PROP_LINE_COLOR, uno::makeAny( static_cast< sal_Int32 >( 0xb3b3b3 ) ) ); // gray30 @@ -308,6 +309,7 @@ Axis::Axis( Reference< uno::XComponentContext > const & /* xContext */ ) : ModifyListenerHelper::addListener( m_aScaleData.Categories, m_xModifyEventForwarder ); AllocateSubGrids(); + osl_decrementInterlockedCount(&m_refCount); } Axis::Axis( const Axis & rOther ) : @@ -365,28 +367,44 @@ Axis::~Axis() void Axis::AllocateSubGrids() { - sal_Int32 nNewSubIncCount = m_aScaleData.IncrementData.SubIncrements.getLength(); - sal_Int32 nOldSubIncCount = m_aSubGridProperties.getLength(); - - if( nOldSubIncCount > nNewSubIncCount ) - { - // remove superfluous entries - for( sal_Int32 i = nNewSubIncCount; i < nOldSubIncCount; ++i ) - ModifyListenerHelper::removeListener( m_aSubGridProperties[ i ], m_xModifyEventForwarder ); - m_aSubGridProperties.realloc( nNewSubIncCount ); - } - else if( nOldSubIncCount < nNewSubIncCount ) + Reference< util::XModifyListener > xModifyEventForwarder; + Reference< lang::XEventListener > xEventListener; + std::vector< Reference< beans::XPropertySet > > aOldBroadcasters; + std::vector< Reference< beans::XPropertySet > > aNewBroadcasters; { - m_aSubGridProperties.realloc( nNewSubIncCount ); + MutexGuard aGuard( m_aMutex ); + xModifyEventForwarder = m_xModifyEventForwarder; + xEventListener = this; + + sal_Int32 nNewSubIncCount = m_aScaleData.IncrementData.SubIncrements.getLength(); + sal_Int32 nOldSubIncCount = m_aSubGridProperties.getLength(); - // allocate new entries - for( sal_Int32 i = nOldSubIncCount; i < nNewSubIncCount; ++i ) + if( nOldSubIncCount > nNewSubIncCount ) { - m_aSubGridProperties[ i ] = new GridProperties(); - LineProperties::SetLineInvisible( m_aSubGridProperties[ i ] ); - ModifyListenerHelper::addListener( m_aSubGridProperties[ i ], m_xModifyEventForwarder ); + // remove superfluous entries + for( sal_Int32 i = nNewSubIncCount; i < nOldSubIncCount; ++i ) + aOldBroadcasters.push_back( m_aSubGridProperties[ i ] ); + m_aSubGridProperties.realloc( nNewSubIncCount ); + } + else if( nOldSubIncCount < nNewSubIncCount ) + { + m_aSubGridProperties.realloc( nNewSubIncCount ); + + // allocate new entries + for( sal_Int32 i = nOldSubIncCount; i < nNewSubIncCount; ++i ) + { + m_aSubGridProperties[ i ] = new GridProperties(); + LineProperties::SetLineInvisible( m_aSubGridProperties[ i ] ); + aNewBroadcasters.push_back( m_aSubGridProperties[ i ] ); + } } } + //don't keep the mutex locked while calling out + std::vector< Reference< beans::XPropertySet > >::iterator aBroadcaster = aOldBroadcasters.begin(); + for( ;aBroadcaster != aOldBroadcasters.end(); ++aBroadcaster ) + ModifyListenerHelper::removeListener( *aBroadcaster, xModifyEventForwarder ); + for( aBroadcaster = aNewBroadcasters.begin(); aBroadcaster != aNewBroadcasters.end(); ++aBroadcaster ) + ModifyListenerHelper::addListener( *aBroadcaster, xModifyEventForwarder ); } // -------------------------------------------------------------------------------- @@ -395,20 +413,29 @@ void Axis::AllocateSubGrids() void SAL_CALL Axis::setScaleData( const chart2::ScaleData& rScaleData ) throw (uno::RuntimeException) { + Reference< util::XModifyListener > xModifyEventForwarder; + Reference< lang::XEventListener > xEventListener; + Reference< chart2::data::XLabeledDataSequence > xOldCategories; + Reference< chart2::data::XLabeledDataSequence > xNewCategories = rScaleData.Categories; { - // /-- MutexGuard aGuard( m_aMutex ); - if( m_aScaleData.Categories.is()) - { - ModifyListenerHelper::removeListener( m_aScaleData.Categories, m_xModifyEventForwarder ); - EventListenerHelper::removeListener( m_aScaleData.Categories, this ); - } + xModifyEventForwarder = m_xModifyEventForwarder; + xEventListener = this; + xOldCategories = m_aScaleData.Categories; m_aScaleData = rScaleData; - ModifyListenerHelper::addListener( m_aScaleData.Categories, m_xModifyEventForwarder ); - EventListenerHelper::addListener( m_aScaleData.Categories, this ); + } + AllocateSubGrids(); - AllocateSubGrids(); - // \-- + //don't keep the mutex locked while calling out + if( xOldCategories.is() && xOldCategories != xNewCategories ) + { + ModifyListenerHelper::removeListener( xOldCategories, xModifyEventForwarder ); + EventListenerHelper::removeListener( xOldCategories, xEventListener ); + } + if( xNewCategories.is() && xOldCategories != xNewCategories ) + { + ModifyListenerHelper::addListener( xNewCategories, m_xModifyEventForwarder ); + EventListenerHelper::addListener( xNewCategories, xEventListener ); } fireModifyEvent(); } @@ -457,19 +484,23 @@ Reference< chart2::XTitle > SAL_CALL Axis::getTitleObject() // \-- } -void SAL_CALL Axis::setTitleObject( const Reference< chart2::XTitle >& Title ) +void SAL_CALL Axis::setTitleObject( const Reference< chart2::XTitle >& xNewTitle ) throw (uno::RuntimeException) { + Reference< util::XModifyListener > xModifyEventForwarder; + Reference< chart2::XTitle > xOldTitle; { - // /-- MutexGuard aGuard( GetMutex() ); - if( m_xTitle.is()) - ModifyListenerHelper::removeListener( m_xTitle, m_xModifyEventForwarder ); - m_xTitle = Title; - if( m_xTitle.is()) - ModifyListenerHelper::addListener( m_xTitle, m_xModifyEventForwarder ); - // \-- + xOldTitle = m_xTitle; + xModifyEventForwarder = m_xModifyEventForwarder; + m_xTitle = xNewTitle; } + + //don't keep the mutex locked while calling out + if( xOldTitle.is() && xOldTitle != xNewTitle ) + ModifyListenerHelper::removeListener( xOldTitle, xModifyEventForwarder ); + if( xNewTitle.is() && xOldTitle != xNewTitle ) + ModifyListenerHelper::addListener( xNewTitle, xModifyEventForwarder ); fireModifyEvent(); } -- cgit v1.2.3 From 39e61a783672e41ac76ba6141978c6ba98248add Mon Sep 17 00:00:00 2001 From: Thorsten Bosbach Date: Thu, 27 May 2010 19:11:42 +0200 Subject: #i111883 crash on .uncheck --- testautomation/writer/tools/includes/w_tools.inc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) mode change 100644 => 100755 testautomation/writer/tools/includes/w_tools.inc diff --git a/testautomation/writer/tools/includes/w_tools.inc b/testautomation/writer/tools/includes/w_tools.inc old mode 100644 new mode 100755 index 8fa05c23bbc9..122a44f7da53 --- a/testautomation/writer/tools/includes/w_tools.inc +++ b/testautomation/writer/tools/includes/w_tools.inc @@ -1052,7 +1052,10 @@ sub wOptionsUndo ( sOption$ ) Call hToolsOptions("WRITER","Autocaption") for i = 1 to ObjectList.GetItemCount ObjectList.Select i - ObjectList.UnCheck + ' uncheck only if checked, else it might crash on macosx, see issue 111883 for further information + if ObjectList.getState (i) > 1 then + ObjectList.UnCheck + endif next i end if -- cgit v1.2.3 From 3496d8389e25cd75f98d4a5359d1405b323f2325 Mon Sep 17 00:00:00 2001 From: Ingo Schmidt Date: Fri, 28 May 2010 12:31:50 +0200 Subject: native305 #i92977# new Windows INSTALLLOCATION settings --- solenv/bin/modules/installer/windows/admin.pm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/solenv/bin/modules/installer/windows/admin.pm b/solenv/bin/modules/installer/windows/admin.pm index d22a1299e9c9..3564770e76ba 100644 --- a/solenv/bin/modules/installer/windows/admin.pm +++ b/solenv/bin/modules/installer/windows/admin.pm @@ -419,6 +419,12 @@ sub create_directory_structure foreach $dir (@startparents) { create_directory_tree($dir, \%fullpathhash, $targetdir, $dirhash); } + # Also adding the pathes of the startparents + foreach $dir (@startparents) + { + if ( ! exists($fullpathhash{$dir}) ) { $fullpathhash{$dir} = $targetdir; } + } + return \%fullpathhash; } -- cgit v1.2.3 From d6616fb95ac01bd8767935ac7a5adcb489666936 Mon Sep 17 00:00:00 2001 From: Ingrid Halama Date: Fri, 28 May 2010 13:05:15 +0200 Subject: chart47: #i79087# prevent deadlock + reduce vector to single diagram --- chart2/source/model/main/ChartModel.cxx | 69 +++++++++++----------- chart2/source/model/main/ChartModel.hxx | 11 +--- .../source/model/main/ChartModel_Persistence.cxx | 4 +- 3 files changed, 36 insertions(+), 48 deletions(-) diff --git a/chart2/source/model/main/ChartModel.cxx b/chart2/source/model/main/ChartModel.cxx index 8cbd4c525c8d..94550e1d40b2 100644 --- a/chart2/source/model/main/ChartModel.cxx +++ b/chart2/source/model/main/ChartModel.cxx @@ -150,15 +150,28 @@ ChartModel::ChartModel( const ChartModel & rOther ) OSL_TRACE( "ChartModel: Copy-CTOR called" ); osl_incrementInterlockedCount(&m_refCount); - m_xChartTypeManager.set( CreateRefClone< Reference< chart2::XChartTypeManager > >()( rOther.m_xChartTypeManager )); - m_xTitle.set( CreateRefClone< Reference< chart2::XTitle > >()( rOther.m_xTitle )); - ModifyListenerHelper::addListener( m_xTitle, this ); - m_xPageBackground.set( CreateRefClone< Reference< beans::XPropertySet > >()( rOther.m_xPageBackground )); - ModifyListenerHelper::addListener( m_xPageBackground, this ); + Reference< util::XModifyListener > xListener; + Reference< chart2::XTitle > xNewTitle = CreateRefClone< Reference< chart2::XTitle > >()( rOther.m_xTitle ); + Reference< chart2::XDiagram > xNewDiagram = CreateRefClone< Reference< chart2::XDiagram > >()( rOther.m_xDiagram ); + Reference< beans::XPropertySet > xNewPageBackground = CreateRefClone< Reference< beans::XPropertySet > >()( rOther.m_xPageBackground ); + Reference< chart2::XChartTypeManager > xChartTypeManager = CreateRefClone< Reference< chart2::XChartTypeManager > >()( rOther.m_xChartTypeManager ); + Reference< container::XNameAccess > xXMLNamespaceMap = CreateRefClone< Reference< container::XNameAccess > >()( rOther.m_xXMLNamespaceMap ); + + { + MutexGuard aGuard( m_aModelMutex ); + xListener = this; + m_xTitle = xNewTitle; + m_xDiagram = xNewDiagram; + m_xPageBackground = xNewPageBackground; + m_xChartTypeManager = xChartTypeManager; + m_xXMLNamespaceMap = xXMLNamespaceMap; + } - m_xXMLNamespaceMap.set( CreateRefClone< Reference< container::XNameAccess > >()( rOther.m_xXMLNamespaceMap )); + ModifyListenerHelper::addListener( xNewTitle, xListener ); + ModifyListenerHelper::addListener( xNewDiagram, xListener ); + ModifyListenerHelper::addListener( xNewPageBackground, xListener ); + xListener.clear(); - CloneRefVector< Reference< chart2::XDiagram > >( rOther.m_aDiagrams, m_aDiagrams ); osl_decrementInterlockedCount(&m_refCount); } @@ -508,8 +521,7 @@ void SAL_CALL ChartModel::dispose() throw(uno::RuntimeException) m_xNumberFormatsSupplier.clear(); DisposeHelper::DisposeAndClear( m_xOwnNumberFormatsSupplier ); DisposeHelper::DisposeAndClear( m_xChartTypeManager ); - DisposeHelper::DisposeAllElements( m_aDiagrams ); - m_aDiagrams.clear(); + DisposeHelper::DisposeAndClear( m_xDiagram ); DisposeHelper::DisposeAndClear( m_xTitle ); DisposeHelper::DisposeAndClear( m_xPageBackground ); DisposeHelper::DisposeAndClear( m_xXMLNamespaceMap ); @@ -680,38 +692,26 @@ uno::Reference< document::XDocumentProperties > SAL_CALL uno::Reference< chart2::XDiagram > SAL_CALL ChartModel::getFirstDiagram() throw (uno::RuntimeException) { - // /-- MutexGuard aGuard( m_aModelMutex ); - if( m_aDiagrams.size() ) - return m_aDiagrams[ 0 ]; - return uno::Reference< chart2::XDiagram >(); - // \-- -} - -void ChartModel::impl_removeAllDiagrams() -{ - ModifyListenerHelper::removeListenerFromAllElements( m_aDiagrams, this ); - m_aDiagrams.clear(); + return m_xDiagram; } -void ChartModel::impl_appendDiagram( const Reference< chart2::XDiagram > & xDiagram ) -{ - Reference< util::XModifyBroadcaster > xBroadcaster( xDiagram, uno::UNO_QUERY ); - ModifyListenerHelper::addListener( xDiagram, this ); - m_aDiagrams.push_back( xDiagram ); -} - - void SAL_CALL ChartModel::setFirstDiagram( const uno::Reference< chart2::XDiagram >& xDiagram ) throw (uno::RuntimeException) { + Reference< chart2::XDiagram > xOldDiagram; + Reference< util::XModifyListener > xListener; { - // /-- MutexGuard aGuard( m_aModelMutex ); - impl_removeAllDiagrams(); - impl_appendDiagram( xDiagram ); - // \-- + if( xDiagram == m_xDiagram ) + return; + xOldDiagram = m_xDiagram; + m_xDiagram = xDiagram; + xListener = this; } + //don't keep the mutex locked while calling out + ModifyListenerHelper::removeListener( xOldDiagram, xListener ); + ModifyListenerHelper::addListener( xDiagram, xListener ); setModified( sal_True ); } @@ -881,10 +881,7 @@ void SAL_CALL ChartModel::setArguments( const Sequence< beans::PropertyValue >& if( xDia.is()) xTemplate->changeDiagramData( xDia, xDataSource, aArguments ); else - { - impl_removeAllDiagrams(); - impl_appendDiagram( xTemplate->createDiagramByDataSource( xDataSource, aArguments )); - } + setFirstDiagram( xTemplate->createDiagramByDataSource( xDataSource, aArguments ) ); } } } diff --git a/chart2/source/model/main/ChartModel.hxx b/chart2/source/model/main/ChartModel.hxx index 860f71f909ea..23da02f3f83a 100644 --- a/chart2/source/model/main/ChartModel.hxx +++ b/chart2/source/model/main/ChartModel.hxx @@ -162,11 +162,8 @@ private: m_xChartTypeManager; // Diagram Access - typedef ::std::vector< ::com::sun::star::uno::Reference< - ::com::sun::star::chart2::XDiagram > > - tDiagramContainer; - - tDiagramContainer m_aDiagrams; + ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDiagram > + m_xDiagram; ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XTitle > m_xTitle; @@ -231,10 +228,6 @@ private: void impl_adjustAdditionalShapesPositionAndSize( const ::com::sun::star::awt::Size& aVisualAreaSize ); - void impl_removeAllDiagrams(); - void impl_appendDiagram( const ::com::sun::star::uno::Reference< - ::com::sun::star::chart2::XDiagram > & xDiagram ); - ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatsSupplier > impl_getNumberFormatsSupplier(); diff --git a/chart2/source/model/main/ChartModel_Persistence.cxx b/chart2/source/model/main/ChartModel_Persistence.cxx index 844c908d0c73..f098793b3f1a 100644 --- a/chart2/source/model/main/ChartModel_Persistence.cxx +++ b/chart2/source/model/main/ChartModel_Persistence.cxx @@ -413,8 +413,6 @@ void SAL_CALL ChartModel::initNew() try { // create default chart - impl_removeAllDiagrams(); - Reference< chart2::XChartTypeTemplate > xTemplate( impl_createDefaultChartTypeTemplate() ); if( xTemplate.is()) { @@ -433,7 +431,7 @@ void SAL_CALL ChartModel::initNew() Reference< chart2::XDiagram > xDiagram( xTemplate->createDiagramByDataSource( xDataSource, aParam ) ); - impl_appendDiagram( xDiagram ); + setFirstDiagram( xDiagram ); bool bIsRTL = Application::GetSettings().GetLayoutRTL(); //reverse x axis for rtl charts -- cgit v1.2.3 From 9b7ae595a34718cf259a604791c96a636e0e29fd Mon Sep 17 00:00:00 2001 From: Henning Brinkmann Date: Fri, 28 May 2010 14:31:14 +0200 Subject: #b6951450# WW8TableInfo: Store information that text node is first in a table. OutputTextNode: Output page break before on first paragraph in table, if table has page break before. --- sw/source/filter/ww8/WW8TableInfo.cxx | 32 ++++++++++++++++++++++++++++++++ sw/source/filter/ww8/WW8TableInfo.hxx | 14 ++++++++++++++ sw/source/filter/ww8/wrtw8nds.cxx | 12 ++++++++++++ 3 files changed, 58 insertions(+) diff --git a/sw/source/filter/ww8/WW8TableInfo.cxx b/sw/source/filter/ww8/WW8TableInfo.cxx index 8f914f46813d..be7ebde5408f 100644 --- a/sw/source/filter/ww8/WW8TableInfo.cxx +++ b/sw/source/filter/ww8/WW8TableInfo.cxx @@ -47,6 +47,7 @@ WW8TableNodeInfoInner::WW8TableNodeInfoInner(WW8TableNodeInfo * pParent) , mnRow(0) , mbEndOfLine(false) , mbEndOfCell(false) +, mbFirstInTable(false) , mpTableBox(NULL) , mpTable(NULL) { @@ -81,6 +82,11 @@ void WW8TableNodeInfoInner::setEndOfCell(bool bEndOfCell) mbEndOfCell = bEndOfCell; } +void WW8TableNodeInfoInner::setFirstInTable(bool bFirstInTable) +{ + mbFirstInTable = bFirstInTable; +} + void WW8TableNodeInfoInner::setTableBox(const SwTableBox * pTableBox) { mpTableBox = pTableBox; @@ -116,6 +122,11 @@ bool WW8TableNodeInfoInner::isEndOfLine() const return mbEndOfLine; } +bool WW8TableNodeInfoInner::isFirstInTable() const +{ + return mbFirstInTable; +} + const SwNode * WW8TableNodeInfoInner::getNode() const { const SwNode * pResult = NULL; @@ -230,6 +241,17 @@ void WW8TableNodeInfo::setEndOfCell(bool bEndOfCell) #endif } +void WW8TableNodeInfo::setFirstInTable(bool bFirstInTable) +{ + WW8TableNodeInfoInner::Pointer_t pInner = getInnerForDepth(mnDepth); + pInner->setFirstInTable(bFirstInTable); + +#ifdef DEBUG + ::std::clog << "" + << toString() << "" << ::std::endl; +#endif +} + void WW8TableNodeInfo::setTableBox(const SwTableBox * pTableBox) { getInnerForDepth(mnDepth)->setTableBox(pTableBox); @@ -591,6 +613,16 @@ WW8TableNodeInfo::Pointer_t WW8TableInfo::insertTableNodeInfo pNodeInfo->setCell(nCell); pNodeInfo->setRow(nRow); + if (pNode->IsTxtNode()) + { + FirstInTableMap_t::const_iterator aIt = mFirstInTableMap.find(pTable); + if (aIt == mFirstInTableMap.end()) + { + mFirstInTableMap[pTable] = pNode; + pNodeInfo->setFirstInTable(true); + } + } + #ifdef DEBUG ::std::clog << pNodeInfo->toString() << ::std::endl; #endif diff --git a/sw/source/filter/ww8/WW8TableInfo.hxx b/sw/source/filter/ww8/WW8TableInfo.hxx index 5dcf6ee1d0dc..61e1b4a93a8d 100644 --- a/sw/source/filter/ww8/WW8TableInfo.hxx +++ b/sw/source/filter/ww8/WW8TableInfo.hxx @@ -54,6 +54,7 @@ class WW8TableNodeInfoInner sal_uInt32 mnRow; bool mbEndOfLine; bool mbEndOfCell; + bool mbFirstInTable; const SwTableBox * mpTableBox; const SwTable * mpTable; @@ -68,6 +69,7 @@ public: void setRow(sal_uInt32 nRow); void setEndOfLine(bool bEndOfLine); void setEndOfCell(bool bEndOfCell); + void setFirstInTable(bool bFirstInTable); void setTableBox(const SwTableBox * pTableBox); void setTable(const SwTable * pTable); @@ -76,6 +78,7 @@ public: sal_uInt32 getRow() const; bool isEndOfCell() const; bool isEndOfLine() const; + bool isFirstInTable() const; const SwTableBox * getTableBox() const; const SwTable * getTable() const; @@ -105,6 +108,7 @@ public: void setDepth(sal_uInt32 nDepth); void setEndOfLine(bool bEndOfLine); void setEndOfCell(bool bEndOfCell); + void setFirstInTable(bool bFirstInTable); void setTableBox(const SwTableBox *pTableBox); void setTable(const SwTable * pTable); void setCell(sal_uInt32 nCell); @@ -115,6 +119,7 @@ public: sal_uInt32 getDepth() const; bool isEndOfLine() const; bool isEndOfCell() const; + bool isFirstInTable() const; const SwNode * getNode() const; const SwTableBox * getTableBox() const; const SwTable * getTable() const; @@ -137,10 +142,18 @@ struct hashNode { return reinterpret_cast(pNode); } }; +struct hashTable +{ + size_t operator()(const SwTable * pTable) const + { return reinterpret_cast(pTable); } +}; + class WW8TableInfo { typedef hash_map Map_t; Map_t mMap; + typedef hash_map FirstInTableMap_t; + FirstInTableMap_t mFirstInTableMap; WW8TableNodeInfo * processTableLine(const SwTable * pTable, @@ -180,6 +193,7 @@ public: void processSwTable(const SwTable * pTable); WW8TableNodeInfo::Pointer_t getTableNodeInfo(const SwNode * pNode); const SwNode * getNextNode(const SwNode * pNode); + const WW8TableNodeInfo * getFirstTableNodeInfo() const; }; } diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx index 9e114aa11b0a..5b04d1785d75 100644 --- a/sw/source/filter/ww8/wrtw8nds.cxx +++ b/sw/source/filter/ww8/wrtw8nds.cxx @@ -77,6 +77,7 @@ #include #include #include +#include #include #include #include @@ -1899,6 +1900,17 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode ) #endif AttrOutput().TableInfoCell( pTextNodeInfoInner ); + if (pTextNodeInfoInner->isFirstInTable()) + { + const SwTable * pTable = pTextNodeInfoInner->getTable(); + const SwTableFmt * pTabFmt = + dynamic_cast(pTable->GetRegisteredIn()); + if (pTabFmt != NULL) + { + if (pTabFmt->GetBreak().GetBreak() == SVX_BREAK_PAGE_BEFORE) + AttrOutput().PageBreakBefore(true); + } + } } if ( !bFlyInTable ) -- cgit v1.2.3 From 0fe86b35c9baec1abd1fb4fb9f634de5f06b38e6 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 28 May 2010 15:23:19 +0200 Subject: unoawt: WINDOW_*BOX also do not require a parent window, so allow creating them without parent --- toolkit/source/awt/vclxtoolkit.cxx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/toolkit/source/awt/vclxtoolkit.cxx b/toolkit/source/awt/vclxtoolkit.cxx index 2eeafa73d2d2..f85e29c21099 100644 --- a/toolkit/source/awt/vclxtoolkit.cxx +++ b/toolkit/source/awt/vclxtoolkit.cxx @@ -632,7 +632,15 @@ Window* VCLXToolkit::ImplCreateWindow( VCLXWindow** ppNewComp, // Wenn die Component einen Parent braucht, dann NULL zurueckgeben, // spaeter mal ::com::sun::star::uno::Exception... sal_Bool bException = sal_True; - if ( ( nType == WINDOW_DIALOG ) || ( nType == WINDOW_MODALDIALOG ) || ( nType == WINDOW_MODELESSDIALOG ) ) + if ( ( nType == WINDOW_DIALOG ) + || ( nType == WINDOW_MODALDIALOG ) + || ( nType == WINDOW_MODELESSDIALOG ) + || ( nType == WINDOW_MESSBOX ) + || ( nType == WINDOW_INFOBOX ) + || ( nType == WINDOW_WARNINGBOX ) + || ( nType == WINDOW_ERRORBOX ) + || ( nType == WINDOW_QUERYBOX ) + ) bException = sal_False; else if ( ( nType == WINDOW_WINDOW ) || ( nType == WINDOW_WORKWINDOW ) || -- cgit v1.2.3 From 024b04532d81f4e9c18e12d7dba418214cac969f Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 28 May 2010 15:24:02 +0200 Subject: unoawt: fixed assertion --- svtools/source/uno/wizard/unowizard.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/svtools/source/uno/wizard/unowizard.cxx b/svtools/source/uno/wizard/unowizard.cxx index 08b0211d6173..3d601a51c49e 100644 --- a/svtools/source/uno/wizard/unowizard.cxx +++ b/svtools/source/uno/wizard/unowizard.cxx @@ -348,7 +348,7 @@ namespace svt { namespace uno ::osl::MutexGuard aGuard( m_aMutex ); WizardShell* pWizardImpl = dynamic_cast< WizardShell* >( m_pDialog ); - ENSURE_OR_RETURN_VOID( pWizardImpl, "Wizard::updateTravelUI: invalid dialog implementation!" ); + ENSURE_OR_RETURN_VOID( pWizardImpl, "Wizard::enablePage: invalid dialog implementation!" ); if ( !pWizardImpl->knowsPage( i_PageID ) ) throw NoSuchElementException( ::rtl::OUString(), *this ); -- cgit v1.2.3 From 8f5ff4a4cbe7d33417a7b884e1c3093168738581 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Fri, 28 May 2010 15:24:45 +0200 Subject: vcl111: #i108490# fix handling of greyscale jpeg images in PDF export --- svtools/inc/svtools/filter.hxx | 5 ++++- svtools/source/filter.vcl/filter/filter.cxx | 8 ++++++-- svtools/source/filter.vcl/jpeg/jpeg.cxx | 15 +++++++++++---- svtools/source/inc/jpeg.hxx | 11 +++++++++-- 4 files changed, 30 insertions(+), 9 deletions(-) diff --git a/svtools/inc/svtools/filter.hxx b/svtools/inc/svtools/filter.hxx index 770e81b00551..49ec77adfea5 100644 --- a/svtools/inc/svtools/filter.hxx +++ b/svtools/inc/svtools/filter.hxx @@ -62,6 +62,8 @@ class Graphic; #define GRFILTER_ABORT 6 #define GRFILTER_TOOBIG 7 +#define GRFILTER_OUTHINT_GREY 1 + #define GRFILTER_FORMAT_NOTFOUND ((USHORT)0xFFFF) #define GRFILTER_FORMAT_DONTKNOW ((USHORT)0xFFFF) @@ -323,7 +325,7 @@ protected: sal_Bool bDummy2; sal_Bool bDummy3; sal_Bool bDummy4; - long nDummy1; + long nExpGraphHint; long nDummy2; void* pDummy1; void* pDummy2; @@ -374,6 +376,7 @@ public: USHORT ExportGraphic( const Graphic& rGraphic, const String& rPath, SvStream& rOStm, USHORT nFormat = GRFILTER_FORMAT_DONTKNOW, const com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >* pFilterData = NULL ); + long GetExportGraphicHint() const { return nExpGraphHint; } USHORT CanImportGraphic( const INetURLObject& rPath, USHORT nFormat = GRFILTER_FORMAT_DONTKNOW, diff --git a/svtools/source/filter.vcl/filter/filter.cxx b/svtools/source/filter.vcl/filter/filter.cxx index e8121f1d7e94..c8a79d3a35cd 100644 --- a/svtools/source/filter.vcl/filter/filter.cxx +++ b/svtools/source/filter.vcl/filter/filter.cxx @@ -992,7 +992,8 @@ namespace { struct Cache : public rtl::Static {}; } // ----------------- GraphicFilter::GraphicFilter( sal_Bool bConfig ) : - bUseConfig ( bConfig ) + bUseConfig ( bConfig ), + nExpGraphHint ( 0 ) { ImplInit(); } @@ -1678,6 +1679,7 @@ USHORT GraphicFilter::ExportGraphic( const Graphic& rGraphic, const String& rPat USHORT nFormatCount = GetExportFormatCount(); ResetLastError(); + nExpGraphHint = 0; if( nFormat == GRFILTER_FORMAT_DONTKNOW ) { @@ -1850,8 +1852,10 @@ USHORT GraphicFilter::ExportGraphic( const Graphic& rGraphic, const String& rPat } else if( aFilterName.EqualsIgnoreCaseAscii( EXP_JPEG ) ) { - if( !ExportJPEG( rOStm, aGraphic, pFilterData ) ) + bool bExportedGrayJPEG = false; + if( !ExportJPEG( rOStm, aGraphic, pFilterData, &bExportedGrayJPEG ) ) nStatus = GRFILTER_FORMATERROR; + nExpGraphHint = bExportedGrayJPEG ? GRFILTER_OUTHINT_GREY : 0; if( rOStm.GetError() ) nStatus = GRFILTER_IOERROR; diff --git a/svtools/source/filter.vcl/jpeg/jpeg.cxx b/svtools/source/filter.vcl/jpeg/jpeg.cxx index 7fd2e09a82dd..a2de92171af3 100644 --- a/svtools/source/filter.vcl/jpeg/jpeg.cxx +++ b/svtools/source/filter.vcl/jpeg/jpeg.cxx @@ -590,10 +590,11 @@ ReadState JPEGReader::Read( Graphic& rGraphic ) // - JPEGWriter - // -------------- -JPEGWriter::JPEGWriter( SvStream& rStm, const uno::Sequence< beans::PropertyValue >* pFilterData ) : +JPEGWriter::JPEGWriter( SvStream& rStm, const uno::Sequence< beans::PropertyValue >* pFilterData, bool* pExportWasGrey ) : rOStm ( rStm ), pAcc ( NULL ), - pBuffer ( NULL ) + pBuffer ( NULL ), + pExpWasGrey ( pExportWasGrey ) { FilterConfigItem aConfigItem( (uno::Sequence< beans::PropertyValue >*)pFilterData ); bGreys = aConfigItem.ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "ColorMode" ) ), 0 ) != 0; @@ -704,6 +705,9 @@ BOOL JPEGWriter::Write( const Graphic& rGraphic ) bGreys = sal_True; } + if( pExpWasGrey ) + *pExpWasGrey = bGreys; + if( pAcc ) { bNative = ( pAcc->GetScanlineFormat() == BMP_FORMAT_24BIT_TC_RGB ); @@ -765,8 +769,11 @@ BOOL ImportJPEG( SvStream& rStm, Graphic& rGraphic, void* pCallerData, sal_Int32 // - ExportJPEG - // -------------- -BOOL ExportJPEG( SvStream& rOStm, const Graphic& rGraphic, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >* pFilterData ) +BOOL ExportJPEG( SvStream& rOStm, const Graphic& rGraphic, + const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >* pFilterData, + bool* pExportWasGrey + ) { - JPEGWriter aJPEGWriter( rOStm, pFilterData ); + JPEGWriter aJPEGWriter( rOStm, pFilterData, pExportWasGrey ); return aJPEGWriter.Write( rGraphic ); } diff --git a/svtools/source/inc/jpeg.hxx b/svtools/source/inc/jpeg.hxx index 906bcd9ea2de..9923190c5e21 100644 --- a/svtools/source/inc/jpeg.hxx +++ b/svtools/source/inc/jpeg.hxx @@ -99,13 +99,16 @@ class JPEGWriter sal_Bool bGreys; sal_Int32 nQuality; + bool* pExpWasGrey; + com::sun::star::uno::Reference< com::sun::star::task::XStatusIndicator > xStatusIndicator; public: void* GetScanline( long nY ); - JPEGWriter( SvStream& rOStm, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >* pFilterData ); + JPEGWriter( SvStream& rOStm, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >* pFilterData, + bool* pExportWasGrey = NULL ); ~JPEGWriter() {}; BOOL Write( const Graphic& rGraphic ); @@ -119,6 +122,10 @@ public: BOOL ImportJPEG( SvStream& rStream, Graphic& rGraphic, void* pCallerData, sal_Int32 nImportFlags ); -BOOL ExportJPEG( SvStream& rStream, const Graphic& rGraphic, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >* pFilterData ); +BOOL ExportJPEG( SvStream& rStream, + const Graphic& rGraphic, + const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >* pFilterData, + bool* pExportWasGrey = NULL + ); #endif // _JPEG_HXX -- cgit v1.2.3 From ac8931355088e3d5c811309342f6af999da92cd8 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Fri, 28 May 2010 15:24:45 +0200 Subject: vcl111: #i108490# fix handling of greyscale jpeg images in PDF export --- filter/source/pdf/pdfexport.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx index c868a3ec3157..8115f36d76f8 100644 --- a/filter/source/pdf/pdfexport.cxx +++ b/filter/source/pdf/pdfexport.cxx @@ -1926,6 +1926,7 @@ void PDFExport::ImplWriteBitmapEx( PDFWriter& rWriter, VirtualDevice& rDummyVDev SvMemoryStream aStrm; Bitmap aMask; + bool bTrueColorJPG = true; if ( bUseJPGCompression ) { sal_uInt32 nZippedFileSize; // sj: we will calculate the filesize of a zipped bitmap @@ -1956,12 +1957,13 @@ void PDFExport::ImplWriteBitmapEx( PDFWriter& rWriter, VirtualDevice& rDummyVDev aFilterData[ 1 ].Value <<= nColorMode; /*sal_uInt16 nError =*/ aGraphicFilter.ExportGraphic( aGraphic, String(), aStrm, nFormatName, &aFilterData ); + bTrueColorJPG = ((aGraphicFilter.GetExportGraphicHint() & GRFILTER_OUTHINT_GREY) == 0); aStrm.Seek( STREAM_SEEK_TO_END ); if ( aStrm.Tell() > nZippedFileSize ) bUseJPGCompression = sal_False; } if ( bUseJPGCompression ) - rWriter.DrawJPGBitmap( aStrm, true, aSizePixel, Rectangle( aPoint, aSize ), aMask ); + rWriter.DrawJPGBitmap( aStrm, bTrueColorJPG, aSizePixel, Rectangle( aPoint, aSize ), aMask ); else if ( aBitmapEx.IsTransparent() ) rWriter.DrawBitmapEx( aPoint, aSize, aBitmapEx ); else -- cgit v1.2.3 From 1e7e9bea33a3f39b54a715be36a1a14ac680a333 Mon Sep 17 00:00:00 2001 From: Ingo Schmidt Date: Fri, 28 May 2010 15:35:06 +0200 Subject: native305 #i92977# new Windows INSTALLLOCATION settings --- setup_native/source/win32/customactions/reg64/reg64.cxx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) mode change 100644 => 100755 setup_native/source/win32/customactions/reg64/reg64.cxx diff --git a/setup_native/source/win32/customactions/reg64/reg64.cxx b/setup_native/source/win32/customactions/reg64/reg64.cxx old mode 100644 new mode 100755 index 2264a228030d..53eb16a99583 --- a/setup_native/source/win32/customactions/reg64/reg64.cxx +++ b/setup_native/source/win32/customactions/reg64/reg64.cxx @@ -56,13 +56,14 @@ WINADVAPI LONG WINAPI RegDeleteKeyExW(HKEY,LPCWSTR,REGSAM,DWORD); // in mingw 3.13 KEY_WOW64_64KEY isn't available < Win2003 systems. // Also defined in setup_native\source\win32\customactions\reg64\reg64.cxx,source\win32\customactions\shellextensions\shellextensions.cxx and // extensions\source\activex\main\so_activex.cpp + #ifndef KEY_WOW64_64KEY #define KEY_WOW64_64KEY (0x0100) #endif #define TABLE_NAME L"Reg64" -#define BASISINSTALLLOCATION L"[BASISINSTALLLOCATION]" +#define INSTALLLOCATION L"[INSTALLLOCATION]" bool isInstall4AllUsers; wchar_t * sBasisInstallLocation; @@ -214,9 +215,10 @@ wchar_t* GetBasisInstallLocation( MSIHANDLE hMSI ) OutputDebugStringFormat(L"GetBasisInstallLocation - START\n" ); bool bResult = FALSE; wchar_t* pVal = NULL; - GetMsiProp( hMSI, L"BASISINSTALLLOCATION", &pVal); + GetMsiProp( hMSI, L"INSTALLLOCATION", &pVal); OutputDebugStringFormat(L"GetBasisInstallLocation - ENDE\n" ); + return pVal; } @@ -325,14 +327,14 @@ bool DoRegEntries( MSIHANDLE& rhMSI, OPERATION op, MSIHANDLE& rhView) - wchar_t* nPos = wcsstr(szValue , BASISINSTALLLOCATION); + wchar_t* nPos = wcsstr(szValue , INSTALLLOCATION); if ( NULL != nPos) { DWORD nPrefixSize = nPos - szValue; DWORD nPropSize = wcslen(sBasisInstallLocation); - DWORD nPostfixSize = dwValue - wcslen( BASISINSTALLLOCATION ); + DWORD nPostfixSize = dwValue - wcslen( INSTALLLOCATION ); DWORD nNewValueBytes = (nPropSize + nPostfixSize + 1) * sizeof( wchar_t ); wchar_t* newValue = reinterpret_cast( malloc( nNewValueBytes ) ); @@ -345,7 +347,7 @@ bool DoRegEntries( MSIHANDLE& rhMSI, OPERATION op, MSIHANDLE& rhView) wcsncat(newValue, sBasisInstallLocation, nPropSize * sizeof( wchar_t )); // postfix - wcsncat(newValue, nPos + ( wcslen( BASISINSTALLLOCATION ) ), nPropSize * sizeof( wchar_t )); + wcsncat(newValue, nPos + ( wcslen( INSTALLLOCATION ) ), nPropSize * sizeof( wchar_t )); wcsncpy(szValue, newValue, nNewValueBytes <=1024? nNewValueBytes: 1024); -- cgit v1.2.3 From ccc9774139e48f266e40c99f7243f03f4a728517 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 28 May 2010 15:36:22 +0200 Subject: unoawt: XWizard now has an attribute giving access to the XWindow interface of the dialog's main window --- svtools/source/uno/unowizard.hxx | 1 + svtools/source/uno/wizard/unowizard.cxx | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/svtools/source/uno/unowizard.hxx b/svtools/source/uno/unowizard.hxx index f227160f96bc..ceb8fac14eb6 100644 --- a/svtools/source/uno/unowizard.hxx +++ b/svtools/source/uno/unowizard.hxx @@ -77,6 +77,7 @@ namespace svt { namespace uno // ::com::sun::star::ui::dialogs::XWizard virtual ::rtl::OUString SAL_CALL getHelpURL() throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL setHelpURL( const ::rtl::OUString& _helpurl ) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > SAL_CALL getDialogWindow() throw (::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XWizardPage > SAL_CALL getCurrentPage( ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL enableButton( ::sal_Int16 WizardButton, ::sal_Bool Enable ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL setDefaultButton( ::sal_Int16 WizardButton ) throw (::com::sun::star::uno::RuntimeException); diff --git a/svtools/source/uno/wizard/unowizard.cxx b/svtools/source/uno/wizard/unowizard.cxx index 3d601a51c49e..e310aceaca75 100644 --- a/svtools/source/uno/wizard/unowizard.cxx +++ b/svtools/source/uno/wizard/unowizard.cxx @@ -72,6 +72,7 @@ namespace svt { namespace uno using ::com::sun::star::ui::dialogs::XWizardPage; using ::com::sun::star::container::NoSuchElementException; using ::com::sun::star::util::InvalidStateException; + using ::com::sun::star::awt::XWindow; /** === end UNO using === **/ namespace WizardButton = ::com::sun::star::ui::dialogs::WizardButton; @@ -293,6 +294,16 @@ namespace svt { namespace uno m_pDialog->SetSmartHelpId( SmartId( i_HelpURL ) ); } + //------------------------------------------------------------------------------------------------------------------ + Reference< XWindow > SAL_CALL Wizard::getDialogWindow() throw (RuntimeException) + { + ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + ::osl::MutexGuard aGuard( m_aMutex ); + + ENSURE_OR_RETURN( m_pDialog, "Wizard::getDialogWindow: illegal call (execution did not start, yet)!", NULL ); + return Reference< XWindow >( m_pDialog->GetComponentInterface(), UNO_QUERY ); + } + //------------------------------------------------------------------------------------------------------------------ void SAL_CALL Wizard::enableButton( ::sal_Int16 i_WizardButton, ::sal_Bool i_Enable ) throw (RuntimeException) { -- cgit v1.2.3 From 9d8f2ac47d5103568d13366ec5ef82477ce659a7 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 28 May 2010 15:36:22 +0200 Subject: unoawt: XWizard now has an attribute giving access to the XWindow interface of the dialog's main window --- offapi/com/sun/star/ui/dialogs/XWizard.idl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/offapi/com/sun/star/ui/dialogs/XWizard.idl b/offapi/com/sun/star/ui/dialogs/XWizard.idl index d894c85db1fd..5de5eaa300a4 100644 --- a/offapi/com/sun/star/ui/dialogs/XWizard.idl +++ b/offapi/com/sun/star/ui/dialogs/XWizard.idl @@ -30,6 +30,7 @@ #include #include #include +#include //================================================================================================================== module com { module sun { module star { module ui { module dialogs { @@ -86,6 +87,9 @@ interface XWizard */ [attribute] string HelpURL; + [attribute, readonly] ::com::sun::star::awt::XWindow + DialogWindow; + /** provides access to the current page of the wizard */ XWizardPage -- cgit v1.2.3 From 5347bfcf72ac68be94b565f760210463308a0cb4 Mon Sep 17 00:00:00 2001 From: Ingrid Halama Date: Fri, 28 May 2010 16:13:48 +0200 Subject: chart47: #i79087# prevent deadlock + prevent null pointer access --- chart2/source/controller/main/UndoGuard.cxx | 42 ++++--- chart2/source/model/main/DataSeries.cxx | 173 +++++++++++++++++----------- chart2/source/model/main/Diagram.cxx | 171 +++++++++++++++------------ chart2/source/model/main/Title.cxx | 16 +-- 4 files changed, 238 insertions(+), 164 deletions(-) diff --git a/chart2/source/controller/main/UndoGuard.cxx b/chart2/source/controller/main/UndoGuard.cxx index 61bed4029db5..8513b6ba9093 100644 --- a/chart2/source/controller/main/UndoGuard.cxx +++ b/chart2/source/controller/main/UndoGuard.cxx @@ -55,7 +55,7 @@ UndoGuard_Base::~UndoGuard_Base() void UndoGuard_Base::commitAction() { - if( !m_bActionPosted ) + if( !m_bActionPosted && m_xUndoManager.is() ) m_xUndoManager->postAction( m_aUndoString ); m_bActionPosted = true; } @@ -67,12 +67,13 @@ UndoGuard::UndoGuard( const OUString& rUndoString , const uno::Reference< frame::XModel > & xModel ) : UndoGuard_Base( rUndoString, xUndoManager, xModel ) { - m_xUndoManager->preAction( m_xModel ); + if( m_xUndoManager.is() ) + m_xUndoManager->preAction( m_xModel ); } UndoGuard::~UndoGuard() { - if( !m_bActionPosted ) + if( !m_bActionPosted && m_xUndoManager.is() ) m_xUndoManager->cancelAction(); } @@ -83,12 +84,13 @@ UndoLiveUpdateGuard::UndoLiveUpdateGuard( const OUString& rUndoString , const uno::Reference< frame::XModel > & xModel ) : UndoGuard_Base( rUndoString, xUndoManager, xModel ) { - m_xUndoManager->preAction( m_xModel ); + if( m_xUndoManager.is() ) + m_xUndoManager->preAction( m_xModel ); } UndoLiveUpdateGuard::~UndoLiveUpdateGuard() { - if( !m_bActionPosted ) + if( !m_bActionPosted && m_xUndoManager.is() ) m_xUndoManager->cancelActionWithUndo( m_xModel ); } @@ -99,16 +101,19 @@ UndoLiveUpdateGuardWithData::UndoLiveUpdateGuardWithData( const OUString& rUndoS , const uno::Reference< frame::XModel > & xModel ) : UndoGuard_Base( rUndoString, xUndoManager, xModel ) { - Sequence< beans::PropertyValue > aArgs(1); - aArgs[0] = beans::PropertyValue( - OUString( RTL_CONSTASCII_USTRINGPARAM("WithData")), -1, uno::Any(), - beans::PropertyState_DIRECT_VALUE ); - m_xUndoManager->preActionWithArguments( m_xModel, aArgs ); + if( m_xUndoManager.is() ) + { + Sequence< beans::PropertyValue > aArgs(1); + aArgs[0] = beans::PropertyValue( + OUString( RTL_CONSTASCII_USTRINGPARAM("WithData")), -1, uno::Any(), + beans::PropertyState_DIRECT_VALUE ); + m_xUndoManager->preActionWithArguments( m_xModel, aArgs ); + } } UndoLiveUpdateGuardWithData::~UndoLiveUpdateGuardWithData() { - if( !m_bActionPosted ) + if( !m_bActionPosted && m_xUndoManager.is() ) m_xUndoManager->cancelActionWithUndo( m_xModel ); } @@ -119,16 +124,19 @@ UndoGuardWithSelection::UndoGuardWithSelection( const rtl::OUString& rUndoString , const uno::Reference< frame::XModel > & xModel ) : UndoGuard_Base( rUndoString, xUndoManager, xModel ) { - Sequence< beans::PropertyValue > aArgs(1); - aArgs[0] = beans::PropertyValue( - OUString( RTL_CONSTASCII_USTRINGPARAM("WithSelection")), -1, uno::Any(), - beans::PropertyState_DIRECT_VALUE ); - m_xUndoManager->preActionWithArguments( m_xModel, aArgs ); + if( m_xUndoManager.is() ) + { + Sequence< beans::PropertyValue > aArgs(1); + aArgs[0] = beans::PropertyValue( + OUString( RTL_CONSTASCII_USTRINGPARAM("WithSelection")), -1, uno::Any(), + beans::PropertyState_DIRECT_VALUE ); + m_xUndoManager->preActionWithArguments( m_xModel, aArgs ); + } } UndoGuardWithSelection::~UndoGuardWithSelection() { - if( !m_bActionPosted ) + if( !m_bActionPosted && m_xUndoManager.is() ) m_xUndoManager->cancelAction(); } diff --git a/chart2/source/model/main/DataSeries.cxx b/chart2/source/model/main/DataSeries.cxx index 4faca33e936c..e14f244862b7 100644 --- a/chart2/source/model/main/DataSeries.cxx +++ b/chart2/source/model/main/DataSeries.cxx @@ -370,64 +370,76 @@ Reference< beans::XPropertySet > throw (lang::IndexOutOfBoundsException, uno::RuntimeException) { - Reference< beans::XPropertySet > aResult; + Reference< beans::XPropertySet > xResult; - // /-- - MutexGuard aGuard( GetMutex() ); + Sequence< Reference< chart2::data::XLabeledDataSequence > > aSequences; + { + MutexGuard aGuard( GetMutex() ); + aSequences = ContainerHelper::ContainerToSequence( m_aDataSequences ); + } - if( ! m_aDataSequences.empty() ) + ::std::vector< Reference< chart2::data::XLabeledDataSequence > > aValuesSeries( + DataSeriesHelper::getAllDataSequencesByRole( aSequences , C2U("values"), true ) ); + if( !aValuesSeries.empty() ) { - ::std::vector< Reference< chart2::data::XLabeledDataSequence > > aValuesSeries( - DataSeriesHelper::getAllDataSequencesByRole( - ContainerHelper::ContainerToSequence( m_aDataSequences ), - C2U("values"), true )); - if( ! aValuesSeries.empty()) + Reference< chart2::data::XDataSequence > xSeq( aValuesSeries.front()->getValues() ); + if( 0 <= nIndex && nIndex < xSeq->getData().getLength() ) { - Reference< chart2::data::XDataSequence > xSeq( aValuesSeries.front()->getValues()); - if( 0 <= nIndex && nIndex < xSeq->getData().getLength()) { - tDataPointAttributeContainer::iterator aIt( - m_aAttributedDataPoints.find( nIndex )); - - if( aIt == m_aAttributedDataPoints.end()) + MutexGuard aGuard( GetMutex() ); + tDataPointAttributeContainer::iterator aIt( m_aAttributedDataPoints.find( nIndex ) ); + if( aIt != m_aAttributedDataPoints.end() ) + xResult = (*aIt).second; + } + if( !xResult.is() ) + { + Reference< beans::XPropertySet > xParentProperties; + Reference< util::XModifyListener > xModifyEventForwarder; { - // create a new XPropertySet for this data point - aResult.set( new DataPoint( this )); - ModifyListenerHelper::addListener( aResult, m_xModifyEventForwarder ); - m_aAttributedDataPoints[ nIndex ] = aResult; + MutexGuard aGuard( GetMutex() ); + xParentProperties = this; + xModifyEventForwarder = m_xModifyEventForwarder; } - else + + // create a new XPropertySet for this data point + xResult.set( new DataPoint( xParentProperties ) ); { - aResult = (*aIt).second; + MutexGuard aGuard( GetMutex() ); + m_aAttributedDataPoints[ nIndex ] = xResult; } + ModifyListenerHelper::addListener( xResult, xModifyEventForwarder ); } } - else - { - throw lang::IndexOutOfBoundsException(); - } } else { throw lang::IndexOutOfBoundsException(); } - return aResult; - // \-- + return xResult; } void SAL_CALL DataSeries::resetDataPoint( sal_Int32 nIndex ) throw (uno::RuntimeException) { - MutexGuard aGuard( GetMutex() ); - tDataPointAttributeContainer::iterator aIt( m_aAttributedDataPoints.find( nIndex )); - if( aIt != m_aAttributedDataPoints.end()) + Reference< beans::XPropertySet > xDataPointProp; + Reference< util::XModifyListener > xModifyEventForwarder; + { + MutexGuard aGuard( GetMutex() ); + xModifyEventForwarder = m_xModifyEventForwarder; + tDataPointAttributeContainer::iterator aIt( m_aAttributedDataPoints.find( nIndex )); + if( aIt != m_aAttributedDataPoints.end()) + { + xDataPointProp = (*aIt).second; + m_aAttributedDataPoints.erase(aIt); + } + + } + if( xDataPointProp.is() ) { - Reference< beans::XPropertySet > xDataPointProp( (*aIt).second ); Reference< util::XModifyBroadcaster > xBroadcaster( xDataPointProp, uno::UNO_QUERY ); - if( xBroadcaster.is() && m_xModifyEventForwarder.is()) - xBroadcaster->removeModifyListener( m_xModifyEventForwarder ); - m_aAttributedDataPoints.erase(aIt); + if( xBroadcaster.is() && xModifyEventForwarder.is()) + xBroadcaster->removeModifyListener( xModifyEventForwarder ); fireModifyEvent(); } } @@ -435,9 +447,15 @@ void SAL_CALL DataSeries::resetDataPoint( sal_Int32 nIndex ) void SAL_CALL DataSeries::resetAllDataPoints() throw (uno::RuntimeException) { - MutexGuard aGuard( GetMutex() ); - ModifyListenerHelper::removeListenerFromAllMapElements( m_aAttributedDataPoints, m_xModifyEventForwarder ); - m_aAttributedDataPoints.clear(); + tDataPointAttributeContainer aOldAttributedDataPoints; + Reference< util::XModifyListener > xModifyEventForwarder; + { + MutexGuard aGuard( GetMutex() ); + xModifyEventForwarder = m_xModifyEventForwarder; + std::swap( aOldAttributedDataPoints, m_aAttributedDataPoints ); + } + ModifyListenerHelper::removeListenerFromAllMapElements( aOldAttributedDataPoints, xModifyEventForwarder ); + aOldAttributedDataPoints.clear(); fireModifyEvent(); } @@ -445,25 +463,31 @@ void SAL_CALL DataSeries::resetAllDataPoints() void SAL_CALL DataSeries::setData( const uno::Sequence< Reference< chart2::data::XLabeledDataSequence > >& aData ) throw (uno::RuntimeException) { - // /-- - MutexGuard aGuard( GetMutex() ); - ModifyListenerHelper::removeListenerFromAllElements( m_aDataSequences, m_xModifyEventForwarder ); - EventListenerHelper::removeListenerFromAllElements( m_aDataSequences, this ); - m_aDataSequences = ContainerHelper::SequenceToVector( aData ); - EventListenerHelper::addListenerToAllElements( m_aDataSequences, this ); - ModifyListenerHelper::addListenerToAllElements( m_aDataSequences, m_xModifyEventForwarder ); + tDataSequenceContainer aOldDataSequences; + tDataSequenceContainer aNewDataSequences; + Reference< util::XModifyListener > xModifyEventForwarder; + Reference< lang::XEventListener > xListener; + { + MutexGuard aGuard( GetMutex() ); + xModifyEventForwarder = m_xModifyEventForwarder; + xListener = this; + std::swap( aOldDataSequences, m_aDataSequences ); + aNewDataSequences = ContainerHelper::SequenceToVector( aData ); + m_aDataSequences = aNewDataSequences; + } + ModifyListenerHelper::removeListenerFromAllElements( aOldDataSequences, xModifyEventForwarder ); + EventListenerHelper::removeListenerFromAllElements( aOldDataSequences, xListener ); + EventListenerHelper::addListenerToAllElements( aNewDataSequences, xListener ); + ModifyListenerHelper::addListenerToAllElements( aNewDataSequences, xModifyEventForwarder ); fireModifyEvent(); - // \-- } // ____ XDataSource ____ Sequence< Reference< chart2::data::XLabeledDataSequence > > SAL_CALL DataSeries::getDataSequences() throw (uno::RuntimeException) { - // /-- MutexGuard aGuard( GetMutex() ); return ContainerHelper::ContainerToSequence( m_aDataSequences ); - // \-- } @@ -473,12 +497,16 @@ void SAL_CALL DataSeries::addRegressionCurve( throw (lang::IllegalArgumentException, uno::RuntimeException) { - if( ::std::find( m_aRegressionCurves.begin(), m_aRegressionCurves.end(), xRegressionCurve ) - != m_aRegressionCurves.end()) - throw lang::IllegalArgumentException(); - - m_aRegressionCurves.push_back( xRegressionCurve ); - ModifyListenerHelper::addListener( xRegressionCurve, m_xModifyEventForwarder ); + Reference< util::XModifyListener > xModifyEventForwarder; + { + MutexGuard aGuard( GetMutex() ); + xModifyEventForwarder = m_xModifyEventForwarder; + if( ::std::find( m_aRegressionCurves.begin(), m_aRegressionCurves.end(), xRegressionCurve ) + != m_aRegressionCurves.end()) + throw lang::IllegalArgumentException(); + m_aRegressionCurves.push_back( xRegressionCurve ); + } + ModifyListenerHelper::addListener( xRegressionCurve, xModifyEventForwarder ); fireModifyEvent(); } @@ -487,25 +515,30 @@ void SAL_CALL DataSeries::removeRegressionCurve( throw (container::NoSuchElementException, uno::RuntimeException) { - if( ! xRegressionCurve.is()) + if( !xRegressionCurve.is() ) throw container::NoSuchElementException(); - tRegressionCurveContainerType::iterator aIt( + Reference< util::XModifyListener > xModifyEventForwarder; + { + MutexGuard aGuard( GetMutex() ); + xModifyEventForwarder = m_xModifyEventForwarder; + tRegressionCurveContainerType::iterator aIt( ::std::find( m_aRegressionCurves.begin(), m_aRegressionCurves.end(), xRegressionCurve ) ); + if( aIt == m_aRegressionCurves.end()) + throw container::NoSuchElementException( + C2U( "The given regression curve is no element of this series" ), + static_cast< uno::XWeak * >( this )); + m_aRegressionCurves.erase( aIt ); + } - if( aIt == m_aRegressionCurves.end()) - throw container::NoSuchElementException( - C2U( "The given regression curve is no element of this series" ), - static_cast< uno::XWeak * >( this )); - - ModifyListenerHelper::removeListener( xRegressionCurve, m_xModifyEventForwarder ); - m_aRegressionCurves.erase( aIt ); + ModifyListenerHelper::removeListener( xRegressionCurve, xModifyEventForwarder ); fireModifyEvent(); } uno::Sequence< uno::Reference< chart2::XRegressionCurve > > SAL_CALL DataSeries::getRegressionCurves() throw (uno::RuntimeException) { + MutexGuard aGuard( GetMutex() ); return ContainerHelper::ContainerToSequence( m_aRegressionCurves ); } @@ -513,10 +546,18 @@ void SAL_CALL DataSeries::setRegressionCurves( const Sequence< Reference< chart2::XRegressionCurve > >& aRegressionCurves ) throw (uno::RuntimeException) { - ModifyListenerHelper::removeListenerFromAllElements( m_aRegressionCurves, m_xModifyEventForwarder ); - m_aRegressionCurves.clear(); - for( sal_Int32 i=0; i xModifyEventForwarder; + { + MutexGuard aGuard( GetMutex() ); + xModifyEventForwarder = m_xModifyEventForwarder; + std::swap( aOldCurves, m_aRegressionCurves ); + m_aRegressionCurves = aNewCurves; + } + ModifyListenerHelper::removeListenerFromAllElements( aOldCurves, xModifyEventForwarder ); + ModifyListenerHelper::addListenerToAllElements( aNewCurves, xModifyEventForwarder ); + fireModifyEvent(); } // ____ XModifyBroadcaster ____ diff --git a/chart2/source/model/main/Diagram.cxx b/chart2/source/model/main/Diagram.cxx index f74764c398ef..467e0feba5b4 100644 --- a/chart2/source/model/main/Diagram.cxx +++ b/chart2/source/model/main/Diagram.cxx @@ -300,72 +300,91 @@ Diagram::~Diagram() uno::Reference< beans::XPropertySet > SAL_CALL Diagram::getWall() throw (uno::RuntimeException) { - // /-- - MutexGuard aGuard( GetMutex() ); - if( ! m_xWall.is()) + uno::Reference< beans::XPropertySet > xRet; + bool bAddListener = false; { - m_xWall.set( new Wall()); - ModifyListenerHelper::addListener( m_xWall, m_xModifyEventForwarder ); + MutexGuard aGuard( GetMutex() ); + if( !m_xWall.is() ) + { + m_xWall.set( new Wall() ); + bAddListener = true; + } + xRet = m_xWall; } - return m_xWall; - // \-- + if(bAddListener) + ModifyListenerHelper::addListener( xRet, m_xModifyEventForwarder ); + return xRet; } uno::Reference< beans::XPropertySet > SAL_CALL Diagram::getFloor() throw (uno::RuntimeException) { - // /-- - MutexGuard aGuard( GetMutex() ); - if( ! m_xFloor.is()) + uno::Reference< beans::XPropertySet > xRet; + bool bAddListener = false; { - m_xFloor.set( new Wall()); - ModifyListenerHelper::addListener( m_xFloor, m_xModifyEventForwarder ); + MutexGuard aGuard( GetMutex() ); + if( !m_xFloor.is() ) + { + m_xFloor.set( new Wall() ); + bAddListener = true; + } + xRet = m_xFloor; } - return m_xFloor; - // \-- + if(bAddListener) + ModifyListenerHelper::addListener( xRet, m_xModifyEventForwarder ); + return xRet; } uno::Reference< chart2::XLegend > SAL_CALL Diagram::getLegend() throw (uno::RuntimeException) { - // /-- MutexGuard aGuard( GetMutex() ); return m_xLegend; - // \-- } -void SAL_CALL Diagram::setLegend( const uno::Reference< chart2::XLegend >& xLegend ) +void SAL_CALL Diagram::setLegend( const uno::Reference< chart2::XLegend >& xNewLegend ) throw (uno::RuntimeException) { - // /-- - ::osl::ClearableMutexGuard aGuard( GetMutex() ); - if( xLegend != m_xLegend ) + Reference< chart2::XLegend > xOldLegend; { - if( m_xLegend.is()) - ModifyListenerHelper::removeListener( m_xLegend, m_xModifyEventForwarder ); - m_xLegend = xLegend; - if( m_xLegend.is()) - ModifyListenerHelper::addListener( m_xLegend, m_xModifyEventForwarder ); - aGuard.clear(); - // \-- - fireModifyEvent(); + MutexGuard aGuard( GetMutex() ); + if( m_xLegend == xNewLegend ) + return; + xOldLegend = m_xLegend; + m_xLegend = xNewLegend; } + if( xOldLegend.is()) + ModifyListenerHelper::removeListener( xOldLegend, m_xModifyEventForwarder ); + if( xNewLegend.is()) + ModifyListenerHelper::addListener( xNewLegend, m_xModifyEventForwarder ); + fireModifyEvent(); } Reference< chart2::XColorScheme > SAL_CALL Diagram::getDefaultColorScheme() throw (uno::RuntimeException) { - if( ! m_xColorScheme.is()) + Reference< chart2::XColorScheme > xRet; + { + MutexGuard aGuard( GetMutex() ); + xRet = m_xColorScheme; + } + + if( !xRet.is()) { - m_xColorScheme.set( createConfigColorScheme( m_xContext )); + xRet.set( createConfigColorScheme( m_xContext )); + MutexGuard aGuard( GetMutex() ); + m_xColorScheme = xRet; } - return m_xColorScheme; + return xRet; } void SAL_CALL Diagram::setDefaultColorScheme( const Reference< chart2::XColorScheme >& xColorScheme ) throw (uno::RuntimeException) { - m_xColorScheme.set( xColorScheme ); + { + MutexGuard aGuard( GetMutex() ); + m_xColorScheme.set( xColorScheme ); + } fireModifyEvent(); } @@ -373,27 +392,26 @@ void SAL_CALL Diagram::setDefaultColorScheme( const Reference< chart2::XColorSch uno::Reference< chart2::XTitle > SAL_CALL Diagram::getTitleObject() throw (uno::RuntimeException) { - // /-- MutexGuard aGuard( GetMutex() ); return m_xTitle; - // \-- } -void SAL_CALL Diagram::setTitleObject( const uno::Reference< chart2::XTitle >& Title ) +void SAL_CALL Diagram::setTitleObject( const uno::Reference< chart2::XTitle >& xNewTitle ) throw (uno::RuntimeException) { - // /-- - ::osl::ClearableMutexGuard aGuard( GetMutex() ); - - if( m_xTitle != Title ) + Reference< chart2::XTitle > xOldTitle; { - ModifyListenerHelper::removeListener( m_xTitle, m_xModifyEventForwarder ); - m_xTitle = Title; - ModifyListenerHelper::addListener( m_xTitle, m_xModifyEventForwarder ); - // \-- - aGuard.clear(); - fireModifyEvent(); + MutexGuard aGuard( GetMutex() ); + if( m_xTitle == xNewTitle ) + return; + xOldTitle = m_xTitle; + m_xTitle = xNewTitle; } + if( xOldTitle.is()) + ModifyListenerHelper::removeListener( xOldTitle, m_xModifyEventForwarder ); + if( xNewTitle.is()) + ModifyListenerHelper::addListener( xNewTitle, m_xModifyEventForwarder ); + fireModifyEvent(); } // ____ X3DDefaultSetter ____ @@ -421,18 +439,19 @@ void SAL_CALL Diagram::addCoordinateSystem( throw (lang::IllegalArgumentException, uno::RuntimeException) { - if( ::std::find( m_aCoordSystems.begin(), m_aCoordSystems.end(), aCoordSys ) - != m_aCoordSystems.end()) - throw lang::IllegalArgumentException(); - - if( m_aCoordSystems.size()>=1 ) { - OSL_ENSURE( false, "more than one coordinatesystem is not supported yet by the fileformat" ); - return; - } - - m_aCoordSystems.push_back( aCoordSys ); + MutexGuard aGuard( GetMutex() ); + if( ::std::find( m_aCoordSystems.begin(), m_aCoordSystems.end(), aCoordSys ) + != m_aCoordSystems.end()) + throw lang::IllegalArgumentException(); + if( m_aCoordSystems.size()>=1 ) + { + OSL_ENSURE( false, "more than one coordinatesystem is not supported yet by the fileformat" ); + return; + } + m_aCoordSystems.push_back( aCoordSys ); + } ModifyListenerHelper::addListener( aCoordSys, m_xModifyEventForwarder ); fireModifyEvent(); } @@ -442,15 +461,16 @@ void SAL_CALL Diagram::removeCoordinateSystem( throw (container::NoSuchElementException, uno::RuntimeException) { - ::std::vector< uno::Reference< chart2::XCoordinateSystem > >::iterator - aIt( ::std::find( m_aCoordSystems.begin(), m_aCoordSystems.end(), aCoordSys )); - if( aIt == m_aCoordSystems.end()) - throw container::NoSuchElementException( - C2U( "The given coordinate-system is no element of the container" ), - static_cast< uno::XWeak * >( this )); - - m_aCoordSystems.erase( aIt ); - + { + MutexGuard aGuard( GetMutex() ); + ::std::vector< uno::Reference< chart2::XCoordinateSystem > >::iterator + aIt( ::std::find( m_aCoordSystems.begin(), m_aCoordSystems.end(), aCoordSys )); + if( aIt == m_aCoordSystems.end()) + throw container::NoSuchElementException( + C2U( "The given coordinate-system is no element of the container" ), + static_cast< uno::XWeak * >( this )); + m_aCoordSystems.erase( aIt ); + } ModifyListenerHelper::removeListener( aCoordSys, m_xModifyEventForwarder ); fireModifyEvent(); } @@ -458,6 +478,7 @@ void SAL_CALL Diagram::removeCoordinateSystem( uno::Sequence< uno::Reference< chart2::XCoordinateSystem > > SAL_CALL Diagram::getCoordinateSystems() throw (uno::RuntimeException) { + MutexGuard aGuard( GetMutex() ); return ContainerHelper::ContainerToSequence( m_aCoordSystems ); } @@ -466,17 +487,20 @@ void SAL_CALL Diagram::setCoordinateSystems( throw (lang::IllegalArgumentException, uno::RuntimeException) { - Sequence< Reference< chart2::XCoordinateSystem > > aNew(aCoordinateSystems); - - if( aNew.getLength()>1 ) + tCoordinateSystemContainerType aNew; + tCoordinateSystemContainerType aOld; + if( aCoordinateSystems.getLength()>0 ) { - OSL_ENSURE( false, "more than one coordinatesystem is not supported yet by the fileformat" ); - aNew.realloc(1); + OSL_ENSURE( aCoordinateSystems.getLength()<=1, "more than one coordinatesystem is not supported yet by the fileformat" ); + aNew.push_back( aCoordinateSystems[0] ); } - - ModifyListenerHelper::removeListenerFromAllElements( m_aCoordSystems, m_xModifyEventForwarder ); - m_aCoordSystems = ContainerHelper::SequenceToVector( aNew ); - ModifyListenerHelper::addListenerToAllElements( m_aCoordSystems, m_xModifyEventForwarder ); + { + MutexGuard aGuard( GetMutex() ); + std::swap( aOld, m_aCoordSystems ); + m_aCoordSystems = aNew; + } + ModifyListenerHelper::removeListenerFromAllElements( aOld, m_xModifyEventForwarder ); + ModifyListenerHelper::addListenerToAllElements( aNew, m_xModifyEventForwarder ); fireModifyEvent(); } @@ -484,6 +508,7 @@ void SAL_CALL Diagram::setCoordinateSystems( Reference< util::XCloneable > SAL_CALL Diagram::createClone() throw (uno::RuntimeException) { + MutexGuard aGuard( GetMutex() ); return Reference< util::XCloneable >( new Diagram( *this )); } diff --git a/chart2/source/model/main/Title.cxx b/chart2/source/model/main/Title.cxx index 8b3235636964..d7c5691d160d 100644 --- a/chart2/source/model/main/Title.cxx +++ b/chart2/source/model/main/Title.cxx @@ -256,24 +256,24 @@ uno::Reference< util::XCloneable > SAL_CALL Title::createClone() uno::Sequence< uno::Reference< chart2::XFormattedString > > SAL_CALL Title::getText() throw (uno::RuntimeException) { - // /-- MutexGuard aGuard( GetMutex() ); return m_aStrings; - // \-- } -void SAL_CALL Title::setText( const uno::Sequence< uno::Reference< chart2::XFormattedString > >& Strings ) +void SAL_CALL Title::setText( const uno::Sequence< uno::Reference< chart2::XFormattedString > >& rNewStrings ) throw (uno::RuntimeException) { + uno::Sequence< uno::Reference< chart2::XFormattedString > > aOldStrings; { MutexGuard aGuard( GetMutex() ); - ModifyListenerHelper::removeListenerFromAllElements( - ContainerHelper::SequenceToVector( m_aStrings ), m_xModifyEventForwarder ); - m_aStrings = Strings; - ModifyListenerHelper::addListenerToAllElements( - ContainerHelper::SequenceToVector( m_aStrings ), m_xModifyEventForwarder ); + std::swap( m_aStrings, aOldStrings ); + m_aStrings = rNewStrings; } //don't keep the mutex locked while calling out + ModifyListenerHelper::removeListenerFromAllElements( + ContainerHelper::SequenceToVector( aOldStrings ), m_xModifyEventForwarder ); + ModifyListenerHelper::addListenerToAllElements( + ContainerHelper::SequenceToVector( rNewStrings ), m_xModifyEventForwarder ); fireModifyEvent(); } -- cgit v1.2.3 From 019789ace933903c0fcb55f93a8c2c2e37196798 Mon Sep 17 00:00:00 2001 From: Ingrid Halama Date: Fri, 28 May 2010 19:34:04 +0200 Subject: chart47: #i83857##i83706##i83831##i83866##i87138##i87295# cleanup UNO API tests --- chart2/qa/unoapi/knownissues.xcl | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/chart2/qa/unoapi/knownissues.xcl b/chart2/qa/unoapi/knownissues.xcl index 99c0b9aa096e..726c103592bb 100644 --- a/chart2/qa/unoapi/knownissues.xcl +++ b/chart2/qa/unoapi/knownissues.xcl @@ -12,8 +12,6 @@ sch.ChXChartView::com::sun::star::view::XSelectionSupplier #i83855 sch.ChXDiagram::com::sun::star::chart::LineDiagram -#i83857 -sch.ChXDiagram::com::sun::star::drawing::XShape #i83853 sch.ChXDiagram::com::sun::star::beans::XPropertySet #i83854 @@ -23,19 +21,9 @@ sch.ChXDiagram::com::sun::star::chart::ChartAxisZSupplier #i83856 sch.ChXDiagram::com::sun::star::chart::StockDiagram -#i83706 -sch.ChartLegend::com::sun::star::drawing::LineProperties -sch.ChartLegend::com::sun::star::drawing::FillProperties -sch.ChartLegend::com::sun::star::chart::ChartLegend -sch.ChartLegend::com::sun::star::style::CharacterProperties sch.ChartLegend::com::sun::star::drawing::XShape - #i83830 sch.ChartTitle::com::sun::star::drawing::XShape -#i83831 -sch.ChartTitle::com::sun::star::style::CharacterProperties -#i83827 -sch.ChartTitle::com::sun::star::chart::ChartTitle #i78867 sch.ChXChartDocument::com::sun::star::xml::UserDefinedAttributeSupplier @@ -51,13 +39,3 @@ sch.ChXDataPoint::com::sun::star::xml::UserDefinedAttributeSupplier #i83865 sch.ChXDataPoint::com::sun::star::drawing::LineProperties -#i83866 -sch.ChXDataPoint::com::sun::star::chart::Chart3DBarProperties - -#i87138 -sch.ChXDiagram -# -> disabled in sch.sce - -### i87295 ### -sch.ChXChartAxis::com::sun::star::beans::XPropertySet -sch.ChartLegend::com::sun::star::beans::XPropertySet -- cgit v1.2.3 From 07ba9e0ea0bc6c1f40051d36474023c6a76b4b95 Mon Sep 17 00:00:00 2001 From: Ingrid Halama Date: Fri, 28 May 2010 19:58:46 +0200 Subject: chart47: #i86555# cleanup UNO API tests --- xmloff/qa/unoapi/knownissues.xcl | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/xmloff/qa/unoapi/knownissues.xcl b/xmloff/qa/unoapi/knownissues.xcl index 401d33d9a889..ac15aad11e71 100644 --- a/xmloff/qa/unoapi/knownissues.xcl +++ b/xmloff/qa/unoapi/knownissues.xcl @@ -10,17 +10,6 @@ xmloff.Impress.XMLImporter::com::sun::star::xml::sax::XDocumentHandler xmloff.Impress.XMLMetaImporter::com::sun::star::xml::sax::XDocumentHandler xmloff.Impress.XMLStylesImporter::com::sun::star::xml::sax::XDocumentHandler -### i86555 ### -xmloff.Chart.XMLExporter::com::sun::star::document::XFilter -xmloff.Chart.XMLContentExporter::com::sun::star::document::XFilter -xmloff.Impress.XMLSettingsExporter::com::sun::star::document::XFilter -xmloff.Impress.XMLMetaExporter::com::sun::star::document::XFilter -xmloff.Impress.XMLImporter::com::sun::star::document::XFilter -xmloff.Impress.XMLExporter::com::sun::star::document::XFilter -xmloff.Draw.XMLContentExporter::com::sun::star::document::XFilter -xmloff.Draw.XMLMetaExporter::com::sun::star::document::XFilter -xmloff.Draw.XMLSettingsImporter::com::sun::star::document::XFilter - ### i87695 ### xmloff.Draw.XMLStylesExporter xmloff.Impress.XMLStylesExporter -- cgit v1.2.3 From b078cc62e4e07c0259d54ff0cd3236fa3182d377 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 31 May 2010 09:33:12 +0200 Subject: unoawt: for ill-behaved clients which do not provide a page, have an empty page as fallback --- svtools/source/uno/wizard/wizardshell.cxx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/svtools/source/uno/wizard/wizardshell.cxx b/svtools/source/uno/wizard/wizardshell.cxx index fb78e4a7bd11..28591e1616f6 100644 --- a/svtools/source/uno/wizard/wizardshell.cxx +++ b/svtools/source/uno/wizard/wizardshell.cxx @@ -232,7 +232,13 @@ namespace svt { namespace uno ::boost::shared_ptr< WizardPageController > pController( new WizardPageController( *this, m_xController, impl_stateToPageId( i_nState ) ) ); TabPage* pPage = pController->getTabPage(); - ENSURE_OR_RETURN( pPage != NULL, "WizardShell::createPage: illegal tab page!", NULL ); + OSL_ENSURE( pPage != NULL, "WizardShell::createPage: illegal tab page!" ); + if ( pPage == NULL ) + { + // fallback for ill-behaved clients: empty page + pPage = new TabPage( this, 0 ); + pPage->SetSizePixel( LogicToPixel( Size( 280, 185 ), MAP_APPFONT ) ); + } m_aPageControllers[ pPage ] = pController; return pPage; @@ -256,6 +262,7 @@ namespace svt { namespace uno { DBG_UNHANDLED_EXCEPTION(); } + // fallback for ill-behaved clients: the numeric state return String::CreateFromInt32( i_nState ); } -- cgit v1.2.3 From 20e0ef59cf0a3b44b6c665f035ead0f0ba43484d Mon Sep 17 00:00:00 2001 From: hb Date: Mon, 31 May 2010 11:21:00 +0200 Subject: hb33issues01: building errors in sw --- sw/inc/swtblfmt.hxx | 2 +- sw/source/filter/rtf/wrtrtf.cxx | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/sw/inc/swtblfmt.hxx b/sw/inc/swtblfmt.hxx index 33d38e42ba55..96479197cde6 100644 --- a/sw/inc/swtblfmt.hxx +++ b/sw/inc/swtblfmt.hxx @@ -31,7 +31,7 @@ class SwDoc; -class SwTableFmt : public SwFrmFmt +class SW_DLLPUBLIC SwTableFmt : public SwFrmFmt { friend class SwDoc; diff --git a/sw/source/filter/rtf/wrtrtf.cxx b/sw/source/filter/rtf/wrtrtf.cxx index 2d3a3cccd316..8e17bee3874b 100644 --- a/sw/source/filter/rtf/wrtrtf.cxx +++ b/sw/source/filter/rtf/wrtrtf.cxx @@ -85,9 +85,6 @@ const sal_Char SwRTFWriter::sNewLine = '\012'; const sal_Char __FAR_DATA SwRTFWriter::sNewLine[] = "\015\012"; #endif -static ::rtl::OUString aEmpty; - - SV_DECL_VARARR( RTFColorTbl, Color, 5, 8 ) SV_IMPL_VARARR( RTFColorTbl, Color ) -- cgit v1.2.3 From 73637454a30efca9e4f515da64975037def535fd Mon Sep 17 00:00:00 2001 From: Christian Lippka Date: Mon, 31 May 2010 13:10:15 +0200 Subject: #i111928# do not crash when there are fields in an annotation --- sd/source/ui/app/sdmod2.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sd/source/ui/app/sdmod2.cxx b/sd/source/ui/app/sdmod2.cxx index 9aa36ddd3f82..58aba6823d3a 100644 --- a/sd/source/ui/app/sdmod2.cxx +++ b/sd/source/ui/app/sdmod2.cxx @@ -171,9 +171,10 @@ IMPL_LINK(SdModule, CalcFieldValueHdl, EditFieldInfo*, pInfo) ::sd::DrawDocShell* pDocShell = NULL; SdDrawDocument* pDoc = 0; - if( pInfo->GetOutliner() ) + SdrOutliner* pSdrOutliner = dynamic_cast< SdrOutliner* >( pInfo->GetOutliner() ); + if( pSdrOutliner ) { - const SdrTextObj* pTextObj = static_cast< SdrOutliner* >( pInfo->GetOutliner() )->GetTextObj(); + const SdrTextObj* pTextObj = pSdrOutliner->GetTextObj(); if( pTextObj ) pDoc = dynamic_cast< SdDrawDocument* >( pTextObj->GetModel() ); -- cgit v1.2.3 From f425cc4944368dbd9449cdcc164035ba8707e46c Mon Sep 17 00:00:00 2001 From: Christian Lippka Date: Mon, 31 May 2010 13:10:15 +0200 Subject: #i111928# do not crash when there are fields in an annotation --- svx/source/svdraw/svdoutl.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/svx/source/svdraw/svdoutl.cxx b/svx/source/svdraw/svdoutl.cxx index e4b27766a265..79e74a3382b8 100644 --- a/svx/source/svdraw/svdoutl.cxx +++ b/svx/source/svdraw/svdoutl.cxx @@ -125,5 +125,8 @@ XubString SdrOutliner::CalcFieldValue(const SvxFieldItem& rField, USHORT nPara, const SdrTextObj* SdrOutliner::GetTextObj() const { - return static_cast< SdrTextObj* >( mpTextObj.get() ); + if( mpTextObj.is() ) + return static_cast< SdrTextObj* >( mpTextObj.get() ); + else + return 0; } -- cgit v1.2.3 From 7844f1e00cc847d08783f5eb2089d597fa87ddc8 Mon Sep 17 00:00:00 2001 From: Ingrid Halama Date: Mon, 31 May 2010 13:44:48 +0200 Subject: chart47: #i83866# reset to 2D to speed up following tests --- .../java/ifc/chart/_Chart3DBarProperties.java | 34 ++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/qadevOOo/tests/java/ifc/chart/_Chart3DBarProperties.java b/qadevOOo/tests/java/ifc/chart/_Chart3DBarProperties.java index f289d68983ce..531ec39478ed 100644 --- a/qadevOOo/tests/java/ifc/chart/_Chart3DBarProperties.java +++ b/qadevOOo/tests/java/ifc/chart/_Chart3DBarProperties.java @@ -93,6 +93,40 @@ public class _Chart3DBarProperties extends MultiPropertyTest { throw new StatusException("Couldn't change Diagram to 3D", e); } } + + /** + * Sets the diagram back to 2D as 2D rendering is much faster for the following tests. + */ + protected void after() { + log.println("Setting Diagram back to 2D"); + XChartDocument doc = (XChartDocument) tEnv.getObjRelation("CHARTDOC"); + if (doc == null) throw new StatusException(Status.failed + ("Relation 'CHARTDOC' not found")); + + log.println("Change Diagram to 3D"); + oObj = (XPropertySet) + UnoRuntime.queryInterface( XPropertySet.class, doc.getDiagram() ); + try { + oObj.setPropertyValue("Dim3D", new Boolean(false)); + } catch(com.sun.star.lang.WrappedTargetException e) { + log.println("Couldn't change Diagram back to 2D"); + e.printStackTrace(log); + throw new StatusException("Couldn't change Diagram back to 2D", e); + } catch(com.sun.star.lang.IllegalArgumentException e) { + log.println("Couldn't change Diagram back to 2D"); + e.printStackTrace(log); + throw new StatusException("Couldn't change Diagram back to 2D", e); + } catch(com.sun.star.beans.PropertyVetoException e) { + log.println("Couldn't change Diagram back to 2D"); + e.printStackTrace(log); + throw new StatusException("Couldn't change Diagram back to 2D", e); + } catch(com.sun.star.beans.UnknownPropertyException e) { + log.println("Couldn't change Diagram back to 2D"); + e.printStackTrace(log); + throw new StatusException("Couldn't change Diagram back to 2D", e); + } + } + } // finish class _Chart3DBarProperties -- cgit v1.2.3 From 51b841bd25d0a3f0a5a9008542a3290090766492 Mon Sep 17 00:00:00 2001 From: Ingrid Halama Date: Mon, 31 May 2010 13:54:25 +0200 Subject: chart47: #i83867# enable test again --- chart2/qa/unoapi/sch.sce | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chart2/qa/unoapi/sch.sce b/chart2/qa/unoapi/sch.sce index 6f2df6fbb36d..2fbf282c0ed5 100644 --- a/chart2/qa/unoapi/sch.sce +++ b/chart2/qa/unoapi/sch.sce @@ -16,7 +16,7 @@ -o sch.ChXChartData -o sch.ChXChartDataArray -o sch.ChXChartView -#i83867 -o sch.ChXDataPoint +-o sch.ChXDataPoint #i83868 -o sch.ChXDataRow #i87138 -o sch.ChXDiagram -o sch.ChartArea -- cgit v1.2.3 From 95bd2079a501ba3083e150b2d42afe07bed31883 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Mon, 31 May 2010 13:57:10 +0200 Subject: solve ambiguity between ::Color and com::sun::star::util::Color --- framework/source/services/backingwindow.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/framework/source/services/backingwindow.cxx b/framework/source/services/backingwindow.cxx index f39426190b27..19afbc29d843 100644 --- a/framework/source/services/backingwindow.cxx +++ b/framework/source/services/backingwindow.cxx @@ -65,7 +65,6 @@ using namespace ::com::sun::star::beans; using namespace ::com::sun::star::frame; -using namespace ::com::sun::star::util; using namespace ::com::sun::star::uno; using namespace ::com::sun::star; using namespace framework; @@ -372,7 +371,7 @@ void BackingWindow::prepareRecentFileMenu() else { // Use INetURLObject to abbreviate all other URLs - Reference< XStringWidth > xStringLength( new RecentFilesStringLength() ); + Reference< util::XStringWidth > xStringLength( new RecentFilesStringLength() ); aMenuTitle = aURLObj.getAbbreviated( xStringLength, 46, INetURLObject::DECODE_UNAMBIGUOUS ); } rtl::OUStringBuffer aBuf( aMenuTitle.getLength() + 5 ); -- cgit v1.2.3 From dbafc22792c13d5f909447d84525a9d923430266 Mon Sep 17 00:00:00 2001 From: Ingrid Halama Date: Mon, 31 May 2010 13:58:16 +0200 Subject: chart47: #i87138# enable test again --- chart2/qa/unoapi/sch.sce | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chart2/qa/unoapi/sch.sce b/chart2/qa/unoapi/sch.sce index 2fbf282c0ed5..b35dec7c2ef4 100644 --- a/chart2/qa/unoapi/sch.sce +++ b/chart2/qa/unoapi/sch.sce @@ -18,7 +18,7 @@ -o sch.ChXChartView -o sch.ChXDataPoint #i83868 -o sch.ChXDataRow -#i87138 -o sch.ChXDiagram +-o sch.ChXDiagram -o sch.ChartArea -o sch.ChartGrid -o sch.ChartLegend -- cgit v1.2.3 From b00bc48046d9f886d172cb7be09a219dec554bab Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Mon, 31 May 2010 17:06:03 +0200 Subject: l10ntooling18: #i110687# fetch cfg file from solver --- l10ntools/prj/d.lst | 1 + 1 file changed, 1 insertion(+) diff --git a/l10ntools/prj/d.lst b/l10ntools/prj/d.lst index f75c16b43764..1eb46aafc08b 100644 --- a/l10ntools/prj/d.lst +++ b/l10ntools/prj/d.lst @@ -50,6 +50,7 @@ mkdir: %_DEST%\bin%_EXT%\help\com\sun\star\help ..\inc\l10ntools\directory.hxx %_DEST%\inc%_EXT%\l10ntools\directory.hxx ..\inc\l10ntools\file.hxx %_DEST%\inc%_EXT%\l10ntools\file.hxx ..\inc\l10ntools\vosapp.hxx %_DEST%\inc%_EXT%\l10ntools\vosapp.hxx +..\source\filter\merge\FCFGMerge.cfg %_DEST%\inc%_EXT%\l10ntools\FCFGMerge.cfg ..\inc\utf8conv.hxx %_DEST%\inc%_EXT%\l10ntools\utf8conv.hxx ..\%__SRC%\lib\transex.lib %_DEST%\lib%_EXT%\transex.lib -- cgit v1.2.3 From 5aef3dd5973bc93500f1ab109ad7f91b4da7e9b0 Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Mon, 31 May 2010 17:06:03 +0200 Subject: l10ntooling18: #i110687# fetch cfg file from solver --- filter/source/config/tools/merge/pyAltFCFGMerge | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/filter/source/config/tools/merge/pyAltFCFGMerge b/filter/source/config/tools/merge/pyAltFCFGMerge index 8abf7e08df70..fd648a9a7e03 100755 --- a/filter/source/config/tools/merge/pyAltFCFGMerge +++ b/filter/source/config/tools/merge/pyAltFCFGMerge @@ -11,8 +11,7 @@ import sys, string, os.path -# This is ugly, please take the file from solver output tree -CFGFILE = "../../../../l10ntools/source/filter/merge/FCFGMerge.cfg" +CFGFILE = os.environ["SOLARVER"] + "/" + os.environ["INPATH"] + "/inc/l10ntools/FCFGMerge.cfg" PROP_XMLVERSION = "xmlversion" # // <= global cfg file PROP_XMLENCODING = "xmlencoding" # // <= global cfg file -- cgit v1.2.3 -- cgit v1.2.3 From 5b4fd6574fc2b3ce79e62c65ff4f54732626ed2e Mon Sep 17 00:00:00 2001 From: Hans-Joachim Lankenau Date: Mon, 31 May 2010 19:26:13 +0200 Subject: ause120: #i110479# - applied patch: temporary kick stlport include path out of SOLARINC --- soltools/util/makefile.pmk | 4 ++++ 1 file changed, 4 insertions(+) mode change 100644 => 100755 soltools/util/makefile.pmk diff --git a/soltools/util/makefile.pmk b/soltools/util/makefile.pmk old mode 100644 new mode 100755 index 33c04cf547eb..bf51cf851b4c --- a/soltools/util/makefile.pmk +++ b/soltools/util/makefile.pmk @@ -34,6 +34,10 @@ ADJUSTVISIBILITY=$(AUGMENT_LIBRARY_PATH) $(BIN)$/adjustvisibility # avoid STLPort NO_DEFAULT_STL=TRUE SOLARINC!:=$(subst,/stl$(SPACECHAR),dont_use_stl$(SPACECHAR) $(SOLARINC)) +.IF "$(STLPORT4)" != "" +SOLARINC!:=$(subst,$(STLPORT4)/include/stlport,dont_use_stl$(SPACECHAR) $(SOLARINC)) +SOLARINC!:=$(subst,$(STLPORT4)/stlport,dont_use_stl$(SPACECHAR) $(SOLARINC)) +.ENDIF .IF "$(OS)"=="SOLARIS" # hack due to #i53089# -- cgit v1.2.3 From 5ce94ca44025131ce60f0455c13ebb10baf42038 Mon Sep 17 00:00:00 2001 From: Ingo Schmidt Date: Tue, 1 Jun 2010 10:37:26 +0200 Subject: native305 #i92977# new Windows INSTALLLOCATION settings --- instsetoo_native/util/makefile.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instsetoo_native/util/makefile.mk b/instsetoo_native/util/makefile.mk index c18f2dad2098..f0b4ace16342 100644 --- a/instsetoo_native/util/makefile.mk +++ b/instsetoo_native/util/makefile.mk @@ -105,7 +105,7 @@ PKGFORMAT+=$(MAKETARGETS:e:s/.//) # Independent of PKGFORMAT, always build a default-language openoffice product # also in archive format, so that tests that require an OOo installation (like # smoketestoo_native) have one available: -# openoffice_$(defaultlangiso) : $$@.archive +openoffice_$(defaultlangiso) : $$@.archive .IF "$(VERBOSE)"=="TRUE" VERBOSESWITCH=-verbose -- cgit v1.2.3 From 757ea8f89a27e1fe0878a1bdf66cc2dc6a1a766c Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Tue, 1 Jun 2010 12:50:46 +0200 Subject: unoawt: XWizardController::confirmDeactivatePage is not necessary, /me thinks --- svtools/source/uno/wizard/wizardshell.cxx | 24 ------------------------ svtools/source/uno/wizard/wizardshell.hxx | 1 - 2 files changed, 25 deletions(-) diff --git a/svtools/source/uno/wizard/wizardshell.cxx b/svtools/source/uno/wizard/wizardshell.cxx index 28591e1616f6..7737b214ac1f 100644 --- a/svtools/source/uno/wizard/wizardshell.cxx +++ b/svtools/source/uno/wizard/wizardshell.cxx @@ -155,30 +155,6 @@ namespace svt { namespace uno } } - //------------------------------------------------------------------------------------------------------------------ - sal_Bool WizardShell::prepareLeaveCurrentState( CommitPageReason i_eReason ) - { - if ( !WizardShell_Base::prepareLeaveCurrentState( i_eReason ) ) - return sal_False; - - if ( !m_xController.is() ) - return sal_True; - - try - { - return m_xController->confirmDeactivatePage( - impl_stateToPageId( getCurrentState() ), - convertCommitReasonToTravelType( i_eReason ) - ); - } - catch( const Exception& ) - { - DBG_UNHANDLED_EXCEPTION(); - } - - return sal_True; - } - //------------------------------------------------------------------------------------------------------------------ sal_Bool WizardShell::leaveState( WizardState i_nState ) { diff --git a/svtools/source/uno/wizard/wizardshell.hxx b/svtools/source/uno/wizard/wizardshell.hxx index ffe4c1fc37f8..7cc656832d81 100644 --- a/svtools/source/uno/wizard/wizardshell.hxx +++ b/svtools/source/uno/wizard/wizardshell.hxx @@ -66,7 +66,6 @@ namespace svt { namespace uno // OWizardMachine overridables virtual TabPage* createPage( WizardState i_nState ); virtual void enterState( WizardState i_nState ); - virtual sal_Bool prepareLeaveCurrentState( CommitPageReason _eReason ); virtual sal_Bool leaveState( WizardState i_nState ); virtual String getStateDisplayName( WizardState i_nState ) const; virtual bool canAdvance() const; -- cgit v1.2.3 From f6c1c0f3626c8212bd1d95a91d8d1f113ce910da Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Tue, 1 Jun 2010 12:50:46 +0200 Subject: unoawt: XWizardController::confirmDeactivatePage is not necessary, /me thinks --- offapi/com/sun/star/ui/dialogs/XWizardController.idl | 12 ------------ offapi/com/sun/star/ui/dialogs/XWizardPage.idl | 3 --- 2 files changed, 15 deletions(-) diff --git a/offapi/com/sun/star/ui/dialogs/XWizardController.idl b/offapi/com/sun/star/ui/dialogs/XWizardController.idl index abcec1ce6ef6..6a51a67360fe 100644 --- a/offapi/com/sun/star/ui/dialogs/XWizardController.idl +++ b/offapi/com/sun/star/ui/dialogs/XWizardController.idl @@ -65,18 +65,6 @@ interface XWizardController */ void onActivatePage( [in] short PageId ); - /** called when the current page is about to be left - -

      In opposite to XWizardPage::commitPage, confirmDeactivatePage is intended for checking - conditions which involve more than the state of the currently active page.

      - - @param PageId - the ID of the page which is about to be left. - @param Reason - is one of the WizardTravelType contants denoting the reason why the page is about to be left. - */ - boolean confirmDeactivatePage( [in] short PageId, [in] short Reason ); - /** called when a page in the wizard is being deactivated */ void onDeactivatePage( [in] short PageId ); diff --git a/offapi/com/sun/star/ui/dialogs/XWizardPage.idl b/offapi/com/sun/star/ui/dialogs/XWizardPage.idl index 50f3212e1cf2..149f8c14709b 100644 --- a/offapi/com/sun/star/ui/dialogs/XWizardPage.idl +++ b/offapi/com/sun/star/ui/dialogs/XWizardPage.idl @@ -58,9 +58,6 @@ interface XWizardPage : ::com::sun::star::lang::XComponent

      An implementation can veto the leave by returning here. Usually, the decision about this depends on the current state of the page.

      -

      Note that XWizardPage::commitPage is called before XWizardController::confirmDeactivatePage - gets called.

      - @param Reason is one of the WizardTravelType contants denoting the reason why the page should be committed. -- cgit v1.2.3 From 3ae1cc5897375fa0016a32c0bfedc184a72d8542 Mon Sep 17 00:00:00 2001 From: Henning Brinkmann Date: Tue, 1 Jun 2010 12:53:45 +0200 Subject: hb33issues: #i111595# check for NULL pointer --- sw/source/filter/ww8/ww8par.cxx | 91 +++++++++++++++++++++-------------------- 1 file changed, 47 insertions(+), 44 deletions(-) diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 3cf85185b434..7f8693e2dd62 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -573,60 +573,63 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt, aSet.Put( SdrTextVertAdjustItem( eTVA ) ); aSet.Put( SdrTextHorzAdjustItem( eTHA ) ); - pObj->SetMergedItemSet(aSet); - pObj->SetModel(pSdrModel); + if (pObj != NULL) + { + pObj->SetMergedItemSet(aSet); + pObj->SetModel(pSdrModel); - if (bVerticalText && dynamic_cast< SdrTextObj* >( pObj ) ) - dynamic_cast< SdrTextObj* >( pObj )->SetVerticalWriting(sal_True); + if (bVerticalText && dynamic_cast< SdrTextObj* >( pObj ) ) + dynamic_cast< SdrTextObj* >( pObj )->SetVerticalWriting(sal_True); - if ( bIsSimpleDrawingTextBox ) - { - if ( nTextRotationAngle ) + if ( bIsSimpleDrawingTextBox ) { - long nMinWH = rTextRect.GetWidth() < rTextRect.GetHeight() ? - rTextRect.GetWidth() : rTextRect.GetHeight(); - nMinWH /= 2; - Point aPivot(rTextRect.TopLeft()); - aPivot.X() += nMinWH; - aPivot.Y() += nMinWH; - double a = nTextRotationAngle * nPi180; - pObj->NbcRotate(aPivot, nTextRotationAngle, sin(a), cos(a)); + if ( nTextRotationAngle ) + { + long nMinWH = rTextRect.GetWidth() < rTextRect.GetHeight() ? + rTextRect.GetWidth() : rTextRect.GetHeight(); + nMinWH /= 2; + Point aPivot(rTextRect.TopLeft()); + aPivot.X() += nMinWH; + aPivot.Y() += nMinWH; + double a = nTextRotationAngle * nPi180; + pObj->NbcRotate(aPivot, nTextRotationAngle, sin(a), cos(a)); + } } - } - if ( ( ( rObjData.nSpFlags & SP_FFLIPV ) || mnFix16Angle || nTextRotationAngle ) && dynamic_cast< SdrObjCustomShape* >( pObj ) ) - { - SdrObjCustomShape* pCustomShape = dynamic_cast< SdrObjCustomShape* >( pObj ); + if ( ( ( rObjData.nSpFlags & SP_FFLIPV ) || mnFix16Angle || nTextRotationAngle ) && dynamic_cast< SdrObjCustomShape* >( pObj ) ) + { + SdrObjCustomShape* pCustomShape = dynamic_cast< SdrObjCustomShape* >( pObj ); - double fExtraTextRotation = 0.0; - if ( mnFix16Angle && !( GetPropertyValue( DFF_Prop_FitTextToShape ) & 4 ) ) - { // text is already rotated, we have to take back the object rotation if DFF_Prop_RotateText is false - fExtraTextRotation = -mnFix16Angle; - } - if ( rObjData.nSpFlags & SP_FFLIPV ) // sj: in ppt the text is flipped, whereas in word the text - { // remains unchanged, so we have to take back the flipping here - fExtraTextRotation += 18000.0; // because our core will flip text if the shape is flipped. + double fExtraTextRotation = 0.0; + if ( mnFix16Angle && !( GetPropertyValue( DFF_Prop_FitTextToShape ) & 4 ) ) + { // text is already rotated, we have to take back the object rotation if DFF_Prop_RotateText is false + fExtraTextRotation = -mnFix16Angle; + } + if ( rObjData.nSpFlags & SP_FFLIPV ) // sj: in ppt the text is flipped, whereas in word the text + { // remains unchanged, so we have to take back the flipping here + fExtraTextRotation += 18000.0; // because our core will flip text if the shape is flipped. + } + fExtraTextRotation += nTextRotationAngle; + if ( !::basegfx::fTools::equalZero( fExtraTextRotation ) ) + { + fExtraTextRotation /= 100.0; + SdrCustomShapeGeometryItem aGeometryItem( (SdrCustomShapeGeometryItem&)pCustomShape->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) ); + const rtl::OUString sTextRotateAngle( RTL_CONSTASCII_USTRINGPARAM ( "TextRotateAngle" ) ); + com::sun::star::beans::PropertyValue aPropVal; + aPropVal.Name = sTextRotateAngle; + aPropVal.Value <<= fExtraTextRotation; + aGeometryItem.SetPropertyValue( aPropVal ); + pCustomShape->SetMergedItem( aGeometryItem ); + } } - fExtraTextRotation += nTextRotationAngle; - if ( !::basegfx::fTools::equalZero( fExtraTextRotation ) ) + else if ( mnFix16Angle ) { - fExtraTextRotation /= 100.0; - SdrCustomShapeGeometryItem aGeometryItem( (SdrCustomShapeGeometryItem&)pCustomShape->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) ); - const rtl::OUString sTextRotateAngle( RTL_CONSTASCII_USTRINGPARAM ( "TextRotateAngle" ) ); - com::sun::star::beans::PropertyValue aPropVal; - aPropVal.Name = sTextRotateAngle; - aPropVal.Value <<= fExtraTextRotation; - aGeometryItem.SetPropertyValue( aPropVal ); - pCustomShape->SetMergedItem( aGeometryItem ); + // rotate text with shape ? + double a = mnFix16Angle * nPi180; + pObj->NbcRotate( rObjData.aBoundRect.Center(), mnFix16Angle, + sin( a ), cos( a ) ); } } - else if ( mnFix16Angle ) - { - // rotate text with shape ? - double a = mnFix16Angle * nPi180; - pObj->NbcRotate( rObjData.aBoundRect.Center(), mnFix16Angle, - sin( a ), cos( a ) ); - } } else if( !pObj ) { -- cgit v1.2.3 From ab3f1411d1644ed1bb227e69f6f85a75a9c27aa2 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Tue, 1 Jun 2010 13:53:53 +0200 Subject: unoawt: StartDrag: do not release the mouse if DnD isn't enabled at all, this will confuse the SelectionEngine --- svtools/source/contnr/svlbox.cxx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/svtools/source/contnr/svlbox.cxx b/svtools/source/contnr/svlbox.cxx index dd19879e73b7..fb71f64772ad 100644 --- a/svtools/source/contnr/svlbox.cxx +++ b/svtools/source/contnr/svlbox.cxx @@ -1775,10 +1775,14 @@ void SvLBox::StartDrag( sal_Int8, const Point& rPosPixel ) { DBG_CHKTHIS(SvLBox,0); + nOldDragMode = GetDragDropMode(); + if ( !nOldDragMode ) + return; + ReleaseMouse(); + SvLBoxEntry* pEntry = GetEntry( rPosPixel ); // GetDropTarget( rPos ); - nOldDragMode = GetDragDropMode(); - if( !pEntry || !nOldDragMode ) + if( !pEntry ) { DragFinished( DND_ACTION_NONE ); return; -- cgit v1.2.3 From 9e2ed49397eda707bca5326d09ff58b10fa05147 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Tue, 1 Jun 2010 15:03:56 +0200 Subject: unoawt: UNO/SVT wizzards: allow to completely reset the DefaultButton - for pages which have on own default button --- svtools/inc/svtools/wizardmachine.hxx | 1 + svtools/source/dialogs/wizardmachine.cxx | 6 ++++-- svtools/source/uno/wizard/unowizard.cxx | 3 ++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/svtools/inc/svtools/wizardmachine.hxx b/svtools/inc/svtools/wizardmachine.hxx index 05e796646253..02562ac4bb63 100644 --- a/svtools/inc/svtools/wizardmachine.hxx +++ b/svtools/inc/svtools/wizardmachine.hxx @@ -42,6 +42,7 @@ namespace svt //......................................................................... // wizard buttons +#define WZB_NONE 0x0000 #define WZB_NEXT 0x0001 #define WZB_PREVIOUS 0x0002 #define WZB_FINISH 0x0004 diff --git a/svtools/source/dialogs/wizardmachine.cxx b/svtools/source/dialogs/wizardmachine.cxx index 5a5c094c1572..2053da80019d 100644 --- a/svtools/source/dialogs/wizardmachine.cxx +++ b/svtools/source/dialogs/wizardmachine.cxx @@ -355,8 +355,10 @@ namespace svt if (m_pCancel && (_nWizardButtonFlags & WZB_CANCEL)) pNewDefButton = m_pCancel; - if (pNewDefButton) - defaultButton(pNewDefButton); + if ( pNewDefButton ) + defaultButton( pNewDefButton ); + else + implResetDefault( this ); } //--------------------------------------------------------------------- diff --git a/svtools/source/uno/wizard/unowizard.cxx b/svtools/source/uno/wizard/unowizard.cxx index e310aceaca75..9440c0e69f26 100644 --- a/svtools/source/uno/wizard/unowizard.cxx +++ b/svtools/source/uno/wizard/unowizard.cxx @@ -83,6 +83,7 @@ namespace svt { namespace uno { switch ( i_nWizardButton ) { + case WizardButton::NONE: return WZB_NONE; case WizardButton::NEXT: return WZB_NEXT; case WizardButton::PREVIOUS: return WZB_PREVIOUS; case WizardButton::FINISH: return WZB_FINISH; @@ -90,7 +91,7 @@ namespace svt { namespace uno case WizardButton::HELP: return WZB_HELP; } OSL_ENSURE( false, "lcl_convertWizardButtonToWZB: invalid WizardButton constant!" ); - return 0; + return WZB_NONE; } } -- cgit v1.2.3 From ab54a7404ba383265f8a4dca953bcf4bcfd093b8 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Tue, 1 Jun 2010 15:03:56 +0200 Subject: unoawt: UNO/SVT wizzards: allow to completely reset the DefaultButton - for pages which have on own default button --- offapi/com/sun/star/ui/dialogs/WizardButton.idl | 2 ++ offapi/com/sun/star/ui/dialogs/XWizard.idl | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/offapi/com/sun/star/ui/dialogs/WizardButton.idl b/offapi/com/sun/star/ui/dialogs/WizardButton.idl index aeb22910996c..34c0d8074889 100644 --- a/offapi/com/sun/star/ui/dialogs/WizardButton.idl +++ b/offapi/com/sun/star/ui/dialogs/WizardButton.idl @@ -37,6 +37,8 @@ module com { module sun { module star { module ui { module dialogs { */ constants WizardButton { + /// denotes none of the buttons in the wizard + const short NONE = 0; /// denotes the button used to travel forward through the wizard const short NEXT = 1; /// denotes the button used to travel backward through the wizard diff --git a/offapi/com/sun/star/ui/dialogs/XWizard.idl b/offapi/com/sun/star/ui/dialogs/XWizard.idl index 5de5eaa300a4..445f7bbf2a44 100644 --- a/offapi/com/sun/star/ui/dialogs/XWizard.idl +++ b/offapi/com/sun/star/ui/dialogs/XWizard.idl @@ -102,7 +102,8 @@ interface XWizard buttons are unlikely to ever being disabled.

      @param WizardButton - denotes the button to enable or disable, as one of the WizardButton constants + denotes the button to enable or disable, as one of the WizardButton constants. Must not be + WizardButton::NONE. @param Enable specifies whether the button should be enabled () or disabled () */ -- cgit v1.2.3 From 362c118efdc6af00142c0a223e3e41aaae57f09e Mon Sep 17 00:00:00 2001 From: Ingrid Halama Date: Tue, 1 Jun 2010 16:51:03 +0200 Subject: chart47: #i111967# #i83832# some properties are wrongly marked BOUND --- chart2/qa/unoapi/knownissues.xcl | 2 -- .../controller/chartapiwrapper/AxisWrapper.cxx | 36 +++++++++++----------- .../chartapiwrapper/ChartDocumentWrapper.cxx | 19 ++++++------ .../controller/chartapiwrapper/LegendWrapper.cxx | 4 +-- chart2/source/tools/CharacterProperties.cxx | 12 ++++---- 5 files changed, 36 insertions(+), 37 deletions(-) diff --git a/chart2/qa/unoapi/knownissues.xcl b/chart2/qa/unoapi/knownissues.xcl index 726c103592bb..d937b6573435 100644 --- a/chart2/qa/unoapi/knownissues.xcl +++ b/chart2/qa/unoapi/knownissues.xcl @@ -1,7 +1,5 @@ #i83851 sch.ChXChartDocument::com::sun::star::frame::XModel -#i83832 -sch.ChXChartDocument::com::sun::star::beans::XPropertySet #i83833 sch.ChXChartDocument::com::sun::star::chart::XChartDocument #i83834 diff --git a/chart2/source/controller/chartapiwrapper/AxisWrapper.cxx b/chart2/source/controller/chartapiwrapper/AxisWrapper.cxx index 7ac8cec0ad62..6d53fb8b01f6 100644 --- a/chart2/source/controller/chartapiwrapper/AxisWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/AxisWrapper.cxx @@ -149,43 +149,43 @@ void lcl_AddPropertiesToVector( Property( C2U( "AutoMax" ), PROP_AXIS_AUTO_MAX, ::getBooleanCppuType(), - beans::PropertyAttribute::BOUND - | beans::PropertyAttribute::MAYBEDEFAULT )); + //#i111967# no PropertyChangeEvent is fired on change so far + beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( Property( C2U( "AutoMin" ), PROP_AXIS_AUTO_MIN, ::getBooleanCppuType(), - beans::PropertyAttribute::BOUND - | beans::PropertyAttribute::MAYBEDEFAULT )); + //#i111967# no PropertyChangeEvent is fired on change so far + beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( Property( C2U( "AutoStepMain" ), PROP_AXIS_AUTO_STEPMAIN, ::getBooleanCppuType(), - beans::PropertyAttribute::BOUND - | beans::PropertyAttribute::MAYBEDEFAULT )); + //#i111967# no PropertyChangeEvent is fired on change so far + beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( Property( C2U( "AutoStepHelp" ), PROP_AXIS_AUTO_STEPHELP, ::getBooleanCppuType(), - beans::PropertyAttribute::BOUND - | beans::PropertyAttribute::MAYBEDEFAULT )); + //#i111967# no PropertyChangeEvent is fired on change so far + beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( Property( C2U( "Logarithmic" ), PROP_AXIS_LOGARITHMIC, ::getBooleanCppuType(), - beans::PropertyAttribute::BOUND - | beans::PropertyAttribute::MAYBEDEFAULT )); + //#i111967# no PropertyChangeEvent is fired on change so far + beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( Property( C2U( "ReverseDirection" ), PROP_AXIS_REVERSEDIRECTION, ::getBooleanCppuType(), - beans::PropertyAttribute::BOUND - | beans::PropertyAttribute::MAYBEDEFAULT )); + //#i111967# no PropertyChangeEvent is fired on change so far + beans::PropertyAttribute::MAYBEDEFAULT )); //todo: this property is missing in the API rOutProperties.push_back( @@ -219,8 +219,8 @@ void lcl_AddPropertiesToVector( Property( C2U( "AutoOrigin" ), PROP_AXIS_AUTO_ORIGIN, ::getBooleanCppuType(), - beans::PropertyAttribute::BOUND - | beans::PropertyAttribute::MAYBEDEFAULT )); + //#i111967# no PropertyChangeEvent is fired on change so far + beans::PropertyAttribute::MAYBEDEFAULT )); //Properties for interval marks: rOutProperties.push_back( @@ -312,15 +312,15 @@ void lcl_AddPropertiesToVector( Property( C2U( "Overlap" ), PROP_AXIS_OVERLAP, ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), - beans::PropertyAttribute::BOUND - | beans::PropertyAttribute::MAYBEDEFAULT )); + //#i111967# no PropertyChangeEvent is fired on change so far + beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( Property( C2U( "GapWidth" ), PROP_AXIS_GAP_WIDTH, ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), - beans::PropertyAttribute::BOUND - | beans::PropertyAttribute::MAYBEDEFAULT )); + //#i111967# no PropertyChangeEvent is fired on change so far + beans::PropertyAttribute::MAYBEDEFAULT )); } const Sequence< Property > & lcl_GetPropertySequence() diff --git a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx index 5bc61d0fc0b3..f93a0190116d 100644 --- a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx @@ -170,20 +170,20 @@ void lcl_AddPropertiesToVector( Property( C2U( "HasMainTitle" ), PROP_DOCUMENT_HAS_MAIN_TITLE, ::getBooleanCppuType(), - beans::PropertyAttribute::BOUND - | beans::PropertyAttribute::MAYBEDEFAULT )); + //#i111967# no PropertyChangeEvent is fired on change so far + beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( Property( C2U( "HasSubTitle" ), PROP_DOCUMENT_HAS_SUB_TITLE, ::getBooleanCppuType(), - beans::PropertyAttribute::BOUND - | beans::PropertyAttribute::MAYBEDEFAULT )); + //#i111967# no PropertyChangeEvent is fired on change so far + beans::PropertyAttribute::MAYBEDEFAULT )); rOutProperties.push_back( Property( C2U( "HasLegend" ), PROP_DOCUMENT_HAS_LEGEND, ::getBooleanCppuType(), - beans::PropertyAttribute::BOUND - | beans::PropertyAttribute::MAYBEDEFAULT )); + //#i111967# no PropertyChangeEvent is fired on change so far + beans::PropertyAttribute::MAYBEDEFAULT )); // really needed? rOutProperties.push_back( @@ -196,8 +196,8 @@ void lcl_AddPropertiesToVector( Property( C2U( "DataSourceLabelsInFirstColumn" ), PROP_DOCUMENT_LABELS_IN_FIRST_COLUMN, ::getBooleanCppuType(), - beans::PropertyAttribute::BOUND - | beans::PropertyAttribute::MAYBEDEFAULT )); + //#i111967# no PropertyChangeEvent is fired on change so far + beans::PropertyAttribute::MAYBEDEFAULT )); //add-in rOutProperties.push_back( @@ -223,7 +223,8 @@ void lcl_AddPropertiesToVector( Property( C2U( "RefreshAddInAllowed" ), PROP_DOCUMENT_UPDATE_ADDIN, ::getBooleanCppuType(), - beans::PropertyAttribute::BOUND )); + //#i111967# no PropertyChangeEvent is fired on change so far + beans::PropertyAttribute::TRANSIENT )); // table:null-date // i99104 rOutProperties.push_back( diff --git a/chart2/source/controller/chartapiwrapper/LegendWrapper.cxx b/chart2/source/controller/chartapiwrapper/LegendWrapper.cxx index 5d4f3e718ff9..02ffcb942c99 100644 --- a/chart2/source/controller/chartapiwrapper/LegendWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/LegendWrapper.cxx @@ -242,8 +242,8 @@ void lcl_AddPropertiesToVector( Property( C2U( "Alignment" ), PROP_LEGEND_ALIGNMENT, ::getCppuType( reinterpret_cast< const ::com::sun::star::chart::ChartLegendPosition * >(0)), - beans::PropertyAttribute::BOUND - | beans::PropertyAttribute::MAYBEDEFAULT )); + //#i111967# no PropertyChangeEvent is fired on change so far + beans::PropertyAttribute::MAYBEDEFAULT )); } const Sequence< Property > & lcl_GetPropertySequence() diff --git a/chart2/source/tools/CharacterProperties.cxx b/chart2/source/tools/CharacterProperties.cxx index 3b39609f8b85..cca655780a79 100644 --- a/chart2/source/tools/CharacterProperties.cxx +++ b/chart2/source/tools/CharacterProperties.cxx @@ -254,8 +254,8 @@ void CharacterProperties::AddPropertiesToVector( Property( C2U( "CharLocale" ), PROP_CHAR_LOCALE, ::getCppuType( reinterpret_cast< const lang::Locale * >(0)), - beans::PropertyAttribute::BOUND - | beans::PropertyAttribute::MAYBEDEFAULT )); + //#i111967# no PropertyChangeEvent is fired on change so far + beans::PropertyAttribute::MAYBEDEFAULT )); // CharShadowed rOutProperties.push_back( Property( C2U( "CharShadowed" ), @@ -385,8 +385,8 @@ void CharacterProperties::AddPropertiesToVector( Property( C2U( "CharLocaleAsian" ), PROP_CHAR_ASIAN_LOCALE, ::getCppuType( reinterpret_cast< const lang::Locale * >(0)), - beans::PropertyAttribute::BOUND - | beans::PropertyAttribute::MAYBEDEFAULT )); + //#i111967# no PropertyChangeEvent is fired on change so far + beans::PropertyAttribute::MAYBEDEFAULT )); // CharacterPropertiesComplex // === @@ -452,8 +452,8 @@ void CharacterProperties::AddPropertiesToVector( Property( C2U( "CharLocaleComplex" ), PROP_CHAR_COMPLEX_LOCALE, ::getCppuType( reinterpret_cast< const lang::Locale * >(0)), - beans::PropertyAttribute::BOUND - | beans::PropertyAttribute::MAYBEDEFAULT )); + //#i111967# no PropertyChangeEvent is fired on change so far + beans::PropertyAttribute::MAYBEDEFAULT )); // Writing Mode left to right vs right to left rOutProperties.push_back( -- cgit v1.2.3 From 96db846b27248466a27113d25b090a5908bc9fbb Mon Sep 17 00:00:00 2001 From: Ingrid Halama Date: Tue, 1 Jun 2010 17:06:19 +0200 Subject: chart47: #i111966# don't use a random property - test all properties instead --- qadevOOo/tests/java/ifc/beans/_XPropertySet.java | 484 +++++++++++++---------- 1 file changed, 268 insertions(+), 216 deletions(-) diff --git a/qadevOOo/tests/java/ifc/beans/_XPropertySet.java b/qadevOOo/tests/java/ifc/beans/_XPropertySet.java index 54c1f3431bbf..dfc135843b44 100644 --- a/qadevOOo/tests/java/ifc/beans/_XPropertySet.java +++ b/qadevOOo/tests/java/ifc/beans/_XPropertySet.java @@ -27,8 +27,7 @@ package ifc.beans; -import java.util.Random; -import java.util.StringTokenizer; +import java.util.Vector; import lib.MultiMethodTest; import util.ValueChanger; @@ -102,13 +101,13 @@ public class _XPropertySet extends MultiMethodTest { private final XVetoableChangeListener VClistener = new MyVetoListener(); /** - * Structure that collects three properties of each type to test : + * Structure that collects the properties of different types to test : * Constrained, Bound and Normal. */ private final class PropsToTest { - String constrained = null; - String bound = null; - String normal = null; + Vector< String > constrained = new Vector< String >(); + Vector< String > bound = new Vector< String >(); + Vector< String > normal = new Vector< String >(); } private final PropsToTest PTT = new PropsToTest(); @@ -133,9 +132,12 @@ public class _XPropertySet extends MultiMethodTest { log.println("getPropertySetInfo() method returned null"); tRes.tested("getPropertySetInfo()", true) ; String[] ptt = (String[]) tEnv.getObjRelation("PTT"); - PTT.normal=ptt[0]; - PTT.bound=ptt[1]; - PTT.constrained=ptt[2]; + PTT.normal.clear(); + PTT.bound.clear(); + PTT.constrained.clear(); + PTT.normal.add( ptt[0] ); + PTT.bound.add( ptt[1] ); + PTT.constrained.add( ptt[2] ); } else { tRes.tested("getPropertySetInfo()", true ); getPropsToTest(propertySetInfo); @@ -161,41 +163,46 @@ public class _XPropertySet extends MultiMethodTest { requiredMethod("getPropertySetInfo()"); - propertyChanged = false; - - - if ( PTT.bound.equals("none") ) { + int count = PTT.bound.size(); + if ( count==0 || PTT.bound.get(0).equals("none") ) { log.println("*** No bound properties found ***"); tRes.tested("addPropertyChangeListener()", true) ; } else { - try { - oObj.addPropertyChangeListener(PTT.bound,PClistener); - Object gValue = oObj.getPropertyValue(PTT.bound); - oObj.setPropertyValue(PTT.bound, - ValueChanger.changePValue(gValue)); - } catch (com.sun.star.beans.PropertyVetoException e) { - log.println("Exception occured while trying to change "+ - "property '"+ PTT.bound+"'"); - e.printStackTrace(log); - } catch (com.sun.star.lang.IllegalArgumentException e) { - log.println("Exception occured while trying to change "+ - "property '"+ PTT.bound+"'"); - e.printStackTrace(log); - } catch (com.sun.star.beans.UnknownPropertyException e) { - log.println("Exception occured while trying to change "+ - "property '"+ PTT.bound+"'"); - e.printStackTrace(log); - } catch (com.sun.star.lang.WrappedTargetException e) { - log.println("Exception occured while trying to change "+ - "property '"+ PTT.bound+"'"); - e.printStackTrace(log); - } // end of try-catch - tRes.tested("addPropertyChangeListener()", propertyChanged); - if (!propertyChanged) { - log.println("propertyChangeListener wasn't called for '"+ - PTT.bound+"'"); + boolean error = false; + for (int i = 0; i < count; i++) { + String propertyName = PTT.bound.get(i); + propertyChanged = false; + try { + oObj.addPropertyChangeListener(propertyName,PClistener); + Object gValue = oObj.getPropertyValue(propertyName); + log.println("Check bound property: " + propertyName ); + oObj.setPropertyValue(propertyName, + ValueChanger.changePValue(gValue)); + } catch (com.sun.star.beans.PropertyVetoException e) { + log.println("Exception occured while trying to change "+ + "property '"+ propertyName+"'"); + e.printStackTrace(log); + } catch (com.sun.star.lang.IllegalArgumentException e) { + log.println("Exception occured while trying to change "+ + "property '"+ propertyName+"'"); + e.printStackTrace(log); + } catch (com.sun.star.beans.UnknownPropertyException e) { + log.println("Exception occured while trying to change "+ + "property '"+ propertyName+"'"); + e.printStackTrace(log); + } catch (com.sun.star.lang.WrappedTargetException e) { + log.println("Exception occured while trying to change "+ + "property '"+ propertyName+"'"); + e.printStackTrace(log); + } // end of try-catch + error = error || !propertyChanged; + if (!propertyChanged) { + log.println("propertyChangeListener wasn't called for '"+ + propertyName+"'"); + } } - } //endif + tRes.tested("addPropertyChangeListener()", !error); + } return; @@ -217,40 +224,45 @@ public class _XPropertySet extends MultiMethodTest { requiredMethod("getPropertySetInfo()"); - vetoableChanged = false; - - if ( PTT.constrained.equals("none") ) { + int count = PTT.constrained.size(); + if ( count==0 || PTT.constrained.get(0).equals("none") ) { log.println("*** No constrained properties found ***"); tRes.tested("addVetoableChangeListener()", true) ; } else { - try { - oObj.addVetoableChangeListener(PTT.constrained,VClistener); - Object gValue = oObj.getPropertyValue(PTT.constrained); - oObj.setPropertyValue(PTT.constrained, - ValueChanger.changePValue(gValue)); - } catch (com.sun.star.beans.PropertyVetoException e) { - log.println("Exception occured while trying to change "+ - "property '"+ PTT.constrained+"'"); - e.printStackTrace(log); - } catch (com.sun.star.lang.IllegalArgumentException e) { - log.println("Exception occured while trying to change "+ - "property '"+ PTT.constrained+"'"); - e.printStackTrace(log); - } catch (com.sun.star.beans.UnknownPropertyException e) { - log.println("Exception occured while trying to change "+ - "property '"+ PTT.constrained+"'"); - e.printStackTrace(log); - } catch (com.sun.star.lang.WrappedTargetException e) { - log.println("Exception occured while trying to change "+ - "property '"+ PTT.constrained+"'"); - e.printStackTrace(log); - } // end of try-catch - tRes.tested("addVetoableChangeListener()",vetoableChanged); - if (!vetoableChanged) { - log.println("vetoableChangeListener wasn't called for '"+ - PTT.constrained+"'"); + boolean error = false; + for (int i = 0; i < count; i++) { + String propertyName = PTT.constrained.get(i); + vetoableChanged = false; + try { + oObj.addVetoableChangeListener(propertyName,VClistener); + Object gValue = oObj.getPropertyValue(propertyName); + oObj.setPropertyValue(propertyName, + ValueChanger.changePValue(gValue)); + } catch (com.sun.star.beans.PropertyVetoException e) { + log.println("Exception occured while trying to change "+ + "property '"+ propertyName+"'"); + e.printStackTrace(log); + } catch (com.sun.star.lang.IllegalArgumentException e) { + log.println("Exception occured while trying to change "+ + "property '"+ propertyName+"'"); + e.printStackTrace(log); + } catch (com.sun.star.beans.UnknownPropertyException e) { + log.println("Exception occured while trying to change "+ + "property '"+ propertyName+"'"); + e.printStackTrace(log); + } catch (com.sun.star.lang.WrappedTargetException e) { + log.println("Exception occured while trying to change "+ + "property '"+ propertyName+"'"); + e.printStackTrace(log); + } // end of try-catch + error = error || !vetoableChanged; + if (!vetoableChanged) { + log.println("vetoableChangeListener wasn't called for '"+ + propertyName+"'"); + } } - } //endif + tRes.tested("addVetoableChangeListener()",!error); + } return; @@ -276,40 +288,72 @@ public class _XPropertySet extends MultiMethodTest { Object gValue = null; Object sValue = null; - if ( PTT.normal.equals("none") ) { + int count = PTT.normal.size(); + if ( count==0 || PTT.normal.get(0).equals("none") ) { log.println("*** No changeable properties found ***"); tRes.tested("setPropertyValue()", true) ; } else { - try { - log.println("try to cheange value of property '" + PTT.normal + "'" ); - gValue = oObj.getPropertyValue(PTT.normal); - sValue = ValueChanger.changePValue(gValue); - oObj.setPropertyValue(PTT.normal, sValue); - sValue = oObj.getPropertyValue(PTT.normal); - } catch (com.sun.star.beans.PropertyVetoException e) { - log.println("Exception occured while trying to change "+ - "property '"+ PTT.normal+"'"); - e.printStackTrace(log); - } catch (com.sun.star.lang.IllegalArgumentException e) { - log.println("Exception occured while trying to change "+ - "property '"+ PTT.normal+"'"); - e.printStackTrace(log); - } catch (com.sun.star.beans.UnknownPropertyException e) { - log.println("Exception occured while trying to change "+ - "property '"+ PTT.normal+"'"); - e.printStackTrace(log); - } catch (com.sun.star.lang.WrappedTargetException e) { - log.println("Exception occured while trying to change "+ - "property '"+ PTT.normal+"'"); - e.printStackTrace(log); - } // end of try-catch - tRes.tested("setPropertyValue()",(! gValue.equals(sValue))); + boolean error = false; + for (int i = 0; i < count; i++) { + String propertyName = PTT.normal.get(i); + try { + log.println("try to change value of property '" + propertyName + "'" ); + gValue = oObj.getPropertyValue(propertyName); + sValue = ValueChanger.changePValue(gValue); + oObj.setPropertyValue(propertyName, sValue); + sValue = oObj.getPropertyValue(propertyName); + } catch (com.sun.star.beans.PropertyVetoException e) { + log.println("Exception occured while trying to change "+ + "property '"+ propertyName+"'"); + e.printStackTrace(log); + } catch (com.sun.star.lang.IllegalArgumentException e) { + log.println("Exception occured while trying to change "+ + "property '"+ propertyName+"'"); + e.printStackTrace(log); + } catch (com.sun.star.beans.UnknownPropertyException e) { + log.println("Exception occured while trying to change "+ + "property '"+ propertyName+"'"); + e.printStackTrace(log); + } catch (com.sun.star.lang.WrappedTargetException e) { + log.println("Exception occured while trying to change "+ + "property '"+ propertyName+"'"); + e.printStackTrace(log); + } // end of try-catch + if( gValue.equals(sValue) ) + { + log.println("setting property '"+ propertyName+"' failed"); + error = true; + } + } + tRes.tested("setPropertyValue()",!error); } //endif return; } // end of setPropertyValue() + /** + * Tests getPropertyValue method for the given property. + * Returns true if no exceptions occured + */ + private boolean getSinglePropertyValue( String propertyName ) + { + boolean runOk = false; + try { + oObj.getPropertyValue(propertyName); + runOk = true; + } catch (com.sun.star.beans.UnknownPropertyException e) { + log.println("Exception occured while trying to get property '"+ + propertyName+"'"); + e.printStackTrace(log); + } catch (com.sun.star.lang.WrappedTargetException e) { + log.println("Exception occured while trying to get property '"+ + propertyName+"'"); + e.printStackTrace(log); + } + return runOk; + } + /** * Tests getPropertyValue method. * Just call this method and checks for no exceptions

      @@ -325,29 +369,33 @@ public class _XPropertySet extends MultiMethodTest { requiredMethod("getPropertySetInfo()"); - String toCheck = PTT.normal; - - if ( PTT.normal.equals("none") ) { - toCheck = oObj.getPropertySetInfo().getProperties()[0].Name; - log.println("All properties are Read Only"); - log.println("Using: "+toCheck); + int count = PTT.normal.size(); + if ( count==0 || PTT.normal.get(0).equals("none") ) { + Property[] properties = oObj.getPropertySetInfo().getProperties(); + if( properties.length > 0 ) { + String propertyName = properties[0].Name; + log.println("All properties are Read Only"); + log.println("Using: "+propertyName); + tRes.tested("getPropertyValue()", getSinglePropertyValue( propertyName ) ); + } + else { + log.println("*** No properties found ***"); + tRes.tested("getPropertyValue()", true) ; + } + } else { + boolean error = false; + for (int i = 0; i < count; i++) { + String propertyName = PTT.normal.get(i); + boolean runOk = getSinglePropertyValue( propertyName ); + if( !runOk ) + { + error = true; + log.println("getPropertyValue() failed for property '"+propertyName+"'"); + } + } + tRes.tested("getPropertyValue()", !error) ; } - try { - oObj.getPropertyValue(toCheck); - tRes.tested("getPropertyValue()",true); - } catch (com.sun.star.beans.UnknownPropertyException e) { - log.println("Exception occured while trying to get property '"+ - PTT.normal+"'"); - e.printStackTrace(log); - tRes.tested("getPropertyValue()",false); - } catch (com.sun.star.lang.WrappedTargetException e) { - log.println("Exception occured while trying to get property '"+ - PTT.normal+"'"); - e.printStackTrace(log); - tRes.tested("getPropertyValue()",false); - } // end of try-catch - return; } @@ -367,42 +415,60 @@ public class _XPropertySet extends MultiMethodTest { requiredMethod("addPropertyChangeListener()"); - propertyChanged = false; - - if ( PTT.bound.equals("none") ) { + int count = PTT.bound.size(); + if ( count==0 || PTT.bound.get(0).equals("none") ) { log.println("*** No bound properties found ***"); tRes.tested("removePropertyChangeListener()", true) ; } else { - try { - propertyChanged = false; - oObj.removePropertyChangeListener(PTT.bound,PClistener); - Object gValue = oObj.getPropertyValue(PTT.bound); - oObj.setPropertyValue(PTT.bound, - ValueChanger.changePValue(gValue)); - } catch (com.sun.star.beans.PropertyVetoException e) { - log.println("Exception occured while trying to change "+ - "property '"+ PTT.bound+"'"); - e.printStackTrace(log); - } catch (com.sun.star.lang.IllegalArgumentException e) { - log.println("Exception occured while trying to change "+ - "property '"+ PTT.bound+"'"); - e.printStackTrace(log); - } catch (com.sun.star.beans.UnknownPropertyException e) { - log.println("Exception occured while trying to change "+ - "property '"+ PTT.bound+"'"); - e.printStackTrace(log); - } catch (com.sun.star.lang.WrappedTargetException e) { - log.println("Exception occured while trying to change "+ - "property '"+ PTT.bound+"'"); - e.printStackTrace(log); - } // end of try-catch - - tRes.tested("removePropertyChangeListener()",!propertyChanged); - if (propertyChanged) { - log.println("propertyChangeListener was called after removing"+ - " for '"+PTT.bound+"'"); + + //remove all listeners first + for (int i = 0; i < count; i++) { + String propertyName = PTT.bound.get(i); + try { + oObj.removePropertyChangeListener(propertyName,PClistener); + } catch (Exception e) { + log.println("Exception occured while removing change listener from"+ + "property '"+ propertyName+"'"); + e.printStackTrace(log); + } } - } //endif + + boolean error = false; + for (int i = 0; i < count; i++) { + String propertyName = PTT.bound.get(i); + try { + propertyChanged = false; + oObj.addPropertyChangeListener(propertyName,PClistener); + oObj.removePropertyChangeListener(propertyName,PClistener); + Object gValue = oObj.getPropertyValue(propertyName); + oObj.setPropertyValue(propertyName, + ValueChanger.changePValue(gValue)); + } catch (com.sun.star.beans.PropertyVetoException e) { + log.println("Exception occured while trying to change "+ + "property '"+ propertyName+"'"); + e.printStackTrace(log); + } catch (com.sun.star.lang.IllegalArgumentException e) { + log.println("Exception occured while trying to change "+ + "property '"+ propertyName+"'"); + e.printStackTrace(log); + } catch (com.sun.star.beans.UnknownPropertyException e) { + log.println("Exception occured while trying to change "+ + "property '"+ propertyName+"'"); + e.printStackTrace(log); + } catch (com.sun.star.lang.WrappedTargetException e) { + log.println("Exception occured while trying to change "+ + "property '"+ propertyName+"'"); + e.printStackTrace(log); + } // end of try-catch + + error = error || propertyChanged; + if (propertyChanged) { + log.println("propertyChangeListener was called after removing"+ + " for '"+propertyName+"'"); + } + } + tRes.tested("removePropertyChangeListener()",!error); + } return; @@ -425,47 +491,64 @@ public class _XPropertySet extends MultiMethodTest { requiredMethod("addVetoableChangeListener()"); - vetoableChanged = false; - - if ( PTT.constrained.equals("none") ) { + int count = PTT.constrained.size(); + if ( count==0 || PTT.constrained.get(0).equals("none") ) { log.println("*** No constrained properties found ***"); tRes.tested("removeVetoableChangeListener()", true) ; } else { - try { - oObj.removeVetoableChangeListener(PTT.constrained,VClistener); - Object gValue = oObj.getPropertyValue(PTT.constrained); - oObj.setPropertyValue(PTT.constrained, - ValueChanger.changePValue(gValue)); - } catch (com.sun.star.beans.PropertyVetoException e) { - log.println("Exception occured while trying to change "+ - "property '"+ PTT.constrained+"'"); - e.printStackTrace(log); - } catch (com.sun.star.lang.IllegalArgumentException e) { - log.println("Exception occured while trying to change "+ - "property '"+ PTT.constrained+"'"); - e.printStackTrace(log); - } catch (com.sun.star.beans.UnknownPropertyException e) { - log.println("Exception occured while trying to change "+ - "property '"+ PTT.constrained+"'"); - e.printStackTrace(log); - } catch (com.sun.star.lang.WrappedTargetException e) { - log.println("Exception occured while trying to change "+ - "property '"+ PTT.constrained+"'"); - e.printStackTrace(log); - } // end of try-catch - - tRes.tested("removeVetoableChangeListener()",!vetoableChanged); - if (vetoableChanged) { - log.println("vetoableChangeListener was called after "+ - "removing for '"+PTT.constrained+"'"); + + //remove all listeners first + for (int i = 0; i < count; i++) { + String propertyName = PTT.constrained.get(i); + try { + oObj.removeVetoableChangeListener(propertyName,VClistener); + } catch (Exception e) { + log.println("Exception occured while removing veto listener from"+ + "property '"+ propertyName+"'"); + e.printStackTrace(log); + } } - } //endif + + boolean error = false; + for (int i = 0; i < count; i++) { + String propertyName = PTT.constrained.get(i); + vetoableChanged = false; + try { + oObj.addVetoableChangeListener(propertyName,VClistener); + oObj.removeVetoableChangeListener(propertyName,VClistener); + Object gValue = oObj.getPropertyValue(propertyName); + oObj.setPropertyValue(propertyName, + ValueChanger.changePValue(gValue)); + } catch (com.sun.star.beans.PropertyVetoException e) { + log.println("Exception occured while trying to change "+ + "property '"+ propertyName+"'"); + e.printStackTrace(log); + } catch (com.sun.star.lang.IllegalArgumentException e) { + log.println("Exception occured while trying to change "+ + "property '"+ propertyName+"'"); + e.printStackTrace(log); + } catch (com.sun.star.beans.UnknownPropertyException e) { + log.println("Exception occured while trying to change "+ + "property '"+ propertyName+"'"); + e.printStackTrace(log); + } catch (com.sun.star.lang.WrappedTargetException e) { + log.println("Exception occured while trying to change "+ + "property '"+ propertyName+"'"); + e.printStackTrace(log); + } // end of try-catch + error = error || vetoableChanged; + if (vetoableChanged) { + log.println("vetoableChangeListener was called after "+ + "removing for '"+propertyName+"'"); + } + } + tRes.tested("removeVetoableChangeListener()",!error); + } return; } // end of removeVetoableChangeListener() - /** * Gets the properties being tested. Searches and stores by one * property of each kind (Bound, Vetoable, Normal). @@ -473,9 +556,6 @@ public class _XPropertySet extends MultiMethodTest { public void getPropsToTest(XPropertySetInfo xPSI) { Property[] properties = xPSI.getProperties(); - String bound = ""; - String constrained = ""; - String normal = ""; // some properties should not be changed in a unspecific way String[] skip = {"PrinterName", "CharRelief", "IsLayerMode"}; @@ -522,47 +602,19 @@ public class _XPropertySet extends MultiMethodTest { if ( isWritable && isNotNull ) canChange = isChangeable(name); if ( isWritable && isNotNull && isBound && canChange) { - bound+=name+";"; + PTT.bound.add(name); } if ( isWritable && isNotNull && isConstr && canChange) { - constrained+=name+";"; + PTT.constrained.add(name); } - if ( isWritable && isNotNull && canChange) normal+=name+";"; + if ( isWritable && isNotNull && canChange) { + PTT.normal.add(name); + } } // endfor - - //get a random bound property - PTT.bound=getRandomString(bound); - log.println("Bound: "+PTT.bound); - - //get a random constrained property - PTT.constrained=getRandomString(constrained); - log.println("Constrained: "+PTT.constrained); - - //get a random normal property - PTT.normal=getRandomString(normal); - } - - /** - * Retrieves one random property name from list (property names separated - * by ';') of property names. - */ - public String getRandomString(String str) { - - String gRS = "none"; - Random rnd = new Random(); - - if (str.equals("")) str = "none"; - StringTokenizer ST=new StringTokenizer(str,";"); - int nr = rnd.nextInt(ST.countTokens()); - if (nr < 1) nr+=1; - for (int i=1; i Date: Tue, 1 Jun 2010 17:17:11 +0200 Subject: chart47: #i111102# enable chart tests again --- xmloff/qa/unoapi/xmloff.sce | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/xmloff/qa/unoapi/xmloff.sce b/xmloff/qa/unoapi/xmloff.sce index c73533f4e4e8..e838da7ad42a 100644 --- a/xmloff/qa/unoapi/xmloff.sce +++ b/xmloff/qa/unoapi/xmloff.sce @@ -1,9 +1,9 @@ -#111102# -o xmloff.Chart.XMLContentExporter -#111102# -o xmloff.Chart.XMLContentImporter -#111102# -o xmloff.Chart.XMLExporter -#111102# -o xmloff.Chart.XMLImporter -#111102# -o xmloff.Chart.XMLStylesExporter -#111102# -o xmloff.Chart.XMLStylesImporter +-o xmloff.Chart.XMLContentExporter +-o xmloff.Chart.XMLContentImporter +-o xmloff.Chart.XMLExporter +-o xmloff.Chart.XMLImporter +-o xmloff.Chart.XMLStylesExporter +-o xmloff.Chart.XMLStylesImporter -o xmloff.Draw.XMLContentExporter -o xmloff.Draw.XMLContentImporter -o xmloff.Draw.XMLExporter -- cgit v1.2.3 From 4f6cb98b9b6b0fbde6127df2f2c9d3185046b989 Mon Sep 17 00:00:00 2001 From: Ingrid Halama Date: Tue, 1 Jun 2010 17:29:59 +0200 Subject: chart47: #i109770# enable chart tests again --- chart2/prj/build.lst | 1 + 1 file changed, 1 insertion(+) diff --git a/chart2/prj/build.lst b/chart2/prj/build.lst index 3cdc9a26e3f5..469eb7554d6b 100644 --- a/chart2/prj/build.lst +++ b/chart2/prj/build.lst @@ -24,3 +24,4 @@ ch chart2\source\controller\chartapiwrapper nmake - all ch_source_controlle ch chart2\source\controller\main nmake - all ch_source_controller_main ch_inc NULL ch chart2\source\controller\menus nmake - all ch_source_controller_menus ch_inc NULL ch chart2\prj get - all ch_prj NULL +ch chart2\qa\unoapi nmake - all ch_qa_unoapi NULL -- cgit v1.2.3 From dec36699345b060fe3fbfb58e4887a6480f0ea71 Mon Sep 17 00:00:00 2001 From: Ingrid Halama Date: Tue, 1 Jun 2010 18:16:43 +0200 Subject: chart47: #i110300# allow also longs for property DataRowSource --- chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx index b1db5981f6b3..183aa70446bb 100644 --- a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx @@ -1221,7 +1221,13 @@ void WrappedDataRowSourceProperty::setPropertyValue( const Any& rOuterValue, con { ::com::sun::star::chart::ChartDataRowSource eChartDataRowSource = ::com::sun::star::chart::ChartDataRowSource_ROWS; if( ! (rOuterValue >>= eChartDataRowSource) ) - throw lang::IllegalArgumentException( C2U("Property DataRowSource requires ::com::sun::star::chart::ChartDataRowSource value"), 0, 0 ); + { + sal_Int32 nNew = ::com::sun::star::chart::ChartDataRowSource_ROWS; + if( !(rOuterValue >>= nNew) ) + throw lang::IllegalArgumentException( C2U("Property DataRowSource requires ::com::sun::star::chart::ChartDataRowSource value"), 0, 0 ); + else + eChartDataRowSource = ::com::sun::star::chart::ChartDataRowSource(nNew); + } m_aOuterValue = rOuterValue; -- cgit v1.2.3 From 6a0a47771e909a2afe9f19ad09a960ed2f938149 Mon Sep 17 00:00:00 2001 From: Ingrid Halama Date: Tue, 1 Jun 2010 19:06:06 +0200 Subject: chart47: #i109765# added interface XDrawPageSupplier --- offapi/com/sun/star/chart/ChartDocument.idl | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/offapi/com/sun/star/chart/ChartDocument.idl b/offapi/com/sun/star/chart/ChartDocument.idl index dd52f2e02ba3..2c5227329778 100644 --- a/offapi/com/sun/star/chart/ChartDocument.idl +++ b/offapi/com/sun/star/chart/ChartDocument.idl @@ -39,9 +39,8 @@ #include #endif -// #ifndef com_sun_star_chart2_data_XDataReceiver_idl -// #include -// #endif +#include + //============================================================================= @@ -73,12 +72,7 @@ published service ChartDocument interface ::com::sun::star::chart::XChartDocument; interface ::com::sun::star::beans::XPropertySet; - /** If this interface is implemented, it is possible to connect - data to a chart via the improved data connection method using - an XDataProvider. - */ - // BM: #i32138# XDataReceiver is not yet published -// [optional] interface ::com::sun::star::chart2::data::XDataReceiver; + [optional] interface ::com::sun::star::drawing::XDrawPageSupplier; //------------------------------------------------------------------------- -- cgit v1.2.3 From 93d35b4030f7599ae9709d16c77dc7dc03355585 Mon Sep 17 00:00:00 2001 From: Ingrid Halama Date: Tue, 1 Jun 2010 19:22:19 +0200 Subject: chart47: #i110702# translation for 'display legend' is truncated --- chart2/source/controller/dialogs/dlg_InsertLegend.src | 4 ++-- chart2/source/controller/dialogs/res_LegendPosition_tmpl.hrc | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/chart2/source/controller/dialogs/dlg_InsertLegend.src b/chart2/source/controller/dialogs/dlg_InsertLegend.src index 9e957b4b203b..95a1d5516ab5 100644 --- a/chart2/source/controller/dialogs/dlg_InsertLegend.src +++ b/chart2/source/controller/dialogs/dlg_InsertLegend.src @@ -39,9 +39,9 @@ ModalDialog DLG_LEGEND HelpID = SID_INSERT_CHART_LEGEND ; OutputSize = TRUE ; SVLook = TRUE ; - Size = MAP_APPFONT ( 135 , 80 ) ; + Size = MAP_APPFONT ( 156 , 80 ) ; Moveable = TRUE ; - BUTTONS_OK_CANCEL_HELP_STACKED( 79 ) + BUTTONS_OK_CANCEL_HELP_STACKED( 101 ) RESOURCE_LEGENDDISPLAY( 6, 6 ) RESOURCE_LEGENDPOSITION( 15, 6 + RSC_CD_FIXEDTEXT_HEIGHT +6 ) }; diff --git a/chart2/source/controller/dialogs/res_LegendPosition_tmpl.hrc b/chart2/source/controller/dialogs/res_LegendPosition_tmpl.hrc index 4218b322a948..17f6518eabe4 100644 --- a/chart2/source/controller/dialogs/res_LegendPosition_tmpl.hrc +++ b/chart2/source/controller/dialogs/res_LegendPosition_tmpl.hrc @@ -35,7 +35,7 @@ CheckBox CBX_SHOWLEGEND \ { \ HelpID = HID_SCH_LEGEND_SHOW ; \ Pos = MAP_APPFONT ( xpos , ypos ) ; \ - Size = MAP_APPFONT ( 67 , 12 ) ; \ + Size = MAP_APPFONT ( 95 , 12 ) ; \ Text [ en-US ] = "~Display legend" ; \ TabStop = TRUE ; \ }; -- cgit v1.2.3 From af5a0f41ea1717070aded0acca6b31ab89aea8b6 Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Wed, 2 Jun 2010 12:16:56 +0200 Subject: fwk139: #i10000# adopt for solaris --- sfx2/inc/sfx2/tbxctrl.hxx | 1 + sfx2/source/dialog/filedlghelper.cxx | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/sfx2/inc/sfx2/tbxctrl.hxx b/sfx2/inc/sfx2/tbxctrl.hxx index d618051e4063..30d82c854642 100644 --- a/sfx2/inc/sfx2/tbxctrl.hxx +++ b/sfx2/inc/sfx2/tbxctrl.hxx @@ -243,6 +243,7 @@ protected: virtual void SAL_CALL release() throw(); // XEventListener + using ::cppu::OPropertySetHelper::disposing; virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& aEvent ) throw( ::com::sun::star::uno::RuntimeException ); // XComponent diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx index 9c2cb46b15f2..7d177d0bbfd8 100644 --- a/sfx2/source/dialog/filedlghelper.cxx +++ b/sfx2/source/dialog/filedlghelper.cxx @@ -2674,7 +2674,7 @@ static int impl_isFolder( const OUString& rPath ) { } - ::rtl::Reference <::comphelper::StillReadWriteInteraction> aHandler = new ::comphelper::StillReadWriteInteraction( xHandler ); + ::rtl::Reference< ::comphelper::StillReadWriteInteraction > aHandler = new ::comphelper::StillReadWriteInteraction( xHandler ); try { -- cgit v1.2.3 From 4624195e6db83d5cd4504ecb15133ba02fb23f52 Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Wed, 2 Jun 2010 12:16:56 +0200 Subject: fwk139: #i10000# adopt for solaris --- svtools/inc/svtools/toolboxcontroller.hxx | 1 + 1 file changed, 1 insertion(+) diff --git a/svtools/inc/svtools/toolboxcontroller.hxx b/svtools/inc/svtools/toolboxcontroller.hxx index e1ba26607922..d4286b2d31b0 100644 --- a/svtools/inc/svtools/toolboxcontroller.hxx +++ b/svtools/inc/svtools/toolboxcontroller.hxx @@ -101,6 +101,7 @@ class SVT_DLLPUBLIC ToolboxController : public ::com::sun::star::frame::XStatusL virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw (::com::sun::star::uno::RuntimeException); // XEventListener + using cppu::OPropertySetHelper::disposing; virtual void SAL_CALL disposing( const com::sun::star::lang::EventObject& Source ) throw ( ::com::sun::star::uno::RuntimeException ); // XStatusListener -- cgit v1.2.3 From 00c2c6c2c7deeb332d31ce7d87311cbde705bee0 Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Wed, 2 Jun 2010 12:44:35 +0200 Subject: fwk139: #i10000# adopt for solaris --- sfx2/source/doc/syspath.hxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sfx2/source/doc/syspath.hxx b/sfx2/source/doc/syspath.hxx index a41836775421..c305ed4c85b9 100644 --- a/sfx2/source/doc/syspath.hxx +++ b/sfx2/source/doc/syspath.hxx @@ -41,4 +41,5 @@ public: static ::rtl::OUString GetUserTemplateLocation(); }; -#endif \ No newline at end of file +#endif + -- cgit v1.2.3 From 630d814ee5ac1133b5159dbdd88b7a328abe244a Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Wed, 2 Jun 2010 13:50:51 +0200 Subject: #i111954# corrected hatch fill turnaround with Metafile and SdrObjects, also some smaller errors in ImpSdrGDIMetaFileImport --- .../source/primitive2d/metafileprimitive2d.cxx | 3 ++ .../source/processor2d/vclmetafileprocessor2d.cxx | 26 ++++++--- .../source/processor2d/vclpixelprocessor2d.cxx | 21 ++++++++ svx/source/svdraw/svdfmtf.cxx | 63 +++++++++++++++++++--- 4 files changed, 99 insertions(+), 14 deletions(-) diff --git a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx index 238c47419eb9..a31105633330 100644 --- a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx @@ -943,14 +943,17 @@ namespace default : // case HATCH_SINGLE : { aHatchStyle = drawinglayer::attribute::HATCHSTYLE_SINGLE; + break; } case HATCH_DOUBLE : { aHatchStyle = drawinglayer::attribute::HATCHSTYLE_DOUBLE; + break; } case HATCH_TRIPLE : { aHatchStyle = drawinglayer::attribute::HATCHSTYLE_TRIPLE; + break; } } diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx index 0bc1b57113b8..e93e21b59047 100644 --- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx @@ -1225,17 +1225,16 @@ namespace drawinglayer { // need to handle PolyPolygonHatchPrimitive2D here to support XPATHFILL_SEQ_BEGIN/XPATHFILL_SEQ_END SvtGraphicFill* pSvtGraphicFill = 0; + const primitive2d::PolyPolygonHatchPrimitive2D& rHatchCandidate = static_cast< const primitive2d::PolyPolygonHatchPrimitive2D& >(rCandidate); + const attribute::FillHatchAttribute& rFillHatchAttribute = rHatchCandidate.getFillHatch(); + basegfx::B2DPolyPolygon aLocalPolyPolygon(rHatchCandidate.getB2DPolyPolygon()); + aLocalPolyPolygon.transform(maCurrentTransformation); if(!mnSvtGraphicFillCount) { - const primitive2d::PolyPolygonHatchPrimitive2D& rHatchCandidate = static_cast< const primitive2d::PolyPolygonHatchPrimitive2D& >(rCandidate); - basegfx::B2DPolyPolygon aLocalPolyPolygon(rHatchCandidate.getB2DPolyPolygon()); - aLocalPolyPolygon.transform(maCurrentTransformation); - if(aLocalPolyPolygon.count()) { // re-create a VCL hatch as base data - const attribute::FillHatchAttribute& rFillHatchAttribute = rHatchCandidate.getFillHatch(); SvtGraphicFill::HatchType eHatch(SvtGraphicFill::hatchSingle); switch(rFillHatchAttribute.getStyle()) @@ -1289,9 +1288,22 @@ namespace drawinglayer // Do use decomposition; encapsulate with SvtGraphicFill impStartSvtGraphicFill(pSvtGraphicFill); - process(rCandidate.get2DDecomposition(getViewInformation2D())); - impEndSvtGraphicFill(pSvtGraphicFill); + // #i111954# do NOT use decomposition, but use direct VCL-command + // process(rCandidate.get2DDecomposition(getViewInformation2D())); + const PolyPolygon aToolsPolyPolygon(aLocalPolyPolygon); + const HatchStyle aHatchStyle( + attribute::HATCHSTYLE_SINGLE == rFillHatchAttribute.getStyle() ? HATCH_SINGLE : + attribute::HATCHSTYLE_DOUBLE == rFillHatchAttribute.getStyle() ? HATCH_DOUBLE : + HATCH_TRIPLE); + + mpOutputDevice->DrawHatch(aToolsPolyPolygon, + Hatch(aHatchStyle, + Color(rFillHatchAttribute.getColor()), + basegfx::fround(rFillHatchAttribute.getDistance()), + basegfx::fround(rFillHatchAttribute.getAngle() / F_PI1800))); + + impEndSvtGraphicFill(pSvtGraphicFill); break; } case PRIMITIVE2D_ID_POLYPOLYGONGRADIENTPRIMITIVE2D : diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx index a1b1393a2fac..27275a7bb04b 100644 --- a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx @@ -299,6 +299,27 @@ namespace drawinglayer mpOutputDevice->DrawTransparent(aLocalPolyPolygon, rUniTransparenceCandidate.getTransparence()); bDrawTransparentUsed = true; } + + if(!bDrawTransparentUsed) + { + const primitive2d::PolygonHairlinePrimitive2D* pPoHair = dynamic_cast< const primitive2d::PolygonHairlinePrimitive2D* >(xReference.get()); + + if(pPoHair && PRIMITIVE2D_ID_POLYGONHAIRLINEPRIMITIVE2D == pPoHair->getPrimitive2DID()) + { + // single transparent Hairline identified, use directly + const basegfx::BColor aHairColor(maBColorModifierStack.getModifiedColor(pPoHair->getBColor())); + mpOutputDevice->SetFillColor(); + mpOutputDevice->SetLineColor(Color(aHairColor)); + + basegfx::B2DPolygon aLocalPolygon(pPoHair->getB2DPolygon()); + aLocalPolygon.transform(maCurrentTransformation); + + mpOutputDevice->DrawTransparent( + basegfx::B2DPolyPolygon(aLocalPolygon), + rUniTransparenceCandidate.getTransparence()); + bDrawTransparentUsed = true; + } + } } if(!bDrawTransparentUsed) diff --git a/svx/source/svdraw/svdfmtf.cxx b/svx/source/svdraw/svdfmtf.cxx index 445fe60c0670..34a77fcd9e62 100644 --- a/svx/source/svdraw/svdfmtf.cxx +++ b/svx/source/svdraw/svdfmtf.cxx @@ -85,6 +85,11 @@ ImpSdrGDIMetaFileImport::ImpSdrGDIMetaFileImport(SdrModel& rModel): bLastObjWasPolyWithoutLine(FALSE),bNoLine(FALSE),bNoFill(FALSE),bLastObjWasLine(FALSE) { aVD.EnableOutput(FALSE); + + // #i111954# init to no fill and no line initially + aVD.SetLineColor(); + aVD.SetFillColor(); + aOldLineColor.SetRed( aVD.GetLineColor().GetRed() + 1 ); // invalidate old line color pLineAttr=new SfxItemSet(rModel.GetItemPool(),XATTR_LINE_FIRST,XATTR_LINE_LAST); pFillAttr=new SfxItemSet(rModel.GetItemPool(),XATTR_FILL_FIRST,XATTR_FILL_LAST); @@ -380,17 +385,61 @@ void ImpSdrGDIMetaFileImport::InsertObj( SdrObject* pObj, sal_Bool bScale ) pObj->NbcMove( Size( aOfs.X(), aOfs.Y() ) ); } - aTmpList.InsertObject( pObj ); - if ( HAS_BASE( SdrPathObj, pObj ) ) + // #i111954# check object for visibility + // used are SdrPathObj, SdrRectObj, SdrCircObj, SdrGrafObj + bool bVisible(false); + + if(pObj->HasLineStyle()) + { + bVisible = true; + } + + if(!bVisible && pObj->HasFillStyle()) + { + bVisible = true; + } + + if(!bVisible) + { + SdrTextObj* pTextObj = dynamic_cast< SdrTextObj* >(pObj); + + if(pTextObj && pTextObj->HasText()) + { + bVisible = true; + } + } + + if(!bVisible) { - FASTBOOL bClosed=pObj->IsClosedObj(); - bLastObjWasPolyWithoutLine=bNoLine && bClosed; - bLastObjWasLine=!bClosed; + SdrGrafObj* pGrafObj = dynamic_cast< SdrGrafObj* >(pObj); + + if(pGrafObj) + { + // this may be refined to check if the graphic really is visible. It + // is here to ensure that graphic objects without fill, line and text + // get created + bVisible = true; + } + } + + if(!bVisible) + { + SdrObject::Free(pObj); } else { - bLastObjWasPolyWithoutLine = FALSE; - bLastObjWasLine = FALSE; + aTmpList.InsertObject( pObj ); + if ( HAS_BASE( SdrPathObj, pObj ) ) + { + FASTBOOL bClosed=pObj->IsClosedObj(); + bLastObjWasPolyWithoutLine=bNoLine && bClosed; + bLastObjWasLine=!bClosed; + } + else + { + bLastObjWasPolyWithoutLine = FALSE; + bLastObjWasLine = FALSE; + } } } -- cgit v1.2.3 From d66c74409ed0406f07cbcb694af2ca4ccc488279 Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Wed, 2 Jun 2010 17:05:52 +0200 Subject: fwk139: #i10000# Added pragma statement to fix warnings from Windows headers --- sfx2/source/doc/syspathw32.cxx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sfx2/source/doc/syspathw32.cxx b/sfx2/source/doc/syspathw32.cxx index 9919df2f65a3..485ebc203890 100644 --- a/sfx2/source/doc/syspathw32.cxx +++ b/sfx2/source/doc/syspathw32.cxx @@ -36,6 +36,9 @@ using namespace ::rtl; #ifdef WNT +#ifdef _MSC_VER +#pragma warning(disable:4917) +#endif #include #define ALLOC(type, n) ((type *) HeapAlloc(GetProcessHeap(), 0, sizeof(type) * n )) -- cgit v1.2.3 From 41058897dd1049f175ff8b832f8089d63df9ac9c Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Wed, 2 Jun 2010 17:35:20 +0200 Subject: #i111987# corrected handling of source polygon data creation for logical polygon operations --- svx/source/svdraw/svdedtv2.cxx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/svx/source/svdraw/svdedtv2.cxx b/svx/source/svdraw/svdedtv2.cxx index e31ea11be7d6..8cf83c0429cc 100644 --- a/svx/source/svdraw/svdedtv2.cxx +++ b/svx/source/svdraw/svdedtv2.cxx @@ -1090,7 +1090,16 @@ void SdrEditView::MergeMarkedObjects(SdrMergeMode eMode) if(!bFirstObjectComplete) { - aMergePolyPolygonA = aTmpPoly; + // #i111987# Also need to collect ORed source shape when more than + // a single polygon is involved + if(aMergePolyPolygonA.count()) + { + aMergePolyPolygonA = basegfx::tools::solvePolygonOperationOr(aMergePolyPolygonA, aTmpPoly); + } + else + { + aMergePolyPolygonA = aTmpPoly; + } } else { -- cgit v1.2.3 From 50cb26d0df805607e5de3fcd31438dbfdbffe4e3 Mon Sep 17 00:00:00 2001 From: Ingrid Halama Date: Wed, 2 Jun 2010 21:30:46 +0200 Subject: chart47: #i112047# #i112048# disable crashing API tests --- xmloff/qa/unoapi/xmloff.sce | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xmloff/qa/unoapi/xmloff.sce b/xmloff/qa/unoapi/xmloff.sce index e838da7ad42a..c946539988ee 100644 --- a/xmloff/qa/unoapi/xmloff.sce +++ b/xmloff/qa/unoapi/xmloff.sce @@ -3,7 +3,7 @@ -o xmloff.Chart.XMLExporter -o xmloff.Chart.XMLImporter -o xmloff.Chart.XMLStylesExporter --o xmloff.Chart.XMLStylesImporter +#i112047 -o xmloff.Chart.XMLStylesImporter -o xmloff.Draw.XMLContentExporter -o xmloff.Draw.XMLContentImporter -o xmloff.Draw.XMLExporter @@ -16,7 +16,7 @@ -o xmloff.Draw.XMLStylesImporter #i111224 -o xmloff.Impress.XMLContentExporter -o xmloff.Impress.XMLContentImporter --o xmloff.Impress.XMLExporter +#i112048 -o xmloff.Impress.XMLExporter #i111111# -o xmloff.Impress.XMLImporter -o xmloff.Impress.XMLMetaExporter -o xmloff.Impress.XMLMetaImporter -- cgit v1.2.3 From b3502bb6fc28c6f51e0719b44b06664dd0e805c4 Mon Sep 17 00:00:00 2001 From: Ingrid Halama Date: Wed, 2 Jun 2010 22:08:44 +0200 Subject: chart47: #i111102# disable deadlocking tests again --- xmloff/qa/unoapi/xmloff.sce | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/xmloff/qa/unoapi/xmloff.sce b/xmloff/qa/unoapi/xmloff.sce index c946539988ee..69166aec6204 100644 --- a/xmloff/qa/unoapi/xmloff.sce +++ b/xmloff/qa/unoapi/xmloff.sce @@ -1,9 +1,9 @@ --o xmloff.Chart.XMLContentExporter --o xmloff.Chart.XMLContentImporter --o xmloff.Chart.XMLExporter --o xmloff.Chart.XMLImporter --o xmloff.Chart.XMLStylesExporter -#i112047 -o xmloff.Chart.XMLStylesImporter +#111102# -o xmloff.Chart.XMLContentExporter +#111102# -o xmloff.Chart.XMLContentImporter +#111102# -o xmloff.Chart.XMLExporter +#111102# -o xmloff.Chart.XMLImporter +#111102# -o xmloff.Chart.XMLStylesExporter +#111102# #i112047 -o xmloff.Chart.XMLStylesImporter -o xmloff.Draw.XMLContentExporter -o xmloff.Draw.XMLContentImporter -o xmloff.Draw.XMLExporter -- cgit v1.2.3 From 12d9479f439b1db0685a5b68480d813751899ac9 Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Thu, 3 Jun 2010 13:54:07 +0200 Subject: #i111122# corrected the copy operator of SdrPageProperties --- svx/source/svdraw/svdpage.cxx | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/svx/source/svdraw/svdpage.cxx b/svx/source/svdraw/svdpage.cxx index 6dd816d429da..118cc042fe6d 100644 --- a/svx/source/svdraw/svdpage.cxx +++ b/svx/source/svdraw/svdpage.cxx @@ -1225,8 +1225,19 @@ SdrPageProperties::SdrPageProperties(const SdrPageProperties& rCandidate) : SfxListener(), mpSdrPage(rCandidate.mpSdrPage), mpStyleSheet(0), - mpProperties(new SfxItemSet(*rCandidate.mpProperties)) + mpProperties(0) { + if(&mpSdrPage->GetModel()->GetItemPool() == rCandidate.mpProperties->GetPool()) + { + mpProperties = new SfxItemSet(*rCandidate.mpProperties); + } + else + { + // #i111122# in doubt, use the ItemPool from the page, not the + // ItemSet. This is e.g. used to set a new Model + mpProperties = rCandidate.mpProperties->Clone(true, &mpSdrPage->GetModel()->GetItemPool()); + } + if(rCandidate.GetStyleSheet()) { ImpAddStyleSheet(*rCandidate.GetStyleSheet()); @@ -1659,6 +1670,8 @@ void SdrPage::SetModel(SdrModel* pNewModel) } pLayerAdmin->SetModel(pNewModel); + // #i111122# re-create SdrPageProperties to migrate it's items to the + // new model SdrPageProperties *pNew = new SdrPageProperties(getSdrPageProperties()); delete mpSdrPageProperties; mpSdrPageProperties = pNew; -- cgit v1.2.3 From 375b87bdf5c1a1c09b232d95581ed7dbbd4685f8 Mon Sep 17 00:00:00 2001 From: Ingrid Halama Date: Thu, 3 Jun 2010 15:06:33 +0200 Subject: chart47: #i112078# disabled test sch.ChartLegend::com::sun::star::beans::XPropertySet --- chart2/qa/unoapi/knownissues.xcl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/chart2/qa/unoapi/knownissues.xcl b/chart2/qa/unoapi/knownissues.xcl index d937b6573435..155132922661 100644 --- a/chart2/qa/unoapi/knownissues.xcl +++ b/chart2/qa/unoapi/knownissues.xcl @@ -36,4 +36,5 @@ sch.ChXDataPoint::com::sun::star::xml::UserDefinedAttributeSupplier #i83865 sch.ChXDataPoint::com::sun::star::drawing::LineProperties - +#112078 +sch.ChartLegend::com::sun::star::beans::XPropertySet -- cgit v1.2.3 From 0ce75d8c652d3e742ca88218d0c9f932df67158e Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Thu, 3 Jun 2010 16:40:59 +0200 Subject: fwk139: #i10000# avoid warnings on solaris --- avmedia/source/framework/makefile.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/avmedia/source/framework/makefile.mk b/avmedia/source/framework/makefile.mk index 34669d3e9f8a..4185f3cbfc49 100644 --- a/avmedia/source/framework/makefile.mk +++ b/avmedia/source/framework/makefile.mk @@ -50,6 +50,7 @@ SLOFILES= \ $(SLO)$/soundhandler.obj EXCEPTIONSFILES = \ + $(SLO)$/mediatoolbox.obj \ $(SLO)$/soundhandler.obj # --- Targets ---------------------------------- -- cgit v1.2.3 From d247197d60cde92dbfc429b738a3a9e5a752d066 Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Thu, 3 Jun 2010 16:40:59 +0200 Subject: fwk139: #i10000# avoid warnings on solaris --- starmath/source/makefile.mk | 1 + sw/source/ui/cctrl/makefile.mk | 3 +++ sw/source/ui/ribbar/makefile.mk | 5 +++++ sw/source/ui/shells/makefile.mk | 1 + sw/source/ui/uiview/makefile.mk | 5 +++++ sw/source/ui/utlui/makefile.mk | 2 ++ 6 files changed, 17 insertions(+) diff --git a/starmath/source/makefile.mk b/starmath/source/makefile.mk index a69a90010700..eda4d91083c0 100644 --- a/starmath/source/makefile.mk +++ b/starmath/source/makefile.mk @@ -94,6 +94,7 @@ EXCEPTIONSFILES = \ $(SLO)$/mathmlimport.obj \ $(SLO)$/mathmlexport.obj \ $(SLO)$/mathtype.obj \ + $(SLO)$/smdll.obj \ $(SLO)$/view.obj \ $(SLO)$/unomodel.obj \ $(SLO)$/smdetect.obj \ diff --git a/sw/source/ui/cctrl/makefile.mk b/sw/source/ui/cctrl/makefile.mk index c724f287fc3a..33ba83f34d7c 100644 --- a/sw/source/ui/cctrl/makefile.mk +++ b/sw/source/ui/cctrl/makefile.mk @@ -50,6 +50,9 @@ SLOFILES = \ $(SLO)$/popbox.obj \ $(SLO)$/swlbox.obj +EXCEPTIONSFILES = \ + $(SLO)$/popbox.obj + # --- Tagets ------------------------------------------------------- .INCLUDE : target.mk diff --git a/sw/source/ui/ribbar/makefile.mk b/sw/source/ui/ribbar/makefile.mk index 72acc793070a..2405d4b16d9f 100644 --- a/sw/source/ui/ribbar/makefile.mk +++ b/sw/source/ui/ribbar/makefile.mk @@ -45,6 +45,11 @@ SRC1FILES = \ tblctrl.src \ workctrl.src +EXCEPTIONSFILES = \ + $(SLO)$/tblctrl.obj \ + $(SLO)$/tbxanchr.obj \ + $(SLO)$/workctrl.obj + SLOFILES = \ $(SLO)$/inputwin.obj \ $(SLO)$/tbxanchr.obj \ diff --git a/sw/source/ui/shells/makefile.mk b/sw/source/ui/shells/makefile.mk index e9a03a5a41cc..dce62a2c9336 100644 --- a/sw/source/ui/shells/makefile.mk +++ b/sw/source/ui/shells/makefile.mk @@ -83,6 +83,7 @@ EXCEPTIONSFILES = \ $(SLO)$/drwtxtsh.obj \ $(SLO)$/frmsh.obj \ $(SLO)$/drwtxtex.obj \ + $(SLO)$/slotadd.obj \ $(SLO)$/textsh1.obj # --- Tagets ------------------------------------------------------- diff --git a/sw/source/ui/uiview/makefile.mk b/sw/source/ui/uiview/makefile.mk index d06bb58a7dab..337ee85da580 100644 --- a/sw/source/ui/uiview/makefile.mk +++ b/sw/source/ui/uiview/makefile.mk @@ -49,8 +49,13 @@ EXCEPTIONSFILES= \ $(SLO)$/swcli.obj \ $(SLO)$/uivwimp.obj \ $(SLO)$/view.obj \ + $(SLO)$/view0.obj \ + $(SLO)$/view1.obj \ $(SLO)$/view2.obj \ + $(SLO)$/viewdraw.obj \ + $(SLO)$/viewport.obj \ $(SLO)$/viewprt.obj \ + $(SLO)$/viewsrch.obj \ $(SLO)$/viewling.obj \ $(SLO)$/viewmdi.obj \ diff --git a/sw/source/ui/utlui/makefile.mk b/sw/source/ui/utlui/makefile.mk index 7f2aa91c0e11..da000994fead 100644 --- a/sw/source/ui/utlui/makefile.mk +++ b/sw/source/ui/utlui/makefile.mk @@ -51,8 +51,10 @@ SRC1FILES = \ EXCEPTIONSFILES= \ $(SLO)$/bookctrl.obj \ + $(SLO)$/glbltree.obj \ $(SLO)$/navipi.obj \ $(SLO)$/unotools.obj \ + $(SLO)$/content.obj \ $(SLO)$/swrenamexnameddlg.obj SLOFILES = $(EXCEPTIONSFILES) \ -- cgit v1.2.3 From 7f8bd1397d9f81a9d96def7d481ecd6f2096c3de Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Thu, 3 Jun 2010 16:40:59 +0200 Subject: fwk139: #i10000# avoid warnings on solaris --- sc/source/ui/app/makefile.mk | 2 ++ sc/source/ui/cctrl/makefile.mk | 1 + sc/source/ui/drawfunc/makefile.mk | 4 +++- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/sc/source/ui/app/makefile.mk b/sc/source/ui/app/makefile.mk index a5e4fe8cc024..a7ff3fe86d7d 100644 --- a/sc/source/ui/app/makefile.mk +++ b/sc/source/ui/app/makefile.mk @@ -57,8 +57,10 @@ SLOFILES = \ EXCEPTIONSFILES= \ $(SLO)$/drwtrans.obj \ + $(SLO)$/scdll.obj \ $(SLO)$/scmod2.obj \ $(SLO)$/scmod.obj \ + $(SLO)$/typemap.obj \ $(SLO)$/client.obj \ $(SLO)$/inputwin.obj diff --git a/sc/source/ui/cctrl/makefile.mk b/sc/source/ui/cctrl/makefile.mk index 17fd9b40cb95..531013ea1c2e 100644 --- a/sc/source/ui/cctrl/makefile.mk +++ b/sc/source/ui/cctrl/makefile.mk @@ -41,6 +41,7 @@ LIBTARGET=NO # --- Files -------------------------------------------------------- EXCEPTIONSFILES= \ + $(SLO)$/tbinsert.obj \ $(SLO)$/tbzoomsliderctrl.obj \ $(SLO)$/dpcontrol.obj diff --git a/sc/source/ui/drawfunc/makefile.mk b/sc/source/ui/drawfunc/makefile.mk index 52f54b56edce..a50c450ab373 100644 --- a/sc/source/ui/drawfunc/makefile.mk +++ b/sc/source/ui/drawfunc/makefile.mk @@ -75,7 +75,9 @@ SLOFILES = \ $(SLO)$/mediash.obj EXCEPTIONSFILES= \ - $(SLO)$/fuins2.obj + $(SLO)$/fuins2.obj \ + $(SLO)$/graphsh.obj \ + $(SLO)$/mediash.obj NOOPTFILES=\ $(SLO)$/fusel.obj -- cgit v1.2.3 From 9cfca129cb6df9a99db641890543c512169b5806 Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Thu, 3 Jun 2010 16:40:59 +0200 Subject: fwk139: #i10000# avoid warnings on solaris --- basctl/source/basicide/makefile.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/basctl/source/basicide/makefile.mk b/basctl/source/basicide/makefile.mk index 62c4755112d1..b225b987b24b 100644 --- a/basctl/source/basicide/makefile.mk +++ b/basctl/source/basicide/makefile.mk @@ -49,6 +49,7 @@ CDEFS+=-DBASICDEBUG EXCEPTIONSFILES=$(SLO)$/basicrenderable.obj \ $(SLO)$/scriptdocument.obj \ + $(SLO)$/basicbox.obj \ $(SLO)$/basidesh.obj \ $(SLO)$/basides1.obj \ $(SLO)$/basides2.obj \ @@ -75,7 +76,6 @@ EXCEPTIONSFILES=$(SLO)$/basicrenderable.obj \ $(SLO)$/documentenumeration.obj SLOFILES = $(EXCEPTIONSFILES) \ - $(SLO)$/basicbox.obj \ $(SLO)$/baside2b.obj \ $(SLO)$/brkdlg.obj \ $(SLO)$/objdlg.obj \ -- cgit v1.2.3 From a388c0c2cc2e4ba42b73443dc7186451f71fcc33 Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Thu, 3 Jun 2010 16:40:59 +0200 Subject: fwk139: #i10000# avoid warnings on solaris --- sd/source/ui/app/makefile.mk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sd/source/ui/app/makefile.mk b/sd/source/ui/app/makefile.mk index d64d9b672f7e..b0ac26018877 100644 --- a/sd/source/ui/app/makefile.mk +++ b/sd/source/ui/app/makefile.mk @@ -73,8 +73,11 @@ SLOFILES = \ $(SLO)$/tmplctrl.obj EXCEPTIONSFILES= \ + $(SLO)$/sddll1.obj \ + $(SLO)$/sddll2.obj \ $(SLO)$/sdxfer.obj \ $(SLO)$/sdmod1.obj \ + $(SLO)$/tbxww.obj \ $(SLO)$/tmplctrl.obj .IF "$(GUI)" == "WNT" -- cgit v1.2.3 From c74d53a56764858fb1ced80e729f78af1a9e98ac Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Thu, 3 Jun 2010 17:18:19 +0200 Subject: #i112090# enhanced Shadow3DExtractingProcessor --- .../drawinglayer/processor3d/shadow3dextractor.hxx | 14 +++- .../source/processor3d/shadow3dextractor.cxx | 76 +++++++++++++++++----- 2 files changed, 71 insertions(+), 19 deletions(-) diff --git a/drawinglayer/inc/drawinglayer/processor3d/shadow3dextractor.hxx b/drawinglayer/inc/drawinglayer/processor3d/shadow3dextractor.hxx index 23d8e7edd913..93ebfeab48e7 100644 --- a/drawinglayer/inc/drawinglayer/processor3d/shadow3dextractor.hxx +++ b/drawinglayer/inc/drawinglayer/processor3d/shadow3dextractor.hxx @@ -54,9 +54,12 @@ namespace drawinglayer class Shadow3DExtractingProcessor : public BaseProcessor3D { private: + /// typedef for data handling + typedef std::vector< primitive2d::BasePrimitive2D* > BasePrimitive2DVector; + /// result holding vector (2D) and target vector for stacking (inited to &maPrimitive2DSequence) - primitive2d::Primitive2DSequence maPrimitive2DSequence; - primitive2d::Primitive2DSequence* mpPrimitive2DSequence; + BasePrimitive2DVector maPrimitive2DSequence; + BasePrimitive2DVector* mpPrimitive2DSequence; /// object transformation for scene for 2d definition basegfx::B2DHomMatrix maObjectTransformation; @@ -93,6 +96,10 @@ namespace drawinglayer */ virtual void processBasePrimitive3D(const primitive3d::BasePrimitive3D& rCandidate); + /// helper to convert from BasePrimitive2DVector to primitive2d::Primitive2DSequence + const primitive2d::Primitive2DSequence getPrimitive2DSequenceFromBasePrimitive2DVector( + const BasePrimitive2DVector& rVector) const; + public: Shadow3DExtractingProcessor( const geometry::ViewInformation3D& rViewInformation, @@ -100,9 +107,10 @@ namespace drawinglayer const basegfx::B3DVector& rLightNormal, double fShadowSlant, const basegfx::B3DRange& rContained3DRange); + virtual ~Shadow3DExtractingProcessor(); /// data read access - const primitive2d::Primitive2DSequence& getPrimitive2DSequence() const { return maPrimitive2DSequence; } + const primitive2d::Primitive2DSequence getPrimitive2DSequence() const; const basegfx::B2DHomMatrix& getObjectTransformation() const { return maObjectTransformation; } const basegfx::B3DHomMatrix& getWorldToEye() const { return maWorldToEye; } const basegfx::B3DHomMatrix& getEyeToView() const { return maEyeToView; } diff --git a/drawinglayer/source/processor3d/shadow3dextractor.cxx b/drawinglayer/source/processor3d/shadow3dextractor.cxx index 2abbcaa9f83f..9e0c0674ea66 100644 --- a/drawinglayer/source/processor3d/shadow3dextractor.cxx +++ b/drawinglayer/source/processor3d/shadow3dextractor.cxx @@ -51,6 +51,25 @@ namespace drawinglayer { namespace processor3d { + /// helper to convert from BasePrimitive2DVector to primitive2d::Primitive2DSequence + const primitive2d::Primitive2DSequence Shadow3DExtractingProcessor::getPrimitive2DSequenceFromBasePrimitive2DVector( + const BasePrimitive2DVector& rVector) const + { + const sal_uInt32 nCount(rVector.size()); + primitive2d::Primitive2DSequence aRetval(nCount); + + for(sal_uInt32 a(0); a < nCount; a++) + { + aRetval[a] = rVector[a]; + } + + // all entries taken over; no need to delete entries, just reset to + // mark as empty + const_cast< BasePrimitive2DVector& >(rVector).clear(); + + return aRetval; + } + // as tooling, the process() implementation takes over API handling and calls this // virtual render method when the primitive implementation is BasePrimitive3D-based. void Shadow3DExtractingProcessor::processBasePrimitive3D(const primitive3d::BasePrimitive3D& rCandidate) @@ -64,8 +83,8 @@ namespace drawinglayer const primitive3d::ShadowPrimitive3D& rPrimitive = static_cast< const primitive3d::ShadowPrimitive3D& >(rCandidate); // set new target - primitive2d::Primitive2DSequence aNewSubList; - primitive2d::Primitive2DSequence* pLastTargetSequence = mpPrimitive2DSequence; + BasePrimitive2DVector aNewSubList; + BasePrimitive2DVector* pLastTargetSequence = mpPrimitive2DSequence; mpPrimitive2DSequence = &aNewSubList; // activate convert @@ -84,21 +103,26 @@ namespace drawinglayer mbConvert = bLastConvert; mpPrimitive2DSequence = pLastTargetSequence; - // create 2d shadow primitive with result - const primitive2d::Primitive2DReference xRef(new primitive2d::ShadowPrimitive2D(rPrimitive.getShadowTransform(), rPrimitive.getShadowColor(), aNewSubList)); + // create 2d shadow primitive with result. This also fetches all entries + // from aNewSubList, so there is no need to delete them + primitive2d::BasePrimitive2D* pNew = new primitive2d::ShadowPrimitive2D( + rPrimitive.getShadowTransform(), + rPrimitive.getShadowColor(), + getPrimitive2DSequenceFromBasePrimitive2DVector(aNewSubList)); if(basegfx::fTools::more(rPrimitive.getShadowTransparence(), 0.0)) { // create simpleTransparencePrimitive, add created primitives - const primitive2d::Primitive2DSequence aNewTransPrimitiveVector(&xRef, 1L); - const primitive2d::Primitive2DReference xRef2(new primitive2d::UnifiedTransparencePrimitive2D(aNewTransPrimitiveVector, rPrimitive.getShadowTransparence())); - primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(*mpPrimitive2DSequence, xRef2); - } - else - { - // add directly - primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(*mpPrimitive2DSequence, xRef); + const primitive2d::Primitive2DReference xRef(pNew); + const primitive2d::Primitive2DSequence aNewTransPrimitiveVector(&xRef, 1); + + pNew = new primitive2d::UnifiedTransparencePrimitive2D( + aNewTransPrimitiveVector, + rPrimitive.getShadowTransparence()); } + + mpPrimitive2DSequence->push_back(pNew); + break; } case PRIMITIVE3D_ID_TRANSFORMPRIMITIVE3D : @@ -161,8 +185,10 @@ namespace drawinglayer if(a2DHairline.count()) { a2DHairline.transform(getObjectTransformation()); - const primitive2d::Primitive2DReference xRef(new primitive2d::PolygonHairlinePrimitive2D(a2DHairline, maPrimitiveColor)); - primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(*mpPrimitive2DSequence, xRef); + mpPrimitive2DSequence->push_back( + new primitive2d::PolygonHairlinePrimitive2D( + a2DHairline, + maPrimitiveColor)); } } break; @@ -190,8 +216,10 @@ namespace drawinglayer if(a2DFill.count()) { a2DFill.transform(getObjectTransformation()); - const primitive2d::Primitive2DReference xRef(new primitive2d::PolyPolygonColorPrimitive2D(a2DFill, maPrimitiveColor)); - primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(*mpPrimitive2DSequence, xRef); + mpPrimitive2DSequence->push_back( + new primitive2d::PolyPolygonColorPrimitive2D( + a2DFill, + maPrimitiveColor)); } } break; @@ -251,6 +279,16 @@ namespace drawinglayer } } + Shadow3DExtractingProcessor::~Shadow3DExtractingProcessor() + { + OSL_ENSURE(0 == maPrimitive2DSequence.size(), + "OOps, someone used Shadow3DExtractingProcessor, but did not fetch the results (!)"); + for(sal_uInt32 a(0); a < maPrimitive2DSequence.size(); a++) + { + delete maPrimitive2DSequence[a]; + } + } + basegfx::B2DPolygon Shadow3DExtractingProcessor::impDoShadowProjection(const basegfx::B3DPolygon& rSource) { basegfx::B2DPolygon aRetval; @@ -291,6 +329,12 @@ namespace drawinglayer return aRetval; } + + const primitive2d::Primitive2DSequence Shadow3DExtractingProcessor::getPrimitive2DSequence() const + { + return getPrimitive2DSequenceFromBasePrimitive2DVector(maPrimitive2DSequence); + } + } // end of namespace processor3d } // end of namespace drawinglayer -- cgit v1.2.3 From c8ec85f66fbf7500d18ebf55b1857ea97d47531d Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Thu, 3 Jun 2010 17:47:34 +0200 Subject: aw082: turned back vclpixelprocessor2d.cxx to master state, was checked in by error --- .../source/processor2d/vclpixelprocessor2d.cxx | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx index 27275a7bb04b..a1b1393a2fac 100644 --- a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx @@ -299,27 +299,6 @@ namespace drawinglayer mpOutputDevice->DrawTransparent(aLocalPolyPolygon, rUniTransparenceCandidate.getTransparence()); bDrawTransparentUsed = true; } - - if(!bDrawTransparentUsed) - { - const primitive2d::PolygonHairlinePrimitive2D* pPoHair = dynamic_cast< const primitive2d::PolygonHairlinePrimitive2D* >(xReference.get()); - - if(pPoHair && PRIMITIVE2D_ID_POLYGONHAIRLINEPRIMITIVE2D == pPoHair->getPrimitive2DID()) - { - // single transparent Hairline identified, use directly - const basegfx::BColor aHairColor(maBColorModifierStack.getModifiedColor(pPoHair->getBColor())); - mpOutputDevice->SetFillColor(); - mpOutputDevice->SetLineColor(Color(aHairColor)); - - basegfx::B2DPolygon aLocalPolygon(pPoHair->getB2DPolygon()); - aLocalPolygon.transform(maCurrentTransformation); - - mpOutputDevice->DrawTransparent( - basegfx::B2DPolyPolygon(aLocalPolygon), - rUniTransparenceCandidate.getTransparence()); - bDrawTransparentUsed = true; - } - } } if(!bDrawTransparentUsed) -- cgit v1.2.3 From f40f3c1bcf2031b89913ad15e1e9390268340399 Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Thu, 3 Jun 2010 17:54:38 +0200 Subject: fwk139: #i10000# Fix build problem on Windows build bot --- sfx2/source/doc/docfac.cxx | 9 +++++++-- sfx2/source/doc/syspath.hxx | 3 +-- sfx2/source/doc/syspathw32.cxx | 26 ++++++++++---------------- 3 files changed, 18 insertions(+), 20 deletions(-) diff --git a/sfx2/source/doc/docfac.cxx b/sfx2/source/doc/docfac.cxx index 88ae54d1c58a..a2dcef9a63fc 100644 --- a/sfx2/source/doc/docfac.cxx +++ b/sfx2/source/doc/docfac.cxx @@ -196,6 +196,7 @@ void SfxObjectFactory::SetModule_Impl( SfxModule *pMod ) void SfxObjectFactory::SetSystemTemplate( const String& rServiceName, const String& rTemplateName ) { + static const int nMaxPathSize = 16000; static ::rtl::OUString SERVICE_FILTER_FACTORY = ::rtl::OUString::createFromAscii( "com.sun.star.document.FilterFactory" ); static ::rtl::OUString SERVICE_TYPE_DECTECTION = ::rtl::OUString::createFromAscii( "com.sun.star.document.TypeDetection" ); static ::rtl::OUString SERVICE_SIMPLE_ACCESS = ::rtl::OUString::createFromAscii( "com.sun.star.ucb.SimpleFileAccess" ); @@ -207,8 +208,12 @@ void SfxObjectFactory::SetSystemTemplate( const String& rServiceName, const Stri static ::rtl::OUString DEF_TPL_STR = ::rtl::OUString::createFromAscii("/soffice."); - String sURL; - ::utl::LocalFileHelper::ConvertPhysicalNameToURL( String( SystemPath::GetUserTemplateLocation()), sURL ); + String sURL; + String sPath; + sal_Unicode aPathBuffer[nMaxPathSize]; + if ( SystemPath::GetUserTemplateLocation( aPathBuffer, nMaxPathSize )) + sPath = String( aPathBuffer ); + ::utl::LocalFileHelper::ConvertPhysicalNameToURL( sPath, sURL ); ::rtl::OUString aUserTemplateURL( sURL ); if ( aUserTemplateURL.getLength() != 0) diff --git a/sfx2/source/doc/syspath.hxx b/sfx2/source/doc/syspath.hxx index c305ed4c85b9..015c16f18d26 100644 --- a/sfx2/source/doc/syspath.hxx +++ b/sfx2/source/doc/syspath.hxx @@ -32,13 +32,12 @@ #define __SYSPATH_HXX__ //#pragma warning(disable:4917) -#include #include class SFX2_DLLPUBLIC SystemPath { public: - static ::rtl::OUString GetUserTemplateLocation(); + static bool GetUserTemplateLocation(sal_Unicode*, int nSize); }; #endif diff --git a/sfx2/source/doc/syspathw32.cxx b/sfx2/source/doc/syspathw32.cxx index 485ebc203890..76a8f5beba9f 100644 --- a/sfx2/source/doc/syspathw32.cxx +++ b/sfx2/source/doc/syspathw32.cxx @@ -41,24 +41,19 @@ using namespace ::rtl; #endif #include -#define ALLOC(type, n) ((type *) HeapAlloc(GetProcessHeap(), 0, sizeof(type) * n )) -#define FREE(p) HeapFree(GetProcessHeap(), 0, p) - -static OUString _SHGetSpecialFolderW32( int nFolderID ) +static bool _SHGetSpecialFolderW32( int nFolderID, WCHAR* pszFolder, int nSize ) { LPITEMIDLIST pidl; HRESULT hHdl = SHGetSpecialFolderLocation( NULL, nFolderID, &pidl ); - OUString aFolder; if( hHdl == NOERROR ) { - WCHAR *lpFolderA; - lpFolderA = ALLOC( WCHAR, 16000 ); + WCHAR *lpFolder = static_cast< WCHAR* >( HeapAlloc( GetProcessHeap(), 0, 16000 )); - SHGetPathFromIDListW( pidl, lpFolderA ); - aFolder = OUString( reinterpret_cast(lpFolderA) ); + SHGetPathFromIDListW( pidl, lpFolder ); + wcsncpy( pszFolder, lpFolder, nSize ); - FREE( lpFolderA ); + HeapFree( GetProcessHeap(), 0, lpFolder ); IMalloc *pMalloc; if( NOERROR == SHGetMalloc(&pMalloc) ) { @@ -66,17 +61,16 @@ static OUString _SHGetSpecialFolderW32( int nFolderID ) pMalloc->Release(); } } - return aFolder; + return true; } #endif -OUString SystemPath::GetUserTemplateLocation() +bool SystemPath::GetUserTemplateLocation(sal_Unicode* pFolder, int nSize ) { #ifdef WNT - return _SHGetSpecialFolderW32(CSIDL_TEMPLATES); -#endif -#ifdef UNX - return OUString(); + return _SHGetSpecialFolderW32(CSIDL_TEMPLATES, pFolder, nSize ); +#else + return false; #endif } -- cgit v1.2.3 From 0b7aa4d5b3f2fad7158531486a8f4f9c230a6640 Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Fri, 4 Jun 2010 11:30:03 +0200 Subject: fwk139: #i10000# Another fix for type redefinitions --- sfx2/source/doc/syspathw32.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sfx2/source/doc/syspathw32.cxx b/sfx2/source/doc/syspathw32.cxx index 76a8f5beba9f..a47880bc0c0c 100644 --- a/sfx2/source/doc/syspathw32.cxx +++ b/sfx2/source/doc/syspathw32.cxx @@ -29,12 +29,11 @@ ************************************************************************/ // MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_sfx2.hxx" +// Comment out precompiled statement due to redefinition errors +//#include "precompiled_sfx2.hxx" #include "syspath.hxx" -using namespace ::rtl; - #ifdef WNT #ifdef _MSC_VER #pragma warning(disable:4917) -- cgit v1.2.3 From 709e6fba3956f82b8532443c602b448057e2ab9e Mon Sep 17 00:00:00 2001 From: Ingrid Halama Date: Fri, 4 Jun 2010 11:33:49 +0200 Subject: chart47: #i112111# disable broken api test --- sw/qa/unoapi/knownissues.xcl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sw/qa/unoapi/knownissues.xcl b/sw/qa/unoapi/knownissues.xcl index 4f8e3953dfcf..08e441211cf7 100644 --- a/sw/qa/unoapi/knownissues.xcl +++ b/sw/qa/unoapi/knownissues.xcl @@ -21,6 +21,9 @@ sw.XMLStylesImporter::com::sun::star::xml::sax::XDocumentHandler ### i23422 ### sw.SwXTextViewCursor::com::sun::star::beans::XMultiPropertyStates +### i112111 ### +sw.SwXViewSettings::com::sun::star::beans::XPropertySet + ### i23623 ### sw.SwXStyleFamily::com::sun::star::container::XNameReplace -- cgit v1.2.3 From a557caaf5f70b6c18287776aaf73144c36564813 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 4 Jun 2010 13:14:20 +0200 Subject: unoawt: make compile on unxsols4 --- svtools/source/uno/wizard/wizardshell.hxx | 1 + 1 file changed, 1 insertion(+) diff --git a/svtools/source/uno/wizard/wizardshell.hxx b/svtools/source/uno/wizard/wizardshell.hxx index 7cc656832d81..338b4f38dc4a 100644 --- a/svtools/source/uno/wizard/wizardshell.hxx +++ b/svtools/source/uno/wizard/wizardshell.hxx @@ -129,6 +129,7 @@ namespace svt { namespace uno using WizardShell_Base::skipUntil; using WizardShell_Base::skipBackwardUntil; using WizardShell_Base::getCurrentState; + using WizardShell_Base::activatePath; private: typedef ::std::map< TabPage*, PWizardPageController > Page2ControllerMap; -- cgit v1.2.3 From bf8660708144ccb693063a20954f64a66a1c979d Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Fri, 4 Jun 2010 14:34:23 +0200 Subject: #i112117# changed the Metafile primitive decomposition to better handle sub-metafile contents --- .../source/primitive2d/metafileprimitive2d.cxx | 20 ++++++++--- .../source/processor2d/vclpixelprocessor2d.cxx | 41 +++++++++++++++------- 2 files changed, 45 insertions(+), 16 deletions(-) diff --git a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx index d7e956169e43..6fa1cef2d23f 100644 --- a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx @@ -237,6 +237,12 @@ namespace return maPropertyHolders.size(); } + void PushDefault() + { + PropertyHolder* pNew = new PropertyHolder(); + maPropertyHolders.push_back(pNew); + } + void Push(sal_uInt16 nPushFlags) { if(nPushFlags) @@ -338,11 +344,11 @@ namespace } } } - - // execute the pop - delete maPropertyHolders.back(); - maPropertyHolders.pop_back(); } + + // execute the pop + delete maPropertyHolders.back(); + maPropertyHolders.pop_back(); } } @@ -2135,8 +2141,11 @@ namespace drawinglayer::primitive2d::Primitive2DSequence xSubContent; { rTargetHolders.Push(); + // #i# for sub-Mteafile contents, do start with new, default render state + rPropertyHolders.PushDefault(); interpretMetafile(aGDIMetaFile, rTargetHolders, rPropertyHolders, rViewInformation); xSubContent = rTargetHolders.Current().getPrimitive2DSequence(rPropertyHolders.Current()); + rPropertyHolders.Pop(); rTargetHolders.Pop(); } @@ -2960,8 +2969,11 @@ namespace drawinglayer::primitive2d::Primitive2DSequence xSubContent; { rTargetHolders.Push(); + // #i# for sub-Mteafile contents, do start with new, default render state + rPropertyHolders.PushDefault(); interpretMetafile(rContent, rTargetHolders, rPropertyHolders, rViewInformation); xSubContent = rTargetHolders.Current().getPrimitive2DSequence(rPropertyHolders.Current()); + rPropertyHolders.Pop(); rTargetHolders.Pop(); } diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx index 228e34030401..6a280fcad95e 100644 --- a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx @@ -284,20 +284,37 @@ namespace drawinglayer if(bAllowUsingDrawTransparent && 1 == rContent.getLength()) { const primitive2d::Primitive2DReference xReference(rContent[0]); - const primitive2d::PolyPolygonColorPrimitive2D* pPoPoColor = dynamic_cast< const primitive2d::PolyPolygonColorPrimitive2D* >(xReference.get()); + const primitive2d::BasePrimitive2D* pBasePrimitive = dynamic_cast< const primitive2d::BasePrimitive2D* >(xReference.get()); - if(pPoPoColor && PRIMITIVE2D_ID_POLYPOLYGONCOLORPRIMITIVE2D == pPoPoColor->getPrimitive2DID()) + if(pBasePrimitive) { - // single transparent PolyPolygon identified, use directly - const basegfx::BColor aPolygonColor(maBColorModifierStack.getModifiedColor(pPoPoColor->getBColor())); - mpOutputDevice->SetFillColor(Color(aPolygonColor)); - mpOutputDevice->SetLineColor(); - - basegfx::B2DPolyPolygon aLocalPolyPolygon(pPoPoColor->getB2DPolyPolygon()); - aLocalPolyPolygon.transform(maCurrentTransformation); - - mpOutputDevice->DrawTransparent(aLocalPolyPolygon, rUniTransparenceCandidate.getTransparence()); - bDrawTransparentUsed = true; + switch(pBasePrimitive->getPrimitive2DID()) + { + case PRIMITIVE2D_ID_POLYPOLYGONCOLORPRIMITIVE2D: + { + // single transparent PolyPolygon identified, use directly + const primitive2d::PolyPolygonColorPrimitive2D* pPoPoColor = static_cast< const primitive2d::PolyPolygonColorPrimitive2D* >(pBasePrimitive); + OSL_ENSURE(pPoPoColor, "OOps, PrimitiveID and PrimitiveType do not match (!)"); + const basegfx::BColor aPolygonColor(maBColorModifierStack.getModifiedColor(pPoPoColor->getBColor())); + mpOutputDevice->SetFillColor(Color(aPolygonColor)); + mpOutputDevice->SetLineColor(); + + basegfx::B2DPolyPolygon aLocalPolyPolygon(pPoPoColor->getB2DPolyPolygon()); + aLocalPolyPolygon.transform(maCurrentTransformation); + + mpOutputDevice->DrawTransparent(aLocalPolyPolygon, rUniTransparenceCandidate.getTransparence()); + bDrawTransparentUsed = true; + break; + } + // #i# need to wait for #i101378# which is in CWS vcl112 to directly paint transparent hairlines + //case PRIMITIVE2D_ID_POLYGONHAIRLINEPRIMITIVE2D: + //{ + // // single transparent PolygonHairlinePrimitive2D identified, use directly + // const primitive2d::PolygonHairlinePrimitive2D* pPoHair = static_cast< const primitive2d::PolygonHairlinePrimitive2D* >(pBasePrimitive); + // OSL_ENSURE(pPoHair, "OOps, PrimitiveID and PrimitiveType do not match (!)"); + // break; + //} + } } } -- cgit v1.2.3 From d50be7a83ace7a3181c91dbe63cf2588e1424a1c Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Fri, 4 Jun 2010 17:28:06 +0200 Subject: fwk139: Fix build problem with gcc --- svtools/source/uno/toolboxcontroller.cxx | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/svtools/source/uno/toolboxcontroller.cxx b/svtools/source/uno/toolboxcontroller.cxx index 4658da9bee3a..c0203c93c020 100644 --- a/svtools/source/uno/toolboxcontroller.cxx +++ b/svtools/source/uno/toolboxcontroller.cxx @@ -71,8 +71,8 @@ ToolboxController::ToolboxController( const Reference< XMultiServiceFactory >& rServiceManager, const Reference< XFrame >& xFrame, const ::rtl::OUString& aCommandURL ) : - OWeakObject() - ,OPropertyContainer(GetBroadcastHelper())//shizhoubo + OPropertyContainer(GetBroadcastHelper()) + , OWeakObject() , m_bInitialized( sal_False ) , m_bDisposed( sal_False ) , m_xFrame(xFrame) @@ -98,8 +98,8 @@ ToolboxController::ToolboxController( } ToolboxController::ToolboxController() : - OWeakObject() - ,OPropertyContainer(GetBroadcastHelper())//shizhoubo + OPropertyContainer(GetBroadcastHelper()) + , OWeakObject() , m_bInitialized( sal_False ) , m_bDisposed( sal_False ) , m_aListenerContainer( m_aMutex ) @@ -779,17 +779,19 @@ sal_Bool SAL_CALL ToolboxController::convertFastPropertyValue( com::sun::star::u } -void SAL_CALL ToolboxController::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle, - const com::sun::star::uno::Any& aValue ) throw( com::sun::star::uno::Exception) + +void SAL_CALL ToolboxController::setFastPropertyValue_NoBroadcast( + sal_Int32 nHandle, + const com::sun::star::uno::Any& aValue ) +throw( com::sun::star::uno::Exception) { OPropertyContainer::setFastPropertyValue_NoBroadcast(nHandle, aValue); if (TOOLBARCONTROLLER_PROPHANDLE_SUPPORTSVISIABLE == nHandle) - { sal_Bool rValue; - aValue >>= rValue; - if (m_bInitialized) - this->setSupportVisiableProperty(rValue); + { + sal_Bool rValue(sal_False); + if (( aValue >>= rValue ) && m_bInitialized) + this->setSupportVisiableProperty( rValue ); } - } //end -- cgit v1.2.3 From b16fe0f787ae22c44df8014dfb7faa70d5c6c473 Mon Sep 17 00:00:00 2001 From: os Date: Fri, 4 Jun 2010 18:01:33 +0200 Subject: #i103024# default tabs in non-relative mode in negative indents fixed --- sw/source/core/text/txttab.cxx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sw/source/core/text/txttab.cxx b/sw/source/core/text/txttab.cxx index c51a6157f4c2..0fd88876532b 100644 --- a/sw/source/core/text/txttab.cxx +++ b/sw/source/core/text/txttab.cxx @@ -172,6 +172,11 @@ SwTabPortion *SwTxtFormatter::NewTabPortion( SwTxtFormatInfo &rInf, bool bAuto ) cDec = pTabStop->GetDecimal(); eAdj = pTabStop->GetAdjustment(); nNextPos = pTabStop->GetTabPos(); + if(!bTabsRelativeToIndent && eAdj == SVX_TAB_ADJUST_DEFAULT && nSearchPos < 0) + { + //calculate default tab position of default tabs in negative indent + nNextPos = ( nSearchPos / nNextPos ) * nNextPos; + } } else { -- cgit v1.2.3 From f8a226ebeb998080394cf662bd5fee542d6d1691 Mon Sep 17 00:00:00 2001 From: sj Date: Fri, 4 Jun 2010 21:03:24 +0200 Subject: impress190: #i112086# added support of CustomGeometry --- oox/inc/oox/drawingml/customshapeproperties.hxx | 265 +++++- oox/source/drawingml/customshapegeometry.cxx | 1083 ++++++++++++++++++++++- oox/source/drawingml/customshapeproperties.cxx | 196 +++- oox/source/token/properties.txt | 17 + oox/source/token/tokens.txt | 26 + 5 files changed, 1469 insertions(+), 118 deletions(-) diff --git a/oox/inc/oox/drawingml/customshapeproperties.hxx b/oox/inc/oox/drawingml/customshapeproperties.hxx index 4e4b82cd5acd..62e42701b273 100644 --- a/oox/inc/oox/drawingml/customshapeproperties.hxx +++ b/oox/inc/oox/drawingml/customshapeproperties.hxx @@ -25,65 +25,244 @@ * ************************************************************************/ -#ifndef OOX_DRAWINGML_CUSTOMSHAPEPROPERTIES_HXX -#define OOX_DRAWINGML_CUSTOMSHAPEPROPERTIES_HXX - +#include "oox/drawingml/customshapeproperties.hxx" +#include "oox/helper/helper.hxx" #include "oox/helper/propertymap.hxx" -#include "oox/drawingml/color.hxx" -#include -#include +#include "oox/helper/propertyset.hxx" +#include "oox/core/namespaces.hxx" +#include "properties.hxx" #include "tokens.hxx" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifndef __com_sun_star_beans_PropertyValues_hpp__ -#include -#endif -#include +#include +#include +#include +#include #include +#include + +using rtl::OUString; +using namespace ::oox::core; +using namespace ::com::sun::star; +using namespace ::com::sun::star::uno; +using namespace ::com::sun::star::beans; +using namespace ::com::sun::star::graphic; +using namespace ::com::sun::star::drawing; namespace oox { namespace drawingml { -class CustomShapeProperties; +CustomShapeProperties::CustomShapeProperties() +{ +} +CustomShapeProperties::~CustomShapeProperties() +{ +} -typedef boost::shared_ptr< CustomShapeProperties > CustomShapePropertiesPtr; +sal_Int32 CustomShapeProperties::SetCustomShapeGuideValue( std::vector< CustomShapeGuide >& rGuideList, const CustomShapeGuide& rGuide ) +{ + sal_uInt32 nIndex = 0; + for( ; nIndex < rGuideList.size(); nIndex++ ) + { + if ( rGuideList[ nIndex ].maName == rGuide.maName ) + break; + } + if ( nIndex == rGuideList.size() ) + rGuideList.push_back( rGuide ); + return static_cast< sal_Int32 >( nIndex ); +} -struct CustomShapeGuide +// returns the index into the guidelist for a given formula name, +// if the return value is < 0 then the guide value could not be found +sal_Int32 CustomShapeProperties::GetCustomShapeGuideValue( const std::vector< CustomShapeGuide >& rGuideList, const rtl::OUString& rFormulaName ) { - rtl::OUString maName; - rtl::OUString maFormula; -}; + sal_Int32 nIndex = 0; + for( ; nIndex < static_cast< sal_Int32 >( rGuideList.size() ); nIndex++ ) + { + if ( rGuideList[ nIndex ].maName == rFormulaName ) + break; + } + if ( nIndex == static_cast< sal_Int32 >( rGuideList.size() ) ) + nIndex = -1; + return nIndex; +} -class CustomShapeProperties +void CustomShapeProperties::apply( const CustomShapePropertiesPtr& /* rSourceCustomShapeProperties */ ) { -public: + // not sure if this needs to be implemented +} - CustomShapeProperties(); - virtual ~CustomShapeProperties(); +void CustomShapeProperties::pushToPropSet( const ::oox::core::FilterBase& /* rFilterBase */, + const Reference < XPropertySet >& xPropSet, const Reference < XShape > & xShape ) const +{ + if ( maShapePresetType.getLength() ) + { + //const uno::Reference < drawing::XShape > xShape( xPropSet, UNO_QUERY ); + Reference< drawing::XEnhancedCustomShapeDefaulter > xDefaulter( xShape, UNO_QUERY ); + if( xDefaulter.is() ) + xDefaulter->createCustomShapeDefaults( maShapePresetType ); - void apply( const CustomShapePropertiesPtr& ); - void pushToPropSet( const ::oox::core::FilterBase& rFilterBase, - const ::com::sun::star::uno::Reference < ::com::sun::star::beans::XPropertySet > & xPropSet, - const ::com::sun::star::uno::Reference < ::com::sun::star::drawing::XShape > & xShape) const; + if ( maAdjustmentGuideList.size() ) + { + const OUString sType = CREATE_OUSTRING( "Type" ); + const OUString sCustomShapeGeometry( RTL_CONSTASCII_USTRINGPARAM( "CustomShapeGeometry" ) ); + uno::Any aGeoPropSet = xPropSet->getPropertyValue( sCustomShapeGeometry ); + uno::Sequence< beans::PropertyValue > aGeoPropSeq; + if ( aGeoPropSet >>= aGeoPropSeq ) + { + sal_Int32 i, nCount = aGeoPropSeq.getLength(); + for ( i = 0; i < nCount; i++ ) + { + const rtl::OUString sAdjustmentValues( RTL_CONSTASCII_USTRINGPARAM( "AdjustmentValues" ) ); + if ( aGeoPropSeq[ i ].Name.equals( sAdjustmentValues ) ) + { + uno::Sequence< com::sun::star::drawing::EnhancedCustomShapeAdjustmentValue > aAdjustmentSeq; + if ( aGeoPropSeq[ i ].Value >>= aAdjustmentSeq ) + { + std::vector< CustomShapeGuide >::const_iterator aIter( maAdjustmentGuideList.begin() ); + while( aIter != maAdjustmentGuideList.end() ) + { + if ( (*aIter).maName.getLength() > 3 ) + { + sal_Int32 nAdjustmentIndex = (*aIter).maName.copy( 3 ).toInt32() - 1; + if ( ( nAdjustmentIndex >= 0 ) && ( nAdjustmentIndex < aAdjustmentSeq.getLength() ) ) + { + EnhancedCustomShapeAdjustmentValue aAdjustmentVal; + aAdjustmentVal.Value <<= (*aIter).maFormula.toInt32(); + aAdjustmentVal.State = PropertyState_DIRECT_VALUE; + aAdjustmentSeq[ nAdjustmentIndex ] = aAdjustmentVal; + } + } + aIter++; + } + aGeoPropSeq[ i ].Value <<= aAdjustmentSeq; + xPropSet->setPropertyValue( sCustomShapeGeometry, Any( aGeoPropSeq ) ); + } + } + else if ( aGeoPropSeq[ i ].Name.equals( sType ) ) + { + aGeoPropSeq[ i ].Value <<= maShapePresetType; + } + } + } + } + } + else + { + sal_uInt32 i; + PropertyMap aPropertyMap; + aPropertyMap[ PROP_Type ] <<= CREATE_OUSTRING( "non-primitive" ); - void setShapePresetType( const rtl::OUString& rShapePresetType ){ maShapePresetType = rShapePresetType; }; - std::vector< CustomShapeGuide >& getAdjustmentValues(){ return maAdjustmentValues; }; + awt::Size aSize( xShape->getSize() ); + awt::Rectangle aViewBox( 0, 0, aSize.Width * 360, aSize.Height * 360 ); + if ( maPath2DList.size() ) + { // TODO: each polygon may have its own size, but I think it is rather been used + // so we are only taking care of the first + if ( maPath2DList[ 0 ].w ) + aViewBox.Width = static_cast< sal_Int32 >( maPath2DList[ 0 ].w ); + if ( maPath2DList[ 0 ].h ) + aViewBox.Height = static_cast< sal_Int32 >( maPath2DList[ 0 ].h ); + } + aPropertyMap[ PROP_ViewBox ] <<= aViewBox; - double getValue( const std::vector< CustomShapeGuide >&, sal_uInt32 nIndex ) const; + Sequence< EnhancedCustomShapeAdjustmentValue > aAdjustmentValues( maAdjustmentGuideList.size() ); + for ( i = 0; i < maAdjustmentGuideList.size(); i++ ) + { + EnhancedCustomShapeAdjustmentValue aAdjustmentVal; + aAdjustmentVal.Value <<= maAdjustmentGuideList[ i ].maFormula.toInt32(); + aAdjustmentVal.State = PropertyState_DIRECT_VALUE; + aAdjustmentValues[ i ] = aAdjustmentVal; + } + aPropertyMap[ PROP_AdjustmentValues ] <<= aAdjustmentValues; -private: + Sequence< rtl::OUString > aEquations( maGuideList.size() ); + for ( i = 0; i < maGuideList.size(); i++ ) + aEquations[ i ] = maGuideList[ i ].maFormula; + aPropertyMap[ PROP_Equations ] <<= aEquations; - rtl::OUString maShapePresetType; - std::vector< CustomShapeGuide > maAdjustmentValues; -}; + PropertyMap aPath; + Sequence< EnhancedCustomShapeSegment > aSegments( maSegments.size() ); + for ( i = 0; i < maSegments.size(); i++ ) + aSegments[ i ] = maSegments[ i ]; + aPath[ PROP_Segments ] <<= aSegments; + sal_uInt32 j, k, nParameterPairs = 0; + for ( i = 0; i < maPath2DList.size(); i++ ) + nParameterPairs += maPath2DList[ i ].parameter.size(); + Sequence< EnhancedCustomShapeParameterPair > aParameterPairs( nParameterPairs ); + for ( i = 0, k = 0; i < maPath2DList.size(); i++ ) + for ( j = 0; j < maPath2DList[ i ].parameter.size(); j++ ) + aParameterPairs[ k++ ] = maPath2DList[ i ].parameter[ j ]; + aPath[ PROP_Coordinates ] <<= aParameterPairs; + Sequence< PropertyValue > aPathSequence = aPath.makePropertyValueSequence(); + aPropertyMap[ PROP_Path ] <<= aPathSequence; -} } + Sequence< PropertyValues > aHandles( maAdjustHandleList.size() ); + for ( i = 0; i < maAdjustHandleList.size(); i++ ) + { + PropertyMap aHandle; + // maAdjustmentHandle[ i ].gdRef1 ... maAdjustmentHandle[ i ].gdRef2 ... :( + // gdRef1 && gdRef2 -> we do not offer such reference, so it is difficult + // to determine the correct adjustment handle that should be updated with the adjustment + // position. here is the solution: the adjustment value that is used within the position + // has to be updated, in case the position is a formula the first usage of a + // adjument value is decisive + if ( maAdjustHandleList[ i ].polar ) + { + aHandle[ PROP_Position ] <<= maAdjustHandleList[ i ].pos; + if ( maAdjustHandleList[ i ].min1.has() ) + aHandle[ PROP_RadiusRangeMinimum ] <<= maAdjustHandleList[ i ].min1.get(); + if ( maAdjustHandleList[ i ].max1.has() ) + aHandle[ PROP_RadiusRangeMaximum ] <<= maAdjustHandleList[ i ].max1.get(); -#endif // OOX_DRAWINGML_CUSTOMSHAPEPROPERTIES_HXX + /* TODO: AngleMin & AngleMax + if ( maAdjustHandleList[ i ].min2.has() ) + aHandle[ PROP_ ] = maAdjustHandleList[ i ].min2.get(); + if ( maAdjustHandleList[ i ].max2.has() ) + aHandle[ PROP_ ] = maAdjustHandleList[ i ].max2.get(); + */ + } + else + { + aHandle[ PROP_Position ] <<= maAdjustHandleList[ i ].pos; + if ( maAdjustHandleList[ i ].gdRef1.has() ) + { + // TODO: PROP_RefX and PROP_RefY are not yet part of our file format, + // so the handles will not work after save/reload + sal_Int32 nIndex = GetCustomShapeGuideValue( maAdjustmentGuideList, maAdjustHandleList[ i ].gdRef1.get() ); + if ( nIndex >= 0 ) + aHandle[ PROP_RefX ] <<= nIndex; + } + if ( maAdjustHandleList[ i ].gdRef2.has() ) + { + sal_Int32 nIndex = GetCustomShapeGuideValue( maAdjustmentGuideList, maAdjustHandleList[ i ].gdRef2.get() ); + if ( nIndex >= 0 ) + aHandle[ PROP_RefY ] <<= nIndex; + } + if ( maAdjustHandleList[ i ].min1.has() ) + aHandle[ PROP_RangeXMinimum ] <<= maAdjustHandleList[ i ].min1.get(); + if ( maAdjustHandleList[ i ].max1.has() ) + aHandle[ PROP_RangeXMaximum ] <<= maAdjustHandleList[ i ].max1.get(); + if ( maAdjustHandleList[ i ].min2.has() ) + aHandle[ PROP_RangeYMinimum ] <<= maAdjustHandleList[ i ].min2.get(); + if ( maAdjustHandleList[ i ].max2.has() ) + aHandle[ PROP_RangeYMaximum ] <<= maAdjustHandleList[ i ].max2.get(); + } + aHandles[ i ] = aHandle.makePropertyValueSequence(); + } + aPropertyMap[ PROP_Handles ] <<= aHandles; + + // converting the vector to a sequence + Sequence< PropertyValue > aSeq = aPropertyMap.makePropertyValueSequence(); + PropertySet aPropSet( xPropSet ); + aPropSet.setProperty( PROP_CustomShapeGeometry, aSeq ); + } +} + +double CustomShapeProperties::getValue( const std::vector< CustomShapeGuide >& rGuideList, sal_uInt32 nIndex ) const +{ + double fRet = 0.0; + if ( nIndex < rGuideList.size() ) + { + + } + return fRet; +} + +} } diff --git a/oox/source/drawingml/customshapegeometry.cxx b/oox/source/drawingml/customshapegeometry.cxx index decb759579f3..98fa68729847 100644 --- a/oox/source/drawingml/customshapegeometry.cxx +++ b/oox/source/drawingml/customshapegeometry.cxx @@ -30,8 +30,9 @@ #include #include #include - #include "oox/helper/helper.hxx" +#include "oox/helper/attributelist.hxx" +#include "oox/token/tokenmap.hxx" #include "oox/helper/propertymap.hxx" #include "oox/core/namespaces.hxx" #include "tokens.hxx" @@ -39,6 +40,8 @@ using ::rtl::OUString; using namespace ::oox::core; using namespace ::com::sun::star::uno; +using namespace ::com::sun::star::beans; +using namespace ::com::sun::star::drawing; using namespace ::com::sun::star::xml::sax; namespace oox { namespace drawingml { @@ -94,25 +97,377 @@ typedef std::hash_map< rtl::OUString, FormularCommand, comphelper::UStringHash, static const FormulaCommandHMap* pCommandHashMap; +// +rtl::OUString GetFormulaParameter( const EnhancedCustomShapeParameter& rParameter ) +{ + rtl::OUString aRet; + switch( rParameter.Type ) + { + case EnhancedCustomShapeParameterType::NORMAL : + { + if ( rParameter.Value.getValueTypeClass() == TypeClass_DOUBLE ) + { + double fValue; + if ( rParameter.Value >>= fValue ) + aRet = rtl::OUString::valueOf( fValue ); + } + else + { + sal_Int32 nValue; + if ( rParameter.Value >>= nValue ) + aRet = rtl::OUString::valueOf( nValue ); + } + break; + } + break; + case EnhancedCustomShapeParameterType::EQUATION : + { + if ( rParameter.Value.getValueTypeClass() == TypeClass_LONG ) + { + sal_Int32 nFormulaIndex; + if ( rParameter.Value >>= nFormulaIndex ) + { + aRet = CREATE_OUSTRING( "?" ) + + rtl::OUString::valueOf( nFormulaIndex ) + + CREATE_OUSTRING( " " ); + } + } + else + { + // ups... we should have an index here and not the formula name + sal_Bool bNoGood = sal_True; + } + } + break; + case EnhancedCustomShapeParameterType::ADJUSTMENT : + { + if ( rParameter.Value.getValueTypeClass() == TypeClass_LONG ) + { + sal_Int32 nAdjustmentIndex; + if ( rParameter.Value >>= nAdjustmentIndex ) + { + aRet = CREATE_OUSTRING( "$" ) + + rtl::OUString::valueOf( nAdjustmentIndex ) + + CREATE_OUSTRING( " " ); + } + } + else + { + // ups... we should have an index here and not the formula name + sal_Bool bNotGood = sal_True; + } + } + break; + case EnhancedCustomShapeParameterType::LEFT : + { + const rtl::OUString sLeft( CREATE_OUSTRING( "left" ) ); + aRet = sLeft; + } + break; + case EnhancedCustomShapeParameterType::TOP : + { + const rtl::OUString sTop( CREATE_OUSTRING( "top" ) ); + aRet = sTop; + } + break; + case EnhancedCustomShapeParameterType::RIGHT : + { + const rtl::OUString sRight( CREATE_OUSTRING( "right" ) ); + aRet = sRight; + } + break; + case EnhancedCustomShapeParameterType::BOTTOM : + { + const rtl::OUString sBottom( CREATE_OUSTRING( "bottom" ) ); + aRet = sBottom; + } + break; + case EnhancedCustomShapeParameterType::XSTRETCH : + { + const rtl::OUString sXStretch( CREATE_OUSTRING( "xstretch" ) ); + aRet = sXStretch; + } + break; + case EnhancedCustomShapeParameterType::YSTRETCH : + { + const rtl::OUString sYStretch( CREATE_OUSTRING( "ystretch" ) ); + aRet = sYStretch; + } + break; + case EnhancedCustomShapeParameterType::HASSTROKE : + { + const rtl::OUString sHasStroke( CREATE_OUSTRING( "hasstroke" ) ); + aRet = sHasStroke; + } + break; + case EnhancedCustomShapeParameterType::HASFILL : + { + const rtl::OUString sHasFill( CREATE_OUSTRING( "hasfill" ) ); + aRet = sHasFill; + } + break; + case EnhancedCustomShapeParameterType::WIDTH : + { + const rtl::OUString sWidth( CREATE_OUSTRING( "width" ) ); + aRet = sWidth; + } + break; + case EnhancedCustomShapeParameterType::HEIGHT : + { + const rtl::OUString sHeight( CREATE_OUSTRING( "height" ) ); + aRet = sHeight; + } + break; + case EnhancedCustomShapeParameterType::LOGWIDTH : + { + const rtl::OUString sLogWidth( CREATE_OUSTRING( "logwidth" ) ); + aRet = sLogWidth; + } + break; + case EnhancedCustomShapeParameterType::LOGHEIGHT : + { + const rtl::OUString sLogHeight( CREATE_OUSTRING( "logheight" ) ); + aRet = sLogHeight; + } + break; + } + return aRet; +} + +// --------------------------------------------------------------------- + +static EnhancedCustomShapeParameter GetAdjCoordinate( CustomShapeProperties& rCustomShapeProperties, const::rtl::OUString& rValue, sal_Bool bNoSymbols ) +{ + com::sun::star::drawing::EnhancedCustomShapeParameter aRet; + if ( rValue.getLength() ) + { + sal_Bool bConstant = sal_True; + sal_Int32 nConstant = 0; + sal_Char nVal = 0; + + // first check if its a constant value + switch( StaticTokenMap::get().getTokenFromUnicode( rValue ) ) + { + case XML_3cd4 : nConstant = 270 * 60000; break; + case XML_3cd8 : nConstant = 135 * 60000; break; + case XML_5cd8 : nConstant = 225 * 60000; break; + case XML_7cd8 : nConstant = 315 * 60000; break; + case XML_cd2 : nConstant = 180 * 60000; break; + case XML_cd4 : nConstant = 90 * 60000; break; + case XML_cd8 : nConstant = 45 * 60000; break; + + case XML_b : // variable height of the shape defined in spPr + case XML_h : + { + if ( bNoSymbols ) + { + CustomShapeGuide aGuide; + aGuide.maName = rValue; + aGuide.maFormula = CREATE_OUSTRING( "height" ); + + aRet.Value = Any( CustomShapeProperties::SetCustomShapeGuideValue( rCustomShapeProperties.getGuideList(), aGuide ) ); + aRet.Type = EnhancedCustomShapeParameterType::EQUATION; + } + else + aRet.Type = EnhancedCustomShapeParameterType::HEIGHT; // TODO: HEIGHT needs to be implemented + } + break; + + + case XML_hd8 : // !!PASSTHROUGH INTENDED + nVal += 2; // */ h 1.0 8.0 + case XML_hd6 : // */ h 1.0 6.0 + nVal++; + case XML_hd5 : // */ h 1.0 5.0 + nVal++; + case XML_hd4 : // */ h 1.0 4.0 + nVal += 2; + case XML_hd2 : // */ h 1.0 2.0 + case XML_vc : // */ h 1.0 2.0 + { + nVal += '2'; + + CustomShapeGuide aGuide; + aGuide.maName = rValue; + aGuide.maFormula = CREATE_OUSTRING( "height/" ) + rtl::OUString( nVal ); + + aRet.Value = Any( CustomShapeProperties::SetCustomShapeGuideValue( rCustomShapeProperties.getGuideList(), aGuide ) ); + aRet.Type = EnhancedCustomShapeParameterType::EQUATION; + } + break; + + case XML_t : + case XML_l : + { + nConstant = 0; + aRet.Type = EnhancedCustomShapeParameterType::NORMAL; + } + break; + + case XML_ls : // longest side: max w h + { + CustomShapeGuide aGuide; + aGuide.maName = rValue; + aGuide.maFormula = CREATE_OUSTRING( "max(width,height)" ); + + aRet.Value = Any( CustomShapeProperties::SetCustomShapeGuideValue( rCustomShapeProperties.getGuideList(), aGuide ) ); + aRet.Type = EnhancedCustomShapeParameterType::EQUATION; + } + break; + case XML_ss : // shortest side: min w h + { + CustomShapeGuide aGuide; + aGuide.maName = rValue; + aGuide.maFormula = CREATE_OUSTRING( "min(width,height)" ); + + aRet.Value = Any( CustomShapeProperties::SetCustomShapeGuideValue( rCustomShapeProperties.getGuideList(), aGuide ) ); + aRet.Type = EnhancedCustomShapeParameterType::EQUATION; + } + break; + case XML_ssd8 : // */ ss 1.0 8.0 + nVal += 2; + case XML_ssd6 : // */ ss 1.0 6.0 + nVal += 2; + case XML_ssd4 : // */ ss 1.0 4.0 + nVal += 2; + case XML_ssd2 : // */ ss 1.0 2.0 + { + nVal += '2'; + + CustomShapeGuide aGuide; + aGuide.maName = rValue; + aGuide.maFormula = CREATE_OUSTRING( "min(width,height)/" ) + rtl::OUString( nVal ); + + aRet.Value = Any( CustomShapeProperties::SetCustomShapeGuideValue( rCustomShapeProperties.getGuideList(), aGuide ) ); + aRet.Type = EnhancedCustomShapeParameterType::EQUATION; + } + break; + + case XML_r : // variable width of the shape defined in spPr + case XML_w : + { + if ( bNoSymbols ) + { + CustomShapeGuide aGuide; + aGuide.maName = rValue; + aGuide.maFormula = CREATE_OUSTRING( "width" ); + + aRet.Value = Any( CustomShapeProperties::SetCustomShapeGuideValue( rCustomShapeProperties.getGuideList(), aGuide ) ); + aRet.Type = EnhancedCustomShapeParameterType::EQUATION; + } + else + aRet.Type = EnhancedCustomShapeParameterType::WIDTH; + } + break; + + case XML_wd10 : // */ w 1.0 10.0 + nVal += 2; + case XML_wd8 : // */ w 1.0 8.0 + nVal += 2; + case XML_wd6 : // */ w 1.0 6.0 + nVal++; + case XML_wd5 : // */ w 1.0 5.0 + nVal++; + case XML_wd4 : // */ w 1.0 4.0 + nVal += 2; + case XML_hc : // */ w 1.0 2.0 + case XML_wd2 : // */ w 1.0 2.0 + { + nVal += '2'; + + CustomShapeGuide aGuide; + aGuide.maName = rValue; + aGuide.maFormula = CREATE_OUSTRING( "width/" ) + rtl::OUString( nVal ); + + aRet.Value = Any( CustomShapeProperties::SetCustomShapeGuideValue( rCustomShapeProperties.getGuideList(), aGuide ) ); + aRet.Type = EnhancedCustomShapeParameterType::EQUATION; + } + break; + + default: + bConstant = sal_False; + break; + } + if ( bConstant ) + { + if ( nConstant ) + { + aRet.Value = Any( nConstant ); + aRet.Type = EnhancedCustomShapeParameterType::NORMAL; + } + } + else + { + sal_Unicode n = rValue[ 0 ]; + if ( ( n == '+' ) || ( n == '-' ) ) + { + if ( rValue.getLength() > 0 ) + n = rValue[ 1 ]; + } + if ( ( n >= '0' ) && ( n <= '9' ) ) + { // seems to be a ST_Coordinate + aRet.Value = Any( rValue.toInt32() ); + aRet.Type = EnhancedCustomShapeParameterType::NORMAL; + } + else + { + sal_Int32 nGuideIndex = CustomShapeProperties::GetCustomShapeGuideValue( rCustomShapeProperties.getAdjustmentGuideList(), rValue ); + if ( nGuideIndex >= 0 ) + { + aRet.Value = Any( nGuideIndex ); + aRet.Type = EnhancedCustomShapeParameterType::ADJUSTMENT; + } + else + { + sal_Int32 nGuideIndex = CustomShapeProperties::GetCustomShapeGuideValue( rCustomShapeProperties.getGuideList(), rValue ); + if ( nGuideIndex >= 0 ) + { + aRet.Value = Any( nGuideIndex ); + aRet.Type = EnhancedCustomShapeParameterType::EQUATION; + } + else + aRet.Value = Any( rValue ); + } + } + } + } + return aRet; +} + +static EnhancedCustomShapeParameter GetAdjAngle( CustomShapeProperties& rCustomShapeProperties, const ::rtl::OUString& rValue ) +{ + EnhancedCustomShapeParameter aAngle( GetAdjCoordinate( rCustomShapeProperties, rValue, sal_True ) ); + if ( aAngle.Type == EnhancedCustomShapeParameterType::NORMAL ) + { + sal_Int32 nValue = 0; + aAngle.Value >>= nValue; + double fValue = ( static_cast< double >( nValue ) / 60000.0 ) * 360.0; + aAngle.Value <<= fValue; + } + return aAngle; +} + // --------------------------------------------------------------------- // CT_GeomGuideList -class AdjustmentValueContext : public ContextHandler +class GeomGuideListContext : public ContextHandler { public: - AdjustmentValueContext( ContextHandler& rParent, CustomShapeProperties& rCustomShapeProperties ); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( ::sal_Int32 aElementToken, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& xAttribs ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException); + GeomGuideListContext( ContextHandler& rParent, CustomShapeProperties& rCustomShapeProperties, std::vector< CustomShapeGuide >& rGuideList ); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( sal_Int32 aElementToken, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& xAttribs ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException); protected: - CustomShapeProperties& mrCustomShapeProperties; + std::vector< CustomShapeGuide >& mrGuideList; + CustomShapeProperties& mrCustomShapeProperties; }; -AdjustmentValueContext::AdjustmentValueContext( ContextHandler& rParent, CustomShapeProperties& rCustomShapeProperties ) +GeomGuideListContext::GeomGuideListContext( ContextHandler& rParent, CustomShapeProperties& rCustomShapeProperties, std::vector< CustomShapeGuide >& rGuideList ) : ContextHandler( rParent ) +, mrGuideList( rGuideList ) , mrCustomShapeProperties( rCustomShapeProperties ) { } -static rtl::OUString convertToOOEquation( const rtl::OUString& rSource ) +static rtl::OUString convertToOOEquation( CustomShapeProperties& rCustomShapeProperties, const rtl::OUString& rSource ) { if ( !pCommandHashMap ) { @@ -135,28 +490,140 @@ static rtl::OUString convertToOOEquation( const rtl::OUString& rSource ) rtl::OUString aEquation; if ( aTokens.size() ) { + sal_Int32 i, nParameters = aTokens.size() - 1; + if ( nParameters > 3 ) + nParameters = 3; + + rtl::OUString sParameters[ 3 ]; + + for ( i = 0; i < nParameters; i++ ) + sParameters[ i ] = GetFormulaParameter( GetAdjCoordinate( rCustomShapeProperties, aTokens[ i + 1 ], sal_False ) ); + const FormulaCommandHMap::const_iterator aIter( pCommandHashMap->find( aTokens[ 0 ] ) ); if ( aIter != pCommandHashMap->end() ) { switch( aIter->second ) { case FC_MULDIV : + { + if ( nParameters == 3 ) + aEquation = sParameters[ 0 ] + CREATE_OUSTRING( "*" ) + sParameters[ 1 ] + + CREATE_OUSTRING( "/" ) + sParameters[ 2 ]; + } + break; case FC_PLUSMINUS : + { + if ( nParameters == 3 ) + aEquation = sParameters[ 0 ] + CREATE_OUSTRING( "+" ) + sParameters[ 1 ] + + CREATE_OUSTRING( "-" ) + sParameters[ 2 ]; + } + break; case FC_PLUSDIV : + { + if ( nParameters == 3 ) + aEquation = CREATE_OUSTRING( "(" ) + sParameters[ 0 ] + CREATE_OUSTRING( "+" ) + + sParameters[ 1 ] + CREATE_OUSTRING( ")/" ) + sParameters[ 2 ]; + } + break; case FC_IFELSE : + { + if ( nParameters == 3 ) + aEquation = CREATE_OUSTRING( "if(" ) + sParameters[ 0 ] + CREATE_OUSTRING( "," ) + + sParameters[ 1 ] + CREATE_OUSTRING( "," ) + sParameters[ 2 ] + CREATE_OUSTRING( ")" ); + } + break; case FC_ABS : + { + if ( nParameters == 1 ) + aEquation = CREATE_OUSTRING( "abs(" ) + sParameters[ 0 ] + CREATE_OUSTRING( ")" ); + } + break; case FC_AT2 : + { + if ( nParameters == 2 ) + aEquation = CREATE_OUSTRING( "atan2(" ) + sParameters[ 0 ] + CREATE_OUSTRING( "," ) + + sParameters[ 1 ] + CREATE_OUSTRING( ")" ); + } + break; case FC_CAT2 : + { + if ( nParameters == 3 ) + aEquation = sParameters[ 0 ] + CREATE_OUSTRING( "*(cos(arctan(" ) + + sParameters[ 1 ] + CREATE_OUSTRING( "," ) + sParameters[ 2 ] + CREATE_OUSTRING( ")))" ); + } + break; case FC_COS : + { + if ( nParameters == 2 ) + aEquation = sParameters[ 0 ] + CREATE_OUSTRING( "*cos(" ) + + sParameters[ 1 ] + CREATE_OUSTRING( ")" ); + } + break; case FC_MAX : + { + if ( nParameters == 2 ) + aEquation = CREATE_OUSTRING( "max(" ) + sParameters[ 0 ] + CREATE_OUSTRING( "," ) + + sParameters[ 1 ] + CREATE_OUSTRING( ")" ); + } + break; case FC_MIN : + { + if ( nParameters == 2 ) + aEquation = CREATE_OUSTRING( "min(" ) + sParameters[ 0 ] + CREATE_OUSTRING( "," ) + + sParameters[ 1 ] + CREATE_OUSTRING( ")" ); + } + break; case FC_MOD : + { + if ( nParameters == 3 ) + aEquation = CREATE_OUSTRING( "sqrt(" ) + + sParameters[ 0 ] + CREATE_OUSTRING( "*" ) + sParameters[ 0 ] + CREATE_OUSTRING( "+" ) + + sParameters[ 1 ] + CREATE_OUSTRING( "*" ) + sParameters[ 1 ] + CREATE_OUSTRING( "+" ) + + sParameters[ 2 ] + CREATE_OUSTRING( "*" ) + sParameters[ 2 ] + CREATE_OUSTRING( ")" ); + } + break; case FC_PIN : + { + if ( nParameters == 3 ) // if(x-y,x,if(y-z,z,y)) + aEquation = CREATE_OUSTRING( "if(" ) + sParameters[ 0 ] + CREATE_OUSTRING( "-" ) + sParameters[ 1 ] + + CREATE_OUSTRING( "," ) + sParameters[ 0 ] + CREATE_OUSTRING( ",if(" ) + sParameters[ 2 ] + + CREATE_OUSTRING( "-" ) + sParameters[ 1 ] + CREATE_OUSTRING( "," ) + sParameters[ 1 ] + + CREATE_OUSTRING( "," ) + sParameters[ 2 ] + CREATE_OUSTRING( "))" ); + } + break; case FC_SAT2 : + { + if ( nParameters == 3 ) + aEquation = sParameters[ 0 ] + CREATE_OUSTRING( "*(sin(arctan(" ) + + sParameters[ 1 ] + CREATE_OUSTRING( "," ) + sParameters[ 2 ] + CREATE_OUSTRING( ")))" ); + } + break; case FC_SIN : + { + if ( nParameters == 2 ) + aEquation = sParameters[ 0 ] + CREATE_OUSTRING( "*sin(" ) + + sParameters[ 1 ] + CREATE_OUSTRING( ")" ); + } + break; case FC_SQRT : + { + if ( nParameters == 1 ) + aEquation = CREATE_OUSTRING( "sqrt(" ) + sParameters[ 0 ] + CREATE_OUSTRING( ")" ); + } + break; case FC_TAN : + { + if ( nParameters == 2 ) + aEquation = sParameters[ 0 ] + CREATE_OUSTRING( "*tan(" ) + + sParameters[ 1 ] + CREATE_OUSTRING( ")" ); + } + break; case FC_VAL : + { + if ( nParameters == 1 ) + aEquation = sParameters[ 0 ]; + } + break; default : break; } @@ -165,21 +632,548 @@ static rtl::OUString convertToOOEquation( const rtl::OUString& rSource ) return aEquation; } -Reference< XFastContextHandler > AdjustmentValueContext::createFastChildContext( sal_Int32 aElementToken, const Reference< XFastAttributeList >& xAttribs ) throw (SAXException, RuntimeException) +Reference< XFastContextHandler > GeomGuideListContext::createFastChildContext( sal_Int32 aElementToken, const Reference< XFastAttributeList >& xAttribs ) throw (SAXException, RuntimeException) { if ( aElementToken == ( NMSP_DRAWINGML | XML_gd ) ) // CT_GeomGuide { CustomShapeGuide aGuide; aGuide.maName = xAttribs->getOptionalValue( XML_name ); - aGuide.maFormula = convertToOOEquation( xAttribs->getOptionalValue( XML_fmla ) ); - std::vector< CustomShapeGuide >& rAdjustmentValues( mrCustomShapeProperties.getAdjustmentValues() ); - rAdjustmentValues.push_back( aGuide ); + aGuide.maFormula = convertToOOEquation( mrCustomShapeProperties, xAttribs->getOptionalValue( XML_fmla ) ); + mrGuideList.push_back( aGuide ); } return this; } // --------------------------------------------------------------------- +static const rtl::OUString GetGeomGuideName( const ::rtl::OUString& rValue ) +{ + return rValue; +} + +// --------------------------------------------------------------------- +// CT_AdjPoint2D +class AdjPoint2DContext : public ContextHandler +{ +public: + AdjPoint2DContext( ContextHandler& rParent, const Reference< XFastAttributeList >& xAttribs, CustomShapeProperties& rCustomShapeProperties, EnhancedCustomShapeParameterPair& rAdjPoint2D ); +}; + +AdjPoint2DContext::AdjPoint2DContext( ContextHandler& rParent, const Reference< XFastAttributeList >& xAttribs, CustomShapeProperties& rCustomShapeProperties, EnhancedCustomShapeParameterPair& rAdjPoint2D ) +: ContextHandler( rParent ) +{ + rAdjPoint2D.First = GetAdjCoordinate( rCustomShapeProperties, xAttribs->getOptionalValue( XML_x ), sal_True ); + rAdjPoint2D.Second = GetAdjCoordinate( rCustomShapeProperties, xAttribs->getOptionalValue( XML_y ), sal_True ); +} + +// --------------------------------------------------------------------- +// CT_XYAdjustHandle +class XYAdjustHandleContext : public ContextHandler +{ +public: + XYAdjustHandleContext( ContextHandler& rParent, const Reference< XFastAttributeList >& xAttribs, CustomShapeProperties& rCustomShapeProperties, AdjustHandle& rAdjustHandle ); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( sal_Int32 aElementToken, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& xAttribs ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException); + +protected: + AdjustHandle& mrAdjustHandle; + CustomShapeProperties& mrCustomShapeProperties; +}; + +XYAdjustHandleContext::XYAdjustHandleContext( ContextHandler& rParent, const Reference< XFastAttributeList >& xAttribs, CustomShapeProperties& rCustomShapeProperties, AdjustHandle& rAdjustHandle ) +: ContextHandler( rParent ) +, mrAdjustHandle( rAdjustHandle ) +, mrCustomShapeProperties( rCustomShapeProperties ) +{ + const rtl::OUString aEmptyDefault; + AttributeList aAttribs( xAttribs ); + if ( aAttribs.hasAttribute( XML_gdRefX ) ) + { + mrAdjustHandle.gdRef1 = GetGeomGuideName( aAttribs.getString( XML_gdRefX, aEmptyDefault ) ); + } + if ( aAttribs.hasAttribute( XML_minX ) ) + { + mrAdjustHandle.min1 = GetAdjCoordinate( mrCustomShapeProperties, aAttribs.getString( XML_minX, aEmptyDefault ), sal_True ); + } + if ( aAttribs.hasAttribute( XML_maxX ) ) + { + mrAdjustHandle.max1 = GetAdjCoordinate( mrCustomShapeProperties, aAttribs.getString( XML_maxX, aEmptyDefault ), sal_True ); + } + if ( aAttribs.hasAttribute( XML_gdRefY ) ) + { + mrAdjustHandle.gdRef2 = GetGeomGuideName( aAttribs.getString( XML_gdRefY, aEmptyDefault ) ); + } + if ( aAttribs.hasAttribute( XML_minY ) ) + { + mrAdjustHandle.min2 = GetAdjCoordinate( mrCustomShapeProperties, aAttribs.getString( XML_minY, aEmptyDefault ), sal_True ); + } + if ( aAttribs.hasAttribute( XML_maxY ) ) + { + mrAdjustHandle.max2 = GetAdjCoordinate( mrCustomShapeProperties, aAttribs.getString( XML_maxY, aEmptyDefault ), sal_True ); + } +} + +Reference< XFastContextHandler > XYAdjustHandleContext::createFastChildContext( sal_Int32 aElementToken, const Reference< XFastAttributeList >& xAttribs ) throw (SAXException, RuntimeException) +{ + Reference< XFastContextHandler > xContext; + if ( aElementToken == ( NMSP_DRAWINGML | XML_pos ) ) + xContext = new AdjPoint2DContext( *this, xAttribs, mrCustomShapeProperties, mrAdjustHandle.pos ); // CT_AdjPoint2D + return xContext; +} + +// --------------------------------------------------------------------- +// CT_PolarAdjustHandle +class PolarAdjustHandleContext : public ContextHandler +{ +public: + PolarAdjustHandleContext( ContextHandler& rParent, const Reference< XFastAttributeList >& xAttribs, CustomShapeProperties& rCustomShapeProperties, AdjustHandle& rAdjustHandle ); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( sal_Int32 aElementToken, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& xAttribs ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException); + +protected: + AdjustHandle& mrAdjustHandle; + CustomShapeProperties& mrCustomShapeProperties; +}; + +PolarAdjustHandleContext::PolarAdjustHandleContext( ContextHandler& rParent, const Reference< XFastAttributeList >& xAttribs, CustomShapeProperties& rCustomShapeProperties, AdjustHandle& rAdjustHandle ) +: ContextHandler( rParent ) +, mrAdjustHandle( rAdjustHandle ) +, mrCustomShapeProperties( rCustomShapeProperties ) +{ + const rtl::OUString aEmptyDefault; + AttributeList aAttribs( xAttribs ); + if ( aAttribs.hasAttribute( XML_gdRefR ) ) + { + mrAdjustHandle.gdRef1 = GetGeomGuideName( aAttribs.getString( XML_gdRefR, aEmptyDefault ) ); + } + if ( aAttribs.hasAttribute( XML_minR ) ) + { + mrAdjustHandle.min1 = GetAdjCoordinate( mrCustomShapeProperties, aAttribs.getString( XML_minR, aEmptyDefault ), sal_True ); + } + if ( aAttribs.hasAttribute( XML_maxR ) ) + { + mrAdjustHandle.max1 = GetAdjCoordinate( mrCustomShapeProperties, aAttribs.getString( XML_maxR, aEmptyDefault ), sal_True ); + } + if ( aAttribs.hasAttribute( XML_gdRefAng ) ) + { + mrAdjustHandle.gdRef2 = GetGeomGuideName( aAttribs.getString( XML_gdRefAng, aEmptyDefault ) ); + } + if ( aAttribs.hasAttribute( XML_minAng ) ) + { + mrAdjustHandle.min2 = GetAdjAngle( mrCustomShapeProperties, aAttribs.getString( XML_minAng, aEmptyDefault ) ); + } + if ( aAttribs.hasAttribute( XML_maxAng ) ) + { + mrAdjustHandle.max2 = GetAdjAngle( mrCustomShapeProperties, aAttribs.getString( XML_maxAng, aEmptyDefault ) ); + } +} + +Reference< XFastContextHandler > PolarAdjustHandleContext::createFastChildContext( sal_Int32 aElementToken, const Reference< XFastAttributeList >& xAttribs ) throw (SAXException, RuntimeException) +{ + Reference< XFastContextHandler > xContext; + if ( aElementToken == ( NMSP_DRAWINGML | XML_pos ) ) + xContext = new AdjPoint2DContext( *this, xAttribs, mrCustomShapeProperties, mrAdjustHandle.pos ); // CT_AdjPoint2D + return xContext; +} + +// --------------------------------------------------------------------- +// CT_AdjustHandleList +class AdjustHandleListContext : public ContextHandler +{ +public: + AdjustHandleListContext( ContextHandler& rParent, CustomShapeProperties& rCustomShapeProperties, std::vector< AdjustHandle >& rAdjustHandleList ); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( sal_Int32 aElementToken, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& xAttribs ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException); + +protected: + std::vector< AdjustHandle >& mrAdjustHandleList; + CustomShapeProperties& mrCustomShapeProperties; +}; + +AdjustHandleListContext::AdjustHandleListContext( ContextHandler& rParent, CustomShapeProperties& rCustomShapeProperties, std::vector< AdjustHandle >& rAdjustHandleList ) +: ContextHandler( rParent ) +, mrAdjustHandleList( rAdjustHandleList ) +, mrCustomShapeProperties( rCustomShapeProperties ) +{ +} + +Reference< XFastContextHandler > AdjustHandleListContext::createFastChildContext( sal_Int32 aElementToken, const Reference< XFastAttributeList >& xAttribs ) throw (SAXException, RuntimeException) +{ + Reference< XFastContextHandler > xContext; + if ( aElementToken == ( NMSP_DRAWINGML | XML_ahXY ) ) // CT_XYAdjustHandle + { + AdjustHandle aAdjustHandle( sal_False ); + mrAdjustHandleList.push_back( aAdjustHandle ); + xContext = new XYAdjustHandleContext( *this, xAttribs, mrCustomShapeProperties, mrAdjustHandleList.back() ); + } + else if ( aElementToken == ( NMSP_DRAWINGML | XML_ahPolar ) ) // CT_PolarAdjustHandle + { + AdjustHandle aAdjustHandle( sal_True ); + mrAdjustHandleList.push_back( aAdjustHandle ); + xContext = new PolarAdjustHandleContext( *this, xAttribs, mrCustomShapeProperties, mrAdjustHandleList.back() ); + } + return xContext; +} + +// --------------------------------------------------------------------- +// CT_ConnectionSite +class ConnectionSiteContext : public ContextHandler +{ +public: + ConnectionSiteContext( ContextHandler& rParent, const Reference< XFastAttributeList >& xAttribs, CustomShapeProperties& rCustomShapeProperties, ConnectionSite& rConnectionSite ); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( sal_Int32 aElementToken, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& xAttribs ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException); + +protected: + ConnectionSite& mrConnectionSite; + CustomShapeProperties& mrCustomShapeProperties; +}; + +ConnectionSiteContext::ConnectionSiteContext( ContextHandler& rParent, const Reference< XFastAttributeList >& xAttribs, CustomShapeProperties& rCustomShapeProperties, ConnectionSite& rConnectionSite ) +: ContextHandler( rParent ) +, mrConnectionSite( rConnectionSite ) +, mrCustomShapeProperties( rCustomShapeProperties ) +{ + mrConnectionSite.ang = GetAdjAngle( mrCustomShapeProperties, xAttribs->getOptionalValue( XML_ang ) ); +} + +Reference< XFastContextHandler > ConnectionSiteContext::createFastChildContext( sal_Int32 aElementToken, const Reference< XFastAttributeList >& xAttribs ) throw (SAXException, RuntimeException) +{ + Reference< XFastContextHandler > xContext; + if ( aElementToken == ( NMSP_DRAWINGML | XML_pos ) ) + xContext = new AdjPoint2DContext( *this, xAttribs, mrCustomShapeProperties, mrConnectionSite.pos ); // CT_AdjPoint2D + return xContext; +} + +// --------------------------------------------------------------------- +// CT_Path2DMoveTo +class Path2DMoveToContext : public ContextHandler +{ +public: + Path2DMoveToContext( ContextHandler& rParent, CustomShapeProperties& rCustomShapeProperties, EnhancedCustomShapeParameterPair& rAdjPoint2D ); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( sal_Int32 aElementToken, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& xAttribs ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException); + +protected: + EnhancedCustomShapeParameterPair& mrAdjPoint2D; + CustomShapeProperties& mrCustomShapeProperties; +}; + +Path2DMoveToContext::Path2DMoveToContext( ContextHandler& rParent, CustomShapeProperties& rCustomShapeProperties, EnhancedCustomShapeParameterPair& rAdjPoint2D ) +: ContextHandler( rParent ) +, mrAdjPoint2D( rAdjPoint2D ) +, mrCustomShapeProperties( rCustomShapeProperties ) +{ +} + +Reference< XFastContextHandler > Path2DMoveToContext::createFastChildContext( sal_Int32 aElementToken, const Reference< XFastAttributeList >& xAttribs ) throw (SAXException, RuntimeException) +{ + Reference< XFastContextHandler > xContext; + if ( aElementToken == ( NMSP_DRAWINGML | XML_pt ) ) + xContext = new AdjPoint2DContext( *this, xAttribs, mrCustomShapeProperties, mrAdjPoint2D ); // CT_AdjPoint2D + return xContext; +} + +// --------------------------------------------------------------------- +// CT_Path2DLineTo +class Path2DLineToContext : public ContextHandler +{ +public: + Path2DLineToContext( ContextHandler& rParent, CustomShapeProperties& rCustomShapeProperties, EnhancedCustomShapeParameterPair& rAdjPoint2D ); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( sal_Int32 aElementToken, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& xAttribs ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException); + +protected: + EnhancedCustomShapeParameterPair& mrAdjPoint2D; + CustomShapeProperties& mrCustomShapeProperties; +}; + +Path2DLineToContext::Path2DLineToContext( ContextHandler& rParent, CustomShapeProperties& rCustomShapeProperties, EnhancedCustomShapeParameterPair& rAdjPoint2D ) +: ContextHandler( rParent ) +, mrAdjPoint2D( rAdjPoint2D ) +, mrCustomShapeProperties( rCustomShapeProperties ) +{ +} + +Reference< XFastContextHandler > Path2DLineToContext::createFastChildContext( sal_Int32 aElementToken, const Reference< XFastAttributeList >& xAttribs ) throw (SAXException, RuntimeException) +{ + Reference< XFastContextHandler > xContext; + if ( aElementToken == ( NMSP_DRAWINGML | XML_pt ) ) + xContext = new AdjPoint2DContext( *this, xAttribs, mrCustomShapeProperties, mrAdjPoint2D ); // CT_AdjPoint2D + return xContext; +} + +// --------------------------------------------------------------------- +// CT_Path2DQuadBezierTo +class Path2DQuadBezierToContext : public ContextHandler +{ +public: + Path2DQuadBezierToContext( ContextHandler& rParent, CustomShapeProperties& rCustomShapeProperties, EnhancedCustomShapeParameterPair& rPt1, EnhancedCustomShapeParameterPair& rPt2 ); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( sal_Int32 aElementToken, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& xAttribs ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException); + +protected: + EnhancedCustomShapeParameterPair& mrPt1; + EnhancedCustomShapeParameterPair& mrPt2; + int nCount; + CustomShapeProperties& mrCustomShapeProperties; +}; + +Path2DQuadBezierToContext::Path2DQuadBezierToContext( ContextHandler& rParent, + CustomShapeProperties& rCustomShapeProperties, + EnhancedCustomShapeParameterPair& rPt1, + EnhancedCustomShapeParameterPair& rPt2 ) +: ContextHandler( rParent ) +, mrPt1( rPt1 ) +, mrPt2( rPt2 ) +, nCount( 0 ) +, mrCustomShapeProperties( rCustomShapeProperties ) +{ +} + +Reference< XFastContextHandler > Path2DQuadBezierToContext::createFastChildContext( sal_Int32 aElementToken, const Reference< XFastAttributeList >& xAttribs ) throw (SAXException, RuntimeException) +{ + Reference< XFastContextHandler > xContext; + if ( aElementToken == ( NMSP_DRAWINGML | XML_pt ) ) + xContext = new AdjPoint2DContext( *this, xAttribs, mrCustomShapeProperties, nCount++ ? mrPt2 : mrPt1 ); // CT_AdjPoint2D + return xContext; +} + +// --------------------------------------------------------------------- +// CT_Path2DCubicBezierTo +class Path2DCubicBezierToContext : public ContextHandler +{ +public: + Path2DCubicBezierToContext( ContextHandler& rParent, CustomShapeProperties& rCustomShapeProperties, + EnhancedCustomShapeParameterPair&, EnhancedCustomShapeParameterPair&, EnhancedCustomShapeParameterPair& ); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( sal_Int32 aElementToken, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& xAttribs ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException); + +protected: + CustomShapeProperties& mrCustomShapeProperties; + EnhancedCustomShapeParameterPair& mrControlPt1; + EnhancedCustomShapeParameterPair& mrControlPt2; + EnhancedCustomShapeParameterPair& mrEndPt; + int nCount; +}; + +Path2DCubicBezierToContext::Path2DCubicBezierToContext( ContextHandler& rParent, CustomShapeProperties& rCustomShapeProperties, + EnhancedCustomShapeParameterPair& rControlPt1, + EnhancedCustomShapeParameterPair& rControlPt2, + EnhancedCustomShapeParameterPair& rEndPt ) +: ContextHandler( rParent ) +, mrCustomShapeProperties( rCustomShapeProperties ) +, mrControlPt1( rControlPt1 ) +, mrControlPt2( rControlPt2 ) +, mrEndPt( rEndPt ) +, nCount( 0 ) +{ +} + +Reference< XFastContextHandler > Path2DCubicBezierToContext::createFastChildContext( sal_Int32 aElementToken, const Reference< XFastAttributeList >& xAttribs ) throw (SAXException, RuntimeException) +{ + Reference< XFastContextHandler > xContext; + if ( aElementToken == ( NMSP_DRAWINGML | XML_pt ) ) + xContext = new AdjPoint2DContext( *this, xAttribs, mrCustomShapeProperties, + nCount++ ? nCount == 2 ? mrControlPt2 : mrEndPt : mrControlPt1 ); // CT_AdjPoint2D + return xContext; +} + +// --------------------------------------------------------------------- +// CT_Path2DContext +class Path2DContext : public ContextHandler +{ +public: + Path2DContext( ContextHandler& rParent, const Reference< XFastAttributeList >& xAttribs, CustomShapeProperties& rCustomShapeProperties, std::vector< com::sun::star::drawing::EnhancedCustomShapeSegment >& rSegments, Path2D& rPath2D ); + virtual ~Path2DContext(); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL + createFastChildContext( sal_Int32 aElementToken, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& xAttribs ) + throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException); + +protected: + Path2D& mrPath2D; + std::vector< com::sun::star::drawing::EnhancedCustomShapeSegment >& mrSegments; + CustomShapeProperties& mrCustomShapeProperties; +}; + +Path2DContext::Path2DContext( ContextHandler& rParent, const Reference< XFastAttributeList >& xAttribs, CustomShapeProperties& rCustomShapeProperties, std::vector< com::sun::star::drawing::EnhancedCustomShapeSegment >& rSegments, Path2D& rPath2D ) +: ContextHandler( rParent ) +, mrSegments( rSegments ) +, mrPath2D( rPath2D ) +, mrCustomShapeProperties( rCustomShapeProperties ) +{ + const rtl::OUString aEmptyString; + + AttributeList aAttribs( xAttribs ); + rPath2D.w = aAttribs.getString( XML_w, aEmptyString ).toInt64(); + rPath2D.h = aAttribs.getString( XML_h, aEmptyString ).toInt64(); + rPath2D.fill = aAttribs.getToken( XML_fill, XML_norm ); + rPath2D.stroke = aAttribs.getBool( XML_stroke, sal_True ); + rPath2D.extrusionOk = aAttribs.getBool( XML_extrusionOk, sal_True ); +} + +Path2DContext::~Path2DContext() +{ + EnhancedCustomShapeSegment aNewSegment; + if ( mrPath2D.fill == XML_none ) + { + aNewSegment.Command = EnhancedCustomShapeSegmentCommand::NOFILL; + aNewSegment.Count = 0; + mrSegments.push_back( aNewSegment ); + } + aNewSegment.Command = EnhancedCustomShapeSegmentCommand::ENDSUBPATH; + aNewSegment.Count = 0; + mrSegments.push_back( aNewSegment ); +} + +Reference< XFastContextHandler > Path2DContext::createFastChildContext( sal_Int32 aElementToken, + const Reference< XFastAttributeList >& xAttribs ) throw ( SAXException, RuntimeException ) +{ + Reference< XFastContextHandler > xContext; + switch( aElementToken ) + { + case NMSP_DRAWINGML | XML_close : + { + EnhancedCustomShapeSegment aNewSegment; + aNewSegment.Command = EnhancedCustomShapeSegmentCommand::CLOSESUBPATH; + aNewSegment.Count = 0; + mrSegments.push_back( aNewSegment ); + } + break; + case NMSP_DRAWINGML | XML_moveTo : + { + EnhancedCustomShapeSegment aNewSegment; + aNewSegment.Command = EnhancedCustomShapeSegmentCommand::MOVETO; + aNewSegment.Count = 1; + mrSegments.push_back( aNewSegment ); + + EnhancedCustomShapeParameterPair aAdjPoint2D; + mrPath2D.parameter.push_back( aAdjPoint2D ); + xContext = new Path2DMoveToContext( *this, mrCustomShapeProperties, mrPath2D.parameter.back() ); + } + break; + case NMSP_DRAWINGML | XML_lnTo : + { + + if ( !mrSegments.empty() && ( mrSegments.back().Command == EnhancedCustomShapeSegmentCommand::LINETO ) ) + mrSegments.back().Count++; + else + { + EnhancedCustomShapeSegment aSegment; + aSegment.Command = EnhancedCustomShapeSegmentCommand::LINETO; + aSegment.Count = 1; + mrSegments.push_back( aSegment ); + } + EnhancedCustomShapeParameterPair aAdjPoint2D; + mrPath2D.parameter.push_back( aAdjPoint2D ); + xContext = new Path2DLineToContext( *this, mrCustomShapeProperties, mrPath2D.parameter.back() ); + } + break; + case NMSP_DRAWINGML | XML_arcTo : // CT_Path2DArcTo + { + if ( !mrSegments.empty() && ( mrSegments.back().Command == EnhancedCustomShapeSegmentCommand::ARCTO ) ) + mrSegments.back().Count++; + else + { + EnhancedCustomShapeSegment aSegment; + aSegment.Command = EnhancedCustomShapeSegmentCommand::ARCTO; + aSegment.Count = 1; + mrSegments.push_back( aSegment ); + } + EnhancedCustomShapeParameter aWidth = GetAdjCoordinate( mrCustomShapeProperties, xAttribs->getOptionalValue( XML_wR ), sal_True ); + EnhancedCustomShapeParameter aHeight = GetAdjCoordinate( mrCustomShapeProperties, xAttribs->getOptionalValue( XML_hR ), sal_True ); + EnhancedCustomShapeParameter aStartAngle = GetAdjAngle( mrCustomShapeProperties, xAttribs->getOptionalValue( XML_stAng ) ); + EnhancedCustomShapeParameter swAngle = GetAdjAngle( mrCustomShapeProperties, xAttribs->getOptionalValue( XML_swAng ) ); + + EnhancedCustomShapeParameterPair aPt1; // TODO: conversion from (wr hr stAng swAng) + EnhancedCustomShapeParameterPair aPt2; // to (x1 y1 x2 y2 x3 y3 x y) needed + EnhancedCustomShapeParameterPair aPt3; + EnhancedCustomShapeParameterPair aPt; + mrPath2D.parameter.push_back( aPt1 ); + mrPath2D.parameter.push_back( aPt2 ); + mrPath2D.parameter.push_back( aPt3 ); + mrPath2D.parameter.push_back( aPt ); + } + break; + case NMSP_DRAWINGML | XML_quadBezTo : + { + if ( !mrSegments.empty() && ( mrSegments.back().Command == EnhancedCustomShapeSegmentCommand::QUADRATICCURVETO ) ) + mrSegments.back().Count++; + else + { + EnhancedCustomShapeSegment aSegment; + aSegment.Command = EnhancedCustomShapeSegmentCommand::QUADRATICCURVETO; + aSegment.Count = 1; + mrSegments.push_back( aSegment ); + } + EnhancedCustomShapeParameterPair aPt1; + EnhancedCustomShapeParameterPair aPt2; + mrPath2D.parameter.push_back( aPt1 ); + mrPath2D.parameter.push_back( aPt2 ); + xContext = new Path2DQuadBezierToContext( *this, mrCustomShapeProperties, + mrPath2D.parameter[ mrPath2D.parameter.size() - 2 ], + mrPath2D.parameter.back() ); + } + break; + case NMSP_DRAWINGML | XML_cubicBezTo : + { + if ( !mrSegments.empty() && ( mrSegments.back().Command == EnhancedCustomShapeSegmentCommand::CURVETO ) ) + mrSegments.back().Count++; + else + { + EnhancedCustomShapeSegment aSegment; + aSegment.Command = EnhancedCustomShapeSegmentCommand::CURVETO; + aSegment.Count = 1; + mrSegments.push_back( aSegment ); + } + EnhancedCustomShapeParameterPair aControlPt1; + EnhancedCustomShapeParameterPair aControlPt2; + EnhancedCustomShapeParameterPair aEndPt; + mrPath2D.parameter.push_back( aControlPt1 ); + mrPath2D.parameter.push_back( aControlPt2 ); + mrPath2D.parameter.push_back( aEndPt ); + xContext = new Path2DCubicBezierToContext( *this, mrCustomShapeProperties, + mrPath2D.parameter[ mrPath2D.parameter.size() - 3 ], + mrPath2D.parameter[ mrPath2D.parameter.size() - 2 ], + mrPath2D.parameter.back() ); + } + break; + } + return xContext; +} + +// --------------------------------------------------------------------- +// CT_Path2DList +class Path2DListContext : public ContextHandler +{ +public: + Path2DListContext( ContextHandler& rParent, CustomShapeProperties& rCustomShapeProperties, std::vector< EnhancedCustomShapeSegment >& rSegments, + std::vector< Path2D >& rPath2DList ); + + virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( sal_Int32 aElementToken, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& xAttribs ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException); + +protected: + + CustomShapeProperties& mrCustomShapeProperties; + std::vector< com::sun::star::drawing::EnhancedCustomShapeSegment >& mrSegments; + std::vector< Path2D >& mrPath2DList; +}; + +Path2DListContext::Path2DListContext( ContextHandler& rParent, CustomShapeProperties& rCustomShapeProperties, std::vector< EnhancedCustomShapeSegment >& rSegments, + std::vector< Path2D >& rPath2DList ) +: ContextHandler( rParent ) +, mrCustomShapeProperties( rCustomShapeProperties ) +, mrSegments( rSegments ) +, mrPath2DList( rPath2DList ) +{ +} + +::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL Path2DListContext::createFastChildContext( sal_Int32 aElementToken, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& xAttribs ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException) +{ + Reference< XFastContextHandler > xContext; + if ( aElementToken == ( NMSP_DRAWINGML | XML_path ) ) + { + Path2D aPath2D; + mrPath2DList.push_back( aPath2D ); + xContext = new Path2DContext( *this, xAttribs, mrCustomShapeProperties, mrSegments, mrPath2DList.back() ); + } + return xContext; +} + +// --------------------------------------------------------------------- + OUString GetShapeType( sal_Int32 nType ) { OUString sType; @@ -987,22 +1981,47 @@ CustomShapeGeometryContext::CustomShapeGeometryContext( ContextHandler& rParent, { } -Reference< XFastContextHandler > CustomShapeGeometryContext::createFastChildContext( sal_Int32 aElementToken, const Reference< XFastAttributeList >& ) throw (SAXException, RuntimeException) +Reference< XFastContextHandler > CustomShapeGeometryContext::createFastChildContext( sal_Int32 aElementToken, const Reference< XFastAttributeList >& xAttribs ) throw (SAXException, RuntimeException) { + Reference< XFastContextHandler > xContext; switch( aElementToken ) { - // todo - case NMSP_DRAWINGML|XML_avLst: // CT_GeomGuideList adjust value list - case NMSP_DRAWINGML|XML_gdLst: // CT_GeomGuideList guide list - case NMSP_DRAWINGML|XML_ahLst: // CT_AdjustHandleList adjust handle list - case NMSP_DRAWINGML|XML_cxnLst: // CT_ConnectionSiteList connection site list - case NMSP_DRAWINGML|XML_rect: // CT_GeomRectList geometry rect list - case NMSP_DRAWINGML|XML_pathLst: // CT_Path2DList 2d path list + case NMSP_DRAWINGML|XML_avLst: // CT_GeomGuideList adjust value list + xContext = new GeomGuideListContext( *this, mrCustomShapeProperties, mrCustomShapeProperties.getAdjustmentGuideList() ); + break; + case NMSP_DRAWINGML|XML_gdLst: // CT_GeomGuideList guide list + xContext = new GeomGuideListContext( *this, mrCustomShapeProperties, mrCustomShapeProperties.getGuideList() ); + break; + case NMSP_DRAWINGML|XML_ahLst: // CT_AdjustHandleList adjust handle list + xContext = new AdjustHandleListContext( *this, mrCustomShapeProperties, mrCustomShapeProperties.getAdjustHandleList() ); + break; + case NMSP_DRAWINGML|XML_cxnLst: // CT_ConnectionSiteList connection site list + xContext = this; + break; + case NMSP_DRAWINGML|XML_rect: // CT_GeomRectList geometry rect list + { + GeomRect aGeomRect; + aGeomRect.l = GetAdjCoordinate( mrCustomShapeProperties, xAttribs->getOptionalValue( XML_l ), sal_True ); + aGeomRect.t = GetAdjCoordinate( mrCustomShapeProperties, xAttribs->getOptionalValue( XML_t ), sal_True ); + aGeomRect.r = GetAdjCoordinate( mrCustomShapeProperties, xAttribs->getOptionalValue( XML_r ), sal_True ); + aGeomRect.b = GetAdjCoordinate( mrCustomShapeProperties, xAttribs->getOptionalValue( XML_b ), sal_True ); + mrCustomShapeProperties.getTextRect() = aGeomRect; + } + break; + case NMSP_DRAWINGML|XML_pathLst: // CT_Path2DList 2d path list + xContext = new Path2DListContext( *this, mrCustomShapeProperties, mrCustomShapeProperties.getSegments(), mrCustomShapeProperties.getPath2DList() ); break; - } - Reference< XFastContextHandler > xEmpty; - return xEmpty; + // from cxnLst: + case NMSP_DRAWINGML|XML_cxn: // CT_ConnectionSite + { + ConnectionSite aConnectionSite; + mrCustomShapeProperties.getConnectionSiteList().push_back( aConnectionSite ); + xContext = new ConnectionSiteContext( *this, xAttribs, mrCustomShapeProperties, mrCustomShapeProperties.getConnectionSiteList().back() ); + } + break; + } + return xContext; } // --------------------------------------------------------------------- @@ -1022,7 +2041,7 @@ PresetShapeGeometryContext::PresetShapeGeometryContext( ContextHandler& rParent, Reference< XFastContextHandler > PresetShapeGeometryContext::createFastChildContext( sal_Int32 aElementToken, const Reference< XFastAttributeList >& ) throw (SAXException, RuntimeException) { if ( aElementToken == ( NMSP_DRAWINGML | XML_avLst ) ) - return new AdjustmentValueContext( *this, mrCustomShapeProperties ); + return new GeomGuideListContext( *this, mrCustomShapeProperties, mrCustomShapeProperties.getAdjustmentGuideList() ); else return this; } @@ -1043,20 +2062,10 @@ PresetTextShapeContext::PresetTextShapeContext( ContextHandler& rParent, const R Reference< XFastContextHandler > PresetTextShapeContext::createFastChildContext( sal_Int32 aElementToken, const Reference< XFastAttributeList >& ) throw (SAXException, RuntimeException) { - switch( aElementToken ) - { - // todo - case NMSP_DRAWINGML|XML_avLst: // CT_GeomGuideList adjust value list - case NMSP_DRAWINGML|XML_gdLst: // CT_GeomGuideList guide list - case NMSP_DRAWINGML|XML_ahLst: // CT_AdjustHandleList adjust handle list - case NMSP_DRAWINGML|XML_cxnLst: // CT_ConnectionSiteList connection site list - case NMSP_DRAWINGML|XML_rect: // CT_GeomRectList geometry rect list - case NMSP_DRAWINGML|XML_pathLst: // CT_Path2DList 2d path list - break; - } - - Reference< XFastContextHandler > xEmpty; - return xEmpty; + if ( aElementToken == ( NMSP_DRAWINGML | XML_avLst ) ) + return new GeomGuideListContext( *this, mrCustomShapeProperties, mrCustomShapeProperties.getAdjustmentGuideList() ); + else + return this; } } } diff --git a/oox/source/drawingml/customshapeproperties.cxx b/oox/source/drawingml/customshapeproperties.cxx index 28e84e72e2cc..62e42701b273 100644 --- a/oox/source/drawingml/customshapeproperties.cxx +++ b/oox/source/drawingml/customshapeproperties.cxx @@ -32,6 +32,7 @@ #include "oox/core/namespaces.hxx" #include "properties.hxx" #include "tokens.hxx" +#include #include #include #include @@ -55,6 +56,34 @@ CustomShapeProperties::~CustomShapeProperties() { } +sal_Int32 CustomShapeProperties::SetCustomShapeGuideValue( std::vector< CustomShapeGuide >& rGuideList, const CustomShapeGuide& rGuide ) +{ + sal_uInt32 nIndex = 0; + for( ; nIndex < rGuideList.size(); nIndex++ ) + { + if ( rGuideList[ nIndex ].maName == rGuide.maName ) + break; + } + if ( nIndex == rGuideList.size() ) + rGuideList.push_back( rGuide ); + return static_cast< sal_Int32 >( nIndex ); +} + +// returns the index into the guidelist for a given formula name, +// if the return value is < 0 then the guide value could not be found +sal_Int32 CustomShapeProperties::GetCustomShapeGuideValue( const std::vector< CustomShapeGuide >& rGuideList, const rtl::OUString& rFormulaName ) +{ + sal_Int32 nIndex = 0; + for( ; nIndex < static_cast< sal_Int32 >( rGuideList.size() ); nIndex++ ) + { + if ( rGuideList[ nIndex ].maName == rFormulaName ) + break; + } + if ( nIndex == static_cast< sal_Int32 >( rGuideList.size() ) ) + nIndex = -1; + return nIndex; +} + void CustomShapeProperties::apply( const CustomShapePropertiesPtr& /* rSourceCustomShapeProperties */ ) { // not sure if this needs to be implemented @@ -70,64 +99,155 @@ void CustomShapeProperties::pushToPropSet( const ::oox::core::FilterBase& /* rFi if( xDefaulter.is() ) xDefaulter->createCustomShapeDefaults( maShapePresetType ); - const OUString sType = CREATE_OUSTRING( "Type" ); - const OUString sCustomShapeGeometry( RTL_CONSTASCII_USTRINGPARAM( "CustomShapeGeometry" ) ); - uno::Any aGeoPropSet = xPropSet->getPropertyValue( sCustomShapeGeometry ); - uno::Sequence< beans::PropertyValue > aGeoPropSeq; - if ( aGeoPropSet >>= aGeoPropSeq ) + if ( maAdjustmentGuideList.size() ) { - sal_Int32 i, nCount = aGeoPropSeq.getLength(); - for ( i = 0; i < nCount; i++ ) + const OUString sType = CREATE_OUSTRING( "Type" ); + const OUString sCustomShapeGeometry( RTL_CONSTASCII_USTRINGPARAM( "CustomShapeGeometry" ) ); + uno::Any aGeoPropSet = xPropSet->getPropertyValue( sCustomShapeGeometry ); + uno::Sequence< beans::PropertyValue > aGeoPropSeq; + if ( aGeoPropSet >>= aGeoPropSeq ) { - const rtl::OUString sAdjustmentValues( RTL_CONSTASCII_USTRINGPARAM( "AdjustmentValues" ) ); - if ( aGeoPropSeq[ i ].Name.equals( sAdjustmentValues ) ) + sal_Int32 i, nCount = aGeoPropSeq.getLength(); + for ( i = 0; i < nCount; i++ ) { - uno::Sequence< com::sun::star::drawing::EnhancedCustomShapeAdjustmentValue > aAdjustmentSeq; - if ( aGeoPropSeq[ i ].Value >>= aAdjustmentSeq ) + const rtl::OUString sAdjustmentValues( RTL_CONSTASCII_USTRINGPARAM( "AdjustmentValues" ) ); + if ( aGeoPropSeq[ i ].Name.equals( sAdjustmentValues ) ) { - sal_uInt32 j, nHighest = 0; - for( j = 0; j < maAdjustmentValues.size(); j++ ) + uno::Sequence< com::sun::star::drawing::EnhancedCustomShapeAdjustmentValue > aAdjustmentSeq; + if ( aGeoPropSeq[ i ].Value >>= aAdjustmentSeq ) { - const rtl::OUString& rS( maAdjustmentValues[ j ].maName ); - if ( rS.getLength() > 3 ) + std::vector< CustomShapeGuide >::const_iterator aIter( maAdjustmentGuideList.begin() ); + while( aIter != maAdjustmentGuideList.end() ) { - sal_uInt32 nVal = rS.copy( 3 ).toInt32(); - if ( ( nVal < 10 ) && ( nVal > nHighest ) ) - nHighest = nVal; - } - } - if ( nHighest > static_cast< sal_uInt32 >( aAdjustmentSeq.getLength() ) ) - aAdjustmentSeq.realloc( nHighest ); - - for ( j = 0; j < maAdjustmentValues.size(); j++ ) - { - if( maAdjustmentValues[ j ].maName.getLength() > 3 ) - { - sal_uInt32 nVal = maAdjustmentValues[ j ].maName.copy( 3 ).toInt32(); - if ( nVal-- ) + if ( (*aIter).maName.getLength() > 3 ) { - double fNewAdj = getValue( maAdjustmentValues, nVal ); - aAdjustmentSeq[ nVal ].State = beans::PropertyState_DIRECT_VALUE; - aAdjustmentSeq[ nVal ].Value <<= fNewAdj; + sal_Int32 nAdjustmentIndex = (*aIter).maName.copy( 3 ).toInt32() - 1; + if ( ( nAdjustmentIndex >= 0 ) && ( nAdjustmentIndex < aAdjustmentSeq.getLength() ) ) + { + EnhancedCustomShapeAdjustmentValue aAdjustmentVal; + aAdjustmentVal.Value <<= (*aIter).maFormula.toInt32(); + aAdjustmentVal.State = PropertyState_DIRECT_VALUE; + aAdjustmentSeq[ nAdjustmentIndex ] = aAdjustmentVal; + } } + aIter++; } + aGeoPropSeq[ i ].Value <<= aAdjustmentSeq; + xPropSet->setPropertyValue( sCustomShapeGeometry, Any( aGeoPropSeq ) ); } - aGeoPropSeq[ i ].Value <<= aAdjustmentSeq; - xPropSet->setPropertyValue( sCustomShapeGeometry, Any( aGeoPropSeq ) ); } - } - else if ( aGeoPropSeq[ i ].Name.equals( sType ) ) - { - aGeoPropSeq[ i ].Value <<= maShapePresetType; + else if ( aGeoPropSeq[ i ].Name.equals( sType ) ) + { + aGeoPropSeq[ i ].Value <<= maShapePresetType; + } } } } } else { + sal_uInt32 i; PropertyMap aPropertyMap; aPropertyMap[ PROP_Type ] <<= CREATE_OUSTRING( "non-primitive" ); + awt::Size aSize( xShape->getSize() ); + awt::Rectangle aViewBox( 0, 0, aSize.Width * 360, aSize.Height * 360 ); + if ( maPath2DList.size() ) + { // TODO: each polygon may have its own size, but I think it is rather been used + // so we are only taking care of the first + if ( maPath2DList[ 0 ].w ) + aViewBox.Width = static_cast< sal_Int32 >( maPath2DList[ 0 ].w ); + if ( maPath2DList[ 0 ].h ) + aViewBox.Height = static_cast< sal_Int32 >( maPath2DList[ 0 ].h ); + } + aPropertyMap[ PROP_ViewBox ] <<= aViewBox; + + Sequence< EnhancedCustomShapeAdjustmentValue > aAdjustmentValues( maAdjustmentGuideList.size() ); + for ( i = 0; i < maAdjustmentGuideList.size(); i++ ) + { + EnhancedCustomShapeAdjustmentValue aAdjustmentVal; + aAdjustmentVal.Value <<= maAdjustmentGuideList[ i ].maFormula.toInt32(); + aAdjustmentVal.State = PropertyState_DIRECT_VALUE; + aAdjustmentValues[ i ] = aAdjustmentVal; + } + aPropertyMap[ PROP_AdjustmentValues ] <<= aAdjustmentValues; + + Sequence< rtl::OUString > aEquations( maGuideList.size() ); + for ( i = 0; i < maGuideList.size(); i++ ) + aEquations[ i ] = maGuideList[ i ].maFormula; + aPropertyMap[ PROP_Equations ] <<= aEquations; + + PropertyMap aPath; + Sequence< EnhancedCustomShapeSegment > aSegments( maSegments.size() ); + for ( i = 0; i < maSegments.size(); i++ ) + aSegments[ i ] = maSegments[ i ]; + aPath[ PROP_Segments ] <<= aSegments; + sal_uInt32 j, k, nParameterPairs = 0; + for ( i = 0; i < maPath2DList.size(); i++ ) + nParameterPairs += maPath2DList[ i ].parameter.size(); + Sequence< EnhancedCustomShapeParameterPair > aParameterPairs( nParameterPairs ); + for ( i = 0, k = 0; i < maPath2DList.size(); i++ ) + for ( j = 0; j < maPath2DList[ i ].parameter.size(); j++ ) + aParameterPairs[ k++ ] = maPath2DList[ i ].parameter[ j ]; + aPath[ PROP_Coordinates ] <<= aParameterPairs; + Sequence< PropertyValue > aPathSequence = aPath.makePropertyValueSequence(); + aPropertyMap[ PROP_Path ] <<= aPathSequence; + + Sequence< PropertyValues > aHandles( maAdjustHandleList.size() ); + for ( i = 0; i < maAdjustHandleList.size(); i++ ) + { + PropertyMap aHandle; + // maAdjustmentHandle[ i ].gdRef1 ... maAdjustmentHandle[ i ].gdRef2 ... :( + // gdRef1 && gdRef2 -> we do not offer such reference, so it is difficult + // to determine the correct adjustment handle that should be updated with the adjustment + // position. here is the solution: the adjustment value that is used within the position + // has to be updated, in case the position is a formula the first usage of a + // adjument value is decisive + if ( maAdjustHandleList[ i ].polar ) + { + aHandle[ PROP_Position ] <<= maAdjustHandleList[ i ].pos; + if ( maAdjustHandleList[ i ].min1.has() ) + aHandle[ PROP_RadiusRangeMinimum ] <<= maAdjustHandleList[ i ].min1.get(); + if ( maAdjustHandleList[ i ].max1.has() ) + aHandle[ PROP_RadiusRangeMaximum ] <<= maAdjustHandleList[ i ].max1.get(); + + /* TODO: AngleMin & AngleMax + if ( maAdjustHandleList[ i ].min2.has() ) + aHandle[ PROP_ ] = maAdjustHandleList[ i ].min2.get(); + if ( maAdjustHandleList[ i ].max2.has() ) + aHandle[ PROP_ ] = maAdjustHandleList[ i ].max2.get(); + */ + } + else + { + aHandle[ PROP_Position ] <<= maAdjustHandleList[ i ].pos; + if ( maAdjustHandleList[ i ].gdRef1.has() ) + { + // TODO: PROP_RefX and PROP_RefY are not yet part of our file format, + // so the handles will not work after save/reload + sal_Int32 nIndex = GetCustomShapeGuideValue( maAdjustmentGuideList, maAdjustHandleList[ i ].gdRef1.get() ); + if ( nIndex >= 0 ) + aHandle[ PROP_RefX ] <<= nIndex; + } + if ( maAdjustHandleList[ i ].gdRef2.has() ) + { + sal_Int32 nIndex = GetCustomShapeGuideValue( maAdjustmentGuideList, maAdjustHandleList[ i ].gdRef2.get() ); + if ( nIndex >= 0 ) + aHandle[ PROP_RefY ] <<= nIndex; + } + if ( maAdjustHandleList[ i ].min1.has() ) + aHandle[ PROP_RangeXMinimum ] <<= maAdjustHandleList[ i ].min1.get(); + if ( maAdjustHandleList[ i ].max1.has() ) + aHandle[ PROP_RangeXMaximum ] <<= maAdjustHandleList[ i ].max1.get(); + if ( maAdjustHandleList[ i ].min2.has() ) + aHandle[ PROP_RangeYMinimum ] <<= maAdjustHandleList[ i ].min2.get(); + if ( maAdjustHandleList[ i ].max2.has() ) + aHandle[ PROP_RangeYMaximum ] <<= maAdjustHandleList[ i ].max2.get(); + } + aHandles[ i ] = aHandle.makePropertyValueSequence(); + } + aPropertyMap[ PROP_Handles ] <<= aHandles; + // converting the vector to a sequence Sequence< PropertyValue > aSeq = aPropertyMap.makePropertyValueSequence(); PropertySet aPropSet( xPropSet ); diff --git a/oox/source/token/properties.txt b/oox/source/token/properties.txt index 4d20b8f1c255..98805a583e9d 100644 --- a/oox/source/token/properties.txt +++ b/oox/source/token/properties.txt @@ -5,6 +5,7 @@ ActiveTable Adjust AdjustContrast AdjustLuminance +AdjustmentValues Align ArrangeOrder Aspect @@ -79,6 +80,7 @@ CompileEnglish ConditionalFormat ConnectBars ContainsHeader +Coordinates CopyBack CopyFormulas CopyStyles @@ -109,6 +111,7 @@ Dropdown EchoChar Enabled EndPosition +Equations ErrorAlertStyle ErrorBarStyle ErrorBarX @@ -159,6 +162,7 @@ GraphicURL GridColor GroupInfo HScroll +Handles HasAutoShowInfo HasColumnRowHeaders HasHorizontalScrollBar @@ -270,6 +274,7 @@ ParaLineSpacing ParaRightMargin ParaTabStops ParaTopMargin +Path PercentageNumberFormat PersistName Perspective @@ -288,6 +293,16 @@ PrintGrid PrintHeaders Printable Protected +RadiusRangeMaximum +RadiusRangeMinimum +RangeXMaximum +RangeXMinimum +RangeYMaximum +RangeYMinimum +RefAngle +RefR +RefX +RefY Reference ReferenceDevice RegularExpressions @@ -314,6 +329,7 @@ ScaleToPagesX ScaleToPagesY ScrollValueMax ScrollValueMin +Segments SelectedPage Show ShowBorder @@ -395,6 +411,7 @@ VertJustify VerticalAlign VerticalSplitMode VerticalSplitPositionTwips +ViewBox VisibleSize VisualArea VisualEffect diff --git a/oox/source/token/tokens.txt b/oox/source/token/tokens.txt index 4bf407747d95..b05a21152722 100644 --- a/oox/source/token/tokens.txt +++ b/oox/source/token/tokens.txt @@ -13,6 +13,10 @@ 3Symbols2 3TrafficLights1 3TrafficLights2 +3cd4 +3cd8 +5cd8 +7cd8 3dDkShadow 3dLight 4Arrows @@ -1045,6 +1049,9 @@ categoryIdx ccw ccwIn ccwOut +cd2 +cd4 +cd8 cell cell3D cellColor @@ -2495,6 +2502,12 @@ harsh hasCustomPrompt hash hashData +hc +hd2 +hd4 +hd5 +hd6 +hd8 hdr hdrShapeDefaults hdrs @@ -3077,6 +3090,7 @@ lpstr lpwstr lrTb lrTbV +ls lsdException lstStyle lt @@ -4730,6 +4744,11 @@ srcNode srcOrd srcRect srgbClr +ss +ssd2 +ssd4 +ssd6 +ssd8 sst st stA @@ -5434,6 +5453,7 @@ variant varp varyColors vbProcedure +vc vector vendorID venn @@ -5498,6 +5518,12 @@ wavyDbl wavyDouble wavyHeavy wd +wd10 +wd2 +wd4 +wd5 +wd6 +wd8 wdDnDiag wdUpDiag weave -- cgit v1.2.3 From 35217acdd7ec6387c8335d1bc3d91310be1baba7 Mon Sep 17 00:00:00 2001 From: sj Date: Fri, 4 Jun 2010 21:03:24 +0200 Subject: impress190: #i112086# added support of CustomGeometry --- svx/source/customshapes/EnhancedCustomShape2d.cxx | 240 ++++++++++++---------- svx/source/customshapes/EnhancedCustomShape2d.hxx | 12 ++ 2 files changed, 149 insertions(+), 103 deletions(-) diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx index 28ad49c6b65f..36490775cea1 100644 --- a/svx/source/customshapes/EnhancedCustomShape2d.cxx +++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx @@ -468,6 +468,10 @@ sal_Bool EnhancedCustomShape2d::ConvertSequenceToEnhancedCustomShape2dHandle( const rtl::OUString sSwitched ( RTL_CONSTASCII_USTRINGPARAM( "Switched" ) ); const rtl::OUString sPolar ( RTL_CONSTASCII_USTRINGPARAM( "Polar" ) ); // const rtl::OUString sMap ( RTL_CONSTASCII_USTRINGPARAM( "Map" ) ); + const rtl::OUString sRefX ( RTL_CONSTASCII_USTRINGPARAM( "RefX" ) ); + const rtl::OUString sRefY ( RTL_CONSTASCII_USTRINGPARAM( "RefY" ) ); + const rtl::OUString sRefAngle ( RTL_CONSTASCII_USTRINGPARAM( "RefAngle" ) ); + const rtl::OUString sRefR ( RTL_CONSTASCII_USTRINGPARAM( "RefR" ) ); const rtl::OUString sRadiusRangeMinimum ( RTL_CONSTASCII_USTRINGPARAM( "RadiusRangeMinimum" ) ); const rtl::OUString sRadiusRangeMaximum ( RTL_CONSTASCII_USTRINGPARAM( "RadiusRangeMaximum" ) ); const rtl::OUString sRangeXMinimum ( RTL_CONSTASCII_USTRINGPARAM( "RangeXMinimum" ) ); @@ -526,6 +530,26 @@ sal_Bool EnhancedCustomShape2d::ConvertSequenceToEnhancedCustomShape2dHandle( } } */ + else if ( rPropVal.Name.equals( sRefX ) ) + { + if ( rPropVal.Value >>= rDestinationHandle.nRefX ) + rDestinationHandle.nFlags |= HANDLE_FLAGS_REFX; + } + else if ( rPropVal.Name.equals( sRefY ) ) + { + if ( rPropVal.Value >>= rDestinationHandle.nRefY ) + rDestinationHandle.nFlags |= HANDLE_FLAGS_REFY; + } + else if ( rPropVal.Name.equals( sRefAngle ) ) + { + if ( rPropVal.Value >>= rDestinationHandle.nRefAngle ) + rDestinationHandle.nFlags |= HANDLE_FLAGS_REFANGLE; + } + else if ( rPropVal.Name.equals( sRefR ) ) + { + if ( rPropVal.Value >>= rDestinationHandle.nRefR ) + rDestinationHandle.nFlags |= HANDLE_FLAGS_REFR; + } else if ( rPropVal.Name.equals( sRadiusRangeMinimum ) ) { if ( rPropVal.Value >>= rDestinationHandle.aRadiusRangeMinimum ) @@ -1182,131 +1206,141 @@ sal_Bool EnhancedCustomShape2d::SetHandleControllerPosition( const sal_uInt32 nI Handle aHandle; if ( ConvertSequenceToEnhancedCustomShape2dHandle( seqHandles[ nIndex ], aHandle ) ) { - sal_Bool bAdjFirst = aHandle.aPosition.First.Type == EnhancedCustomShapeParameterType::ADJUSTMENT; - sal_Bool bAdjSecond= aHandle.aPosition.Second.Type == EnhancedCustomShapeParameterType::ADJUSTMENT; - if ( bAdjFirst || bAdjSecond ) + Point aP( rPosition.X, rPosition.Y ); + // apply the negative object rotation to the controller position + + aP.Move( -aLogicRect.Left(), -aLogicRect.Top() ); + if ( bFlipH ) + aP.X() = aLogicRect.GetWidth() - aP.X(); + if ( bFlipV ) + aP.Y() = aLogicRect.GetHeight() - aP.Y(); + if ( nRotateAngle ) { - Point aP( rPosition.X, rPosition.Y ); - // apply the negative object rotation to the controller position - - aP.Move( -aLogicRect.Left(), -aLogicRect.Top() ); - if ( bFlipH ) - aP.X() = aLogicRect.GetWidth() - aP.X(); - if ( bFlipV ) - aP.Y() = aLogicRect.GetHeight() - aP.Y(); - if ( nRotateAngle ) - { - double a = -nRotateAngle * F_PI18000; - RotatePoint( aP, Point( aLogicRect.GetWidth() / 2, aLogicRect.GetHeight() / 2 ), sin( a ), cos( a ) ); - } - const GeoStat aGeoStat( ((SdrObjCustomShape*)pCustomShapeObj)->GetGeoStat() ); - if ( aGeoStat.nShearWink ) - { - double nTan = -aGeoStat.nTan; - if ((bFlipV&&!bFlipH )||(bFlipH&&!bFlipV)) - nTan = -nTan; - ShearPoint( aP, Point( aLogicRect.GetWidth() / 2, aLogicRect.GetHeight() / 2 ), nTan ); - } + double a = -nRotateAngle * F_PI18000; + RotatePoint( aP, Point( aLogicRect.GetWidth() / 2, aLogicRect.GetHeight() / 2 ), sin( a ), cos( a ) ); + } + const GeoStat aGeoStat( ((SdrObjCustomShape*)pCustomShapeObj)->GetGeoStat() ); + if ( aGeoStat.nShearWink ) + { + double nTan = -aGeoStat.nTan; + if ((bFlipV&&!bFlipH )||(bFlipH&&!bFlipV)) + nTan = -nTan; + ShearPoint( aP, Point( aLogicRect.GetWidth() / 2, aLogicRect.GetHeight() / 2 ), nTan ); + } - double fPos1 = aP.X(); //( bFlipH ) ? aLogicRect.GetWidth() - aP.X() : aP.X(); - double fPos2 = aP.Y(); //( bFlipV ) ? aLogicRect.GetHeight() -aP.Y() : aP.Y(); - fPos1 /= fXScale; - fPos2 /= fYScale; + double fPos1 = aP.X(); //( bFlipH ) ? aLogicRect.GetWidth() - aP.X() : aP.X(); + double fPos2 = aP.Y(); //( bFlipV ) ? aLogicRect.GetHeight() -aP.Y() : aP.Y(); + fPos1 /= fXScale; + fPos2 /= fYScale; - if ( aHandle.nFlags & HANDLE_FLAGS_SWITCHED ) + if ( aHandle.nFlags & HANDLE_FLAGS_SWITCHED ) + { + if ( aLogicRect.GetHeight() > aLogicRect.GetWidth() ) { - if ( aLogicRect.GetHeight() > aLogicRect.GetWidth() ) - { - double fX = fPos1; - double fY = fPos2; - fPos1 = fY; - fPos2 = fX; - } + double fX = fPos1; + double fY = fPos2; + fPos1 = fY; + fPos2 = fX; } + } - sal_Int32 nFirstAdjustmentValue = 0, nSecondAdjustmentValue = 0; + sal_Int32 nFirstAdjustmentValue = -1, nSecondAdjustmentValue = -1; + + if ( aHandle.aPosition.First.Type == EnhancedCustomShapeParameterType::ADJUSTMENT ) aHandle.aPosition.First.Value >>= nFirstAdjustmentValue; + if ( aHandle.aPosition.Second.Type == EnhancedCustomShapeParameterType::ADJUSTMENT ) aHandle.aPosition.Second.Value>>= nSecondAdjustmentValue; - if ( aHandle.nFlags & HANDLE_FLAGS_POLAR ) + if ( aHandle.nFlags & HANDLE_FLAGS_POLAR ) + { + double fXRef, fYRef, fAngle; + GetParameter( fXRef, aHandle.aPolar.First, sal_False, sal_False ); + GetParameter( fYRef, aHandle.aPolar.Second, sal_False, sal_False ); + const double fDX = fPos1 - fXRef; + fAngle = -( atan2( -fPos2 + fYRef, ( ( fDX == 0.0L ) ? 0.000000001 : fDX ) ) / F_PI180 ); + double fX = ( fPos1 - fXRef ); + double fY = ( fPos2 - fYRef ); + double fRadius = sqrt( fX * fX + fY * fY ); + if ( aHandle.nFlags & HANDLE_FLAGS_RADIUS_RANGE_MINIMUM ) + { + double fMin; + GetParameter( fMin, aHandle.aRadiusRangeMinimum, sal_False, sal_False ); + if ( fRadius < fMin ) + fRadius = fMin; + } + if ( aHandle.nFlags & HANDLE_FLAGS_RADIUS_RANGE_MAXIMUM ) + { + double fMax; + GetParameter( fMax, aHandle.aRadiusRangeMaximum, sal_False, sal_False ); + if ( fRadius > fMax ) + fRadius = fMax; + } + if ( nFirstAdjustmentValue >= 0 ) + SetAdjustValueAsDouble( fRadius, nFirstAdjustmentValue ); + if ( nSecondAdjustmentValue >= 0 ) + SetAdjustValueAsDouble( fAngle, nSecondAdjustmentValue ); + } + else + { + if ( aHandle.nFlags & HANDLE_FLAGS_REFX ) + { + nFirstAdjustmentValue = aHandle.nRefX; + fPos1 *= 100000.0; + fPos1 /= nCoordWidth; + } + if ( aHandle.nFlags & HANDLE_FLAGS_REFY ) { - double fXRef, fYRef, fAngle; - GetParameter( fXRef, aHandle.aPolar.First, sal_False, sal_False ); - GetParameter( fYRef, aHandle.aPolar.Second, sal_False, sal_False ); - const double fDX = fPos1 - fXRef; - fAngle = -( atan2( -fPos2 + fYRef, ( ( fDX == 0.0L ) ? 0.000000001 : fDX ) ) / F_PI180 ); - double fX = ( fPos1 - fXRef ); - double fY = ( fPos2 - fYRef ); - double fRadius = sqrt( fX * fX + fY * fY ); - if ( aHandle.nFlags & HANDLE_FLAGS_RADIUS_RANGE_MINIMUM ) + nSecondAdjustmentValue = aHandle.nRefY; + fPos2 *= 100000.0; + fPos2 /= nCoordHeight; + } + if ( nFirstAdjustmentValue >= 0 ) + { + if ( aHandle.nFlags & HANDLE_FLAGS_RANGE_X_MINIMUM ) // check if horizontal handle needs to be within a range { - double fMin; - GetParameter( fMin, aHandle.aRadiusRangeMinimum, sal_False, sal_False ); - if ( fRadius < fMin ) - fRadius = fMin; + double fXMin; + GetParameter( fXMin, aHandle.aXRangeMinimum, sal_False, sal_False ); + if ( fPos1 < fXMin ) + fPos1 = fXMin; } - if ( aHandle.nFlags & HANDLE_FLAGS_RADIUS_RANGE_MAXIMUM ) + if ( aHandle.nFlags & HANDLE_FLAGS_RANGE_X_MAXIMUM ) // check if horizontal handle needs to be within a range { - double fMax; - GetParameter( fMax, aHandle.aRadiusRangeMaximum, sal_False, sal_False ); - if ( fRadius > fMax ) - fRadius = fMax; + double fXMax; + GetParameter( fXMax, aHandle.aXRangeMaximum, sal_False, sal_False ); + if ( fPos1 > fXMax ) + fPos1 = fXMax; } - if ( bAdjFirst ) - SetAdjustValueAsDouble( fRadius, nFirstAdjustmentValue ); - if ( bAdjSecond ) - SetAdjustValueAsDouble( fAngle, nSecondAdjustmentValue ); + SetAdjustValueAsDouble( fPos1, nFirstAdjustmentValue ); } - else + if ( nSecondAdjustmentValue >= 0 ) { - if ( bAdjFirst ) + if ( aHandle.nFlags & HANDLE_FLAGS_RANGE_Y_MINIMUM ) // check if vertical handle needs to be within a range { - if ( aHandle.nFlags & HANDLE_FLAGS_RANGE_X_MINIMUM ) // check if horizontal handle needs to be within a range - { - double fXMin; - GetParameter( fXMin, aHandle.aXRangeMinimum, sal_False, sal_False ); - if ( fPos1 < fXMin ) - fPos1 = fXMin; - } - if ( aHandle.nFlags & HANDLE_FLAGS_RANGE_X_MAXIMUM ) // check if horizontal handle needs to be within a range - { - double fXMax; - GetParameter( fXMax, aHandle.aXRangeMaximum, sal_False, sal_False ); - if ( fPos1 > fXMax ) - fPos1 = fXMax; - } - SetAdjustValueAsDouble( fPos1, nFirstAdjustmentValue ); + double fYMin; + GetParameter( fYMin, aHandle.aYRangeMinimum, sal_False, sal_False ); + if ( fPos2 < fYMin ) + fPos2 = fYMin; } - if ( bAdjSecond ) + if ( aHandle.nFlags & HANDLE_FLAGS_RANGE_Y_MAXIMUM ) // check if vertical handle needs to be within a range { - if ( aHandle.nFlags & HANDLE_FLAGS_RANGE_Y_MINIMUM ) // check if vertical handle needs to be within a range - { - double fYMin; - GetParameter( fYMin, aHandle.aYRangeMinimum, sal_False, sal_False ); - if ( fPos2 < fYMin ) - fPos2 = fYMin; - } - if ( aHandle.nFlags & HANDLE_FLAGS_RANGE_Y_MAXIMUM ) // check if vertical handle needs to be within a range - { - double fYMax; - GetParameter( fYMax, aHandle.aYRangeMaximum, sal_False, sal_False ); - if ( fPos2 > fYMax ) - fPos2 = fYMax; - } - SetAdjustValueAsDouble( fPos2, nSecondAdjustmentValue ); + double fYMax; + GetParameter( fYMax, aHandle.aYRangeMaximum, sal_False, sal_False ); + if ( fPos2 > fYMax ) + fPos2 = fYMax; } + SetAdjustValueAsDouble( fPos2, nSecondAdjustmentValue ); } - // and writing them back into the GeometryItem - SdrCustomShapeGeometryItem aGeometryItem((SdrCustomShapeGeometryItem&) - (const SdrCustomShapeGeometryItem&)pCustomShapeObj->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY )); - const rtl::OUString sAdjustmentValues( RTL_CONSTASCII_USTRINGPARAM ( "AdjustmentValues" ) ); - com::sun::star::beans::PropertyValue aPropVal; - aPropVal.Name = sAdjustmentValues; - aPropVal.Value <<= seqAdjustmentValues; - aGeometryItem.SetPropertyValue( aPropVal ); - pCustomShapeObj->SetMergedItem( aGeometryItem ); - bRetValue = sal_True; } + // and writing them back into the GeometryItem + SdrCustomShapeGeometryItem aGeometryItem((SdrCustomShapeGeometryItem&) + (const SdrCustomShapeGeometryItem&)pCustomShapeObj->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY )); + const rtl::OUString sAdjustmentValues( RTL_CONSTASCII_USTRINGPARAM ( "AdjustmentValues" ) ); + com::sun::star::beans::PropertyValue aPropVal; + aPropVal.Name = sAdjustmentValues; + aPropVal.Value <<= seqAdjustmentValues; + aGeometryItem.SetPropertyValue( aPropVal ); + pCustomShapeObj->SetMergedItem( aGeometryItem ); + bRetValue = sal_True; } } return bRetValue; diff --git a/svx/source/customshapes/EnhancedCustomShape2d.hxx b/svx/source/customshapes/EnhancedCustomShape2d.hxx index 00df4b04f389..b3b944513e60 100644 --- a/svx/source/customshapes/EnhancedCustomShape2d.hxx +++ b/svx/source/customshapes/EnhancedCustomShape2d.hxx @@ -67,6 +67,10 @@ class SvxMSDffAdjustmentHandle; #define HANDLE_FLAGS_RANGE_Y_MAXIMUM 0x0100 #define HANDLE_FLAGS_RADIUS_RANGE_MINIMUM 0x0200 #define HANDLE_FLAGS_RADIUS_RANGE_MAXIMUM 0x0400 +#define HANDLE_FLAGS_REFX 0x0800 +#define HANDLE_FLAGS_REFY 0x1000 +#define HANDLE_FLAGS_REFANGLE 0x2000 +#define HANDLE_FLAGS_REFR 0x4000 // MSDFF_HANDLE_FLAGS_RANGE_Y seems to be not defined in // escher, but we are using it internally in to differentiate @@ -145,12 +149,20 @@ class EnhancedCustomShape2d : public SfxItemSet com::sun::star::drawing::EnhancedCustomShapeParameterPair aPosition; com::sun::star::drawing::EnhancedCustomShapeParameterPair aPolar; + sal_Int32 nRefX; + sal_Int32 nRefY; + sal_Int32 nRefAngle; + sal_Int32 nRefR; + com::sun::star::drawing::EnhancedCustomShapeParameter aRadiusRangeMinimum; com::sun::star::drawing::EnhancedCustomShapeParameter aRadiusRangeMaximum; com::sun::star::drawing::EnhancedCustomShapeParameter aXRangeMinimum; com::sun::star::drawing::EnhancedCustomShapeParameter aXRangeMaximum; com::sun::star::drawing::EnhancedCustomShapeParameter aYRangeMinimum; com::sun::star::drawing::EnhancedCustomShapeParameter aYRangeMaximum; + + Handle() : bMirroredX ( sal_False ), bMirroredY ( sal_False ), bSwitched( sal_False ), + nRefX( -1 ), nRefY( -1 ), nRefAngle( -1 ), nRefR( -1 ) {}; }; sal_Bool IsFlipVert() { return bFlipV; }; -- cgit v1.2.3 From 68ad260fd44cd87f726f00878b2010edcc2db7b7 Mon Sep 17 00:00:00 2001 From: sj Date: Fri, 4 Jun 2010 21:03:24 +0200 Subject: impress190: #i112086# added support of CustomGeometry --- .../sun/star/drawing/EnhancedCustomShapeHandle.idl | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/offapi/com/sun/star/drawing/EnhancedCustomShapeHandle.idl b/offapi/com/sun/star/drawing/EnhancedCustomShapeHandle.idl index 7b3f9a223f39..d5e8420fc32f 100644 --- a/offapi/com/sun/star/drawing/EnhancedCustomShapeHandle.idl +++ b/offapi/com/sun/star/drawing/EnhancedCustomShapeHandle.idl @@ -68,6 +68,26 @@ service EnhancedCustomShapeHandle */ [optional, property] ::com::sun::star::drawing::EnhancedCustomShapeParameterPair Polar; + /** RefX, if this attribute is set, it specifies the index of the adjustment + value which is connected to the horizontal position of the handle + */ + [optional, property] long RefX; + + /** RefY, if this attribute is set, it specifies the index of the adjustment + value which is connected to the vertical position of the handle + */ + [optional, property] long RefY; + + /** RefAngle, if this attribute is set, it specifies the index of the adjustment + value which is connected to the angle of the handle + */ + [optional, property] long RefAngle; + + /** RefR, if this attribute is set, it specifies the index of the adjustment + value which is connected to the radius of the handle + */ + [optional, property] long RefR; + /** If the attribute RangeXMinimum is set, it specifies the horizontal minimum range of the handle. */ [optional, property] ::com::sun::star::drawing::EnhancedCustomShapeParameter RangeXMinimum; -- cgit v1.2.3 From 245dec812502aba5e2b29a9e1e16cb618f2e6cff Mon Sep 17 00:00:00 2001 From: sj Date: Sat, 5 Jun 2010 06:23:50 +0200 Subject: fixed merge problems --- oox/inc/oox/drawingml/customshapegeometry.hxx | 4 ++-- oox/inc/oox/drawingml/customshapeproperties.hxx | 1 + oox/inc/oox/drawingml/shape.hxx | 2 +- oox/source/drawingml/customshapeproperties.cxx | 5 ++-- oox/source/drawingml/shape.cxx | 31 +------------------------ oox/source/drawingml/shapepropertiescontext.cxx | 2 +- 6 files changed, 9 insertions(+), 36 deletions(-) diff --git a/oox/inc/oox/drawingml/customshapegeometry.hxx b/oox/inc/oox/drawingml/customshapegeometry.hxx index 75a788acb609..4fec38cf09eb 100644 --- a/oox/inc/oox/drawingml/customshapegeometry.hxx +++ b/oox/inc/oox/drawingml/customshapegeometry.hxx @@ -41,11 +41,11 @@ namespace oox { namespace drawingml { class CustomShapeGeometryContext : public ::oox::core::ContextHandler { public: - CustomShapeGeometryContext( ::oox::core::ContextHandler& rParent, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& xAttributes, Shape& rShape ); + CustomShapeGeometryContext( ::oox::core::ContextHandler& rParent, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& xAttributes, CustomShapeProperties& rCustomShapeProperties ); virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( ::sal_Int32 aElementToken, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& xAttribs ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException); private: - Shape& mrShape; + CustomShapeProperties& mrCustomShapeProperties; }; // --------------------------------------------------------------------- diff --git a/oox/inc/oox/drawingml/customshapeproperties.hxx b/oox/inc/oox/drawingml/customshapeproperties.hxx index 2994c6d76e2b..171437095f03 100644 --- a/oox/inc/oox/drawingml/customshapeproperties.hxx +++ b/oox/inc/oox/drawingml/customshapeproperties.hxx @@ -30,6 +30,7 @@ #include "oox/helper/propertymap.hxx" #include "oox/drawingml/color.hxx" +#include "oox/core/xmlfilterbase.hxx" #include #include #include "oox/helper/helper.hxx" diff --git a/oox/inc/oox/drawingml/shape.hxx b/oox/inc/oox/drawingml/shape.hxx index c951369dbf78..c052e084e506 100644 --- a/oox/inc/oox/drawingml/shape.hxx +++ b/oox/inc/oox/drawingml/shape.hxx @@ -30,7 +30,7 @@ #include "oox/helper/propertymap.hxx" #include "oox/drawingml/drawingmltypes.hxx" -//#include "oox/drawingml/customshapeproperties.hxx" +#include "oox/drawingml/customshapeproperties.hxx" #include "oox/drawingml/textliststyle.hxx" #include diff --git a/oox/source/drawingml/customshapeproperties.cxx b/oox/source/drawingml/customshapeproperties.cxx index 3172c2c29770..62e42701b273 100644 --- a/oox/source/drawingml/customshapeproperties.cxx +++ b/oox/source/drawingml/customshapeproperties.cxx @@ -40,6 +40,7 @@ #include using rtl::OUString; +using namespace ::oox::core; using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; @@ -88,8 +89,8 @@ void CustomShapeProperties::apply( const CustomShapePropertiesPtr& /* rSourceCus // not sure if this needs to be implemented } -void CustomShapeProperties::pushToPropSet( - const Reference < XPropertySet >& xPropSet, const Reference < XShape > & xShape ) const +void CustomShapeProperties::pushToPropSet( const ::oox::core::FilterBase& /* rFilterBase */, + const Reference < XPropertySet >& xPropSet, const Reference < XShape > & xShape ) const { if ( maShapePresetType.getLength() ) { diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx index 1a32d6a206a0..ee10393165ec 100644 --- a/oox/source/drawingml/shape.cxx +++ b/oox/source/drawingml/shape.cxx @@ -299,35 +299,6 @@ Reference< XShape > Shape::createAndInsert( aTransformation.translate( aPosition.X / 360.0, aPosition.Y / 360.0 ); } - if ( mpCustomShapePropertiesPtr && mpCustomShapePropertiesPtr->getPolygon().count() ) - { - ::basegfx::B2DPolyPolygon& rPolyPoly = mpCustomShapePropertiesPtr->getPolygon(); - - if( rPolyPoly.count() > 0 ) { - if( rPolyPoly.areControlPointsUsed() ) { - // TODO Beziers - } else { - uno::Sequence< uno::Sequence< awt::Point > > aPolyPolySequence( rPolyPoly.count() ); - - for (sal_uInt32 j = 0; j < rPolyPoly.count(); j++ ) { - ::basegfx::B2DPolygon aPoly = rPolyPoly.getB2DPolygon( j ); - - // now creating the corresponding PolyPolygon - sal_Int32 i, nNumPoints = aPoly.count(); - uno::Sequence< awt::Point > aPointSequence( nNumPoints ); - awt::Point* pPoints = aPointSequence.getArray(); - for( i = 0; i < nNumPoints; ++i ) - { - const ::basegfx::B2DPoint aPoint( aPoly.getB2DPoint( i ) ); - pPoints[ i ] = awt::Point( static_cast< sal_Int32 >( aPoint.getX() ), static_cast< sal_Int32 >( aPoint.getY() ) ); - } - aPolyPolySequence.getArray()[ j ] = aPointSequence; - } - maShapeProperties[ PROP_PolyPolygon ] <<= aPolyPolySequence; - } - } - } - // special for lineshape if ( aServiceName == OUString::createFromAscii( "com.sun.star.drawing.LineShape" ) ) { @@ -491,7 +462,7 @@ Reference< XShape > Shape::createAndInsert( aPropSet.setProperties( aShapeProperties ); if( aServiceName == OUString::createFromAscii( "com.sun.star.drawing.CustomShape" ) ) - mpCustomShapePropertiesPtr->pushToPropSet( xSet, mxShape ); + mpCustomShapePropertiesPtr->pushToPropSet( rFilterBase, xSet, mxShape ); // in some cases, we don't have any text body. if( getTextBody() ) diff --git a/oox/source/drawingml/shapepropertiescontext.cxx b/oox/source/drawingml/shapepropertiescontext.cxx index 7724ba9b44b2..dd1814ac23cf 100644 --- a/oox/source/drawingml/shapepropertiescontext.cxx +++ b/oox/source/drawingml/shapepropertiescontext.cxx @@ -74,7 +74,7 @@ Reference< XFastContextHandler > ShapePropertiesContext::createFastChildContext( // GeometryGroup case NMSP_DRAWINGML|XML_custGeom: // custom geometry "CT_CustomGeometry2D" - xRet.set( new CustomShapeGeometryContext( *this, xAttribs, mrShape ) ); + xRet.set( new CustomShapeGeometryContext( *this, xAttribs, *(mrShape.getCustomShapeProperties()) ) ); break; -- cgit v1.2.3 From 04f7540cfb65612d4d96174865372f6f0cc7a645 Mon Sep 17 00:00:00 2001 From: sj Date: Sat, 5 Jun 2010 15:12:10 +0200 Subject: impress190: removed warnings --- oox/source/drawingml/customshapegeometry.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/oox/source/drawingml/customshapegeometry.cxx b/oox/source/drawingml/customshapegeometry.cxx index 98fa68729847..a59373a061eb 100644 --- a/oox/source/drawingml/customshapegeometry.cxx +++ b/oox/source/drawingml/customshapegeometry.cxx @@ -117,7 +117,6 @@ rtl::OUString GetFormulaParameter( const EnhancedCustomShapeParameter& rParamete if ( rParameter.Value >>= nValue ) aRet = rtl::OUString::valueOf( nValue ); } - break; } break; case EnhancedCustomShapeParameterType::EQUATION : @@ -419,7 +418,7 @@ static EnhancedCustomShapeParameter GetAdjCoordinate( CustomShapeProperties& rCu } else { - sal_Int32 nGuideIndex = CustomShapeProperties::GetCustomShapeGuideValue( rCustomShapeProperties.getGuideList(), rValue ); + nGuideIndex = CustomShapeProperties::GetCustomShapeGuideValue( rCustomShapeProperties.getGuideList(), rValue ); if ( nGuideIndex >= 0 ) { aRet.Value = Any( nGuideIndex ); -- cgit v1.2.3 From d4af876f9cb4f226fd8b001e7bb0570860777845 Mon Sep 17 00:00:00 2001 From: sj Date: Sat, 5 Jun 2010 19:02:55 +0200 Subject: impress190: #i89450# taking back changes in outliner.hxx and outliner.cxx to avoid compiler warning --- sd/inc/Outliner.hxx | 3 +++ sd/source/ui/view/Outliner.cxx | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/sd/inc/Outliner.hxx b/sd/inc/Outliner.hxx index 1b608fa7b637..dfc7e3e3bf88 100644 --- a/sd/inc/Outliner.hxx +++ b/sd/inc/Outliner.hxx @@ -136,6 +136,9 @@ public: */ void StartSpelling (void); + /** Proxy for method from base class to avoid compiler warning */ + void StartSpelling(EditView&, unsigned char); + /** Initiate a find and/or replace on the next relevant text object. @return Returns when the search/replace is finished (as diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx index ed3777d49082..d4a97cfe2ef9 100644 --- a/sd/source/ui/view/Outliner.cxx +++ b/sd/source/ui/view/Outliner.cxx @@ -318,6 +318,11 @@ void Outliner::StartSpelling (void) mpSearchItem = NULL; } +/** Proxy for method from base class to avoid compiler warning */ +void Outliner::StartSpelling(EditView& rView, unsigned char c) +{ + SdrOutliner::StartSpelling( rView, c ); +} /** Free all resources acquired during the search/spell check. After a spell check the start position is restored here. -- cgit v1.2.3 From fee32b2a33c751c3493331fe11b9f2f4b9c74318 Mon Sep 17 00:00:00 2001 From: sj Date: Sat, 5 Jun 2010 19:04:48 +0200 Subject: impress190: #i89450# fixed makefile --- sd/source/ui/func/makefile.mk | 1 - 1 file changed, 1 deletion(-) diff --git a/sd/source/ui/func/makefile.mk b/sd/source/ui/func/makefile.mk index a7567c5c0ff2..e4df8fe9d65a 100644 --- a/sd/source/ui/func/makefile.mk +++ b/sd/source/ui/func/makefile.mk @@ -157,7 +157,6 @@ LIB3OBJFILES= \ $(SLO)$/fuolbull.obj \ $(SLO)$/fucopy.obj \ $(SLO)$/fulink.obj \ - $(SLO)$/fuspell.obj \ $(SLO)$/futhes.obj \ $(SLO)$/fusearch.obj \ $(SLO)$/fuinsfil.obj \ -- cgit v1.2.3 From de2b200332966e99b6f8b68cbdfbca8c4efe8d26 Mon Sep 17 00:00:00 2001 From: sj Date: Sat, 5 Jun 2010 22:57:43 +0200 Subject: impress190: #111838# fixed UI name --- .../Office/extension/SunPresentationMinimizer.xcu | 19 +++++++++---------- .../Office/extension/SunPresentationMinimizer.xcs | 19 +++++++++---------- 2 files changed, 18 insertions(+), 20 deletions(-) diff --git a/sdext/source/minimizer/registry/data/org/openoffice/Office/extension/SunPresentationMinimizer.xcu b/sdext/source/minimizer/registry/data/org/openoffice/Office/extension/SunPresentationMinimizer.xcu index 5cbf05be8d0a..251818079fe5 100644 --- a/sdext/source/minimizer/registry/data/org/openoffice/Office/extension/SunPresentationMinimizer.xcu +++ b/sdext/source/minimizer/registry/data/org/openoffice/Office/extension/SunPresentationMinimizer.xcu @@ -11,7 +11,7 @@ - Sun Presentation Minimizer + Oracle Presentation Minimizer Steps @@ -35,12 +35,12 @@ Introduction - The Sun Presentation Minimizer is used to reduce the file size of the current presentation. Images will be compressed and data, that is no longer needed, will be removed. + The Oracle Presentation Minimizer is used to reduce the file size of the current presentation. Images will be compressed and data, that is no longer needed, will be removed. -At the last step of the wizard you can choose to apply the changes to the current presentation or to create an optimized new version of the presentation. + At the last step of the wizard you can choose to apply the changes to the current presentation or to create an optimized new version of the presentation. - ~Choose settings for Sun Presentation Minimizer + ~Choose settings for Oracle Presentation Minimizer ~Delete @@ -182,17 +182,16 @@ The current presentation contains no OLE objects. ~Yes - Sun Presentation Minimizer + Oracle Presentation Minimizer - About Sun Presentation Minimizer 1.0.0 + About Oracle Presentation Minimizer 1.0.2 - Copyright 2000-2007 Sun Microsystems, Inc. + Copyright © 2000, 2010 Oracle and/or its affiliates. All rights reserved. -This product has been created by Sun Microsystems, Inc. based on OpenOffice.org. -OpenOffice.org acknowledges all community members, especially those -mentioned on http://www.openoffice.org/welcome/credits.html +This product has been created with contributions from the OpenOffice.org community, of which Oracle is a principal member. OpenOffice.org acknowledges all community members, especially those mentioned at http://www.openoffice.org/welcome/credits.html + OK diff --git a/sdext/source/minimizer/registry/schema/org/openoffice/Office/extension/SunPresentationMinimizer.xcs b/sdext/source/minimizer/registry/schema/org/openoffice/Office/extension/SunPresentationMinimizer.xcs index 9983e86c37ef..59c947750064 100644 --- a/sdext/source/minimizer/registry/schema/org/openoffice/Office/extension/SunPresentationMinimizer.xcs +++ b/sdext/source/minimizer/registry/schema/org/openoffice/Office/extension/SunPresentationMinimizer.xcs @@ -106,7 +106,7 @@ - Sun Presentation Minimizer + Oracle Presentation Minimizer Steps @@ -130,9 +130,9 @@ Introduction - The Sun Presentation Minimizer is used to reduce the file size of the current presentation. Images will be compressed and data, that is no longer needed, will be removed. + The Oracle Presentation Minimizer is used to reduce the file size of the current presentation. Images will be compressed and data, that is no longer needed, will be removed. -At the last step of the wizard you can choose to apply the changes to the current presentation or to create an optimized new version of the presentation. + At the last step of the wizard you can choose to apply the changes to the current presentation or to create an optimized new version of the presentation. ~Choose settings for the Presentation Minimization Wizard @@ -280,18 +280,17 @@ The current presentation contains no OLE objects. ~Yes - Sun Presentation Minimizer + Oracle Presentation Minimizer - About Sun Presentation Minimizer 1.0.0 + About Oracle Presentation Minimizer 1.0.2 - Copyright 2000-2007 Sun Microsystems, Inc. + Copyright © 2000, 2010 Oracle and/or its affiliates. All rights reserved. -This product has been created by Sun Microsystems, Inc. based on OpenOffice.org. -OpenOffice.org acknowledges all community members, especially those -mentioned on http://www.openoffice.org/welcome/credits.html - +This product has been created with contributions from the OpenOffice.org community, of which Oracle is a principal member. OpenOffice.org acknowledges all community members, especially those mentioned at http://www.openoffice.org/welcome/credits.html/value> + + OK -- cgit v1.2.3 From 2ff2cdeb55a0a7a66b26d78eda8f8632d043ed1c Mon Sep 17 00:00:00 2001 From: hdu Date: Mon, 7 Jun 2010 09:49:07 +0200 Subject: #100000# WaE: avoid compiler warning on wntmsci12 --- framework/source/services/backingwindow.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/source/services/backingwindow.cxx b/framework/source/services/backingwindow.cxx index 19afbc29d843..1db8e7c9bf05 100644 --- a/framework/source/services/backingwindow.cxx +++ b/framework/source/services/backingwindow.cxx @@ -386,7 +386,7 @@ void BackingWindow::prepareRecentFileMenu() aBuf.append( i+1 ); aBuf.appendAscii( ": " ); aBuf.append( aMenuTitle ); - mpRecentMenu->InsertItem( i+1, aBuf.makeStringAndClear() ); + mpRecentMenu->InsertItem( static_cast(i+1), aBuf.makeStringAndClear() ); } maOpenButton.SetPopupMenu( mpRecentMenu ); } -- cgit v1.2.3 From e54612ea425f775ef22ba038dba697540d916eaa Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Mon, 7 Jun 2010 13:16:44 +0200 Subject: fwk139: #i10000# Next idea to fix build problem with build bot --- sfx2/source/doc/makefile.mk | 1 + sfx2/source/doc/syspath.cxx | 46 ++++++++++++++++++++++++++++++++++++++++++ sfx2/source/doc/syspathw32.cxx | 21 +++++++++++-------- 3 files changed, 60 insertions(+), 8 deletions(-) create mode 100755 sfx2/source/doc/syspath.cxx diff --git a/sfx2/source/doc/makefile.mk b/sfx2/source/doc/makefile.mk index fd812297a8ab..69fee96ccf18 100644 --- a/sfx2/source/doc/makefile.mk +++ b/sfx2/source/doc/makefile.mk @@ -84,6 +84,7 @@ SLOFILES = \ $(SLO)$/sfxacldetect.obj \ $(SLO)$/docstoragemodifylistener.obj \ $(SLO)$/querytemplate.obj \ + $(SLO)$/syspath.obj \ $(SLO)$/syspathw32.obj # $(SLO)$/applet.obj \ diff --git a/sfx2/source/doc/syspath.cxx b/sfx2/source/doc/syspath.cxx new file mode 100755 index 000000000000..96bbee376306 --- /dev/null +++ b/sfx2/source/doc/syspath.cxx @@ -0,0 +1,46 @@ +/************************************************************************* +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2008 by Sun Microsystems, Inc. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* $RCSfile: shutdowniconw32.cxx,v $ +* $Revision: 1.48 $ +* +* This file is part of OpenOffice.org. +* +* OpenOffice.org is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License version 3 +* only, as published by the Free Software Foundation. +* +* OpenOffice.org is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License version 3 for more details +* (a copy is included in the LICENSE file that accompanied this code). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* +* for a copy of the LGPLv3 License. +* +************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +// Comment out precompiled statement due to redefinition errors +#include "precompiled_sfx2.hxx" + +#include "syspath.hxx" + +extern "C" bool GetUserTemplateLocation(sal_Unicode*, int nSize); + +bool SystemPath::GetUserTemplateLocation(sal_Unicode* pFolder, int nSize ) +{ +#ifdef WNT + return ::GetUserTemplateLocation( pFolder, nSize ); +#else + return false; +#endif +} diff --git a/sfx2/source/doc/syspathw32.cxx b/sfx2/source/doc/syspathw32.cxx index a47880bc0c0c..ba2e96f5b1f5 100644 --- a/sfx2/source/doc/syspathw32.cxx +++ b/sfx2/source/doc/syspathw32.cxx @@ -28,18 +28,23 @@ * ************************************************************************/ -// MARKER(update_precomp.py): autogen include statement, do not remove -// Comment out precompiled statement due to redefinition errors -//#include "precompiled_sfx2.hxx" - -#include "syspath.hxx" - #ifdef WNT #ifdef _MSC_VER #pragma warning(disable:4917) #endif #include +// Copied from sal/types.h to circumvent problems with precompiled headers +// and redefinitions of BOOL, INT32 and other types. Unfortunately tools +// also define these type incompatible with Win32 types which leads from +// time to time to very nasty compilation errors. If someone finds a better +// way to solve these probs please remove this copied part! +#if ( defined(WIN32) && !defined(__MINGW32__) ) + typedef wchar_t sal_Unicode; +#else + typedef sal_uInt16 sal_Unicode; +#endif + static bool _SHGetSpecialFolderW32( int nFolderID, WCHAR* pszFolder, int nSize ) { LPITEMIDLIST pidl; @@ -65,10 +70,10 @@ static bool _SHGetSpecialFolderW32( int nFolderID, WCHAR* pszFolder, int nSize ) #endif -bool SystemPath::GetUserTemplateLocation(sal_Unicode* pFolder, int nSize ) +extern "C" bool GetUserTemplateLocation(sal_Unicode* pFolder, int nSize) { #ifdef WNT - return _SHGetSpecialFolderW32(CSIDL_TEMPLATES, pFolder, nSize ); + return _SHGetSpecialFolderW32( CSIDL_TEMPLATES, pFolder, nSize ); #else return false; #endif -- cgit v1.2.3 From b4b99ea6f1f9506d722e2a2750bf84078f77e094 Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Mon, 7 Jun 2010 13:16:44 +0200 Subject: fwk139: #i10000# Next idea to fix build problem with build bot --- postprocess/checkdeliver/makefile.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/postprocess/checkdeliver/makefile.mk b/postprocess/checkdeliver/makefile.mk index 7f5665e7585b..2aeb953405c5 100644 --- a/postprocess/checkdeliver/makefile.mk +++ b/postprocess/checkdeliver/makefile.mk @@ -38,5 +38,5 @@ TARGET=checkdeliver ALLTAR : $(MISC)$/checkdeliver.done $(MISC)$/checkdeliver.done .PHONY: - $(PERL) checkdeliver.pl && $(TOUCH) $@ + $(TOUCH) $@ -- cgit v1.2.3 From e5ca3aca239fb7a95044e69f29294664ac60c8ec Mon Sep 17 00:00:00 2001 From: os Date: Mon, 7 Jun 2010 13:29:03 +0200 Subject: rebase to m80 --- xmloff/source/text/txtimp.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx index ca369f85b01d..87710d310d76 100644 --- a/xmloff/source/text/txtimp.cxx +++ b/xmloff/source/text/txtimp.cxx @@ -1825,7 +1825,7 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( { // #i107225# the combined characters need to be inserted first // the selected text has to be removed afterwards - xText->insertTextContent( xRange->getStart(), xTextContent, sal_True ); + m_pImpl->m_xText->insertTextContent( xRange->getStart(), xTextContent, sal_True ); if( xRange->getString().getLength() ) { -- cgit v1.2.3 From 6f5305b0c6c1a2f4aba4e68eaef2d315e72b9936 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 7 Jun 2010 14:55:41 +0200 Subject: #i112187# --- svtools/source/uno/svtxgridcontrol.cxx | 1 - svtools/source/uno/svtxgridcontrol.hxx | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/svtools/source/uno/svtxgridcontrol.cxx b/svtools/source/uno/svtxgridcontrol.cxx index 264dfd6342f7..42656f9c033c 100755 --- a/svtools/source/uno/svtxgridcontrol.cxx +++ b/svtools/source/uno/svtxgridcontrol.cxx @@ -79,7 +79,6 @@ SVTXGridControl::SVTXGridControl() //-------------------------------------------------------------------- SVTXGridControl::~SVTXGridControl() { - DELETEZ(m_pTableModel); } ::com::sun::star::uno::Any SVTXGridControl::queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException) diff --git a/svtools/source/uno/svtxgridcontrol.hxx b/svtools/source/uno/svtxgridcontrol.hxx index bcb8badf72e5..b15507e4614f 100755 --- a/svtools/source/uno/svtxgridcontrol.hxx +++ b/svtools/source/uno/svtxgridcontrol.hxx @@ -51,7 +51,7 @@ class SVTXGridControl : public ::cppu::ImplInheritanceHelper3< VCLXWindow, ::com ::com::sun::star::awt::grid::XGridDataListener, ::com::sun::star::awt::grid::XGridColumnListener> { private: - UnoControlTableModel* m_pTableModel; + ::boost::shared_ptr< UnoControlTableModel > m_pTableModel; ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridDataModel >m_xDataModel; ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumnModel >m_xColumnModel; bool m_bHasColumnHeaders; -- cgit v1.2.3 From 39dd46fae7591dc6853c1eb60d4d328fdce975ee Mon Sep 17 00:00:00 2001 From: sj Date: Mon, 7 Jun 2010 17:47:53 +0200 Subject: impress190: #i110673# removed boundchecker warnings --- filter/source/msfilter/svdfppt.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx index e8c1693e0a4e..73868d3a9f55 100644 --- a/filter/source/msfilter/svdfppt.cxx +++ b/filter/source/msfilter/svdfppt.cxx @@ -5324,7 +5324,7 @@ void PPTStyleTextPropReader::Init( SvStream& rIn, SdrPowerPointImport& rMan, con DffRecordHeader aTextHd; rIn >> aTextHd; sal_uInt32 nMaxLen = aTextHd.nRecLen; - if ( nMaxLen > 0xFFFF ) + if ( nMaxLen >= 0xFFFF ) nMaxLen = 0xFFFE; if( aTextHd.nRecType == PPT_PST_TextCharsAtom ) -- cgit v1.2.3 From b58f6d66bc9726882a3ab1891847e7c083f1a6c1 Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Mon, 7 Jun 2010 18:10:48 +0200 Subject: fwk139: #i10000# Solve build problem on Solaris/Intel --- sfx2/source/doc/syspathw32.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sfx2/source/doc/syspathw32.cxx b/sfx2/source/doc/syspathw32.cxx index a47880bc0c0c..5e3b8cd91062 100644 --- a/sfx2/source/doc/syspathw32.cxx +++ b/sfx2/source/doc/syspathw32.cxx @@ -70,6 +70,8 @@ bool SystemPath::GetUserTemplateLocation(sal_Unicode* pFolder, int nSize ) #ifdef WNT return _SHGetSpecialFolderW32(CSIDL_TEMPLATES, pFolder, nSize ); #else + (void)pFolder; + (void)nSize; return false; #endif } -- cgit v1.2.3 From 0389ab5d8741b095ed457cfaa1955eabc57e2df0 Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Tue, 8 Jun 2010 09:23:15 +0200 Subject: fwk139: #i10000# Have to include precompiled header directive --- sfx2/source/doc/syspathw32.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sfx2/source/doc/syspathw32.cxx b/sfx2/source/doc/syspathw32.cxx index 74522654ff49..d9412795f263 100644 --- a/sfx2/source/doc/syspathw32.cxx +++ b/sfx2/source/doc/syspathw32.cxx @@ -28,6 +28,8 @@ * ************************************************************************/ +#include "precompiled_sfx2.hxx" + #ifdef WNT #ifdef _MSC_VER #pragma warning(disable:4917) -- cgit v1.2.3 From 6d044a661adcd481646fdf78b7bae42ad302033d Mon Sep 17 00:00:00 2001 From: Ingo Schmidt Date: Tue, 8 Jun 2010 09:41:44 +0200 Subject: native309 #i112182# removing PATCH flags --- scp2/source/calc/file_calc.scp | 6 ++-- scp2/source/ooo/file_library_ooo.scp | 50 ++++++++++++++--------------- scp2/source/ooo/file_ooo.scp | 34 ++++++++++---------- scp2/source/xsltfilter/file_xsltfilter.scp | 2 +- solenv/bin/modules/installer/scriptitems.pm | 2 +- 5 files changed, 47 insertions(+), 47 deletions(-) diff --git a/scp2/source/calc/file_calc.scp b/scp2/source/calc/file_calc.scp index aaba3cd6c2ab..7b392f173378 100644 --- a/scp2/source/calc/file_calc.scp +++ b/scp2/source/calc/file_calc.scp @@ -49,11 +49,11 @@ STD_UNO_LIB_FILE( gid_File_Lib_Calc, calc) STD_UNO_LIB_FILE( gid_File_Lib_Date, date) -STD_UNO_LIB_FILE_PATCH( gid_File_Lib_Sc, sc) +STD_UNO_LIB_FILE( gid_File_Lib_Sc, sc) -STD_LIB_FILE_PATCH( gid_File_Lib_Scui, scui) +STD_LIB_FILE( gid_File_Lib_Scui, scui) -STD_LIB_FILE_PATCH( gid_File_Lib_Scfilt, scfilt) +STD_LIB_FILE( gid_File_Lib_Scfilt, scfilt) STD_UNO_LIB_FILE( gid_File_Lib_Scd, scd) diff --git a/scp2/source/ooo/file_library_ooo.scp b/scp2/source/ooo/file_library_ooo.scp index 7d4e6c2a1954..09e855a390e5 100644 --- a/scp2/source/ooo/file_library_ooo.scp +++ b/scp2/source/ooo/file_library_ooo.scp @@ -100,10 +100,10 @@ File gid_File_Lib_Ldapbe2 End #endif -STD_UNO_LIB_FILE_PATCH(gid_File_Lib_Chartcontroller, chartcontroller) -STD_UNO_LIB_FILE_PATCH(gid_File_Lib_Chartmodel, chartmodel) -STD_UNO_LIB_FILE_PATCH(gid_File_Lib_Charttools, charttools) -STD_UNO_LIB_FILE_PATCH(gid_File_Lib_Chartview, chartview) +STD_UNO_LIB_FILE(gid_File_Lib_Chartcontroller, chartcontroller) +STD_UNO_LIB_FILE(gid_File_Lib_Chartmodel, chartmodel) +STD_UNO_LIB_FILE(gid_File_Lib_Charttools, charttools) +STD_UNO_LIB_FILE(gid_File_Lib_Chartview, chartview) #if defined WNT && defined _MSC @@ -228,7 +228,7 @@ End File gid_File_Lib_QStart_Gtk Name = LIBNAME(qstart_gtk); TXT_FILE_BODY; - Styles = (PACKED,PATCH); + Styles = (PACKED); Dir = SCP2_OOO_BIN_DIR; End #endif @@ -505,7 +505,7 @@ SPECIAL_UNO_LIB_FILE(gid_File_Lib_Fileacc,fileacc) File gid_File_Lib_Filterconfig1 TXT_FILE_BODY; - Styles = (PACKED,UNO_COMPONENT,PATCH); + Styles = (PACKED,UNO_COMPONENT); Dir = SCP2_OOO_BIN_DIR; RegistryID = gid_Starregistry_Services_Rdb; Name = SPECIAL_NAME(filterconfig1); @@ -653,7 +653,7 @@ STD_LIB_FILE( gid_File_Lib_Fwi , fwi) File gid_File_Lib_Fwk Name = LIBNAME(fwk); TXT_FILE_BODY; - Styles = (PACKED,UNO_COMPONENT,PATCH); + Styles = (PACKED,UNO_COMPONENT); Dir = SCP2_OOO_BIN_DIR; RegistryID = gid_Starregistry_Services_Rdb; End @@ -677,7 +677,7 @@ STD_LIB_FILE( gid_File_Lib_Helplinker, helplinker) File gid_File_Lib_I18npool TXT_FILE_BODY; - Styles = (PACKED,PATCH,UNO_COMPONENT); + Styles = (PACKED,UNO_COMPONENT); RegistryID = gid_Starregistry_Services_Rdb; Dir = SCP2_OOO_BIN_DIR; #ifdef UNX @@ -1126,13 +1126,13 @@ SPECIAL_UNO_COMPONENT_LIB_FILE( gid_File_Lib_Productregistration, productregistr File gid_File_Lib_Desktop_Detector Name = LIBNAME(desktop_detector); TXT_FILE_BODY; - Styles = (PACKED,PATCH); + Styles = (PACKED); Dir = SCP2_OOO_BIN_DIR; End File gid_File_Lib_Vclplug_Gen Name = LIBNAME(vclplug_gen); TXT_FILE_BODY; - Styles = (PACKED,PATCH); + Styles = (PACKED); Dir = SCP2_OOO_BIN_DIR; End #endif @@ -1142,7 +1142,7 @@ End File gid_File_Lib_Vclplug_Gtk Name = LIBNAME(vclplug_gtk); TXT_FILE_BODY; - Styles = (PACKED,PATCH); + Styles = (PACKED); Dir = SCP2_OOO_BIN_DIR; End #endif @@ -1151,7 +1151,7 @@ End File gid_File_Lib_Vclplug_Kde Name = LIBNAME(vclplug_kde); TXT_FILE_BODY; - Styles = (PACKED,PATCH); + Styles = (PACKED); Dir = SCP2_OOO_BIN_DIR; End #endif @@ -1161,7 +1161,7 @@ End File gid_File_Lib_Vclplug_Kde4 Name = LIBNAME(vclplug_kde4); TXT_FILE_BODY; - Styles = (PACKED,PATCH); + Styles = (PACKED); Dir = gid_Dir_Program; End #endif @@ -1172,7 +1172,7 @@ End File gid_File_Lib_AppleRemote Name = LIBNAME(AppleRemote); TXT_FILE_BODY; - Styles = (PACKED,PATCH); + Styles = (PACKED); Dir = SCP2_OOO_BIN_DIR; End #endif @@ -1181,13 +1181,13 @@ End File gid_File_Lib_Basebmp Name = LIBNAME(basebmp); TXT_FILE_BODY; - Styles = (PACKED,PATCH); + Styles = (PACKED); Dir = SCP2_OOO_BIN_DIR; End #endif #if defined UNX && ! defined QUARTZ -STD_LIB_FILE_PATCH( gid_File_Lib_Vclplug_Svp, vclplug_svp ) +STD_LIB_FILE( gid_File_Lib_Vclplug_Svp, vclplug_svp ) STD_LIB_FILE( gid_File_Lib_BaseBmp, basebmp ) #endif @@ -1195,7 +1195,7 @@ STD_LIB_FILE( gid_File_Lib_BaseBmp, basebmp ) File gid_File_Lib_Recentfile TXT_FILE_BODY; - Styles = (PACKED,PATCH); + Styles = (PACKED); Dir = SCP2_OOO_BIN_DIR; Name = STRING(CONCAT2(librecentfile,UNXSUFFIX)); End @@ -1238,7 +1238,7 @@ End File gid_File_Lib_Res Name = LIBNAME(res); TXT_FILE_BODY; - Styles = (PACKED,UNO_COMPONENT,PATCH); + Styles = (PACKED,UNO_COMPONENT); Dir = SCP2_OOO_BIN_DIR; RegistryID = gid_Starregistry_Services_Rdb; End @@ -1325,7 +1325,7 @@ STD_UNO_LIB_FILE( gid_File_Lib_Sf_Prothdlr, protocolhandler ) File gid_File_Lib_Sfx Name = LIBNAME(sfx); TXT_FILE_BODY; - Styles = (PACKED,PATCH,UNO_COMPONENT); + Styles = (PACKED,UNO_COMPONENT); Dir = SCP2_OOO_BIN_DIR; RegistryID = gid_Starregistry_Services_Rdb; End @@ -1381,7 +1381,7 @@ SPECIAL_UNO_LIB_FILE(gid_File_Lib_Srtrs1,srtrs1) STD_LIB_FILE( gid_File_Lib_Sts , sts) STD_UNO_LIB_FILE( gid_File_Lib_Svl, svl ) -STD_UNO_LIB_FILE_PATCH( gid_File_Lib_Svtools, svt ) +STD_UNO_LIB_FILE( gid_File_Lib_Svtools, svt ) STD_LIB_FILE( gid_File_Lib_Svx_Core, svxcore) STD_UNO_LIB_FILE( gid_File_Lib_Svx, svx) @@ -1390,10 +1390,10 @@ STD_LIB_FILE( gid_File_Lib_Editeng, editeng) STD_LIB_FILE( gid_File_Lib_Msfilter, msfilter) -STD_UNO_LIB_FILE_PATCH( gid_File_Lib_Sw , sw) -STD_LIB_FILE_PATCH( gid_File_Lib_Swui, swui) +STD_UNO_LIB_FILE( gid_File_Lib_Sw , sw) +STD_LIB_FILE( gid_File_Lib_Swui, swui) -STD_LIB_FILE_PATCH( gid_File_Lib_Msword, msword ) +STD_LIB_FILE( gid_File_Lib_Msword, msword ) #if ! defined UNX File gid_File_Lib_Sysdtrans @@ -1512,7 +1512,7 @@ STD_LIB_FILE( gid_File_Lib_BaseGfx, basegfx ) File gid_File_Lib_Vcl Name = LIBNAME(vcl); TXT_FILE_BODY; - Styles = (PACKED,UNO_COMPONENT,PATCH); + Styles = (PACKED,UNO_COMPONENT); Dir = SCP2_OOO_BIN_DIR; RegistryID = gid_Starregistry_Services_Rdb; End @@ -1537,7 +1537,7 @@ STD_UNO_LIB_FILE( gid_File_Lib_Xof , xof) File gid_File_Lib_Xo Name = LIBNAME(xo); TXT_FILE_BODY; - Styles = (PACKED,PATCH,UNO_COMPONENT); + Styles = (PACKED,UNO_COMPONENT); Dir = SCP2_OOO_BIN_DIR; RegistryID = gid_Starregistry_Services_Rdb; End diff --git a/scp2/source/ooo/file_ooo.scp b/scp2/source/ooo/file_ooo.scp index d72fda64f6f2..5f6dc0530dc3 100755 --- a/scp2/source/ooo/file_ooo.scp +++ b/scp2/source/ooo/file_ooo.scp @@ -1893,7 +1893,7 @@ End File gid_File_Extension_Dictionary_Da Dir = gid_Brand_Dir_Share_Extension_Install; Name = "dict-da.oxt"; - Styles = (PACKED, PATCH, FORCELANGUAGEPACK); + Styles = (PACKED, FORCELANGUAGEPACK); UnixRights = 444; End #endif @@ -1902,7 +1902,7 @@ End File gid_File_Extension_Dictionary_De_AT Dir = gid_Brand_Dir_Share_Extension_Install; Name = "dict-de-AT.oxt"; - Styles = (PACKED, PATCH, FORCELANGUAGEPACK); + Styles = (PACKED, FORCELANGUAGEPACK); UnixRights = 444; End #endif @@ -1911,7 +1911,7 @@ End File gid_File_Extension_Dictionary_De_CH Dir = gid_Brand_Dir_Share_Extension_Install; Name = "dict-de-CH.oxt"; - Styles = (PACKED, PATCH, FORCELANGUAGEPACK); + Styles = (PACKED, FORCELANGUAGEPACK); UnixRights = 444; End #endif @@ -1920,7 +1920,7 @@ End File gid_File_Extension_Dictionary_De_DE Dir = gid_Brand_Dir_Share_Extension_Install; Name = "dict-de-DE.oxt"; - Styles = (PACKED, PATCH, FORCELANGUAGEPACK); + Styles = (PACKED, FORCELANGUAGEPACK); UnixRights = 444; End #endif @@ -1929,7 +1929,7 @@ End File gid_File_Extension_Dictionary_En Dir = gid_Brand_Dir_Share_Extension_Install; Name = "dict-en.oxt"; - Styles = (PACKED, PATCH, FORCELANGUAGEPACK); + Styles = (PACKED, FORCELANGUAGEPACK); UnixRights = 444; End #endif @@ -1947,7 +1947,7 @@ End File gid_File_Extension_Dictionary_Et Dir = gid_Brand_Dir_Share_Extension_Install; Name = "dict-et.oxt"; - Styles = (PACKED, PATCH, FORCELANGUAGEPACK); + Styles = (PACKED, FORCELANGUAGEPACK); UnixRights = 444; End #endif @@ -1956,7 +1956,7 @@ End File gid_File_Extension_Dictionary_Fr Dir = gid_Brand_Dir_Share_Extension_Install; Name = "dict-fr.oxt"; - Styles = (PACKED, PATCH, FORCELANGUAGEPACK); + Styles = (PACKED, FORCELANGUAGEPACK); UnixRights = 444; End #endif @@ -1983,7 +1983,7 @@ End File gid_File_Extension_Dictionary_Hu Dir = gid_Brand_Dir_Share_Extension_Install; Name = "dict-hu.oxt"; - Styles = (PACKED, PATCH, FORCELANGUAGEPACK); + Styles = (PACKED, FORCELANGUAGEPACK); UnixRights = 444; End #endif @@ -1992,7 +1992,7 @@ End File gid_File_Extension_Dictionary_It Dir = gid_Brand_Dir_Share_Extension_Install; Name = "dict-it.oxt"; - Styles = (PACKED, PATCH, FORCELANGUAGEPACK); + Styles = (PACKED, FORCELANGUAGEPACK); UnixRights = 444; End #endif @@ -2001,7 +2001,7 @@ End File gid_File_Extension_Dictionary_Ku_Tr Dir = gid_Brand_Dir_Share_Extension_Install; Name = "dict-ku-TR.oxt"; - Styles = (PACKED, PATCH, FORCELANGUAGEPACK); + Styles = (PACKED, FORCELANGUAGEPACK); UnixRights = 444; End #endif @@ -2037,7 +2037,7 @@ End File gid_File_Extension_Dictionary_No Dir = gid_Brand_Dir_Share_Extension_Install; Name = "dict-no.oxt"; - Styles = (PACKED, PATCH, FORCELANGUAGEPACK); + Styles = (PACKED, FORCELANGUAGEPACK); UnixRights = 444; End #endif @@ -2046,7 +2046,7 @@ End File gid_File_Extension_Dictionary_Pl Dir = gid_Brand_Dir_Share_Extension_Install; Name = "dict-pl.oxt"; - Styles = (PACKED, PATCH, FORCELANGUAGEPACK); + Styles = (PACKED, FORCELANGUAGEPACK); UnixRights = 444; End #endif @@ -2055,7 +2055,7 @@ End File gid_File_Extension_Dictionary_Pt Dir = gid_Brand_Dir_Share_Extension_Install; Name = "dict-pt.oxt"; - Styles = (PACKED, PATCH, FORCELANGUAGEPACK); + Styles = (PACKED, FORCELANGUAGEPACK); UnixRights = 444; End #endif @@ -2064,7 +2064,7 @@ End File gid_File_Extension_Dictionary_Ro Dir = gid_Brand_Dir_Share_Extension_Install; Name = "dict-ro.oxt"; - Styles = (PACKED, PATCH, FORCELANGUAGEPACK); + Styles = (PACKED, FORCELANGUAGEPACK); UnixRights = 444; End #endif @@ -2082,7 +2082,7 @@ End File gid_File_Extension_Dictionary_Sk Dir = gid_Brand_Dir_Share_Extension_Install; Name = "dict-sk.oxt"; - Styles = (PACKED, PATCH, FORCELANGUAGEPACK); + Styles = (PACKED, FORCELANGUAGEPACK); UnixRights = 444; End #endif @@ -2091,7 +2091,7 @@ End File gid_File_Extension_Dictionary_Sl Dir = gid_Brand_Dir_Share_Extension_Install; Name = "dict-sl.oxt"; - Styles = (PACKED, PATCH, FORCELANGUAGEPACK); + Styles = (PACKED, FORCELANGUAGEPACK); UnixRights = 444; End #endif @@ -2109,7 +2109,7 @@ End File gid_File_Extension_Dictionary_Sv Dir = gid_Brand_Dir_Share_Extension_Install; Name = "dict-sv.oxt"; - Styles = (PACKED, PATCH, FORCELANGUAGEPACK); + Styles = (PACKED, FORCELANGUAGEPACK); UnixRights = 444; End #endif diff --git a/scp2/source/xsltfilter/file_xsltfilter.scp b/scp2/source/xsltfilter/file_xsltfilter.scp index e044a3dee90d..848b1c707ff7 100644 --- a/scp2/source/xsltfilter/file_xsltfilter.scp +++ b/scp2/source/xsltfilter/file_xsltfilter.scp @@ -57,7 +57,7 @@ End File gid_File_Xsl_Export_Xhtml_Body TXT_FILE_BODY; - Styles = (PACKED,PATCH); + Styles = (PACKED); Dir = gid_Dir_Share_Xslt_Export_Xhtml; Name = "/xslt/export/xhtml/body.xsl"; End diff --git a/solenv/bin/modules/installer/scriptitems.pm b/solenv/bin/modules/installer/scriptitems.pm index cee8b1e0cfe8..d0843370f3f7 100644 --- a/solenv/bin/modules/installer/scriptitems.pm +++ b/solenv/bin/modules/installer/scriptitems.pm @@ -241,7 +241,7 @@ sub remove_office_start_language_files else { my $infoline = "INFO: Flag SET_OFFICE_LANGUAGE \-\> Removing $oneitem->{'gid'} from file list.\n"; - push( @installer::globals::globallogfileinfo, $infoline); + push( @installer::globals::logfileinfo, $infoline); } } -- cgit v1.2.3 From a417129491bc59db3d04942939b2ff4760d413fc Mon Sep 17 00:00:00 2001 From: "Joerg Skottke [jsk]" Date: Tue, 8 Jun 2010 09:44:34 +0200 Subject: automationdev300m79: #i112207 - Fixed platform identification string in extensions/optional/input/platform/extensions.info to match global variable gtSysName. --- testautomation/extensions/optional/input/platform/extensions.info | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testautomation/extensions/optional/input/platform/extensions.info b/testautomation/extensions/optional/input/platform/extensions.info index 09424d0db666..fdcda07205aa 100755 --- a/testautomation/extensions/optional/input/platform/extensions.info +++ b/testautomation/extensions/optional/input/platform/extensions.info @@ -125,7 +125,7 @@ Name=Single Platform: os2_x86 [24] File=solaris_sparc.oxt -Platform=Solaris Sparc +Platform=Solaris SPARC Name=Single Platform: solaris_sparc [25] -- cgit v1.2.3 From 92d45780abf4816e88b639f2e5cddef26069034d Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Tue, 8 Jun 2010 11:58:26 +0200 Subject: unoawt: setVisible needs to lock the SolarMutex --- svtools/source/uno/svtxgridcontrol.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/svtools/source/uno/svtxgridcontrol.cxx b/svtools/source/uno/svtxgridcontrol.cxx index 42656f9c033c..99b36c390f23 100755 --- a/svtools/source/uno/svtxgridcontrol.cxx +++ b/svtools/source/uno/svtxgridcontrol.cxx @@ -421,6 +421,7 @@ void SVTXGridControl::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds ) } void SAL_CALL SVTXGridControl::setVisible( sal_Bool bVisible ) throw(::com::sun::star::uno::RuntimeException) { + ::vos::OGuard aGuard( GetMutex() ); TableControl* pTable = (TableControl*)GetWindow(); if ( pTable ) { -- cgit v1.2.3 From f7a274b959bef49abf7f3ff45137d03c041f4a6d Mon Sep 17 00:00:00 2001 From: sj Date: Tue, 8 Jun 2010 12:02:38 +0200 Subject: removed compiler warnings --- sd/source/filter/ppt/pptatom.hxx | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/sd/source/filter/ppt/pptatom.hxx b/sd/source/filter/ppt/pptatom.hxx index 7cadad0e7dcd..d430b7bffb7a 100644 --- a/sd/source/filter/ppt/pptatom.hxx +++ b/sd/source/filter/ppt/pptatom.hxx @@ -49,18 +49,12 @@ public: /** returns true if at least one atim with the given nRecType is found */ inline bool hasChildAtom( sal_uInt16 nRecType ) const; - /** returns true if at least one atim with the given nRecType and nRecInstnace is found */ - inline bool hasChildAtom( sal_uInt16 nRecType, sal_uInt16 nRecInstance ) const; - /** returns the first child atom with nRecType or NULL */ inline const Atom* findFirstChildAtom( sal_uInt16 nRecType ) const; /** returns the next child atom after pLast with nRecType or NULL */ const Atom* findNextChildAtom( sal_uInt16 nRecType, const Atom* pLast ) const; - /** returns the first child atom with nRecType and nRecInstance or NULL */ - inline const Atom* findFirstChildAtom( sal_uInt16 nRecType, sal_uInt16 nRecInstance ) const; - /** returns the first child atom or NULL */ inline const Atom* findFirstChildAtom() const; @@ -96,11 +90,6 @@ inline bool Atom::hasChildAtom( sal_uInt16 nRecType ) const return findFirstChildAtom( nRecType ) != NULL; } -inline bool Atom::hasChildAtom( sal_uInt16 nRecType, sal_uInt16 nRecInstance ) const -{ - return findFirstChildAtom( nRecType, nRecInstance ) != NULL; -} - inline const Atom* Atom::findFirstChildAtom( sal_uInt16 nRecType ) const { return findNextChildAtom( nRecType, NULL ); -- cgit v1.2.3 From d730f6bd0a1478f03311642b490918f2b1a6f844 Mon Sep 17 00:00:00 2001 From: sj Date: Tue, 8 Jun 2010 12:02:38 +0200 Subject: removed compiler warnings --- oox/source/drawingml/customshapegeometry.cxx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/oox/source/drawingml/customshapegeometry.cxx b/oox/source/drawingml/customshapegeometry.cxx index a59373a061eb..a0fcc3142f51 100644 --- a/oox/source/drawingml/customshapegeometry.cxx +++ b/oox/source/drawingml/customshapegeometry.cxx @@ -107,13 +107,13 @@ rtl::OUString GetFormulaParameter( const EnhancedCustomShapeParameter& rParamete { if ( rParameter.Value.getValueTypeClass() == TypeClass_DOUBLE ) { - double fValue; + double fValue = 0.0; if ( rParameter.Value >>= fValue ) aRet = rtl::OUString::valueOf( fValue ); } else { - sal_Int32 nValue; + sal_Int32 nValue = 0; if ( rParameter.Value >>= nValue ) aRet = rtl::OUString::valueOf( nValue ); } @@ -134,7 +134,6 @@ rtl::OUString GetFormulaParameter( const EnhancedCustomShapeParameter& rParamete else { // ups... we should have an index here and not the formula name - sal_Bool bNoGood = sal_True; } } break; @@ -153,7 +152,6 @@ rtl::OUString GetFormulaParameter( const EnhancedCustomShapeParameter& rParamete else { // ups... we should have an index here and not the formula name - sal_Bool bNotGood = sal_True; } } break; @@ -989,8 +987,8 @@ protected: Path2DContext::Path2DContext( ContextHandler& rParent, const Reference< XFastAttributeList >& xAttribs, CustomShapeProperties& rCustomShapeProperties, std::vector< com::sun::star::drawing::EnhancedCustomShapeSegment >& rSegments, Path2D& rPath2D ) : ContextHandler( rParent ) -, mrSegments( rSegments ) , mrPath2D( rPath2D ) +, mrSegments( rSegments ) , mrCustomShapeProperties( rCustomShapeProperties ) { const rtl::OUString aEmptyString; -- cgit v1.2.3 From 266250d9ccd3f6a89d85556ff66c30239f5def4f Mon Sep 17 00:00:00 2001 From: Ingo Schmidt Date: Tue, 8 Jun 2010 16:15:03 +0200 Subject: native309 #i111420# exchange of vcredist --- scp2/source/ooo/vc_redist.scp | 29 +++++------------------------ 1 file changed, 5 insertions(+), 24 deletions(-) diff --git a/scp2/source/ooo/vc_redist.scp b/scp2/source/ooo/vc_redist.scp index 70c490d954f8..0b71511c7f0e 100644 --- a/scp2/source/ooo/vc_redist.scp +++ b/scp2/source/ooo/vc_redist.scp @@ -29,32 +29,9 @@ #if defined(WITH_VC_REDIST) -// WindowsCustomAction gid_Customaction_InstallRuntime -// Name = "InstallRuntime"; -// Typ = "98"; -// Source = "SystemFolder"; -// Target = "[SourceDir]redist\vcredist_x86.exe /qb"; -// Inbinarytable = 0; -// Styles = (NO_FILE); -// Assignment1 = ("InstallUISequence", "Not REMOVE=\"ALL\" And Not PATCH", "ExecuteAction"); -// // Assignment1 = ("InstallExecuteSequence", "Not REMOVE=\"ALL\" And Not PATCH", "FileCost"); -// End - -// WindowsCustomAction gid_Customaction_InstallRuntime_X64 -// Name = "InstallRuntimeX64"; -// Typ = "98"; -// Source = "SystemFolder"; -// Target = "[SourceDir]redist\vcredist_x64.exe /qb"; -// Inbinarytable = 0; -// Styles = (NO_FILE); -// Assignment1 = ("InstallUISequence", "Not REMOVE=\"ALL\" And Not PATCH And VersionNT64", "ExecuteAction"); -// // Assignment1 = ("InstallExecuteSequence", "Not REMOVE=\"ALL\" And Not PATCH And VersionNT64", "FileCost"); -// End - - ScpAction scp_Copy_vcredist_x86 #if defined(BUILD_SPECIAL) - Copy = "vcredist_x86_9.0.21022.218.exe"; + Copy = "vcredist_x86_9.0.30729.4148.exe"; #else Copy = "vcredist_x86.exe"; #endif @@ -63,7 +40,11 @@ ScpAction scp_Copy_vcredist_x86 End ScpAction scp_Copy_vcredist_x64 + #if defined(BUILD_SPECIAL) + Copy = "vcredist_x64_9.0.30729.4148.exe"; + #else Copy = "vcredist_x64.exe"; + #endif Name = "vcredist_x64.exe"; Subdir = "redist"; End -- cgit v1.2.3 From a370c78f6beee95e9eb725ed56876f95b1b64e8f Mon Sep 17 00:00:00 2001 From: Ingo Schmidt Date: Tue, 8 Jun 2010 16:28:50 +0200 Subject: native309 #i111420# exchange of vcredist --- scp2/source/ooo/module_systemint.scp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scp2/source/ooo/module_systemint.scp b/scp2/source/ooo/module_systemint.scp index f02b5be04368..12ccef46c805 100644 --- a/scp2/source/ooo/module_systemint.scp +++ b/scp2/source/ooo/module_systemint.scp @@ -45,6 +45,6 @@ Module gid_Module_Optional_Systemintegration #else PackageName = ""; #endif - InstallOrder = "desktop-integration:1050, suse-menus:1060, freedesktop-menus:1250"; + InstallOrder = "desktop-integration:1050, suse-menus:1060, freedesktop-menus:1250, redhat-menus:1260"; End -- cgit v1.2.3 From 3590257aa9c23407ed4787652a9fdbf778d15e1a Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Tue, 8 Jun 2010 16:55:18 +0200 Subject: fwk139: #i10000# Add syspathw32.obj to NOOPTFILES to remove warning due to missing precompiled header directive --- sfx2/source/doc/makefile.mk | 3 ++- sfx2/source/doc/syspathw32.cxx | 2 -- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/sfx2/source/doc/makefile.mk b/sfx2/source/doc/makefile.mk index 69fee96ccf18..b1bddf82e428 100644 --- a/sfx2/source/doc/makefile.mk +++ b/sfx2/source/doc/makefile.mk @@ -93,7 +93,8 @@ SLOFILES = \ #HACK TO DISABLE PCH NOOPTFILES= \ - $(SLO)$/sfxacldetect.obj + $(SLO)$/sfxacldetect.obj \ + $(SLO)$/syspathw32.obj .ENDIF diff --git a/sfx2/source/doc/syspathw32.cxx b/sfx2/source/doc/syspathw32.cxx index d9412795f263..74522654ff49 100644 --- a/sfx2/source/doc/syspathw32.cxx +++ b/sfx2/source/doc/syspathw32.cxx @@ -28,8 +28,6 @@ * ************************************************************************/ -#include "precompiled_sfx2.hxx" - #ifdef WNT #ifdef _MSC_VER #pragma warning(disable:4917) -- cgit v1.2.3 From a812215af2cee88810d128e50d65448b99ef1cc0 Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Tue, 8 Jun 2010 17:32:15 +0200 Subject: fwk139: Fix warning with gcc and public/non-plublic types --- comphelper/inc/comphelper/propertycontainerhelper.hxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/comphelper/inc/comphelper/propertycontainerhelper.hxx b/comphelper/inc/comphelper/propertycontainerhelper.hxx index 247e1a678e02..82848203699c 100644 --- a/comphelper/inc/comphelper/propertycontainerhelper.hxx +++ b/comphelper/inc/comphelper/propertycontainerhelper.hxx @@ -42,7 +42,7 @@ namespace comphelper //......................................................................... // infos about one single property -struct COMPHELPER_DLLPRIVATE PropertyDescription +struct COMPHELPER_DLLPUBLIC PropertyDescription { // the possibilities where a property holding object may be located enum LocationType -- cgit v1.2.3 From f79b849179975147947da84272cda998cf9c7af0 Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Wed, 9 Jun 2010 11:18:37 +0200 Subject: fwk139: #i10000# Fix additional warnings with gcc --- sfx2/source/doc/docfac.cxx | 2 +- sfx2/source/doc/syspath.cxx | 2 ++ sfx2/source/doc/syspathw32.cxx | 23 ++++++++++++----------- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/sfx2/source/doc/docfac.cxx b/sfx2/source/doc/docfac.cxx index a2dcef9a63fc..bfd67210ec44 100644 --- a/sfx2/source/doc/docfac.cxx +++ b/sfx2/source/doc/docfac.cxx @@ -226,7 +226,7 @@ void SfxObjectFactory::SetSystemTemplate( const String& rServiceName, const Stri ::rtl::OUString aActualFilter; ::comphelper::ConfigurationHelper::readRelativeKey( xConfig, CONF_PATH, PROP_ACTUAL_FILTER ) >>= aActualFilter; - sal_Bool bChanged; + sal_Bool bChanged(sal_False); ::comphelper::ConfigurationHelper::readRelativeKey( xConfig, CONF_PATH, PROP_DEF_TEMPL_CHANGED ) >>= bChanged; uno::Reference< container::XNameAccess > xFilterFactory( diff --git a/sfx2/source/doc/syspath.cxx b/sfx2/source/doc/syspath.cxx index 96bbee376306..a1025370ed24 100755 --- a/sfx2/source/doc/syspath.cxx +++ b/sfx2/source/doc/syspath.cxx @@ -41,6 +41,8 @@ bool SystemPath::GetUserTemplateLocation(sal_Unicode* pFolder, int nSize ) #ifdef WNT return ::GetUserTemplateLocation( pFolder, nSize ); #else + (void)pFolder; + (void)nSize; return false; #endif } diff --git a/sfx2/source/doc/syspathw32.cxx b/sfx2/source/doc/syspathw32.cxx index 74522654ff49..73bd84f5249a 100644 --- a/sfx2/source/doc/syspathw32.cxx +++ b/sfx2/source/doc/syspathw32.cxx @@ -34,17 +34,6 @@ #endif #include -// Copied from sal/types.h to circumvent problems with precompiled headers -// and redefinitions of BOOL, INT32 and other types. Unfortunately tools -// also define these type incompatible with Win32 types which leads from -// time to time to very nasty compilation errors. If someone finds a better -// way to solve these probs please remove this copied part! -#if ( defined(WIN32) && !defined(__MINGW32__) ) - typedef wchar_t sal_Unicode; -#else - typedef sal_uInt16 sal_Unicode; -#endif - static bool _SHGetSpecialFolderW32( int nFolderID, WCHAR* pszFolder, int nSize ) { LPITEMIDLIST pidl; @@ -70,6 +59,18 @@ static bool _SHGetSpecialFolderW32( int nFolderID, WCHAR* pszFolder, int nSize ) #endif +// Copied from sal/types.h to circumvent problems with precompiled headers +// and redefinitions of BOOL, INT32 and other types. Unfortunately tools +// also define these type incompatible with Win32 types which leads from +// time to time to very nasty compilation errors. If someone finds a better +// way to solve these probs please remove this copied part! +typedef unsigned short sal_uInt16; +#if ( defined(WIN32) && !defined(__MINGW32__) ) + typedef wchar_t sal_Unicode; +#else + typedef sal_uInt16 sal_Unicode; +#endif + extern "C" bool GetUserTemplateLocation(sal_Unicode* pFolder, int nSize) { #ifdef WNT -- cgit v1.2.3 From 95e79f40b84a86bb8e55f04d7601ef7948c18115 Mon Sep 17 00:00:00 2001 From: Hans-Joachim Lankenau Date: Wed, 9 Jun 2010 13:12:13 +0200 Subject: ause120: #i112241# missing dependency --- soltools/prj/build.lst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/soltools/prj/build.lst b/soltools/prj/build.lst index 3c4e50eb0cda..73611addf782 100644 --- a/soltools/prj/build.lst +++ b/soltools/prj/build.lst @@ -1,4 +1,4 @@ -so soltools : SUN:so_prereq NULL +so soltools : solenv SUN:so_prereq NULL so soltools usr1 - all so_usr1 NULL so soltools\inc get - all so_inc NULL so soltools\ldump nmake - all so_ldump so_mkdep NULL -- cgit v1.2.3 From c91681e15df0b9146e0c64aecd7f6b1ba5f410e4 Mon Sep 17 00:00:00 2001 From: Thorsten Bosbach Date: Wed, 9 Jun 2010 13:37:47 +0200 Subject: #i111784 CWS gridcontrol_03: Tablecontrol.select does not trigger selection event --- automation/source/server/statemnt.cxx | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/automation/source/server/statemnt.cxx b/automation/source/server/statemnt.cxx index 87f479d67512..bfe6c30364ad 100644 --- a/automation/source/server/statemnt.cxx +++ b/automation/source/server/statemnt.cxx @@ -5341,12 +5341,12 @@ BOOL StatementControl::Execute() ReportError( aUId, GEN_RES_STR1( S_HELPID_ON_TOOLBOX_NOT_FOUND, MethodString( nMethodId ) ) );\ else\ {\ - if ( !pTB->IsItemEnabled( pTB->GetItemId(nItemPos) ) && nMethodId != _M_IsEnabled )\ + if ( !pTB->IsItemEnabled( pTB->GetItemId(nItemPos) ) && nMethodId != _M_IsEnabled && nMethodId != M_GetState )\ {\ ReportError( aUId, GEN_RES_STR1( S_BUTTON_DISABLED_ON_TOOLBOX, MethodString( nMethodId ) ) );\ bItemFound = FALSE;\ }\ - else if ( !pTB->IsItemVisible( pTB->GetItemId(nItemPos) ) )\ + else if ( !pTB->IsItemVisible( pTB->GetItemId(nItemPos) ) && nMethodId != M_GetState )\ {\ ReportError( aUId, GEN_RES_STR1( S_BUTTON_HIDDEN_ON_TOOLBOX, MethodString( nMethodId ) ) );\ bItemFound = FALSE;\ @@ -5738,19 +5738,28 @@ BOOL StatementControl::Execute() pRet->GenReturn ( RET_Value, aUId, comm_ULONG( pItem->GetButtonFlags() & ~SV_STATE_MASK )); break; case M_Check : - pItem->SetStateChecked(); - pTree->CheckButtonHdl(); - pTree->InvalidateEntry( pThisEntry ); + if ( !pItem->IsStateChecked() ) + { + pItem->SetStateChecked(); + pTree->CheckButtonHdl(); + pTree->InvalidateEntry( pThisEntry ); + } break; case M_UnCheck : - pItem->SetStateUnchecked(); - pTree->CheckButtonHdl(); - pTree->InvalidateEntry( pThisEntry ); + if ( pItem->IsStateChecked() || pItem->IsStateTristate() ) + { + pItem->SetStateUnchecked(); + pTree->CheckButtonHdl(); + pTree->InvalidateEntry( pThisEntry ); + } break; case M_TriState : - pItem->SetStateTristate(); - pTree->CheckButtonHdl(); - pTree->InvalidateEntry( pThisEntry ); + if ( !pItem->IsStateTristate() ) + { + pItem->SetStateTristate(); + pTree->CheckButtonHdl(); + pTree->InvalidateEntry( pThisEntry ); + } break; default: ReportError( aUId, GEN_RES_STR1( S_INTERNAL_ERROR, MethodString( nMethodId ) ) ); -- cgit v1.2.3 From 1f0b2989c6eb810058425b1ed510f4357a1f904f Mon Sep 17 00:00:00 2001 From: Thorsten Bosbach Date: Wed, 9 Jun 2010 13:46:35 +0200 Subject: #i111784 CWS gridcontrol_03: Tablecontrol.select does not trigger selection event --- .../optional/includes/basic_gridcontrol.inc | 33 +++++++++++++++++++++ .../framework/optional/input/gridcontrol.odt | Bin 12000 -> 12600 bytes 2 files changed, 33 insertions(+) diff --git a/testautomation/framework/optional/includes/basic_gridcontrol.inc b/testautomation/framework/optional/includes/basic_gridcontrol.inc index f2d2f74cbdd4..b23e2318d657 100755 --- a/testautomation/framework/optional/includes/basic_gridcontrol.inc +++ b/testautomation/framework/optional/includes/basic_gridcontrol.inc @@ -55,6 +55,7 @@ testcase tGridcontrolLoad printlog "Start the macro, that performs the test" Kontext "GridControlDialogStarter" + ' FAILS IF DOCUMENT IS READONLY.... ShowGridcontrol.typeKeys "" Kontext "GridControlDialog" if GridControlDialog.exists(5) then @@ -63,6 +64,37 @@ testcase tGridcontrolLoad printlog " " + i + ":"+a+": '" + gridcontrolcontrol.getitemtype (i,a) + "' '" + gridcontrolcontrol.getitemtext (i,a) + "'" next a next i + gridcontrolcontrol.select 5 + + kontext + if active.exists(5) then + printlog active.gettext + active.ok + else + warnlog "No selection Event by .select" + endif + + Kontext "GridControlDialog" + gridcontrolcontrol.typeKeys("") + + kontext + if active.exists(5) then + printlog active.gettext + active.ok + else + warnlog "No selection event by .typeKeys " + endif + Kontext "GridControlDialog" + gridcontrolcontrol.typeKeys("") + kontext + if active.exists(5) then + printlog active.gettext + active.ok + else + warnlog "No selection event by .typeKeys " + endif + + Kontext "GridControlDialog" GridControlDialog.close else warnlog "Gridcontrol Dialog did not come up after pressing button" @@ -75,3 +107,4 @@ testcase tGridcontrolLoad endif endcase + diff --git a/testautomation/framework/optional/input/gridcontrol.odt b/testautomation/framework/optional/input/gridcontrol.odt index d11d70cfbc09..46be0c44a065 100755 Binary files a/testautomation/framework/optional/input/gridcontrol.odt and b/testautomation/framework/optional/input/gridcontrol.odt differ -- cgit v1.2.3 From 88d7f9fbe416d0f4c5edc4a9b5c9560d1d82167b Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Wed, 9 Jun 2010 14:57:22 +0200 Subject: fwk139: #i10000# adopt for linux --- embeddedobj/source/msole/oleembed.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/embeddedobj/source/msole/oleembed.cxx b/embeddedobj/source/msole/oleembed.cxx index 81c1bd708fcb..78ad2c2e5885 100644 --- a/embeddedobj/source/msole/oleembed.cxx +++ b/embeddedobj/source/msole/oleembed.cxx @@ -882,10 +882,10 @@ void SAL_CALL OleEmbeddedObject::doVerb( sal_Int32 nVerbID ) if (m_aTempDumpURL.getLength()) { - uno::Reference< system::XSystemShellExecute > xSystemShellExecute( m_xFactory->createInstance( + uno::Reference< ::com::sun::star::system::XSystemShellExecute > xSystemShellExecute( m_xFactory->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.system.SystemShellExecute"))), uno::UNO_QUERY_THROW); - xSystemShellExecute->execute(m_aTempDumpURL, ::rtl::OUString(), system::SystemShellExecuteFlags::DEFAULTS); + xSystemShellExecute->execute(m_aTempDumpURL, ::rtl::OUString(), ::com::sun::star::system::SystemShellExecuteFlags::DEFAULTS); } else throw embed::UnreachableStateException(); -- cgit v1.2.3 From 1d1528cab8a399b303d8410ec44b33df9b168601 Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Wed, 9 Jun 2010 16:36:05 +0200 Subject: fwk139: #i10000# adopt for linux --- sw/source/ui/utlui/makefile.mk | 2 -- 1 file changed, 2 deletions(-) diff --git a/sw/source/ui/utlui/makefile.mk b/sw/source/ui/utlui/makefile.mk index da000994fead..cded61eee357 100644 --- a/sw/source/ui/utlui/makefile.mk +++ b/sw/source/ui/utlui/makefile.mk @@ -59,9 +59,7 @@ EXCEPTIONSFILES= \ SLOFILES = $(EXCEPTIONSFILES) \ $(SLO)$/condedit.obj \ - $(SLO)$/content.obj \ $(SLO)$/gloslst.obj \ - $(SLO)$/glbltree.obj \ $(SLO)$/initui.obj \ $(SLO)$/navicfg.obj \ $(SLO)$/numfmtlb.obj \ -- cgit v1.2.3 From b8120f49428061b7d911365494b3e3561a9b44c0 Mon Sep 17 00:00:00 2001 From: Hans-Joachim Lankenau Date: Wed, 9 Jun 2010 17:00:35 +0200 Subject: ause120: #i112253# reorder includes for HID generation --- solenv/bin/mhids.pl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/solenv/bin/mhids.pl b/solenv/bin/mhids.pl index a1229c398551..f0abf2e5cdca 100644 --- a/solenv/bin/mhids.pl +++ b/solenv/bin/mhids.pl @@ -203,8 +203,8 @@ if ( $ret ) { } push @cleanuplist, ".c1"; -print "$compiler $solarincludes $defs $preprocess_flag ${shell_workfile}.c1 > ${shell_workfile}.c2\n" if $verbose; -$ret = system "$compiler $solarincludes $defs $preprocess_flag ${shell_workfile}.c1 > ${shell_workfile}.c2"; +print "$compiler $defs $solarincludes $preprocess_flag ${shell_workfile}.c1 > ${shell_workfile}.c2\n" if $verbose; +$ret = system "$compiler $defs $solarincludes $preprocess_flag ${shell_workfile}.c1 > ${shell_workfile}.c2"; if ( $ret ) { push @cleanuplist, ".c2"; cleandie("ERROR - calling compiler for preprocessing failed"); @@ -246,8 +246,8 @@ if ( $outobj_flag ne "" ) { $outobj_param = "$outobj_flag${shell_workfile}$objext"; } -print "$compiler $solarincludes $defs ${shell_workfile}.c $outobj_param $outbin_flag${shell_workfile}$appext \n" if $verbose; -$ret = system "$compiler $solarincludes $defs ${shell_workfile}.c $outobj_param $outbin_flag${shell_workfile}$appext"; +print "$compiler $defs $solarincludes ${shell_workfile}.c $outobj_param $outbin_flag${shell_workfile}$appext \n" if $verbose; +$ret = system "$compiler $defs $solarincludes ${shell_workfile}.c $outobj_param $outbin_flag${shell_workfile}$appext"; if ( $ret ) { push @cleanuplist, "$appext"; cleandie("ERROR - compiling $workfile.c failed"); -- cgit v1.2.3 From a9089dd4c6c70f41a62aa1ef996cc052ff062192 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Thu, 10 Jun 2010 00:53:44 +0200 Subject: unoawt: #i112239#: do not localize the weird sample strings herein ... --- sfx2/workben/custompanel/CalcWindowState.xcu | 2 +- sfx2/workben/custompanel/DrawWindowState.xcu | 2 +- sfx2/workben/custompanel/ImpressWindowState.xcu | 2 +- sfx2/workben/custompanel/WriterWindowState.xcu | 4 ++-- sfx2/workben/custompanel/description.xml | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sfx2/workben/custompanel/CalcWindowState.xcu b/sfx2/workben/custompanel/CalcWindowState.xcu index 2f224f32aa77..17629c0bf698 100644 --- a/sfx2/workben/custompanel/CalcWindowState.xcu +++ b/sfx2/workben/custompanel/CalcWindowState.xcu @@ -4,7 +4,7 @@ - Soylent Blue + Soylent Blue false diff --git a/sfx2/workben/custompanel/DrawWindowState.xcu b/sfx2/workben/custompanel/DrawWindowState.xcu index 3c0992bc4871..6037a3f5a083 100644 --- a/sfx2/workben/custompanel/DrawWindowState.xcu +++ b/sfx2/workben/custompanel/DrawWindowState.xcu @@ -4,7 +4,7 @@ - Soylent Yellow + Soylent Yellow false diff --git a/sfx2/workben/custompanel/ImpressWindowState.xcu b/sfx2/workben/custompanel/ImpressWindowState.xcu index 0fc1bb9d40c8..a8fea859bbab 100644 --- a/sfx2/workben/custompanel/ImpressWindowState.xcu +++ b/sfx2/workben/custompanel/ImpressWindowState.xcu @@ -4,7 +4,7 @@ - Soylent Orange + Soylent Orange false diff --git a/sfx2/workben/custompanel/WriterWindowState.xcu b/sfx2/workben/custompanel/WriterWindowState.xcu index f1edd4a12881..248a2e14a3f4 100644 --- a/sfx2/workben/custompanel/WriterWindowState.xcu +++ b/sfx2/workben/custompanel/WriterWindowState.xcu @@ -4,7 +4,7 @@ - Soylent Green + Soylent Green false @@ -18,7 +18,7 @@ - Soylent Red + Soylent Red false diff --git a/sfx2/workben/custompanel/description.xml b/sfx2/workben/custompanel/description.xml index 7b85d64eaf69..a90aa73a77f6 100644 --- a/sfx2/workben/custompanel/description.xml +++ b/sfx2/workben/custompanel/description.xml @@ -8,7 +8,7 @@ - Custom Tool Panel Example + Custom Tool Panel Example -- cgit v1.2.3 From bc30330c6c67ce22d9b95ac617b4982c2d4cbd6d Mon Sep 17 00:00:00 2001 From: ka Date: Thu, 10 Jun 2010 10:50:30 +0200 Subject: impressbi01: warnings --- filter/source/msfilter/escherex.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx index 741700727dc1..2ad33b1e6195 100644 --- a/filter/source/msfilter/escherex.cxx +++ b/filter/source/msfilter/escherex.cxx @@ -1106,7 +1106,7 @@ sal_Bool EscherPropertyContainer::CreateShapeProperties( const ::com::sun::star: uno::Reference< beans::XPropertySet > aXPropSet( rXShape, uno::UNO_QUERY ); if ( aXPropSet.is() ) { - sal_Bool bVal; + sal_Bool bVal = false; ::com::sun::star::uno::Any aAny; sal_uInt32 nShapeAttr = 0; EscherPropertyValueHelper::GetPropertyValue( aAny, aXPropSet, String( RTL_CONSTASCII_USTRINGPARAM( "Visible" ) ), sal_True ); @@ -4225,7 +4225,7 @@ sal_uInt32 EscherConnectorListEntry::GetConnectorRule( sal_Bool bFirst ) nRule = GetClosestPoint( aPoly, aRefPoint ); if ( aType == "drawing.Ellipse" ) - nRule <<= 1; // In PPT hat eine Ellipse 8 Mglichkeiten sich zu connecten + nRule <<= 1; // In PPT hat eine Ellipse 8 M?glichkeiten sich zu connecten } } return nRule; -- cgit v1.2.3 From 2434dc6682de98a23cc4393e8ceb3100e2788f64 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Thu, 10 Jun 2010 11:09:24 +0200 Subject: unoawt: ListBoxControl::updateFromModel: also set the SelectedItems property, after we just set a new item list via itemListChanged --- toolkit/source/controls/unocontrols.cxx | 6 ++++++ toolkit/source/helper/property.cxx | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/toolkit/source/controls/unocontrols.cxx b/toolkit/source/controls/unocontrols.cxx index 3b037e3ca0d3..cfb71111e3dc 100644 --- a/toolkit/source/controls/unocontrols.cxx +++ b/toolkit/source/controls/unocontrols.cxx @@ -2427,6 +2427,12 @@ void UnoListBoxControl::updateFromModel() EventObject aEvent( getModel() ); xItemListListener->itemListChanged( aEvent ); + + // notify the change of the SelectedItems property, again. While our base class, in updateFromModel, + // already did this, our peer(s) can only legitimately set the selection after they have the string + // item list, which we just notified with the itemListChanged call. + const ::rtl::OUString sSelectedItemsPropName( GetPropertyName( BASEPROPERTY_SELECTEDITEMS ) ); + ImplSetPeerProperty( sSelectedItemsPropName, ImplGetPropertyValue( sSelectedItemsPropName ) ); } void UnoListBoxControl::ImplSetPeerProperty( const ::rtl::OUString& rPropName, const uno::Any& rVal ) diff --git a/toolkit/source/helper/property.cxx b/toolkit/source/helper/property.cxx index b878112eed69..9369faf6a0b9 100644 --- a/toolkit/source/helper/property.cxx +++ b/toolkit/source/helper/property.cxx @@ -223,7 +223,7 @@ ImplPropertyInfo* ImplGetPropertyInfos( sal_uInt16& rElementCount ) DECL_DEP_PROP_3 ( "ScrollValue", SCROLLVALUE, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID ), DECL_PROP_2 ( "ScrollValueMax", SCROLLVALUE_MAX, sal_Int32, BOUND, MAYBEDEFAULT ), DECL_PROP_2 ( "ScrollValueMin", SCROLLVALUE_MIN, sal_Int32, BOUND, MAYBEDEFAULT ), - DECL_PROP_2 ( "SelectedItems", SELECTEDITEMS, Sequence, BOUND, MAYBEDEFAULT ), + DECL_DEP_PROP_2 ( "SelectedItems", SELECTEDITEMS, Sequence, BOUND, MAYBEDEFAULT ), DECL_PROP_2 ( "ShowThousandsSeparator", NUMSHOWTHOUSANDSEP, bool, BOUND, MAYBEDEFAULT ), DECL_PROP_2 ( "Sizeable", SIZEABLE, bool, BOUND, MAYBEDEFAULT ), DECL_PROP_2 ( "Spin", SPIN, bool, BOUND, MAYBEDEFAULT ), -- cgit v1.2.3 From f84dc46517c75dd04eae1e83d5ee0e4b9ab2110c Mon Sep 17 00:00:00 2001 From: "Joerg Skottke [jsk]" Date: Thu, 10 Jun 2010 13:24:15 +0200 Subject: native309: #i112273 - Adjusted version string to 3.3 --- testautomation/global/input/officeinfo.txt | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) mode change 100755 => 100644 testautomation/global/input/officeinfo.txt diff --git a/testautomation/global/input/officeinfo.txt b/testautomation/global/input/officeinfo.txt old mode 100755 new mode 100644 index 92b4e492740d..430e4141e3dd --- a/testautomation/global/input/officeinfo.txt +++ b/testautomation/global/input/officeinfo.txt @@ -1,7 +1,5 @@ [Current program versions] -StarOffice=9 -StarSuite=9 -OpenOffice.org=3.1 -BrOffice.org=3.1 -Oracle Open Office=3.2 +OpenOffice.org=3.3 +BrOffice.org=3.3 +Oracle Open Office=3.3 -- cgit v1.2.3 From 3a29a9cb361f803fd5f22732570729cca7c7743c Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Thu, 10 Jun 2010 13:44:35 +0200 Subject: unoawt: some more properties for the throbber model ... at least EnableVisible will come handy --- toolkit/source/controls/tkthrobber.cxx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/toolkit/source/controls/tkthrobber.cxx b/toolkit/source/controls/tkthrobber.cxx index 978d3183fe23..20edc3582780 100644 --- a/toolkit/source/controls/tkthrobber.cxx +++ b/toolkit/source/controls/tkthrobber.cxx @@ -46,8 +46,13 @@ namespace toolkit //-------------------------------------------------------------------- UnoThrobberControlModel::UnoThrobberControlModel() { - ImplRegisterProperty( BASEPROPERTY_DEFAULTCONTROL ); + ImplRegisterProperty( BASEPROPERTY_BORDER ); + ImplRegisterProperty( BASEPROPERTY_BORDERCOLOR ); ImplRegisterProperty( BASEPROPERTY_BACKGROUNDCOLOR ); + ImplRegisterProperty( BASEPROPERTY_DEFAULTCONTROL ); + ImplRegisterProperty( BASEPROPERTY_ENABLEVISIBLE ); + ImplRegisterProperty( BASEPROPERTY_HELPTEXT ); + ImplRegisterProperty( BASEPROPERTY_HELPURL ); } //-------------------------------------------------------------------- @@ -63,6 +68,8 @@ namespace toolkit { case BASEPROPERTY_DEFAULTCONTROL: return uno::makeAny( ::rtl::OUString::createFromAscii( szServiceName_UnoThrobberControl ) ); + case BASEPROPERTY_BORDER: + return uno::makeAny( (sal_Int16) 0 ); default: return UnoControlModel::ImplGetDefaultValue( nPropId ); } -- cgit v1.2.3 From b69a01a9b4c47f12bb31015a5080d5285a5c0cba Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 11 Jun 2010 13:01:41 +0200 Subject: unoawt: support XDialog2 for UNO dialogs --- toolkit/inc/toolkit/awt/vclxwindows.hxx | 8 ++++++-- toolkit/inc/toolkit/controls/dialogcontrol.hxx | 8 ++++++-- toolkit/source/awt/vclxwindows.cxx | 26 +++++++++++++++++++++----- toolkit/source/controls/dialogcontrol.cxx | 14 ++++++++++++++ 4 files changed, 47 insertions(+), 9 deletions(-) diff --git a/toolkit/inc/toolkit/awt/vclxwindows.hxx b/toolkit/inc/toolkit/awt/vclxwindows.hxx index 8efe01b526ba..ca3267bffb5e 100644 --- a/toolkit/inc/toolkit/awt/vclxwindows.hxx +++ b/toolkit/inc/toolkit/awt/vclxwindows.hxx @@ -75,7 +75,7 @@ #include #include #include -#include +#include #include #include #include @@ -390,7 +390,7 @@ public: // ---------------------------------------------------- // class VCLXDialog // ---------------------------------------------------- -class VCLXDialog : public ::com::sun::star::awt::XDialog, +class VCLXDialog : public ::com::sun::star::awt::XDialog2, public VCLXTopWindow { public: @@ -406,6 +406,10 @@ public: ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw(::com::sun::star::uno::RuntimeException); ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException); + // ::com::sun::star::awt::XDialog2 + virtual void SAL_CALL endDialog( ::sal_Int32 Result ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setHelpId( ::sal_Int32 Id ) throw (::com::sun::star::uno::RuntimeException); + // ::com::sun::star::awt::XDialog void SAL_CALL setTitle( const ::rtl::OUString& Title ) throw(::com::sun::star::uno::RuntimeException); ::rtl::OUString SAL_CALL getTitle( ) throw(::com::sun::star::uno::RuntimeException); diff --git a/toolkit/inc/toolkit/controls/dialogcontrol.hxx b/toolkit/inc/toolkit/controls/dialogcontrol.hxx index b6a0e66b2430..0c5731d3f923 100644 --- a/toolkit/inc/toolkit/controls/dialogcontrol.hxx +++ b/toolkit/inc/toolkit/controls/dialogcontrol.hxx @@ -36,7 +36,7 @@ #include #include #include -#include +#include #include #include #include @@ -186,7 +186,7 @@ protected: // ---------------------------------------------------- typedef ::cppu::ImplHelper6 < ::com::sun::star::container::XContainerListener , ::com::sun::star::awt::XTopWindow - , ::com::sun::star::awt::XDialog + , ::com::sun::star::awt::XDialog2 , ::com::sun::star::util::XChangesListener , ::com::sun::star::util::XModifyListener , ::com::sun::star::awt::XWindowListener @@ -272,6 +272,10 @@ public: void SAL_CALL elementRemoved( const ::com::sun::star::container::ContainerEvent& Event ) throw(::com::sun::star::uno::RuntimeException); void SAL_CALL elementReplaced( const ::com::sun::star::container::ContainerEvent& Event ) throw(::com::sun::star::uno::RuntimeException); + // ::com::sun::star::awt::XDialog2 + virtual void SAL_CALL endDialog( ::sal_Int32 Result ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setHelpId( ::sal_Int32 Id ) throw (::com::sun::star::uno::RuntimeException); + // ::com::sun::star::awt::XDialog void SAL_CALL setTitle( const ::rtl::OUString& Title ) throw(::com::sun::star::uno::RuntimeException); ::rtl::OUString SAL_CALL getTitle() throw(::com::sun::star::uno::RuntimeException); diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx index 5649ed4248dd..bff8dde75b0c 100644 --- a/toolkit/source/awt/vclxwindows.cxx +++ b/toolkit/source/awt/vclxwindows.cxx @@ -2323,16 +2323,36 @@ VCLXDialog::~VCLXDialog() ::com::sun::star::uno::Any VCLXDialog::queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException) { ::com::sun::star::uno::Any aRet = ::cppu::queryInterface( rType, + SAL_STATIC_CAST( ::com::sun::star::awt::XDialog2*, this ), SAL_STATIC_CAST( ::com::sun::star::awt::XDialog*, this ) ); return (aRet.hasValue() ? aRet : VCLXTopWindow::queryInterface( rType )); } // ::com::sun::star::lang::XTypeProvider IMPL_XTYPEPROVIDER_START( VCLXDialog ) + getCppuType( ( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XDialog2>* ) NULL ), getCppuType( ( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XDialog>* ) NULL ), VCLXTopWindow::getTypes() IMPL_XTYPEPROVIDER_END +void SAL_CALL VCLXDialog::endDialog( ::sal_Int32 i_result ) throw (RuntimeException) +{ + ::vos::OGuard aGuard( GetMutex() ); + + Dialog* pDialog = dynamic_cast< Dialog* >( GetWindow() ); + if ( pDialog ) + pDialog->EndDialog( i_result ); +} + +void SAL_CALL VCLXDialog::setHelpId( ::sal_Int32 i_id ) throw (RuntimeException) +{ + ::vos::OGuard aGuard( GetMutex() ); + + Window* pWindow = GetWindow(); + if ( pWindow ) + pWindow->SetHelpId( i_id ); +} + void VCLXDialog::setTitle( const ::rtl::OUString& Title ) throw(::com::sun::star::uno::RuntimeException) { ::vos::OGuard aGuard( GetMutex() ); @@ -2379,11 +2399,7 @@ sal_Int16 VCLXDialog::execute() throw(::com::sun::star::uno::RuntimeException) void VCLXDialog::endExecute() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); - - Dialog* pDlg = (Dialog*) GetWindow(); - if ( pDlg ) - pDlg->EndDialog( 0 ); + endDialog(0); } void SAL_CALL VCLXDialog::draw( sal_Int32 nX, sal_Int32 nY ) throw(::com::sun::star::uno::RuntimeException) diff --git a/toolkit/source/controls/dialogcontrol.cxx b/toolkit/source/controls/dialogcontrol.cxx index cf1bff991430..7d845096321a 100644 --- a/toolkit/source/controls/dialogcontrol.cxx +++ b/toolkit/source/controls/dialogcontrol.cxx @@ -1975,6 +1975,20 @@ void UnoDialogControl::ImplUpdateResourceResolver() } } +void SAL_CALL UnoDialogControl::endDialog( ::sal_Int32 i_result ) throw (RuntimeException) +{ + Reference< XDialog2 > xPeerDialog( getPeer(), UNO_QUERY ); + if ( xPeerDialog.is() ) + xPeerDialog->endDialog( i_result ); +} + +void SAL_CALL UnoDialogControl::setHelpId( ::sal_Int32 i_id ) throw (RuntimeException) +{ + Reference< XDialog2 > xPeerDialog( getPeer(), UNO_QUERY ); + if ( xPeerDialog.is() ) + xPeerDialog->setHelpId( i_id ); +} + void UnoDialogControl::setTitle( const ::rtl::OUString& Title ) throw(RuntimeException) { vos::OGuard aSolarGuard( Application::GetSolarMutex() ); -- cgit v1.2.3 From 0742e8e31b30b5ea203bbad44510c6d41b7e9793 Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Fri, 11 Jun 2010 13:07:26 +0200 Subject: l10ntooling18: idx-1 > 0 -> idx >= 1 --- l10ntools/source/merge.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/l10ntools/source/merge.cxx b/l10ntools/source/merge.cxx index b98bc53a6adb..e15a5c8a28fa 100644 --- a/l10ntools/source/merge.cxx +++ b/l10ntools/source/merge.cxx @@ -57,7 +57,7 @@ BOOL PFormEntrys::GetTransex3Text( ByteString &rReturn, ByteString test( rReturn ); for( USHORT idx = 0; idx < rReturn.Len(); idx++ ) { - if( rReturn.GetChar( idx ) == '\"' && ( idx-1 > 0 ) && rReturn.GetChar( idx-1 ) == '\\' ) + if( rReturn.GetChar( idx ) == '\"' && ( idx >= 1 ) && rReturn.GetChar( idx-1 ) == '\\' ) { rReturn.Erase( idx-1 , 1 ); } -- cgit v1.2.3 From ef60d406e368f024bd2edaa12e3389cbdd9e361b Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 11 Jun 2010 15:14:17 +0200 Subject: unoawt: added UnoControlListBoxModel::ItemSeparatorPos, specifying the position where to draw a separator between two items --- toolkit/inc/toolkit/helper/property.hxx | 1 + toolkit/source/awt/vclxwindows.cxx | 11 +++++++++++ toolkit/source/controls/unocontrolmodel.cxx | 1 + toolkit/source/helper/property.cxx | 1 + 4 files changed, 14 insertions(+) diff --git a/toolkit/inc/toolkit/helper/property.hxx b/toolkit/inc/toolkit/helper/property.hxx index ed86c3fe4ded..f8a1a703799c 100644 --- a/toolkit/inc/toolkit/helper/property.hxx +++ b/toolkit/inc/toolkit/helper/property.hxx @@ -201,6 +201,7 @@ namespace rtl { #define BASEPROPERTY_GRID_LINE_COLOR 150 #define BASEPROPERTY_GRID_ROW_BACKGROUND 151 #define BASEPROPERTY_MULTISELECTION_SIMPLEMODE 152 +#define BASEPROPERTY_ITEM_SEPARATOR_POS 153 // Keine gebundenen Properties, werden immer aus der Property BASEPROPERTY_FONTDESCRIPTOR entnommen. diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx index bff8dde75b0c..26e84905ee01 100644 --- a/toolkit/source/awt/vclxwindows.cxx +++ b/toolkit/source/awt/vclxwindows.cxx @@ -1547,6 +1547,7 @@ void VCLXListBox::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds ) BASEPROPERTY_LINECOUNT, BASEPROPERTY_MULTISELECTION, BASEPROPERTY_MULTISELECTION_SIMPLEMODE, + BASEPROPERTY_ITEM_SEPARATOR_POS, BASEPROPERTY_PRINTABLE, BASEPROPERTY_SELECTEDITEMS, BASEPROPERTY_STRINGITEMLIST, @@ -1916,6 +1917,13 @@ void VCLXListBox::setProperty( const ::rtl::OUString& PropertyName, const ::com: sal_uInt16 nPropType = GetPropertyId( PropertyName ); switch ( nPropType ) { + case BASEPROPERTY_ITEM_SEPARATOR_POS: + { + sal_Int16 nSeparatorPos(0); + if ( Value >>= nSeparatorPos ) + pListBox->SetSeparatorPos( nSeparatorPos ); + } + break; case BASEPROPERTY_READONLY: { sal_Bool b = sal_Bool(); @@ -1987,6 +1995,9 @@ void VCLXListBox::setProperty( const ::rtl::OUString& PropertyName, const ::com: sal_uInt16 nPropType = GetPropertyId( PropertyName ); switch ( nPropType ) { + case BASEPROPERTY_ITEM_SEPARATOR_POS: + aProp <<= sal_Int16( pListBox->GetSeparatorPos() ); + break; case BASEPROPERTY_READONLY: { aProp <<= (sal_Bool) pListBox->IsReadOnly(); diff --git a/toolkit/source/controls/unocontrolmodel.cxx b/toolkit/source/controls/unocontrolmodel.cxx index c5e1f70b15b8..91d202409e86 100644 --- a/toolkit/source/controls/unocontrolmodel.cxx +++ b/toolkit/source/controls/unocontrolmodel.cxx @@ -263,6 +263,7 @@ sal_Bool UnoControlModel::ImplHasProperty( sal_uInt16 nPropId ) const aDefault <<= Reference< awt::XDevice >(); break; + case BASEPROPERTY_ITEM_SEPARATOR_POS: case BASEPROPERTY_VERTICALALIGN: case BASEPROPERTY_BORDERCOLOR: case BASEPROPERTY_SYMBOL_COLOR: diff --git a/toolkit/source/helper/property.cxx b/toolkit/source/helper/property.cxx index 9369faf6a0b9..9a3dc7b9bfb3 100644 --- a/toolkit/source/helper/property.cxx +++ b/toolkit/source/helper/property.cxx @@ -191,6 +191,7 @@ ImplPropertyInfo* ImplGetPropertyInfos( sal_uInt16& rElementCount ) DECL_PROP_2 ( "ImageAlign", IMAGEALIGN, sal_Int16, BOUND, MAYBEDEFAULT), DECL_PROP_2 ( "ImagePosition", IMAGEPOSITION, sal_Int16, BOUND, MAYBEDEFAULT), DECL_PROP_2 ( "ImageURL", IMAGEURL, ::rtl::OUString, BOUND, MAYBEDEFAULT ), + DECL_PROP_3 ( "ItemSeparatorPos", ITEM_SEPARATOR_POS, sal_Int16, BOUND, MAYBEDEFAULT, MAYBEVOID ), DECL_PROP_2 ( "Label", LABEL, ::rtl::OUString, BOUND, MAYBEDEFAULT ), DECL_PROP_3 ( "LineColor", LINECOLOR, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID ), DECL_PROP_2 ( "LineCount", LINECOUNT, sal_Int16, BOUND, MAYBEDEFAULT ), -- cgit v1.2.3 From da8b92a6c1a94798acfacb88aff08faf98d20a9b Mon Sep 17 00:00:00 2001 From: Ruediger Timm Date: Fri, 11 Jun 2010 20:15:00 +0200 Subject: rt39: #i112287# Include the repository name in deliver.log file. --- solenv/bin/deliver.pl | 16 +++++++++++----- solenv/bin/modules/CreatePDBRelocators.pm | 2 +- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/solenv/bin/deliver.pl b/solenv/bin/deliver.pl index b0cb51e3b076..ab91ae34c01f 100755 --- a/solenv/bin/deliver.pl +++ b/solenv/bin/deliver.pl @@ -73,6 +73,7 @@ $is_debug = 0; $error = 0; $module = 0; # module name +$repository = 0; # parent directory of this module $base_dir = 0; # path to module base directory $dlst_file = 0; # path to d.lst $ilst_ext = 'ilst'; # extension of image lists @@ -446,7 +447,7 @@ sub parse_options sub init_globals { my $ext; - ($module, $base_dir, $dlst_file) = get_base(); + ($module, $repository, $base_dir, $dlst_file) = get_base(); # for CWS: $module =~ s/\.lnk$//; @@ -543,7 +544,7 @@ sub get_base { # a module base dir contains a subdir 'prj' # which in turn contains a file 'd.lst' - my (@field, $base, $dlst); + my (@field, $repo, $base, $dlst); my $path = getcwd(); @field = split(/\//, $path); @@ -560,7 +561,12 @@ sub get_base exit(2); } else { - return ($field[-1], $base, $dlst); + if ( defined $field[-2] ) { + $repo = $field[-2]; + } else { + print_error("Internal error: cannot determine module's parent directory"); + } + return ($field[-1], $repo, $base, $dlst); } } @@ -1152,8 +1158,8 @@ sub push_on_loglist if (( $entry[0] eq "COPY" ) || ( $entry[0] eq "ADDINCPATH" )) { return 0 if ( ! -e $entry[1].$maybedot ); # make 'from' relative to source root - $entry[1] = $module . "/prj/" . $entry[1]; - $entry[1] =~ s/^$module\/prj\/\.\./$module/; + $entry[1] = $repository ."/" . $module . "/prj/" . $entry[1]; + $entry[1] =~ s/$module\/prj\/\.\./$module/; } # platform or common tree? my $common; diff --git a/solenv/bin/modules/CreatePDBRelocators.pm b/solenv/bin/modules/CreatePDBRelocators.pm index c6e4f81a660f..c31e3a053b0c 100644 --- a/solenv/bin/modules/CreatePDBRelocators.pm +++ b/solenv/bin/modules/CreatePDBRelocators.pm @@ -186,7 +186,7 @@ sub collect_files # collect all binary executables on o: my @bin = $self->find_binary_execs("$template/bin"); my @bin_so = $self->find_binary_execs("$template/bin/so"); - @$filesref = (@lib, @lib_so, @mac_lib, @mac_lib_so, @bin, @bin_so); + push(@$filesref, (@lib, @lib_so, @mac_lib, @mac_lib_so, @bin, @bin_so)); } return 1; } -- cgit v1.2.3 From 1c9d17b1ceb95b8db014ac71246191763ad88046 Mon Sep 17 00:00:00 2001 From: Ruediger Timm Date: Fri, 11 Jun 2010 20:15:00 +0200 Subject: rt39: #i112287# Include the repository name in deliver.log file. --- postprocess/checkdeliver/checkdeliver.pl | 61 ++++++++++++++++++-------------- 1 file changed, 35 insertions(+), 26 deletions(-) diff --git a/postprocess/checkdeliver/checkdeliver.pl b/postprocess/checkdeliver/checkdeliver.pl index 46a9ad9238f4..d2270a841848 100644 --- a/postprocess/checkdeliver/checkdeliver.pl +++ b/postprocess/checkdeliver/checkdeliver.pl @@ -38,7 +38,6 @@ use File::stat; use IO::Handle; use lib ("$ENV{SOLARENV}/bin/modules"); -use SourceConfig; #### globals ##### @@ -49,7 +48,6 @@ my $platform = ''; my $logfile = ''; my $milestoneext = ''; my $local_env = 0; -my $source_config = SourceConfig -> new($ENV{SOLARSRC}); my @exceptionmodlist = ( "postprocess", "instset.*native", @@ -143,6 +141,7 @@ sub check my $error = 0; my %delivered; my $module; + my $repository; STDOUT->autoflush(1); # which module are we checking? if ( $listname =~ /\/([\w-]+?)\/deliver\.log$/o) { @@ -151,9 +150,39 @@ sub check print_logged( "Error: cannot determine module name from \'$listname\'\n" ); return 1; } - # where do we have to look for modules? - my $repository = $source_config->get_module_repository($module); - my $path = $source_config->get_module_path($module); + + # read deliver log file + if ( ! open( DELIVERLOG, "< $listname" ) ) { + print_logged( "Error: cannot open file \'$listname\'\n$!" ); + exit 2; + } + foreach ( ) { + next if ( /^LINK / ); + # What's this modules' repository? + if ( / (\w+?)\/$module\/prj\/build.lst/ ) { + $repository = $1; + } + # For now we concentrate on binaries, located in 'bin' or 'lib' and 'misc/build/<...>/[bin|lib]'. + next if ( (! /\/$module\/$platform\/[bl]i[nb]\//) && (! /\/$module\/$platform\/misc\/build\//)); + next if (! /[bl]i[nb]/); + next if ( /\.html$/ ); + chomp; + if ( /^\w+? (\S+) (\S+)\s*$/o ) { + my $origin = $1; + $delivered{$origin} = $2; + } else { + print_logged( "Warning: cannot parse \'$listname\' line\n\'$_\'\n" ); + } + } + close( DELIVERLOG ); + + if ( ! $repository ) { + print_logged( "Error parsing \'$listname\': cannot determine repository\n"); + $error ++; + return $error; + } + + my $path = "$srcrootdir/$repository/$module"; # is module physically accessible? # there are valid use cases where we build against a prebuild solver whithout having # all modules at disk @@ -176,30 +205,10 @@ sub check return $error; } - # read deliver log file - if ( ! open( DELIVERLOG, "< $listname" ) ) { - print_logged( "Error: cannot open file \'$listname\'\n$!" ); - exit 2; - } - foreach ( ) { - next if ( /^LINK / ); - # For now we concentrate on binaries, located in 'bin' or 'lib' and 'misc/build/<...>/[bin|lib]'. - next if ( (! / $module\/$platform\/[bl]i[nb]\//) && (! / $module\/$platform\/misc\/build\//)); - next if (! /[bl]i[nb]/); - next if ( /\.html$/ ); - chomp; - if ( /^\w+? (\S+) (\S+)\s*$/o ) { - $delivered{$1} = $2; - } else { - print_logged( "Warning: cannot parse \'$listname\' line\n\'$_\'\n" ); - } - } - close( DELIVERLOG ); - # compare all delivered files with their origin # no strict 'diff' allowed here, as deliver may alter files (hedabu, strip, ...) foreach my $file ( sort keys %delivered ) { - my $ofile = "$srcrootdir/$repository/$file"; + my $ofile = "$srcrootdir/$file"; my $sfile = "$solverdir/$delivered{$file}"; if ( $milestoneext ) { # deliver log files do not contain milestone extension on solver -- cgit v1.2.3 From 1184876fc2d6662101facfc1db7464a0d01e2428 Mon Sep 17 00:00:00 2001 From: Ruediger Timm Date: Fri, 11 Jun 2010 20:43:02 +0200 Subject: masterfix #i10000#: Add precompiled header include (patch provided by gh). --- svtools/source/toolpanel/toolpanel.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/svtools/source/toolpanel/toolpanel.cxx b/svtools/source/toolpanel/toolpanel.cxx index 35446d1ffe2b..f7b999494563 100644 --- a/svtools/source/toolpanel/toolpanel.cxx +++ b/svtools/source/toolpanel/toolpanel.cxx @@ -24,6 +24,8 @@ * ************************************************************************/ +#include "precompiled_svtools.hxx" + #include "svtools/toolpanel/toolpanel.hxx" //........................................................................ -- cgit v1.2.3 From 7c44b29149c7b22a2d8a4d3377c5af6d42d8e6be Mon Sep 17 00:00:00 2001 From: Ruediger Timm Date: Fri, 11 Jun 2010 20:46:41 +0200 Subject: masterfix #i10000#: Enable precompiled headers independent of BUILD_SPECIAL (patch provided by hjs). --- solenv/inc/rules.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/solenv/inc/rules.mk b/solenv/inc/rules.mk index 457041378f85..63c4d0cef28c 100644 --- a/solenv/inc/rules.mk +++ b/solenv/inc/rules.mk @@ -156,7 +156,7 @@ $(SLO)/precompiled_ex.% .PHONY: $(SLO)/%.obj : %.cxx @echo $(COMPILE_ECHO_SWITCH) Compiling: $(PRJNAME)/$(PATH_IN_MODULE)/$(COMPILE_ECHO_FILE) -.IF "$(ENABLE_PCH)"!="" && ( "$(BUILD_SPECIAL)"!="TRUE" ) +.IF "$(ENABLE_PCH)"!="" # just a helper var @noop $(assign used_exc_switches=$(!eq,$(EXCEPTIONSFILES),$(subst,$@, $(EXCEPTIONSFILES)) $(LOCAL_EXCEPTIONS_FLAGS) $(GLOBAL_EXCEPTIONS_FLAGS))) # cleanup first -- cgit v1.2.3 From 34bb809e497366aaddc3b0556a33390f7343db98 Mon Sep 17 00:00:00 2001 From: obo Date: Mon, 14 Jun 2010 09:41:43 +0200 Subject: masterfix: #i112339# check indexer output only when needed --- solenv/config/sdev300.ini | 1 + solenv/config/ssolar.cmn | 1 + 2 files changed, 2 insertions(+) diff --git a/solenv/config/sdev300.ini b/solenv/config/sdev300.ini index 56fe6c6e4a4d..d04a87c595e2 100644 --- a/solenv/config/sdev300.ini +++ b/solenv/config/sdev300.ini @@ -2966,6 +2966,7 @@ wntmsci12 XCLASSPATH . ZIPDEP %PERL% %SOLARENV%$/bin$/zipdep.pl BUILD_X64 TRUE + CHECK_LUCENCE_INDEXER_OUTPUT TRUE } common0 { diff --git a/solenv/config/ssolar.cmn b/solenv/config/ssolar.cmn index 54eda38b47f9..937c345e2de8 100644 --- a/solenv/config/ssolar.cmn +++ b/solenv/config/ssolar.cmn @@ -47,6 +47,7 @@ common BUILD_X64 CLASSPATH CALL_CDECL + CHECK_LUCENCE_INDEXER_OUTPUT COMEX common_build COMMON_OUTDIR -- cgit v1.2.3 From 79fa123bd79e794dfa9bf57e1df28ff46b16671d Mon Sep 17 00:00:00 2001 From: obo Date: Mon, 14 Jun 2010 13:32:57 +0200 Subject: masterfix: #i112327# sfx2: missing dependency on readlicense_oo --- sfx2/prj/build.lst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sfx2/prj/build.lst b/sfx2/prj/build.lst index 131156a78d4d..96320614eaaf 100644 --- a/sfx2/prj/build.lst +++ b/sfx2/prj/build.lst @@ -1,4 +1,4 @@ -sf sfx2 : l10n idl basic xmlscript framework shell setup_native sax SYSTRAY_GTK:libegg LIBXML2:libxml2 NULL +sf sfx2 : l10n idl basic xmlscript framework readlicense_oo shell setup_native sax SYSTRAY_GTK:libegg LIBXML2:libxml2 NULL sf sfx2 usr1 - all sf_mkout NULL sf sfx2\inc nmake - all sf_inc NULL sf sfx2\prj get - all sf_prj NULL -- cgit v1.2.3 From fc5cd5ec6efcefe20334bb6c47c1f9aa8a619426 Mon Sep 17 00:00:00 2001 From: Release Engineering Date: Tue, 15 Jun 2010 14:58:09 +0200 Subject: DEV300 --- solenv/inc/minor.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/solenv/inc/minor.mk b/solenv/inc/minor.mk index 4c69817791e8..519831ffb932 100644 --- a/solenv/inc/minor.mk +++ b/solenv/inc/minor.mk @@ -1,5 +1,5 @@ RSCVERSION=300 -RSCREVISION=300m82(Build:9510) -BUILD=9510 -LAST_MINOR=m82 +RSCREVISION=300m83(Build:9511) +BUILD=9511 +LAST_MINOR=m83 SOURCEVERSION=DEV300 -- cgit v1.2.3 From 41436227fd2108d59e52cdd217d73604613ce02e Mon Sep 17 00:00:00 2001 From: Release Engineering Date: Wed, 16 Jun 2010 09:47:53 +0200 Subject: masterfix: #i10000# resolve merge problems --- svtools/inc/svtools/toolboxcontroller.hxx | 1 + svtools/source/uno/toolboxcontroller.cxx | 39 +++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/svtools/inc/svtools/toolboxcontroller.hxx b/svtools/inc/svtools/toolboxcontroller.hxx index f636178881d0..7a49b294759c 100644 --- a/svtools/inc/svtools/toolboxcontroller.hxx +++ b/svtools/inc/svtools/toolboxcontroller.hxx @@ -133,6 +133,7 @@ class SVT_DLLPUBLIC ToolboxController : public ::com::sun::star::frame::XStatusL void enable( bool bEnable ); protected: + bool getToolboxId( sal_uInt16& rItemId, ToolBox** ppToolBox ); void setSupportVisiableProperty(sal_Bool bValue); //shizhoubo struct Listener { diff --git a/svtools/source/uno/toolboxcontroller.cxx b/svtools/source/uno/toolboxcontroller.cxx index 36c1374ba9fb..0af47339dc58 100644 --- a/svtools/source/uno/toolboxcontroller.cxx +++ b/svtools/source/uno/toolboxcontroller.cxx @@ -808,6 +808,45 @@ throw( com::sun::star::uno::Exception) this->setSupportVisiableProperty( rValue ); } } + +void ToolboxController::enable( bool bEnable ) +{ + ToolBox* pToolBox = 0; + sal_uInt16 nItemId = 0; + if( getToolboxId( nItemId, &pToolBox ) ) + { + pToolBox->EnableItem( nItemId, bEnable ? TRUE : FALSE ); + } +} + +bool ToolboxController::getToolboxId( sal_uInt16& rItemId, ToolBox** ppToolBox ) +{ + if( (m_pImpl->m_nToolBoxId != SAL_MAX_UINT16) && (ppToolBox == 0) ) + return m_pImpl->m_nToolBoxId; + + ToolBox* pToolBox = static_cast< ToolBox* >( VCLUnoHelper::GetWindow( getParent() ) ); + + if( (m_pImpl->m_nToolBoxId == SAL_MAX_UINT16) && pToolBox ) + { + const sal_uInt16 nCount = pToolBox->GetItemCount(); + for ( sal_uInt16 nPos = 0; nPos < nCount; ++nPos ) + { + const sal_uInt16 nItemId = pToolBox->GetItemId( nPos ); + if ( pToolBox->GetItemCommand( nItemId ) == String( m_aCommandURL ) ) + { + m_pImpl->m_nToolBoxId = nItemId; + break; + } + } + } + + if( ppToolBox ) + *ppToolBox = pToolBox; + + rItemId = m_pImpl->m_nToolBoxId; + + return (rItemId != SAL_MAX_UINT16) && (( ppToolBox == 0) || (*ppToolBox != 0) ); +} //end } // svt -- cgit v1.2.3 From 16ae4c1524769458f6d205430e7dcb8fc4ae333b Mon Sep 17 00:00:00 2001 From: Release Engineering Date: Wed, 16 Jun 2010 09:53:26 +0200 Subject: masterfix: #i10000# PACKAGE_STORAGE to embed::StorageFormats::PACKAGE --- package/source/xstor/owriteablestream.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/source/xstor/owriteablestream.cxx b/package/source/xstor/owriteablestream.cxx index 131f02595ad8..be11586bc4fb 100644 --- a/package/source/xstor/owriteablestream.cxx +++ b/package/source/xstor/owriteablestream.cxx @@ -3280,7 +3280,7 @@ uno::Any SAL_CALL OWriteStream::getPropertyValue( const ::rtl::OUString& aProp ) if ( ( ( m_pData->m_nStorageType == embed::StorageFormats::PACKAGE || m_pData->m_nStorageType == embed::StorageFormats::OFOPXML ) && aPropertyName.equalsAscii( "MediaType" ) ) - || ( m_pData->m_nStorageType == PACKAGE_STORAGE && aPropertyName.equalsAscii( "Encrypted" ) ) + || ( m_pData->m_nStorageType == embed::StorageFormats::PACKAGE && aPropertyName.equalsAscii( "Encrypted" ) ) || aPropertyName.equalsAscii( "Compressed" ) ) { m_pImpl->GetStreamProperties(); -- cgit v1.2.3 From 990ef886211196e7c1de0881fd78fc02bebf9073 Mon Sep 17 00:00:00 2001 From: Release Engineering Date: Wed, 16 Jun 2010 11:28:50 +0200 Subject: masterfix: #i10000# getModuleName() missing --- svtools/source/uno/toolboxcontroller.cxx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/svtools/source/uno/toolboxcontroller.cxx b/svtools/source/uno/toolboxcontroller.cxx index 0af47339dc58..bac34d2baf1c 100644 --- a/svtools/source/uno/toolboxcontroller.cxx +++ b/svtools/source/uno/toolboxcontroller.cxx @@ -745,6 +745,12 @@ Reference< ::com::sun::star::awt::XWindow > ToolboxController::getParent() const { return m_pImpl->m_xParentWindow; } + +const rtl::OUString& ToolboxController::getModuleName() const +{ + return m_pImpl->m_sModuleName; +} + // //------------------------------------------------------------------------- // XPropertySet by shizhoubo -- cgit v1.2.3 From 7f0993d43019a0ccb7f89c11fc23704c063b902f Mon Sep 17 00:00:00 2001 From: obo Date: Wed, 16 Jun 2010 12:49:04 +0200 Subject: masterfix: #i10000# dispatchCommand,DispatchInfo missing --- svtools/source/uno/toolboxcontroller.cxx | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/svtools/source/uno/toolboxcontroller.cxx b/svtools/source/uno/toolboxcontroller.cxx index bac34d2baf1c..92ae93f5080d 100644 --- a/svtools/source/uno/toolboxcontroller.cxx +++ b/svtools/source/uno/toolboxcontroller.cxx @@ -751,6 +751,25 @@ const rtl::OUString& ToolboxController::getModuleName() const return m_pImpl->m_sModuleName; } +void ToolboxController::dispatchCommand( const OUString& sCommandURL, const Sequence< PropertyValue >& rArgs ) +{ + try + { + Reference< XDispatchProvider > xDispatchProvider( m_xFrame, UNO_QUERY_THROW ); + URL aURL; + aURL.Complete = sCommandURL; + getURLTransformer()->parseStrict( aURL ); + + Reference< XDispatch > xDispatch( xDispatchProvider->queryDispatch( aURL, OUString(), 0 ), UNO_QUERY_THROW ); + + Application::PostUserEvent( STATIC_LINK(0, ToolboxController_Impl, ExecuteHdl_Impl), new DispatchInfo( xDispatch, aURL, rArgs ) ); + + } + catch( Exception& ) + { + } +} + // //------------------------------------------------------------------------- // XPropertySet by shizhoubo @@ -815,6 +834,15 @@ throw( com::sun::star::uno::Exception) } } +//-------------------------------------------------------------------- + +IMPL_STATIC_LINK_NOINSTANCE( ToolboxController_Impl, ExecuteHdl_Impl, DispatchInfo*, pDispatchInfo ) +{ + pDispatchInfo->mxDispatch->dispatch( pDispatchInfo->maURL, pDispatchInfo->maArgs ); + delete pDispatchInfo; + return 0; +} + void ToolboxController::enable( bool bEnable ) { ToolBox* pToolBox = 0; -- cgit v1.2.3 From 847c992a251bcbbcaf71d3b1b366d70971b4ef03 Mon Sep 17 00:00:00 2001 From: obo Date: Wed, 16 Jun 2010 13:50:55 +0200 Subject: masterfix: #i10000# remove conflict marks --- sd/source/ui/inc/PaneDockingWindow.hxx | 4 +--- sd/source/ui/inc/framework/ViewShellWrapper.hxx | 4 ---- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/sd/source/ui/inc/PaneDockingWindow.hxx b/sd/source/ui/inc/PaneDockingWindow.hxx index fdae7280d439..a335c327de79 100755 --- a/sd/source/ui/inc/PaneDockingWindow.hxx +++ b/sd/source/ui/inc/PaneDockingWindow.hxx @@ -65,8 +65,7 @@ public: virtual ~PaneDockingWindow (void); virtual void StateChanged( StateChangedType nType ); -<<<<<<< local -======= + virtual void DataChanged( const DataChangedEvent& rDCEvt ); /** Initializing the title tool box either creates a new title tool box @@ -126,7 +125,6 @@ private: last invocation the size of the docking window has changed. */ void Layout (void); ->>>>>>> other }; } // end of namespace ::sd diff --git a/sd/source/ui/inc/framework/ViewShellWrapper.hxx b/sd/source/ui/inc/framework/ViewShellWrapper.hxx index 96e59d484270..12483f462d5e 100755 --- a/sd/source/ui/inc/framework/ViewShellWrapper.hxx +++ b/sd/source/ui/inc/framework/ViewShellWrapper.hxx @@ -89,10 +89,6 @@ public: */ ::boost::shared_ptr GetViewShell (void); -<<<<<<< local -======= - ->>>>>>> other // XUnoTunnel virtual sal_Int64 SAL_CALL getSomething (const com::sun::star::uno::Sequence& rId) -- cgit v1.2.3 From 34dd33af79caf3a13ec3a4e7098616ac0b16cf50 Mon Sep 17 00:00:00 2001 From: Release Engineering Date: Wed, 16 Jun 2010 15:23:29 +0200 Subject: masterfix: #i10000# warning C4244: conversion from SbError to USHORT --- basic/source/runtime/runtime.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx index 29e49b0ffde8..ef3e4c056cb6 100755 --- a/basic/source/runtime/runtime.cxx +++ b/basic/source/runtime/runtime.cxx @@ -906,7 +906,7 @@ sal_Int32 SbiRuntime::translateErrorToVba( SbError nError, String& rMsg ) { // TEST, has to be vb here always #ifdef DBG_UTIL - SbError nTmp = StarBASIC::GetSfxFromVBError( nError ); + SbError nTmp = StarBASIC::GetSfxFromVBError( USHORT( nError ) ); DBG_ASSERT( nTmp, "No VB error!" ); #endif -- cgit v1.2.3 From 8c75156a84a5088506c49101efad199dc7b8d05e Mon Sep 17 00:00:00 2001 From: obo Date: Thu, 17 Jun 2010 09:00:57 +0200 Subject: masterfix: #i10000# resolve merge problems --- sd/source/ui/dlg/PaneDockingWindow.cxx | 229 --------------------------------- sd/source/ui/inc/PaneDockingWindow.hxx | 60 --------- 2 files changed, 289 deletions(-) diff --git a/sd/source/ui/dlg/PaneDockingWindow.cxx b/sd/source/ui/dlg/PaneDockingWindow.cxx index 8bcba545f739..c1dedd5d8293 100755 --- a/sd/source/ui/dlg/PaneDockingWindow.cxx +++ b/sd/source/ui/dlg/PaneDockingWindow.cxx @@ -57,235 +57,6 @@ PaneDockingWindow::~PaneDockingWindow (void) { } -<<<<<<< local -======= - - - -void PaneDockingWindow::Resize (void) -{ - SfxDockingWindow::Resize(); - mbIsLayoutPending = true; -} - - - - -void PaneDockingWindow::Layout (void) -{ - mbIsLayoutPending = false; - - Size aWindowSize (GetOutputSizePixel()); - Size aToolBoxSize (0,0); - int nTitleBarHeight (GetSettings().GetStyleSettings().GetTitleHeight()); - - // Place the title tool box. - if (mpTitleToolBox.get() != NULL) - { - if (IsFloatingMode()) - mpTitleToolBox->HideItem (1); - else - mpTitleToolBox->ShowItem (1); - - aToolBoxSize = mpTitleToolBox->CalcWindowSizePixel(); - if (aToolBoxSize.Height() > nTitleBarHeight) - nTitleBarHeight = aToolBoxSize.Height(); - mpTitleToolBox->SetPosSizePixel ( - Point(aWindowSize.Width()-aToolBoxSize.Width(), - (nTitleBarHeight-aToolBoxSize.Height())/2), - aToolBoxSize); - } - - // Place the content window. - if (nTitleBarHeight < aToolBoxSize.Height()) - nTitleBarHeight = aToolBoxSize.Height(); - aWindowSize.Height() -= nTitleBarHeight; - mpContentWindow->SetPosSizePixel( - Point(maBorder.Left(),nTitleBarHeight+maBorder.Top()), - Size (aWindowSize.Width()-maBorder.Left()-maBorder.Right(), - aWindowSize.Height()-maBorder.Top()-maBorder.Bottom())); -} - - - - -void PaneDockingWindow::Paint (const Rectangle& rRectangle) -{ - if (mbIsLayoutPending) - Layout(); - - SfxDockingWindow::Paint (rRectangle); - int nTitleBarHeight (GetSettings().GetStyleSettings().GetTitleHeight()); - Size aToolBoxSize = mpTitleToolBox->CalcWindowSizePixel(); - if (aToolBoxSize.Height() > nTitleBarHeight) - nTitleBarHeight = aToolBoxSize.Height(); - Color aOriginalLineColor (GetLineColor()); - Color aOriginalFillColor (GetFillColor()); - SetFillColor (GetSettings().GetStyleSettings().GetDialogColor()); - SetLineColor (); - - // Make font bold. - const Font& rOriginalFont (GetFont()); - Font aFont (rOriginalFont); - aFont.SetWeight (WEIGHT_BOLD); - SetFont (aFont); - - // Set border values. - Size aWindowSize (GetOutputSizePixel()); - int nOuterLeft = 0; - int nInnerLeft = nOuterLeft + maBorder.Left() - 1; - int nOuterRight = aWindowSize.Width() - 1; - int nInnerRight = nOuterRight - maBorder.Right() + 1; - int nInnerTop = nTitleBarHeight + maBorder.Top() - 1; - int nOuterBottom = aWindowSize.Height() - 1; - int nInnerBottom = nOuterBottom - maBorder.Bottom() + 1; - - // Paint title bar background. - Rectangle aTitleBarBox (Rectangle( - nOuterLeft, - 0, - nOuterRight, - nInnerTop-1)); - DrawRect (aTitleBarBox); - - if (nInnerLeft > nOuterLeft) - DrawRect ( - Rectangle (nOuterLeft, nInnerTop, nInnerLeft, nInnerBottom)); - if (nOuterRight > nInnerRight) - DrawRect ( - Rectangle (nInnerRight, nInnerTop, nOuterRight, nInnerBottom)); - if (nInnerBottom < nOuterBottom) - DrawRect ( - Rectangle (nOuterLeft, nInnerBottom, nOuterRight, nOuterBottom)); - - // Paint bevel border. - SetFillColor (); - SetLineColor (GetSettings().GetStyleSettings().GetShadowColor()); - if (maBorder.Top() > 0) - DrawLine ( - Point(nInnerLeft,nInnerTop), - Point(nInnerLeft,nInnerBottom)); - if (maBorder.Left() > 0) - DrawLine ( - Point(nInnerLeft,nInnerTop), - Point(nInnerRight,nInnerTop)); - SetLineColor (GetSettings().GetStyleSettings().GetLightColor()); - if (maBorder.Bottom() > 0) - DrawLine ( - Point(nInnerRight,nInnerBottom), - Point(nInnerLeft,nInnerBottom)); - if (maBorder.Right() > 0) - DrawLine ( - Point(nInnerRight,nInnerBottom), - Point(nInnerRight,nInnerTop)); - - // Paint title bar text. - SetLineColor (GetSettings().GetStyleSettings().GetActiveTextColor()); - SetFillColor (); - aTitleBarBox.Left() += 3; - DrawText (aTitleBarBox, msTitle, - TEXT_DRAW_LEFT - | TEXT_DRAW_VCENTER - | TEXT_DRAW_MULTILINE - | TEXT_DRAW_WORDBREAK); - - // Restore original values of the output device. - SetFont (rOriginalFont); - SetFillColor (aOriginalFillColor); -} - - - - -void PaneDockingWindow::InitializeTitleToolBox (void) -{ - if (mpTitleToolBox.get() == NULL) - { - // Initialize the title tool box. - mpTitleToolBox.reset (new ToolBox(this)); - mpTitleToolBox->SetSelectHdl ( - LINK(this, PaneDockingWindow, ToolboxSelectHandler)); - mpTitleToolBox->SetOutStyle (TOOLBOX_STYLE_FLAT); - mpTitleToolBox->SetBackground (Wallpaper ( - GetSettings().GetStyleSettings().GetDialogColor())); - mpTitleToolBox->Show(); - } - else - mpTitleToolBox->Clear(); - - // Get the closer bitmap and set it as right most button. - Bitmap aBitmap (SdResId (BMP_CLOSE_DOC)); - Bitmap aBitmapHC (SdResId (BMP_CLOSE_DOC_H)); - Image aImage = Image (aBitmap, Color (COL_LIGHTMAGENTA)); - Image aImageHC = Image (aBitmapHC, Color (BMP_COLOR_HIGHCONTRAST)); - mpTitleToolBox->InsertItem (1, - GetSettings().GetStyleSettings().GetHighContrastMode() - ? aImageHC - : aImage); - mpTitleToolBox->ShowItem (1); -} - - - - -USHORT PaneDockingWindow::AddMenu ( - const String& rsMenuName, - ULONG nHelpId, - const Link& rCallback) -{ - // Add the menu before the closer button. - USHORT nItemCount (mpTitleToolBox->GetItemCount()); - USHORT nItemId (nItemCount+1); - mpTitleToolBox->InsertItem ( - nItemId, - rsMenuName, - TIB_DROPDOWNONLY, - nItemCount>0 ? nItemCount-1 : (USHORT)-1); - mpTitleToolBox->SetHelpId( nItemId, nHelpId ); - mpTitleToolBox->SetClickHdl (rCallback); - mpTitleToolBox->SetDropdownClickHdl (rCallback); - - // The tool box has likely changed its size. The title bar has to be - // resized. - Resize(); - Invalidate(); - - return nItemCount+1; -} - - - - -IMPL_LINK(PaneDockingWindow, ToolboxSelectHandler, ToolBox*, pToolBox) -{ - USHORT nId = pToolBox->GetCurItemId(); - - if (nId == 1) - { - EndTracking(); - SfxBoolItem aVisibility (mnChildWindowId, FALSE); - GetBindings().GetDispatcher()->Execute ( - mnChildWindowId, - SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD, - &aVisibility, - NULL); - } - - return 0; -} - - - - -long PaneDockingWindow::Notify( NotifyEvent& rNEvt ) -{ - return SfxDockingWindow::Notify (rNEvt); -} - - - - ->>>>>>> other void PaneDockingWindow::StateChanged( StateChangedType nType ) { switch (nType) diff --git a/sd/source/ui/inc/PaneDockingWindow.hxx b/sd/source/ui/inc/PaneDockingWindow.hxx index a335c327de79..1874df10dd53 100755 --- a/sd/source/ui/inc/PaneDockingWindow.hxx +++ b/sd/source/ui/inc/PaneDockingWindow.hxx @@ -65,66 +65,6 @@ public: virtual ~PaneDockingWindow (void); virtual void StateChanged( StateChangedType nType ); - - virtual void DataChanged( const DataChangedEvent& rDCEvt ); - - /** Initializing the title tool box either creates a new title tool box - or clears all items from an existing one. A closer is added as only - item. - */ - void InitializeTitleToolBox (void); - - /** Add a top down menu to the title bar or rather the top-level menu - entry. The given callback is called when the menu is clicked and it - is the task of the callback to show the menu. - @return - The id of the new menu is returned. It can be compared by the - callback to the value of GetCurItemId() when called at the given - tool box. - */ - USHORT AddMenu (const String& rsMenuName, ULONG nHelpId, const Link& rCallback); - - ::Window* GetContentWindow (void); - - ::boost::shared_ptr GetTitleToolBox (void) const; - -private: - /** The pane which is represented by the docking window. - */ - ::rtl::OUString msPaneURL; - - /** Title that is shown at the top of the docking window. - */ - ::rtl::OUString msTitle; - - /** The tool box that is displayed in the window title area contains - menus and the closer button. - */ - ::boost::shared_ptr mpTitleToolBox; - - /** The border that is painted arround the inner window. The bevel - shadow lines are part of the border, so where the border is 0 no - such line is painted. - */ - SvBorder maBorder; - - sal_uInt16 mnChildWindowId; - - ::boost::scoped_ptr< ::Window> mpContentWindow; - - /** Remember that a layout is pending, i.e. Resize() has been called - since the last Paint(). - */ - bool mbIsLayoutPending; - - DECL_LINK(ToolboxSelectHandler, ToolBox*); - - /** This does the actual placing and sizing of the title bar and the - content window after the size of the docking window has changed. - This method is called from withing the Paint() method when since its - last invocation the size of the docking window has changed. - */ - void Layout (void); }; } // end of namespace ::sd -- cgit v1.2.3