1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 #ifndef SW_VBA_OPTIONS_HXX 24 #define SW_VBA_OPTIONS_HXX 25 26 #include <ooo/vba/word/XOptions.hpp> 27 #include <vbahelper/vbahelperinterface.hxx> 28 #include <cppuhelper/implbase1.hxx> 29 #include <vbahelper/vbapropvalue.hxx> 30 #include <comphelper/processfactory.hxx> 31 32 typedef InheritedHelperInterfaceImpl1< ooo::vba::word::XOptions > SwVbaOptions_BASE; 33 34 class SwVbaOptions : public SwVbaOptions_BASE, 35 public PropListener 36 { 37 private: 38 rtl::OUString msDefaultFilePath; 39 css::uno::Reference< css::lang::XMultiServiceFactory > mxFactory; 40 public: 41 SwVbaOptions( css::uno::Reference< css::uno::XComponentContext >& m_xContext ); 42 virtual ~SwVbaOptions(); 43 44 // Attributes 45 virtual ::sal_Int32 SAL_CALL getDefaultBorderLineStyle(); 46 virtual void SAL_CALL setDefaultBorderLineStyle( ::sal_Int32 _defaultborderlinestyle ); 47 virtual ::sal_Int32 SAL_CALL getDefaultBorderLineWidth(); 48 virtual void SAL_CALL setDefaultBorderLineWidth( ::sal_Int32 _defaultborderlinewidth ); 49 virtual ::sal_Int32 SAL_CALL getDefaultBorderColorIndex(); 50 virtual void SAL_CALL setDefaultBorderColorIndex( ::sal_Int32 _defaultbordercolorindex ); 51 virtual ::sal_Bool SAL_CALL getReplaceSelection(); 52 virtual void SAL_CALL setReplaceSelection( ::sal_Bool _replaceselection ); 53 virtual ::sal_Bool SAL_CALL getMapPaperSize(); 54 virtual void SAL_CALL setMapPaperSize( ::sal_Bool _mappapersize ); 55 virtual ::sal_Bool SAL_CALL getAutoFormatAsYouTypeApplyHeadings(); 56 virtual void SAL_CALL setAutoFormatAsYouTypeApplyHeadings( ::sal_Bool _autoformatasyoutypeapplyheadings ); 57 virtual ::sal_Bool SAL_CALL getAutoFormatAsYouTypeApplyBulletedLists(); 58 virtual void SAL_CALL setAutoFormatAsYouTypeApplyBulletedLists( ::sal_Bool _autoformatasyoutypeapplybulletedlists ); 59 virtual ::sal_Bool SAL_CALL getAutoFormatAsYouTypeApplyNumberedLists(); 60 virtual void SAL_CALL setAutoFormatAsYouTypeApplyNumberedLists( ::sal_Bool _autoformatasyoutypeapplynumberedlists ); 61 virtual ::sal_Bool SAL_CALL getAutoFormatAsYouTypeFormatListItemBeginning(); 62 virtual void SAL_CALL setAutoFormatAsYouTypeFormatListItemBeginning( ::sal_Bool _autoformatasyoutypeformatlistitembeginning ); 63 virtual ::sal_Bool SAL_CALL getAutoFormatAsYouTypeDefineStyles(); 64 virtual void SAL_CALL setAutoFormatAsYouTypeDefineStyles( ::sal_Bool _autoformatasyoutypedefinestyles ); 65 virtual ::sal_Bool SAL_CALL getAutoFormatApplyHeadings(); 66 virtual void SAL_CALL setAutoFormatApplyHeadings( ::sal_Bool _autoformatapplyheadings ); 67 virtual ::sal_Bool SAL_CALL getAutoFormatApplyLists(); 68 virtual void SAL_CALL setAutoFormatApplyLists( ::sal_Bool _autoformatapplylists ); 69 virtual ::sal_Bool SAL_CALL getAutoFormatApplyBulletedLists(); 70 virtual void SAL_CALL setAutoFormatApplyBulletedLists( ::sal_Bool _autoformatapplybulletedlists ); 71 72 // Methods 73 virtual css::uno::Any SAL_CALL DefaultFilePath( sal_Int32 _path ); 74 75 //PropListener 76 virtual void setValueEvent( const css::uno::Any& value ); 77 virtual css::uno::Any getValueEvent(); 78 79 // XHelperInterface 80 virtual rtl::OUString& getServiceImplName(); 81 virtual css::uno::Sequence<rtl::OUString> getServiceNames(); 82 }; 83 #endif /* SW_VBA_OPTIONS_HXX */ 84