diff options
Diffstat (limited to 'basctl/source/basicide/baside3.cxx')
-rw-r--r-- | basctl/source/basicide/baside3.cxx | 337 |
1 files changed, 140 insertions, 197 deletions
diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx index 085228971eae..ea4fcb4c33de 100644 --- a/basctl/source/basicide/baside3.cxx +++ b/basctl/source/basicide/baside3.cxx @@ -39,7 +39,7 @@ #include <com/sun/star/ucb/SimpleFileAccess.hpp> #include <com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.hpp> #include <com/sun/star/ui/dialogs/TemplateDescription.hpp> -#include <com/sun/star/ui/dialogs/FilePicker.hpp> +#include <com/sun/star/ui/dialogs/XFilePicker3.hpp> #include <com/sun/star/ui/dialogs/XFilePickerControlAccess.hpp> #include <comphelper/processfactory.hxx> #include <sfx2/dispatch.hxx> @@ -50,7 +50,7 @@ #include <svl/whiter.hxx> #include <svx/svdundo.hxx> #include <svx/svxids.hrc> -#include <tools/diagnose_ex.h> +#include <comphelper/diagnose_ex.hxx> #include <tools/urlobj.hxx> #include <vcl/commandevent.hxx> #include <vcl/weld.hxx> @@ -70,9 +70,9 @@ using namespace ::com::sun::star::resource; using namespace ::com::sun::star::ui::dialogs; #ifdef _WIN32 -OUStringLiteral const FilterMask_All = u"*.*"; +constexpr OUString FilterMask_All = u"*.*"_ustr; #else -constexpr OUStringLiteral FilterMask_All = u"*"; +constexpr OUString FilterMask_All = u"*"_ustr; #endif DialogWindow::DialogWindow(DialogWindowLayout* pParent, ScriptDocument const& rDocument, @@ -232,12 +232,10 @@ void DialogWindow::NotifyUndoActionHdl( std::unique_ptr<SdrUndoAction> ) void DialogWindow::DoInit() { - GetHScrollBar()->Show(); - GetVScrollBar()->Show(); m_pEditor->SetScrollBars( GetHScrollBar(), GetVScrollBar() ); } -void DialogWindow::DoScroll( ScrollBar* ) +void DialogWindow::DoScroll( Scrollable* ) { m_pEditor->DoScroll(); } @@ -252,7 +250,7 @@ void DialogWindow::GetState( SfxItemSet& rSet ) if ( xModel.is() ) { Reference< lang::XServiceInfo > xServiceInfo ( xModel, UNO_QUERY ); - if ( xServiceInfo.is() && xServiceInfo->supportsService( "com.sun.star.sheet.SpreadsheetDocument" ) ) + if ( xServiceInfo.is() && xServiceInfo->supportsService( u"com.sun.star.sheet.SpreadsheetDocument"_ustr ) ) bIsCalc = true; } } @@ -315,7 +313,7 @@ void DialogWindow::GetState( SfxItemSet& rSet ) case SID_SHOW_PROPERTYBROWSER: { Shell* pShell = GetShell(); - SfxViewFrame* pViewFrame = pShell ? pShell->GetViewFrame() : nullptr; + SfxViewFrame* pViewFrame = pShell ? &pShell->GetViewFrame() : nullptr; if ( pViewFrame && !pViewFrame->HasChildWindow( SID_SHOW_PROPERTYBROWSER ) && !m_pEditor->GetView().AreObjectsMarked() ) rSet.DisableItem( nWh ); @@ -392,7 +390,7 @@ void DialogWindow::GetState( SfxItemSet& rSet ) void DialogWindow::ExecuteCommand( SfxRequest& rReq ) { const sal_uInt16 nSlotId(rReq.GetSlot()); - SdrObjKind nInsertObj(OBJ_NONE); + SdrObjKind nInsertObj(SdrObjKind::NONE); switch ( nSlotId ) { @@ -425,100 +423,100 @@ void DialogWindow::ExecuteCommand( SfxRequest& rReq ) break; case SID_INSERT_FORM_RADIO: - nInsertObj = OBJ_DLG_FORMRADIO; + nInsertObj = SdrObjKind::BasicDialogFormRadio; break; case SID_INSERT_FORM_CHECK: - nInsertObj = OBJ_DLG_FORMCHECK; + nInsertObj = SdrObjKind::BasicDialogFormCheck; break; case SID_INSERT_FORM_LIST: - nInsertObj = OBJ_DLG_FORMLIST; + nInsertObj = SdrObjKind::BasicDialogFormList; break; case SID_INSERT_FORM_COMBO: - nInsertObj = OBJ_DLG_FORMCOMBO; + nInsertObj = SdrObjKind::BasicDialogFormCombo; break; case SID_INSERT_FORM_SPIN: - nInsertObj = OBJ_DLG_FORMSPIN; + nInsertObj = SdrObjKind::BasicDialogFormSpin; break; case SID_INSERT_FORM_VSCROLL: - nInsertObj = OBJ_DLG_FORMVSCROLL; + nInsertObj = SdrObjKind::BasicDialogFormVerticalScroll; break; case SID_INSERT_FORM_HSCROLL: - nInsertObj = OBJ_DLG_FORMHSCROLL; + nInsertObj = SdrObjKind::BasicDialogFormHorizontalScroll; break; case SID_INSERT_PUSHBUTTON: - nInsertObj = OBJ_DLG_PUSHBUTTON; + nInsertObj = SdrObjKind::BasicDialogPushButton; break; case SID_INSERT_RADIOBUTTON: - nInsertObj = OBJ_DLG_RADIOBUTTON; + nInsertObj = SdrObjKind::BasicDialogRadioButton; break; case SID_INSERT_CHECKBOX: - nInsertObj = OBJ_DLG_CHECKBOX; + nInsertObj = SdrObjKind::BasicDialogCheckbox; break; case SID_INSERT_LISTBOX: - nInsertObj = OBJ_DLG_LISTBOX; + nInsertObj = SdrObjKind::BasicDialogListbox; break; case SID_INSERT_COMBOBOX: - nInsertObj = OBJ_DLG_COMBOBOX; + nInsertObj = SdrObjKind::BasicDialogCombobox; break; case SID_INSERT_GROUPBOX: - nInsertObj = OBJ_DLG_GROUPBOX; + nInsertObj = SdrObjKind::BasicDialogGroupBox; break; case SID_INSERT_EDIT: - nInsertObj = OBJ_DLG_EDIT; + nInsertObj = SdrObjKind::BasicDialogEdit; break; case SID_INSERT_FIXEDTEXT: - nInsertObj = OBJ_DLG_FIXEDTEXT; + nInsertObj = SdrObjKind::BasicDialogFixedText; break; case SID_INSERT_IMAGECONTROL: - nInsertObj = OBJ_DLG_IMAGECONTROL; + nInsertObj = SdrObjKind::BasicDialogImageControl; break; case SID_INSERT_PROGRESSBAR: - nInsertObj = OBJ_DLG_PROGRESSBAR; + nInsertObj = SdrObjKind::BasicDialogProgressbar; break; case SID_INSERT_HSCROLLBAR: - nInsertObj = OBJ_DLG_HSCROLLBAR; + nInsertObj = SdrObjKind::BasicDialogHorizontalScrollbar; break; case SID_INSERT_VSCROLLBAR: - nInsertObj = OBJ_DLG_VSCROLLBAR; + nInsertObj = SdrObjKind::BasicDialogVerticalScrollbar; break; case SID_INSERT_HFIXEDLINE: - nInsertObj = OBJ_DLG_HFIXEDLINE; + nInsertObj = SdrObjKind::BasicDialogHorizontalFixedLine; break; case SID_INSERT_VFIXEDLINE: - nInsertObj = OBJ_DLG_VFIXEDLINE; + nInsertObj = SdrObjKind::BasicDialogVerticalFixedLine; break; case SID_INSERT_DATEFIELD: - nInsertObj = OBJ_DLG_DATEFIELD; + nInsertObj = SdrObjKind::BasicDialogDateField; break; case SID_INSERT_TIMEFIELD: - nInsertObj = OBJ_DLG_TIMEFIELD; + nInsertObj = SdrObjKind::BasicDialogTimeField; break; case SID_INSERT_NUMERICFIELD: - nInsertObj = OBJ_DLG_NUMERICFIELD; + nInsertObj = SdrObjKind::BasicDialogNumericField; break; case SID_INSERT_CURRENCYFIELD: - nInsertObj = OBJ_DLG_CURRENCYFIELD; + nInsertObj = SdrObjKind::BasicDialogCurencyField; break; case SID_INSERT_FORMATTEDFIELD: - nInsertObj = OBJ_DLG_FORMATTEDFIELD; + nInsertObj = SdrObjKind::BasicDialogFormattedField; break; case SID_INSERT_PATTERNFIELD: - nInsertObj = OBJ_DLG_PATTERNFIELD; + nInsertObj = SdrObjKind::BasicDialogPatternField; break; case SID_INSERT_FILECONTROL: - nInsertObj = OBJ_DLG_FILECONTROL; + nInsertObj = SdrObjKind::BasicDialogFileControl; break; case SID_INSERT_SPINBUTTON: - nInsertObj = OBJ_DLG_SPINBUTTON; + nInsertObj = SdrObjKind::BasicDialogSpinButton; break; case SID_INSERT_GRIDCONTROL: - nInsertObj = OBJ_DLG_GRIDCONTROL; + nInsertObj = SdrObjKind::BasicDialogGridControl; break; case SID_INSERT_HYPERLINKCONTROL: - nInsertObj = OBJ_DLG_HYPERLINKCONTROL; + nInsertObj = SdrObjKind::BasicDialogHyperlinkControl; break; case SID_INSERT_TREECONTROL: - nInsertObj = OBJ_DLG_TREECONTROL; + nInsertObj = SdrObjKind::BasicDialogTreeControl; break; case SID_INSERT_SELECT: m_nControlSlotId = nSlotId; @@ -556,7 +554,7 @@ void DialogWindow::ExecuteCommand( SfxRequest& rReq ) break; } - if ( nInsertObj ) + if ( nInsertObj != SdrObjKind::NONE ) { m_nControlSlotId = nSlotId; GetEditor().SetMode( DlgEditor::INSERT ); @@ -603,155 +601,125 @@ void DialogWindow::UpdateBrowser() void DialogWindow::SaveDialog() { - Reference<uno::XComponentContext> xContext(::comphelper::getProcessComponentContext()); - sfx2::FileDialogHelper aDlg(ui::dialogs::TemplateDescription::FILESAVE_AUTOEXTENSION_PASSWORD, + sfx2::FileDialogHelper aDlg(ui::dialogs::TemplateDescription::FILESAVE_AUTOEXTENSION, FileDialogFlags::NONE, this->GetFrameWeld()); aDlg.SetContext(sfx2::FileDialogHelper::BasicExportDialog); Reference<XFilePicker3> xFP = aDlg.GetFilePicker(); - Reference< XFilePickerControlAccess > xFPControl(xFP, UNO_QUERY); - xFPControl->enableControl(ExtendedFilePickerElementIds::CHECKBOX_PASSWORD, false); - Any aValue; - aValue <<= true; - xFPControl->setValue(ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION, 0, aValue); - + xFP.queryThrow<XFilePickerControlAccess>()->setValue(ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION, 0, Any(true)); xFP->setDefaultName( GetName() ); OUString aDialogStr(IDEResId(RID_STR_STDDIALOGNAME)); - xFP->appendFilter( aDialogStr, "*.xdl" ); + xFP->appendFilter( aDialogStr, u"*.xdl"_ustr ); xFP->appendFilter( IDEResId(RID_STR_FILTER_ALLFILES), FilterMask_All ); xFP->setCurrentFilter( aDialogStr ); if( aDlg.Execute() != ERRCODE_NONE ) return; - Sequence< OUString > aPaths = xFP->getSelectedFiles(); - - // export dialog model to xml - Reference< container::XNameContainer > xDialogModel = GetDialog(); - Reference< XInputStreamProvider > xISP = ::xmlscript::exportDialogModel( xDialogModel, xContext, GetDocument().isDocument() ? GetDocument().getDocument() : Reference< frame::XModel >() ); - Reference< XInputStream > xInput( xISP->createInputStream() ); + OUString aSelectedFileURL = xFP->getSelectedFiles()[0]; + Reference<uno::XComponentContext> xContext(comphelper::getProcessComponentContext()); Reference< XSimpleFileAccess3 > xSFI( SimpleFileAccess::create(xContext) ); Reference< XOutputStream > xOutput; try { - if( xSFI->exists( aPaths[0] ) ) - xSFI->kill( aPaths[0] ); - xOutput = xSFI->openFileWrite( aPaths[0] ); + if( xSFI->exists(aSelectedFileURL) ) + xSFI->kill(aSelectedFileURL); + xOutput = xSFI->openFileWrite(aSelectedFileURL); } catch(const Exception& ) {} - if( xOutput.is() ) + if (!xOutput) { - Sequence< sal_Int8 > bytes; - sal_Int32 nRead = xInput->readBytes( bytes, xInput->available() ); - for (;;) - { - if( nRead ) - xOutput->writeBytes( bytes ); + std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(GetFrameWeld(), + VclMessageType::Warning, VclButtonsType::Ok, IDEResId(RID_STR_COULDNTWRITE))); + xBox->run(); + return; + } - nRead = xInput->readBytes( bytes, 1024 ); - if (! nRead) - break; - } + // export dialog model to xml + auto xInput(xmlscript::exportDialogModel(GetDialog(), xContext, GetDocument().getDocumentOrNull())->createInputStream()); - // With resource? - Reference< beans::XPropertySet > xDialogModelPropSet( xDialogModel, UNO_QUERY ); - Reference< resource::XStringResourceResolver > xStringResourceResolver; - if( xDialogModelPropSet.is() ) - { - try - { - Any aResourceResolver = xDialogModelPropSet->getPropertyValue( "ResourceResolver" ); - aResourceResolver >>= xStringResourceResolver; - } - catch(const beans::UnknownPropertyException& ) - {} - } + for (Sequence<sal_Int8> bytes; xInput->readBytes(bytes, xInput->available());) + xOutput->writeBytes(bytes); - bool bResource = false; - if( xStringResourceResolver.is() ) + // With resource? + Reference< resource::XStringResourceResolver > xStringResourceResolver; + if (auto xDialogModelPropSet = GetDialog().query<beans::XPropertySet>()) + { + try { - Sequence< lang::Locale > aLocaleSeq = xStringResourceResolver->getLocales(); - if( aLocaleSeq.hasElements() ) - bResource = true; + Any aResourceResolver = xDialogModelPropSet->getPropertyValue( u"ResourceResolver"_ustr ); + aResourceResolver >>= xStringResourceResolver; } + catch(const beans::UnknownPropertyException& ) + {} + } - if( bResource ) + Sequence<lang::Locale> aLocaleSeq; + if (xStringResourceResolver) + aLocaleSeq = xStringResourceResolver->getLocales(); + if (aLocaleSeq.hasElements()) + { + INetURLObject aURLObj(aSelectedFileURL); + aURLObj.removeExtension(); + OUString aDialogName( aURLObj.getName() ); + aURLObj.removeSegment(); + OUString aURL( aURLObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ) ); + OUString aComment = "# " + aDialogName + " strings" ; + Reference< task::XInteractionHandler > xDummyHandler; + + // Remove old properties files in case of overwriting Dialog files + if( xSFI->isFolder( aURL ) ) { - INetURLObject aURLObj(""); - aURLObj.removeExtension(); - OUString aDialogName( aURLObj.getName() ); - aURLObj.removeSegment(); - OUString aURL( aURLObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ) ); - OUString aComment = "# " + aDialogName + " strings" ; - Reference< task::XInteractionHandler > xDummyHandler; + Sequence< OUString > aContentSeq = xSFI->getFolderContents( aURL, false ); - // Remove old properties files in case of overwriting Dialog files - if( xSFI->isFolder( aURL ) ) + OUString aDialogName_ = aDialogName + "_" ; + for( const OUString& rCompleteName : aContentSeq ) { - Sequence< OUString > aContentSeq = xSFI->getFolderContents( aURL, false ); - - OUString aDialogName_ = aDialogName + "_" ; - sal_Int32 nCount = aContentSeq.getLength(); - const OUString* pFiles = aContentSeq.getConstArray(); - for( int i = 0 ; i < nCount ; i++ ) + OUString aPureName; + OUString aExtension; + sal_Int32 iDot = rCompleteName.lastIndexOf( '.' ); + if( iDot != -1 ) { - OUString aCompleteName = pFiles[i]; - OUString aPureName; - OUString aExtension; - sal_Int32 iDot = aCompleteName.lastIndexOf( '.' ); - sal_Int32 iSlash = aCompleteName.lastIndexOf( '/' ); - if( iDot != -1 ) - { - sal_Int32 iCopyFrom = (iSlash != -1) ? iSlash + 1 : 0; - aPureName = aCompleteName.copy( iCopyFrom, iDot-iCopyFrom ); - aExtension = aCompleteName.copy( iDot + 1 ); - } + sal_Int32 iSlash = rCompleteName.lastIndexOf( '/' ); + sal_Int32 iCopyFrom = (iSlash != -1) ? iSlash + 1 : 0; + aPureName = rCompleteName.copy( iCopyFrom, iDot-iCopyFrom ); + aExtension = rCompleteName.copy( iDot + 1 ); + } - if( aExtension == "properties" || aExtension == "default" ) + if( aExtension == "properties" || aExtension == "default" ) + { + if( aPureName.startsWith( aDialogName_ ) ) { - if( aPureName.startsWith( aDialogName_ ) ) + try { - try - { - xSFI->kill( aCompleteName ); - } - catch(const uno::Exception& ) - {} + xSFI->kill( rCompleteName ); } + catch(const uno::Exception& ) + {} } } } + } - Reference< XStringResourceWithLocation > xStringResourceWithLocation = - StringResourceWithLocation::create( xContext, aURL, false/*bReadOnly*/, - xStringResourceResolver->getDefaultLocale(), aDialogName, aComment, xDummyHandler ); + Reference< XStringResourceWithLocation > xStringResourceWithLocation = + StringResourceWithLocation::create( xContext, aURL, false/*bReadOnly*/, + xStringResourceResolver->getDefaultLocale(), aDialogName, aComment, xDummyHandler ); - // Add locales - Sequence< lang::Locale > aLocaleSeq = xStringResourceResolver->getLocales(); - const lang::Locale* pLocales = aLocaleSeq.getConstArray(); - sal_Int32 nLocaleCount = aLocaleSeq.getLength(); - for( sal_Int32 iLocale = 0 ; iLocale < nLocaleCount ; iLocale++ ) - { - const lang::Locale& rLocale = pLocales[ iLocale ]; - xStringResourceWithLocation->newLocale( rLocale ); - } + // Add locales + for( const lang::Locale& rLocale : aLocaleSeq ) + { + xStringResourceWithLocation->newLocale( rLocale ); + } - LocalizationMgr::copyResourceForDialog( xDialogModel, - xStringResourceResolver, xStringResourceWithLocation ); + LocalizationMgr::copyResourceForDialog( GetDialog(), + xStringResourceResolver, xStringResourceWithLocation ); - xStringResourceWithLocation->store(); - } - } - else - { - std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(GetFrameWeld(), - VclMessageType::Warning, VclButtonsType::Ok, IDEResId(RID_STR_COULDNTWRITE))); - xBox->run(); + xStringResourceWithLocation->store(); } } @@ -760,32 +728,15 @@ static std::vector< lang::Locale > implGetLanguagesOnlyContainedInFirstSeq { std::vector< lang::Locale > avRet; - const lang::Locale* pFirst = aFirstSeq.getConstArray(); - const lang::Locale* pSecond = aSecondSeq.getConstArray(); - sal_Int32 nFirstCount = aFirstSeq.getLength(); - sal_Int32 nSecondCount = aSecondSeq.getLength(); - - for( sal_Int32 iFirst = 0 ; iFirst < nFirstCount ; iFirst++ ) - { - const lang::Locale& rFirstLocale = pFirst[ iFirst ]; - - bool bAlsoContainedInSecondSeq = false; - for( sal_Int32 iSecond = 0 ; iSecond < nSecondCount ; iSecond++ ) - { - const lang::Locale& rSecondLocale = pSecond[ iSecond ]; - - bool bMatch = localesAreEqual( rFirstLocale, rSecondLocale ); - if( bMatch ) - { - bAlsoContainedInSecondSeq = true; - break; - } - } - - if( !bAlsoContainedInSecondSeq ) - avRet.push_back( rFirstLocale ); - } - + std::copy_if(aFirstSeq.begin(), aFirstSeq.end(), + std::back_inserter(avRet), + [&aSecondSeq](const lang::Locale& rFirstLocale) { + return std::none_of( + aSecondSeq.begin(), aSecondSeq.end(), + [&rFirstLocale](const lang::Locale& rSecondLocale) { + return localesAreEqual(rFirstLocale, rSecondLocale); + }); + }); return avRet; } @@ -840,18 +791,12 @@ bool implImportDialog(weld::Window* pWin, const ScriptDocument& rDocument, const aDlg.SetContext(sfx2::FileDialogHelper::BasicImportDialog); Reference<XFilePicker3> xFP = aDlg.GetFilePicker(); - Reference< XFilePickerControlAccess > xFPControl(xFP, UNO_QUERY); - xFPControl->enableControl(ExtendedFilePickerElementIds::CHECKBOX_PASSWORD, false); - Any aValue; - aValue <<= true; - xFPControl->setValue(ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION, 0, aValue); - OUString aDialogStr(IDEResId(RID_STR_STDDIALOGNAME)); - xFP->appendFilter( aDialogStr, "*.xdl" ); + xFP->appendFilter( aDialogStr, u"*.xdl"_ustr ); xFP->appendFilter( IDEResId(RID_STR_FILTER_ALLFILES), FilterMask_All ); xFP->setCurrentFilter( aDialogStr ); - if( aDlg.Execute() != ERRCODE_NONE ) + if( aDlg.Execute() == ERRCODE_NONE ) { Sequence< OUString > aPaths = xFP->getSelectedFiles(); @@ -865,7 +810,7 @@ bool implImportDialog(weld::Window* pWin, const ScriptDocument& rDocument, const { // create dialog model Reference< container::XNameContainer > xDialogModel( - xContext->getServiceManager()->createInstanceWithContext("com.sun.star.awt.UnoControlDialogModel", xContext), + xContext->getServiceManager()->createInstanceWithContext(u"com.sun.star.awt.UnoControlDialogModel"_ustr, xContext), UNO_QUERY_THROW ); Reference< XSimpleFileAccess3 > xSFI( SimpleFileAccess::create(xContext) ); @@ -993,15 +938,13 @@ bool implImportDialog(weld::Window* pWin, const ScriptDocument& rDocument, const { // Check if import default belongs to only import languages and use it then lang::Locale aImportDefaultLocale = xImportStringResource->getDefaultLocale(); - lang::Locale aTmpLocale; - for( int i = 0 ; i < nOnlyInImportLanguageCount ; ++i ) + + if (std::any_of(aOnlyInImportLanguages.begin(), aOnlyInImportLanguages.end(), + [&aImportDefaultLocale](const lang::Locale& aTmpLocale) { + return localesAreEqual(aImportDefaultLocale, aTmpLocale); + })) { - aTmpLocale = aOnlyInImportLanguages[i]; - if( localesAreEqual( aImportDefaultLocale, aTmpLocale ) ) - { - aFirstLocale = aImportDefaultLocale; - break; - } + aFirstLocale = aImportDefaultLocale; } } @@ -1010,13 +953,12 @@ bool implImportDialog(weld::Window* pWin, const ScriptDocument& rDocument, const if( nOnlyInImportLanguageCount > 1 ) { Sequence< lang::Locale > aRemainingLocaleSeq( nOnlyInImportLanguageCount - 1 ); - lang::Locale aTmpLocale; + auto pRemainingLocaleSeq = aRemainingLocaleSeq.getArray(); int iSeq = 0; - for( int i = 0 ; i < nOnlyInImportLanguageCount ; ++i ) + for( const lang::Locale& rLocale : aOnlyInImportLanguages ) { - aTmpLocale = aOnlyInImportLanguages[i]; - if( !localesAreEqual( aFirstLocale, aTmpLocale ) ) - aRemainingLocaleSeq[iSeq++] = aTmpLocale; + if( !localesAreEqual( aFirstLocale, rLocale ) ) + pRemainingLocaleSeq[iSeq++] = rLocale; } pCurMgr->handleAddLocales( aRemainingLocaleSeq ); } @@ -1235,7 +1177,7 @@ void DialogWindow::InitSettings() SetTextColor( rStyleSettings.GetFieldTextColor() ); SetTextFillColor(); - SetBackground( rStyleSettings.GetFieldColor() ); + SetBackground(rStyleSettings.GetFaceColor()); } css::uno::Reference< css::accessibility::XAccessible > DialogWindow::CreateAccessible() @@ -1243,10 +1185,11 @@ css::uno::Reference< css::accessibility::XAccessible > DialogWindow::CreateAcces return new AccessibleDialogWindow(this); } -char const* DialogWindow::GetHid () const +OUString DialogWindow::GetHid () const { return HID_BASICIDE_DIALOGWINDOW; } + ItemType DialogWindow::GetType () const { return TYPE_DIALOG; |