Kaydet (Commit) fc435133 authored tarafından Caolán McNamara's avatar Caolán McNamara

ImplText never instantiated

üst f0ae0d84
......@@ -82,7 +82,6 @@ $(eval $(call gb_Library_add_exception_objects,cppcanvas,\
cppcanvas/source/wrapper/implpolypolygon \
cppcanvas/source/wrapper/implsprite \
cppcanvas/source/wrapper/implspritecanvas \
cppcanvas/source/wrapper/impltext \
cppcanvas/source/wrapper/vclfactory \
))
......
......@@ -39,10 +39,16 @@
#include <cppcanvas/basegfxfactory.hxx>
#include <com/sun/star/rendering/RenderState.hpp>
#include <com/sun/star/rendering/StringContext.hpp>
#include <com/sun/star/rendering/XCanvas.hpp>
#include <com/sun/star/rendering/XCanvasFont.hpp>
#include <cppcanvas/text.hxx>
#include <canvasgraphichelper.hxx>
#include "implpolypolygon.hxx"
#include "implbitmap.hxx"
#include "impltext.hxx"
using namespace ::com::sun::star;
......
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#include <impltext.hxx>
#include <canvas/canvastools.hxx>
#include <com/sun/star/rendering/TextDirection.hpp>
#include <com/sun/star/rendering/XCanvas.hpp>
#include <com/sun/star/rendering/StringContext.hpp>
#include <rtl/ustring.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx>
using namespace ::com::sun::star;
namespace cppcanvas
{
namespace internal
{
ImplText::ImplText( const CanvasSharedPtr& rParentCanvas,
const ::rtl::OUString& rText ) :
CanvasGraphicHelper( rParentCanvas ),
mpFont(),
maText(rText)
{
}
ImplText::~ImplText()
{
}
bool ImplText::draw() const
{
CanvasSharedPtr pCanvas( getCanvas() );
OSL_ENSURE( pCanvas.get() != NULL &&
pCanvas->getUNOCanvas().is(),
"ImplBitmap::draw: invalid canvas" );
rendering::StringContext aText;
aText.Text = maText;
aText.StartPosition = 0;
aText.Length = maText.getLength();
// TODO(P1): implement caching
// TODO(F2): where to get current BiDi status?
sal_Int8 nBidiOption = rendering::TextDirection::WEAK_LEFT_TO_RIGHT;
pCanvas->getUNOCanvas()->drawText( aText,
mpFont->getUNOFont(),
pCanvas->getViewState(),
getRenderState(),
nBidiOption );
return true;
}
void ImplText::setFont( const FontSharedPtr& rFont )
{
mpFont = rFont;
}
FontSharedPtr ImplText::getFont()
{
return mpFont;
}
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#ifndef _CANVAS_IMPLTEXT_HXX
#define _CANVAS_IMPLTEXT_HXX
#include <com/sun/star/rendering/RenderState.hpp>
#include <com/sun/star/rendering/StringContext.hpp>
#include <com/sun/star/rendering/XCanvas.hpp>
#include <com/sun/star/rendering/XCanvasFont.hpp>
#include <cppcanvas/text.hxx>
#include <canvasgraphichelper.hxx>
namespace cppcanvas
{
namespace internal
{
class ImplText : public virtual ::cppcanvas::Text, protected CanvasGraphicHelper
{
public:
ImplText( const CanvasSharedPtr& rParentCanvas,
const ::rtl::OUString& rText );
virtual ~ImplText();
virtual bool draw() const;
virtual void setFont( const FontSharedPtr& );
virtual FontSharedPtr getFont();
private:
// default: disabled copy/assignment
ImplText(const ImplText&);
ImplText& operator= ( const ImplText& );
FontSharedPtr mpFont;
::rtl::OUString maText;
};
}
}
#endif /* _CANVAS_IMPLTEXT_HXX */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -42,7 +42,6 @@
#include <implpolypolygon.hxx>
#include <implbitmap.hxx>
#include <implrenderer.hxx>
#include <impltext.hxx>
#include <implsprite.hxx>
using namespace ::com::sun::star;
......
......@@ -719,7 +719,6 @@ connectivity::sdbcx::OGroup::OGroup(rtl::OUString const&, unsigned char)
connectivity::sdbcx::OGroup::OGroup(unsigned char)
connectivity::toString(com::sun::star::uno::Any const&)
cppcanvas::internal::ImplSprite::ImplSprite(com::sun::star::uno::Reference<com::sun::star::rendering::XSpriteCanvas> const&, com::sun::star::uno::Reference<com::sun::star::rendering::XAnimatedSprite> const&, boost::shared_ptr<cppcanvas::internal::ImplSpriteCanvas::TransformationArbiter> const&)
cppcanvas::internal::ImplText::ImplText(boost::shared_ptr<cppcanvas::Canvas> const&, rtl::OUString const&)
dbaui::getKeyColumns(com::sun::star::uno::Reference<com::sun::star::container::XIndexAccess> const&, int)
dbtools::DBTypeConversion::toINT64(com::sun::star::util::DateTime const&)
dbtools::SQLExceptionInfo::SQLExceptionInfo(com::sun::star::sdb::SQLErrorEvent const&)
......
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