loplugin:referencecasting in avmedia..basic
Change-Id: I6790b2e3902d64fb6f714f031affa221dbaba014 Reviewed-on: https://gerrit.libreoffice.org/75934 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
@@ -152,11 +152,7 @@ void MediaWindowImpl::dispose()
|
|||||||
mxPlayerWindow->removeKeyListener( uno::Reference< awt::XKeyListener >( pEventsIf, uno::UNO_QUERY ) );
|
mxPlayerWindow->removeKeyListener( uno::Reference< awt::XKeyListener >( pEventsIf, uno::UNO_QUERY ) );
|
||||||
mxPlayerWindow->removeMouseListener( uno::Reference< awt::XMouseListener >( pEventsIf, uno::UNO_QUERY ) );
|
mxPlayerWindow->removeMouseListener( uno::Reference< awt::XMouseListener >( pEventsIf, uno::UNO_QUERY ) );
|
||||||
mxPlayerWindow->removeMouseMotionListener( uno::Reference< awt::XMouseMotionListener >( pEventsIf, uno::UNO_QUERY ) );
|
mxPlayerWindow->removeMouseMotionListener( uno::Reference< awt::XMouseMotionListener >( pEventsIf, uno::UNO_QUERY ) );
|
||||||
|
mxPlayerWindow->dispose();
|
||||||
uno::Reference< lang::XComponent > xComponent( mxPlayerWindow, uno::UNO_QUERY );
|
|
||||||
if (xComponent.is())
|
|
||||||
xComponent->dispose();
|
|
||||||
|
|
||||||
mxPlayerWindow.clear();
|
mxPlayerWindow.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -222,7 +218,7 @@ uno::Reference< media::XPlayer > MediaWindowImpl::createPlayer(
|
|||||||
xContext->getServiceManager()->createInstanceWithContext(rManagerServName, xContext),
|
xContext->getServiceManager()->createInstanceWithContext(rManagerServName, xContext),
|
||||||
uno::UNO_QUERY );
|
uno::UNO_QUERY );
|
||||||
if( xManager.is() )
|
if( xManager.is() )
|
||||||
xPlayer.set( xManager->createPlayer( rURL ), uno::UNO_QUERY );
|
xPlayer = xManager->createPlayer( rURL );
|
||||||
else
|
else
|
||||||
SAL_INFO( "avmedia", "failed to create media player service " << rManagerServName );
|
SAL_INFO( "avmedia", "failed to create media player service " << rManagerServName );
|
||||||
} catch ( const uno::Exception & )
|
} catch ( const uno::Exception & )
|
||||||
|
@@ -169,7 +169,7 @@ vcl::Window* AccessibleDialogControlShape::GetWindow() const
|
|||||||
vcl::Window* pWindow = nullptr;
|
vcl::Window* pWindow = nullptr;
|
||||||
if ( m_pDlgEdObj )
|
if ( m_pDlgEdObj )
|
||||||
{
|
{
|
||||||
Reference< awt::XControl > xControl( m_pDlgEdObj->GetControl(), UNO_QUERY );
|
Reference< awt::XControl > xControl = m_pDlgEdObj->GetControl();
|
||||||
if ( xControl.is() )
|
if ( xControl.is() )
|
||||||
pWindow = VCLUnoHelper::GetWindow( xControl->getPeer() ).get();
|
pWindow = VCLUnoHelper::GetWindow( xControl->getPeer() ).get();
|
||||||
}
|
}
|
||||||
|
@@ -1034,16 +1034,14 @@ bool implImportDialog(weld::Window* pWin, const OUString& rCurPath, const Script
|
|||||||
}
|
}
|
||||||
else if( !bLibLocalized )
|
else if( !bLibLocalized )
|
||||||
{
|
{
|
||||||
Reference< resource::XStringResourceManager > xImportStringResourceManager( xImportStringResource, UNO_QUERY );
|
LocalizationMgr::resetResourceForDialog( xDialogModel, xImportStringResource );
|
||||||
LocalizationMgr::resetResourceForDialog( xDialogModel, xImportStringResourceManager );
|
|
||||||
bCopyResourcesForDialog = false;
|
bCopyResourcesForDialog = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( bCopyResourcesForDialog )
|
if( bCopyResourcesForDialog )
|
||||||
{
|
{
|
||||||
Reference< resource::XStringResourceResolver > xImportStringResourceResolver( xImportStringResource, UNO_QUERY );
|
|
||||||
LocalizationMgr::copyResourceForDroppedDialog( xDialogModel, aXmlDlgName,
|
LocalizationMgr::copyResourceForDroppedDialog( xDialogModel, aXmlDlgName,
|
||||||
xLibStringResourceManager, xImportStringResourceResolver );
|
xLibStringResourceManager, xImportStringResource );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if( bLibLocalized )
|
else if( bLibLocalized )
|
||||||
|
@@ -696,11 +696,8 @@ void TreeListBox::GetRootEntryBitmaps( const ScriptDocument& rDocument, Image& r
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
OUString sModule( xModuleManager->identify( rDocument.getDocument() ) );
|
OUString sModule( xModuleManager->identify( rDocument.getDocument() ) );
|
||||||
Reference< container::XNameAccess > xModuleConfig( xModuleManager, UNO_QUERY );
|
|
||||||
if ( xModuleConfig.is() )
|
|
||||||
{
|
|
||||||
Sequence< beans::PropertyValue > aModuleDescr;
|
Sequence< beans::PropertyValue > aModuleDescr;
|
||||||
xModuleConfig->getByName( sModule ) >>= aModuleDescr;
|
xModuleManager->getByName( sModule ) >>= aModuleDescr;
|
||||||
sal_Int32 nCount = aModuleDescr.getLength();
|
sal_Int32 nCount = aModuleDescr.getLength();
|
||||||
const beans::PropertyValue* pModuleDescr = aModuleDescr.getConstArray();
|
const beans::PropertyValue* pModuleDescr = aModuleDescr.getConstArray();
|
||||||
for ( sal_Int32 i = 0; i < nCount; ++i )
|
for ( sal_Int32 i = 0; i < nCount; ++i )
|
||||||
@@ -712,7 +709,6 @@ void TreeListBox::GetRootEntryBitmaps( const ScriptDocument& rDocument, Image& r
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
catch( const Exception& )
|
catch( const Exception& )
|
||||||
{
|
{
|
||||||
DBG_UNHANDLED_EXCEPTION("basctl.basicide");
|
DBG_UNHANDLED_EXCEPTION("basctl.basicide");
|
||||||
@@ -1392,11 +1388,8 @@ OUString SbTreeListBox::GetRootEntryBitmaps(const ScriptDocument& rDocument)
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
OUString sModule( xModuleManager->identify( rDocument.getDocument() ) );
|
OUString sModule( xModuleManager->identify( rDocument.getDocument() ) );
|
||||||
Reference< container::XNameAccess > xModuleConfig( xModuleManager, UNO_QUERY );
|
|
||||||
if ( xModuleConfig.is() )
|
|
||||||
{
|
|
||||||
Sequence< beans::PropertyValue > aModuleDescr;
|
Sequence< beans::PropertyValue > aModuleDescr;
|
||||||
xModuleConfig->getByName( sModule ) >>= aModuleDescr;
|
xModuleManager->getByName( sModule ) >>= aModuleDescr;
|
||||||
sal_Int32 nCount = aModuleDescr.getLength();
|
sal_Int32 nCount = aModuleDescr.getLength();
|
||||||
const beans::PropertyValue* pModuleDescr = aModuleDescr.getConstArray();
|
const beans::PropertyValue* pModuleDescr = aModuleDescr.getConstArray();
|
||||||
for ( sal_Int32 i = 0; i < nCount; ++i )
|
for ( sal_Int32 i = 0; i < nCount; ++i )
|
||||||
@@ -1408,7 +1401,6 @@ OUString SbTreeListBox::GetRootEntryBitmaps(const ScriptDocument& rDocument)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
catch( const Exception& )
|
catch( const Exception& )
|
||||||
{
|
{
|
||||||
DBG_UNHANDLED_EXCEPTION("basctl.basicide");
|
DBG_UNHANDLED_EXCEPTION("basctl.basicide");
|
||||||
|
@@ -89,7 +89,7 @@ void TreeListBox::RequestingChildren( SvTreeListEntry* pEntry )
|
|||||||
|
|
||||||
// load dialog library
|
// load dialog library
|
||||||
bool bDlgLibLoaded = false;
|
bool bDlgLibLoaded = false;
|
||||||
Reference< script::XLibraryContainer > xDlgLibContainer( aDocument.getLibraryContainer( E_DIALOGS ), UNO_QUERY );
|
Reference< script::XLibraryContainer > xDlgLibContainer = aDocument.getLibraryContainer( E_DIALOGS );
|
||||||
if ( xDlgLibContainer.is() && xDlgLibContainer->hasByName( aOULibName ) )
|
if ( xDlgLibContainer.is() && xDlgLibContainer->hasByName( aOULibName ) )
|
||||||
{
|
{
|
||||||
if ( !xDlgLibContainer->isLibraryLoaded( aOULibName ) )
|
if ( !xDlgLibContainer->isLibraryLoaded( aOULibName ) )
|
||||||
@@ -178,7 +178,7 @@ IMPL_LINK(SbTreeListBox, RequestingChildrenHdl, const weld::TreeIter&, rEntry, b
|
|||||||
|
|
||||||
// load dialog library
|
// load dialog library
|
||||||
bool bDlgLibLoaded = false;
|
bool bDlgLibLoaded = false;
|
||||||
Reference< script::XLibraryContainer > xDlgLibContainer( aDocument.getLibraryContainer( E_DIALOGS ), UNO_QUERY );
|
Reference< script::XLibraryContainer > xDlgLibContainer = aDocument.getLibraryContainer( E_DIALOGS );
|
||||||
if ( xDlgLibContainer.is() && xDlgLibContainer->hasByName( aOULibName ) )
|
if ( xDlgLibContainer.is() && xDlgLibContainer->hasByName( aOULibName ) )
|
||||||
{
|
{
|
||||||
if ( !xDlgLibContainer->isLibraryLoaded( aOULibName ) )
|
if ( !xDlgLibContainer->isLibraryLoaded( aOULibName ) )
|
||||||
|
@@ -179,7 +179,7 @@ IMPL_STATIC_LINK(ExtraData, GlobalBasicBreakHdl, StarBASIC *, pBasic, BasicDebug
|
|||||||
if ( aDocument.isValid() )
|
if ( aDocument.isValid() )
|
||||||
{
|
{
|
||||||
OUString aOULibName( pBasic->GetName() );
|
OUString aOULibName( pBasic->GetName() );
|
||||||
Reference< script::XLibraryContainer > xModLibContainer( aDocument.getLibraryContainer( E_SCRIPTS ), UNO_QUERY );
|
Reference< script::XLibraryContainer > xModLibContainer = aDocument.getLibraryContainer( E_SCRIPTS );
|
||||||
if ( xModLibContainer.is() && xModLibContainer->hasByName( aOULibName ) )
|
if ( xModLibContainer.is() && xModLibContainer->hasByName( aOULibName ) )
|
||||||
{
|
{
|
||||||
Reference< script::XLibraryContainerPassword > xPasswd( xModLibContainer, UNO_QUERY );
|
Reference< script::XLibraryContainerPassword > xPasswd( xModLibContainer, UNO_QUERY );
|
||||||
|
@@ -271,8 +271,7 @@ IMPL_LINK(LibPage, EditingEntryHdl, const weld::TreeIter&, rIter, bool)
|
|||||||
if ( xPasswd.is() && xPasswd->isLibraryPasswordProtected( aLibName ) && !xPasswd->isLibraryPasswordVerified( aLibName ) )
|
if ( xPasswd.is() && xPasswd->isLibraryPasswordProtected( aLibName ) && !xPasswd->isLibraryPasswordVerified( aLibName ) )
|
||||||
{
|
{
|
||||||
OUString aPassword;
|
OUString aPassword;
|
||||||
Reference< script::XLibraryContainer > xModLibContainer1( xModLibContainer, UNO_QUERY );
|
bOK = QueryPassword( xModLibContainer, aLibName, aPassword );
|
||||||
bOK = QueryPassword( xModLibContainer1, aLibName, aPassword );
|
|
||||||
}
|
}
|
||||||
if ( !bOK )
|
if ( !bOK )
|
||||||
return false;
|
return false;
|
||||||
@@ -613,13 +612,13 @@ void LibPage::InsertLib()
|
|||||||
OUString aModURL( aModURLObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
|
OUString aModURL( aModURLObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
|
||||||
if ( xSFA->exists( aModURL ) )
|
if ( xSFA->exists( aModURL ) )
|
||||||
{
|
{
|
||||||
xModLibContImport.set( script::DocumentScriptLibraryContainer::createWithURL(xContext, aModURL), UNO_QUERY );
|
xModLibContImport = script::DocumentScriptLibraryContainer::createWithURL(xContext, aModURL);
|
||||||
}
|
}
|
||||||
|
|
||||||
OUString aDlgURL( aDlgURLObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
|
OUString aDlgURL( aDlgURLObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
|
||||||
if ( xSFA->exists( aDlgURL ) )
|
if ( xSFA->exists( aDlgURL ) )
|
||||||
{
|
{
|
||||||
xDlgLibContImport.set( script::DocumentDialogLibraryContainer::createWithURL(xContext, aDlgURL), UNO_QUERY );
|
xDlgLibContImport = script::DocumentDialogLibraryContainer::createWithURL(xContext, aDlgURL);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !xModLibContImport.is() && !xDlgLibContImport.is() )
|
if ( !xModLibContImport.is() && !xDlgLibContImport.is() )
|
||||||
@@ -627,9 +626,7 @@ void LibPage::InsertLib()
|
|||||||
|
|
||||||
std::shared_ptr<LibDialog> xLibDlg;
|
std::shared_ptr<LibDialog> xLibDlg;
|
||||||
|
|
||||||
Reference< script::XLibraryContainer > xModLibContImp( xModLibContImport, UNO_QUERY );
|
Sequence< OUString > aLibNames = GetMergedLibraryNames( xModLibContImport, xDlgLibContImport );
|
||||||
Reference< script::XLibraryContainer > xDlgLibContImp( xDlgLibContImport, UNO_QUERY );
|
|
||||||
Sequence< OUString > aLibNames = GetMergedLibraryNames( xModLibContImp, xDlgLibContImp );
|
|
||||||
sal_Int32 nLibCount = aLibNames.getLength();
|
sal_Int32 nLibCount = aLibNames.getLength();
|
||||||
const OUString* pLibNames = aLibNames.getConstArray();
|
const OUString* pLibNames = aLibNames.getConstArray();
|
||||||
for ( sal_Int32 i = 0 ; i < nLibCount ; i++ )
|
for ( sal_Int32 i = 0 ; i < nLibCount ; i++ )
|
||||||
@@ -672,7 +669,7 @@ void LibPage::InsertLib()
|
|||||||
if ( aExtension != aLibExtension && aExtension != aContExtension )
|
if ( aExtension != aLibExtension && aExtension != aContExtension )
|
||||||
xLibDlg->EnableReference(false);
|
xLibDlg->EnableReference(false);
|
||||||
|
|
||||||
weld::DialogController::runAsync(xLibDlg, [aContExtension, aDlgURLObj, aExtension, aLibExtension, aModURLObj, xLibDlg, xDlgLibContImport, xModLibContImp, xModLibContImport, this](sal_Int32 nResult)
|
weld::DialogController::runAsync(xLibDlg, [aContExtension, aDlgURLObj, aExtension, aLibExtension, aModURLObj, xLibDlg, xDlgLibContImport, xModLibContImport, this](sal_Int32 nResult)
|
||||||
{
|
{
|
||||||
if (!nResult )
|
if (!nResult )
|
||||||
return;
|
return;
|
||||||
@@ -744,7 +741,7 @@ void LibPage::InsertLib()
|
|||||||
Reference< script::XLibraryContainerPassword > xPasswd( xModLibContImport, UNO_QUERY );
|
Reference< script::XLibraryContainerPassword > xPasswd( xModLibContImport, UNO_QUERY );
|
||||||
if ( xPasswd.is() && xPasswd->isLibraryPasswordProtected( aLibName ) && !xPasswd->isLibraryPasswordVerified( aLibName ) && !bReference )
|
if ( xPasswd.is() && xPasswd->isLibraryPasswordProtected( aLibName ) && !xPasswd->isLibraryPasswordVerified( aLibName ) && !bReference )
|
||||||
{
|
{
|
||||||
bOK = QueryPassword( xModLibContImp, aLibName, aPassword, true, true );
|
bOK = QueryPassword( xModLibContImport, aLibName, aPassword, true, true );
|
||||||
|
|
||||||
if ( !bOK )
|
if ( !bOK )
|
||||||
{
|
{
|
||||||
@@ -928,8 +925,7 @@ void LibPage::Export()
|
|||||||
if ( xPasswd.is() && xPasswd->isLibraryPasswordProtected( aLibName ) && !xPasswd->isLibraryPasswordVerified( aLibName ) )
|
if ( xPasswd.is() && xPasswd->isLibraryPasswordProtected( aLibName ) && !xPasswd->isLibraryPasswordVerified( aLibName ) )
|
||||||
{
|
{
|
||||||
OUString aPassword;
|
OUString aPassword;
|
||||||
Reference< script::XLibraryContainer > xModLibContainer1( xModLibContainer, UNO_QUERY );
|
bOK = QueryPassword( xModLibContainer, aLibName, aPassword );
|
||||||
bOK = QueryPassword( xModLibContainer1, aLibName, aPassword );
|
|
||||||
}
|
}
|
||||||
if ( !bOK )
|
if ( !bOK )
|
||||||
return;
|
return;
|
||||||
@@ -1052,10 +1048,7 @@ void LibPage::ExportAsPackage( const OUString& aLibName )
|
|||||||
Reference< task::XInteractionHandler > xDummyHandler( new DummyInteractionHandler( xHandler ) );
|
Reference< task::XInteractionHandler > xDummyHandler( new DummyInteractionHandler( xHandler ) );
|
||||||
implExportLib( aLibName, aTmpPath, xDummyHandler );
|
implExportLib( aLibName, aTmpPath, xDummyHandler );
|
||||||
|
|
||||||
Reference< XCommandEnvironment > xCmdEnv =
|
Reference< XCommandEnvironment > xCmdEnv = new OLibCommandEnvironment(xHandler);
|
||||||
new OLibCommandEnvironment(
|
|
||||||
Reference< task::XInteractionHandler >(
|
|
||||||
xHandler, UNO_QUERY));
|
|
||||||
|
|
||||||
::ucbhelper::Content sourceContent( aSourcePath, xCmdEnv, comphelper::getProcessComponentContext() );
|
::ucbhelper::Content sourceContent( aSourcePath, xCmdEnv, comphelper::getProcessComponentContext() );
|
||||||
|
|
||||||
|
@@ -165,8 +165,7 @@ void Shell::CopyDialogResources(
|
|||||||
{
|
{
|
||||||
if( bSourceLocalized && bDestLocalized )
|
if( bSourceLocalized && bDestLocalized )
|
||||||
{
|
{
|
||||||
Reference< resource::XStringResourceResolver > xSourceStringResolver( xSourceMgr, UNO_QUERY );
|
LocalizationMgr::copyResourceForDroppedDialog( xDialogModel, rDlgName, xDestMgr, xSourceMgr );
|
||||||
LocalizationMgr::copyResourceForDroppedDialog( xDialogModel, rDlgName, xDestMgr, xSourceStringResolver );
|
|
||||||
}
|
}
|
||||||
else if( bSourceLocalized )
|
else if( bSourceLocalized )
|
||||||
{
|
{
|
||||||
|
@@ -362,11 +362,10 @@ void DlgEditor::SetDialog( const uno::Reference< container::XNameContainer >& xU
|
|||||||
pDlgEdForm->StartListening();
|
pDlgEdForm->StartListening();
|
||||||
|
|
||||||
// create controls
|
// create controls
|
||||||
Reference< css::container::XNameAccess > xNameAcc( m_xUnoControlDialogModel, UNO_QUERY );
|
if ( m_xUnoControlDialogModel.is() )
|
||||||
if ( xNameAcc.is() )
|
|
||||||
{
|
{
|
||||||
// get sequence of control names
|
// get sequence of control names
|
||||||
Sequence< OUString > aNames = xNameAcc->getElementNames();
|
Sequence< OUString > aNames = m_xUnoControlDialogModel->getElementNames();
|
||||||
const OUString* pNames = aNames.getConstArray();
|
const OUString* pNames = aNames.getConstArray();
|
||||||
sal_Int32 nCtrls = aNames.getLength();
|
sal_Int32 nCtrls = aNames.getLength();
|
||||||
|
|
||||||
@@ -379,7 +378,7 @@ void DlgEditor::SetDialog( const uno::Reference< container::XNameContainer >& xU
|
|||||||
|
|
||||||
// get tab index
|
// get tab index
|
||||||
sal_Int16 nTabIndex = -1;
|
sal_Int16 nTabIndex = -1;
|
||||||
Any aCtrl = xNameAcc->getByName( aName );
|
Any aCtrl = m_xUnoControlDialogModel->getByName( aName );
|
||||||
Reference< css::beans::XPropertySet > xPSet;
|
Reference< css::beans::XPropertySet > xPSet;
|
||||||
aCtrl >>= xPSet;
|
aCtrl >>= xPSet;
|
||||||
if ( xPSet.is() )
|
if ( xPSet.is() )
|
||||||
@@ -392,7 +391,7 @@ void DlgEditor::SetDialog( const uno::Reference< container::XNameContainer >& xU
|
|||||||
// create controls and insert them into drawing page
|
// create controls and insert them into drawing page
|
||||||
for (auto const& indexToName : aIndexToNameMap)
|
for (auto const& indexToName : aIndexToNameMap)
|
||||||
{
|
{
|
||||||
Any aCtrl = xNameAcc->getByName( indexToName.second );
|
Any aCtrl = m_xUnoControlDialogModel->getByName( indexToName.second );
|
||||||
Reference< css::awt::XControlModel > xCtrlModel;
|
Reference< css::awt::XControlModel > xCtrlModel;
|
||||||
aCtrl >>= xCtrlModel;
|
aCtrl >>= xCtrlModel;
|
||||||
DlgEdObj* pCtrlObj = new DlgEdObj(*pDlgEdModel);
|
DlgEdObj* pCtrlObj = new DlgEdObj(*pDlgEdModel);
|
||||||
@@ -679,10 +678,9 @@ void DlgEditor::Copy()
|
|||||||
Reference< util::XCloneable > xNewClone = xClone->createClone();
|
Reference< util::XCloneable > xNewClone = xClone->createClone();
|
||||||
Reference< container::XNameContainer > xClipDialogModel( xNewClone, UNO_QUERY );
|
Reference< container::XNameContainer > xClipDialogModel( xNewClone, UNO_QUERY );
|
||||||
|
|
||||||
Reference< container::XNameAccess > xNAcc( xClipDialogModel, UNO_QUERY );
|
if ( xClipDialogModel.is() )
|
||||||
if ( xNAcc.is() )
|
|
||||||
{
|
{
|
||||||
Sequence< OUString > aNames = xNAcc->getElementNames();
|
Sequence< OUString > aNames = xClipDialogModel->getElementNames();
|
||||||
const OUString* pNames = aNames.getConstArray();
|
const OUString* pNames = aNames.getConstArray();
|
||||||
sal_uInt32 nCtrls = aNames.getLength();
|
sal_uInt32 nCtrls = aNames.getLength();
|
||||||
|
|
||||||
@@ -708,10 +706,9 @@ void DlgEditor::Copy()
|
|||||||
xMarkPSet->getPropertyValue( DLGED_PROP_NAME ) >>= aName;
|
xMarkPSet->getPropertyValue( DLGED_PROP_NAME ) >>= aName;
|
||||||
}
|
}
|
||||||
|
|
||||||
Reference< container::XNameAccess > xNameAcc(m_xUnoControlDialogModel, UNO_QUERY );
|
if ( m_xUnoControlDialogModel.is() && m_xUnoControlDialogModel->hasByName(aName) )
|
||||||
if ( xNameAcc.is() && xNameAcc->hasByName(aName) )
|
|
||||||
{
|
{
|
||||||
Any aCtrl = xNameAcc->getByName( aName );
|
Any aCtrl = m_xUnoControlDialogModel->getByName( aName );
|
||||||
|
|
||||||
// clone control model
|
// clone control model
|
||||||
Reference< util::XCloneable > xCtrl;
|
Reference< util::XCloneable > xCtrl;
|
||||||
@@ -759,9 +756,7 @@ void DlgEditor::Copy()
|
|||||||
// With resource, support old and new format
|
// With resource, support old and new format
|
||||||
|
|
||||||
// Export xClipDialogModel another time with ids replaced by current language string
|
// Export xClipDialogModel another time with ids replaced by current language string
|
||||||
uno::Reference< resource::XStringResourceManager >
|
LocalizationMgr::resetResourceForDialog( xClipDialogModel, xStringResourcePersistence );
|
||||||
xStringResourceManager( xStringResourcePersistence, uno::UNO_QUERY );
|
|
||||||
LocalizationMgr::resetResourceForDialog( xClipDialogModel, xStringResourceManager );
|
|
||||||
Reference< XInputStreamProvider > xISP2 = ::xmlscript::exportDialogModel( xClipDialogModel, xContext, m_xDocument );
|
Reference< XInputStreamProvider > xISP2 = ::xmlscript::exportDialogModel( xClipDialogModel, xContext, m_xDocument );
|
||||||
Reference< XInputStream > xStream2( xISP2->createInputStream() );
|
Reference< XInputStream > xStream2( xISP2->createInputStream() );
|
||||||
Sequence< sal_Int8 > NoResourceDialogModelBytes;
|
Sequence< sal_Int8 > NoResourceDialogModelBytes;
|
||||||
@@ -906,10 +901,9 @@ void DlgEditor::Paste()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// get control models from clipboard dialog model
|
// get control models from clipboard dialog model
|
||||||
Reference< css::container::XNameAccess > xNameAcc( xClipDialogModel, UNO_QUERY );
|
if ( xClipDialogModel.is() )
|
||||||
if ( xNameAcc.is() )
|
|
||||||
{
|
{
|
||||||
Sequence< OUString > aNames = xNameAcc->getElementNames();
|
Sequence< OUString > aNames = xClipDialogModel->getElementNames();
|
||||||
const OUString* pNames = aNames.getConstArray();
|
const OUString* pNames = aNames.getConstArray();
|
||||||
sal_uInt32 nCtrls = aNames.getLength();
|
sal_uInt32 nCtrls = aNames.getLength();
|
||||||
|
|
||||||
@@ -921,7 +915,7 @@ void DlgEditor::Paste()
|
|||||||
}
|
}
|
||||||
for( sal_uInt32 n = 0; n < nCtrls; n++ )
|
for( sal_uInt32 n = 0; n < nCtrls; n++ )
|
||||||
{
|
{
|
||||||
Any aA = xNameAcc->getByName( pNames[n] );
|
Any aA = xClipDialogModel->getByName( pNames[n] );
|
||||||
Reference< css::awt::XControlModel > xCM;
|
Reference< css::awt::XControlModel > xCM;
|
||||||
aA >>= xCM;
|
aA >>= xCM;
|
||||||
|
|
||||||
@@ -940,8 +934,7 @@ void DlgEditor::Paste()
|
|||||||
xPSet->setPropertyValue( DLGED_PROP_NAME, Any(aOUniqueName) );
|
xPSet->setPropertyValue( DLGED_PROP_NAME, Any(aOUniqueName) );
|
||||||
|
|
||||||
// set tabindex
|
// set tabindex
|
||||||
Reference< container::XNameAccess > xNA( m_xUnoControlDialogModel , UNO_QUERY );
|
Sequence< OUString > aNames_ = m_xUnoControlDialogModel->getElementNames();
|
||||||
Sequence< OUString > aNames_ = xNA->getElementNames();
|
|
||||||
xPSet->setPropertyValue( DLGED_PROP_TABINDEX, Any(static_cast<sal_Int16>(aNames_.getLength())) );
|
xPSet->setPropertyValue( DLGED_PROP_TABINDEX, Any(static_cast<sal_Int16>(aNames_.getLength())) );
|
||||||
|
|
||||||
if( bLocalized )
|
if( bLocalized )
|
||||||
@@ -950,10 +943,8 @@ void DlgEditor::Paste()
|
|||||||
aControlAny <<= xCtrlModel;
|
aControlAny <<= xCtrlModel;
|
||||||
if( bSourceIsLocalized && xStringResourcePersistence.is() )
|
if( bSourceIsLocalized && xStringResourcePersistence.is() )
|
||||||
{
|
{
|
||||||
Reference< resource::XStringResourceResolver >
|
|
||||||
xSourceStringResolver( xStringResourcePersistence, UNO_QUERY );
|
|
||||||
LocalizationMgr::copyResourcesForPastedEditorObject( this,
|
LocalizationMgr::copyResourcesForPastedEditorObject( this,
|
||||||
aControlAny, aOUniqueName, xSourceStringResolver );
|
aControlAny, aOUniqueName, xStringResourcePersistence );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@@ -464,7 +464,7 @@ void DlgEdObj::NameChange( const css::beans::PropertyChangeEvent& evt )
|
|||||||
Reference< container::XNameContainer > xCont(xNameAcc, UNO_QUERY );
|
Reference< container::XNameContainer > xCont(xNameAcc, UNO_QUERY );
|
||||||
if ( xCont.is() )
|
if ( xCont.is() )
|
||||||
{
|
{
|
||||||
Reference< awt::XControlModel > xCtrl(GetUnoControlModel(), UNO_QUERY);
|
Reference< awt::XControlModel > xCtrl = GetUnoControlModel();
|
||||||
Any aAny;
|
Any aAny;
|
||||||
aAny <<= xCtrl;
|
aAny <<= xCtrl;
|
||||||
xCont->removeByName( aOldName );
|
xCont->removeByName( aOldName );
|
||||||
@@ -1521,7 +1521,7 @@ void DlgEdForm::UpdateGroups()
|
|||||||
sal_uInt32 nSize = aChildList.size();
|
sal_uInt32 nSize = aChildList.size();
|
||||||
Sequence< Reference< awt::XControl > > aSeqControls( nSize );
|
Sequence< Reference< awt::XControl > > aSeqControls( nSize );
|
||||||
for ( sal_uInt32 i = 0; i < nSize; ++i )
|
for ( sal_uInt32 i = 0; i < nSize; ++i )
|
||||||
aSeqControls.getArray()[i].set( aChildList[i]->GetControl(), UNO_QUERY );
|
aSeqControls.getArray()[i] = aChildList[i]->GetControl();
|
||||||
|
|
||||||
sal_Int32 nGroupCount = xTabModel->getGroupCount();
|
sal_Int32 nGroupCount = xTabModel->getGroupCount();
|
||||||
for ( sal_Int32 nGroup = 0; nGroup < nGroupCount; ++nGroup )
|
for ( sal_Int32 nGroup = 0; nGroup < nGroupCount; ++nGroup )
|
||||||
@@ -1557,7 +1557,7 @@ void DlgEdForm::UpdateGroups()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// set the group at the dialog peer
|
// set the group at the dialog peer
|
||||||
Reference< awt::XControl > xDlg( GetControl(), UNO_QUERY );
|
Reference< awt::XControl > xDlg = GetControl();
|
||||||
if ( xDlg.is() )
|
if ( xDlg.is() )
|
||||||
{
|
{
|
||||||
Reference< awt::XVclContainerPeer > xDlgPeer( xDlg->getPeer(), UNO_QUERY );
|
Reference< awt::XVclContainerPeer > xDlgPeer( xDlg->getPeer(), UNO_QUERY );
|
||||||
|
@@ -137,16 +137,14 @@ namespace basegfx
|
|||||||
uno::Sequence< uno::Sequence< geometry::RealBezierSegment2D > > outputSequence( 1 );
|
uno::Sequence< uno::Sequence< geometry::RealBezierSegment2D > > outputSequence( 1 );
|
||||||
outputSequence[0] = bezierSequenceFromB2DPolygon( rPoly );
|
outputSequence[0] = bezierSequenceFromB2DPolygon( rPoly );
|
||||||
|
|
||||||
xRes.set( xGraphicDevice->createCompatibleBezierPolyPolygon( outputSequence ),
|
xRes = xGraphicDevice->createCompatibleBezierPolyPolygon( outputSequence );
|
||||||
uno::UNO_QUERY );
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
uno::Sequence< uno::Sequence< geometry::RealPoint2D > > outputSequence( 1 );
|
uno::Sequence< uno::Sequence< geometry::RealPoint2D > > outputSequence( 1 );
|
||||||
outputSequence[0] = pointSequenceFromB2DPolygon( rPoly );
|
outputSequence[0] = pointSequenceFromB2DPolygon( rPoly );
|
||||||
|
|
||||||
xRes.set( xGraphicDevice->createCompatibleLinePolyPolygon( outputSequence ),
|
xRes = xGraphicDevice->createCompatibleLinePolyPolygon( outputSequence );
|
||||||
uno::UNO_QUERY );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if( xRes.is() && rPoly.isClosed() )
|
if( xRes.is() && rPoly.isClosed() )
|
||||||
@@ -168,15 +166,13 @@ namespace basegfx
|
|||||||
|
|
||||||
if( rPolyPoly.areControlPointsUsed() )
|
if( rPolyPoly.areControlPointsUsed() )
|
||||||
{
|
{
|
||||||
xRes.set( xGraphicDevice->createCompatibleBezierPolyPolygon(
|
xRes = xGraphicDevice->createCompatibleBezierPolyPolygon(
|
||||||
bezierSequenceSequenceFromB2DPolyPolygon( rPolyPoly ) ),
|
bezierSequenceSequenceFromB2DPolyPolygon( rPolyPoly ) );
|
||||||
uno::UNO_QUERY );
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
xRes.set( xGraphicDevice->createCompatibleLinePolyPolygon(
|
xRes = xGraphicDevice->createCompatibleLinePolyPolygon(
|
||||||
pointSequenceSequenceFromB2DPolyPolygon( rPolyPoly ) ),
|
pointSequenceSequenceFromB2DPolyPolygon( rPolyPoly ) );
|
||||||
uno::UNO_QUERY );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for( i=0; i<nNumPolies; ++i )
|
for( i=0; i<nNumPolies; ++i )
|
||||||
|
@@ -90,7 +90,7 @@ void SFURL_firing_impl( const ScriptEvent& aScriptEvent, Any* pRet, const Refere
|
|||||||
|
|
||||||
Any aCtx;
|
Any aCtx;
|
||||||
aCtx <<= OUString("user");
|
aCtx <<= OUString("user");
|
||||||
xScriptProvider.set( xFactory->createScriptProvider( aCtx ), UNO_QUERY );
|
xScriptProvider = xFactory->createScriptProvider( aCtx );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !xScriptProvider.is() )
|
if ( !xScriptProvider.is() )
|
||||||
@@ -483,10 +483,10 @@ void RTL_Impl_CreateUnoDialog( SbxArray& rPar )
|
|||||||
{
|
{
|
||||||
Reference< frame::XDesktop2 > xDesktop = frame::Desktop::create( xContext );
|
Reference< frame::XDesktop2 > xDesktop = frame::Desktop::create( xContext );
|
||||||
Reference< container::XEnumeration > xModels;
|
Reference< container::XEnumeration > xModels;
|
||||||
Reference< container::XEnumerationAccess > xComponents( xDesktop->getComponents(), UNO_QUERY );
|
Reference< container::XEnumerationAccess > xComponents = xDesktop->getComponents();
|
||||||
if ( xComponents.is() )
|
if ( xComponents.is() )
|
||||||
{
|
{
|
||||||
xModels.set( xComponents->createEnumeration(), UNO_QUERY );
|
xModels = xComponents->createEnumeration();
|
||||||
}
|
}
|
||||||
if ( xModels.is() )
|
if ( xModels.is() )
|
||||||
{
|
{
|
||||||
|
@@ -560,8 +560,7 @@ Reference< resource::XStringResourceResolver >
|
|||||||
if( !m_xStringResourcePersistence.is() )
|
if( !m_xStringResourcePersistence.is() )
|
||||||
m_xStringResourcePersistence = m_pParent->implCreateStringResource( this );
|
m_xStringResourcePersistence = m_pParent->implCreateStringResource( this );
|
||||||
|
|
||||||
Reference< resource::XStringResourceResolver > xRet( m_xStringResourcePersistence, UNO_QUERY );
|
return m_xStringResourcePersistence;
|
||||||
return xRet;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SfxDialogLibrary::containsValidDialog( const css::uno::Any& aElement )
|
bool SfxDialogLibrary::containsValidDialog( const css::uno::Any& aElement )
|
||||||
|
@@ -34,8 +34,8 @@ ModuleSizeExceeded::ModuleSizeExceeded( const std::vector< OUString >& sModules
|
|||||||
|
|
||||||
m_aRequest <<= aReq;
|
m_aRequest <<= aReq;
|
||||||
|
|
||||||
m_xAbort.set( uno::Reference< task::XInteractionAbort >(new comphelper::OInteractionAbort), uno::UNO_QUERY );
|
m_xAbort = new comphelper::OInteractionAbort;
|
||||||
m_xApprove.set( uno::Reference< task::XInteractionApprove >(new comphelper::OInteractionApprove ), uno::UNO_QUERY );
|
m_xApprove = new comphelper::OInteractionApprove;
|
||||||
m_lContinuations.realloc( 2 );
|
m_lContinuations.realloc( 2 );
|
||||||
m_lContinuations[0] = m_xApprove;
|
m_lContinuations[0] = m_xApprove;
|
||||||
m_lContinuations[1] = m_xAbort;
|
m_lContinuations[1] = m_xAbort;
|
||||||
|
Reference in New Issue
Block a user