[Libreoffice-commits] .: vcl/inc vcl/source
vcl/inc/graphite_layout.hxx |4 +- vcl/source/glyphs/graphite_layout.cxx | 46 ++ 2 files changed, 27 insertions(+), 23 deletions(-) New commits: commit 9b6b1558a3654625ce9a5bef2bee5245db81ff88 Author: Martin Hosken Date: Wed Apr 4 14:44:33 2012 +0700 Fix cursor movement in graphite fonts diff --git a/vcl/inc/graphite_layout.hxx b/vcl/inc/graphite_layout.hxx index c6c711d..838c32d 100644 --- a/vcl/inc/graphite_layout.hxx +++ b/vcl/inc/graphite_layout.hxx @@ -163,9 +163,9 @@ private: void expandOrCondense(ImplLayoutArgs &rArgs); voidfillFrom(gr_segment * rSeg, ImplLayoutArgs & rArgs, float fScaling); -void append(gr_segment * pSeg, +float append(gr_segment * pSeg, ImplLayoutArgs & rArgs, -const gr_slot * pSlot, +const gr_slot * pSlot, float gOrigin, float nextGlyphOrigin, float fScaling, long & rDXOffset, bool bIsBase, int baseChar); }; diff --git a/vcl/source/glyphs/graphite_layout.cxx b/vcl/source/glyphs/graphite_layout.cxx index 93c1bc5..4edeb9a 100644 --- a/vcl/source/glyphs/graphite_layout.cxx +++ b/vcl/source/glyphs/graphite_layout.cxx @@ -40,6 +40,8 @@ #undef NDEBUG #endif +// #define GRLAYOUT_DEBUG 1 + // Header files // // Standard Library @@ -274,7 +276,7 @@ GraphiteLayout::fillFrom(gr_segment * pSegment, ImplLayoutArgs &rArgs, float fSc } mvChar2BaseGlyph[mnSegCharOffset + nFirstCharInCluster - mnMinCharPos] = nBaseGlyphIndex; } -append(pSegment, rArgs, baseSlot, rightBoundary, fScaling, +append(pSegment, rArgs, baseSlot, gr_slot_origin_X(baseSlot), rightBoundary, fScaling, nDxOffset, bCluster, mnSegCharOffset + firstChar); } if (mnSegCharOffset + nLastCharInCluster < mnMinCharPos) @@ -353,7 +355,7 @@ GraphiteLayout::fillFrom(gr_segment * pSegment, ImplLayoutArgs &rArgs, float fSc // only set mvChar2BaseGlyph for first character of cluster mvChar2BaseGlyph[mnSegCharOffset + bFirstChar - mnMinCharPos] = nBaseGlyphIndex; } -append(pSegment, rArgs, baseSlot, rightBoundary, fScaling, +append(pSegment, rArgs, baseSlot, gr_slot_origin_X(baseSlot), rightBoundary, fScaling, nDxOffset, true, mnSegCharOffset + firstChar); } if (mnSegCharOffset + bFirstChar >= mnEndCharPos) @@ -409,13 +411,13 @@ GraphiteLayout::fillFrom(gr_segment * pSegment, ImplLayoutArgs &rArgs, float fSc // append walks an attachment tree, flattening it, and converting it into a // sequence of GlyphItem objects which we can later manipulate. -void +float GraphiteLayout::append(gr_segment *pSeg, ImplLayoutArgs &rArgs, -const gr_slot * gi, float nextGlyphOrigin, float scaling, long & rDXOffset, +const gr_slot * gi, float gOrigin, float nextGlyphOrigin, float scaling, long & rDXOffset, bool bIsBase, int baseChar) { bool bRtl = (rArgs.mnFlags & SAL_LAYOUT_BIDI_RTL); -float nextOrigin = nextGlyphOrigin; +float nextOrigin; assert(gi); assert(gr_slot_before(gi) <= gr_slot_after(gi)); int firstChar = gr_slot_before(gi) + mnSegCharOffset; @@ -424,16 +426,22 @@ GraphiteLayout::append(gr_segment *pSeg, ImplLayoutArgs &rArgs, // is the next glyph attached or in the next cluster? //glyph_set_range_t iAttached = gi.attachedClusterGlyphs(); const gr_slot * pFirstAttached = gr_slot_first_attachment(gi); +const gr_slot * pNextSibling = gr_slot_next_sibling_attachment(gi); if (pFirstAttached) -{ nextOrigin = gr_slot_origin_X(pFirstAttached); -} +else if (!bIsBase && pNextSibling) +nextOrigin = gr_slot_origin_X(pNextSibling); +else +nextOrigin = nextGlyphOrigin; long glyphId = gr_slot_gid(gi); long deltaOffset = 0; int scaledGlyphPos = round(gr_slot_origin_X(gi) * scaling); -int glyphWidth = round(nextOrigin * scaling) - scaledGlyphPos; -if (glyphWidth < 0) -glyphWidth = 0; +int glyphWidth = round((nextOrigin - gOrigin) * scaling); +//if (glyphWidth < 0) +//{ +//nextOrigin = gOrigin; +//glyphWidth = 0; +//} #ifdef GRLAYOUT_DEBUG fprintf(grLog(),"c%d g%ld,X%d W%d nX%f ", firstChar, glyphId, (int)(gr_slot_origin_X(gi) * scaling), glyphWidth, nextOrigin * scaling); @@ -481,16 +489,11 @@ GraphiteLayout::append(gr_segment *pSeg, ImplLayoutArgs &rArgs, rDXOffset += deltaOffset; // Recursively append all the attached glyphs. -for (const gr_slot * agi = gr_slot_first_attachment(gi); agi != NULL; - agi = gr_slot_next_sibling_attachment(agi)) -{ -if (gr_slot_next_sibling_attachment(agi) == NULL) -append(pSeg, rArgs, agi, nextGlyphOrigin, scaling, rDXOffset, -
[Libreoffice-commits] .: vcl/inc vcl/source
vcl/inc/vcl/combobox.hxx|1 + vcl/source/control/combobox.cxx | 27 +-- 2 files changed, 26 insertions(+), 2 deletions(-) New commits: commit ab0efc3eb1c0b351bcaccd847cd66f986f95781e Author: Caolán McNamara Date: Sat Feb 4 12:57:37 2012 +0100 Better optimal combobox width if dropdown button is wider than scrollbar than use that as the extra width over the edit widget diff --git a/vcl/inc/vcl/combobox.hxx b/vcl/inc/vcl/combobox.hxx index d44a595..85d4e20 100644 --- a/vcl/inc/vcl/combobox.hxx +++ b/vcl/inc/vcl/combobox.hxx @@ -78,6 +78,7 @@ protected: SAL_DLLPRIVATE WinBits ImplInitStyle( WinBits nStyle ); SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId ); SAL_DLLPRIVATE void ImplCalcEditHeight(); +SAL_DLLPRIVATE long getMaxWidthScrollBarAndDownButton() const; protected: ComboBox( WindowType nType ); diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx index 97abfc1..a93dc67 100644 --- a/vcl/source/control/combobox.cxx +++ b/vcl/source/control/combobox.cxx @@ -1078,6 +1078,29 @@ Size ComboBox::GetOptimalSize(WindowSizeType eType) const // --- +long ComboBox::getMaxWidthScrollBarAndDownButton() const +{ +long nButtonDownWidth = 0; + +Window *pBorder = GetWindow( WINDOW_BORDER ); +ImplControlValue aControlValue; +Point aPoint; +Rectangle aContent, aBound; + +// use the full extent of the control +Rectangle aArea( aPoint, pBorder->GetOutputSizePixel() ); + +if ( GetNativeControlRegion(CTRL_COMBOBOX, PART_BUTTON_DOWN, +aArea, 0, aControlValue, rtl::OUString(), aBound, aContent) ) +{ +nButtonDownWidth = aContent.getWidth(); +} + +long nScrollBarWidth = GetSettings().GetStyleSettings().GetScrollBarSize(); + +return std::max(nScrollBarWidth, nButtonDownWidth); +} + Size ComboBox::CalcMinimumSize() const { Size aSz; @@ -1090,7 +1113,7 @@ Size ComboBox::CalcMinimumSize() const { aSz.Height() = mpImplLB->CalcSize( 1 ).Height(); aSz.Width() = mpImplLB->GetMaxEntryWidth(); -aSz.Width() += GetSettings().GetStyleSettings().GetScrollBarSize(); +aSz.Width() += getMaxWidthScrollBarAndDownButton(); } aSz = CalcWindowSize( aSz ); @@ -1150,7 +1173,7 @@ Size ComboBox::CalcSize( sal_uInt16 nColumns, sal_uInt16 nLines ) const aSz.Width() = aMinSz.Width(); if ( IsDropDownBox() ) -aSz.Width() += GetSettings().GetStyleSettings().GetScrollBarSize(); +aSz.Width() += getMaxWidthScrollBarAndDownButton(); if ( !IsDropDownBox() ) { ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/inc vcl/source
vcl/inc/vcl/outdev.hxx |2 +- vcl/source/gdi/outdevnative.cxx |4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) New commits: commit 55da16210363cb2dc1f43731ebe6ebc601a50d86 Author: Caolán McNamara Date: Fri Feb 3 20:10:24 2012 +0100 these methods can be const diff --git a/vcl/inc/vcl/outdev.hxx b/vcl/inc/vcl/outdev.hxx index 63458cb..f4b2c6f 100644 --- a/vcl/inc/vcl/outdev.hxx +++ b/vcl/inc/vcl/outdev.hxx @@ -1196,7 +1196,7 @@ public: const ImplControlValue& aValue, ::rtl::OUString aCaption, Rectangle &rNativeBoundingRegion, -Rectangle &rNativeContentRegion ); +Rectangle &rNativeContentRegion ) const; }; diff --git a/vcl/source/gdi/outdevnative.cxx b/vcl/source/gdi/outdevnative.cxx index f37417e..e791c99 100644 --- a/vcl/source/gdi/outdevnative.cxx +++ b/vcl/source/gdi/outdevnative.cxx @@ -194,7 +194,7 @@ sal_Bool OutputDevice::HitTestNativeControl( ControlType nType, // --- -static boost::shared_ptr< ImplControlValue > lcl_transformControlValue( const ImplControlValue& rVal, OutputDevice& rDev ) +static boost::shared_ptr< ImplControlValue > lcl_transformControlValue( const ImplControlValue& rVal, const OutputDevice& rDev ) { boost::shared_ptr< ImplControlValue > aResult; switch( rVal.getType() ) @@ -321,7 +321,7 @@ sal_Bool OutputDevice::GetNativeControlRegion( ControlType nType, const ImplControlValue& aValue, ::rtl::OUString aCaption, Rectangle &rNativeBoundingRegion, -Rectangle &rNativeContentRegion ) +Rectangle &rNativeContentRegion ) const { if( !lcl_enableNativeWidget( *this ) ) return sal_False; ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/inc vcl/source
vcl/inc/vcl/outdev.hxx|2 +- vcl/source/gdi/outdev.cxx |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) New commits: commit 4d451439a5ae4b4f07a38c3712b974aa550625b7 Author: Muthu Subramanian Date: Wed Jan 25 13:32:49 2012 +0530 Marking ImplDrawModeToColor as const. Missed it while reviewing commit: f9c09fbbb32f3808e2ef2eaa7148e10a130ccd20 diff --git a/vcl/inc/vcl/outdev.hxx b/vcl/inc/vcl/outdev.hxx index f14943b..63458cb 100644 --- a/vcl/inc/vcl/outdev.hxx +++ b/vcl/inc/vcl/outdev.hxx @@ -547,7 +547,7 @@ public: // tells whether this output device is RTL in an LTR UI or LTR in a RTL UI SAL_DLLPRIVATE bool ImplIsAntiparallel() const ; -SAL_DLLPRIVATE Color ImplDrawModeToColor( const Color& rColor ); +SAL_DLLPRIVATE Color ImplDrawModeToColor( const Color& rColor ) const; // #i101491# // Helper which holds the old line geometry creation and is extended to use AA when diff --git a/vcl/source/gdi/outdev.cxx b/vcl/source/gdi/outdev.cxx index 76b09d0..0d73827 100644 --- a/vcl/source/gdi/outdev.cxx +++ b/vcl/source/gdi/outdev.cxx @@ -1238,7 +1238,7 @@ void OutputDevice::SetLineColor() // --- -Color OutputDevice::ImplDrawModeToColor( const Color& rColor ) +Color OutputDevice::ImplDrawModeToColor( const Color& rColor ) const { Color aColor( rColor ); sal_uLong nDrawMode = GetDrawMode(); ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/inc vcl/source
vcl/inc/vcl/outdev.hxx |1 + vcl/source/gdi/outdev.cxx | 32 vcl/source/gdi/outdev2.cxx | 35 +-- 3 files changed, 22 insertions(+), 46 deletions(-) New commits: commit f9c09fbbb32f3808e2ef2eaa7148e10a130ccd20 Author: Christina Rossmanith Date: Wed Jan 25 13:23:49 2012 +0530 Reduced duplicate code detected by simian. diff --git a/vcl/inc/vcl/outdev.hxx b/vcl/inc/vcl/outdev.hxx index 9ce143d..f14943b 100644 --- a/vcl/inc/vcl/outdev.hxx +++ b/vcl/inc/vcl/outdev.hxx @@ -547,6 +547,7 @@ public: // tells whether this output device is RTL in an LTR UI or LTR in a RTL UI SAL_DLLPRIVATE bool ImplIsAntiparallel() const ; +SAL_DLLPRIVATE Color ImplDrawModeToColor( const Color& rColor ); // #i101491# // Helper which holds the old line geometry creation and is extended to use AA when diff --git a/vcl/source/gdi/outdev.cxx b/vcl/source/gdi/outdev.cxx index fe49527..76b09d0 100644 --- a/vcl/source/gdi/outdev.cxx +++ b/vcl/source/gdi/outdev.cxx @@ -1238,38 +1238,36 @@ void OutputDevice::SetLineColor() // --- -void OutputDevice::SetLineColor( const Color& rColor ) +Color OutputDevice::ImplDrawModeToColor( const Color& rColor ) { -OSL_TRACE( "OutputDevice::SetLineColor( %lx )", rColor.GetColor() ); -DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice ); - Color aColor( rColor ); +sal_uLong nDrawMode = GetDrawMode(); -if( mnDrawMode & ( DRAWMODE_BLACKLINE | DRAWMODE_WHITELINE | - DRAWMODE_GRAYLINE | DRAWMODE_GHOSTEDLINE | - DRAWMODE_SETTINGSLINE ) ) +if( nDrawMode & ( DRAWMODE_BLACKLINE | DRAWMODE_WHITELINE | + DRAWMODE_GRAYLINE | DRAWMODE_GHOSTEDLINE | + DRAWMODE_SETTINGSLINE ) ) { if( !ImplIsColorTransparent( aColor ) ) { -if( mnDrawMode & DRAWMODE_BLACKLINE ) +if( nDrawMode & DRAWMODE_BLACKLINE ) { aColor = Color( COL_BLACK ); } -else if( mnDrawMode & DRAWMODE_WHITELINE ) +else if( nDrawMode & DRAWMODE_WHITELINE ) { aColor = Color( COL_WHITE ); } -else if( mnDrawMode & DRAWMODE_GRAYLINE ) +else if( nDrawMode & DRAWMODE_GRAYLINE ) { const sal_uInt8 cLum = aColor.GetLuminance(); aColor = Color( cLum, cLum, cLum ); } -else if( mnDrawMode & DRAWMODE_SETTINGSLINE ) +else if( nDrawMode & DRAWMODE_SETTINGSLINE ) { aColor = GetSettings().GetStyleSettings().GetFontColor(); } -if( mnDrawMode & DRAWMODE_GHOSTEDLINE ) +if( nDrawMode & DRAWMODE_GHOSTEDLINE ) { aColor = Color( ( aColor.GetRed() >> 1 ) | 0x80, ( aColor.GetGreen() >> 1 ) | 0x80, @@ -1277,6 +1275,16 @@ void OutputDevice::SetLineColor( const Color& rColor ) } } } +return aColor; +} + + +void OutputDevice::SetLineColor( const Color& rColor ) +{ +OSL_TRACE( "OutputDevice::SetLineColor( %lx )", rColor.GetColor() ); +DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice ); + +Color aColor = ImplDrawModeToColor( rColor ); if( mpMetaFile ) mpMetaFile->AddAction( new MetaLineColorAction( aColor, sal_True ) ); diff --git a/vcl/source/gdi/outdev2.cxx b/vcl/source/gdi/outdev2.cxx index 2003de8..9b0b4f3 100644 --- a/vcl/source/gdi/outdev2.cxx +++ b/vcl/source/gdi/outdev2.cxx @@ -1441,40 +1441,7 @@ void OutputDevice::DrawPixel( const Point& rPt, const Color& rColor ) OSL_TRACE( "OutputDevice::DrawPixel()" ); DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice ); -Color aColor( rColor ); - -if( mnDrawMode & ( DRAWMODE_BLACKLINE | DRAWMODE_WHITELINE | - DRAWMODE_GRAYLINE | DRAWMODE_GHOSTEDLINE | - DRAWMODE_SETTINGSLINE ) ) -{ -if( !ImplIsColorTransparent( aColor ) ) -{ -if( mnDrawMode & DRAWMODE_BLACKLINE ) -{ -aColor = Color( COL_BLACK ); -} -else if( mnDrawMode & DRAWMODE_WHITELINE ) -{ -aColor = Color( COL_WHITE ); -} -else if( mnDrawMode & DRAWMODE_GRAYLINE ) -{ -const sal_uInt8 cLum = aColor.GetLuminance(); -aColor = Color( cLum, cLum, cLum ); -} -else if( mnDrawMode & DRAWMODE_SETTINGSLINE ) -{ -aColor = GetSettings().GetStyleSettings().GetFontColor(); -} - -if( mnDrawMode & DRAWMODE_GHOSTEDLINE ) -{ -aColor = Color( ( aColor.GetRed() >> 1 ) | 0x80, -( aColor.G
[Libreoffice-commits] .: vcl/inc vcl/source
vcl/inc/vcl/status.hxx |2 -- vcl/source/window/status.cxx | 22 -- 2 files changed, 24 deletions(-) New commits: commit 5008540c40484467e857c3245ae29c17c29673a2 Author: August Sodora Date: Sun Dec 11 21:06:38 2011 -0500 Remove unused code diff --git a/vcl/inc/vcl/status.hxx b/vcl/inc/vcl/status.hxx index 4fa982c..56cf7c7 100644 --- a/vcl/inc/vcl/status.hxx +++ b/vcl/inc/vcl/status.hxx @@ -143,9 +143,7 @@ public: sal_uInt16 nPos = STATUSBAR_APPEND ); voidRemoveItem( sal_uInt16 nItemId ); -voidHideItem( sal_uInt16 nItemId ); sal_BoolIsItemVisible( sal_uInt16 nItemId ) const; - sal_BoolAreItemsVisible() const { return mbVisibleItems; } voidClear(); diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx index 32dcc4a..b701697 100644 --- a/vcl/source/window/status.cxx +++ b/vcl/source/window/status.cxx @@ -1036,28 +1036,6 @@ void StatusBar::RemoveItem( sal_uInt16 nItemId ) // --- -void StatusBar::HideItem( sal_uInt16 nItemId ) -{ -sal_uInt16 nPos = GetItemPos( nItemId ); - -if ( nPos != STATUSBAR_ITEM_NOTFOUND ) -{ -ImplStatusItem* pItem = (*mpItemList)[ nPos ]; -if ( pItem->mbVisible ) -{ -pItem->mbVisible = sal_False; - -mbFormat = sal_True; -if ( ImplIsItemUpdate() ) -Invalidate(); - -ImplCallEventListeners( VCLEVENT_STATUSBAR_HIDEITEM, (void*) sal_IntPtr(nItemId) ); -} -} -} - -// --- - sal_Bool StatusBar::IsItemVisible( sal_uInt16 nItemId ) const { sal_uInt16 nPos = GetItemPos( nItemId ); ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/inc vcl/source
vcl/inc/vcl/status.hxx | 12 --- vcl/source/window/status.cxx | 155 --- 2 files changed, 167 deletions(-) New commits: commit c95fa19f7c7b58a2beb65ad52335322ec2ae6f18 Author: August Sodora Date: Sun Dec 11 21:01:03 2011 -0500 Remove unused code diff --git a/vcl/inc/vcl/status.hxx b/vcl/inc/vcl/status.hxx index d039ddf..4fa982c 100644 --- a/vcl/inc/vcl/status.hxx +++ b/vcl/inc/vcl/status.hxx @@ -123,7 +123,6 @@ private: public: StatusBar( Window* pParent, WinBits nWinStyle = WB_BORDER | WB_RIGHT ); -StatusBar( Window* pParent, const ResId& rResId ); ~StatusBar(); virtual voidMouseButtonDown( const MouseEvent& rMEvt ); @@ -144,15 +143,11 @@ public: sal_uInt16 nPos = STATUSBAR_APPEND ); voidRemoveItem( sal_uInt16 nItemId ); -voidShowItem( sal_uInt16 nItemId ); voidHideItem( sal_uInt16 nItemId ); sal_BoolIsItemVisible( sal_uInt16 nItemId ) const; -voidShowItems(); -voidHideItems(); sal_BoolAreItemsVisible() const { return mbVisibleItems; } -voidCopyItems( const StatusBar& rStatusBar ); voidClear(); sal_uInt16 GetItemCount() const; @@ -163,15 +158,12 @@ public: Point GetItemTextPos( sal_uInt16 nItemId ) const; sal_uInt16 GetCurItemId() const { return mnCurItemId; } -sal_uLong GetItemWidth( sal_uInt16 nItemId ) const; -StatusBarItemBits GetItemBits( sal_uInt16 nItemId ) const; longGetItemOffset( sal_uInt16 nItemId ) const; voidSetItemText( sal_uInt16 nItemId, const XubString& rText ); const XubString&GetItemText( sal_uInt16 nItemId ) const; voidSetItemData( sal_uInt16 nItemId, void* pNewData ); -void* GetItemData( sal_uInt16 nItemId ) const; voidSetItemCommand( sal_uInt16 nItemId, const XubString& rCommand ); const XubString&GetItemCommand( sal_uInt16 nItemId ); @@ -187,17 +179,13 @@ public: voidSetHelpId( sal_uInt16 nItemId, const rtl::OString& rHelpId ); rtl::OStringGetHelpId( sal_uInt16 nItemId ) const; -voidSetBottomBorder( sal_Bool bBottomBorder = sal_True ); sal_BoolIsBottomBorder() const { return mbBottomBorder; } - -voidSetTopBorder( sal_Bool bTopBorder = sal_True ); sal_BoolIsTopBorder() const; voidStartProgressMode( const XubString& rText ); voidSetProgressValue( sal_uInt16 nPercent ); voidEndProgressMode(); sal_BoolIsProgressMode() const { return mbProgressMode; } -voidResetProgressMode(); voidSetText( const XubString& rText ); diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx index 944ad5f..32dcc4a 100644 --- a/vcl/source/window/status.cxx +++ b/vcl/source/window/status.cxx @@ -176,20 +176,6 @@ StatusBar::StatusBar( Window* pParent, WinBits nStyle ) : // --- -StatusBar::StatusBar( Window* pParent, const ResId& rResId ) : -Window( WINDOW_STATUSBAR ) -{ -rResId.SetRT( RSC_STATUSBAR ); -WinBits nStyle = ImplInitRes( rResId ); -ImplInit( pParent, nStyle ); -ImplLoadRes( rResId ); - -if ( !(nStyle & WB_HIDE) ) -Show(); -} - -// --- - StatusBar::~StatusBar() { // Alle Items loeschen @@ -1050,28 +1036,6 @@ void StatusBar::RemoveItem( sal_uInt16 nItemId ) // --- -void StatusBar::ShowItem( sal_uInt16 nItemId ) -{ -sal_uInt16 nPos = GetItemPos( nItemId ); - -if ( nPos != STATUSBAR_ITEM_NOTFOUND ) -{ -ImplStatusItem* pItem = (*mpItemList)[ nPos ]; -if ( !pItem->mbVisible ) -{ -pItem->mbVisible = sal_True; - -mbFormat = sal_True; -if ( ImplIsItemUpdate() ) -Invalidate(); - -ImplCallEventListeners( VCLEVENT_STATUSBAR_SHOWITEM, (void*) sal_IntPtr(nItemId) ); -} -} -} - -// --- - void StatusBar::HideItem( sal_uInt16 nItemId ) { sal_uInt16 nPos = GetItemPos( nItemId ); @@ -1106,54 +1070,6 @@ sal_Bool StatusBar::IsItemVisible( sal_uInt16 nItemId ) const // --- -void StatusBar::ShowItems() -{ -if ( !mbVisibleItems ) -{ -
[Libreoffice-commits] .: vcl/inc vcl/source
vcl/inc/vcl/outdev.hxx | 33 - vcl/source/gdi/outdev2.cxx | 38 -- vcl/source/gdi/outdev3.cxx | 27 vcl/source/gdi/outdevnative.cxx | 39 --- vcl/source/gdi/outmap.cxx | 222 5 files changed, 359 deletions(-) New commits: commit bb11106e06fa47a105bd02c2281f20af147b71b6 Author: August Sodora Date: Sun Dec 11 00:36:49 2011 -0500 Remove unused code diff --git a/vcl/inc/vcl/outdev.hxx b/vcl/inc/vcl/outdev.hxx index d2d3809..9ce143d 100644 --- a/vcl/inc/vcl/outdev.hxx +++ b/vcl/inc/vcl/outdev.hxx @@ -416,7 +416,6 @@ public: const sal_Int32* pPixelDXArray ) const; SAL_DLLPRIVATE SalLayout* ImplGlyphFallbackLayout( SalLayout*, ImplLayoutArgs& ) const; -SAL_DLLPRIVATE long ImplGetTextWidth( const SalLayout& ) const; static SAL_DLLPRIVATE XubStringImplGetEllipsisString( const OutputDevice& rTargetDevice, const XubString& rStr, long nMaxWidth, sal_uInt16 nStyle, const ::vcl::ITextLayout& _rLayout ); @@ -458,10 +457,7 @@ public: SAL_DLLPRIVATE long ImplLogicHeightToDevicePixel( long nHeight ) const; SAL_DLLPRIVATE long ImplDevicePixelToLogicWidth( long nWidth ) const; SAL_DLLPRIVATE long ImplDevicePixelToLogicHeight( long nHeight ) const; -SAL_DLLPRIVATE floatImplFloatLogicWidthToDevicePixel( float ) const; SAL_DLLPRIVATE floatImplFloatLogicHeightToDevicePixel( float ) const; -SAL_DLLPRIVATE floatImplFloatDevicePixelToLogicWidth( float ) const; -SAL_DLLPRIVATE floatImplFloatDevicePixelToLogicHeight( float ) const; SAL_DLLPRIVATE PointImplLogicToDevicePixel( const Point& rLogicPt ) const; SAL_DLLPRIVATE Size ImplLogicToDevicePixel( const Size& rLogicSize ) const; SAL_DLLPRIVATE RectangleImplLogicToDevicePixel( const Rectangle& rLogicRect ) const; @@ -601,7 +597,6 @@ public: FontUnderline eUnderline, FontUnderline eOverline, sal_Bool bUnderlineAbove = sal_False ); -static sal_Bool IsTextUnderlineAbove( const Font& rFont ); voidDrawText( const Point& rStartPt, const XubString& rStr, xub_StrLen nIndex = 0, xub_StrLen nLen = STRING_LEN, @@ -830,7 +825,6 @@ public: const ::vcl::RenderGraphic& rRenderGraphic ); Color GetPixel( const Point& rPt ) const; -Color* GetPixel( const Polygon& rPts ) const; Bitmap GetBitmap( const Point& rSrcPt, const Size& rSize ) const; @@ -992,9 +986,7 @@ public: SizeLogicToPixel( const Size& rLogicSize ) const; Rectangle LogicToPixel( const Rectangle& rLogicRect ) const; Polygon LogicToPixel( const Polygon& rLogicPoly ) const; -basegfx::B2DPolygon LogicToPixel( const basegfx::B2DPolygon& rLogicPolyPoly ) const; PolyPolygon LogicToPixel( const PolyPolygon& rLogicPolyPoly ) const; -basegfx::B2DPolyPolygon LogicToPixel( const basegfx::B2DPolyPolygon& rLogicPolyPoly ) const; Region LogicToPixel( const Region& rLogicRegion )const; Point LogicToPixel( const Point& rLogicPt, const MapMode& rMapMode ) const; @@ -1004,21 +996,15 @@ public: const MapMode& rMapMode ) const; Polygon LogicToPixel( const Polygon& rLogicPoly, const MapMode& rMapMode ) const; -basegfx::B2DPolygon LogicToPixel( const basegfx::B2DPolygon& rLogicPoly, - const MapMode& rMapMode ) const; PolyPolygon LogicToPixel( const PolyPolygon& rLogicPolyPoly, const MapMode& rMapMode ) const; basegfx::B2DPolyPolygon LogicToPixel( const basegfx::B2DPolyPolygon& rLogicPolyPoly, const MapMode& rMapMode ) const; -Region LogicToPixel( const Region& rLogicRegion, - const MapMode& rMapMode ) const; Point PixelToLogic( const Point& rDevicePt ) const; SizePixelToLogic( const Size& rDeviceSize ) const; Rectangle PixelToLogic( const Rectangle& rDeviceRect ) const; Polygon PixelToLogic( const Polygon& rDevicePoly ) const; -basegfx::B2DPolygon PixelToLogic( const basegfx::B2DPolygon& rDevicePoly ) const; PolyPolygon PixelToLogic( const PolyPolygon& rDevicePolyPoly ) const; -basegfx::B2DPolyPolygon PixelToLogic( const basegfx::B2DPolyPolygon& rDevicePolyPoly ) const;
[Libreoffice-commits] .: vcl/inc vcl/source
vcl/inc/vcl/pdfwriter.hxx|5 + vcl/source/gdi/pdfwriter.cxx | 159 +-- 2 files changed, 83 insertions(+), 81 deletions(-) New commits: commit d36f276728abffee1a9d53c87d56526e16a4968d Author: David Tardon Date: Wed Dec 7 13:42:15 2011 +0100 avoid casting from void* diff --git a/vcl/inc/vcl/pdfwriter.hxx b/vcl/inc/vcl/pdfwriter.hxx index 58dd7e1..816518b 100644 --- a/vcl/inc/vcl/pdfwriter.hxx +++ b/vcl/inc/vcl/pdfwriter.hxx @@ -42,6 +42,8 @@ #include "com/sun/star/io/XOutputStream.hpp" #include "com/sun/star/beans/XMaterialHolder.hpp" +#include + #include #include #include @@ -65,6 +67,7 @@ namespace vcl { class PDFExtOutDevData; +class PDFWriterImpl; struct PDFNote { @@ -81,7 +84,7 @@ class VCL_DLLPUBLIC PDFOutputStream class VCL_DLLPUBLIC PDFWriter { -void* pImplementation; +boost::scoped_ptr pImplementation; public: // extended line info enum CapType { capButt, capRound, capSquare }; diff --git a/vcl/source/gdi/pdfwriter.cxx b/vcl/source/gdi/pdfwriter.cxx index 68d1218..41b8b95 100644 --- a/vcl/source/gdi/pdfwriter.cxx +++ b/vcl/source/gdi/pdfwriter.cxx @@ -45,37 +45,36 @@ PDFWriter::PDFWriter( const PDFWriter::PDFWriterContext& rContext, const com::su PDFWriter::~PDFWriter() { -delete (PDFWriterImpl*)pImplementation; } OutputDevice* PDFWriter::GetReferenceDevice() { -return ((PDFWriterImpl*)pImplementation)->getReferenceDevice(); +return pImplementation->getReferenceDevice(); } sal_Int32 PDFWriter::NewPage( sal_Int32 nPageWidth, sal_Int32 nPageHeight, Orientation eOrientation ) { -return ((PDFWriterImpl*)pImplementation)->newPage( nPageWidth, nPageHeight, eOrientation ); +return pImplementation->newPage( nPageWidth, nPageHeight, eOrientation ); } bool PDFWriter::Emit() { -return ((PDFWriterImpl*)pImplementation)->emit(); +return pImplementation->emit(); } void PDFWriter::SetDocumentLocale( const com::sun::star::lang::Locale& rLoc ) { -((PDFWriterImpl*)pImplementation)->setDocumentLocale( rLoc ); +pImplementation->setDocumentLocale( rLoc ); } void PDFWriter::SetFont( const Font& rFont ) { -((PDFWriterImpl*)pImplementation)->setFont( rFont ); +pImplementation->setFont( rFont ); } void PDFWriter::DrawText( const Point& rPos, const String& rText ) { -((PDFWriterImpl*)pImplementation)->drawText( rPos, rText ); +pImplementation->drawText( rPos, rText ); } void PDFWriter::DrawTextLine( @@ -86,7 +85,7 @@ void PDFWriter::DrawTextLine( FontUnderline eOverline, sal_Bool bUnderlineAbove ) { -((PDFWriterImpl*)pImplementation)->drawTextLine( rPos, nWidth, eStrikeout, eUnderline, eOverline, bUnderlineAbove ); +pImplementation->drawTextLine( rPos, nWidth, eStrikeout, eUnderline, eOverline, bUnderlineAbove ); } void PDFWriter::DrawTextArray( @@ -96,7 +95,7 @@ void PDFWriter::DrawTextArray( xub_StrLen nIndex, xub_StrLen nLen ) { -((PDFWriterImpl*)pImplementation)->drawTextArray( rStartPt, rStr, pDXAry, nIndex, nLen ); +pImplementation->drawTextArray( rStartPt, rStr, pDXAry, nIndex, nLen ); } void PDFWriter::DrawStretchText( @@ -106,7 +105,7 @@ void PDFWriter::DrawStretchText( xub_StrLen nIndex, xub_StrLen nLen ) { -((PDFWriterImpl*)pImplementation)->drawStretchText( rStartPt, nWidth, rStr, nIndex, nLen ); +pImplementation->drawStretchText( rStartPt, nWidth, rStr, nIndex, nLen ); } void PDFWriter::DrawText( @@ -114,335 +113,335 @@ void PDFWriter::DrawText( const XubString& rStr, sal_uInt16 nStyle ) { -((PDFWriterImpl*)pImplementation)->drawText( rRect, rStr, nStyle ); +pImplementation->drawText( rRect, rStr, nStyle ); } void PDFWriter::DrawLine( const Point& rStart, const Point& rStop ) { -((PDFWriterImpl*)pImplementation)->drawLine( rStart, rStop ); +pImplementation->drawLine( rStart, rStop ); } void PDFWriter::DrawLine( const Point& rStart, const Point& rStop, const LineInfo& rInfo ) { -((PDFWriterImpl*)pImplementation)->drawLine( rStart, rStop, rInfo ); +pImplementation->drawLine( rStart, rStop, rInfo ); } void PDFWriter::DrawPolygon( const Polygon& rPoly ) { -((PDFWriterImpl*)pImplementation)->drawPolygon( rPoly ); +pImplementation->drawPolygon( rPoly ); } void PDFWriter::DrawPolyLine( const Polygon& rPoly ) { -((PDFWriterImpl*)pImplementation)->drawPolyLine( rPoly ); +pImplementation->drawPolyLine( rPoly ); } void PDFWriter::DrawRect( const Rectangle& rRect ) { -((PDFWriterImpl*)pImplementation)->drawRectangle( rRect ); +pImplementation->drawRectangle( rRect ); } void PDFWriter::DrawRect( const Rectangle& rRect, sal_uLong nHorzRound, sal_uLong nVertRound ) { -((PDFW
[Libreoffice-commits] .: vcl/inc vcl/source
vcl/inc/printdlg.hxx | 10 +- vcl/source/window/printdlg.cxx |8 2 files changed, 9 insertions(+), 9 deletions(-) New commits: commit 858def93c81ab4c94fdf191b7495eeb01a9c3d2f Author: Ivan Timofeev Date: Wed Nov 30 22:27:50 2011 +0400 fix previous commit, really move initial focus to printer selection diff --git a/vcl/inc/printdlg.hxx b/vcl/inc/printdlg.hxx index 4afe1c0..7aea96b 100644 --- a/vcl/inc/printdlg.hxx +++ b/vcl/inc/printdlg.hxx @@ -212,17 +212,17 @@ namespace vcl void setupLayout(); }; +TabControl maTabCtrl; +NUpTabPage maNUpPage; +JobTabPage maJobPage; +OutputOptPage maOptionsPage; + PrintPreviewWindow maPreviewWindow; NumericFieldmaPageEdit; FixedText maNumPagesText; PushButton maBackwardBtn; PushButton maForwardBtn; -TabControl maTabCtrl; -NUpTabPage maNUpPage; -JobTabPage maJobPage; -OutputOptPage maOptionsPage; - FixedLine maButtonLine; OKButtonmaOKButton; diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx index 546fa49..6119555 100644 --- a/vcl/source/window/printdlg.cxx +++ b/vcl/source/window/printdlg.cxx @@ -718,15 +718,15 @@ void PrintDialog::OutputOptPage::storeToSettings() PrintDialog::PrintDialog( Window* i_pParent, const boost::shared_ptr& i_rController ) : ModalDialog( i_pParent, VclResId( SV_DLG_PRINT ) ) +, maTabCtrl( this, VclResId( SV_PRINT_TABCTRL ) ) +, maNUpPage( &maTabCtrl, VclResId( SV_PRINT_TAB_NUP ) ) +, maJobPage( &maTabCtrl, VclResId( SV_PRINT_TAB_JOB ) ) +, maOptionsPage( &maTabCtrl, VclResId( SV_PRINT_TAB_OPT ) ) , maPreviewWindow( this, VclResId( SV_PRINT_PAGE_PREVIEW ) ) , maPageEdit( this, VclResId( SV_PRINT_PAGE_EDIT ) ) , maNumPagesText( this, VclResId( SV_PRINT_PAGE_TXT ) ) , maBackwardBtn( this, VclResId( SV_PRINT_PAGE_BACKWARD ) ) , maForwardBtn( this, VclResId( SV_PRINT_PAGE_FORWARD ) ) -, maTabCtrl( this, VclResId( SV_PRINT_TABCTRL ) ) -, maNUpPage( &maTabCtrl, VclResId( SV_PRINT_TAB_NUP ) ) -, maJobPage( &maTabCtrl, VclResId( SV_PRINT_TAB_JOB ) ) -, maOptionsPage( &maTabCtrl, VclResId( SV_PRINT_TAB_OPT ) ) , maButtonLine( this, VclResId( SV_PRINT_BUTTONLINE ) ) , maOKButton( this, VclResId( SV_PRINT_OK ) ) , maCancelButton( this, VclResId( SV_PRINT_CANCEL ) ) ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/inc vcl/source
vcl/inc/printdlg.hxx |7 --- vcl/source/window/printdlg.cxx |6 +++--- 2 files changed, 7 insertions(+), 6 deletions(-) New commits: commit 041fc1f56618b18923f23a27a6e482ed81a98fe2 Author: Ivan Timofeev Date: Wed Nov 30 21:59:13 2011 +0400 fdo#34641: move initial focus to printer selection diff --git a/vcl/inc/printdlg.hxx b/vcl/inc/printdlg.hxx index d162bc0..4afe1c0 100644 --- a/vcl/inc/printdlg.hxx +++ b/vcl/inc/printdlg.hxx @@ -212,9 +212,6 @@ namespace vcl void setupLayout(); }; -OKButtonmaOKButton; -CancelButtonmaCancelButton; -HelpButton maHelpButton; PrintPreviewWindow maPreviewWindow; NumericFieldmaPageEdit; FixedText maNumPagesText; @@ -228,6 +225,10 @@ namespace vcl FixedLine maButtonLine; +OKButtonmaOKButton; +CancelButtonmaCancelButton; +HelpButton maHelpButton; + boost::shared_ptr< PrinterController > maPController; rtl::OUString maPageStr; diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx index dc11b25..546fa49 100644 --- a/vcl/source/window/printdlg.cxx +++ b/vcl/source/window/printdlg.cxx @@ -718,9 +718,6 @@ void PrintDialog::OutputOptPage::storeToSettings() PrintDialog::PrintDialog( Window* i_pParent, const boost::shared_ptr& i_rController ) : ModalDialog( i_pParent, VclResId( SV_DLG_PRINT ) ) -, maOKButton( this, VclResId( SV_PRINT_OK ) ) -, maCancelButton( this, VclResId( SV_PRINT_CANCEL ) ) -, maHelpButton( this, VclResId( SV_PRINT_HELP ) ) , maPreviewWindow( this, VclResId( SV_PRINT_PAGE_PREVIEW ) ) , maPageEdit( this, VclResId( SV_PRINT_PAGE_EDIT ) ) , maNumPagesText( this, VclResId( SV_PRINT_PAGE_TXT ) ) @@ -731,6 +728,9 @@ PrintDialog::PrintDialog( Window* i_pParent, const boost::shared_ptrhttp://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/inc vcl/source
vcl/inc/vcl/salbtype.hxx | 24 ++ vcl/source/gdi/bitmap.cxx | 61 -- 2 files changed, 42 insertions(+), 43 deletions(-) New commits: commit 5436b3242ae84aca1d8a3d750bee6bf39ea52224 Author: Caolán McNamara Date: Thu Nov 3 23:40:04 2011 + Unwind and refactor some of the Grey Palette stuff We get some assertions in the smoketest with --enable-debug, looking closer I think to use a single bIsGrey flag we... a) would need to check after every modification of a Palette that mbIsGrey is still valid and update it accordingly b) There are a lot of routes outside of direct assignation to the stock Grey Palettes that can result in Grey palettes in e.g. the pngreader, they would all need updating :-( So, how about just refactoring the original HasGreyPalette and IsGreyPalette. diff --git a/vcl/inc/vcl/salbtype.hxx b/vcl/inc/vcl/salbtype.hxx index aca81ab..fc323c7 100644 --- a/vcl/inc/vcl/salbtype.hxx +++ b/vcl/inc/vcl/salbtype.hxx @@ -181,7 +181,6 @@ private: BitmapColor*mpBitmapColor; sal_uInt16 mnCount; -boolmbIsGrey; public: @@ -207,8 +206,7 @@ public: inline BitmapColor& operator[]( sal_uInt16 nIndex ); inline sal_uInt16 GetBestIndex( const BitmapColor& rCol ) const; -boolIsGreyPalette() const { return !GetEntryCount() || mbIsGrey; } -voidSetGreyPalette( bool bGrey ) { mbIsGrey = bGrey; } +boolIsGreyPalette() const; }; // --- @@ -535,18 +533,16 @@ inline sal_uLong BitmapColor::GetColorError( const BitmapColor& rBitmapColor ) c // -- -inline BitmapPalette::BitmapPalette() -: mpBitmapColor(NULL) -, mnCount(0) -, mbIsGrey(false) +inline BitmapPalette::BitmapPalette() : +mpBitmapColor ( NULL ), +mnCount ( 0 ) { } // -- -inline BitmapPalette::BitmapPalette( const BitmapPalette& rBitmapPalette ) -: mnCount(rBitmapPalette.mnCount) -, mbIsGrey(rBitmapPalette.mbIsGrey) +inline BitmapPalette::BitmapPalette( const BitmapPalette& rBitmapPalette ) : +mnCount( rBitmapPalette.mnCount ) { if( mnCount ) { @@ -560,9 +556,8 @@ inline BitmapPalette::BitmapPalette( const BitmapPalette& rBitmapPalette ) // -- -inline BitmapPalette::BitmapPalette( sal_uInt16 nCount ) -: mnCount(nCount) -, mbIsGrey(false) +inline BitmapPalette::BitmapPalette( sal_uInt16 nCount ) : +mnCount( nCount ) { if( mnCount ) { @@ -587,7 +582,6 @@ inline BitmapPalette& BitmapPalette::operator=( const BitmapPalette& rBitmapPale { delete[] (sal_uInt8*) mpBitmapColor; mnCount = rBitmapPalette.mnCount; -mbIsGrey = rBitmapPalette.mbIsGrey; if( mnCount ) { @@ -607,7 +601,7 @@ inline sal_Bool BitmapPalette::operator==( const BitmapPalette& rBitmapPalette ) { sal_Bool bRet = sal_False; -if( rBitmapPalette.mnCount == mnCount && rBitmapPalette.mbIsGrey == mbIsGrey ) +if( rBitmapPalette.mnCount == mnCount ) { bRet = sal_True; diff --git a/vcl/source/gdi/bitmap.cxx b/vcl/source/gdi/bitmap.cxx index 4df609a..bdfc53e 100644 --- a/vcl/source/gdi/bitmap.cxx +++ b/vcl/source/gdi/bitmap.cxx @@ -177,7 +177,6 @@ const BitmapPalette& Bitmap::GetGreyPalette( int nEntries ) aGreyPalette2.SetEntryCount( 2 ); aGreyPalette2[ 0 ] = BitmapColor( 0, 0, 0 ); aGreyPalette2[ 1 ] = BitmapColor( 255, 255, 255 ); -aGreyPalette2.SetGreyPalette( true ); } return aGreyPalette2; @@ -191,7 +190,6 @@ const BitmapPalette& Bitmap::GetGreyPalette( int nEntries ) aGreyPalette4[ 1 ] = BitmapColor( 85, 85, 85 ); aGreyPalette4[ 2 ] = BitmapColor( 170, 170, 170 ); aGreyPalette4[ 3 ] = BitmapColor( 255, 255, 255 ); -aGreyPalette4.SetGreyPalette( true ); } return aGreyPalette4; @@ -206,7 +204,6 @@ const BitmapPalette& Bitmap::GetGreyPalette( int nEntries ) for( sal_uInt16 i = 0; i < 16; i++, cGrey = sal::static_int_cast(cGrey + cGreyInc) ) aGreyPalette16[ i ] = BitmapColor( cGrey, cGrey, cGrey ); -aGreyPalette16.SetGreyPalette( true ); } return aGreyPalette16; @@ -219,7 +216,6 @@ const BitmapPalette& Bitmap::GetGreyPalette( int nEntries ) for( sal_uInt16 i = 0; i < 256; i++ ) aGreyPalette256[ i ] = BitmapColor( (sal_uInt8) i, (sal_uInt8) i, (sal_uInt8) i ); -aGreyPalette256.SetGreyP