Kaydet (Commit) df9f26c2 authored tarafından Noel Power's avatar Noel Power

fix fdo#66586 Revert "fdo#46808, create IDL fortree::DefaultTreeDataModel"

This reverts commit fcd01fba.

Service DefaultTreeDataModel actually doens't exist ( and we can't find
when/where it used to :-( ) The treecontrolpeer.cxx change to
use the new service also had the undesired effect of throwing an exception
when the UnoTreeControl model is inserted ( previously this failed silently )
The net effect is the dialog control is malformed and not initialised
correctly
üst 146e3927
...@@ -72,7 +72,6 @@ $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/awt/tab,\ ...@@ -72,7 +72,6 @@ $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/awt/tab,\
UnoControlTabPageModel \ UnoControlTabPageModel \
)) ))
$(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/awt/tree,\ $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/awt/tree,\
DefaultTreeDataModel \
MutableTreeDataModel \ MutableTreeDataModel \
MutableTreeNode \ MutableTreeNode \
TreeControl \ TreeControl \
......
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* 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 .
*/
#ifndef __com_sun_star_awt_tree_DefaultTreeDataModel_idl__
#define __com_sun_star_awt_tree_DefaultTreeDataModel_idl__
#include <com/sun/star/awt/tree/XTreeDataModel.idl>
module com { module sun { module star { module awt { module tree {
/**
@since LibreOffice 4.1
*/
service DefaultTreeDataModel : XTreeDataModel;
}; }; }; }; };
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -22,8 +22,6 @@ ...@@ -22,8 +22,6 @@
#include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/DisposedException.hpp> #include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/view/SelectionType.hpp> #include <com/sun/star/view/SelectionType.hpp>
#include <com/sun/star/awt/tree/DefaultTreeDataModel.hpp>
#include <toolkit/helper/property.hxx> #include <toolkit/helper/property.hxx>
#include <toolkit/helper/vclunohelper.hxx> #include <toolkit/helper/vclunohelper.hxx>
...@@ -1230,8 +1228,12 @@ void TreeControlPeer::onChangeDataModel( UnoTreeListBoxImpl& rTree, const Refere ...@@ -1230,8 +1228,12 @@ void TreeControlPeer::onChangeDataModel( UnoTreeListBoxImpl& rTree, const Refere
if( !xDataModel.is() ) if( !xDataModel.is() )
{ {
Reference< XComponentContext > xORB( ::comphelper::getProcessComponentContext() ); static const OUString aSN( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.tree.DefaultTreeDataModel" ) );
mxDataModel.query( DefaultTreeDataModel::create(xORB)); Reference< XMultiServiceFactory > xORB( ::comphelper::getProcessServiceFactory() );
if( xORB.is() )
{
mxDataModel.query( xORB->createInstance( aSN ) );
}
} }
mxDataModel = xDataModel; mxDataModel = xDataModel;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment