Files
loongoffice/xmloff/source/style/PageMasterPropHdlFactory.cxx
Armin Le Grand 7d9bb549d4 Related: #i124638# Second step of DrawingLayer FillAttributes...
for Writer objects, now added support for Paragraph and PageStyle (including
Header and Footer) for direct attributes and style attributes

(cherry picked from commit cc25c58f7052827bfebdc9fbeec668c8fa29ed1b)

Conflicts:
	cui/source/factory/dlgfact.cxx
	cui/source/factory/dlgfact.hxx
	cui/source/inc/bbdlg.hxx
	cui/source/inc/cuires.hrc
	cui/source/tabpages/bbdlg.cxx
	cui/source/tabpages/bbdlg.src
	cui/source/tabpages/page.cxx
	cui/source/tabpages/tparea.cxx
	include/svx/pagectrl.hxx
	include/svx/svxdlg.hxx
	include/svx/svxids.hrc
	include/xmloff/PageMasterStyleMap.hxx
	include/xmloff/prstylei.hxx
	include/xmloff/txtprmap.hxx
	svx/Package_inc.mk
	svx/inc/svx/hdft.hxx
	svx/source/dialog/hdft.cxx
	svx/source/dialog/pagectrl.cxx
	svx/source/tbxctrls/tbxcolorupdate.cxx
	svx/source/unodraw/unobrushitemhelper.cxx
	sw/Library_sw.mk
	sw/inc/fillattributes.hxx
	sw/inc/format.hxx
	sw/inc/frmatr.hxx
	sw/inc/frmfmt.hxx
	sw/inc/hintids.hxx
	sw/inc/hints.hxx
	sw/inc/ndtxt.hxx
	sw/inc/node.hxx
	sw/inc/swunohelper.hxx
	sw/inc/unobrushitemhelper.hxx
	sw/inc/unoprnms.hxx
	sw/source/core/attr/format.cxx
	sw/source/core/attr/hints.cxx
	sw/source/core/doc/docdesc.cxx
	sw/source/core/doc/docdraw.cxx
	sw/source/core/doc/docfmt.cxx
	sw/source/core/doc/docnew.cxx
	sw/source/core/doc/docredln.cxx
	sw/source/core/doc/poolfmt.cxx
	sw/source/core/doc/visiturl.cxx
	sw/source/core/docnode/node.cxx
	sw/source/core/inc/frame.hxx
	sw/source/core/inc/frmtool.hxx
	sw/source/core/inc/rolbck.hxx
	sw/source/core/layout/atrfrm.cxx
	sw/source/core/layout/fillattributes.cxx
	sw/source/core/layout/findfrm.cxx
	sw/source/core/layout/paintfrm.cxx
	sw/source/core/txtnode/ndtxt.cxx
	sw/source/core/txtnode/thints.cxx
	sw/source/core/txtnode/txtedt.cxx
	sw/source/core/undo/rolbck.cxx
	sw/source/core/unocore/swunohelper.cxx
	sw/source/core/unocore/unoframe.cxx
	sw/source/core/unocore/unomap.cxx
	sw/source/core/unocore/unoparagraph.cxx
	sw/source/core/unocore/unoprnms.cxx
	sw/source/core/unocore/unostyle.cxx
	sw/source/ui/chrdlg/paradlg.src
	sw/source/ui/chrdlg/pardlg.cxx
	sw/source/ui/fmtui/tmpdlg.cxx
	sw/source/ui/fmtui/tmpdlg.src
	sw/source/uibase/app/docst.cxx
	sw/source/uibase/app/docstyle.cxx
	sw/source/uibase/frmdlg/colex.cxx
	sw/source/uibase/shells/basesh.cxx
	sw/source/uibase/shells/textsh1.cxx
	sw/source/uibase/uiview/viewstat.cxx
	sw/source/uibase/utlui/uitool.cxx
	xmloff/inc/PageMasterImportContext.hxx
	xmloff/inc/xmloff/XMLShapeStyleContext.hxx
	xmloff/source/draw/XMLShapeStyleContext.cxx
	xmloff/source/draw/sdpropls.hxx
	xmloff/source/style/PageMasterExportPropMapper.cxx
	xmloff/source/style/PageMasterImportContext.cxx
	xmloff/source/style/PageMasterPropHdlFactory.cxx
	xmloff/source/style/PageMasterStyleMap.cxx
	xmloff/source/style/prstylei.cxx
	xmloff/source/text/txtexppr.cxx
	xmloff/source/text/txtprhdl.cxx
	xmloff/source/text/txtprmap.cxx
	xmloff/source/text/txtstyli.cxx

Conflicts:
	svx/source/dialog/hdft.cxx
	sw/source/core/doc/visiturl.cxx
	sw/source/core/txtnode/thints.cxx
	sw/source/core/txtnode/txtatr2.cxx
	sw/source/core/unocore/unostyle.cxx

Change-Id: I7e8779db6c0cbd1e242b63eab888f468f2de509a
2014-07-01 13:30:09 +02:00

174 lines
6.4 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 .
*/
#include "PageMasterPropHdlFactory.hxx"
#include <xmloff/xmltypes.hxx>
#include <xmloff/xmltoken.hxx>
#include "xmlbahdl.hxx"
#include <xmloff/NamedBoolPropertyHdl.hxx>
#include "XMLTextColumnsPropertyHandler.hxx"
#include <xmloff/XMLConstantsPropertyHandler.hxx>
#include "PageMasterPropHdl.hxx"
#include <xmloff/PageMasterStyleMap.hxx>
#include <com/sun/star/text/TextGridMode.hpp>
//UUUU
#include <xmloff/EnumPropertyHdl.hxx>
#include <com/sun/star/drawing/FillStyle.hpp>
#include "XMLFillBitmapSizePropertyHandler.hxx"
#include "XMLBitmapLogicalSizePropertyHandler.hxx"
#include <com/sun/star/drawing/RectanglePoint.hpp>
#include <com/sun/star/drawing/BitmapMode.hpp>
#include "XMLBitmapRepeatOffsetPropertyHandler.hxx"
using namespace ::xmloff::token;
using namespace ::com::sun::star;
//UUUU
using namespace ::com::sun::star::drawing;
//UUUU
extern SvXMLEnumMapEntry aXML_FillStyle_EnumMap[];
extern SvXMLEnumMapEntry aXML_RefPoint_EnumMap[];
extern SvXMLEnumMapEntry aXML_BitmapMode_EnumMap[];
static SvXMLEnumMapEntry const aXML_TextGridMode_ConstantMap[] =
{
{ XML_NONE, text::TextGridMode::NONE },
{ XML_LINE, text::TextGridMode::LINES },
{ XML_BOTH, text::TextGridMode::LINES_AND_CHARS },
{ XML_TOKEN_INVALID, 0 }
};
XMLPageMasterPropHdlFactory::XMLPageMasterPropHdlFactory() :
XMLPropertyHandlerFactory()
{
}
XMLPageMasterPropHdlFactory::~XMLPageMasterPropHdlFactory()
{
}
const XMLPropertyHandler* XMLPageMasterPropHdlFactory::GetPropertyHandler( sal_Int32 nType ) const
{
nType &= MID_FLAG_MASK;
XMLPropertyHandler* pHdl = (XMLPropertyHandler*) XMLPropertyHandlerFactory::GetPropertyHandler( nType );
if( !pHdl )
{
switch( nType )
{
case XML_PM_TYPE_PAGESTYLELAYOUT:
pHdl = new XMLPMPropHdl_PageStyleLayout();
break;
case XML_PM_TYPE_NUMFORMAT:
pHdl = new XMLPMPropHdl_NumFormat();
break;
case XML_PM_TYPE_NUMLETTERSYNC:
pHdl = new XMLPMPropHdl_NumLetterSync();
break;
case XML_PM_TYPE_PAPERTRAYNUMBER:
pHdl = new XMLPMPropHdl_PaperTrayNumber();
break;
case XML_PM_TYPE_PRINTORIENTATION:
pHdl = new XMLNamedBoolPropertyHdl(
GetXMLToken( XML_LANDSCAPE ),
GetXMLToken( XML_PORTRAIT ) );
break;
case XML_PM_TYPE_PRINTANNOTATIONS:
pHdl = new XMLPMPropHdl_Print( XML_ANNOTATIONS );
break;
case XML_PM_TYPE_PRINTCHARTS:
pHdl = new XMLPMPropHdl_Print( XML_CHARTS );
break;
case XML_PM_TYPE_PRINTDRAWING:
pHdl = new XMLPMPropHdl_Print( XML_DRAWINGS );
break;
case XML_PM_TYPE_PRINTFORMULAS:
pHdl = new XMLPMPropHdl_Print( XML_FORMULAS );
break;
case XML_PM_TYPE_PRINTGRID:
pHdl = new XMLPMPropHdl_Print( XML_GRID );
break;
case XML_PM_TYPE_PRINTHEADERS:
pHdl = new XMLPMPropHdl_Print( XML_HEADERS );
break;
case XML_PM_TYPE_PRINTOBJECTS:
pHdl = new XMLPMPropHdl_Print( XML_OBJECTS );
break;
case XML_PM_TYPE_PRINTZEROVALUES:
pHdl = new XMLPMPropHdl_Print( XML_ZERO_VALUES );
break;
case XML_PM_TYPE_PRINTPAGEORDER:
pHdl = new XMLNamedBoolPropertyHdl( GetXMLToken( XML_TTB ),
GetXMLToken( XML_LTR ) );
break;
case XML_PM_TYPE_FIRSTPAGENUMBER:
pHdl = new XMLNumberNonePropHdl( XML_CONTINUE, 2 );
break;
case XML_PM_TYPE_CENTER_HORIZONTAL:
pHdl = new XMLPMPropHdl_CenterHorizontal();
break;
case XML_PM_TYPE_CENTER_VERTICAL:
pHdl = new XMLPMPropHdl_CenterVertical();
break;
case XML_TYPE_TEXT_COLUMNS:
pHdl = new XMLTextColumnsPropertyHandler;
break;
case XML_TYPE_LAYOUT_GRID_MODE:
pHdl = new XMLConstantsPropertyHandler(
aXML_TextGridMode_ConstantMap, XML_NONE );
break;
//UUUU
case XML_SW_TYPE_FILLSTYLE:
pHdl = new XMLEnumPropertyHdl( aXML_FillStyle_EnumMap, ::getCppuType((const FillStyle*)0) );
break;
case XML_SW_TYPE_FILLBITMAPSIZE:
pHdl = new XMLFillBitmapSizePropertyHandler();
break;
case XML_SW_TYPE_LOGICAL_SIZE:
pHdl = new XMLBitmapLogicalSizePropertyHandler();
break;
case XML_SW_TYPE_BITMAP_REFPOINT:
pHdl = new XMLEnumPropertyHdl( aXML_RefPoint_EnumMap, getCppuType((const RectanglePoint*)0) );
break;
case XML_SW_TYPE_BITMAP_MODE:
pHdl = new XMLEnumPropertyHdl( aXML_BitmapMode_EnumMap, getCppuType((const BitmapMode*)0) );
break;
case XML_SW_TYPE_BITMAPREPOFFSETX:
case XML_SW_TYPE_BITMAPREPOFFSETY:
pHdl = new XMLBitmapRepeatOffsetPropertyHandler(XML_SW_TYPE_BITMAPREPOFFSETX == nType);
break;
//UUUU
default:
{
OSL_ENSURE(false, "XMLPropertyHandler missing (!)");
break;
}
}
if( pHdl )
PutHdlCache( nType, pHdl );
}
return pHdl;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */