From 278404c93ca1ac0909bed2eff267292b6f0bba1f Mon Sep 17 00:00:00 2001 From: os Date: Wed, 28 Jul 2010 14:04:43 +0200 Subject: #i85003# show disabled style name field for built-in styles (from simonaw) --- sfx2/inc/sfx2/mgetempl.hxx | 5 +++++ sfx2/source/dialog/mgetempl.cxx | 12 +++++++++++- sfx2/source/dialog/mgetempl.hrc | 1 + sfx2/source/dialog/mgetempl.src | 8 ++++++++ 4 files changed, 25 insertions(+), 1 deletion(-) diff --git a/sfx2/inc/sfx2/mgetempl.hxx b/sfx2/inc/sfx2/mgetempl.hxx index 8180a69766..1c775f5a4a 100644 --- a/sfx2/inc/sfx2/mgetempl.hxx +++ b/sfx2/inc/sfx2/mgetempl.hxx @@ -37,6 +37,9 @@ #include +#include +#include + /* erwartet: SID_TEMPLATE_NAME : In: StringItem, Name der Vorlage SID_TEMPLATE_FAMILY : In: Familie der Vorlage @@ -54,6 +57,8 @@ class SfxManageStyleSheetPage : public SfxTabPage { FixedText aNameFt; Edit aNameEd; + ExtMultiLineEdit aNameMLE; + CheckBox aAutoCB; FixedText aFollowFt; diff --git a/sfx2/source/dialog/mgetempl.cxx b/sfx2/source/dialog/mgetempl.cxx index 85ead19fec..a35f9c1d14 100644 --- a/sfx2/source/dialog/mgetempl.cxx +++ b/sfx2/source/dialog/mgetempl.cxx @@ -65,6 +65,7 @@ SfxManageStyleSheetPage::SfxManageStyleSheetPage( Window* pParent, const SfxItem aNameFt ( this, SfxResId( FT_NAME ) ), aNameEd ( this, SfxResId( ED_NAME ) ), + aNameMLE ( this, SfxResId( MLE_NAME ) ), aAutoCB ( this, SfxResId( CB_AUTO ) ), aFollowFt ( this, SfxResId( FT_NEXT ) ), @@ -147,8 +148,17 @@ SfxManageStyleSheetPage::SfxManageStyleSheetPage( Window* pParent, const SfxItem } aNameEd.SetText(pStyle->GetName()); - if ( !pStyle->IsUserDefined() ) + // Set the field read-only if it is NOT an user-defined style + // but allow selecting and copying + if ( !pStyle->IsUserDefined() ) { aNameEd.SetReadOnly(); + aNameEd.Hide(); + + aNameMLE.SetControlBackground( GetSettings().GetStyleSettings().GetDialogColor() ); + aNameMLE.SetText( pStyle->GetName() ); + aNameMLE.EnableCursor( FALSE ); + aNameMLE.Show(); + } if ( pStyle->HasFollowSupport() && pPool ) { diff --git a/sfx2/source/dialog/mgetempl.hrc b/sfx2/source/dialog/mgetempl.hrc index 950b748a88..cb07f9436b 100644 --- a/sfx2/source/dialog/mgetempl.hrc +++ b/sfx2/source/dialog/mgetempl.hrc @@ -25,6 +25,7 @@ * ************************************************************************/ #define ED_NAME 2 +#define MLE_NAME 13 #define LB_NEXT 4 #define FT_BASE 5 #define LB_BASE 6 diff --git a/sfx2/source/dialog/mgetempl.src b/sfx2/source/dialog/mgetempl.src index 49cfb04cd0..177604f9a6 100644 --- a/sfx2/source/dialog/mgetempl.src +++ b/sfx2/source/dialog/mgetempl.src @@ -48,6 +48,14 @@ TabPage TP_MANAGE_STYLES Pos = MAP_APPFONT ( 70 , 6 ) ; Size = MAP_APPFONT ( 184 , 12 ) ; }; + MultiLineEdit MLE_NAME + { + Pos = MAP_APPFONT ( 70 , 8 ) ; + Size = MAP_APPFONT ( 80 , 12 ) ; + Border = FALSE; + ReadOnly = TRUE; + Hide = TRUE; + }; CheckBox CB_AUTO { Pos = MAP_APPFONT ( 164 , 8 ) ; -- cgit v1.2.3 From 769113264aab7e6a82e139ac05c735b132e3521f Mon Sep 17 00:00:00 2001 From: os Date: Thu, 29 Jul 2010 08:48:43 +0200 Subject: #i100037# command names added, duplicate DeleteNote/DeleteComment removed --- .../registry/data/org/openoffice/Office/UI/GenericCommands.xcu | 7 ++++++- .../registry/data/org/openoffice/Office/UI/WriterCommands.xcu | 10 ++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu index dd8a0a1047..fccda676d3 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu @@ -5206,7 +5206,12 @@ Delete All Comments by This Author - + + + Reply Comment + + + Delete Comment diff --git a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu index 4fa236666b..465c6b37c0 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu @@ -166,6 +166,16 @@ ~Protect Records... + + + Reject Change + + + + + Accept Change + + ~Links -- cgit v1.2.3 From f82f845749ff39b8d3ca8dfaa39c82117359e81e Mon Sep 17 00:00:00 2001 From: os Date: Tue, 5 Oct 2010 09:47:37 +0200 Subject: #i114081# SID_MAIL_PREPAREEXPORT re-implemented --- sfx2/inc/sfx2/sfxsids.hrc | 2 + sfx2/source/dialog/mailmodel.cxx | 139 ++++++++++++++++++++++-------- shell/source/win32/simplemail/senddoc.cxx | 2 +- svx/sdi/svx.sdi | 28 ++++++ 4 files changed, 136 insertions(+), 35 deletions(-) diff --git a/sfx2/inc/sfx2/sfxsids.hrc b/sfx2/inc/sfx2/sfxsids.hrc index 457dbad41c..675312258f 100644 --- a/sfx2/inc/sfx2/sfxsids.hrc +++ b/sfx2/inc/sfx2/sfxsids.hrc @@ -93,6 +93,8 @@ #define SID_MAIL_PRIORITY (SID_SFX_START + 337) #define SID_MAIL_ATTACH_FILE (SID_SFX_START + 375) +#define SID_MAIL_PREPAREEXPORT (SID_SFX_START + 385) +#define SID_MAIL_NEEDS_PREPAREEXPORT (SID_SFX_START + 386) #define SID_MAIL_EXPORT_FINISHED (SID_SFX_START + 388) #define SID_WEBHTML (SID_SFX_START + 393) diff --git a/sfx2/source/dialog/mailmodel.cxx b/sfx2/source/dialog/mailmodel.cxx index cea40e602d..dbc196c311 100644 --- a/sfx2/source/dialog/mailmodel.cxx +++ b/sfx2/source/dialog/mailmodel.cxx @@ -53,13 +53,11 @@ #include #include #include +#include #include #include #include -#ifndef _RTL_TEXTENC_H -#include -#endif #include #include #include @@ -84,6 +82,7 @@ #include #include #include +#include // -------------------------------------------------------------- using namespace ::com::sun::star; @@ -98,6 +97,54 @@ using namespace ::com::sun::star::system; using namespace ::rtl; namespace css = ::com::sun::star; +// - class PrepareListener_Impl ------------------------------------------ +class PrepareListener_Impl : public ::cppu::WeakImplHelper1< css::frame::XStatusListener > +{ + bool m_bState; +public: + PrepareListener_Impl(); + virtual ~PrepareListener_Impl(); + + // css.frame.XStatusListener + virtual void SAL_CALL statusChanged(const css::frame::FeatureStateEvent& aEvent) + throw(css::uno::RuntimeException); + + // css.lang.XEventListener + virtual void SAL_CALL disposing(const css::lang::EventObject& aEvent) + throw(css::uno::RuntimeException); + + bool IsSet() const {return m_bState;} +}; + +/*-- 25.08.2010 14:32:49--------------------------------------------------- + + -----------------------------------------------------------------------*/ +PrepareListener_Impl::PrepareListener_Impl() : + m_bState( false ) +{ +} +/*-- 25.08.2010 14:32:51--------------------------------------------------- + + -----------------------------------------------------------------------*/ +PrepareListener_Impl::~PrepareListener_Impl() +{ +} +/*-- 25.08.2010 14:32:51--------------------------------------------------- + + -----------------------------------------------------------------------*/ +void PrepareListener_Impl::statusChanged(const css::frame::FeatureStateEvent& rEvent) throw(css::uno::RuntimeException) +{ + if( rEvent.IsEnabled ) + rEvent.State >>= m_bState; + else + m_bState = sal_False; +} +/*-- 25.08.2010 14:32:52--------------------------------------------------- + + -----------------------------------------------------------------------*/ +void PrepareListener_Impl::disposing(const css::lang::EventObject& /*rEvent*/) throw(css::uno::RuntimeException) +{ +} // class AddressList_Impl ------------------------------------------------ @@ -547,46 +594,68 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat( aArgs[nNumArgs-1].Value = css::uno::makeAny( aPassword ); } - if ( bModified || !bHasLocation || bStoreTo ) + bool bNeedsPreparation = false; + css::util::URL aPrepareURL; + css::uno::Reference< css::frame::XDispatch > xPrepareDispatch; + css::uno::Reference< css::frame::XDispatchProvider > xDispatchProvider( xFrame, css::uno::UNO_QUERY ); + css::uno::Reference< css::util::XURLTransformer > xURLTransformer( + xSMGR->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.util.URLTransformer" ))), + css::uno::UNO_QUERY ); + if( !bSendAsPDF ) { - // Document is modified, is newly created or should be stored in a special format try { - css::uno::Reference< css::util::XURLTransformer > xURLTransformer( - xSMGR->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.util.URLTransformer" ))), - css::uno::UNO_QUERY ); + // check if the document needs to be prepared for sending as mail (embedding of links, removal of invisible content) - css::uno::Reference< css::frame::XDispatchProvider > xDispatchProvider( xFrame, css::uno::UNO_QUERY ); - css::uno::Reference< css::frame::XDispatch > xDispatch; - - css::util::URL aURL; - css::uno::Sequence< css::beans::PropertyValue > aDispatchArgs; + if ( xURLTransformer.is() ) + { + aPrepareURL.Complete = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:PrepareMailExport" )); + xURLTransformer->parseStrict( aPrepareURL ); + } - if( !bSendAsPDF ) + if ( xDispatchProvider.is() ) { - if ( xURLTransformer.is() ) + xPrepareDispatch = css::uno::Reference< css::frame::XDispatch >( + xDispatchProvider->queryDispatch( aPrepareURL, ::rtl::OUString(), 0 )); + if ( xPrepareDispatch.is() ) { - aURL.Complete = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:PrepareMailExport" )); - xURLTransformer->parseStrict( aURL ); + PrepareListener_Impl* pPrepareListener; + uno::Reference< css::frame::XStatusListener > xStatusListener = pPrepareListener = new PrepareListener_Impl; + xPrepareDispatch->addStatusListener( xStatusListener, aPrepareURL ); + bNeedsPreparation = pPrepareListener->IsSet(); + xPrepareDispatch->removeStatusListener( xStatusListener, aPrepareURL ); } - - if ( xDispatchProvider.is() ) + } + } + catch ( css::uno::RuntimeException& ) + { + throw; + } + catch ( css::uno::Exception& ) + { + } + } + + if ( bModified || !bHasLocation || bStoreTo || bNeedsPreparation ) + { + // Document is modified, is newly created or should be stored in a special format + try + { + if( bNeedsPreparation && xPrepareDispatch.is() ) + { + if ( xPrepareDispatch.is() ) { - xDispatch = css::uno::Reference< css::frame::XDispatch >( - xDispatchProvider->queryDispatch( aURL, ::rtl::OUString(), 0 )); - if ( xDispatch.is() ) + try + { + css::uno::Sequence< css::beans::PropertyValue > aDispatchArgs; + xPrepareDispatch->dispatch( aPrepareURL, aDispatchArgs ); + } + catch ( css::uno::RuntimeException& ) + { + throw; + } + catch ( css::uno::Exception& ) { - try - { - xDispatch->dispatch( aURL, aDispatchArgs ); - } - catch ( css::uno::RuntimeException& ) - { - throw; - } - catch ( css::uno::Exception& ) - { - } } } } @@ -608,6 +677,7 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat( if( !bSendAsPDF ) { + css::util::URL aURL; // #i30432# notify that export is finished - the Writer may want to restore removed content if ( xURLTransformer.is() ) { @@ -617,12 +687,13 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat( if ( xDispatchProvider.is() ) { - xDispatch = css::uno::Reference< css::frame::XDispatch >( + css::uno::Reference< css::frame::XDispatch > xDispatch = css::uno::Reference< css::frame::XDispatch >( xDispatchProvider->queryDispatch( aURL, ::rtl::OUString(), 0 )); if ( xDispatch.is() ) { try { + css::uno::Sequence< css::beans::PropertyValue > aDispatchArgs; xDispatch->dispatch( aURL, aDispatchArgs ); } catch ( css::uno::RuntimeException& ) diff --git a/shell/source/win32/simplemail/senddoc.cxx b/shell/source/win32/simplemail/senddoc.cxx index 42f5b9e244..b904902ee4 100644 --- a/shell/source/win32/simplemail/senddoc.cxx +++ b/shell/source/win32/simplemail/senddoc.cxx @@ -170,7 +170,7 @@ void initMapiMessage( pMapiMessage->lpszSubject = const_cast(gSubject.c_str()); pMapiMessage->lpszNoteText = (gBody.length() ? const_cast(gBody.c_str()) : NULL); pMapiMessage->lpOriginator = aMapiOriginator; - pMapiMessage->lpRecips = &aMapiRecipientList[0]; + pMapiMessage->lpRecips = aMapiRecipientList.size() ? &aMapiRecipientList[0] : 0; pMapiMessage->nRecipCount = aMapiRecipientList.size(); pMapiMessage->lpFiles = &aMapiAttachmentList[0]; pMapiMessage->nFileCount = aMapiAttachmentList.size(); diff --git a/svx/sdi/svx.sdi b/svx/sdi/svx.sdi index c5069ad2eb..93c02a1fbf 100644 --- a/svx/sdi/svx.sdi +++ b/svx/sdi/svx.sdi @@ -15135,3 +15135,31 @@ SfxVoidItem InsertRowDialog SID_TABLE_INSERT_ROW_DLG ToolBoxConfig = FALSE, GroupId = GID_TABLE; ] +//-------------------------------------------------------------------------- +SfxVoidItem PrepareMailExport SID_MAIL_PREPAREEXPORT +() +[ + /* flags: */ + AutoUpdate = FALSE, + Cachable = Cachable, + FastCall = FALSE, + HasCoreId = FALSE, + HasDialog = FALSE, + ReadOnlyDoc = FALSE, + Toggle = FALSE, + Container = FALSE, + RecordAbsolute = FALSE, + RecordPerSet; + Synchron; + + /* status: */ + SlotType = SfxBoolItem + + /* config: */ + AccelConfig = FALSE, + MenuConfig = FALSE, + StatusBarConfig = FALSE, + ToolBoxConfig = FALSE, + GroupId = GID_EXPLORER; +] + -- cgit v1.2.3