summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-04-12 09:52:15 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-04-12 17:54:09 +0200
commit9f150ddf0ee8e368f06c06c21682d38d01af5c4a (patch)
treec1bfeb829e7d0fb22c392480d792cf21bfdba663
parent46cefbcae75947bf78cd3c3f1ed7e6e975ad9f93 (diff)
unused ImpSVGDialog dialog
its all in untranslated english too, maybe a debugging dialog if some kind, no way to instantiate it in practice Change-Id: I4270a6eabf1d3b3031becabc8e50f8b1f41c4b73 Reviewed-on: https://gerrit.libreoffice.org/52765 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--filter/Library_svgfilter.mk2
-rw-r--r--filter/source/svg/impsvgdialog.cxx141
-rw-r--r--filter/source/svg/impsvgdialog.hxx74
-rw-r--r--filter/source/svg/svgdialog.cxx199
-rw-r--r--filter/source/svg/svgdialog.hxx85
-rw-r--r--filter/source/svg/svgexport.cxx8
6 files changed, 7 insertions, 502 deletions
diff --git a/filter/Library_svgfilter.mk b/filter/Library_svgfilter.mk
index e0d8ff37ccce..9708b8ca6ed8 100644
--- a/filter/Library_svgfilter.mk
+++ b/filter/Library_svgfilter.mk
@@ -69,9 +69,7 @@ $(eval $(call gb_Library_use_externals,svgfilter,\
$(eval $(call gb_Library_add_exception_objects,svgfilter,\
filter/source/svg/b2dellipse \
- filter/source/svg/impsvgdialog \
filter/source/svg/parserfragments \
- filter/source/svg/svgdialog \
filter/source/svg/svgfilter \
filter/source/svg/svgimport \
filter/source/svg/svgreader \
diff --git a/filter/source/svg/impsvgdialog.cxx b/filter/source/svg/impsvgdialog.cxx
deleted file mode 100644
index 9aebbb56a924..000000000000
--- a/filter/source/svg/impsvgdialog.cxx
+++ /dev/null
@@ -1,141 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-
-#include "impsvgdialog.hxx"
-
-#include <cstdio>
-
-using namespace com::sun::star::uno;
-using namespace com::sun::star::beans;
-
-
-inline sal_Int32 implMap( sal_Int32 nVal )
-{
- return( nVal << 1 );
-}
-
-
-ImpSVGDialog::ImpSVGDialog( vcl::Window* pParent, Sequence< PropertyValue >& rFilterData ) :
- ModalDialog( pParent ),
- maFI( VclPtr<FixedLine>::Create(this) ),
- maCBTinyProfile( VclPtr<CheckBox>::Create(this) ),
- maCBEmbedFonts( VclPtr<CheckBox>::Create(this) ),
- maCBUseNativeDecoration( VclPtr<CheckBox>::Create(this) ),
- maBTOK( VclPtr<OKButton>::Create(this, 0) ),
- maBTCancel( VclPtr<CancelButton>::Create(this) ),
- maBTHelp( VclPtr<HelpButton>::Create(this) ),
- maConfigItem( SVG_EXPORTFILTER_CONFIGPATH, &rFilterData ),
- mbOldNativeDecoration( false )
-{
- SetText( "SVG Export Options" );
- SetOutputSizePixel( Size( implMap( 177 ), implMap( 77 ) ) );
-
- maFI->SetText( "Export" );
- maFI->SetPosSizePixel( Point( implMap( 6 ), implMap( 3 ) ),
- Size( implMap( 165 ), implMap( 8 ) ) );
-
- maCBTinyProfile->SetText( "Use SVG Tiny profile" );
- maCBTinyProfile->SetPosSizePixel( Point( implMap( 12 ), implMap( 14 ) ),
- Size( implMap( 142 ), implMap( 10 ) ) );
-
- maCBEmbedFonts->SetText( "Embed fonts" );
- maCBEmbedFonts->SetPosSizePixel( Point( implMap( 12 ), implMap( 27 ) ),
- Size( implMap( 142 ), implMap( 10 ) ) );
-
- maCBUseNativeDecoration->SetText( "Use SVG native text decoration" );
- maCBUseNativeDecoration->SetPosSizePixel( Point( implMap( 12 ), implMap( 41 ) ),
- Size( implMap( 142 ), implMap( 10 ) ) );
-
- maCBTinyProfile->Check( maConfigItem.ReadBool( SVG_PROP_TINYPROFILE, false ) );
- maCBEmbedFonts->Check( maConfigItem.ReadBool( SVG_PROP_EMBEDFONTS, true ) );
- maCBUseNativeDecoration->Check( maConfigItem.ReadBool( SVG_PROP_NATIVEDECORATION, true ) );
-
- maBTOK->SetPosSizePixel( Point( implMap( 12 ), implMap( 57 ) ),
- Size( implMap( 50 ), implMap( 14 ) ) );
- maBTCancel->SetPosSizePixel( Point( implMap( 65 ), implMap( 57 ) ),
- Size( implMap( 50 ), implMap( 14 ) ) );
- maBTHelp->SetPosSizePixel( Point( implMap( 121 ), implMap( 57 ) ),
- Size( implMap( 50 ), implMap( 14 ) ) );
-
- maCBTinyProfile->SetToggleHdl( LINK( this, ImpSVGDialog, OnToggleCheckbox ) );
- OnToggleCheckbox( *maCBTinyProfile.get() );
-
- maFI->Show();
-
- maCBTinyProfile->Show();
- maCBEmbedFonts->Show();
- maCBUseNativeDecoration->Show();
-
- maBTOK->Show();
- maBTCancel->Show();
- maBTHelp->Show();
-}
-
-
-ImpSVGDialog::~ImpSVGDialog()
-{
- disposeOnce();
-}
-
-
-void ImpSVGDialog::dispose()
-{
- maFI.disposeAndClear();
- maCBTinyProfile.disposeAndClear();
- maCBEmbedFonts.disposeAndClear();
- maCBUseNativeDecoration.disposeAndClear();
- maBTOK.disposeAndClear();
- maBTCancel.disposeAndClear();
- maBTHelp.disposeAndClear();
- maConfigItem.WriteModifiedConfig();
- ModalDialog::dispose();
-}
-
-
-Sequence< PropertyValue > const & ImpSVGDialog::GetFilterData()
-{
- maConfigItem.WriteBool( SVG_PROP_TINYPROFILE, maCBTinyProfile->IsChecked() );
- maConfigItem.WriteBool( SVG_PROP_EMBEDFONTS, maCBEmbedFonts->IsChecked() );
- maConfigItem.WriteBool( SVG_PROP_NATIVEDECORATION, maCBUseNativeDecoration->IsChecked() );
-
- return maConfigItem.GetFilterData();
-}
-
-
-IMPL_LINK( ImpSVGDialog, OnToggleCheckbox, CheckBox&, rBox, void )
-{
- if( &rBox == maCBTinyProfile.get() )
- {
- if( rBox.IsChecked() )
- {
- mbOldNativeDecoration = maCBUseNativeDecoration->IsChecked();
-
- maCBUseNativeDecoration->Check( false );
- maCBUseNativeDecoration->Disable();
- }
- else
- {
- maCBUseNativeDecoration->Enable();
- maCBUseNativeDecoration->Check( mbOldNativeDecoration );
- }
- }
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/svg/impsvgdialog.hxx b/filter/source/svg/impsvgdialog.hxx
deleted file mode 100644
index d2d205cfe5ea..000000000000
--- a/filter/source/svg/impsvgdialog.hxx
+++ /dev/null
@@ -1,74 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef INCLUDED_FILTER_SOURCE_SVG_IMPSVGDIALOG_HXX
-#define INCLUDED_FILTER_SOURCE_SVG_IMPSVGDIALOG_HXX
-
-#include <vcl/dialog.hxx>
-#include <vcl/button.hxx>
-#include <vcl/fixed.hxx>
-#include <vcl/field.hxx>
-#include <vcl/FilterConfigItem.hxx>
-
-#include <com/sun/star/uno/Sequence.h>
-#include <com/sun/star/beans/PropertyValue.hpp>
-
-#define SVG_EXPORTFILTER_CONFIGPATH "Office.Common/Filter/SVG/Export/"
-#define SVG_PROP_TINYPROFILE "TinyMode"
-#define SVG_PROP_DTDSTRING "DTDString"
-#define SVG_PROP_EMBEDFONTS "EmbedFonts"
-#define SVG_PROP_NATIVEDECORATION "UseNativeTextDecoration"
-#define SVG_PROP_OPACITY "Opacity"
-#define SVG_PROP_POSITIONED_CHARACTERS "UsePositionedCharacters"
-
-
-namespace vcl { class Window; }
-
-
-class ImpSVGDialog : public ModalDialog
-{
-private:
-
- VclPtr<FixedLine> maFI;
- VclPtr<CheckBox> maCBTinyProfile;
- VclPtr<CheckBox> maCBEmbedFonts;
- VclPtr<CheckBox> maCBUseNativeDecoration;
-
- VclPtr<OKButton> maBTOK;
- VclPtr<CancelButton> maBTCancel;
- VclPtr<HelpButton> maBTHelp;
-
- FilterConfigItem maConfigItem;
- bool mbOldNativeDecoration;
-
- DECL_LINK( OnToggleCheckbox, CheckBox&, void );
-
-public:
-
- ImpSVGDialog( vcl::Window* pParent,
- css::uno::Sequence< css::beans::PropertyValue >& rFilterData );
- virtual ~ImpSVGDialog() override;
- virtual void dispose() override;
-
- css::uno::Sequence< css::beans::PropertyValue > const & GetFilterData();
-};
-
-#endif // INCLUDED_FILTER_SOURCE_SVG_IMPSVGDIALOG_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/svg/svgdialog.cxx b/filter/source/svg/svgdialog.cxx
deleted file mode 100644
index 71138a7d5291..000000000000
--- a/filter/source/svg/svgdialog.cxx
+++ /dev/null
@@ -1,199 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include "svgdialog.hxx"
-#include "impsvgdialog.hxx"
-
-#include <vcl/svapp.hxx>
-#include <vcl/dialog.hxx>
-#include <comphelper/processfactory.hxx>
-#include <cppuhelper/queryinterface.hxx>
-
-#include <com/sun/star/view/XRenderable.hpp>
-#include <com/sun/star/view/XSelectionSupplier.hpp>
-
-#define SVG_DIALOG_SERVICE_NAME "com.sun.star.comp.Draw.SVGFilterDialog"
-#define SVG_DIALOG_IMPLEMENTATION_NAME SVG_DIALOG_SERVICE_NAME
-#define SVG_FILTER_DATA_NAME "FilterData"
-
-using namespace ::com::sun::star;
-using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::lang;
-using namespace ::com::sun::star::beans;
-using namespace ::com::sun::star::view;
-using namespace ::com::sun::star::document;
-
-
-OUString SVGDialog_getImplementationName ()
-{
- return OUString ( SVG_DIALOG_IMPLEMENTATION_NAME );
-}
-
-
-Sequence< OUString > SVGDialog_getSupportedServiceNames()
-{
- Sequence< OUString > aRet { SVG_DIALOG_SERVICE_NAME };
- return aRet;
-}
-
-
-Reference< XInterface > SVGDialog_createInstance( const Reference< XMultiServiceFactory > & rSMgr )
-{
- return static_cast< cppu::OWeakObject* >( new SVGDialog( comphelper::getComponentContext(rSMgr) ) );
-}
-
-
-SVGDialog::SVGDialog( const Reference< XComponentContext > &rxContext ) :
- OGenericUnoDialog( rxContext )
-{
-}
-
-
-SVGDialog::~SVGDialog()
-{
-}
-
-
-Any SAL_CALL SVGDialog::queryInterface( const Type& rType )
-{
- Any aReturn( OGenericUnoDialog::queryInterface( rType ) );
-
- if( !aReturn.hasValue() )
- {
- aReturn = ::cppu::queryInterface( rType, static_cast< XPropertyAccess* >( this ),
- static_cast< XExporter* >( this ) );
- }
-
- return aReturn;
-}
-
-
-void SAL_CALL SVGDialog::acquire()
- throw ()
-{
- OWeakObject::acquire();
-}
-
-
-void SAL_CALL SVGDialog::release()
- throw ()
-{
- OWeakObject::release();
-}
-
-
-Sequence< sal_Int8 > SAL_CALL SVGDialog::getImplementationId()
-{
- return css::uno::Sequence<sal_Int8>();
-}
-
-
-OUString SAL_CALL SVGDialog::getImplementationName()
-{
- return SVGDialog_getImplementationName();
-}
-
-
-Sequence< OUString > SAL_CALL SVGDialog::getSupportedServiceNames()
-{
- return SVGDialog_getSupportedServiceNames();
-}
-
-svt::OGenericUnoDialog::Dialog SVGDialog::createDialog( vcl::Window* pParent )
-{
- if( mxSrcDoc.is() )
- return svt::OGenericUnoDialog::Dialog(VclPtr<ImpSVGDialog>::Create( pParent, maFilterData ));
- else
- return svt::OGenericUnoDialog::Dialog(VclPtr<::Dialog>());
-}
-
-void SVGDialog::executedDialog( sal_Int16 nExecutionResult )
-{
- if (nExecutionResult && m_aDialog)
- maFilterData = static_cast< ImpSVGDialog* >(m_aDialog.m_xVclDialog.get())->GetFilterData();
-
- destroyDialog();
-}
-
-
-Reference< XPropertySetInfo > SAL_CALL SVGDialog::getPropertySetInfo()
-{
- return createPropertySetInfo( getInfoHelper() );
-}
-
-
-::cppu::IPropertyArrayHelper& SVGDialog::getInfoHelper()
-{
- return *getArrayHelper();
-}
-
-
-::cppu::IPropertyArrayHelper* SVGDialog::createArrayHelper() const
-{
- Sequence< Property > aProps;
-
- describeProperties(aProps);
-
- return new ::cppu::OPropertyArrayHelper( aProps );
-}
-
-
-Sequence< PropertyValue > SAL_CALL SVGDialog::getPropertyValues()
-{
- sal_Int32 i, nCount;
-
- for( i = 0, nCount = maMediaDescriptor.getLength(); i < nCount; ++i )
- {
- if( maMediaDescriptor[ i ].Name == SVG_FILTER_DATA_NAME )
- break;
- }
-
- if( i == nCount )
- {
- maMediaDescriptor.realloc( ++nCount );
- maMediaDescriptor[ i ].Name = SVG_FILTER_DATA_NAME;
- }
-
- maMediaDescriptor[ i ].Value <<= maFilterData;
-
- return maMediaDescriptor;
-}
-
-
-void SAL_CALL SVGDialog::setPropertyValues( const Sequence< PropertyValue >& rProps )
-{
- maMediaDescriptor = rProps;
-
- for( sal_Int32 i = 0, nCount = maMediaDescriptor.getLength(); i < nCount; i++ )
- {
- if( maMediaDescriptor[ i ].Name == SVG_FILTER_DATA_NAME )
- {
- maMediaDescriptor[ i ].Value >>= maFilterData;
- break;
- }
- }
-}
-
-
-void SAL_CALL SVGDialog::setSourceDocument( const Reference< XComponent >& xDoc )
-{
- mxSrcDoc = xDoc;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/svg/svgdialog.hxx b/filter/source/svg/svgdialog.hxx
deleted file mode 100644
index 9016f0427ba4..000000000000
--- a/filter/source/svg/svgdialog.hxx
+++ /dev/null
@@ -1,85 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef INCLUDED_FILTER_SOURCE_SVG_SVGDIALOG_HXX
-#define INCLUDED_FILTER_SOURCE_SVG_SVGDIALOG_HXX
-
-#include <com/sun/star/beans/XPropertyAccess.hpp>
-#include <com/sun/star/document/XExporter.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-
-#include <svtools/genericunodialog.hxx>
-#include <memory>
-
-
-class SVGDialog final:
- public ::svt::OGenericUnoDialog,
- public ::comphelper::OPropertyArrayUsageHelper< SVGDialog >,
- public css::beans::XPropertyAccess,
- public css::document::XExporter
-{
-private:
-
- css::uno::Sequence< css::beans::PropertyValue > maMediaDescriptor;
- css::uno::Sequence< css::beans::PropertyValue > maFilterData;
- css::uno::Reference< css::lang::XComponent > mxSrcDoc;
-
- // XInterface
- virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type& aType ) override;
- virtual void SAL_CALL acquire() throw () override;
- virtual void SAL_CALL release() throw () override;
-
- // OGenericUnoDialog
- virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
- virtual OUString SAL_CALL getImplementationName() override;
- virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
- virtual svt::OGenericUnoDialog::Dialog createDialog( vcl::Window* pParent ) override;
- virtual void executedDialog( sal_Int16 nExecutionResult ) override;
- virtual css::uno::Reference< css::beans::XPropertySetInfo> SAL_CALL getPropertySetInfo() override;
- virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() override;
- virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const override;
-
- // XPropertyAccess
- using cppu::OPropertySetHelper::getPropertyValues;
- virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getPropertyValues( ) override;
- using cppu::OPropertySetHelper::setPropertyValues;
- virtual void SAL_CALL setPropertyValues( const css::uno::Sequence< css::beans::PropertyValue >& aProps ) override;
-
- // XExporter
- virtual void SAL_CALL setSourceDocument( const css::uno::Reference< css::lang::XComponent >& xDoc ) override;
-
-public:
-
- explicit SVGDialog( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
- virtual ~SVGDialog() override;
-};
-
-/// @throws css::uno::RuntimeException
-OUString SVGDialog_getImplementationName ();
-
-/// @throws css::uno::RuntimeException
-css::uno::Sequence< OUString > SVGDialog_getSupportedServiceNames( );
-
-/// @throws css::uno::Exception
-css::uno::Reference< css::uno::XInterface >
- SVGDialog_createInstance( const css::uno::Reference< css::lang::XMultiServiceFactory > & rSMgr);
-
-#endif // INCLUDED_FILTER_SOURCE_SVG_SVGDIALOG_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx
index b6878dba5ae9..8f9b0da7feee 100644
--- a/filter/source/svg/svgexport.cxx
+++ b/filter/source/svg/svgexport.cxx
@@ -21,7 +21,6 @@
#include "svgfontexport.hxx"
#include "svgfilter.hxx"
#include <svgscript.hxx>
-#include "impsvgdialog.hxx"
#include <com/sun/star/animations/XAnimationNodeSupplier.hpp>
#include <com/sun/star/drawing/XMasterPageTarget.hpp>
@@ -67,6 +66,13 @@ using namespace ::xmloff::token;
#define NSPREFIX "ooo:"
+#define SVG_PROP_TINYPROFILE "TinyMode"
+#define SVG_PROP_DTDSTRING "DTDString"
+#define SVG_PROP_EMBEDFONTS "EmbedFonts"
+#define SVG_PROP_NATIVEDECORATION "UseNativeTextDecoration"
+#define SVG_PROP_OPACITY "Opacity"
+#define SVG_PROP_POSITIONED_CHARACTERS "UsePositionedCharacters"
+
// ooo xml elements
static const char aOOOElemTextField[] = NSPREFIX "text_field";