diff options
Diffstat (limited to 'svx')
32 files changed, 312 insertions, 216 deletions
diff --git a/svx/inc/galobj.hxx b/svx/inc/galobj.hxx index ce2b481bdcdf..a33a1b5cbd81 100644 --- a/svx/inc/galobj.hxx +++ b/svx/inc/galobj.hxx @@ -85,7 +85,7 @@ enum GalSoundType // - SgaObject - // ------------- -class SgaObject +class SVX_DLLPUBLIC SgaObject { friend class GalleryTheme; @@ -122,8 +122,8 @@ public: BOOL IsValid() const { return bIsValid; } BOOL IsThumbBitmap() const { return bIsThumbBmp; } - SVX_DLLPUBLIC const String GetTitle() const; - SVX_DLLPUBLIC void SetTitle( const String& rTitle ); + const String GetTitle() const; + void SetTitle( const String& rTitle ); friend SvStream& operator<<( SvStream& rOut, const SgaObject& rObj ); friend SvStream& operator>>( SvStream& rIn, SgaObject& rObj ); diff --git a/svx/inc/svx/msdffimp.hxx b/svx/inc/svx/msdffimp.hxx index 248a31dcf71f..603a6831fe30 100644 --- a/svx/inc/svx/msdffimp.hxx +++ b/svx/inc/svx/msdffimp.hxx @@ -481,6 +481,7 @@ public: MSFilterTracer* mpTracer; sal_Bool mbTracing; + Color MSO_TEXT_CLR_ToColor( sal_uInt32 nColorCode ) const; Color MSO_CLR_ToColor( sal_uInt32 nColorCode, sal_uInt16 nContextProperty = DFF_Prop_lineColor ) const; virtual BOOL SeekToShape( SvStream& rSt, void* pClientData, UINT32 nId ) const; FASTBOOL SeekToRec( SvStream& rSt, USHORT nRecId, ULONG nMaxFilePos, DffRecordHeader* pRecHd = NULL, ULONG nSkipCount = 0 ) const; diff --git a/svx/inc/svx/sdr/contact/viewobjectcontactofunocontrol.hxx b/svx/inc/svx/sdr/contact/viewobjectcontactofunocontrol.hxx index 27359ebf9738..87a1de55ec0a 100644 --- a/svx/inc/svx/sdr/contact/viewobjectcontactofunocontrol.hxx +++ b/svx/inc/svx/sdr/contact/viewobjectcontactofunocontrol.hxx @@ -65,6 +65,8 @@ namespace sdr { namespace contact { ::rtl::Reference< ViewObjectContactOfUnoControl_Impl > m_pImpl; public: + ViewObjectContactOfUnoControl( ObjectContact& _rObjectContact, ViewContactOfUnoControl& _rViewContact ); + /// determines whether an XControl already exists, and is currently visible bool isControlVisible() const; @@ -98,7 +100,6 @@ namespace sdr { namespace contact { virtual void ActionChanged(); protected: - ViewObjectContactOfUnoControl( ObjectContact& _rObjectContact, ViewContactOfUnoControl& _rViewContact ); ~ViewObjectContactOfUnoControl(); // support for Primitive2D @@ -111,36 +112,6 @@ namespace sdr { namespace contact { }; //==================================================================== - //= UnoControlDefaultContact - //==================================================================== - class SVX_DLLPRIVATE UnoControlDefaultContact : public ViewObjectContactOfUnoControl - { - public: - UnoControlDefaultContact( ObjectContact& _rObjectContact, ViewContactOfUnoControl& _rViewContact ); - ~UnoControlDefaultContact(); - - private: - UnoControlDefaultContact(); // never implemented - UnoControlDefaultContact( const UnoControlDefaultContact& ); // never implemented - UnoControlDefaultContact& operator=( const UnoControlDefaultContact& ); // never implemented - }; - - //==================================================================== - //= UnoControlWindowContact - //==================================================================== - class SVX_DLLPRIVATE UnoControlWindowContact : public ViewObjectContactOfUnoControl - { - public: - UnoControlWindowContact( ObjectContactOfPageView& _rObjectContact, ViewContactOfUnoControl& _rViewContact ); - ~UnoControlWindowContact(); - - private: - UnoControlWindowContact(); // never implemented - UnoControlWindowContact( const UnoControlWindowContact& ); // never implemented - UnoControlWindowContact& operator=( const UnoControlWindowContact& ); // never implemented - }; - - //==================================================================== //= UnoControlPrintOrPreviewContact //==================================================================== class SVX_DLLPRIVATE UnoControlPrintOrPreviewContact : public ViewObjectContactOfUnoControl @@ -157,21 +128,6 @@ namespace sdr { namespace contact { virtual drawinglayer::primitive2d::Primitive2DSequence createPrimitive2DSequence(const DisplayInfo& rDisplayInfo ) const; }; - //==================================================================== - //= UnoControlPDFExportContact - //==================================================================== - class SVX_DLLPRIVATE UnoControlPDFExportContact : public ViewObjectContactOfUnoControl - { - public: - UnoControlPDFExportContact( ObjectContactOfPageView& _rObjectContact, ViewContactOfUnoControl& _rViewContact ); - ~UnoControlPDFExportContact(); - - private: - UnoControlPDFExportContact(); // never implemented - UnoControlPDFExportContact( const UnoControlPDFExportContact& ); // never implemented - UnoControlPDFExportContact& operator=( const UnoControlPDFExportContact& ); // never implemented - }; - //........................................................................ } } // namespace sdr::contact //........................................................................ diff --git a/svx/inc/svx/sdr/primitive2d/sdrdecompositiontools.hxx b/svx/inc/svx/sdr/primitive2d/sdrdecompositiontools.hxx index 798e5b53d6de..0f46c2809597 100644 --- a/svx/inc/svx/sdr/primitive2d/sdrdecompositiontools.hxx +++ b/svx/inc/svx/sdr/primitive2d/sdrdecompositiontools.hxx @@ -75,7 +75,8 @@ namespace drawinglayer const attribute::SdrTextAttribute& rText, const attribute::SdrLineAttribute* pStroke, bool bCellText, - bool bWordWrap); + bool bWordWrap, + bool bClipOnBounds); Primitive2DSequence createEmbeddedShadowPrimitive( const Primitive2DSequence& rContent, diff --git a/svx/inc/svx/sdr/primitive2d/sdrtextprimitive2d.hxx b/svx/inc/svx/sdr/primitive2d/sdrtextprimitive2d.hxx index 132a3ecc2538..059849531566 100644 --- a/svx/inc/svx/sdr/primitive2d/sdrtextprimitive2d.hxx +++ b/svx/inc/svx/sdr/primitive2d/sdrtextprimitive2d.hxx @@ -219,6 +219,7 @@ namespace drawinglayer unsigned mbUnlimitedPage : 1; // force layout with no text break unsigned mbCellText : 1; // this is a cell text as block text unsigned mbWordWrap : 1; // for CustomShapes text layout + unsigned mbClipOnBounds : 1; // for CustomShapes text layout protected: // local decomposition. @@ -234,7 +235,8 @@ namespace drawinglayer bool bFixedCellHeight, bool bUnlimitedPage, bool bCellText, - bool bWordWrap); + bool bWordWrap, + bool bClipOnBounds); // get data const basegfx::B2DHomMatrix& getTextRangeTransform() const { return maTextRangeTransform; } @@ -244,6 +246,7 @@ namespace drawinglayer bool getUnlimitedPage() const { return mbUnlimitedPage; } bool getCellText() const { return mbCellText; } bool getWordWrap() const { return mbWordWrap; } + bool getClipOnBounds() const { return mbClipOnBounds; } // compare operator virtual bool operator==(const BasePrimitive2D& rPrimitive) const; diff --git a/svx/inc/svx/svxids.hrc b/svx/inc/svx/svxids.hrc index a4b0d8736618..4e3b1ebf4889 100644 --- a/svx/inc/svx/svxids.hrc +++ b/svx/inc/svx/svxids.hrc @@ -1351,7 +1351,6 @@ #define SID_ATTR_PARA_OUTLINE_LEVEL (SID_SVX_START+1092) #define SID_OBJECT_MIRROR (SID_SVX_START+1093) -#define SID_INSERT_POSTIT (SID_SVX_START+1093) #define SID_DELETE_POSTIT (SID_SVX_START+1094) #define SID_NEXT_POSTIT (SID_SVX_START+1095) #define SID_PREVIOUS_POSTIT (SID_SVX_START+1096) @@ -1359,9 +1358,10 @@ #define SID_SHOW_POSTIT (SID_SVX_START+1098) #define SID_REPLYTO_POSTIT (SID_SVX_START+1099) #define SID_DELETEALLBYAUTHOR_POSTIT (SID_SVX_START+1100) +#define SID_INSERT_POSTIT (SID_SVX_START+1101) // IMPORTANT NOTE: adjust SID_SVX_FIRSTFREE, when adding new slot id -#define SID_SVX_FIRSTFREE SID_DELETEALLBYAUTHOR_POSTIT + 1 +#define SID_SVX_FIRSTFREE SID_INSERT_POSTIT + 1 // -------------------------------------------------------------------------- // Overflow check for slot IDs diff --git a/svx/sdi/svx.sdi b/svx/sdi/svx.sdi index 28f50ef89b5c..e3826708c196 100644 --- a/svx/sdi/svx.sdi +++ b/svx/sdi/svx.sdi @@ -5954,7 +5954,7 @@ SfxVoidItem InsertAnnotation SID_INSERT_POSTIT ] //-------------------------------------------------------------------------- -SfxBoolItem ShowAnnotation SID_SHOW_POSTIT +SfxBoolItem ShowAnnotations SID_SHOW_POSTIT () [ /* flags: */ diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx index f53168a273ac..afff309168ac 100644 --- a/svx/source/fmcomp/gridctrl.cxx +++ b/svx/source/fmcomp/gridctrl.cxx @@ -763,12 +763,18 @@ void DbGridControl::NavigationBar::StateChanged( StateChangedType nType ) Fraction aZoom = GetZoom(); // not all of these controls need to know the new zoom, but to be sure ... - Font aFont( IsControlFont() ? GetControlFont() : GetPointFont()); + Font aFont( GetSettings().GetStyleSettings().GetFieldFont() ); + if ( IsControlFont() ) + aFont.Merge( GetControlFont() ); + for (size_t i=0; i < sizeof(pWindows)/sizeof(pWindows[0]); ++i) { pWindows[i]->SetZoom(aZoom); pWindows[i]->SetZoomedPointFont(aFont); } + + SetZoomedPointFont( aFont ); + // rearrange the controls m_nDefaultWidth = ArrangeControls(); } @@ -1075,18 +1081,13 @@ void DbGridControl::ImplInitWindow( const InitWindowFacet _eInitWhat ) { if ( m_bNavigationBar ) { - m_aBar.SetZoom( GetZoom() ); - Font aFont = m_aBar.GetSettings().GetStyleSettings().GetFieldFont(); if ( IsControlFont() ) - { m_aBar.SetControlFont( GetControlFont() ); - aFont.Merge( GetControlFont() ); - } else m_aBar.SetControlFont(); - m_aBar.SetZoomedPointFont( aFont ); + m_aBar.SetZoom( GetZoom() ); } } diff --git a/svx/source/form/fmtextcontrolshell.cxx b/svx/source/form/fmtextcontrolshell.cxx index 10c0978288a6..fc7f1aa78558 100644 --- a/svx/source/form/fmtextcontrolshell.cxx +++ b/svx/source/form/fmtextcontrolshell.cxx @@ -101,6 +101,7 @@ namespace svx //==================================================================== static SfxSlotId pTextControlSlots[] = { + SID_CLIPBOARD_FORMAT_ITEMS, SID_CUT, SID_COPY, SID_PASTE, @@ -140,7 +141,6 @@ namespace svx // SID_TEXTDIRECTION_TOP_TO_BOTTOM, SID_ATTR_CHAR_SCALEWIDTH, /* 911 */ SID_ATTR_CHAR_RELIEF, - SID_CLIPBOARD_FORMAT_ITEMS, /* 922 */ SID_ATTR_PARA_LEFT_TO_RIGHT, /* 950 */ SID_ATTR_PARA_RIGHT_TO_LEFT, 0 diff --git a/svx/source/msfilter/msdffimp.cxx b/svx/source/msfilter/msdffimp.cxx index 0e751e3181e7..c9cfde91547a 100644 --- a/svx/source/msfilter/msdffimp.cxx +++ b/svx/source/msfilter/msdffimp.cxx @@ -3234,6 +3234,8 @@ void DffPropertyReader::ApplyAttributes( SvStream& rIn, SfxItemSet& rSet, const { // MapUnit eMap( rManager.GetModel()->GetScaleUnit() ); + sal_Bool bHasShadow = sal_False; + for ( void* pDummy = ((DffPropertyReader*)this)->First(); pDummy; pDummy = ((DffPropertyReader*)this)->Next() ) { UINT32 nRecType = GetCurKey(); @@ -3305,8 +3307,7 @@ void DffPropertyReader::ApplyAttributes( SvStream& rIn, SfxItemSet& rSet, const break; case DFF_Prop_fshadowObscured : { - sal_Bool bHasShadow = ( nContent & 2 ) != 0; - rSet.Put( SdrShadowItem( bHasShadow ) ); + bHasShadow = ( nContent & 2 ) != 0; if ( bHasShadow ) { if ( !IsProperty( DFF_Prop_shadowOffsetX ) ) @@ -3319,6 +3320,44 @@ void DffPropertyReader::ApplyAttributes( SvStream& rIn, SfxItemSet& rSet, const } } + if ( bHasShadow ) + { + // #160376# sj: activating shadow only if fill and or linestyle is used + // this is required because of the latest drawing layer core changes. + // Issue i104085 is related to this. + UINT32 nLineFlags(GetPropertyValue( DFF_Prop_fNoLineDrawDash )); + if(!IsHardAttribute( DFF_Prop_fLine ) && !IsCustomShapeStrokedByDefault( rObjData.eShapeType )) + nLineFlags &= ~0x08; + UINT32 nFillFlags(GetPropertyValue( DFF_Prop_fNoFillHitTest )); + if(!IsHardAttribute( DFF_Prop_fFilled ) && !IsCustomShapeFilledByDefault( rObjData.eShapeType )) + nFillFlags &= ~0x10; + if ( nFillFlags & 0x10 ) + { + MSO_FillType eMSO_FillType = (MSO_FillType)GetPropertyValue( DFF_Prop_fillType, mso_fillSolid ); + switch( eMSO_FillType ) + { + case mso_fillSolid : + case mso_fillPattern : + case mso_fillTexture : + case mso_fillPicture : + case mso_fillShade : + case mso_fillShadeCenter : + case mso_fillShadeShape : + case mso_fillShadeScale : + case mso_fillShadeTitle : + break; + // case mso_fillBackground : + default: + nFillFlags &=~0x10; // no fillstyle used + break; + } + } + if ( ( ( nLineFlags & 0x08 ) == 0 ) && ( ( nFillFlags & 0x10 ) == 0 ) ) // if there is no fillstyle and linestyle + bHasShadow = sal_False; // we are turning shadow off. + + if ( bHasShadow ) + rSet.Put( SdrShadowItem( bHasShadow ) ); + } ApplyLineAttributes( rSet, rObjData.eShapeType ); // #i28269# ApplyFillAttributes( rIn, rSet, rObjData ); if ( rObjData.eShapeType != mso_sptNil ) @@ -3770,14 +3809,37 @@ FASTBOOL SvxMSDffManager::GetColorFromPalette( USHORT /* nNum */, Color& rColor return TRUE; } +// sj: the documentation is not complete, especially in ppt the normal rgb for text +// color is written as 0xfeRRGGBB, this can't be explained by the documentation, nearly +// every bit in the upper code is set -> so there seems to be a special handling for +// ppt text colors, i decided not to fix this in MSO_CLR_ToColor because of possible +// side effects, instead MSO_TEXT_CLR_ToColor is called for PPT text colors, to map +// the color code to something that behaves like the other standard color codes used by +// fill and line color +Color SvxMSDffManager::MSO_TEXT_CLR_ToColor( sal_uInt32 nColorCode ) const +{ + // Fuer Textfarben: Header ist 0xfeRRGGBB + if ( ( nColorCode & 0xfe000000 ) == 0xfe000000 ) + nColorCode &= 0x00ffffff; + else + { + // for colorscheme colors the color index are the lower three bits of the upper byte + if ( ( nColorCode & 0xf8000000 ) == 0 ) // this must be a colorscheme index + { + nColorCode >>= 24; + nColorCode |= 0x8000000; + } + } + return MSO_CLR_ToColor( nColorCode ); +} Color SvxMSDffManager::MSO_CLR_ToColor( sal_uInt32 nColorCode, sal_uInt16 nContentProperty ) const { Color aColor( mnDefaultColor ); // Fuer Textfarben: Header ist 0xfeRRGGBB - if ( ( nColorCode & 0xfe000000 ) == 0xfe000000 ) - nColorCode &= 0x00ffffff; + if ( ( nColorCode & 0xfe000000 ) == 0xfe000000 ) // sj: it needs to be checked if 0xfe is used in + nColorCode &= 0x00ffffff; // other cases than ppt text -> if not this code can be removed sal_uInt8 nUpper = (sal_uInt8)( nColorCode >> 24 ); diff --git a/svx/source/outliner/outliner.cxx b/svx/source/outliner/outliner.cxx index 3da9e8dbecac..fc144cf4304f 100644 --- a/svx/source/outliner/outliner.cxx +++ b/svx/source/outliner/outliner.cxx @@ -1867,6 +1867,20 @@ IMPL_LINK( Outliner, EndMovingParagraphsHdl, MoveParagraphsInfo*, pInfos ) return 0; } +static bool isSameNumbering( const SvxNumberFormat& rN1, const SvxNumberFormat& rN2 ) +{ + if( rN1.GetNumberingType() != rN2.GetNumberingType() ) + return false; + + if( rN1.GetNumStr(1) != rN2.GetNumStr(1) ) + return false; + + if( (rN1.GetPrefix() != rN2.GetPrefix()) || (rN1.GetSuffix() != rN2.GetSuffix()) ) + return false; + + return true; +} + sal_uInt16 Outliner::ImplGetNumbering( USHORT nPara, const SvxNumberFormat* pParaFmt ) { sal_uInt16 nNumber = pParaFmt->GetStart() - 1; @@ -1879,8 +1893,8 @@ sal_uInt16 Outliner::ImplGetNumbering( USHORT nPara, const SvxNumberFormat* pPar pPara = pParaList->GetParagraph( nPara ); const sal_Int16 nDepth = pPara->GetDepth(); - // ignore paragraphs that are below our paragraph - if( nDepth > nParaDepth ) + // ignore paragraphs that are below our paragraph or have no numbering + if( (nDepth > nParaDepth) || (nDepth == -1) ) continue; // stop on paragraphs that are above our paragraph @@ -1888,8 +1902,13 @@ sal_uInt16 Outliner::ImplGetNumbering( USHORT nPara, const SvxNumberFormat* pPar break; const SvxNumberFormat* pFmt = GetNumberFormat( nPara ); - if( pFmt == 0 || (*pFmt != *pParaFmt) ) - break; // change in number format, stop here + + if( pFmt == 0 ) + continue; // ignore paragraphs without bullets + + // check if numbering is the same + if( !isSameNumbering( *pFmt, *pParaFmt ) ) + break; const SfxBoolItem& rBulletState = (const SfxBoolItem&) pEditEngine->GetParaAttrib( nPara, EE_PARA_BULLETSTATE ); diff --git a/svx/source/outliner/outlvw.cxx b/svx/source/outliner/outlvw.cxx index 098a4055ce0f..a69776df14e8 100644 --- a/svx/source/outliner/outlvw.cxx +++ b/svx/source/outliner/outlvw.cxx @@ -1010,6 +1010,14 @@ void OutlinerView::PasteSpecial() pOwner->bPasting = TRUE; pEditView->PasteSpecial(); + if ( pOwner->ImplGetOutlinerMode() == OUTLINERMODE_OUTLINEOBJECT ) + { + const USHORT nParaCount = pOwner->pEditEngine->GetParagraphCount(); + + for( USHORT nPara = 0; nPara < nParaCount; nPara++ ) + pOwner->ImplSetLevelDependendStyleSheet( nPara ); + } + pEditView->SetEditEngineUpdateMode( TRUE ); pOwner->UndoActionEnd( OLUNDO_INSERT ); pEditView->ShowCursor( TRUE, TRUE ); diff --git a/svx/source/sdr/contact/viewcontactofgraphic.cxx b/svx/source/sdr/contact/viewcontactofgraphic.cxx index 6a92cb27ff8c..7527b177b3a4 100644 --- a/svx/source/sdr/contact/viewcontactofgraphic.cxx +++ b/svx/source/sdr/contact/viewcontactofgraphic.cxx @@ -310,6 +310,7 @@ namespace sdr false, false, false, + false, false); // decompose immediately with neutral ViewInformation. This will diff --git a/svx/source/sdr/contact/viewcontactofunocontrol.cxx b/svx/source/sdr/contact/viewcontactofunocontrol.cxx index 9d6548a1b791..7bea25feeeed 100644 --- a/svx/source/sdr/contact/viewcontactofunocontrol.cxx +++ b/svx/source/sdr/contact/viewcontactofunocontrol.cxx @@ -121,36 +121,18 @@ namespace sdr { namespace contact { //-------------------------------------------------------------------- ViewObjectContact& ViewContactOfUnoControl::CreateObjectSpecificViewObjectContact( ObjectContact& _rObjectContact ) { + // print or print preview requires special handling + const OutputDevice* pDevice = _rObjectContact.TryToGetOutputDevice(); + bool bPrintOrPreview = ( pDevice != NULL ) && ( pDevice->GetOutDevType() == OUTDEV_PRINTER ); + ObjectContactOfPageView* pPageViewContact = dynamic_cast< ObjectContactOfPageView* >( &_rObjectContact ); - if ( pPageViewContact ) - { - // special classes for special devices: - // - PDF export - ::vcl::PDFExtOutDevData* pPDFExport = PTR_CAST( ::vcl::PDFExtOutDevData, pPageViewContact->GetPageWindow().GetPaintWindow().GetOutputDevice().GetExtOutDevData() ); - if ( pPDFExport != NULL ) - return *new UnoControlPDFExportContact( *pPageViewContact, *this ); - - // - print preview - if ( pPageViewContact->GetPageWindow().GetPageView().GetView().IsPrintPreview() ) - return *new UnoControlPrintOrPreviewContact( *pPageViewContact, *this ); - - OutDevType eDeviceType = pPageViewContact->GetPageWindow().GetPaintWindow().GetOutputDevice().GetOutDevType(); - // - printing - if ( eDeviceType == OUTDEV_PRINTER ) - return *new UnoControlPrintOrPreviewContact( *pPageViewContact, *this ); - - // - any other virtual device - if ( eDeviceType == OUTDEV_VIRDEV ) - return *new UnoControlDefaultContact( *pPageViewContact, *this ); - - // - normal windows have special, design-mode dependent handling - if ( eDeviceType == OUTDEV_WINDOW ) - return *new UnoControlWindowContact( *pPageViewContact, *this ); - } + bPrintOrPreview |= ( pPageViewContact != NULL ) && pPageViewContact->GetPageWindow().GetPageView().GetView().IsPrintPreview(); + + if ( bPrintOrPreview ) + return *new UnoControlPrintOrPreviewContact( *pPageViewContact, *this ); - // if we're not working for a ObjectContactOfPageView, then we can't use a ViewObjectContactOfUnoControl, or any - // of its derivees. Fall back to a "normal" SdrObj's contact object. - return *new ViewObjectContactOfSdrObj( _rObjectContact, *this ); + // all others are nowadays served by the same implementation + return *new ViewObjectContactOfUnoControl( _rObjectContact, *this ); } //-------------------------------------------------------------------- @@ -173,7 +155,7 @@ namespace sdr { namespace contact { aTransform.set(0, 2, aRange.getMinX()); aTransform.set(1, 2, aRange.getMinY()); - // create control primitive WITHOUT evtl. existing XControl; this would be done in + // create control primitive WITHOUT possibly existing XControl; this would be done in // the VOC in createPrimitive2DSequence() const drawinglayer::primitive2d::Primitive2DReference xRetval(new drawinglayer::primitive2d::ControlPrimitive2D( aTransform, xControlModel)); diff --git a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx index 667129e27653..bbfe3eaf65ab 100644 --- a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx +++ b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx @@ -402,7 +402,7 @@ namespace sdr { namespace contact { //= InvisibleControlViewAccess //==================================================================== /** is a ->IPageViewAccess implementation which can be used to create an invisble control for - an arbitrary device + an arbitrary window */ class InvisibleControlViewAccess : public IPageViewAccess { @@ -446,6 +446,47 @@ namespace sdr { namespace contact { } //==================================================================== + //= DummyPageViewAccess + //==================================================================== + /** is a ->IPageViewAccess implementation which can be used to create a control for an arbitrary + non-Window device + + The implementation will report the "PageView" as being in design mode, all layers to be visible, + and will not return any ControlContainer, so all control container related features (notifications etc) + are not available. + */ + class DummyPageViewAccess : public IPageViewAccess + { + public: + DummyPageViewAccess() + { + } + + virtual bool isDesignMode() const; + virtual Reference< XControlContainer > + getControlContainer( const OutputDevice& _rDevice ) const; + virtual bool isLayerVisible( SdrLayerID _nLayerID ) const; + }; + + //-------------------------------------------------------------------- + bool DummyPageViewAccess::isDesignMode() const + { + return true; + } + + //-------------------------------------------------------------------- + Reference< XControlContainer > DummyPageViewAccess::getControlContainer( const OutputDevice& /*_rDevice*/ ) const + { + return NULL; + } + + //-------------------------------------------------------------------- + bool DummyPageViewAccess::isLayerVisible( SdrLayerID /*_nLayerID*/ ) const + { + return true; + } + + //==================================================================== //= ViewObjectContactOfUnoControl_Impl //==================================================================== typedef ::cppu::WeakImplHelper4 < XWindowListener @@ -763,8 +804,9 @@ namespace sdr { namespace contact { This method cares for this, by retrieving the very original OutputDevice. */ - static const OutputDevice& imp_getPageViewDevice_nothrow( const ObjectContactOfPageView& _rObjectContact ); - const OutputDevice& imp_getPageViewDevice_nothrow() const; + static const OutputDevice& impl_getPageViewOutputDevice_nothrow( const ObjectContactOfPageView& _rObjectContact ); + + const OutputDevice& impl_getOutputDevice_throw() const; private: ViewObjectContactOfUnoControl_Impl(); // never implemented @@ -829,6 +871,13 @@ namespace sdr { namespace contact { static void getTransformation( const ViewContactOfUnoControl& _rVOC, ::basegfx::B2DHomMatrix& _out_Transformation ); private: + void impl_positionAndZoomControl( const ::drawinglayer::geometry::ViewInformation2D& _rViewInformation ) const + { + if ( !_rViewInformation.getViewport().isEmpty() ) + m_pVOCImpl->positionAndZoomControl( _rViewInformation.getObjectToViewTransformation() ); + } + + private: ::rtl::Reference< ViewObjectContactOfUnoControl_Impl > m_pVOCImpl; /** The geometry is part of the identity of an primitive, so we cannot calculate it on demand (since the data the calculation is based on might have changed then), but need to calc @@ -854,9 +903,15 @@ namespace sdr { namespace contact { DBG_CTOR( ViewObjectContactOfUnoControl_Impl, NULL ); DBG_ASSERT( m_pAntiImpl, "ViewObjectContactOfUnoControl_Impl::ViewObjectContactOfUnoControl_Impl: invalid AntiImpl!" ); - const OutputDevice& rPageViewDevice( imp_getPageViewDevice_nothrow() ); + const OutputDevice& rPageViewDevice( impl_getOutputDevice_throw() ); m_aZoomLevelNormalization = rPageViewDevice.GetInverseViewTransformation(); + #if OSL_DEBUG_LEVEL > 1 + ::basegfx::B2DVector aScale, aTranslate; + double fRotate, fShearX; + m_aZoomLevelNormalization.decompose( aScale, aTranslate, fRotate, fShearX ); + #endif + ::basegfx::B2DHomMatrix aScaleNormalization; MapMode aCurrentDeviceMapMode( rPageViewDevice.GetMapMode() ); aScaleNormalization.set( 0, 0, (double)aCurrentDeviceMapMode.GetScaleX() ); @@ -953,27 +1008,40 @@ namespace sdr { namespace contact { return false; ObjectContactOfPageView* pPageViewContact = dynamic_cast< ObjectContactOfPageView* >( &m_pAntiImpl->GetObjectContact() ); - DBG_ASSERT( pPageViewContact, "ViewObjectContactOfUnoControl_Impl::ensureControl: cannot create a control if I don't have a PageView!" ); - if ( !pPageViewContact ) - return false; + if ( pPageViewContact ) + { + SdrPageViewAccess aPVAccess( pPageViewContact->GetPageWindow().GetPageView() ); + return impl_ensureControl_nothrow( + aPVAccess, + impl_getPageViewOutputDevice_nothrow( *pPageViewContact ) + ); + } - SdrPageViewAccess aPVAccess( pPageViewContact->GetPageWindow().GetPageView() ); + DummyPageViewAccess aNoPageView; return impl_ensureControl_nothrow( - aPVAccess, - imp_getPageViewDevice_nothrow( *pPageViewContact ) + aNoPageView, + impl_getOutputDevice_throw() ); } //-------------------------------------------------------------------- - const OutputDevice& ViewObjectContactOfUnoControl_Impl::imp_getPageViewDevice_nothrow() const + const OutputDevice& ViewObjectContactOfUnoControl_Impl::impl_getOutputDevice_throw() const { ObjectContactOfPageView* pPageViewContact = dynamic_cast< ObjectContactOfPageView* >( &m_pAntiImpl->GetObjectContact() ); - ENSURE_OR_THROW( pPageViewContact, "need a ObjectContactOfPageView." ); - return imp_getPageViewDevice_nothrow( *pPageViewContact ); + if ( pPageViewContact ) + { + // do not use ObjectContact::TryToGetOutputDevice here, it would not care for the PageWindow's + // OriginalPaintWindow + return impl_getPageViewOutputDevice_nothrow( *pPageViewContact ); + } + + const OutputDevice* pDevice = m_pAntiImpl->GetObjectContact().TryToGetOutputDevice(); + ENSURE_OR_THROW( pDevice, "no output device -> no control" ); + return *pDevice; } //-------------------------------------------------------------------- - const OutputDevice& ViewObjectContactOfUnoControl_Impl::imp_getPageViewDevice_nothrow( const ObjectContactOfPageView& _rObjectContact ) + const OutputDevice& ViewObjectContactOfUnoControl_Impl::impl_getPageViewOutputDevice_nothrow( const ObjectContactOfPageView& _rObjectContact ) { // if the PageWindow has a patched PaintWindow, use the original PaintWindow // this ensures that our control is _not_ re-created just because somebody @@ -1522,18 +1590,28 @@ namespace sdr { namespace contact { //-------------------------------------------------------------------- ::drawinglayer::primitive2d::Primitive2DSequence LazyControlCreationPrimitive2D::get2DDecomposition( const ::drawinglayer::geometry::ViewInformation2D& _rViewInformation ) const { + #if OSL_DEBUG_LEVEL > 1 + ::basegfx::B2DVector aScale, aTranslate; + double fRotate, fShearX; + _rViewInformation.getObjectToViewTransformation().decompose( aScale, aTranslate, fRotate, fShearX ); + #endif if ( m_pVOCImpl->hasControl() ) - m_pVOCImpl->positionAndZoomControl( _rViewInformation.getObjectToViewTransformation() ); + impl_positionAndZoomControl( _rViewInformation ); return BasePrimitive2D::get2DDecomposition( _rViewInformation ); } //-------------------------------------------------------------------- ::drawinglayer::primitive2d::Primitive2DSequence LazyControlCreationPrimitive2D::createLocalDecomposition( const ::drawinglayer::geometry::ViewInformation2D& _rViewInformation ) const { + #if OSL_DEBUG_LEVEL > 1 + ::basegfx::B2DVector aScale, aTranslate; + double fRotate, fShearX; + _rViewInformation.getObjectToViewTransformation().decompose( aScale, aTranslate, fRotate, fShearX ); + #endif // force control here to make it a VCL ChildWindow. Will be fetched // and used below by getExistentControl() m_pVOCImpl->ensureControl(); - m_pVOCImpl->positionAndZoomControl( _rViewInformation.getObjectToViewTransformation() ); + impl_positionAndZoomControl( _rViewInformation ); // get needed data const ViewContactOfUnoControl& rViewContactOfUnoControl( m_pVOCImpl->getViewContact() ); @@ -1704,40 +1782,6 @@ namespace sdr { namespace contact { } //==================================================================== - //= UnoControlDefaultContact - //==================================================================== - DBG_NAME( UnoControlDefaultContact ) - //-------------------------------------------------------------------- - UnoControlDefaultContact::UnoControlDefaultContact( ObjectContact& _rObjectContact, ViewContactOfUnoControl& _rViewContact ) - :ViewObjectContactOfUnoControl( _rObjectContact, _rViewContact ) - { - DBG_CTOR( UnoControlDefaultContact, NULL ); - } - - //-------------------------------------------------------------------- - UnoControlDefaultContact::~UnoControlDefaultContact() - { - DBG_DTOR( UnoControlDefaultContact, NULL ); - } - - //==================================================================== - //= UnoControlWindowContact - //==================================================================== - DBG_NAME( UnoControlWindowContact ) - //-------------------------------------------------------------------- - UnoControlWindowContact::UnoControlWindowContact( ObjectContactOfPageView& _rObjectContact, ViewContactOfUnoControl& _rViewContact ) - :ViewObjectContactOfUnoControl( _rObjectContact, _rViewContact ) - { - DBG_CTOR( UnoControlWindowContact, NULL ); - } - - //-------------------------------------------------------------------- - UnoControlWindowContact::~UnoControlWindowContact() - { - DBG_DTOR( UnoControlWindowContact, NULL ); - } - - //==================================================================== //= UnoControlPrintOrPreviewContact //==================================================================== DBG_NAME( UnoControlPrintOrPreviewContact ) @@ -1762,23 +1806,6 @@ namespace sdr { namespace contact { return ViewObjectContactOfUnoControl::createPrimitive2DSequence( rDisplayInfo ); } - //==================================================================== - //= UnoControlPDFExportContact - //==================================================================== - DBG_NAME( UnoControlPDFExportContact ) - //-------------------------------------------------------------------- - UnoControlPDFExportContact::UnoControlPDFExportContact( ObjectContactOfPageView& _rObjectContact, ViewContactOfUnoControl& _rViewContact ) - :ViewObjectContactOfUnoControl( _rObjectContact, _rViewContact ) - { - DBG_CTOR( UnoControlPDFExportContact, NULL ); - } - - //-------------------------------------------------------------------- - UnoControlPDFExportContact::~UnoControlPDFExportContact() - { - DBG_DTOR( UnoControlPDFExportContact, NULL ); - } - //........................................................................ } } // namespace sdr::contact //........................................................................ diff --git a/svx/source/sdr/primitive2d/sdrcaptionprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrcaptionprimitive2d.cxx index 3c8feb7ff2b2..73d5689350c2 100644 --- a/svx/source/sdr/primitive2d/sdrcaptionprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrcaptionprimitive2d.cxx @@ -123,6 +123,7 @@ namespace drawinglayer *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, + false, false)); } diff --git a/svx/source/sdr/primitive2d/sdrconnectorprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrconnectorprimitive2d.cxx index 0edbe1a35046..a04021ae21ad 100644 --- a/svx/source/sdr/primitive2d/sdrconnectorprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrconnectorprimitive2d.cxx @@ -72,7 +72,7 @@ namespace drawinglayer // add text if(getSdrLSTAttribute().getText()) { - appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(::basegfx::B2DPolyPolygon(getUnitPolygon()), aEmptyMatrix, *getSdrLSTAttribute().getText(), getSdrLSTAttribute().getLine(), false, false)); + appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(::basegfx::B2DPolyPolygon(getUnitPolygon()), aEmptyMatrix, *getSdrLSTAttribute().getText(), getSdrLSTAttribute().getLine(), false, false, false)); } // add shadow diff --git a/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx index 497266433d67..e2dce7b551ed 100644 --- a/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx @@ -60,8 +60,9 @@ namespace drawinglayer getTextBox(), *getSdrSTAttribute().getText(), 0, - isForceTextClipToTextRange(), // #SJ# use CellText mode; text upper-left - getWordWrap())); + false, + getWordWrap(), + isForceTextClipToTextRange())); } // add shadow diff --git a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx index 09769a2a013e..cd426edfdd05 100644 --- a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx +++ b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx @@ -173,7 +173,8 @@ namespace drawinglayer const attribute::SdrTextAttribute& rText, const attribute::SdrLineAttribute* pStroke, bool bCellText, - bool bWordWrap) + bool bWordWrap, + bool bClipOnBounds) { basegfx::B2DHomMatrix aAnchorTransform(rObjectTransform); SdrTextPrimitive2D* pNew = 0; @@ -297,7 +298,8 @@ namespace drawinglayer rText.isFixedCellHeight(), rText.isScroll(), bCellText, - bWordWrap); + bWordWrap, + bClipOnBounds); } } diff --git a/svx/source/sdr/primitive2d/sdrellipseprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrellipseprimitive2d.cxx index ed3062184f1a..4f7e2c768669 100644 --- a/svx/source/sdr/primitive2d/sdrellipseprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrellipseprimitive2d.cxx @@ -94,7 +94,7 @@ namespace drawinglayer // add text if(getSdrLFSTAttribute().getText()) { - appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(::basegfx::B2DPolyPolygon(aUnitOutline), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false)); + appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(::basegfx::B2DPolyPolygon(aUnitOutline), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false, false)); } // add shadow @@ -191,7 +191,7 @@ namespace drawinglayer // add text if(getSdrLFSTAttribute().getText()) { - appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(::basegfx::B2DPolyPolygon(aUnitOutline), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false)); + appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(::basegfx::B2DPolyPolygon(aUnitOutline), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false, false)); } // add shadow diff --git a/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx index f5f2f4e876dc..63d050a775af 100644 --- a/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx @@ -104,7 +104,7 @@ namespace drawinglayer // add text if(getSdrLFSTAttribute().getText()) { - appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(basegfx::B2DPolyPolygon(aUnitOutline), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false)); + appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(basegfx::B2DPolyPolygon(aUnitOutline), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false, false)); } // add shadow diff --git a/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx index 94e59f79c3de..f5445cefa5f6 100644 --- a/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx @@ -134,6 +134,7 @@ namespace drawinglayer pTextAttribute->isScroll(), false, false, + false, false); aTextRange = pBlockText->getB2DRange(aViewInformation); } diff --git a/svx/source/sdr/primitive2d/sdrole2primitive2d.cxx b/svx/source/sdr/primitive2d/sdrole2primitive2d.cxx index ab5d23962719..7c44311d3c5a 100644 --- a/svx/source/sdr/primitive2d/sdrole2primitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrole2primitive2d.cxx @@ -110,7 +110,7 @@ namespace drawinglayer // always supported by the old paints, too if(getSdrLFSTAttribute().getText()) { - appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(basegfx::B2DPolyPolygon(aUnitOutline), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false)); + appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(basegfx::B2DPolyPolygon(aUnitOutline), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false, false)); } // add shadow diff --git a/svx/source/sdr/primitive2d/sdrpathprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrpathprimitive2d.cxx index 91ed0bd2adce..96da706fb66a 100644 --- a/svx/source/sdr/primitive2d/sdrpathprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrpathprimitive2d.cxx @@ -89,7 +89,7 @@ namespace drawinglayer // add text if(getSdrLFSTAttribute().getText()) { - appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(getUnitPolyPolygon(), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false)); + appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(getUnitPolyPolygon(), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false, false)); } // add shadow diff --git a/svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx index 64ac716b40e9..edb2837ef670 100644 --- a/svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx @@ -110,7 +110,7 @@ namespace drawinglayer // add text if(getSdrLFSTAttribute().getText()) { - appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(basegfx::B2DPolyPolygon(aUnitOutline), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false)); + appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(basegfx::B2DPolyPolygon(aUnitOutline), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false, false)); } // add shadow diff --git a/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx index 748270c36977..47e85894f37e 100644 --- a/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx @@ -382,7 +382,8 @@ namespace drawinglayer bool bFixedCellHeight, bool bUnlimitedPage, bool bCellText, - bool bWordWrap) + bool bWordWrap, + bool bClipOnBounds) : SdrTextPrimitive2D(pSdrText, rOutlinerParaObject), maTextRangeTransform(rTextRangeTransform), maSdrTextHorzAdjust(aSdrTextHorzAdjust), @@ -390,7 +391,8 @@ namespace drawinglayer mbFixedCellHeight(bFixedCellHeight), mbUnlimitedPage(bUnlimitedPage), mbCellText(bCellText), - mbWordWrap(bWordWrap) + mbWordWrap(bWordWrap), + mbClipOnBounds(bClipOnBounds) { } @@ -406,7 +408,8 @@ namespace drawinglayer && isFixedCellHeight() == rCompare.isFixedCellHeight() && getUnlimitedPage() == rCompare.getUnlimitedPage() && getCellText() == rCompare.getCellText() - && getWordWrap() == rCompare.getWordWrap()); + && getWordWrap() == rCompare.getWordWrap() + && getClipOnBounds() == rCompare.getClipOnBounds()); } return false; @@ -423,7 +426,8 @@ namespace drawinglayer isFixedCellHeight(), getUnlimitedPage(), getCellText(), - getWordWrap()); + getWordWrap(), + getClipOnBounds()); } // provide unique ID diff --git a/svx/source/svdraw/svdfppt.cxx b/svx/source/svdraw/svdfppt.cxx index d0b01f6a820f..af38c34e0749 100644 --- a/svx/source/svdraw/svdfppt.cxx +++ b/svx/source/svdraw/svdfppt.cxx @@ -3972,7 +3972,7 @@ void PPTNumberFormatCreator::ImplGetNumberFormat( SdrPowerPointImport& rManager, aFont.SetFamily( pAtom->eFamily ); aFont.SetPitch( pAtom->ePitch ); } - Color aCol( rManager.MSO_CLR_ToColor( nBulletColor ) ); + Color aCol( rManager.MSO_TEXT_CLR_ToColor( nBulletColor ) ); aFont.SetColor( aCol ); sal_uInt16 nBuChar = (sal_uInt16)nBulletChar; @@ -5886,14 +5886,14 @@ void PPTPortionObj::ApplyTo( SfxItemSet& rSet, SdrPowerPointImport& rManager, U { if ( GetAttrib( PPT_CharAttr_FontColor, nVal, nDestinationInstance ) ) // Textfarbe (4Byte-Arg) { - Color aCol( rManager.MSO_CLR_ToColor( nVal ) ); + Color aCol( rManager.MSO_TEXT_CLR_ToColor( nVal ) ); rSet.Put( SvxColorItem( aCol, EE_CHAR_COLOR ) ); if ( nDestinationInstance == 0xffffffff ) mrStyleSheet.mpCharSheet[ mnInstance ]->maCharLevel[ mnDepth ].mnFontColorInStyleSheet = aCol; } else if ( nVal & 0x0f000000 ) // this is not a hard attribute, but maybe the page has a different colerscheme, { // so that in this case we must use a hard color attribute - Color aCol( rManager.MSO_CLR_ToColor( nVal ) ); + Color aCol( rManager.MSO_TEXT_CLR_ToColor( nVal ) ); Color& aColorInSheet = mrStyleSheet.mpCharSheet[ mnInstance ]->maCharLevel[ mnDepth ].mnFontColorInStyleSheet; if ( aColorInSheet != aCol ) rSet.Put( SvxColorItem( aCol, EE_CHAR_COLOR ) ); @@ -6315,7 +6315,7 @@ void PPTParagraphObj::ApplyTo( SfxItemSet& rSet, boost::optional< sal_Int16 >& nColor = rParaLevel.mnBulletColor; else nColor = rCharLevel.mnFontColor; - aNumberFormat2.SetBulletColor( rManager.MSO_CLR_ToColor( nColor ) ); + aNumberFormat2.SetBulletColor( rManager.MSO_TEXT_CLR_ToColor( nColor ) ); pRule->SetLevel( i, aNumberFormat2 ); } } @@ -7611,8 +7611,8 @@ void ApplyCellLineAttributes( const SdrObject* pLine, Reference< XTable >& xTabl { Color aLineColor( ((XLineColorItem&)pLine->GetMergedItem( XATTR_LINECOLOR )).GetColorValue() ); aBorderLine.Color = aLineColor.GetColor(); - aBorderLine.OuterLineWidth = static_cast< sal_Int16 >( ((const XLineWidthItem&)(pLine->GetMergedItem(XATTR_LINEWIDTH))).GetValue() ); - aBorderLine.InnerLineWidth = 0; + aBorderLine.OuterLineWidth = static_cast< sal_Int16 >( ((const XLineWidthItem&)(pLine->GetMergedItem(XATTR_LINEWIDTH))).GetValue() / 4 ); + aBorderLine.InnerLineWidth = static_cast< sal_Int16 >( ((const XLineWidthItem&)(pLine->GetMergedItem(XATTR_LINEWIDTH))).GetValue() / 4 ); aBorderLine.LineDistance = 0; } break; diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx index 93d3651e3f01..e72b606f3b53 100644 --- a/svx/source/svdraw/svdotextdecomposition.cxx +++ b/svx/source/svdraw/svdotextdecomposition.cxx @@ -800,24 +800,32 @@ void SdrTextObj::impDecomposeBlockTextPrimitive( const bool bVerticalWritintg(rSdrBlockTextPrimitive.getOutlinerParaObject().IsVertical()); const Size aAnchorTextSize(Size(nAnchorTextWidth, nAnchorTextHeight)); + // check if block text is used (only one of them can be true) + const bool bHorizontalIsBlock(SDRTEXTHORZADJUST_BLOCK == eHAdj && !bVerticalWritintg); + const bool bVerticalIsBlock(SDRTEXTVERTADJUST_BLOCK == eVAdj && bVerticalWritintg); + + // set minimal paper size hor/ver if needed + if(bHorizontalIsBlock) + { + rOutliner.SetMinAutoPaperSize(Size(nAnchorTextWidth, 0)); + } + else if(bVerticalIsBlock) + { + rOutliner.SetMinAutoPaperSize(Size(0, nAnchorTextHeight)); + } + if(bIsCell) { // cell text is formated neither like a text object nor like a object // text, so use a special setup here - rOutliner.SetMinAutoPaperSize(aNullSize); rOutliner.SetMaxAutoPaperSize(aAnchorTextSize); rOutliner.SetPaperSize(aAnchorTextSize); - rOutliner.SetMinAutoPaperSize(Size(nAnchorTextWidth, 0)); - rOutliner.SetUpdateMode(TRUE); + rOutliner.SetUpdateMode(true); rOutliner.SetText(rSdrBlockTextPrimitive.getOutlinerParaObject()); - rOutliner.SetUpdateMode(TRUE); rOutliner.SetControlWord(nOriginalControlWord); } else { - // check if block text is used (only one of them can be true) - const bool bHorizontalIsBlock(SDRTEXTHORZADJUST_BLOCK == eHAdj && !bVerticalWritintg); - const bool bVerticalIsBlock(SDRTEXTVERTADJUST_BLOCK == eVAdj && bVerticalWritintg); if((rSdrBlockTextPrimitive.getWordWrap() || IsTextFrame()) && !rSdrBlockTextPrimitive.getUnlimitedPage()) { @@ -843,16 +851,6 @@ void SdrTextObj::impDecomposeBlockTextPrimitive( rOutliner.SetMaxAutoPaperSize(aMaxAutoPaperSize); } - // set minimal paper size hor/ver if needed - if(bHorizontalIsBlock) - { - rOutliner.SetMinAutoPaperSize(Size(nAnchorTextWidth, 0)); - } - else if(bVerticalIsBlock) - { - rOutliner.SetMinAutoPaperSize(Size(0, nAnchorTextHeight)); - } - rOutliner.SetPaperSize(aNullSize); rOutliner.SetUpdateMode(true); rOutliner.SetText(rSdrBlockTextPrimitive.getOutlinerParaObject()); @@ -931,7 +929,8 @@ void SdrTextObj::impDecomposeBlockTextPrimitive( // as the master shape we are working on. For vertical, use the top-right // corner const double fStartInX(bVerticalWritintg ? aAdjustTranslate.getX() + aOutlinerScale.getX() : aAdjustTranslate.getX()); - aNewTransformA.translate(fStartInX, aAdjustTranslate.getY()); + const basegfx::B2DTuple aAdjOffset(fStartInX, aAdjustTranslate.getY()); + aNewTransformA.translate(aAdjOffset.getX(), aAdjOffset.getY()); // mirroring. We are now in aAnchorTextRange sizes. When mirroring in X and Y, // move the null point which was top left to bottom right. @@ -948,10 +947,10 @@ void SdrTextObj::impDecomposeBlockTextPrimitive( // #SJ# create ClipRange (if needed)
basegfx::B2DRange aClipRange;
- if(bIsCell)
+ if(rSdrBlockTextPrimitive.getClipOnBounds())
{
- aClipRange.expand(basegfx::B2DTuple(0.0, 0.0));
- aClipRange.expand(basegfx::B2DTuple(aAnchorTextSize.Width(), aAnchorTextSize.Height()));
+ aClipRange.expand(-aAdjOffset);
+ aClipRange.expand(basegfx::B2DTuple(aAnchorTextSize.Width(), aAnchorTextSize.Height()) - aAdjOffset);
} // now break up text primitives. diff --git a/svx/source/table/viewcontactoftableobj.cxx b/svx/source/table/viewcontactoftableobj.cxx index 45a24211f7b2..e53f41251ff2 100644 --- a/svx/source/table/viewcontactoftableobj.cxx +++ b/svx/source/table/viewcontactoftableobj.cxx @@ -123,7 +123,7 @@ namespace drawinglayer getTransform(), *getSdrFTAttribute().getText(), 0, - true, false)); + true, false, false)); } } diff --git a/svx/source/unodraw/unomod.cxx b/svx/source/unodraw/unomod.cxx index 7f7aedf860e9..c0e301f3792e 100644 --- a/svx/source/unodraw/unomod.cxx +++ b/svx/source/unodraw/unomod.cxx @@ -252,7 +252,10 @@ uno::Reference< uno::XInterface > SAL_CALL SvxUnoDrawMSFactory::createTextField( { nId = ID_EXT_FILEFIELD; } - else if( aFieldType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("DocInfo.Title") ) ) + else if (aFieldType.equalsAsciiL( + RTL_CONSTASCII_STRINGPARAM("docinfo.Title") ) || + aFieldType.equalsAsciiL( + RTL_CONSTASCII_STRINGPARAM("DocInfo.Title") ) ) { nId = ID_FILEFIELD; } diff --git a/svx/source/unoedit/unofield.cxx b/svx/source/unoedit/unofield.cxx index efb4226f9c12..6ff4c2aafe3e 100644 --- a/svx/source/unoedit/unofield.cxx +++ b/svx/source/unoedit/unofield.cxx @@ -1062,7 +1062,7 @@ OUString SAL_CALL SvxUnoTextField::getImplementationName() throw(uno::RuntimeExc return OUString(RTL_CONSTASCII_USTRINGPARAM("SvxUnoTextField")); } -static const sal_Char* pServiceNames[] = +static const sal_Char* pOldServiceNames[] = { "com.sun.star.text.TextField.DateTime", "com.sun.star.text.TextField.URL", @@ -1081,14 +1081,34 @@ static const sal_Char* pServiceNames[] = "com.sun.star.presentation.TextField.DateTime" }; +static const sal_Char* pNewServiceNames[] = +{ + "com.sun.star.text.textfield.DateTime", + "com.sun.star.text.textfield.URL", + "com.sun.star.text.textfield.PageNumber", + "com.sun.star.text.textfield.PageCount", + "com.sun.star.text.textfield.DateTime", + "com.sun.star.text.textfield.docinfo.Title", // SvxFileField is used for title + "com.sun.star.text.textfield.SheetName", + "com.sun.star.text.textfield.DateTime", + "com.sun.star.text.textfield.FileName", + "com.sun.star.text.textfield.Author", + "com.sun.star.text.textfield.Measure", + "com.sun.star.text.textfield.DateTime", + "com.sun.star.presentation.textfield.Header", + "com.sun.star.presentation.textfield.Footer", + "com.sun.star.presentation.textfield.DateTime" +}; + uno::Sequence< OUString > SAL_CALL SvxUnoTextField::getSupportedServiceNames() throw(uno::RuntimeException) { - uno::Sequence< OUString > aSeq( 3 ); + uno::Sequence< OUString > aSeq( 4 ); OUString* pServices = aSeq.getArray(); - pServices[0] = OUString::createFromAscii( pServiceNames[mnServiceId] ); - pServices[1] = OUString::createFromAscii( "com.sun.star.text.TextContent" ), - pServices[2] = OUString::createFromAscii( "com.sun.star.text.TextField" ); + pServices[0] = OUString::createFromAscii( pNewServiceNames[mnServiceId] ); + pServices[1] = OUString::createFromAscii( pOldServiceNames[mnServiceId] ); + pServices[2] = OUString::createFromAscii( "com.sun.star.text.TextContent" ), + pServices[3] = OUString::createFromAscii( "com.sun.star.text.TextField" ); return aSeq; } diff --git a/svx/source/xml/xmltxtexp.cxx b/svx/source/xml/xmltxtexp.cxx index 4f034b098db7..5db6cc809bce 100644 --- a/svx/source/xml/xmltxtexp.cxx +++ b/svx/source/xml/xmltxtexp.cxx @@ -247,7 +247,11 @@ uno::Reference< uno::XInterface > SAL_CALL SvxSimpleUnoModel::createInstance( co return uno::Reference< uno::XInterface >( SvxCreateNumRule( (SdrModel*)NULL ), uno::UNO_QUERY ); } - if( 0 == aServiceSpecifier.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.TextField.DateTime") ) ) + if ( (0 == aServiceSpecifier.reverseCompareToAsciiL( + RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.textfield.DateTime"))) + || (0 == aServiceSpecifier.reverseCompareToAsciiL( + RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.TextField.DateTime"))) + ) { return (::cppu::OWeakObject * )new SvxUnoTextField( ID_EXT_DATEFIELD ); } |