draw-aspect for ole objects
This commit is contained in:
parent
9e4dad942e
commit
939c6ceda0
7 changed files with 268 additions and 13 deletions
|
@ -2,9 +2,9 @@
|
|||
*
|
||||
* $RCSfile: xmlkywd.hxx,v $
|
||||
*
|
||||
* $Revision: 1.153 $
|
||||
* $Revision: 1.154 $
|
||||
*
|
||||
* last change: $Author: bm $ $Date: 2001-05-10 09:20:19 $
|
||||
* last change: $Author: mib $ $Date: 2001-05-10 10:05:16 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
|
@ -891,6 +891,7 @@ XML_CONSTASCII_ACTION( sXML_hyphenation_ladder_count, "hyphenation-ladder-count"
|
|||
XML_CONSTASCII_ACTION( sXML_hyphenation_push_char_count, "hyphenation-push-char-count" );
|
||||
XML_CONSTASCII_ACTION( sXML_hyphenation_remain_char_count, "hyphenation-remain-char-count" );
|
||||
XML_CONSTASCII_ACTION( sXML_i, "i" );
|
||||
XML_CONSTASCII_ACTION( sXML_icon, "icon" );
|
||||
XML_CONSTASCII_ACTION( sXML_id, "id" );
|
||||
XML_CONSTASCII_ACTION( sXML_ident, "ident");
|
||||
XML_CONSTASCII_ACTION( sXML_identifier, "identifier" );
|
||||
|
@ -1691,6 +1692,7 @@ XML_CONSTASCII_ACTION( sXML_textual, "textual" );
|
|||
XML_CONSTASCII_ACTION( sXML_thick, "thick" );
|
||||
XML_CONSTASCII_ACTION( sXML_thin, "thin" );
|
||||
XML_CONSTASCII_ACTION( sXML_three_dimensional, "three-dimensional" );
|
||||
XML_CONSTASCII_ACTION( sXML_thumbnail, "thumbnail" );
|
||||
XML_CONSTASCII_ACTION( sXML_tick_marks_major_inner, "tick-marks-major-inner" );
|
||||
XML_CONSTASCII_ACTION( sXML_tick_marks_major_outer, "tick-marks-major-outer" );
|
||||
XML_CONSTASCII_ACTION( sXML_tick_marks_minor_inner, "tick-marks-minor-inner" );
|
||||
|
|
162
xmloff/source/style/DrawAspectHdl.cxx
Normal file
162
xmloff/source/style/DrawAspectHdl.cxx
Normal file
|
@ -0,0 +1,162 @@
|
|||
/*************************************************************************
|
||||
*
|
||||
* $RCSfile: DrawAspectHdl.cxx,v $
|
||||
*
|
||||
* $Revision: 1.1 $
|
||||
*
|
||||
* last change: $Author: mib $ $Date: 2001-05-10 10:07:52 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
*
|
||||
* - GNU Lesser General Public License Version 2.1
|
||||
* - Sun Industry Standards Source License Version 1.1
|
||||
*
|
||||
* Sun Microsystems Inc., October, 2000
|
||||
*
|
||||
* GNU Lesser General Public License Version 2.1
|
||||
* =============================================
|
||||
* Copyright 2000 by Sun Microsystems, Inc.
|
||||
* 901 San Antonio Road, Palo Alto, CA 94303, USA
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License version 2.1, as published by the Free Software Foundation.
|
||||
*
|
||||
* This library 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 for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
* MA 02111-1307 USA
|
||||
*
|
||||
*
|
||||
* Sun Industry Standards Source License Version 1.1
|
||||
* =================================================
|
||||
* The contents of this file are subject to the Sun Industry Standards
|
||||
* Source License Version 1.1 (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.openoffice.org/license.html.
|
||||
*
|
||||
* Software provided under this License is provided on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
|
||||
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
|
||||
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
|
||||
* See the License for the specific provisions governing your rights and
|
||||
* obligations concerning the Software.
|
||||
*
|
||||
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
|
||||
*
|
||||
* Copyright: 2000 by Sun Microsystems, Inc.
|
||||
*
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Contributor(s): _______________________________________
|
||||
*
|
||||
*
|
||||
************************************************************************/
|
||||
|
||||
#ifndef _COM_SUN_STAR_UNO_ANY_HXX_
|
||||
#include <com/sun/star/uno/Any.hxx>
|
||||
#endif
|
||||
|
||||
#ifndef _RTL_USTRBUF_HXX_
|
||||
#include <rtl/ustrbuf.hxx>
|
||||
#endif
|
||||
|
||||
#ifndef _XMLOFF_XMLUCONV_HXX
|
||||
#include "xmluconv.hxx"
|
||||
#endif
|
||||
|
||||
#ifndef _XMLOFF_XMLKYWD_HXX
|
||||
#include <xmlkywd.hxx>
|
||||
#endif
|
||||
|
||||
#ifndef _XMLOFF_DRAWASPECTHDL_HXX
|
||||
#include "DrawAspectHdl.hxx"
|
||||
#endif
|
||||
|
||||
using namespace ::rtl;
|
||||
using namespace ::com::sun::star;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// class XMLMeasurePropHdl
|
||||
//
|
||||
|
||||
SvXMLEnumMapEntry __READONLY_DATA pXML_DrawAspect_Enum[] =
|
||||
{
|
||||
{ sXML_content, 1 },
|
||||
{ sXML_thumbnail, 2 },
|
||||
{ sXML_icon, 4 },
|
||||
{ sXML_print, 8 },
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
DrawAspectHdl::~DrawAspectHdl()
|
||||
{
|
||||
// nothing to do
|
||||
}
|
||||
|
||||
sal_Bool DrawAspectHdl::importXML( const OUString& rStrImpValue, uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
|
||||
{
|
||||
sal_Int32 nAspect = 0;
|
||||
|
||||
SvXMLTokenEnumerator aTokenEnum( rStrImpValue );
|
||||
OUString aToken;
|
||||
while( aTokenEnum.getNextToken( aToken ) )
|
||||
{
|
||||
sal_uInt16 nVal;
|
||||
if( rUnitConverter.convertEnum( nVal, rStrImpValue, pXML_DrawAspect_Enum ) )
|
||||
{
|
||||
nAspect = nAspect | (sal_Int32)nVal;
|
||||
}
|
||||
}
|
||||
|
||||
rValue <<= nAspect;
|
||||
|
||||
return nAspect != 0;
|
||||
}
|
||||
|
||||
sal_Bool DrawAspectHdl::exportXML( OUString& rStrExpValue, const uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
|
||||
{
|
||||
sal_Bool bRet = sal_False;
|
||||
OUStringBuffer aOut;
|
||||
|
||||
sal_Int32 nAspect;
|
||||
if( rValue >>= nAspect )
|
||||
{
|
||||
if( (nAspect & 1) != 0 )
|
||||
aOut.appendAscii( sXML_content );
|
||||
|
||||
if( (nAspect & 2) != 0 )
|
||||
{
|
||||
if( aOut.getLength() )
|
||||
aOut.append( sal_Unicode(' ') );
|
||||
aOut.appendAscii( sXML_thumbnail );
|
||||
}
|
||||
|
||||
if( (nAspect & 4) != 0 )
|
||||
{
|
||||
if( aOut.getLength() )
|
||||
aOut.append( sal_Unicode(' ') );
|
||||
aOut.appendAscii( sXML_icon );
|
||||
}
|
||||
|
||||
if( (nAspect & 8) != 0 )
|
||||
{
|
||||
if( aOut.getLength() )
|
||||
aOut.append( sal_Unicode(' ') );
|
||||
aOut.appendAscii( sXML_print );
|
||||
}
|
||||
|
||||
rStrExpValue = aOut.makeStringAndClear();
|
||||
|
||||
bRet = sal_True;
|
||||
}
|
||||
|
||||
return bRet;
|
||||
}
|
81
xmloff/source/style/DrawAspectHdl.hxx
Normal file
81
xmloff/source/style/DrawAspectHdl.hxx
Normal file
|
@ -0,0 +1,81 @@
|
|||
/*************************************************************************
|
||||
*
|
||||
* $RCSfile: DrawAspectHdl.hxx,v $
|
||||
*
|
||||
* $Revision: 1.1 $
|
||||
*
|
||||
* last change: $Author: mib $ $Date: 2001-05-10 10:07:58 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
*
|
||||
* - GNU Lesser General Public License Version 2.1
|
||||
* - Sun Industry Standards Source License Version 1.1
|
||||
*
|
||||
* Sun Microsystems Inc., October, 2000
|
||||
*
|
||||
* GNU Lesser General Public License Version 2.1
|
||||
* =============================================
|
||||
* Copyright 2000 by Sun Microsystems, Inc.
|
||||
* 901 San Antonio Road, Palo Alto, CA 94303, USA
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License version 2.1, as published by the Free Software Foundation.
|
||||
*
|
||||
* This library 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 for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
* MA 02111-1307 USA
|
||||
*
|
||||
*
|
||||
* Sun Industry Standards Source License Version 1.1
|
||||
* =================================================
|
||||
* The contents of this file are subject to the Sun Industry Standards
|
||||
* Source License Version 1.1 (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.openoffice.org/license.html.
|
||||
*
|
||||
* Software provided under this License is provided on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
|
||||
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
|
||||
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
|
||||
* See the License for the specific provisions governing your rights and
|
||||
* obligations concerning the Software.
|
||||
*
|
||||
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
|
||||
*
|
||||
* Copyright: 2000 by Sun Microsystems, Inc.
|
||||
*
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Contributor(s): _______________________________________
|
||||
*
|
||||
*
|
||||
************************************************************************/
|
||||
|
||||
#ifndef _XMLOFF_DRAWASPECTHDL_HXX
|
||||
#define _XMLOFF_DRAWASPECTHDL_HXX
|
||||
|
||||
#ifndef _XMLOFF_PROPERTYHANDLERBASE_HXX
|
||||
#include <xmlprhdl.hxx>
|
||||
#endif
|
||||
|
||||
/**
|
||||
PropertyHandler for the XML-data-type:
|
||||
*/
|
||||
class DrawAspectHdl : public XMLPropertyHandler
|
||||
{
|
||||
public:
|
||||
virtual ~DrawAspectHdl();
|
||||
|
||||
virtual sal_Bool importXML( const ::rtl::OUString& rStrImpValue, ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
|
||||
virtual sal_Bool exportXML( ::rtl::OUString& rStrExpValue, const ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
|
||||
};
|
||||
|
||||
#endif // _XMLOFF_DRAWASPECTHDL_HXX
|
|
@ -2,9 +2,9 @@
|
|||
#
|
||||
# $RCSfile: makefile.mk,v $
|
||||
#
|
||||
# $Revision: 1.17 $
|
||||
# $Revision: 1.18 $
|
||||
#
|
||||
# last change: $Author: cl $ $Date: 2001-04-30 09:01:06 $
|
||||
# last change: $Author: mib $ $Date: 2001-05-10 10:07:18 $
|
||||
#
|
||||
# The Contents of this file are made available subject to the terms of
|
||||
# either of the following licenses
|
||||
|
@ -161,7 +161,8 @@ CXXFILES = \
|
|||
XMLBitmapLogicalSizePropertyHandler.cxx \
|
||||
durationhdl.cxx \
|
||||
VisAreaExport.cxx \
|
||||
VisAreaContext.cxx
|
||||
VisAreaContext.cxx \
|
||||
DrawAspectHdl.cxx
|
||||
|
||||
|
||||
SLOFILES = \
|
||||
|
@ -248,7 +249,8 @@ SLOFILES = \
|
|||
$(SLO)$/XMLBitmapLogicalSizePropertyHandler.obj \
|
||||
$(SLO)$/durationhdl.obj \
|
||||
$(SLO)$/VisAreaExport.obj \
|
||||
$(SLO)$/VisAreaContext.obj
|
||||
$(SLO)$/VisAreaContext.obj \
|
||||
$(SLO)$/DrawAspectHdl.obj
|
||||
|
||||
# --- Tagets -------------------------------------------------------
|
||||
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
*
|
||||
* $RCSfile: prhdlfac.cxx,v $
|
||||
*
|
||||
* $Revision: 1.13 $
|
||||
* $Revision: 1.14 $
|
||||
*
|
||||
* last change: $Author: cl $ $Date: 2001-04-30 09:01:06 $
|
||||
* last change: $Author: mib $ $Date: 2001-05-10 10:07:18 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
|
@ -155,6 +155,9 @@
|
|||
#ifndef _XMLOFF_XMLRECTANGLEMEMBERSHANDLER_HXX
|
||||
#include "XMLRectangleMembersHandler.hxx"
|
||||
#endif
|
||||
#ifndef _XMLOFF_DRAWASPECTHDL_HXX
|
||||
#include "DrawAspectHdl.hxx"
|
||||
#endif
|
||||
|
||||
using namespace ::com::sun::star;
|
||||
|
||||
|
@ -425,6 +428,9 @@ const XMLPropertyHandler* XMLPropertyHandlerFactory::GetBasicHandler( sal_Int32
|
|||
aXML_HorizontalAdjust_Enum,
|
||||
::getCppuType((const text::HorizontalAdjust*)0) );
|
||||
break;
|
||||
case XML_TYPE_TEXT_DRAW_ASPECT:
|
||||
pPropHdl = new DrawAspectHdl;
|
||||
break;
|
||||
}
|
||||
|
||||
if( pPropHdl )
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
*
|
||||
* $RCSfile: txtprhdl.cxx,v $
|
||||
*
|
||||
* $Revision: 1.15 $
|
||||
* $Revision: 1.16 $
|
||||
*
|
||||
* last change: $Author: dvo $ $Date: 2001-04-27 10:55:29 $
|
||||
* last change: $Author: mib $ $Date: 2001-05-10 10:09:49 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
|
@ -1412,8 +1412,10 @@ const XMLPropertyHandler *XMLTextPropertyHandlerFactory_Impl::GetPropertyHandler
|
|||
pHdl = new XMLNamedBoolPropertyHdl(
|
||||
OUString( RTL_CONSTASCII_USTRINGPARAM( sXML_fixed ) ),
|
||||
OUString( RTL_CONSTASCII_USTRINGPARAM( sXML_line_height ) ) );
|
||||
break;
|
||||
case XML_TYPE_TEXT_VERTICAL_ALIGN:
|
||||
pHdl = new XMLConstantsPropertyHandler( pXML_VerticalAlign_Enum, 0 );
|
||||
break;
|
||||
}
|
||||
|
||||
return pHdl;
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
*
|
||||
* $RCSfile: txtprmap.cxx,v $
|
||||
*
|
||||
* $Revision: 1.47 $
|
||||
* $Revision: 1.48 $
|
||||
*
|
||||
* last change: $Author: mib $ $Date: 2001-05-04 09:50:32 $
|
||||
* last change: $Author: mib $ $Date: 2001-05-10 10:09:49 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
|
@ -647,7 +647,7 @@ XMLPropertyMapEntry aXMLFramePropMap[] =
|
|||
M_E( "", DRAW, visible_area_top, XML_TYPE_MEASURE|MID_FLAG_NO_PROPERTY, CTF_OLE_VIS_AREA_TOP ),
|
||||
M_E( "", DRAW, visible_area_width, XML_TYPE_MEASURE|MID_FLAG_NO_PROPERTY, CTF_OLE_VIS_AREA_WIDTH ),
|
||||
M_E( "", DRAW, visible_area_height, XML_TYPE_MEASURE|MID_FLAG_NO_PROPERTY, CTF_OLE_VIS_AREA_HEIGHT ),
|
||||
M_E( "", DRAW, draw_aspect, XML_TYPE_NUMBER16|MID_FLAG_NO_PROPERTY, CTF_OLE_DRAW_ASPECT ),
|
||||
M_E( "", DRAW, draw_aspect, XML_TYPE_TEXT_DRAW_ASPECT|MID_FLAG_NO_PROPERTY, CTF_OLE_DRAW_ASPECT ),
|
||||
M_E( "UserDefinedAttributes", TEXT, xmlns, XML_TYPE_ATTRIBUTE_CONTAINER | MID_FLAG_SPECIAL_ITEM, 0 ),
|
||||
|
||||
{ 0, 0, 0, 0 }
|
||||
|
|
Loading…
Reference in a new issue