diff options
author | Armin Le Grand <Armin.Le.Grand@Sun.COM> | 2009-12-21 20:40:13 +0100 |
---|---|---|
committer | Armin Le Grand <Armin.Le.Grand@Sun.COM> | 2009-12-21 20:40:13 +0100 |
commit | aa009b1d9a3a8b691e01e9c28db0adcae84cbafc (patch) | |
tree | 980567c28bd94ea0f35a36c588a3cfc44a7f9f02 /sd/source/ui/view | |
parent | 2546b368921c771c4336e6db18543497389eaab7 (diff) | |
parent | eb86211c1db0bb492669e7ac8302b89254ed4793 (diff) |
aw078: resync to DEV300m68for integration
Diffstat (limited to 'sd/source/ui/view')
37 files changed, 203 insertions, 178 deletions
diff --git a/sd/source/ui/view/GraphicObjectBar.cxx b/sd/source/ui/view/GraphicObjectBar.cxx index 9e34bc4e3f39..32f5de8594ba 100644 --- a/sd/source/ui/view/GraphicObjectBar.cxx +++ b/sd/source/ui/view/GraphicObjectBar.cxx @@ -35,8 +35,8 @@ #include <limits.h> #include <vcl/msgbox.hxx> -#include <svtools/whiter.hxx> -#include <svtools/itempool.hxx> +#include <svl/whiter.hxx> +#include <svl/itempool.hxx> #include <sfx2/app.hxx> #include <sfx2/shell.hxx> #include <svx/svxids.hrc> @@ -44,7 +44,7 @@ #include <sfx2/basedlgs.hxx> #include <svx/svdograf.hxx> #include <svx/grfflt.hxx> -#include <svtools/aeitem.hxx> +#include <svl/aeitem.hxx> #include <svx/grafctrl.hxx> diff --git a/sd/source/ui/view/MediaObjectBar.cxx b/sd/source/ui/view/MediaObjectBar.cxx index c05c55c0d6de..510d4a6fccca 100644 --- a/sd/source/ui/view/MediaObjectBar.cxx +++ b/sd/source/ui/view/MediaObjectBar.cxx @@ -38,8 +38,8 @@ #include <sfx2/sfxsids.hrc> #include <sfx2/request.hxx> #include <sfx2/objface.hxx> -#include <svtools/whiter.hxx> -#include <svtools/itempool.hxx> +#include <svl/whiter.hxx> +#include <svl/itempool.hxx> #include <svx/svdomedia.hxx> #include <svx/sdr/contact/viewcontactofsdrmediaobj.hxx> diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx index 233976585e58..a672ce978233 100644 --- a/sd/source/ui/view/Outliner.cxx +++ b/sd/source/ui/view/Outliner.cxx @@ -56,8 +56,8 @@ #include <svx/eeitem.hxx> #include <svx/forbiddencharacterstable.hxx> #include <svx/srchdlg.hxx> -#include <svtools/linguprops.hxx> -#include <svtools/lingucfg.hxx> +#include <unotools/linguprops.hxx> +#include <unotools/lingucfg.hxx> #include <svx/editeng.hxx> #include <vcl/metric.hxx> #include <sfx2/viewfrm.hxx> @@ -334,6 +334,9 @@ void Outliner::EndSpelling (void) { if (mbViewShellValid) { + // Keep old view shell alive until we release the outliner view. + ::boost::shared_ptr<ViewShell> pOldViewShell (mpViewShell); + ViewShellBase* pBase = PTR_CAST(ViewShellBase,SfxViewShell::Current()); if (pBase != NULL) mpViewShell = pBase->GetMainViewShell(); diff --git a/sd/source/ui/view/PrintManager.cxx b/sd/source/ui/view/PrintManager.cxx index 04e8df44385c..6d24fdf98e79 100644 --- a/sd/source/ui/view/PrintManager.cxx +++ b/sd/source/ui/view/PrintManager.cxx @@ -53,7 +53,7 @@ #include <sfx2/progress.hxx> #include <svtools/printdlg.hxx> #include <tools/multisel.hxx> -#include <svtools/misccfg.hxx> +#include <unotools/misccfg.hxx> #include <unotools/localedatawrapper.hxx> #include <svx/prtqry.hxx> #include "WindowUpdater.hxx" @@ -72,7 +72,7 @@ #include "printdlg.hrc" #include "prntopts.hrc" #include "app.hrc" -#include <svtools/intitem.hxx> +#include <svl/intitem.hxx> #include <svx/paperinf.hxx> #include <svx/xlnclit.hxx> #include "printdialog.hxx" @@ -369,7 +369,7 @@ USHORT PrintManager::Print (SfxProgress& rProgress, BOOL bIsAPI, PrintDialog* p if( pPrintOpts ) { - SfxMiscCfg* pMisc = SFX_APP()->GetMiscConfig(); + ::utl::MiscCfg aMisc; if( pPrintOpts->GetOptionsPrint().IsDate() ) { @@ -399,9 +399,9 @@ USHORT PrintManager::Print (SfxProgress& rProgress, BOOL bIsAPI, PrintDialog* p ePageKind = PK_NOTES; } - pPrintOpts->GetOptionsPrint().SetWarningPrinter( pMisc->IsNotFoundWarning() ); - pPrintOpts->GetOptionsPrint().SetWarningSize( pMisc->IsPaperSizeWarning() ); - pPrintOpts->GetOptionsPrint().SetWarningOrientation( pMisc->IsPaperOrientationWarning() ); + pPrintOpts->GetOptionsPrint().SetWarningPrinter( aMisc.IsNotFoundWarning() ); + pPrintOpts->GetOptionsPrint().SetWarningSize( aMisc.IsPaperSizeWarning() ); + pPrintOpts->GetOptionsPrint().SetWarningOrientation( aMisc.IsPaperOrientationWarning() ); UINT16 nQuality = pPrintOpts->GetOptionsPrint().GetOutputQuality(); ULONG nMode = DRAWMODE_DEFAULT; diff --git a/sd/source/ui/view/ToolBarManager.cxx b/sd/source/ui/view/ToolBarManager.cxx index 286132c304c0..487794816270 100644 --- a/sd/source/ui/view/ToolBarManager.cxx +++ b/sd/source/ui/view/ToolBarManager.cxx @@ -49,7 +49,7 @@ #include <sfx2/objsh.hxx> #include <sfx2/request.hxx> #include <sfx2/viewfrm.hxx> -#include <svtools/eitem.hxx> +#include <svl/eitem.hxx> #include <svx/dialogs.hrc> #include <svx/extrusionbar.hxx> #include <svx/fontworkbar.hxx> diff --git a/sd/source/ui/view/ViewShellBase.cxx b/sd/source/ui/view/ViewShellBase.cxx index 25fca9e0bae7..3e0f6297f8d6 100644 --- a/sd/source/ui/view/ViewShellBase.cxx +++ b/sd/source/ui/view/ViewShellBase.cxx @@ -31,6 +31,13 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sd.hxx" +#include <comphelper/processfactory.hxx> + +#include <com/sun/star/frame/UnknownModuleException.hpp>
+#include <com/sun/star/frame/XModuleManager.hpp>
+#include <com/sun/star/container/XNameAccess.hpp> +#include <com/sun/star/beans/PropertyValue.hpp> + #include "ViewShellBase.hxx" #include <algorithm> #include "EventMultiplexer.hxx" @@ -83,7 +90,7 @@ #include <sfx2/msg.hxx> #include <sfx2/objface.hxx> #include <sfx2/viewfrm.hxx> -#include <svtools/whiter.hxx> +#include <svl/whiter.hxx> #include <comphelper/processfactory.hxx> #include "fubullet.hxx" @@ -94,6 +101,11 @@ using namespace sd; using ::sd::framework::FrameworkHelper; using ::rtl::OUString; +using namespace com::sun::star::uno; +using namespace com::sun::star::frame; +using namespace com::sun::star::container; +using namespace com::sun::star::lang; +using namespace com::sun::star::beans; namespace { @@ -1210,6 +1222,47 @@ CustomHandleManager& ViewShellBase::getCustomHandleManager() const return *mpImpl->mpCustomHandleManager.get(); } +::rtl::OUString ViewShellBase::RetrieveLabelFromCommand( const ::rtl::OUString& aCmdURL ) const
+{
+ ::rtl::OUString aLabel;
+ + if ( aCmdURL.getLength() > 0 ) try
+ {
+ Reference< XMultiServiceFactory > xServiceManager( ::comphelper::getProcessServiceFactory(), UNO_QUERY_THROW ); +
+ Reference< XModuleManager > xModuleManager( xServiceManager->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.ModuleManager") ) ), UNO_QUERY_THROW ); + Reference< XInterface > xIfac( GetMainViewShell()->GetViewFrame()->GetFrame()->GetFrameInterface(), UNO_QUERY_THROW ); +
+ ::rtl::OUString aModuleIdentifier( xModuleManager->identify( xIfac ) );
+
+ if( aModuleIdentifier.getLength() > 0 )
+ {
+ Reference< XNameAccess > xNameAccess( xServiceManager->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.UICommandDescription" ) ) ), UNO_QUERY );
+ if( xNameAccess.is() )
+ {
+ Reference< ::com::sun::star::container::XNameAccess > m_xUICommandLabels( xNameAccess->getByName( aModuleIdentifier ), UNO_QUERY_THROW );
+ Sequence< PropertyValue > aPropSeq;
+ if( m_xUICommandLabels->getByName( aCmdURL ) >>= aPropSeq )
+ {
+ for( sal_Int32 i = 0; i < aPropSeq.getLength(); i++ )
+ {
+ if( aPropSeq[i].Name.equalsAscii( "Name" ))
+ {
+ aPropSeq[i].Value >>= aLabel;
+ break;
+ }
+ }
+ }
+ }
+ }
+ }
+ catch ( Exception& )
+ {
+ }
+
+ return aLabel;
+}
+ //===== ViewShellBase::Implementation ========================================= diff --git a/sd/source/ui/view/ViewShellImplementation.cxx b/sd/source/ui/view/ViewShellImplementation.cxx index 3afef14deeed..75b728c7849b 100644 --- a/sd/source/ui/view/ViewShellImplementation.cxx +++ b/sd/source/ui/view/ViewShellImplementation.cxx @@ -60,7 +60,7 @@ #include <sfx2/bindings.hxx> #include <sfx2/dispatch.hxx> #include <sfx2/request.hxx> -#include <svtools/aeitem.hxx> +#include <svl/aeitem.hxx> #include <svx/imapdlg.hxx> #include <vcl/msgbox.hxx> #include <basic/sbstar.hxx> diff --git a/sd/source/ui/view/WindowUpdater.cxx b/sd/source/ui/view/WindowUpdater.cxx index 64e93aee785e..135c6974f64e 100644 --- a/sd/source/ui/view/WindowUpdater.cxx +++ b/sd/source/ui/view/WindowUpdater.cxx @@ -42,7 +42,7 @@ #endif #include <sfx2/childwin.hxx> #include <sfx2/viewfrm.hxx> -#include <svtools/smplhint.hxx> +#include <svl/smplhint.hxx> #include <algorithm> @@ -52,7 +52,7 @@ WindowUpdater::WindowUpdater (void) : mpViewShell (NULL), mpDocument (NULL) { - StartListening (maCTLOptions); + maCTLOptions.AddListener(this); } @@ -60,7 +60,7 @@ WindowUpdater::WindowUpdater (void) WindowUpdater::~WindowUpdater (void) throw () { - EndListening (maCTLOptions); + maCTLOptions.RemoveListener(this); } @@ -163,33 +163,29 @@ void WindowUpdater::UpdateWindow (OutputDevice* pDevice) const -void WindowUpdater::Notify (SfxBroadcaster&, const SfxHint& rHint) +void WindowUpdater::ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uInt32 ) { - const SfxSimpleHint& rSimpleHint = static_cast<const SfxSimpleHint&>(rHint); - if (rSimpleHint.GetId() == SFX_HINT_CTL_SETTINGS_CHANGED) - { - // #110094#-7 - // Clear the master page cache so that master pages will be redrawn. - //if (mpViewShell != NULL) - //{ - // SdView* pView = mpViewShell->GetView(); - // if (pView != NULL) - // pView->ReleaseMasterPagePaintCache (); - //} - // Set the current state at all registered output devices. - tWindowList::iterator aWindowIterator (maWindowList.begin()); - while (aWindowIterator != maWindowList.end()) - Update (*aWindowIterator++); - - // Reformat the document for the modified state to take effect. - if (mpDocument != NULL) - mpDocument->ReformatAllTextObjects(); - - // Invalidate the windows to make the modified state visible. - aWindowIterator = maWindowList.begin(); - while (aWindowIterator != maWindowList.end()) - (*aWindowIterator++)->Invalidate(); - } + // #110094#-7 + // Clear the master page cache so that master pages will be redrawn. + //if (mpViewShell != NULL) + //{ + // SdView* pView = mpViewShell->GetView(); + // if (pView != NULL) + // pView->ReleaseMasterPagePaintCache (); + //} + // Set the current state at all registered output devices. + tWindowList::iterator aWindowIterator (maWindowList.begin()); + while (aWindowIterator != maWindowList.end()) + Update (*aWindowIterator++); + + // Reformat the document for the modified state to take effect. + if (mpDocument != NULL) + mpDocument->ReformatAllTextObjects(); + + // Invalidate the windows to make the modified state visible. + aWindowIterator = maWindowList.begin(); + while (aWindowIterator != maWindowList.end()) + (*aWindowIterator++)->Invalidate(); } diff --git a/sd/source/ui/view/drawview.cxx b/sd/source/ui/view/drawview.cxx index 45a22dd9f56b..dfbd76e4a3b6 100644 --- a/sd/source/ui/view/drawview.cxx +++ b/sd/source/ui/view/drawview.cxx @@ -36,7 +36,7 @@ #endif #include <svx/svdpagv.hxx> #include <sfx2/request.hxx> -#include <svtools/style.hxx> +#include <svl/style.hxx> #include <svx/outliner.hxx> #ifndef _VIEW3D_HXX //autogen #include <svx/view3d.hxx> @@ -48,12 +48,12 @@ #include <svx/svdograf.hxx> #include <svx/svdogrp.hxx> #include <svx/svdorect.hxx> -#include <svtools/poolitem.hxx> +#include <svl/poolitem.hxx> #include <svx/eeitem.hxx> #include <svx/bulitem.hxx> -#include <svtools/itempool.hxx> +#include <svl/itempool.hxx> #include <svx/numitem.hxx> -#include <svtools/whiter.hxx> +#include <svl/whiter.hxx> #include <sfx2/viewfrm.hxx> #include <sfx2/objface.hxx> diff --git a/sd/source/ui/view/drbezob.cxx b/sd/source/ui/view/drbezob.cxx index a638af2638c3..463c7415e853 100644 --- a/sd/source/ui/view/drbezob.cxx +++ b/sd/source/ui/view/drbezob.cxx @@ -39,10 +39,10 @@ #include <sfx2/objface.hxx> #include <svx/svxids.hrc> -#include <svtools/eitem.hxx> +#include <svl/eitem.hxx> #include <sfx2/request.hxx> #include <svx/svdopath.hxx> -#include <svtools/aeitem.hxx> +#include <svl/aeitem.hxx> #include <svx/svdundo.hxx> #include <sfx2/dispatch.hxx> diff --git a/sd/source/ui/view/drtxtob.cxx b/sd/source/ui/view/drtxtob.cxx index 55980ff02050..5a2b458341c9 100644 --- a/sd/source/ui/view/drtxtob.cxx +++ b/sd/source/ui/view/drtxtob.cxx @@ -39,14 +39,14 @@ #include <svx/adjitem.hxx> #include <vcl/vclenum.hxx> #include <sfx2/app.hxx> -#include <svtools/whiter.hxx> -#include <svtools/itempool.hxx> -#include <svtools/style.hxx> -#include <svtools/languageoptions.hxx> +#include <svl/whiter.hxx> +#include <svl/itempool.hxx> +#include <svl/style.hxx> +#include <svl/languageoptions.hxx> #include <sfx2/tplpitem.hxx> #include <svx/escpitem.hxx> #include <svx/svdoutl.hxx> -#include <svtools/intitem.hxx> +#include <svl/intitem.hxx> #include <svx/scripttypeitem.hxx> #include <svx/outlobj.hxx> #include <svx/writingmodeitem.hxx> diff --git a/sd/source/ui/view/drtxtob1.cxx b/sd/source/ui/view/drtxtob1.cxx index 9c2733c933dd..2a29ecbc6d6c 100644 --- a/sd/source/ui/view/drtxtob1.cxx +++ b/sd/source/ui/view/drtxtob1.cxx @@ -46,9 +46,9 @@ #endif #include <vcl/vclenum.hxx> #include <sfx2/app.hxx> -#include <svtools/whiter.hxx> -#include <svtools/itempool.hxx> -#include <svtools/style.hxx> +#include <svl/whiter.hxx> +#include <svl/itempool.hxx> +#include <svl/style.hxx> #include <sfx2/tplpitem.hxx> #include <sfx2/request.hxx> #include <sfx2/viewfrm.hxx> @@ -65,14 +65,14 @@ #include <svx/outlobj.hxx> #include <svx/flstitem.hxx> #include <svx/editeng.hxx> -#include <svtools/intitem.hxx> +#include <svl/intitem.hxx> #ifndef _SVX_SRIPTTYPEITEM_HXX //autogen #include <svx/scripttypeitem.hxx> #endif #include <svx/svdoutl.hxx> #include <svx/writingmodeitem.hxx> #include <svx/frmdiritem.hxx> -#include <svtools/itemiter.hxx> +#include <svl/itemiter.hxx> #include "app.hrc" diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx index 27d5f6202369..12b81a01d3ba 100644 --- a/sd/source/ui/view/drviews2.cxx +++ b/sd/source/ui/view/drviews2.cxx @@ -52,7 +52,7 @@ #include <sfx2/dispatch.hxx> #include <svx/xfillit0.hxx> #include <svx/xflclit.hxx> -#include <svtools/aeitem.hxx> +#include <svl/aeitem.hxx> #include <svx/eeitem.hxx> #include <basic/sbstar.hxx> #include <svx/flditem.hxx> @@ -467,7 +467,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); DBG_ASSERT(pFact, "Dialogdiet fail!"); - AbstractSvxNameDialog* aNameDlg = pFact->CreateSvxNameDialog( GetActiveWindow(), aPageName, aDescr, RID_SVXDLG_NAME ); + AbstractSvxNameDialog* aNameDlg = pFact->CreateSvxNameDialog( GetActiveWindow(), aPageName, aDescr ); DBG_ASSERT(aNameDlg, "Dialogdiet fail!"); aNameDlg->SetText( aTitle ); aNameDlg->SetCheckNameHdl( LINK( this, DrawViewShell, RenameSlideHdl ), true ); diff --git a/sd/source/ui/view/drviews3.cxx b/sd/source/ui/view/drviews3.cxx index 87374cce8c04..54e0f37a1b19 100644 --- a/sd/source/ui/view/drviews3.cxx +++ b/sd/source/ui/view/drviews3.cxx @@ -51,13 +51,13 @@ #include <sfx2/request.hxx> #include <sfx2/dispatch.hxx> #include <tools/urlobj.hxx> -#include <svtools/aeitem.hxx> -#include <svtools/eitem.hxx> -#include <svtools/rectitem.hxx> -#include <svtools/stritem.hxx> +#include <svl/aeitem.hxx> +#include <svl/eitem.hxx> +#include <svl/rectitem.hxx> +#include <svl/stritem.hxx> #include <svx/svdoole2.hxx> -#include <svtools/itempool.hxx> -#include <svtools/ptitem.hxx> +#include <svl/itempool.hxx> +#include <svl/ptitem.hxx> #include <basic/sbstar.hxx> #include <basic/sberrors.hxx> #include <svx/fmshell.hxx> diff --git a/sd/source/ui/view/drviews4.cxx b/sd/source/ui/view/drviews4.cxx index 85706fb9cbb6..52a0a2e6b3cb 100644 --- a/sd/source/ui/view/drviews4.cxx +++ b/sd/source/ui/view/drviews4.cxx @@ -35,7 +35,7 @@ #include "DrawViewShell.hxx" #include <vcl/msgbox.hxx> -#include <svtools/urlbmk.hxx> +#include <svl/urlbmk.hxx> #include <svx/svdpagv.hxx> #include <svx/svdundo.hxx> #include <svx/fmglob.hxx> diff --git a/sd/source/ui/view/drviews6.cxx b/sd/source/ui/view/drviews6.cxx index 8c10effa061b..d89bb43a0098 100644 --- a/sd/source/ui/view/drviews6.cxx +++ b/sd/source/ui/view/drviews6.cxx @@ -81,12 +81,8 @@ #include "fusumry.hxx" #include "fucushow.hxx" #include "drawview.hxx" -#ifndef SD_FRAME_VIEW #include "FrameView.hxx" -#endif #include "Window.hxx" -#include "fuformatpaintbrush.hxx" -#include "formatclipboard.hxx" #include "DrawDocShell.hxx" #include "TaskPaneViewShell.hxx" #include "framework/FrameworkHelper.hxx" @@ -501,35 +497,6 @@ void DrawViewShell::FuTemp04(SfxRequest& rReq) USHORT nSId = rReq.GetSlot(); switch( nSId ) { - case SID_FORMATPAINTBRUSH: - { - SdFormatClipboard* pFormatClipboard = GetDocSh()->mpFormatClipboard; - if(pFormatClipboard) - { - if( pFormatClipboard->HasContent() ) - { - pFormatClipboard->Erase(); - GetViewFrame()->GetBindings().Invalidate(SID_FORMATPAINTBRUSH); - Cancel(); - rReq.Ignore (); - } - else - { - bool bPersistentCopy = false; - const SfxItemSet *pArgs = rReq.GetArgs(); - if( pArgs && pArgs->Count() >= 1 ) - { - bPersistentCopy = static_cast<bool>(((SfxBoolItem &)pArgs->Get( - SID_FORMATPAINTBRUSH)).GetValue()); - } - - pFormatClipboard->Copy( *mpDrawView, bPersistentCopy ); - SetCurrentFunction( FuFormatPaintBrush::Create( this, GetActiveWindow(), mpDrawView, GetDoc(), rReq ) ); - GetViewFrame()->GetBindings().Invalidate(SID_FORMATPAINTBRUSH); - } - } - } - break; case SID_FONTWORK: { if ( rReq.GetArgs() ) diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx index 983033be7b8c..cc7fd3106fa2 100644 --- a/sd/source/ui/view/drviews7.cxx +++ b/sd/source/ui/view/drviews7.cxx @@ -46,11 +46,11 @@ #include <svx/svdpagv.hxx> #include <svx/clipfmtitem.hxx> #include <svx/fmshell.hxx> -#include <svtools/eitem.hxx> -#include <svtools/aeitem.hxx> -#include <svtools/stritem.hxx> -#include <svtools/visitem.hxx> -#include <svtools/whiter.hxx> +#include <svl/eitem.hxx> +#include <svl/aeitem.hxx> +#include <svl/stritem.hxx> +#include <svl/visitem.hxx> +#include <svl/whiter.hxx> #include <sfx2/dispatch.hxx> #include <svx/svdograf.hxx> #include <svx/unolingu.hxx> @@ -58,11 +58,11 @@ #include <svx/fontworkbar.hxx> // #UndoRedo# -#include <svtools/slstitm.hxx> +#include <svl/slstitm.hxx> #include <sfx2/app.hxx> #include <svtools/insdlg.hxx> -#include <svtools/moduleoptions.hxx> -#include <svtools/languageoptions.hxx> +#include <unotools/moduleoptions.hxx> +#include <svl/languageoptions.hxx> #include <comphelper/processfactory.hxx> #include <sfx2/request.hxx> @@ -87,7 +87,6 @@ #include "zoomlist.hxx" #include "slideshow.hxx" #include "drawview.hxx" -#include "formatclipboard.hxx" #include "ViewShellBase.hxx" #include "ViewShellManager.hxx" #include "LayerTabBar.hxx" @@ -95,6 +94,7 @@ #include "Window.hxx" #include "fuediglu.hxx" #include "fubullet.hxx" +#include "fuformatpaintbrush.hxx" using ::rtl::OUString; using namespace ::com::sun::star; @@ -249,19 +249,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) const ULONG nMarkCount = rMarkList.GetMarkCount(); //format paintbrush - { - SdFormatClipboard* pFormatClipboard = GetDocSh()->mpFormatClipboard; - bool bHasContent = pFormatClipboard && pFormatClipboard->HasContent(); - rSet.Put(SfxBoolItem(SID_FORMATPAINTBRUSH,bHasContent)); - if( ( nMarkCount!=1 && !bHasContent ) || mpDrawView->IsTextEdit() ) - rSet.DisableItem( SID_FORMATPAINTBRUSH ); - if( !bHasContent && nMarkCount==1 ) - { - SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj(); - if( !pFormatClipboard->CanCopyThisType(pObj->GetObjInventor(),pObj->GetObjIdentifier()) ) - rSet.DisableItem( SID_FORMATPAINTBRUSH ); - } - } + FuFormatPaintBrush::GetMenuState( *this, rSet ); // Stati der SfxChild-Windows (Animator, Fontwork etc.) SetChildWindowState( rSet ); diff --git a/sd/source/ui/view/drviews9.cxx b/sd/source/ui/view/drviews9.cxx index b5644418fdf2..0e39b4a82b33 100644 --- a/sd/source/ui/view/drviews9.cxx +++ b/sd/source/ui/view/drviews9.cxx @@ -47,10 +47,10 @@ #ifndef _SFX_DISPATCH_HXX //autogen #include <sfx2/dispatch.hxx> #endif -#include <svtools/intitem.hxx> +#include <svl/intitem.hxx> #include <sfx2/app.hxx> #include <sfx2/request.hxx> -#include <svtools/stritem.hxx> +#include <svl/stritem.hxx> #ifndef _SVXIDS_HXX #include <svx/svxids.hrc> #endif @@ -60,7 +60,7 @@ #include <svx/svdograf.hxx> #include <svx/svdoole2.hxx> #include <sot/storage.hxx> -#include <svtools/whiter.hxx> +#include <svl/whiter.hxx> #include <basic/sbstar.hxx> #include <sfx2/viewfrm.hxx> diff --git a/sd/source/ui/view/drviewsa.cxx b/sd/source/ui/view/drviewsa.cxx index 3c396db7207d..2eb4282bb6e5 100644 --- a/sd/source/ui/view/drviewsa.cxx +++ b/sd/source/ui/view/drviewsa.cxx @@ -42,14 +42,14 @@ #include <svx/zoomitem.hxx> #endif #include <svx/svdpagv.hxx> -#include <svtools/ptitem.hxx> -#include <svtools/stritem.hxx> +#include <svl/ptitem.hxx> +#include <svl/stritem.hxx> #include <sfx2/request.hxx> #include <sfx2/dispatch.hxx> #include <svx/svdopath.hxx> #include <sfx2/docfile.hxx> #include <svx/zoomslideritem.hxx> -#include <svtools/eitem.hxx> +#include <svl/eitem.hxx> #ifndef _SVX_DIALOGS_HRC #include <svx/dialogs.hrc> diff --git a/sd/source/ui/view/drviewsb.cxx b/sd/source/ui/view/drviewsb.cxx index 9a94cae21983..09e71dc547ac 100644 --- a/sd/source/ui/view/drviewsb.cxx +++ b/sd/source/ui/view/drviewsb.cxx @@ -55,7 +55,7 @@ #include <svx/fmshell.hxx> #include <svx/svxdlg.hxx> #include <svx/dialogs.hrc> -#include <svtools/useroptions.hxx> +#include <unotools/useroptions.hxx> #include "app.hrc" #include "strings.hrc" diff --git a/sd/source/ui/view/drviewsc.cxx b/sd/source/ui/view/drviewsc.cxx index d8dbc451f0c3..e9bad2064c10 100644 --- a/sd/source/ui/view/drviewsc.cxx +++ b/sd/source/ui/view/drviewsc.cxx @@ -53,7 +53,7 @@ #endif #include <sfx2/dispatch.hxx> #include <svx/svdoole2.hxx> -#include <svtools/style.hxx> +#include <svl/style.hxx> #include <svx/svdpagv.hxx> #include <svx/grafctrl.hxx> #include "stlsheet.hxx" @@ -127,7 +127,7 @@ void DrawViewShell::FuTemp03(SfxRequest& rReq) SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "Dialogdiet fail!"); - AbstractSvxObjectNameDialog* pDlg = pFact->CreateSvxObjectNameDialog(NULL, aName, RID_SVXDLG_OBJECT_NAME); + AbstractSvxObjectNameDialog* pDlg = pFact->CreateSvxObjectNameDialog(NULL, aName); OSL_ENSURE(pDlg, "Dialogdiet fail!"); pDlg->SetCheckNameHdl(LINK(this, DrawViewShell, NameObjectHdl)); @@ -162,7 +162,7 @@ void DrawViewShell::FuTemp03(SfxRequest& rReq) SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "Dialogdiet fail!"); - AbstractSvxObjectTitleDescDialog* pDlg = pFact->CreateSvxObjectTitleDescDialog(NULL, aTitle, aDescription, RID_SVXDLG_OBJECT_TITLE_DESC); + AbstractSvxObjectTitleDescDialog* pDlg = pFact->CreateSvxObjectTitleDescDialog(NULL, aTitle, aDescription); OSL_ENSURE(pDlg, "Dialogdiet fail!"); if(RET_OK == pDlg->Execute()) diff --git a/sd/source/ui/view/drviewsd.cxx b/sd/source/ui/view/drviewsd.cxx index 9838f185807f..0d90619ff76a 100644 --- a/sd/source/ui/view/drviewsd.cxx +++ b/sd/source/ui/view/drviewsd.cxx @@ -36,10 +36,10 @@ #ifndef _SVXIDS_HRC #include <svx/svxids.hrc> #endif -#include <svtools/aeitem.hxx> -#include <svtools/stritem.hxx> +#include <svl/aeitem.hxx> +#include <svl/stritem.hxx> #include <sfx2/docfile.hxx> -#include <svtools/intitem.hxx> +#include <svl/intitem.hxx> #include <sfx2/bindings.hxx> #include <sfx2/dispatch.hxx> #include <sfx2/request.hxx> diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx index 0b3ecf1af6e7..1dbfa7211a76 100644 --- a/sd/source/ui/view/drviewse.cxx +++ b/sd/source/ui/view/drviewse.cxx @@ -40,10 +40,10 @@ #include "undo/undomanager.hxx" #include <vcl/waitobj.hxx> -#include <svtools/aeitem.hxx> +#include <svl/aeitem.hxx> #include <svx/editstat.hxx> #include <vcl/msgbox.hxx> -#include <svtools/urlbmk.hxx> +#include <svl/urlbmk.hxx> #include <svx/svdpagv.hxx> #include <svx/fmshell.hxx> #include <vcl/scrbar.hxx> @@ -51,7 +51,7 @@ #include <svx/svdundo.hxx> #include <svx/svdorect.hxx> #include <svx/svdograf.hxx> -#include <svtools/eitem.hxx> +#include <svl/eitem.hxx> #include <svx/eeitem.hxx> #include <sfx2/dispatch.hxx> #include <sfx2/viewfrm.hxx> @@ -64,11 +64,11 @@ #include <svx/svdouno.hxx> #include <svx/dataaccessdescriptor.hxx> #include <tools/urlobj.hxx> -#include <svtools/slstitm.hxx> +#include <svl/slstitm.hxx> #include <sfx2/ipclient.hxx> #include <toolkit/helper/vclunohelper.hxx> #include <avmedia/mediawindow.hxx> -#include <svtools/urihelper.hxx> +#include <svl/urihelper.hxx> #include <sfx2/topfrm.hxx> #include <sfx2/docfile.hxx> @@ -106,7 +106,7 @@ #include "anminfo.hxx" #include "optsitem.hxx" #include "Window.hxx" - +#include "fuformatpaintbrush.hxx" using ::rtl::OUString; using namespace ::com::sun::star; @@ -203,13 +203,22 @@ void DrawViewShell::FuPermanent(SfxRequest& rReq) if(HasCurrentFunction()) { - if(GetOldFunction() == GetCurrentFunction()) + if( (nSId == SID_FORMATPAINTBRUSH) && (GetCurrentFunction()->GetSlotID() == SID_TEXTEDIT) ) + { + // save text edit mode for format paintbrush! + SetOldFunction( GetCurrentFunction() ); + } + else { - SetOldFunction(0); + if(GetOldFunction() == GetCurrentFunction()) + { + SetOldFunction(0); + } } if ( nSId != SID_TEXTEDIT && nSId != SID_ATTR_CHAR && nSId != SID_TEXT_FITTOSIZE && nSId != SID_ATTR_CHAR_VERTICAL && nSId != SID_TEXT_FITTOSIZE_VERTICAL && + nSId != SID_FORMATPAINTBRUSH && mpDrawView->IsTextEdit() ) { mpDrawView->SdrEndTextEdit(); @@ -526,8 +535,18 @@ void DrawViewShell::FuPermanent(SfxRequest& rReq) } break; + case SID_FORMATPAINTBRUSH: + { + SetCurrentFunction( FuFormatPaintBrush::Create( this, GetActiveWindow(), mpDrawView, GetDoc(), rReq ) ); + rReq.Done(); + SfxBindings& rBind = GetViewFrame()->GetBindings(); + rBind.Invalidate( nSId ); + rBind.Update( nSId ); + break; + } + default: - break; + break; } if(HasOldFunction()) diff --git a/sd/source/ui/view/drviewsf.cxx b/sd/source/ui/view/drviewsf.cxx index 2b1b7518666c..3783f20a49ef 100644 --- a/sd/source/ui/view/drviewsf.cxx +++ b/sd/source/ui/view/drviewsf.cxx @@ -47,9 +47,9 @@ #include <svx/flditem.hxx> #endif #include <sfx2/viewfrm.hxx> -#include <svtools/whiter.hxx> -#include <svtools/eitem.hxx> -#include <svtools/itempool.hxx> +#include <svl/whiter.hxx> +#include <svl/eitem.hxx> +#include <svl/itempool.hxx> #include <sfx2/tplpitem.hxx> #ifndef _BINDING_HXX //autogen #include <sfx2/bindings.hxx> @@ -63,7 +63,7 @@ #include <tools/urlobj.hxx> #include <svx/fmshell.hxx> #include <sfx2/topfrm.hxx> -#include <svtools/cjkoptions.hxx> +#include <svl/cjkoptions.hxx> #ifndef SD_FRAME_VIEW #include "FrameView.hxx" diff --git a/sd/source/ui/view/drviewsh.cxx b/sd/source/ui/view/drviewsh.cxx index f4fa1d027fd9..7952106e34e0 100644 --- a/sd/source/ui/view/drviewsh.cxx +++ b/sd/source/ui/view/drviewsh.cxx @@ -32,8 +32,8 @@ #include "precompiled_sd.hxx" #include "DrawViewShell.hxx" -#include <svtools/aeitem.hxx> -#include <svtools/itemset.hxx> +#include <svl/aeitem.hxx> +#include <svl/itemset.hxx> #include <sfx2/request.hxx> #ifndef _SVXIDS_HRC #include <svx/svxids.hrc> diff --git a/sd/source/ui/view/drviewsi.cxx b/sd/source/ui/view/drviewsi.cxx index 703677d05415..4eb0b6671d82 100644 --- a/sd/source/ui/view/drviewsi.cxx +++ b/sd/source/ui/view/drviewsi.cxx @@ -34,7 +34,7 @@ #include "DrawViewShell.hxx" #include <svx/xtable.hxx> #include "sdattr.hxx" -#include <svtools/aeitem.hxx> +#include <svl/aeitem.hxx> #include <svx/eeitem.hxx> #include <sfx2/request.hxx> #include <svx/svditer.hxx> diff --git a/sd/source/ui/view/drviewsj.cxx b/sd/source/ui/view/drviewsj.cxx index cdc5fac18912..c21432b27846 100644 --- a/sd/source/ui/view/drviewsj.cxx +++ b/sd/source/ui/view/drviewsj.cxx @@ -33,7 +33,7 @@ #include "DrawViewShell.hxx" #include <com/sun/star/embed/EmbedMisc.hpp> -#include <svtools/aeitem.hxx> +#include <svl/aeitem.hxx> #ifndef _SVXIDS_HRC //autogen #include <svx/svxids.hrc> #endif diff --git a/sd/source/ui/view/outlnvs2.cxx b/sd/source/ui/view/outlnvs2.cxx index 99fbcb7f2eda..468ea50776f2 100644 --- a/sd/source/ui/view/outlnvs2.cxx +++ b/sd/source/ui/view/outlnvs2.cxx @@ -40,7 +40,7 @@ #include <sfx2/docfile.hxx> #include <sfx2/dispatch.hxx> #include <sfx2/request.hxx> -#include <svtools/eitem.hxx> +#include <svl/eitem.hxx> #ifndef _ZOOMITEM_HXX //autogen #include <svx/zoomitem.hxx> #endif @@ -49,7 +49,7 @@ #include <svx/flditem.hxx> #include <svx/editstat.hxx> #include "optsitem.hxx" -#include <svtools/useroptions.hxx> +#include <unotools/useroptions.hxx> #include <sfx2/viewfrm.hxx> #include "Outliner.hxx" diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx index d14f6ed9dc34..43a8683cd039 100644 --- a/sd/source/ui/view/outlnvsh.cxx +++ b/sd/source/ui/view/outlnvsh.cxx @@ -55,9 +55,9 @@ #include <svx/svdotext.hxx> #include <sfx2/dispatch.hxx> #include <vcl/scrbar.hxx> -#include <svtools/whiter.hxx> +#include <svl/whiter.hxx> #include <svx/editstat.hxx> -#include <svtools/itempool.hxx> +#include <svl/itempool.hxx> #include <sfx2/tplpitem.hxx> #include <svx/svdorect.hxx> #include <sot/formats.hxx> @@ -67,7 +67,7 @@ #include <svx/unolingu.hxx> #include <comphelper/processfactory.hxx> #include <svx/outlobj.hxx> -#include <svtools/cjkoptions.hxx> +#include <svl/cjkoptions.hxx> #include <svtools/cliplistener.hxx> #include <sfx2/srchitem.hxx> #include <svx/editobj.hxx> diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx index 1e5564427ac8..c500a95f2811 100644 --- a/sd/source/ui/view/outlview.cxx +++ b/sd/source/ui/view/outlview.cxx @@ -46,11 +46,11 @@ #include <sfx2/imagemgr.hxx> #include <sfx2/app.hxx> #include <sfx2/bindings.hxx> -#include <svtools/itempool.hxx> -#include <svtools/style.hxx> +#include <svl/itempool.hxx> +#include <svl/style.hxx> #include <svx/svdorect.hxx> #include <svx/svdundo.hxx> -#include <svtools/brdcst.hxx> +#include <svl/brdcst.hxx> #include <vcl/msgbox.hxx> #include <svx/adjitem.hxx> #include <svx/tstpitem.hxx> diff --git a/sd/source/ui/view/sdruler.cxx b/sd/source/ui/view/sdruler.cxx index 52e098caf7f3..8fc564c358f6 100644 --- a/sd/source/ui/view/sdruler.cxx +++ b/sd/source/ui/view/sdruler.cxx @@ -32,7 +32,7 @@ #include "precompiled_sd.hxx" #include "Ruler.hxx" -#include <svtools/ptitem.hxx> +#include <svl/ptitem.hxx> #include <svx/ruler.hxx> #ifndef _SVXIDS_HXX //autogen #include <svx/svxids.hrc> diff --git a/sd/source/ui/view/sdview2.cxx b/sd/source/ui/view/sdview2.cxx index 0a17724df1ed..49bbf3149c8b 100644 --- a/sd/source/ui/view/sdview2.cxx +++ b/sd/source/ui/view/sdview2.cxx @@ -52,8 +52,8 @@ #include <sfx2/childwin.hxx> #include <svx/svdundo.hxx> #include <svx/svdpagv.hxx> -#include <svtools/urlbmk.hxx> -#include <svtools/urlbmk.hxx> +#include <svl/urlbmk.hxx> +#include <svl/urlbmk.hxx> #include <svx/outliner.hxx> #include <svx/xflclit.hxx> #include <svx/dbexch.hrc> @@ -963,7 +963,7 @@ BOOL View::GetExchangeList( List*& rpExchangeList, List* pBookmarkList, USHORT n String aTitle( SdResId( STR_TITLE_NAMEGROUP ) ); String aDesc( SdResId( STR_DESC_NAMEGROUP ) ); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - AbstractSvxNameDialog* pDlg = pFact ? pFact->CreateSvxNameDialog( mpViewSh->GetActiveWindow(), *pNewName, aDesc, RID_SVXDLG_NAME ) : 0; + AbstractSvxNameDialog* pDlg = pFact ? pFact->CreateSvxNameDialog( mpViewSh->GetActiveWindow(), *pNewName, aDesc ) : 0; if( pDlg ) { pDlg->SetEditHelpId( HID_SD_NAMEDIALOG_OBJECT ); diff --git a/sd/source/ui/view/sdview3.cxx b/sd/source/ui/view/sdview3.cxx index 184949f4e683..cbc8758d2b53 100644 --- a/sd/source/ui/view/sdview3.cxx +++ b/sd/source/ui/view/sdview3.cxx @@ -36,11 +36,11 @@ #include <com/sun/star/embed/NoVisualAreaSizeException.hpp> #include <com/sun/star/lang/XComponent.hpp> #include <sot/filelist.hxx> -#include <svtools/pathoptions.hxx> +#include <unotools/pathoptions.hxx> #ifndef _EDITDATA_HXX #include <svx/editdata.hxx> #endif -#include <svtools/urlbmk.hxx> +#include <svl/urlbmk.hxx> #include <svx/xexch.hxx> #include <svx/xflclit.hxx> #include <svx/xlnclit.hxx> @@ -55,7 +55,7 @@ #include <svx/svdetc.hxx> #include <svx/svdundo.hxx> #include <sfx2/app.hxx> -#include <svtools/itempool.hxx> +#include <svl/itempool.hxx> #include <sot/clsids.hxx> #ifndef _FM_FMMODEL_HXX #include <svx/fmmodel.hxx> diff --git a/sd/source/ui/view/sdview4.cxx b/sd/source/ui/view/sdview4.cxx index 72534b476a73..9d301368418c 100644 --- a/sd/source/ui/view/sdview4.cxx +++ b/sd/source/ui/view/sdview4.cxx @@ -38,7 +38,7 @@ #include <sfx2/fcontnr.hxx> #include <sfx2/docfile.hxx> #include <vcl/msgbox.hxx> -#include <svtools/urlbmk.hxx> +#include <svl/urlbmk.hxx> #include <svx/svdpagv.hxx> #include <svx/xfillit.hxx> #include <svx/svdundo.hxx> diff --git a/sd/source/ui/view/viewshe2.cxx b/sd/source/ui/view/viewshe2.cxx index 0349388577eb..08a39c44d86a 100644 --- a/sd/source/ui/view/viewshe2.cxx +++ b/sd/source/ui/view/viewshe2.cxx @@ -59,7 +59,7 @@ #include <svx/fmshell.hxx> #include <sfx2/dispatch.hxx> #include <rtl/ustrbuf.hxx> -#include <svtools/moduleoptions.hxx> +#include <unotools/moduleoptions.hxx> #ifndef _SVX_DIALOGS_HRC #include <svx/dialogs.hrc> #endif diff --git a/sd/source/ui/view/viewshe3.cxx b/sd/source/ui/view/viewshe3.cxx index 38e2b6b88001..86e441939b0e 100644 --- a/sd/source/ui/view/viewshe3.cxx +++ b/sd/source/ui/view/viewshe3.cxx @@ -59,11 +59,10 @@ #include <svx/svdpagv.hxx> #include <svx/svdetc.hxx> #include <svx/outliner.hxx> -#include <svtools/misccfg.hxx> #include <svx/editstat.hxx> #include <tools/multisel.hxx> -#include <svtools/intitem.hxx> -#include <svtools/style.hxx> +#include <svl/intitem.hxx> +#include <svl/style.hxx> #include <unotools/localedatawrapper.hxx> #include <comphelper/processfactory.hxx> #include <rtl/ustrbuf.hxx> @@ -92,7 +91,7 @@ #include <svx/svxids.hrc> #endif #include <sfx2/request.hxx> -#include <svtools/aeitem.hxx> +#include <svl/aeitem.hxx> #include <basic/sbstar.hxx> using namespace ::com::sun::star; diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx index 208d5426c8bd..7effb79a00b1 100644 --- a/sd/source/ui/view/viewshel.cxx +++ b/sd/source/ui/view/viewshel.cxx @@ -48,7 +48,7 @@ #ifndef _SCRBAR_HXX //autogen #include <vcl/scrbar.hxx> #endif -#include <svtools/eitem.hxx> +#include <svl/eitem.hxx> #include <svx/ruler.hxx> #ifndef _SVXIDS_HXX #include <svx/svxids.hrc> @@ -90,7 +90,7 @@ #include <svx/svdoutl.hxx> // #96090# -#include <svtools/slstitm.hxx> +#include <svl/slstitm.hxx> #include <sfx2/request.hxx> #include "SpellDialogChildWindow.hxx" |