1. mst
  2. ooo340

Commits

vg  committed 4323753

CWS-TOOLING: integrate CWS impress173_DEV300
2009-06-16 15:50:22 +0200 sj r273022 : #i101545# fixed crash - bracketing of graphic links has been done twice leading to a broken graphic state stack
2009-06-05 10:37:58 +0200 cl r272669 : #i102298# prevent export of multiple writing-mode attributes for cell styles
2009-06-05 10:29:42 +0200 cl r272667 : #i98403# fixed editing of motion path

  • Participants
  • Parent commits 481e759
  • Branches default

Comments (0)

Files changed (8)

File goodies/source/graphic/grfmgr.cxx

View file
 #include <vcl/metaact.hxx>
 #include <vcl/virdev.hxx>
 #include <vcl/salbtype.hxx>
-#include <vcl/pdfextoutdevdata.hxx>
 #include <svtools/cacheoptions.hxx>
 #include "grfmgr.hxx"
 
     const sal_uInt32    nOldDrawMode = pOut->GetDrawMode();
 	BOOL		        bCropped = aAttr.IsCropped();
 	BOOL		        bCached = FALSE;
-    BOOL				bWritingPdfLinkedGraphic = FALSE;
 	BOOL		        bRet;
 
     // #i29534# Provide output rects for PDF writer
     Rectangle			aCropRect;
 
-    // #i29534# Notify PDF writer about linked graphic (if any)
-    vcl::ExtOutDevData* pExtOutDevData = pOut->GetExtOutDevData();
-    if( pExtOutDevData && pExtOutDevData->ISA(vcl::PDFExtOutDevData) )
-    {
-        // #i29534# Only delegate image handling to PDF, if no special
-        // treatment is necessary
-        if( GetGraphic().IsLink() &&
-            aSz.Width() > 0L &&
-            aSz.Height() > 0L &&
-            !aAttr.IsSpecialDrawMode() &&
-            !aAttr.IsMirrored() &&
-            !aAttr.IsRotated() &&
-            !aAttr.IsAdjusted() )
-        {
-            bWritingPdfLinkedGraphic = TRUE;
-            static_cast< vcl::PDFExtOutDevData* >( pExtOutDevData )->BeginGroup();
-        }
-    }
-
     if( !( GRFMGR_DRAW_USE_DRAWMODE_SETTINGS & nFlags ) )
         pOut->SetDrawMode( nOldDrawMode & ( ~( DRAWMODE_SETTINGSLINE | DRAWMODE_SETTINGSFILL | DRAWMODE_SETTINGSTEXT | DRAWMODE_SETTINGSGRADIENT ) ) );
 
 
     pOut->SetDrawMode( nOldDrawMode );
 
-    // #i29534# Notify PDF writer about linked graphic (if any)
-    if( bWritingPdfLinkedGraphic )
-    {
-        static_cast< vcl::PDFExtOutDevData* >( pExtOutDevData )->EndGroup(
-            const_cast< Graphic& >(GetGraphic()),
-            aAttr.GetTransparency(),
-            Rectangle( aPt, aSz ),
-            aCropRect );
-    }
-
     // #i29534# Moved below OutDev restoration, to avoid multiple swap-ins
     // (code above needs to call GetGraphic twice)
 	if( bCached )

File xmloff/inc/xmloff/table/XMLTableExport.hxx

View file
 class XMLOFF_DLLPUBLIC XMLTableExport : public UniRefBase
 {
 public:
-	XMLTableExport(SvXMLExport& rExp, const rtl::Reference< XMLPropertySetMapper >& xCellPropertySetMapper, const rtl::Reference< XMLPropertyHandlerFactory >& xFactoryRef );
+	XMLTableExport(SvXMLExport& rExp, const rtl::Reference< SvXMLExportPropertyMapper >& xCellExportPropertySetMapper, const rtl::Reference< XMLPropertyHandlerFactory >& xFactoryRef );
 	virtual ~XMLTableExport();
 
 	// This method collects all automatic styles for the given table

File xmloff/inc/xmloff/txtprmap.hxx

View file
 #define CTF_FONTFAMILY				(XML_TEXT_CTF_START + 36)
 #define CTF_FONTPITCH				(XML_TEXT_CTF_START + 37)
 #define CTF_FONTCHARSET				(XML_TEXT_CTF_START + 38)
-//	(XML_TEXT_CTF_START + 39)
+#define CTF_TEXTWRITINGMODE         (XML_TEXT_CTF_START + 39)
 #define CTF_SYNCHEIGHT_MIN			(XML_TEXT_CTF_START + 40)
 #define CTF_FRAMEHEIGHT_ABS			(XML_TEXT_CTF_START + 41)
 #define CTF_FRAMEHEIGHT_REL			(XML_TEXT_CTF_START + 42)

File xmloff/source/draw/sdpropls.cxx

View file
 	GMAP( "ControlDataStyle",				XML_NAMESPACE_STYLE,XML_DATA_STYLE_NAME,		XML_TYPE_STRING|MID_FLAG_NO_PROPERTY_EXPORT|MID_FLAG_SPECIAL_ITEM, CTF_SD_CONTROL_SHAPE_DATA_STYLE ),
 	GMAP( "ControlTextEmphasis",			XML_NAMESPACE_STYLE,XML_TEXT_EMPHASIZE, 		XML_TYPE_CONTROL_TEXT_EMPHASIZE, 0 ),
 	GMAP( "ImageScaleMode",			        XML_NAMESPACE_STYLE,XML_REPEAT,                 XML_SD_TYPE_IMAGE_SCALE_MODE|MID_FLAG_MULTI_PROPERTY, 0 ),
-	GMAP( "ControlWritingMode",             XML_NAMESPACE_STYLE,XML_WRITING_MODE, 		    XML_TYPE_TEXT_WRITING_MODE_WITH_DEFAULT|MID_FLAG_MULTI_PROPERTY, 0 ),
+	GMAP( "ControlWritingMode",             XML_NAMESPACE_STYLE,XML_WRITING_MODE, 		    XML_TYPE_TEXT_WRITING_MODE_WITH_DEFAULT|MID_FLAG_MULTI_PROPERTY, CTF_CONTROLWRITINGMODE ),
 
 	// special entries for floating frames
 	GMAP( "FrameIsAutoScroll",			XML_NAMESPACE_DRAW,	XML_FRAME_DISPLAY_SCROLLBAR,	XML_TYPE_BOOL|MID_FLAG_MULTI_PROPERTY,				CTF_FRAME_DISPLAY_SCROLLBAR ),
 	XMLPropertyState* pClip11State = NULL;
 	XMLPropertyState* pClipState = NULL;
 
+    XMLPropertyState* pShapeWritingMode = NULL;
+    XMLPropertyState* pTextWritingMode = NULL;
+    XMLPropertyState* pControlWritingMode = NULL;
+
 	// filter properties
 	for( std::vector< XMLPropertyState >::iterator aIter = rProperties.begin();
 		 aIter != rProperties.end();
 				break;
 			case CTF_WRITINGMODE:
 				{
+				    pShapeWritingMode = property;				
 					text::WritingMode eWritingMode;
 					if( property->maValue >>= eWritingMode )
 					{
 						if( text::WritingMode_LR_TB == eWritingMode )
+						{
 							property->mnIndex = -1;
+                            pShapeWritingMode = 0;
+                        }
 					}
 				}
 				break;
+			case CTF_CONTROLWRITINGMODE:
+			    pControlWritingMode = property;
+			    break;
+			case CTF_TEXTWRITINGMODE:
+			    pTextWritingMode = property;
+			    break;
 			case CTF_REPEAT_OFFSET_X:
 				pRepeatOffsetX = property;
 				break;
 		}
 	}
 
+    // check for duplicate writing mode
+    if( pShapeWritingMode && (pTextWritingMode || pControlWritingMode) )
+    {
+        if( pTextWritingMode )
+            pTextWritingMode->mnIndex = -1;
+        if( pControlWritingMode )
+            pControlWritingMode->mnIndex = -1;                       
+    }
+    else if( pTextWritingMode && pControlWritingMode )
+    {
+        pControlWritingMode->mnIndex = -1;
+    }
+
 	// do not export visual area for internal ole objects
 	if( pOLEIsInternal )
 	{

File xmloff/source/draw/sdpropls.hxx

View file
 //////////////////////////////////////////////////////////////////////////////
 
 #define CTF_NUMBERINGRULES			1000
-//#define CTF_NUMBERINGRULES_NAME		1001
+#define CTF_CONTROLWRITINGMODE      1001
 #define CTF_WRITINGMODE				1002
 #define CTF_REPEAT_OFFSET_X			1003
 #define CTF_REPEAT_OFFSET_Y			1004

File xmloff/source/draw/shapeexport.cxx

View file
 	if( !mxShapeTableExport.is() )
 	{
 		rtl::Reference< XMLPropertyHandlerFactory > xFactory( new XMLSdPropHdlFactory( mrExport.GetModel(), mrExport ) );
-		rtl::Reference< XMLPropertySetMapper > xPropertySetMapper( new XMLShapePropertySetMapper( xFactory.get() ) );
+        UniReference < XMLPropertySetMapper > xMapper( new XMLShapePropertySetMapper( xFactory.get() ) );
+		rtl::Reference< SvXMLExportPropertyMapper > xPropertySetMapper( new XMLShapeExportPropertyMapper( xMapper, (XMLTextListAutoStylePool*)&mrExport.GetTextParagraphExport()->GetListAutoStylePool(), mrExport ) );
 		mxShapeTableExport = new XMLTableExport( mrExport, xPropertySetMapper, xFactory );
 	}
 

File xmloff/source/table/XMLTableExport.cxx

View file
 // class XMLTableExport
 // --------------------------------------------------------------------
 
-XMLTableExport::XMLTableExport(SvXMLExport& rExp, const rtl::Reference< XMLPropertySetMapper >& xCellPropertySetMapper, const rtl::Reference< XMLPropertyHandlerFactory >& xFactoryRef )
+XMLTableExport::XMLTableExport(SvXMLExport& rExp, const rtl::Reference< SvXMLExportPropertyMapper  >& xExportPropertyMapper, const rtl::Reference< XMLPropertyHandlerFactory >& xFactoryRef )
 : mrExport( rExp )
 , mbExportTables( false )
 {
         (void)e;
     }
 
-	mxCellExportPropertySetMapper = new SvXMLExportPropertyMapper( xCellPropertySetMapper.get() );
+	mxCellExportPropertySetMapper = xExportPropertyMapper;
 	mxCellExportPropertySetMapper->ChainExportMapper(XMLTextParagraphExport::CreateParaExtPropMapper(rExp));
 
 	mxRowExportPropertySetMapper = new SvXMLExportPropertyMapper( new XMLPropertySetMapper( getRowPropertiesMap(), xFactoryRef.get() ) );

File xmloff/source/text/txtprmap.cxx

View file
     // RES_PARATR_SNAPTOGRID
     MP_E( "SnapToGrid", STYLE, SNAP_TO_LAYOUT_GRID, XML_TYPE_BOOL, 0 ),
 
-    MP_ED( "WritingMode",      STYLE, WRITING_MODE,       XML_TYPE_TEXT_WRITING_MODE_WITH_DEFAULT, 0 ),
+    MP_ED( "WritingMode",      STYLE, WRITING_MODE,       XML_TYPE_TEXT_WRITING_MODE_WITH_DEFAULT, CTF_TEXTWRITINGMODE ),
 
     MP_E( "ParaIsConnectBorder", STYLE, JOIN_BORDER,  XML_TYPE_BOOL, 0 ),