[Libreoffice-commits] .: 2 commits - sfx2/source sw/inc sw/sdi sw/source
Michael Meeks
michael at kemper.freedesktop.org
Fri Jun 8 06:45:34 PDT 2012
sfx2/source/dialog/templdlg.cxx | 13 ---
sw/inc/cmdid.h | 4 -
sw/inc/swcommands.h | 2
sw/sdi/_frmsh.sdi | 14 ---
sw/sdi/swriter.sdi | 48 ------------
sw/source/ui/app/mn.src | 27 -------
sw/source/ui/shells/frmsh.cxx | 151 ----------------------------------------
7 files changed, 259 deletions(-)
New commits:
commit 01e6c68e0a182ff5cb783f896ed832b58b7a1d76
Author: Michael Meeks <michael.meeks at suse.com>
Date: Fri Jun 8 14:42:44 2012 +0100
targetted revert of fdo#30917 - wrt. storing hierarchical view data
Change-Id: Ifffcad11e7691a8371be4e11143776f83c3608f5
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index 3a2a8ec..26f4cdb 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -1772,10 +1772,6 @@ IMPL_LINK( SfxCommonTemplateDialog_Impl, FilterSelectHdl, ListBox *, pBox )
((StyleTreeListBox_Impl*)pTreeBox)->
SetDropHdl(LINK(this, SfxCommonTemplateDialog_Impl, DropHdl));
pTreeBox->SetIndent(10);
- SfxViewFrame *pViewFrame = pBindings->GetDispatcher_Impl()->GetFrame();
- SfxObjectShell *pDocShell = pViewFrame->GetObjectShell();
- if (pDocShell)
- SaveFactoryStyleFilter( pDocShell, HIERARCHICAL_FILTER_INDEX );
FillTreeBox();
SelectStyle(aSelectEntry);
pTreeBox->SetAccessibleName(SfxResId(STR_STYLE_ELEMTLIST));
@@ -2263,9 +2259,6 @@ SfxTemplateDialog_Impl::SfxTemplateDialog_Impl(
{
pDlgWindow->FreeResource();
- SfxViewFrame* pViewFrame = pBindings->GetDispatcher_Impl()->GetFrame();
- pCurObjShell = pViewFrame->GetObjectShell();
- sal_uInt16 nSavedFilter = static_cast< sal_uInt16 >( LoadFactoryStyleFilter( pCurObjShell ) );
Initialize();
m_aActionTbL.SetSelectHdl(LINK(this, SfxTemplateDialog_Impl, ToolBoxLSelect));
@@ -2277,12 +2270,6 @@ SfxTemplateDialog_Impl::SfxTemplateDialog_Impl(
aFont.SetWeight( WEIGHT_NORMAL );
aFilterLb.SetFont( aFont );
m_aActionTbL.SetHelpId( HID_TEMPLDLG_TOOLBOX_LEFT );
- if( nSavedFilter == HIERARCHICAL_FILTER_INDEX )
- {
- bHierarchical = sal_False; // Force content refresh
- aFilterLb.SelectEntry(String(SfxResId(STR_STYLE_FILTER_HIERARCHICAL)));
- FilterSelectHdl(&aFilterLb);
- }
}
// ------------------------------------------------------------------------
commit 1227034d594cbe141738bdf9922319643ad869ff
Author: Michael Meeks <michael.meeks at suse.com>
Date: Fri Jun 8 14:33:52 2012 +0100
targetted revert of OLE2 object save in writer context menu
Change-Id: I7efe4af8fc305e786fb1856c200d9db8320df948
diff --git a/sw/inc/cmdid.h b/sw/inc/cmdid.h
index ca5a872..3a6f80c 100644
--- a/sw/inc/cmdid.h
+++ b/sw/inc/cmdid.h
@@ -641,10 +641,6 @@ included in c-context files, so c++ style stuff will cause problems.
#define FN_NUMBER_CURRENCY (FN_FORMAT2 + 127)
#define FN_NUMBER_PERCENT (FN_FORMAT2 + 128)
-#define FN_EXPORT_OLE (FN_FORMAT2 + 129) /* Export menu item */
-#define FN_EXPORT_OLE_AS_PDF (FN_FORMAT2 + 130) /* Export as PDF */
-#define FN_EXPORT_OLE_AS_GRAPHIC (FN_FORMAT2 + 131) /* Export as JPG */
-
#define FN_FRAME_CHAIN (FN_FORMAT2 + 136)
#define FN_FRAME_UNCHAIN (FN_FORMAT2 + 137)
diff --git a/sw/inc/swcommands.h b/sw/inc/swcommands.h
index 411ec5c..d9f6148 100644
--- a/sw/inc/swcommands.h
+++ b/sw/inc/swcommands.h
@@ -165,8 +165,6 @@
#define CMD_FN_FORMAT_GRAFIC_DLG ".uno:GraphicDialog"
#define CMD_FN_SAVE_GRAPHIC ".uno:SaveGraphic"
#define CMD_FN_EXTERNAL_EDIT ".uno:ExternalEdit"
-#define CMD_FN_EXPORT_OLE_AS_PDF ".uno:ExportOleAsPDF"
-#define CMD_FN_EXPORT_OLE_AS_GRAPHIC ".uno:ExportOleAsGraphic"
#define CMD_FN_GROW_FONT_SIZE ".uno:Grow"
#define CMD_FN_HSCROLLBAR ".uno:HScroll"
#define CMD_SID_HTML_MODE ".uno:HtmlMode"
diff --git a/sw/sdi/_frmsh.sdi b/sw/sdi/_frmsh.sdi
index de898ac..d7ea079 100644
--- a/sw/sdi/_frmsh.sdi
+++ b/sw/sdi/_frmsh.sdi
@@ -173,20 +173,6 @@ interface BaseTextFrame
DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
]
- FN_EXPORT_OLE_AS_PDF // status(final|play)
- [
- ExecMethod = Execute ;
- StateMethod = GetState ;
- DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
- ]
-
- FN_EXPORT_OLE_AS_GRAPHIC // status(final|play)
- [
- ExecMethod = Execute ;
- StateMethod = GetState ;
- DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
- ]
-
SID_FRAME_LINESTYLE // status()
[
ExecMethod = ExecFrameStyle ;
diff --git a/sw/sdi/swriter.sdi b/sw/sdi/swriter.sdi
index 89e1530..bab0c1b 100644
--- a/sw/sdi/swriter.sdi
+++ b/sw/sdi/swriter.sdi
@@ -2034,54 +2034,6 @@ SfxVoidItem FormatColumns FN_FORMAT_COLUMN
GroupId = GID_FORMAT;
]
-SfxVoidItem ExportPDF FN_EXPORT_OLE_AS_PDF
-()
-[
- /* flags: */
- AutoUpdate = FALSE,
- Cachable = Cachable,
- FastCall = FALSE,
- HasCoreId = FALSE,
- HasDialog = FALSE,
- ReadOnlyDoc = FALSE,
- Toggle = FALSE,
- Container = FALSE,
- RecordAbsolute = FALSE,
- RecordPerItem;
- Asynchron;
-
- /* config: */
- AccelConfig = TRUE,
- MenuConfig = TRUE,
- StatusBarConfig = FALSE,
- ToolBoxConfig = TRUE,
- GroupId = GID_FRAME;
-]
-
-SfxVoidItem ExportGraphic FN_EXPORT_OLE_AS_GRAPHIC
-()
-[
- /* flags: */
- AutoUpdate = FALSE,
- Cachable = Cachable,
- FastCall = FALSE,
- HasCoreId = FALSE,
- HasDialog = FALSE,
- ReadOnlyDoc = FALSE,
- Toggle = FALSE,
- Container = FALSE,
- RecordAbsolute = FALSE,
- RecordPerItem;
- Asynchron;
-
- /* config: */
- AccelConfig = TRUE,
- MenuConfig = TRUE,
- StatusBarConfig = FALSE,
- ToolBoxConfig = TRUE,
- GroupId = GID_FRAME;
-]
-
//--------------------------------------------------------------------------
SwFmtDrop FormatDropcap FN_FORMAT_DROPCAPS
diff --git a/sw/source/ui/app/mn.src b/sw/source/ui/app/mn.src
index db394cb..deed82e 100644
--- a/sw/source/ui/app/mn.src
+++ b/sw/source/ui/app/mn.src
@@ -1307,30 +1307,6 @@ String MN_OLE_POPUPMENU
Text [ en-US ] = "Object" ;
};
-#define MN_OLE_EXPORT \
- MenuItem\
- {\
- Text [ en-US ] = "Export..." ; \
- SubMenu = Menu\
- {\
- ItemList = \
- {\
- MenuItem\
- {\
- Identifier = FN_EXPORT_OLE_AS_PDF ;\
- HelpID = CMD_FN_EXPORT_OLE_AS_PDF ; \
- Text [ en-US ] = "Export as P~DF..." ; \
- };\
- MenuItem\
- {\
- Identifier = FN_EXPORT_OLE_AS_GRAPHIC ;\
- HelpID = CMD_FN_EXPORT_OLE_AS_GRAPHIC ; \
- Text [ en-US ] = "Export as JPG..." ; \
- };\
- };\
- };\
- };
-
Menu MN_OLE_POPUPMENU
{
ItemList =
@@ -1346,9 +1322,6 @@ Menu MN_OLE_POPUPMENU
HelpId = CMD_FN_FORMAT_FRAME_DLG ;
Text [ en-US ] = "Object..." ;
};
- SEPARATOR ;
- MN_OLE_EXPORT
- SEPARATOR ;
MN_FRM_CAPTION_ITEM
};
};
diff --git a/sw/source/ui/shells/frmsh.cxx b/sw/source/ui/shells/frmsh.cxx
index 504efda..e62b213 100644
--- a/sw/source/ui/shells/frmsh.cxx
+++ b/sw/source/ui/shells/frmsh.cxx
@@ -85,14 +85,6 @@
#include "misc.hrc"
// #i73249#
#include <svx/dialogs.hrc>
-
-#include <sfx2/filedlghelper.hxx>
-#include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
-#include <com/sun/star/beans/PropertyValues.hpp>
-#include <com/sun/star/uno/Reference.h>
-#include <com/sun/star/frame/XStorable.hpp>
-#include <com/sun/star/uno/Any.h>
-
#include <wordcountdialog.hxx>
using ::editeng::SvxBorderLine;
@@ -123,10 +115,6 @@ SFX_IMPL_INTERFACE(SwFrameShell, SwBaseShell, SW_RES(STR_SHELLNAME_FRAME))
SFX_OBJECTBAR_REGISTRATION(SFX_OBJECTBAR_OBJECT, SW_RES(RID_FRAME_TOOLBOX));
}
-#include <com/sun/star/frame/XComponentLoader.hpp>
-#include <com/sun/star/frame/XDesktop.hpp>
-#include <com/sun/star/frame/XDispatchHelper.hpp>
-
void SwFrameShell::Execute(SfxRequest &rReq)
{
//Erstmal die, die keinen FrmMgr benoetigen.
@@ -138,135 +126,6 @@ void SwFrameShell::Execute(SfxRequest &rReq)
switch ( nSlot )
{
- case FN_EXPORT_OLE_AS_GRAPHIC:
- {
- const int nSel = rSh.GetSelectionType();
- if (nSel & nsSelectionType::SEL_OLE)
- {
- sfx2::FileDialogHelper aDlgHelper( ::ui::dialogs::TemplateDescription::FILESAVE_AUTOEXTENSION, 0 );
- aDlgHelper.SetTitle(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Export as JPG" )));
- String aExt(RTL_CONSTASCII_USTRINGPARAM("*.jpg"));
- aDlgHelper.AddFilter( aExt, aExt );
- aDlgHelper.SetCurrentFilter( aExt );
- if( aDlgHelper.Execute() == ERRCODE_NONE )
- {
- String aFile(aDlgHelper.GetPath());
- // copy the object
- uno::Reference< frame::XController > xController = rSh.GetView().GetViewFrame()->GetFrame().GetFrameInterface()->getController();
- uno::Reference< frame::XFrame > xFrame = xController->getFrame();
- uno::Reference< frame::XDispatchHelper > xDispatchHelper(::comphelper::getProcessServiceFactory()->createInstance(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.DispatchHelper" )) ),
- uno::UNO_QUERY );
- uno::Reference< frame::XDispatchProvider > xDispatchProvider(xFrame,UNO_QUERY);
- xDispatchHelper->executeDispatch(xDispatchProvider, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:Copy")),
- ::rtl::OUString(), 0,
- Sequence < ::com::sun::star::beans::PropertyValue >());
- // create new draw document
- ::beans::PropertyValues aPropertyValue(1);
- aPropertyValue[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Hidden" ) );
- aPropertyValue[0].Value <<= sal_Bool(sal_False);
-
- uno::Reference< ::frame::XComponentLoader > xLoader(xFrame, UNO_QUERY);
- uno::Reference< ::lang::XComponent > xDrawComponent( xLoader->loadComponentFromURL(
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "private:factory/sdraw" ) ),
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "_blank" ) ), 0,
- aPropertyValue));
-
- // paste it into draw
- uno::Reference< frame::XModel > xDrawModel(xDrawComponent, UNO_QUERY);
- xController = xDrawModel->getCurrentController();
- xFrame = xController->getFrame();
- uno::Reference< frame::XDispatchProvider > xDrawDispatchProvider(xFrame,UNO_QUERY);
-
- xDispatchHelper->executeDispatch(xDrawDispatchProvider,
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:Paste")),
- ::rtl::OUString(), 0,
- Sequence < ::com::sun::star::beans::PropertyValue >());
- xDispatchHelper->executeDispatch(xDrawDispatchProvider,
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:AlignUp")),
- ::rtl::OUString(), 0,
- Sequence < ::com::sun::star::beans::PropertyValue >());
- xDispatchHelper->executeDispatch(xDrawDispatchProvider,
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:AlignCenter")),
- ::rtl::OUString(), 0,
- Sequence < ::com::sun::star::beans::PropertyValue >());
- // export as jpeg
- xController = xFrame->getController();
- aPropertyValue[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "FilterName" ) );
- aPropertyValue[0].Value <<= ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "draw_jpg_Export" ) );
- uno::Reference< frame::XStorable > xStorable(xController->getModel(), uno::UNO_QUERY );
- xStorable->storeToURL(aFile, aPropertyValue);
-
- // destroy draw document
- xDrawComponent->dispose();
- }
- }
- rReq.Ignore();
- }
- break;
- case FN_EXPORT_OLE_AS_PDF:
- {
- const int nSel = rSh.GetSelectionType();
- if (nSel & nsSelectionType::SEL_OLE)
- {
- sfx2::FileDialogHelper aDlgHelper( ::ui::dialogs::TemplateDescription::FILESAVE_AUTOEXTENSION, 0 );
- aDlgHelper.SetTitle(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Export as PDF" )));
- String aExt(RTL_CONSTASCII_USTRINGPARAM("*.pdf"));
- aDlgHelper.AddFilter( aExt, aExt );
- aDlgHelper.SetCurrentFilter( aExt );
- if( aDlgHelper.Execute() == ERRCODE_NONE )
- {
- String aFile(aDlgHelper.GetPath());
- Reference< frame::XController > xController = rSh.GetView().GetViewFrame()->GetFrame().GetFrameInterface()->getController();
- ::beans::PropertyValues aPropertyValue(3);
- aPropertyValue[0].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "FilterName" ) );
- aPropertyValue[0].Value <<= rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "writer_pdf_Export" ) );
- Sequence< ::beans::PropertyValue > aSequence(10);
- ::beans::PropertyValue aValue;
- aValue.Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "UseLosslessCompression" ));
- aValue.Value <<= sal_Bool(sal_False);
- aSequence[0] = aValue;
- aValue.Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Quality" ));
- aValue.Value <<= sal_Int32(90);
- aSequence[1] = aValue;
- aValue.Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "ReduceImageResolution" ));
- aValue.Value <<= sal_Bool(sal_False);
- aSequence[2] = aValue;
- aValue.Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "MaxImageResolution" ));
- aValue.Value <<= sal_Int32(300);
- aSequence[3] = aValue;
- aValue.Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "UseTaggedPDF" ));
- aValue.Value <<= sal_Bool(sal_False);
- aSequence[4] = aValue;
- aValue.Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "ExportNotes" ));
- aValue.Value <<= sal_Bool(sal_False);
- aSequence[5] = aValue;
- aValue.Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "UseTransitionEffects" ));
- aValue.Value <<= sal_Bool(sal_True);
- aSequence[6] = aValue;
- aValue.Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "FormsType" ));
- aValue.Value <<= sal_Int32(0);
- aSequence[7] = aValue;
- uno::Any aAny;
- Reference< view::XSelectionSupplier > xView( xController, UNO_QUERY );
- xView->getSelection() >>= aAny;
- aValue.Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Selection" ));
- aValue.Value <<= aAny;
- aSequence[8] = aValue;
- aValue.Name = rtl::OUString();
- aValue.Value <<= sal_Int32(0);
- aSequence[9] = aValue;
- aPropertyValue[1].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "FilterData" ) );
- aPropertyValue[1].Value <<= aSequence;
- aPropertyValue[2].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Selection" ) );
- aPropertyValue[2].Value <<= sal_Bool(sal_True);
- Reference< frame::XStorable > xStorable(xController->getModel(), uno::UNO_QUERY );
- xStorable->storeToURL(aFile, aPropertyValue);
- }
- }
- rReq.Ignore();
- }
- break;
case FN_FRAME_TO_ANCHOR:
if ( rSh.IsFrmSelected() )
{
@@ -853,16 +712,6 @@ void SwFrameShell::GetState(SfxItemSet& rSet)
rSet.DisableItem( nWhich );
break;
- case FN_EXPORT_OLE:
- case FN_EXPORT_OLE_AS_PDF:
- case FN_EXPORT_OLE_AS_GRAPHIC:
- {
- SvtMiscOptions aMiscOptions;
- if ( !aMiscOptions.IsExperimentalMode() )
- rSet.DisableItem( nWhich );
- break;
- }
-
case SID_OBJECT_ALIGN_UP :
case SID_OBJECT_ALIGN_MIDDLE :
case SID_OBJECT_ALIGN_DOWN :
More information about the Libreoffice-commits
mailing list