LibreOffice Module basctl (master) 1
|
#include <localizationmgr.hxx>
Public Member Functions | |
LocalizationMgr (Shell *, ScriptDocument, OUString aLibName, const css::uno::Reference< css::resource::XStringResourceManager > &xStringResourceManager) | |
const css::uno::Reference< css::resource::XStringResourceManager > & | getStringResourceManager () const |
bool | isLibraryLocalized () |
void | handleTranslationbar () |
void | handleAddLocales (const css::uno::Sequence< css::lang::Locale > &aLocaleSeq) |
void | handleRemoveLocales (const css::uno::Sequence< css::lang::Locale > &aLocaleSeq) |
void | handleSetDefaultLocale (const css::lang::Locale &rLocale) |
void | handleSetCurrentLocale (const css::lang::Locale &rLocale) |
void | handleBasicStarted () |
void | handleBasicStopped () |
Static Public Member Functions | |
static void | setControlResourceIDsForNewEditorObject (DlgEditor const *pEditor, const css::uno::Any &rControlAny, std::u16string_view aCtrlName) |
static void | renameControlResourceIDsForEditorObject (DlgEditor const *pEditor, const css::uno::Any &rControlAny, std::u16string_view aNewCtrlName) |
static void | deleteControlResourceIDsForDeletedEditorObject (DlgEditor const *pEditor, const css::uno::Any &rControlAny, std::u16string_view aCtrlName) |
static void | setStringResourceAtDialog (const ScriptDocument &rDocument, const OUString &aLibName, std::u16string_view aDlgName, const css::uno::Reference< css::container::XNameContainer > &xDialogModel) |
static void | renameStringResourceIDs (const ScriptDocument &rDocument, const OUString &aLibName, std::u16string_view aDlgName, const css::uno::Reference< css::container::XNameContainer > &xDialogModel) |
static void | removeResourceForDialog (const ScriptDocument &rDocument, const OUString &aLibName, std::u16string_view aDlgName, const css::uno::Reference< css::container::XNameContainer > &xDialogModel) |
static css::uno::Reference< css::resource::XStringResourceManager > | getStringResourceFromDialogLibrary (const css::uno::Reference< css::container::XNameContainer > &xDialogLib) |
static void | resetResourceForDialog (const css::uno::Reference< css::container::XNameContainer > &xDialogModel, const css::uno::Reference< css::resource::XStringResourceManager > &xStringResourceManager) |
static void | setResourceIDsForDialog (const css::uno::Reference< css::container::XNameContainer > &xDialogModel, const css::uno::Reference< css::resource::XStringResourceManager > &xStringResourceManager) |
static void | copyResourcesForPastedEditorObject (DlgEditor const *pEditor, const css::uno::Any &rControlAny, std::u16string_view aCtrlName, const css::uno::Reference< css::resource::XStringResourceResolver > &xSourceStringResolver) |
static void | copyResourceForDroppedDialog (const css::uno::Reference< css::container::XNameContainer > &xDialogModel, std::u16string_view aDialogName, const css::uno::Reference< css::resource::XStringResourceManager > &xStringResourceManager, const css::uno::Reference< css::resource::XStringResourceResolver > &xSourceStringResolver) |
static void | copyResourceForDialog (const css::uno::Reference< css::container::XNameContainer > &xDialogModel, const css::uno::Reference< css::resource::XStringResourceResolver > &xSourceStringResolver, const css::uno::Reference< css::resource::XStringResourceManager > &xTargetStringResourceManager) |
Private Types | |
enum | HandleResourceMode { SET_IDS , RESET_IDS , RENAME_DIALOG_IDS , RENAME_CONTROL_IDS , REMOVE_IDS_FROM_RESOURCE , MOVE_RESOURCES , COPY_RESOURCES } |
Private Member Functions | |
void | enableResourceForAllLibraryDialogs () |
void | disableResourceForAllLibraryDialogs () |
void | implEnableDisableResourceForAllLibraryDialogs (HandleResourceMode eMode) |
Static Private Member Functions | |
static sal_Int32 | implHandleControlResourceProperties (const css::uno::Any &rControlAny, std::u16string_view aDialogName, std::u16string_view aCtrlName, const css::uno::Reference< css::resource::XStringResourceManager > &xStringResourceManager, const css::uno::Reference< css::resource::XStringResourceResolver > &xSourceStringResolver, HandleResourceMode eMode) |
Private Attributes | |
css::uno::Reference< css::resource::XStringResourceManager > | m_xStringResourceManager |
Shell * | m_pShell |
ScriptDocument | m_aDocument |
OUString | m_aLibName |
css::lang::Locale | m_aLocaleBeforeBasicStart |
Definition at line 36 of file localizationmgr.hxx.
|
private |
Enumerator | |
---|---|
SET_IDS | |
RESET_IDS | |
RENAME_DIALOG_IDS | |
RENAME_CONTROL_IDS | |
REMOVE_IDS_FROM_RESOURCE | |
MOVE_RESOURCES | |
COPY_RESOURCES |
Definition at line 47 of file localizationmgr.hxx.
basctl::LocalizationMgr::LocalizationMgr | ( | Shell * | , |
ScriptDocument | , | ||
OUString | aLibName, | ||
const css::uno::Reference< css::resource::XStringResourceManager > & | xStringResourceManager | ||
) |
Definition at line 62 of file localizationmgr.cxx.
|
static |
Definition at line 1056 of file localizationmgr.cxx.
References Any, COPY_RESOURCES, and implHandleControlResourceProperties().
Referenced by basctl::DialogWindow::SaveDialog().
|
static |
Definition at line 1034 of file localizationmgr.cxx.
References Any, implHandleControlResourceProperties(), and MOVE_RESOURCES.
Referenced by basctl::Shell::CopyDialogResources().
|
static |
Definition at line 1007 of file localizationmgr.cxx.
References aDocument, DBG_ASSERT, basctl::E_DIALOGS, basctl::FindDialogWindowForEditor(), basctl::BaseWindow::GetDocument(), basctl::BaseWindow::GetLibName(), basctl::BaseWindow::GetName(), getStringResourceFromDialogLibrary(), implHandleControlResourceProperties(), and MOVE_RESOURCES.
|
static |
Definition at line 857 of file localizationmgr.cxx.
References aDocument, DBG_ASSERT, basctl::E_DIALOGS, basctl::FindDialogWindowForEditor(), basctl::BaseWindow::GetDocument(), basctl::BaseWindow::GetLibName(), basctl::BaseWindow::GetName(), getStringResourceFromDialogLibrary(), implHandleControlResourceProperties(), basctl::MarkDocumentModified(), and REMOVE_IDS_FROM_RESOURCE.
|
inlineprivate |
Definition at line 68 of file localizationmgr.hxx.
References implEnableDisableResourceForAllLibraryDialogs(), and RESET_IDS.
Referenced by handleRemoveLocales().
|
inlineprivate |
Definition at line 64 of file localizationmgr.hxx.
References implEnableDisableResourceForAllLibraryDialogs(), and SET_IDS.
Referenced by handleAddLocales().
|
static |
Definition at line 1079 of file localizationmgr.cxx.
Referenced by basctl::SbTreeListBoxDropTarget::AcceptDrop(), basctl::Shell::CopyDialogResources(), copyResourcesForPastedEditorObject(), deleteControlResourceIDsForDeletedEditorObject(), removeResourceForDialog(), renameControlResourceIDsForEditorObject(), renameStringResourceIDs(), setControlResourceIDsForNewEditorObject(), basctl::Shell::SetCurLibForLocalization(), and setStringResourceAtDialog().
|
inline |
Definition at line 78 of file localizationmgr.hxx.
References m_xStringResourceManager.
void basctl::LocalizationMgr::handleAddLocales | ( | const css::uno::Sequence< css::lang::Locale > & | aLocaleSeq | ) |
Definition at line 629 of file localizationmgr.cxx.
References DBG_ASSERT, enableResourceForAllLibraryDialogs(), basctl::GetBindingsPtr(), handleTranslationbar(), i, isLibraryLocalized(), Locale, m_aDocument, m_xStringResourceManager, and basctl::MarkDocumentModified().
void basctl::LocalizationMgr::handleBasicStarted | ( | ) |
Definition at line 763 of file localizationmgr.cxx.
References m_aLocaleBeforeBasicStart, and m_xStringResourceManager.
void basctl::LocalizationMgr::handleBasicStopped | ( | ) |
Definition at line 769 of file localizationmgr.cxx.
References m_aLocaleBeforeBasicStart, and m_xStringResourceManager.
void basctl::LocalizationMgr::handleRemoveLocales | ( | const css::uno::Sequence< css::lang::Locale > & | aLocaleSeq | ) |
Definition at line 661 of file localizationmgr.cxx.
References DBG_ASSERT, disableResourceForAllLibraryDialogs(), basctl::GetBindingsPtr(), handleTranslationbar(), i, Locale, basctl::localesAreEqual(), m_aDocument, m_xStringResourceManager, and basctl::MarkDocumentModified().
void basctl::LocalizationMgr::handleSetCurrentLocale | ( | const css::lang::Locale & | rLocale | ) |
Definition at line 740 of file localizationmgr.cxx.
References basctl::GetBindingsPtr(), basctl::Shell::GetCurWindow(), m_pShell, and m_xStringResourceManager.
void basctl::LocalizationMgr::handleSetDefaultLocale | ( | const css::lang::Locale & | rLocale | ) |
Definition at line 721 of file localizationmgr.cxx.
References basctl::GetBindingsPtr(), and m_xStringResourceManager.
void basctl::LocalizationMgr::handleTranslationbar | ( | ) |
Definition at line 81 of file localizationmgr.cxx.
References a, aToolBarResName, SfxViewFrame::GetFrame(), SfxFrame::GetFrameInterface(), SfxViewShell::GetViewFrame(), isLibraryLocalized(), m_pShell, and u.
Referenced by handleAddLocales(), and handleRemoveLocales().
|
private |
Definition at line 136 of file localizationmgr.cxx.
References Any, basctl::E_DIALOGS, eMode, basctl::Shell::FindDlgWin(), basctl::ScriptDocument::getObjectNames(), i, implHandleControlResourceProperties(), m_aDocument, m_aLibName, m_pShell, and m_xStringResourceManager.
Referenced by disableResourceForAllLibraryDialogs(), and enableResourceForAllLibraryDialogs().
|
staticprivate |
Definition at line 195 of file localizationmgr.cxx.
References Any, aPropName, COPY_RESOURCES, eMode, eType, i, basctl::implCreatePureResourceId(), basctl::isLanguageDependentProperty(), Locale, MOVE_RESOURCES, Property, REMOVE_IDS_FROM_RESOURCE, RENAME_CONTROL_IDS, RENAME_DIALOG_IDS, RESET_IDS, and SET_IDS.
Referenced by copyResourceForDialog(), copyResourceForDroppedDialog(), copyResourcesForPastedEditorObject(), deleteControlResourceIDsForDeletedEditorObject(), implEnableDisableResourceForAllLibraryDialogs(), removeResourceForDialog(), renameControlResourceIDsForEditorObject(), renameStringResourceIDs(), resetResourceForDialog(), setControlResourceIDsForNewEditorObject(), setResourceIDsForDialog(), and setStringResourceAtDialog().
bool basctl::LocalizationMgr::isLibraryLocalized | ( | ) |
Definition at line 74 of file localizationmgr.cxx.
References m_xStringResourceManager.
Referenced by handleAddLocales(), and handleTranslationbar().
|
static |
Definition at line 937 of file localizationmgr.cxx.
References Any, basctl::E_DIALOGS, basctl::ScriptDocument::getLibrary(), getStringResourceFromDialogLibrary(), implHandleControlResourceProperties(), and REMOVE_IDS_FROM_RESOURCE.
Referenced by basctl::RemoveDialog().
|
static |
Definition at line 829 of file localizationmgr.cxx.
References aDocument, DBG_ASSERT, basctl::E_DIALOGS, basctl::FindDialogWindowForEditor(), basctl::BaseWindow::GetDocument(), basctl::BaseWindow::GetLibName(), basctl::BaseWindow::GetName(), getStringResourceFromDialogLibrary(), implHandleControlResourceProperties(), and RENAME_CONTROL_IDS.
Referenced by basctl::DlgEdObj::NameChange().
|
static |
Definition at line 911 of file localizationmgr.cxx.
References Any, basctl::E_DIALOGS, basctl::ScriptDocument::getLibrary(), getStringResourceFromDialogLibrary(), implHandleControlResourceProperties(), and RENAME_DIALOG_IDS.
Referenced by basctl::RenameDialog().
|
static |
Definition at line 963 of file localizationmgr.cxx.
References Any, implHandleControlResourceProperties(), and RESET_IDS.
Referenced by basctl::Shell::CopyDialogResources().
|
static |
Definition at line 799 of file localizationmgr.cxx.
References aDocument, DBG_ASSERT, basctl::E_DIALOGS, basctl::FindDialogWindowForEditor(), basctl::BaseWindow::GetDocument(), basctl::BaseWindow::GetLibName(), basctl::BaseWindow::GetName(), getStringResourceFromDialogLibrary(), implHandleControlResourceProperties(), basctl::MarkDocumentModified(), and SET_IDS.
Referenced by basctl::DlgEdObj::SetDefaults().
|
static |
Definition at line 985 of file localizationmgr.cxx.
References Any, implHandleControlResourceProperties(), and SET_IDS.
Referenced by basctl::Shell::CopyDialogResources().
|
static |
Definition at line 883 of file localizationmgr.cxx.
References Any, basctl::E_DIALOGS, basctl::ScriptDocument::getLibrary(), getStringResourceFromDialogLibrary(), implHandleControlResourceProperties(), and SET_IDS.
Referenced by basctl::Shell::CreateDlgWin().
|
private |
Definition at line 42 of file localizationmgr.hxx.
Referenced by handleAddLocales(), handleRemoveLocales(), and implEnableDisableResourceForAllLibraryDialogs().
|
private |
Definition at line 43 of file localizationmgr.hxx.
Referenced by implEnableDisableResourceForAllLibraryDialogs().
|
private |
Definition at line 45 of file localizationmgr.hxx.
Referenced by handleBasicStarted(), and handleBasicStopped().
|
private |
Definition at line 40 of file localizationmgr.hxx.
Referenced by handleSetCurrentLocale(), handleTranslationbar(), and implEnableDisableResourceForAllLibraryDialogs().
|
private |
Definition at line 38 of file localizationmgr.hxx.
Referenced by getStringResourceManager(), handleAddLocales(), handleBasicStarted(), handleBasicStopped(), handleRemoveLocales(), handleSetCurrentLocale(), handleSetDefaultLocale(), implEnableDisableResourceForAllLibraryDialogs(), and isLibraryLocalized().