33#include <com/sun/star/frame/XLayoutManager.hpp>
34#include <com/sun/star/resource/MissingResourceException.hpp>
35#include <com/sun/star/resource/XStringResourceSupplier.hpp>
37#include <sfx2/sfxsids.hrc>
41#include <osl/diagnose.h>
56constexpr OUStringLiteral aDot(u
".");
57constexpr OUStringLiteral aEsc(u
"&");
58constexpr OUStringLiteral aSemi(u
";");
68 m_xStringResourceManager(xStringResourceManager),
71 m_aLibName(
std::move(aLibName))
83 static constexpr OUStringLiteral
aToolBarResName =
u"private:resource/toolbar/translationbar";
87 if ( !xFrameProps.is() )
91 uno::Any a = xFrameProps->getPropertyValue(
"LayoutManager" );
93 if ( xLayoutManager.is() )
116 sal_Int32 nNameLength;
124 {
"CurrencySymbol", 14 },
125 {
"StringItemList", 14 },
129 for (
Prop const* pProp = vProp; pProp->sName; ++pProp)
139 sal_Int32 nDlgCount = aDlgNames.getLength();
140 const OUString* pDlgNames = aDlgNames.getConstArray();
143 for( sal_Int32
i = 0 ;
i < nDlgCount ;
i++ )
145 OUString aDlgName = pDlgNames[
i ];
153 aDialogCtrl <<= xDialog;
159 const OUString* pNames = aNames.getConstArray();
160 sal_Int32 nCtrls = aNames.getLength();
161 for( sal_Int32 j = 0 ; j < nCtrls ; ++j )
163 OUString aCtrlName( pNames[j] );
164 Any aCtrl = xDialog->getByName( aCtrlName );
175 ( std::u16string_view aDialogName, std::u16string_view aCtrlName,
176 std::u16string_view aPropName,
179 sal_Int32 nUniqueId = xStringResourceManager->getUniqueNumericId();
180 OUString aPureIdStr = OUString::number( nUniqueId )
184 if( !aCtrlName.empty() )
186 aPureIdStr += aCtrlName + aDot;
196 (
const Any& rControlAny, std::u16string_view aDialogName, std::u16string_view aCtrlName,
200 sal_Int32 nChangedCount = 0;
203 rControlAny >>= xPropertySet;
204 if( xPropertySet.is() && xStringResourceManager.is())
207 sal_Int32 nLocaleCount = aLocaleSeq.getLength();
208 if( nLocaleCount == 0 )
212 if( xPropertySetInfo.is() )
216 const Property* pProps = aPropSeq.getConstArray();
217 sal_Int32 nCtrlProps = aPropSeq.getLength();
220 for( sal_Int32 j = 0 ; j < nCtrlProps ; ++j )
224 TypeClass
eType = rProp.Type.getTypeClass();
225 bool bLanguageDependentProperty =
226 (
eType == TypeClass_STRING ||
eType == TypeClass_SEQUENCE)
228 if( !bLanguageDependentProperty )
231 if(
eType == TypeClass_STRING )
233 Any aPropAny = xPropertySet->getPropertyValue(
aPropName );
235 aPropAny >>= aPropStr;
240 bool bEscAlreadyExisting = aPropStr.startsWith(
"&");
241 if( bEscAlreadyExisting )
245 ( aDialogName, aCtrlName,
aPropName, xStringResourceManager );
248 const Locale* pLocales = aLocaleSeq.getConstArray();
249 for( sal_Int32
i = 0 ;
i < nLocaleCount ;
i++ )
251 const Locale& rLocale = pLocales[
i ];
252 xStringResourceManager->setStringForLocale( aPureIdStr, aPropStr, rLocale );
255 OUString aPropIdStr = aEsc + aPureIdStr;
258 xPropertySet->setPropertyValue(
aPropName,
Any(aPropIdStr) );
263 if( aPropStr.getLength() > 1 )
265 OUString aPureIdStr = aPropStr.copy( 1 );
266 OUString aNewPropStr = aPropStr;
269 aNewPropStr = xStringResourceManager->resolveString( aPureIdStr );
271 catch(
const MissingResourceException&)
274 xPropertySet->setPropertyValue(
aPropName,
Any(aNewPropStr) );
280 if( aPropStr.getLength() > 1 )
282 OUString aPureIdStr = aPropStr.copy( 1 );
284 const Locale* pLocales = aLocaleSeq.getConstArray();
285 for( sal_Int32
i = 0 ;
i < nLocaleCount ;
i++ )
287 const Locale& rLocale = pLocales[
i ];
290 xStringResourceManager->removeIdForLocale( aPureIdStr, rLocale );
292 catch(
const MissingResourceException&)
301 OUString aPureSourceIdStr = aPropStr.copy( 1 );
304 ( aDialogName, aCtrlName,
aPropName, xStringResourceManager );
307 const Locale* pLocales = aLocaleSeq.getConstArray();
308 for( sal_Int32
i = 0 ;
i < nLocaleCount ;
i++ )
310 const Locale& rLocale = pLocales[
i ];
313 OUString aResStr = xStringResourceManager->resolveStringForLocale
314 ( aPureSourceIdStr, rLocale );
315 xStringResourceManager->removeIdForLocale( aPureSourceIdStr, rLocale );
316 xStringResourceManager->setStringForLocale( aPureIdStr, aResStr, rLocale );
318 catch(
const MissingResourceException&)
322 OUString aPropIdStr = aEsc + aPureIdStr;
325 xPropertySet->setPropertyValue(
aPropName,
Any(aPropIdStr) );
330 OUString aPureSourceIdStr = aPropStr.copy( 1 );
333 ( aDialogName, aCtrlName,
aPropName, xStringResourceManager );
335 const Locale& rDefaultLocale = xSourceStringResolver->getDefaultLocale();
338 const Locale* pLocales = aLocaleSeq.getConstArray();
339 for( sal_Int32
i = 0 ;
i < nLocaleCount ;
i++ )
341 const Locale& rLocale = pLocales[
i ];
345 aResStr = xSourceStringResolver->resolveStringForLocale
346 ( aPureSourceIdStr, rLocale );
348 catch(
const MissingResourceException&)
350 aResStr = xSourceStringResolver->resolveStringForLocale
351 ( aPureSourceIdStr, rDefaultLocale );
353 xStringResourceManager->setStringForLocale( aPureIdStr, aResStr, rLocale );
356 OUString aPropIdStr = aEsc + aPureIdStr;
359 xPropertySet->setPropertyValue(
aPropName,
Any(aPropIdStr) );
364 OUString aPureSourceIdStr = aPropStr.copy( 1 );
366 const Locale& rDefaultLocale = xSourceStringResolver->getDefaultLocale();
369 const Locale* pLocales = aLocaleSeq.getConstArray();
370 for( sal_Int32
i = 0 ;
i < nLocaleCount ;
i++ )
372 const Locale& rLocale = pLocales[
i ];
376 aResStr = xSourceStringResolver->resolveStringForLocale
377 ( aPureSourceIdStr, rLocale );
379 catch(
const MissingResourceException&)
381 aResStr = xSourceStringResolver->resolveStringForLocale
382 ( aPureSourceIdStr, rDefaultLocale );
384 xStringResourceManager->setStringForLocale( aPureSourceIdStr, aResStr, rLocale );
391 else if(
eType == TypeClass_SEQUENCE )
393 Any aPropAny = xPropertySet->getPropertyValue(
aPropName );
395 aPropAny >>= aPropStrings;
397 const OUString* pPropStrings = aPropStrings.getConstArray();
398 sal_Int32 nPropStringCount = aPropStrings.getLength();
399 if( nPropStringCount == 0 )
406 aIdStrings.realloc( nPropStringCount );
407 OUString* pIdStrings = aIdStrings.getArray();
409 OUString aIdStrBase = aDot
414 const Locale* pLocales = aLocaleSeq.getConstArray();
416 for (
i = 0;
i < nPropStringCount; ++
i )
418 OUString aPropStr = pPropStrings[
i];
419 bool bEscAlreadyExisting = aPropStr.startsWith(
"&");
420 if( bEscAlreadyExisting )
422 pIdStrings[
i] = aPropStr;
426 sal_Int32 nUniqueId = xStringResourceManager->getUniqueNumericId();
427 OUString aPureIdStr = OUString::number( nUniqueId )
431 for( sal_Int32 iLocale = 0 ; iLocale < nLocaleCount ; iLocale++ )
433 const Locale& rLocale = pLocales[ iLocale ];
434 xStringResourceManager->setStringForLocale( aPureIdStr, aPropStr, rLocale );
437 OUString aPropIdStr = aEsc + aPureIdStr;
438 pIdStrings[
i] = aPropIdStr;
440 xPropertySet->setPropertyValue(
aPropName,
Any(aIdStrings) );
446 aNewPropStrings.realloc( nPropStringCount );
447 OUString* pNewPropStrings = aNewPropStrings.getArray();
450 for (
i = 0;
i < nPropStringCount; ++
i )
452 OUString aIdStr = pPropStrings[
i];
453 OUString aNewPropStr = aIdStr;
454 if( aIdStr.getLength() > 1 )
456 OUString aPureIdStr = aIdStr.copy( 1 );
459 aNewPropStr = xStringResourceManager->resolveString( aPureIdStr );
461 catch(
const MissingResourceException&)
465 pNewPropStrings[
i] = aNewPropStr;
467 xPropertySet->setPropertyValue(
aPropName,
Any(aNewPropStrings) );
472 const Locale* pLocales = aLocaleSeq.getConstArray();
474 for (
i = 0;
i < nPropStringCount; ++
i )
476 OUString aIdStr = pPropStrings[
i];
477 if( aIdStr.getLength() > 1 )
479 OUString aPureIdStr = aIdStr.copy( 1 );
481 for( sal_Int32 iLocale = 0 ; iLocale < nLocaleCount ; iLocale++ )
483 const Locale& rLocale = pLocales[iLocale];
486 xStringResourceManager->removeIdForLocale( aPureIdStr, rLocale );
488 catch(
const MissingResourceException&)
499 aIdStrings.realloc( nPropStringCount );
500 OUString* pIdStrings = aIdStrings.getArray();
502 OUString aIdStrBase = aDot
507 const Locale* pLocales = aLocaleSeq.getConstArray();
509 for (
i = 0;
i < nPropStringCount; ++
i )
511 OUString aSourceIdStr = pPropStrings[
i];
512 OUString aPureSourceIdStr = aSourceIdStr.copy( 1 );
514 sal_Int32 nUniqueId = xStringResourceManager->getUniqueNumericId();
515 OUString aPureIdStr = OUString::number( nUniqueId )
519 for( sal_Int32 iLocale = 0 ; iLocale < nLocaleCount ; iLocale++ )
521 const Locale& rLocale = pLocales[ iLocale ];
525 OUString aResStr = xStringResourceManager->resolveStringForLocale
526 ( aPureSourceIdStr, rLocale );
527 xStringResourceManager->removeIdForLocale( aPureSourceIdStr, rLocale );
528 xStringResourceManager->setStringForLocale( aPureIdStr, aResStr, rLocale );
530 catch(
const MissingResourceException&)
534 OUString aPropIdStr = aEsc + aPureIdStr;
535 pIdStrings[
i] = aPropIdStr;
537 xPropertySet->setPropertyValue(
aPropName,
Any(aIdStrings) );
543 aIdStrings.realloc( nPropStringCount );
544 OUString* pIdStrings = aIdStrings.getArray();
546 OUString aIdStrBase = aDot
551 const Locale& rDefaultLocale = xSourceStringResolver->getDefaultLocale();
553 const Locale* pLocales = aLocaleSeq.getConstArray();
555 for (
i = 0;
i < nPropStringCount; ++
i )
557 OUString aSourceIdStr = pPropStrings[
i];
558 OUString aPureSourceIdStr = aSourceIdStr.copy( 1 );
560 sal_Int32 nUniqueId = xStringResourceManager->getUniqueNumericId();
561 OUString aPureIdStr = OUString::number( nUniqueId )
565 for( sal_Int32 iLocale = 0 ; iLocale < nLocaleCount ; iLocale++ )
567 const Locale& rLocale = pLocales[ iLocale ];
572 aResStr = xSourceStringResolver->resolveStringForLocale
573 ( aPureSourceIdStr, rLocale );
575 catch(
const MissingResourceException&)
577 aResStr = xSourceStringResolver->resolveStringForLocale
578 ( aPureSourceIdStr, rDefaultLocale );
580 xStringResourceManager->setStringForLocale( aPureIdStr, aResStr, rLocale );
583 OUString aPropIdStr = aEsc + aPureIdStr;
584 pIdStrings[
i] = aPropIdStr;
586 xPropertySet->setPropertyValue(
aPropName,
Any(aIdStrings) );
591 const Locale& rDefaultLocale = xSourceStringResolver->getDefaultLocale();
593 const Locale* pLocales = aLocaleSeq.getConstArray();
595 for (
i = 0;
i < nPropStringCount; ++
i )
597 OUString aSourceIdStr = pPropStrings[
i];
598 OUString aPureSourceIdStr = aSourceIdStr.copy( 1 );
601 for( sal_Int32 iLocale = 0 ; iLocale < nLocaleCount ; iLocale++ )
603 const Locale& rLocale = pLocales[ iLocale ];
608 aResStr = xSourceStringResolver->resolveStringForLocale
609 ( aPureSourceIdStr, rLocale );
611 catch(
const MissingResourceException&)
613 aResStr = xSourceStringResolver->resolveStringForLocale
614 ( aPureSourceIdStr, rDefaultLocale );
616 xStringResourceManager->setStringForLocale( aPureSourceIdStr, aResStr, rLocale );
625 return nChangedCount;
631 const Locale* pLocales = aLocaleSeq.getConstArray();
632 sal_Int32 nLocaleCount = aLocaleSeq.getLength();
636 for( sal_Int32
i = 0 ;
i < nLocaleCount ;
i++ )
638 const Locale& rLocale = pLocales[
i ];
644 DBG_ASSERT( nLocaleCount==1,
"LocalizationMgr::handleAddLocales(): Only one first locale allowed" );
646 const Locale& rLocale = pLocales[ 0 ];
655 pBindings->Invalidate( SID_BASICIDE_CURRENT_LANG );
663 const Locale* pLocales = aLocaleSeq.getConstArray();
664 sal_Int32 nLocaleCount = aLocaleSeq.getLength();
665 bool bConsistent =
true;
666 bool bModified =
false;
668 for( sal_Int32
i = 0 ;
i < nLocaleCount ;
i++ )
670 const Locale& rLocale = pLocales[
i ];
675 if( aResLocaleSeq.getLength() == 1 )
677 const Locale& rLastResLocale = aResLocaleSeq.getConstArray()[ 0 ];
697 catch(
const IllegalArgumentException&)
710 pBindings->Invalidate( SID_BASICIDE_CURRENT_LANG );
711 pBindings->Invalidate( SID_BASICIDE_MANAGE_LANG );
718 "LocalizationMgr::handleRemoveLocales(): sequence contains unsupported locales" );
730 catch(
const IllegalArgumentException&)
732 OSL_FAIL(
"LocalizationMgr::handleSetDefaultLocale: Invalid locale" );
737 pBindings->Invalidate( SID_BASICIDE_CURRENT_LANG );
749 catch(
const IllegalArgumentException&)
751 OSL_FAIL(
"LocalizationMgr::handleSetCurrentLocale: Invalid locale" );
756 pBindings->Invalidate( SID_BASICIDE_CURRENT_LANG );
759 if (!pDlgWin->IsSuspended())
760 pDlgWin->GetEditor().UpdatePropertyBrowserDelayed();
776 catch(
const IllegalArgumentException&)
785 for (
auto const& window : aWindowTable)
791 if (&pDlgWin->GetEditor() == pEditor)
800 const Any& rControlAny, std::u16string_view aCtrlName )
807 DBG_ASSERT(
aDocument.isValid(),
"LocalizationMgr::setControlResourceIDsForNewEditorObject: invalid document!" );
810 const OUString& rLibName = pDlgWin->
GetLibName();
816 if( !xStringResourceManager.is() || !xStringResourceManager->getLocales().hasElements() )
819 OUString aDialogName = pDlgWin->
GetName();
822 ( rControlAny, aDialogName, aCtrlName, xStringResourceManager,
823 xDummyStringResolver,
SET_IDS );
830 const css::uno::Any& rControlAny, std::u16string_view aNewCtrlName )
837 DBG_ASSERT(
aDocument.isValid(),
"LocalizationMgr::renameControlResourceIDsForEditorObject: invalid document!" );
840 const OUString& rLibName = pDlgWin->
GetLibName();
846 if( !xStringResourceManager.is() || !xStringResourceManager->getLocales().hasElements() )
849 OUString aDialogName = pDlgWin->
GetName();
852 ( rControlAny, aDialogName, aNewCtrlName, xStringResourceManager,
858 const Any& rControlAny, std::u16string_view aCtrlName )
865 DBG_ASSERT(
aDocument.isValid(),
"LocalizationMgr::deleteControlResourceIDsForDeletedEditorObject: invalid document!" );
868 const OUString& rLibName = pDlgWin->
GetLibName();
873 OUString aDialogName = pDlgWin->
GetName();
876 ( rControlAny, aDialogName, aCtrlName, xStringResourceManager,
892 if( !xStringResourceManager.is() )
897 if( xStringResourceManager->getLocales().hasElements() )
900 aDialogCtrl <<= xDialogModel;
903 std::u16string_view(), xStringResourceManager,
904 xDummyStringResolver,
SET_IDS );
908 xDlgPSet->setPropertyValue(
"ResourceResolver",
Any(xStringResourceManager) );
918 if( !xStringResourceManager.is() )
922 aDialogCtrl <<= xDialogModel;
925 std::u16string_view(), xStringResourceManager,
929 for(
const auto& rCtrlName : xDialogModel->getElementNames()) {
930 Any aCtrl = xDialogModel->getByName( rCtrlName );
932 rCtrlName, xStringResourceManager,
944 if( !xStringResourceManager.is() )
948 aDialogCtrl <<= xDialogModel;
951 std::u16string_view(), xStringResourceManager,
955 for(
const auto& rCtrlName : xDialogModel->getElementNames()) {
956 Any aCtrl = xDialogModel->getByName( rCtrlName );
958 rCtrlName, xStringResourceManager,
966 if( !xStringResourceManager.is() )
970 std::u16string_view aDummyName;
972 aDialogCtrl <<= xDialogModel;
975 aDummyName, xStringResourceManager, xDummyStringResolver,
RESET_IDS );
978 for(
const auto& rCtrlName : xDialogModel->getElementNames()){
979 Any aCtrl = xDialogModel->getByName( rCtrlName );
981 rCtrlName, xStringResourceManager, xDummyStringResolver,
RESET_IDS );
988 if( !xStringResourceManager.is() )
992 std::u16string_view aDummyName;
994 aDialogCtrl <<= xDialogModel;
997 aDummyName, xStringResourceManager, xDummyStringResolver,
SET_IDS );
1000 for(
const auto& rCtrlName : xDialogModel->getElementNames()) {
1001 Any aCtrl = xDialogModel->getByName( rCtrlName );
1003 rCtrlName, xStringResourceManager, xDummyStringResolver,
SET_IDS );
1008 const Any& rControlAny, std::u16string_view aCtrlName,
1016 DBG_ASSERT(
aDocument.isValid(),
"LocalizationMgr::copyResourcesForPastedEditorObject: invalid document!" );
1019 const OUString& rLibName = pDlgWin->
GetLibName();
1025 if( !xStringResourceManager.is() || !xStringResourceManager->getLocales().hasElements() )
1028 OUString aDialogName = pDlgWin->
GetName();
1030 ( rControlAny, aDialogName, aCtrlName, xStringResourceManager,
1035 std::u16string_view aDialogName,
1039 if( !xStringResourceManager.is() )
1044 aDialogCtrl <<= xDialogModel;
1046 std::u16string_view(), xStringResourceManager, xSourceStringResolver,
MOVE_RESOURCES );
1049 for(
const auto& rCtrlName : xDialogModel->getElementNames()) {
1050 Any aCtrl = xDialogModel->getByName( rCtrlName );
1052 rCtrlName, xStringResourceManager, xSourceStringResolver,
MOVE_RESOURCES );
1061 if( !xDialogModel.is() || !xSourceStringResolver.is() || !xTargetStringResourceManager.is() )
1064 std::u16string_view aDummyName;
1066 aDialogCtrl <<= xDialogModel;
1068 ( aDialogCtrl, aDummyName, aDummyName, xTargetStringResourceManager,
1072 for(
const auto& rCtrlName : xDialogModel->getElementNames()) {
1073 Any aCtrl = xDialogModel->getByName( rCtrlName );
1075 xTargetStringResourceManager, xSourceStringResolver,
COPY_RESOURCES );
1083 if( xDialogLib.is() )
1086 if( xStringResourceSupplier.is() )
1089 xStringResourceResolver = xStringResourceSupplier->getStringResource();
1091 xStringResourceManager =
1095 return xStringResourceManager;
const css::uno::Reference< css::frame::XFrame > & GetFrameInterface() const
SfxFrame & GetFrame() const
SfxViewFrame & GetViewFrame() const
const OUString & GetLibName() const
const OUString & GetName() const
const ScriptDocument & GetDocument() const
css::lang::Locale m_aLocaleBeforeBasicStart
void handleBasicStopped()
void handleBasicStarted()
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)
void handleSetCurrentLocale(const css::lang::Locale &rLocale)
static void setControlResourceIDsForNewEditorObject(DlgEditor const *pEditor, const css::uno::Any &rControlAny, std::u16string_view aCtrlName)
void handleTranslationbar()
void enableResourceForAllLibraryDialogs()
void handleRemoveLocales(const css::uno::Sequence< css::lang::Locale > &aLocaleSeq)
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)
void handleAddLocales(const css::uno::Sequence< css::lang::Locale > &aLocaleSeq)
void implEnableDisableResourceForAllLibraryDialogs(HandleResourceMode eMode)
static void removeResourceForDialog(const ScriptDocument &rDocument, const OUString &aLibName, std::u16string_view aDlgName, const css::uno::Reference< css::container::XNameContainer > &xDialogModel)
css::uno::Reference< css::resource::XStringResourceManager > m_xStringResourceManager
void disableResourceForAllLibraryDialogs()
static void deleteControlResourceIDsForDeletedEditorObject(DlgEditor const *pEditor, const css::uno::Any &rControlAny, std::u16string_view aCtrlName)
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 renameControlResourceIDsForEditorObject(DlgEditor const *pEditor, const css::uno::Any &rControlAny, std::u16string_view aNewCtrlName)
static void setResourceIDsForDialog(const css::uno::Reference< css::container::XNameContainer > &xDialogModel, const css::uno::Reference< css::resource::XStringResourceManager > &xStringResourceManager)
ScriptDocument m_aDocument
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)
@ REMOVE_IDS_FROM_RESOURCE
LocalizationMgr(Shell *, ScriptDocument, OUString aLibName, const css::uno::Reference< css::resource::XStringResourceManager > &xStringResourceManager)
bool isLibraryLocalized()
static void setStringResourceAtDialog(const ScriptDocument &rDocument, const OUString &aLibName, std::u16string_view aDlgName, const css::uno::Reference< css::container::XNameContainer > &xDialogModel)
void handleSetDefaultLocale(const css::lang::Locale &rLocale)
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)
static void renameStringResourceIDs(const ScriptDocument &rDocument, const OUString &aLibName, std::u16string_view aDlgName, const css::uno::Reference< css::container::XNameContainer > &xDialogModel)
encapsulates a document which contains Basic scripts and dialogs
css::uno::Reference< css::container::XNameContainer > getLibrary(LibraryContainerType _eType, const OUString &_rLibName, bool _bLoadLibrary) const
returns a script or dialog library given by name
css::uno::Sequence< OUString > getObjectNames(LibraryContainerType _eType, const OUString &_rLibName) const
returns the names of the modules in a given script or dialog library of the document
BaseWindow * GetCurWindow() const
std::map< sal_uInt16, VclPtr< BaseWindow > > WindowTable
WindowTable & GetWindowTable()
VclPtr< DialogWindow > FindDlgWin(const ScriptDocument &rDocument, const OUString &rLibName, const OUString &rName, bool bCreateIfNotExist=false, bool bFindSuspended=false)
#define DBG_ASSERT(sCon, aError)
SfxBindings * GetBindingsPtr()
static DialogWindow * FindDialogWindowForEditor(DlgEditor const *pEditor)
static bool isLanguageDependentProperty(std::u16string_view aName)
bool localesAreEqual(const Locale &rLocaleLeft, const Locale &rLocaleRight)
void MarkDocumentModified(const ScriptDocument &rDocument)
static OUString implCreatePureResourceId(std::u16string_view aDialogName, std::u16string_view aCtrlName, std::u16string_view aPropName, const Reference< XStringResourceManager > &xStringResourceManager)
bool equalsAscii(std::u16string_view s1, std::string_view s2)