eec42f0dbc
since it uses o3tl::cow_wrapper, so it is really just a wrapper around a pointer, no point in allocating it on the heap Remove assert in SdrText::SetOutlinerParaObject, which was bogus anyhow, because it was comparing pointers, not deep equality. And since we are now being more efficient and avoiding copying of the internal data in OutlinerParaObject, we hit this assert. Change-Id: I6dbfaab5ee2ca05b2001baf63110041e469df9c5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120510 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
55 lines
1.7 KiB
C++
55 lines
1.7 KiB
C++
/* -*- 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 .
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <editeng/unotext.hxx>
|
|
#include <rtl/ref.hxx>
|
|
#include <editeng/outliner.hxx>
|
|
|
|
class SdDrawDocument;
|
|
|
|
namespace sd {
|
|
|
|
class TextAPIEditSource;
|
|
|
|
class TextApiObject final : public SvxUnoText
|
|
{
|
|
public:
|
|
static rtl::Reference< TextApiObject > create( SdDrawDocument* pDoc );
|
|
|
|
virtual ~TextApiObject() noexcept override;
|
|
|
|
/// @throws css::uno::RuntimeException
|
|
void dispose();
|
|
|
|
std::optional<OutlinerParaObject> CreateText();
|
|
void SetText( OutlinerParaObject const & rText );
|
|
OUString GetText() const;
|
|
|
|
static TextApiObject* getImplementation( const css::uno::Reference< css::text::XText >& );
|
|
|
|
private:
|
|
std::unique_ptr<TextAPIEditSource> mpSource;
|
|
TextApiObject( std::unique_ptr<TextAPIEditSource> pEditSource );
|
|
};
|
|
|
|
} // namespace sd
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|