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 _FILTER_CONFIG_CONSTANT_HXX_ 24 #define _FILTER_CONFIG_CONSTANT_HXX_ 25 26 #include "macros.hxx" 27 28 namespace filter { namespace config { 29 extern rtl::OUString pFilterStrings[]; 30 } } 31 #ifndef PROPNAME_IMPL_DECL 32 # define PROPNAME_DECL(index, str) (pFilterStrings[(index)]) 33 #else 34 # define PROPNAME_DECL(index, str) pFilterStrings[(index)] = _FILTER_CONFIG_FROM_ASCII_(str) 35 #endif 36 37 /* disable impl_loadOnDemand function of BaseContainer for certain 38 functions, where it the feature "impl_loadItemOnDemand() of class FilterCache 39 can be used instead of loadAll()!*/ 40 // #define LOAD_IMPLICIT 41 42 //_______________________________________________ 43 44 /** @short used to identify a some generic item properties against the 45 configuration API and can be used at all name containers 46 (based on this filtercache) too. 47 */ 48 #define PROPNAME_NAME PROPNAME_DECL(0, "Name") 49 50 /** @short used to identify a type item property against the 51 configuration API and can be used at all name containers 52 (based on this filtercache) too. 53 */ 54 #define PROPNAME_UINAME PROPNAME_DECL(1, "UIName" ) 55 #define PROPNAME_UINAMES PROPNAME_DECL(2, "UINames" ) 56 #define PROPNAME_PREFERRED PROPNAME_DECL(3, "Preferred" ) 57 #define PROPNAME_PREFERREDFILTER PROPNAME_DECL(4, "PreferredFilter" ) 58 #define PROPNAME_DETECTSERVICE PROPNAME_DECL(5, "DetectService" ) 59 #define PROPNAME_MEDIATYPE PROPNAME_DECL(6, "MediaType" ) 60 #define PROPNAME_CLIPBOARDFORMAT PROPNAME_DECL(7, "ClipboardFormat" ) 61 #define PROPNAME_URLPATTERN PROPNAME_DECL(8, "URLPattern" ) 62 #define PROPNAME_EXTENSIONS PROPNAME_DECL(9, "Extensions" ) 63 64 /** @short used to identify a filter item property against the 65 configuration API and can be used at all name containers 66 (based on this filtercache) too. 67 */ 68 #define PROPNAME_TYPE PROPNAME_DECL(10, "Type" ) 69 #define PROPNAME_DOCUMENTSERVICE PROPNAME_DECL(11, "DocumentService" ) 70 #define PROPNAME_FILTERSERVICE PROPNAME_DECL(12, "FilterService" ) 71 #define PROPNAME_UICOMPONENT PROPNAME_DECL(13, "UIComponent" ) 72 #define PROPNAME_FLAGS PROPNAME_DECL(14, "Flags" ) 73 #define PROPNAME_USERDATA PROPNAME_DECL(15, "UserData" ) 74 #define PROPNAME_TEMPLATENAME PROPNAME_DECL(16, "TemplateName" ) 75 #define PROPNAME_FILEFORMATVERSION PROPNAME_DECL(17, "FileFormatVersion") 76 77 /** @short used to identify a frame loader or detect service item 78 property against the configuration API and can be used 79 at all name containers (based on this filtercache) too. 80 */ 81 #define PROPNAME_TYPES PROPNAME_DECL(18, "Types") 82 83 /** @short used to identify the list of sorted filters for a specific 84 office module 85 */ 86 #define PROPNAME_SORTEDFILTERLIST _FILTER_CONFIG_FROM_ASCII_("SortedFilterList") 87 88 /** @short implicit properties. which are used at the container interface only. 89 */ 90 #define PROPNAME_FINALIZED _FILTER_CONFIG_FROM_ASCII_("Finalized") 91 #define PROPNAME_MANDATORY _FILTER_CONFIG_FROM_ASCII_("Mandatory") 92 93 /** @short used to identify a set of items against the configuration API. */ 94 #define CFGSET_TYPES _FILTER_CONFIG_FROM_ASCII_("Types" ) 95 #define CFGSET_FILTERS _FILTER_CONFIG_FROM_ASCII_("Filters" ) 96 #define CFGSET_FRAMELOADERS _FILTER_CONFIG_FROM_ASCII_("FrameLoaders" ) 97 #define CFGSET_CONTENTHANDLERS _FILTER_CONFIG_FROM_ASCII_("ContentHandlers") 98 99 /** @short used to address some configuration keys directly. 100 101 @descr Such direct keys should be used with function 102 FilterCache::impl_getDirectCFGValue() only! 103 104 @TODO define these direct keys ... 105 */ 106 #define CFGDIRECTKEY_OFFICELOCALE _FILTER_CONFIG_FROM_ASCII_("/org.openoffice.Setup/L10N/ooLocale" ) 107 #define CFGDIRECTKEY_DEFAULTFRAMELOADER _FILTER_CONFIG_FROM_ASCII_("/org.openoffice.TypeDetection.Misc/Defaults/DefaultFrameLoader") 108 #define CFGDIRECTKEY_OFFICELOCALE _FILTER_CONFIG_FROM_ASCII_("/org.openoffice.Setup/L10N/ooLocale" ) 109 #define CFGDIRECTKEY_FORMATNAME _FILTER_CONFIG_FROM_ASCII_("/org.openoffice.Setup/Product/ooXMLFileFormatName" ) 110 #define CFGDIRECTKEY_FORMATVERSION _FILTER_CONFIG_FROM_ASCII_("/org.openoffice.Setup/Product/ooXMLFileFormatVersion" ) 111 #define CFGDIRECTKEY_PRODUCTNAME _FILTER_CONFIG_FROM_ASCII_("/org.openoffice.Setup/Product/ooName" ) 112 113 /** @short names of filter flags, sorted in alphabetical order */ 114 #define FLAGNAME_3RDPARTYFILTER _FILTER_CONFIG_FROM_ASCII_("3RDPARTYFILTER" ) 115 #define FLAGNAME_ALIEN _FILTER_CONFIG_FROM_ASCII_("ALIEN" ) 116 #define FLAGNAME_ASYNCHRON _FILTER_CONFIG_FROM_ASCII_("ASYNCHRON" ) 117 #define FLAGNAME_BROWSERPREFERRED _FILTER_CONFIG_FROM_ASCII_("BROWSERPREFERRED" ) 118 #define FLAGNAME_CONSULTSERVICE _FILTER_CONFIG_FROM_ASCII_("CONSULTSERVICE" ) 119 #define FLAGNAME_DEFAULT _FILTER_CONFIG_FROM_ASCII_("DEFAULT" ) 120 #define FLAGNAME_ENCRYPTION _FILTER_CONFIG_FROM_ASCII_("ENCRYPTION" ) 121 #define FLAGNAME_EXPORT _FILTER_CONFIG_FROM_ASCII_("EXPORT" ) 122 #define FLAGNAME_IMPORT _FILTER_CONFIG_FROM_ASCII_("IMPORT" ) 123 #define FLAGNAME_INTERNAL _FILTER_CONFIG_FROM_ASCII_("INTERNAL" ) 124 #define FLAGNAME_NOTINCHOOSER _FILTER_CONFIG_FROM_ASCII_("NOTINCHOOSER" ) 125 #define FLAGNAME_NOTINFILEDIALOG _FILTER_CONFIG_FROM_ASCII_("NOTINFILEDIALOG" ) 126 #define FLAGNAME_NOTINSTALLED _FILTER_CONFIG_FROM_ASCII_("NOTINSTALLED" ) 127 #define FLAGNAME_OWN _FILTER_CONFIG_FROM_ASCII_("OWN" ) 128 #define FLAGNAME_PACKED _FILTER_CONFIG_FROM_ASCII_("PACKED" ) 129 #define FLAGNAME_PASSWORDTOMODIFY _FILTER_CONFIG_FROM_ASCII_("PASSWORDTOMODIFY" ) 130 #define FLAGNAME_PREFERRED _FILTER_CONFIG_FROM_ASCII_("PREFERRED" ) 131 #define FLAGNAME_READONLY _FILTER_CONFIG_FROM_ASCII_("READONLY" ) 132 #define FLAGNAME_SUPPORTSSELECTION _FILTER_CONFIG_FROM_ASCII_("SUPPORTSSELECTION") 133 #define FLAGNAME_TEMPLATE _FILTER_CONFIG_FROM_ASCII_("TEMPLATE" ) 134 #define FLAGNAME_TEMPLATEPATH _FILTER_CONFIG_FROM_ASCII_("TEMPLATEPATH" ) 135 #define FLAGNAME_USESOPTIONS _FILTER_CONFIG_FROM_ASCII_("USESOPTIONS" ) 136 #define FLAGNAME_COMBINED _FILTER_CONFIG_FROM_ASCII_("COMBINED" ) 137 138 /** @short values of filter flags, sorted based on value */ 139 #define FLAGVAL_IMPORT 0x00000001 // 1 140 #define FLAGVAL_EXPORT 0x00000002 // 2 141 #define FLAGVAL_TEMPLATE 0x00000004 // 4 142 #define FLAGVAL_INTERNAL 0x00000008 // 8 143 #define FLAGVAL_TEMPLATEPATH 0x00000010 // 16 144 #define FLAGVAL_OWN 0x00000020 // 32 145 #define FLAGVAL_ALIEN 0x00000040 // 64 146 #define FLAGVAL_USESOPTIONS 0x00000080 // 128 147 #define FLAGVAL_DEFAULT 0x00000100 // 256 148 #define FLAGVAL_SUPPORTSSELECTION 0x00000400 // 1024 149 #define FLAGVAL_NOTINFILEDIALOG 0x00001000 // 4096 150 #define FLAGVAL_NOTINCHOOSER 0x00002000 // 8192 151 #define FLAGVAL_ASYNCHRON 0x00004000 // 16384 152 #define FLAGVAL_READONLY 0x00010000 // 65536 153 #define FLAGVAL_NOTINSTALLED 0x00020000 // 131072 154 #define FLAGVAL_CONSULTSERVICE 0x00040000 // 262144 155 #define FLAGVAL_3RDPARTYFILTER 0x00080000 // 524288 156 #define FLAGVAL_PACKED 0x00100000 // 1048576 157 #define FLAGVAL_BROWSERPREFERRED 0x00400000 // 4194304 158 #define FLAGVAL_COMBINED 0x00800000 // 8388608 159 #define FLAGVAL_ENCRYPTION 0x01000000 // 16777216 160 #define FLAGVAL_PASSWORDTOMODIFY 0x02000000 // 33554432 161 #define FLAGVAL_PREFERRED 0x10000000 // 268435456 162 #define FLAGVAL_ALL 0xffffffff // 4294967295 163 164 /** @short uno service names of our document services 165 provided by our application modules. 166 */ 167 #define DOCUMENTSERVICE_WRITER _FILTER_CONFIG_FROM_ASCII_("com.sun.star.text.TextDocument" ) 168 #define DOCUMENTSERVICE_WRITER_WEB _FILTER_CONFIG_FROM_ASCII_("com.sun.star.text.WebDocument" ) 169 #define DOCUMENTSERVICE_WRITER_GLOBAL _FILTER_CONFIG_FROM_ASCII_("com.sun.star.text.GlobalDocument" ) 170 #define DOCUMENTSERVICE_CALC _FILTER_CONFIG_FROM_ASCII_("com.sun.star.sheet.SpreadsheetDocument" ) 171 #define DOCUMENTSERVICE_DRAW _FILTER_CONFIG_FROM_ASCII_("com.sun.star.drawing.DrawingDocument" ) 172 #define DOCUMENTSERVICE_IMPRESS _FILTER_CONFIG_FROM_ASCII_("com.sun.star.presentation.PresentationDocument") 173 #define DOCUMENTSERVICE_CHART _FILTER_CONFIG_FROM_ASCII_("com.sun.star.chart2.ChartDocument" ) 174 #define DOCUMENTSERVICE_MATH _FILTER_CONFIG_FROM_ASCII_("com.sun.star.formula.FormulaProperties" ) 175 176 /** @short some uno service names. 177 */ 178 #define SERVICE_CONFIGURATIONPROVIDER _FILTER_CONFIG_FROM_ASCII_("com.sun.star.configuration.ConfigurationProvider" ) 179 #define SERVICE_CONFIGURATIONUPDATEACCESS _FILTER_CONFIG_FROM_ASCII_("com.sun.star.configuration.ConfigurationUpdateAccess" ) 180 #define SERVICE_CONFIGURATIONACCESS _FILTER_CONFIG_FROM_ASCII_("com.sun.star.configuration.ConfigurationAccess" ) 181 #define SERVICE_URLTRANSFORMER _FILTER_CONFIG_FROM_ASCII_("com.sun.star.util.URLTransformer" ) 182 #define SERVICE_FILTERCONFIGREFRESH _FILTER_CONFIG_FROM_ASCII_("com.sun.star.document.FilterConfigRefresh" ) 183 184 /** @short some configuration paths. 185 */ 186 #define CFGPACKAGE_TD_TYPES _FILTER_CONFIG_FROM_ASCII_("/org.openoffice.TypeDetection.Types" ) 187 #define CFGPACKAGE_TD_FILTERS _FILTER_CONFIG_FROM_ASCII_("/org.openoffice.TypeDetection.Filter") 188 #define CFGPACKAGE_TD_OTHERS _FILTER_CONFIG_FROM_ASCII_("/org.openoffice.TypeDetection.Misc" ) 189 #define CFGPACKAGE_TD_UISORT _FILTER_CONFIG_FROM_ASCII_("/org.openoffice.TypeDetection.UISort/ModuleDependendFilterOrder") 190 #define CFGPACKAGE_TD_OLD _FILTER_CONFIG_FROM_ASCII_("/org.openoffice.Office.TypeDetection") 191 #define CFGPACKAGE_OOO_MODULES _FILTER_CONFIG_FROM_ASCII_("/org.openoffice.Setup/Office/Factories") 192 193 /** @short some default values. 194 */ 195 #define DEFAULT_OFFICELOCALE _FILTER_CONFIG_FROM_ASCII_("en-US") 196 #define DEFAULT_FORMATNAME _FILTER_CONFIG_FROM_ASCII_("OpenOffice.org XML") 197 #define DEFAULT_FORMATVERSION _FILTER_CONFIG_FROM_ASCII_("1.0") 198 199 /** @short used for the queries of the FilterFactory service. 200 */ 201 #define QUERY_IDENTIFIER_MATCHBYDOCUMENTSERVICE _FILTER_CONFIG_FROM_ASCII_("matchByDocumentService" ) 202 #define QUERY_IDENTIFIER_GETPREFERREDFILTERFORTYPE _FILTER_CONFIG_FROM_ASCII_("getDefaultFilterForType") 203 #define QUERY_IDENTIFIER_GET_SORTED_FILTERLIST _FILTER_CONFIG_FROM_ASCII_("getSortedFilterList()" ) 204 205 #define QUERY_PARAM_IFLAGS _FILTER_CONFIG_FROM_ASCII_("iflags") 206 #define QUERY_PARAM_EFLAGS _FILTER_CONFIG_FROM_ASCII_("eflags") 207 #define QUERY_PARAM_MODULE _FILTER_CONFIG_FROM_ASCII_("module") 208 #define QUERY_PARAM_DEFAULTFIRST _FILTER_CONFIG_FROM_ASCII_("default_first") 209 #define QUERY_CONSTVALUE_ALL _FILTER_CONFIG_FROM_ASCII_("all") 210 211 #endif // _FILTER_CONFIG_CONSTANT_HXX_ 212