mirror of
https://gitee.com/kekingcn/file-online-preview.git
synced 2026-04-05 15:57:35 +00:00
更新windows内置office目录名, 适配jodconverter
This commit is contained in:
48
server/libreoffice/program/wizards/fax/CGFax.py
Normal file
48
server/libreoffice/program/wizards/fax/CGFax.py
Normal file
@@ -0,0 +1,48 @@
|
||||
#
|
||||
# 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 .
|
||||
#
|
||||
from ..common.ConfigGroup import ConfigGroup
|
||||
|
||||
class CGFax(ConfigGroup):
|
||||
|
||||
def __init__(self):
|
||||
|
||||
self.cp_Style = int()
|
||||
self.cp_PrintCompanyLogo = bool()
|
||||
self.cp_PrintDate = bool()
|
||||
self.cp_PrintSubjectLine = bool()
|
||||
self.cp_PrintSalutation = bool()
|
||||
self.cp_PrintCommunicationType = bool()
|
||||
self.cp_PrintGreeting = bool()
|
||||
self.cp_PrintFooter = bool()
|
||||
self.cp_CommunicationType = str()
|
||||
self.cp_Salutation = str()
|
||||
self.cp_Greeting = str()
|
||||
self.cp_SenderAddressType = int()
|
||||
self.cp_SenderCompanyName = str()
|
||||
self.cp_SenderStreet = str()
|
||||
self.cp_SenderPostCode = str()
|
||||
self.cp_SenderState = str()
|
||||
self.cp_SenderCity = str()
|
||||
self.cp_SenderFax = str()
|
||||
self.cp_ReceiverAddressType = int()
|
||||
self.cp_Footer = str()
|
||||
self.cp_FooterOnlySecondPage = bool()
|
||||
self.cp_FooterPageNumbers = bool()
|
||||
self.cp_CreationType = int()
|
||||
self.cp_TemplateName = str()
|
||||
self.cp_TemplatePath = str()
|
||||
27
server/libreoffice/program/wizards/fax/CGFaxWizard.py
Normal file
27
server/libreoffice/program/wizards/fax/CGFaxWizard.py
Normal file
@@ -0,0 +1,27 @@
|
||||
#
|
||||
# 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 .
|
||||
#
|
||||
from .CGFax import CGFax
|
||||
from ..common.ConfigGroup import ConfigGroup
|
||||
|
||||
class CGFaxWizard(ConfigGroup):
|
||||
|
||||
def __init__(self):
|
||||
self.cp_FaxType = int()
|
||||
self.cp_BusinessFax = CGFax()
|
||||
self.cp_PrivateFax = CGFax()
|
||||
|
||||
75
server/libreoffice/program/wizards/fax/CallWizard.py
Normal file
75
server/libreoffice/program/wizards/fax/CallWizard.py
Normal file
@@ -0,0 +1,75 @@
|
||||
#
|
||||
# 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 .
|
||||
#
|
||||
import unohelper
|
||||
import traceback
|
||||
|
||||
from .FaxWizardDialogImpl import FaxWizardDialogImpl, Desktop
|
||||
|
||||
from com.sun.star.lang import XServiceInfo
|
||||
from com.sun.star.task import XJobExecutor
|
||||
|
||||
# pythonloader looks for a static g_ImplementationHelper variable
|
||||
g_ImplementationHelper = unohelper.ImplementationHelper()
|
||||
g_implName = "com.sun.star.wizards.fax.CallWizard"
|
||||
|
||||
# implement a UNO component by deriving from the standard unohelper.Base class
|
||||
# and from the interface(s) you want to implement.
|
||||
class CallWizard(unohelper.Base, XJobExecutor, XServiceInfo):
|
||||
def __init__(self, ctx):
|
||||
# store the component context for later use
|
||||
self.ctx = ctx
|
||||
|
||||
def trigger(self, args):
|
||||
try:
|
||||
fw = FaxWizardDialogImpl(self.ctx.ServiceManager)
|
||||
fw.startWizard(self.ctx.ServiceManager)
|
||||
except Exception as e:
|
||||
print ("Wizard failure exception " + str(type(e)) +
|
||||
" message " + str(e) + " args " + str(e.args) +
|
||||
traceback.format_exc())
|
||||
|
||||
@classmethod
|
||||
def callRemote(self):
|
||||
#Call the wizard remotely(see README)
|
||||
try:
|
||||
ConnectStr = \
|
||||
"uno:socket,host=localhost,port=2002;urp;StarOffice.ComponentContext"
|
||||
xLocMSF = Desktop.connect(ConnectStr)
|
||||
lw = FaxWizardDialogImpl(xLocMSF)
|
||||
lw.startWizard(xLocMSF)
|
||||
except Exception as e:
|
||||
print ("Wizard failure exception " + str(type(e)) +
|
||||
" message " + str(e) + " args " + str(e.args) +
|
||||
traceback.format_exc())
|
||||
|
||||
def getImplementationName(self):
|
||||
return g_implName
|
||||
|
||||
def supportsService(self, ServiceName):
|
||||
return g_ImplementationHelper.supportsService(g_implName, ServiceName)
|
||||
|
||||
def getSupportedServiceNames(self):
|
||||
return g_ImplementationHelper.getSupportedServiceNames(g_implName)
|
||||
|
||||
g_ImplementationHelper.addImplementation( \
|
||||
CallWizard, # UNO object class
|
||||
g_implName, # implementation name
|
||||
("com.sun.star.task.Job",),) # list of implemented services
|
||||
# (the only service)
|
||||
|
||||
# vim:set shiftwidth=4 softtabstop=4 expandtab:
|
||||
142
server/libreoffice/program/wizards/fax/FaxDocument.py
Normal file
142
server/libreoffice/program/wizards/fax/FaxDocument.py
Normal file
@@ -0,0 +1,142 @@
|
||||
#
|
||||
# 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 .
|
||||
#
|
||||
from ..text.TextDocument import TextDocument, traceback, \
|
||||
TextFieldHandler, Configuration
|
||||
from ..text.TextSectionHandler import TextSectionHandler
|
||||
|
||||
from com.sun.star.text.ControlCharacter import PARAGRAPH_BREAK
|
||||
from com.sun.star.style.ParagraphAdjust import CENTER
|
||||
from com.sun.star.text.PageNumberType import CURRENT
|
||||
from com.sun.star.style.NumberingType import ARABIC
|
||||
|
||||
class FaxDocument(TextDocument):
|
||||
|
||||
def __init__(self, xMSF, listener):
|
||||
super(FaxDocument,self).__init__(xMSF, listener, None,
|
||||
"WIZARD_LIVE_PREVIEW")
|
||||
self.keepLogoFrame = True
|
||||
self.keepTypeFrame = True
|
||||
|
||||
def switchElement(self, sElement, bState):
|
||||
try:
|
||||
mySectionHandler = TextSectionHandler(self.xMSF,
|
||||
self.xTextDocument)
|
||||
oSection = \
|
||||
mySectionHandler.xTextDocument.TextSections.getByName(sElement)
|
||||
oSection.IsVisible = bState
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
|
||||
def updateDateFields(self):
|
||||
FH = TextFieldHandler(
|
||||
self.xTextDocument, self.xTextDocument)
|
||||
FH.updateDateFields()
|
||||
|
||||
def switchFooter(self, sPageStyle, bState, bPageNumber, sText):
|
||||
if self.xTextDocument is not None:
|
||||
try:
|
||||
self.xTextDocument.lockControllers()
|
||||
xPageStyleCollection = \
|
||||
self.xTextDocument.StyleFamilies.getByName("PageStyles")
|
||||
xPageStyle = xPageStyleCollection.getByName(sPageStyle)
|
||||
|
||||
if bState:
|
||||
xPageStyle.setPropertyValue("FooterIsOn", True)
|
||||
xFooterText = xPageStyle.FooterText
|
||||
xFooterText.String = sText
|
||||
|
||||
if bPageNumber:
|
||||
#Adding the Page Number
|
||||
myCursor = xFooterText.Text.createTextCursor()
|
||||
myCursor.gotoEnd(False)
|
||||
xFooterText.insertControlCharacter(myCursor,
|
||||
PARAGRAPH_BREAK, False)
|
||||
myCursor.setPropertyValue("ParaAdjust", CENTER )
|
||||
|
||||
xPageNumberField = \
|
||||
self.xTextDocument.createInstance(
|
||||
"com.sun.star.text.TextField.PageNumber")
|
||||
xPageNumberField.setPropertyValue("SubType", CURRENT)
|
||||
xPageNumberField.NumberingType = ARABIC
|
||||
xFooterText.insertTextContent(xFooterText.End,
|
||||
xPageNumberField, False)
|
||||
else:
|
||||
xPageStyle.FooterIsOn = False
|
||||
|
||||
self.xTextDocument.unlockControllers()
|
||||
except Exception:
|
||||
self.xTextDocument.lockControllers()
|
||||
traceback.print_exc()
|
||||
|
||||
def hasElement(self, sElement):
|
||||
if self.xTextDocument is not None:
|
||||
mySectionHandler = TextSectionHandler(self.xMSF,
|
||||
self.xTextDocument)
|
||||
return mySectionHandler.hasTextSectionByName(sElement)
|
||||
else:
|
||||
return False
|
||||
|
||||
def switchUserField(self, sFieldName, sNewContent, bState):
|
||||
myFieldHandler = TextFieldHandler( self.xMSF, self.xTextDocument)
|
||||
if bState:
|
||||
myFieldHandler.changeUserFieldContent(sFieldName, sNewContent)
|
||||
else:
|
||||
myFieldHandler.changeUserFieldContent(sFieldName, "")
|
||||
|
||||
def fillSenderWithUserData(self):
|
||||
try:
|
||||
myFieldHandler = TextFieldHandler(self.xTextDocument,
|
||||
self.xTextDocument)
|
||||
oUserDataAccess = Configuration.getConfigurationRoot(
|
||||
self.xMSF, "org.openoffice.UserProfile/Data", False)
|
||||
myFieldHandler.changeUserFieldContent(
|
||||
"Company", oUserDataAccess.getByName("o"))
|
||||
myFieldHandler.changeUserFieldContent(
|
||||
"Street", oUserDataAccess.getByName("street"))
|
||||
myFieldHandler.changeUserFieldContent(
|
||||
"PostCode", oUserDataAccess.getByName("postalcode"))
|
||||
myFieldHandler.changeUserFieldContent(
|
||||
"State", oUserDataAccess.getByName("st"))
|
||||
myFieldHandler.changeUserFieldContent(
|
||||
"City", oUserDataAccess.getByName("l"))
|
||||
myFieldHandler.changeUserFieldContent(
|
||||
"Fax", oUserDataAccess.getByName("facsimiletelephonenumber"))
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
|
||||
def killEmptyUserFields(self):
|
||||
myFieldHandler = TextFieldHandler(
|
||||
self.xMSF, self.xTextDocument)
|
||||
myFieldHandler.removeUserFieldByContent()
|
||||
|
||||
def killEmptyFrames(self):
|
||||
try:
|
||||
if not self.keepLogoFrame:
|
||||
xTF = self.getFrameByName("Company Logo",
|
||||
self.xTextDocument)
|
||||
if xTF is not None:
|
||||
xTF.dispose()
|
||||
|
||||
if not self.keepTypeFrame:
|
||||
xTF = self.getFrameByName("Communication Type",
|
||||
self.xTextDocument)
|
||||
if xTF is not None:
|
||||
xTF.dispose()
|
||||
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
660
server/libreoffice/program/wizards/fax/FaxWizardDialog.py
Normal file
660
server/libreoffice/program/wizards/fax/FaxWizardDialog.py
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,99 @@
|
||||
#
|
||||
# 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 .
|
||||
#
|
||||
from ..common.HelpIds import HelpIds
|
||||
|
||||
HID = 41119 #enter first hid here
|
||||
HIDMAIN = 41180
|
||||
|
||||
class FaxWizardDialogConst:
|
||||
|
||||
OPTBUSINESSFAX_ITEM_CHANGED = "optBusinessFaxItemChanged"
|
||||
LSTBUSINESSSTYLE_ACTION_PERFORMED = None
|
||||
LSTBUSINESSSTYLE_ITEM_CHANGED = "lstBusinessStyleItemChanged"
|
||||
OPTPRIVATEFAX_ITEM_CHANGED = "optPrivateFaxItemChanged"
|
||||
LSTPRIVATESTYLE_ACTION_PERFORMED = None
|
||||
LSTPRIVATESTYLE_ITEM_CHANGED = "lstPrivateStyleItemChanged"
|
||||
CHKUSELOGO_ITEM_CHANGED = "chkUseLogoItemChanged"
|
||||
CHKUSEDATE_ITEM_CHANGED = "chkUseDateItemChanged"
|
||||
CHKUSECOMMUNICATIONTYPE_ITEM_CHANGED = "chkUseCommunicationItemChanged"
|
||||
LSTCOMMUNICATIONTYPE_ACTION_PERFORMED = None
|
||||
LSTCOMMUNICATIONTYPE_ITEM_CHANGED = "lstCommunicationItemChanged"
|
||||
LSTCOMMUNICATIONTYPE_TEXT_CHANGED = "lstCommunicationItemChanged"
|
||||
CHKUSESUBJECT_ITEM_CHANGED = "chkUseSubjectItemChanged"
|
||||
CHKUSESALUTATION_ITEM_CHANGED = "chkUseSalutationItemChanged"
|
||||
LSTSALUTATION_ACTION_PERFORMED = None
|
||||
LSTSALUTATION_ITEM_CHANGED = "lstSalutationItemChanged"
|
||||
LSTSALUTATION_TEXT_CHANGED = "lstSalutationItemChanged"
|
||||
CHKUSEGREETING_ITEM_CHANGED = "chkUseGreetingItemChanged"
|
||||
LSTGREETING_ACTION_PERFORMED = None
|
||||
LSTGREETING_ITEM_CHANGED = "lstGreetingItemChanged"
|
||||
LSTGREETING_TEXT_CHANGED = "lstGreetingItemChanged"
|
||||
CHKUSEFOOTER_ITEM_CHANGED = "chkUseFooterItemChanged"
|
||||
OPTSENDERPLACEHOLDER_ITEM_CHANGED = "optSenderPlaceholderItemChanged"
|
||||
OPTSENDERDEFINE_ITEM_CHANGED = "optSenderDefineItemChanged"
|
||||
TXTSENDERNAME_TEXT_CHANGED = "txtSenderNameTextChanged"
|
||||
TXTSENDERSTREET_TEXT_CHANGED = "txtSenderStreetTextChanged"
|
||||
TXTSENDERPOSTCODE_TEXT_CHANGED = "txtSenderPostCodeTextChanged"
|
||||
TXTSENDERSTATE_TEXT_CHANGED = "txtSenderStateTextChanged"
|
||||
TXTSENDERCITY_TEXT_CHANGED = "txtSenderCityTextChanged"
|
||||
TXTSENDERFAX_TEXT_CHANGED = "txtSenderFaxTextChanged"
|
||||
OPTRECEIVERPLACEHOLDER_ITEM_CHANGED = "optReceiverPlaceholderItemChanged"
|
||||
OPTRECEIVERDATABASE_ITEM_CHANGED = "optReceiverDatabaseItemChanged"
|
||||
TXTFOOTER_TEXT_CHANGED = "txtFooterTextChanged"
|
||||
CHKFOOTERNEXTPAGES_ITEM_CHANGED = "chkFooterNextPagesItemChanged"
|
||||
CHKFOOTERPAGENUMBERS_ITEM_CHANGED = "chkFooterPageNumbersItemChanged"
|
||||
TXTTEMPLATENAME_TEXT_CHANGED = "txtTemplateNameTextChanged"
|
||||
FILETEMPLATEPATH_TEXT_CHANGED = None
|
||||
OPTCREATEFAX_ITEM_CHANGED = "optCreateFromTemplateItemChanged"
|
||||
OPTMAKECHANGES_ITEM_CHANGED = "optMakeChangesItemChanged"
|
||||
|
||||
#Help IDs
|
||||
|
||||
OPTBUSINESSFAX_HID = HelpIds.getHelpIdString(HID + 1)
|
||||
LSTBUSINESSSTYLE_HID = HelpIds.getHelpIdString(HID + 2)
|
||||
OPTPRIVATEFAX_HID = HelpIds.getHelpIdString(HID + 3)
|
||||
LSTPRIVATESTYLE_HID = HelpIds.getHelpIdString(HID + 4)
|
||||
IMAGECONTROL3_HID = HelpIds.getHelpIdString(HID + 5)
|
||||
CHKUSELOGO_HID = HelpIds.getHelpIdString(HID + 6)
|
||||
CHKUSEDATE_HID = HelpIds.getHelpIdString(HID + 7)
|
||||
CHKUSECOMMUNICATIONTYPE_HID = HelpIds.getHelpIdString(HID + 8)
|
||||
LSTCOMMUNICATIONTYPE_HID = HelpIds.getHelpIdString(HID + 9)
|
||||
CHKUSESUBJECT_HID = HelpIds.getHelpIdString(HID + 10)
|
||||
CHKUSESALUTATION_HID = HelpIds.getHelpIdString(HID + 11)
|
||||
LSTSALUTATION_HID = HelpIds.getHelpIdString(HID + 12)
|
||||
CHKUSEGREETING_HID = HelpIds.getHelpIdString(HID + 13)
|
||||
LSTGREETING_HID = HelpIds.getHelpIdString(HID + 14)
|
||||
CHKUSEFOOTER_HID = HelpIds.getHelpIdString(HID + 15)
|
||||
OPTSENDERPLACEHOLDER_HID = HelpIds.getHelpIdString(HID + 16)
|
||||
OPTSENDERDEFINE_HID = HelpIds.getHelpIdString(HID + 17)
|
||||
TXTSENDERNAME_HID = HelpIds.getHelpIdString(HID + 18)
|
||||
TXTSENDERSTREET_HID = HelpIds.getHelpIdString(HID + 19)
|
||||
TXTSENDERPOSTCODE_HID = HelpIds.getHelpIdString(HID + 20)
|
||||
TXTSENDERSTATE_HID = HelpIds.getHelpIdString(HID + 21)
|
||||
TXTSENDERCITY_HID = HelpIds.getHelpIdString(HID + 22)
|
||||
TXTSENDERFAX_HID = HelpIds.getHelpIdString(HID + 23)
|
||||
OPTRECEIVERPLACEHOLDER_HID = HelpIds.getHelpIdString(HID + 24)
|
||||
OPTRECEIVERDATABASE_HID = HelpIds.getHelpIdString(HID + 25)
|
||||
TXTFOOTER_HID = HelpIds.getHelpIdString(HID + 26)
|
||||
CHKFOOTERNEXTPAGES_HID = HelpIds.getHelpIdString(HID + 27)
|
||||
CHKFOOTERPAGENUMBERS_HID = HelpIds.getHelpIdString(HID + 28)
|
||||
TXTTEMPLATENAME_HID = HelpIds.getHelpIdString(HID + 29)
|
||||
FILETEMPLATEPATH_HID = HelpIds.getHelpIdString(HID + 30)
|
||||
OPTCREATEFAX_HID = HelpIds.getHelpIdString(HID + 31)
|
||||
OPTMAKECHANGES_HID = HelpIds.getHelpIdString(HID + 32)
|
||||
IMAGECONTROL2_HID = HelpIds.getHelpIdString(HID + 33)
|
||||
631
server/libreoffice/program/wizards/fax/FaxWizardDialogImpl.py
Normal file
631
server/libreoffice/program/wizards/fax/FaxWizardDialogImpl.py
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,122 @@
|
||||
#
|
||||
# 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 .
|
||||
#
|
||||
|
||||
class FaxWizardDialogResources(object):
|
||||
|
||||
def __init__(self):
|
||||
import sys, os
|
||||
|
||||
# imp is deprecated since Python v.3.4
|
||||
if sys.version_info >= (3,3):
|
||||
from importlib.machinery import SourceFileLoader
|
||||
SourceFileLoader('strings', os.path.join(os.path.dirname(__file__), '../common/strings.hrc')).load_module()
|
||||
else:
|
||||
import imp
|
||||
imp.load_source('strings', os.path.join(os.path.dirname(__file__), '../common/strings.hrc'))
|
||||
|
||||
import strings
|
||||
|
||||
self.resFaxWizardDialog_title = strings.RID_FAXWIZARDDIALOG_START_1
|
||||
self.resoptBusinessFax_value = strings.RID_FAXWIZARDDIALOG_START_3
|
||||
self.resoptPrivateFax_value = strings.RID_FAXWIZARDDIALOG_START_4
|
||||
self.reschkUseLogo_value = strings.RID_FAXWIZARDDIALOG_START_5
|
||||
self.reschkUseSubject_value = strings.RID_FAXWIZARDDIALOG_START_6
|
||||
self.reschkUseSalutation_value = strings.RID_FAXWIZARDDIALOG_START_7
|
||||
self.reschkUseGreeting_value = strings.RID_FAXWIZARDDIALOG_START_8
|
||||
self.reschkUseFooter_value = strings.RID_FAXWIZARDDIALOG_START_9
|
||||
self.resoptSenderPlaceholder_value = strings.RID_FAXWIZARDDIALOG_START_10
|
||||
self.resoptSenderDefine_value = strings.RID_FAXWIZARDDIALOG_START_11
|
||||
self.restxtTemplateName_value = strings.RID_FAXWIZARDDIALOG_START_12
|
||||
self.resoptCreateFax_value = strings.RID_FAXWIZARDDIALOG_START_13
|
||||
self.resoptMakeChanges_value = strings.RID_FAXWIZARDDIALOG_START_14
|
||||
self.reslblBusinessStyle_value = strings.RID_FAXWIZARDDIALOG_START_15
|
||||
self.reslblPrivateStyle_value = strings.RID_FAXWIZARDDIALOG_START_16
|
||||
self.reslblIntroduction_value = strings.RID_FAXWIZARDDIALOG_START_17
|
||||
self.reslblSenderAddress_value = strings.RID_FAXWIZARDDIALOG_START_18
|
||||
self.reslblSenderName_value = strings.RID_FAXWIZARDDIALOG_START_19
|
||||
self.reslblSenderStreet_value = strings.RID_FAXWIZARDDIALOG_START_20
|
||||
self.reslblPostCodeCity_value = strings.RID_FAXWIZARDDIALOG_START_21
|
||||
self.reslblFooter_value = strings.RID_FAXWIZARDDIALOG_START_22
|
||||
self.reslblFinalExplanation1_value = strings.RID_FAXWIZARDDIALOG_START_23
|
||||
self.reslblFinalExplanation2_value = strings.RID_FAXWIZARDDIALOG_START_24
|
||||
self.reslblTemplateName_value = strings.RID_FAXWIZARDDIALOG_START_25
|
||||
self.reslblTemplatePath_value = strings.RID_FAXWIZARDDIALOG_START_26
|
||||
self.reslblProceed_value = strings.RID_FAXWIZARDDIALOG_START_27
|
||||
self.reslblTitle1_value = strings.RID_FAXWIZARDDIALOG_START_28
|
||||
self.reslblTitle3_value = strings.RID_FAXWIZARDDIALOG_START_29
|
||||
self.reslblTitle4_value = strings.RID_FAXWIZARDDIALOG_START_30
|
||||
self.reslblTitle5_value = strings.RID_FAXWIZARDDIALOG_START_31
|
||||
self.reslblTitle6_value = strings.RID_FAXWIZARDDIALOG_START_32
|
||||
self.reschkFooterNextPages_value = strings.RID_FAXWIZARDDIALOG_START_33
|
||||
self.reschkFooterPageNumbers_value = strings.RID_FAXWIZARDDIALOG_START_34
|
||||
self.reschkUseDate_value = strings.RID_FAXWIZARDDIALOG_START_35
|
||||
self.reschkUseCommunicationType_value = strings.RID_FAXWIZARDDIALOG_START_36
|
||||
self.resLabel1_value = strings.RID_FAXWIZARDDIALOG_START_37
|
||||
self.resoptReceiverPlaceholder_value = strings.RID_FAXWIZARDDIALOG_START_38
|
||||
self.resoptReceiverDatabase_value = strings.RID_FAXWIZARDDIALOG_START_39
|
||||
self.resLabel2_value = strings.RID_FAXWIZARDDIALOG_START_40
|
||||
|
||||
#Create a Dictionary for the constants values.
|
||||
self.dictConstants = {
|
||||
"#to#" : strings.RID_FAXWIZARDDIALOG_START_41,
|
||||
"#from#" : strings.RID_FAXWIZARDDIALOG_START_42,
|
||||
"#faxconst#" : strings.RID_FAXWIZARDDIALOG_START_43,
|
||||
"#telconst#" : strings.RID_FAXWIZARDDIALOG_START_44,
|
||||
"#emailconst#" : strings.RID_FAXWIZARDDIALOG_START_45,
|
||||
"#consist1#" : strings.RID_FAXWIZARDDIALOG_START_46,
|
||||
"#consist2#" : strings.RID_FAXWIZARDDIALOG_START_47,
|
||||
"#consist3#" : strings.RID_FAXWIZARDDIALOG_START_48}
|
||||
|
||||
#Create a dictionary for localising the private template
|
||||
self.dictPrivateTemplate = {
|
||||
"Bottle" : strings.RID_FAXWIZARDDIALOG_START_49,
|
||||
"Fax" : strings.RID_FAXWIZARDDIALOG_START_56,
|
||||
"Lines" : strings.RID_FAXWIZARDDIALOG_START_50,
|
||||
"Marine" : strings.RID_FAXWIZARDDIALOG_START_51}
|
||||
|
||||
#Create a dictionary for localising the business template
|
||||
self.dictBusinessTemplate = {
|
||||
"Classic Fax" : strings.RID_FAXWIZARDDIALOG_START_52,
|
||||
"Classic Fax from Private" : strings.RID_FAXWIZARDDIALOG_START_53,
|
||||
"Modern Fax" : strings.RID_FAXWIZARDDIALOG_START_54,
|
||||
"Modern Fax from Private" : strings.RID_FAXWIZARDDIALOG_START_55}
|
||||
|
||||
#Common Resources
|
||||
self.resOverwriteWarning = strings.RID_COMMON_START_19
|
||||
self.resTemplateDescription = strings.RID_COMMON_START_20
|
||||
|
||||
self.RoadmapLabels = []
|
||||
self.RoadmapLabels.append(strings.RID_FAXWIZARDROADMAP_START_1)
|
||||
self.RoadmapLabels.append(strings.RID_FAXWIZARDROADMAP_START_2)
|
||||
self.RoadmapLabels.append(strings.RID_FAXWIZARDROADMAP_START_3)
|
||||
self.RoadmapLabels.append(strings.RID_FAXWIZARDROADMAP_START_4)
|
||||
self.RoadmapLabels.append(strings.RID_FAXWIZARDROADMAP_START_5)
|
||||
self.SalutationLabels = []
|
||||
self.SalutationLabels.append(strings.RID_FAXWIZARDSALUTATION_START_1)
|
||||
self.SalutationLabels.append(strings.RID_FAXWIZARDSALUTATION_START_2)
|
||||
self.SalutationLabels.append(strings.RID_FAXWIZARDSALUTATION_START_3)
|
||||
self.SalutationLabels.append(strings.RID_FAXWIZARDSALUTATION_START_4)
|
||||
self.GreetingLabels = []
|
||||
self.GreetingLabels.append(strings.RID_FAXWIZARDGREETING_START_1)
|
||||
self.GreetingLabels.append(strings.RID_FAXWIZARDGREETING_START_2)
|
||||
self.GreetingLabels.append(strings.RID_FAXWIZARDGREETING_START_3)
|
||||
self.GreetingLabels.append(strings.RID_FAXWIZARDGREETING_START_4)
|
||||
self.CommunicationLabels = []
|
||||
self.CommunicationLabels.append(strings.RID_FAXWIZARDCOMMUNICATION_START_1)
|
||||
self.CommunicationLabels.append(strings.RID_FAXWIZARDCOMMUNICATION_START_2)
|
||||
self.CommunicationLabels.append(strings.RID_FAXWIZARDCOMMUNICATION_START_3)
|
||||
1
server/libreoffice/program/wizards/fax/__init__.py
Normal file
1
server/libreoffice/program/wizards/fax/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
Reference in New Issue
Block a user