You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by hd...@apache.org on 2013/07/19 17:59:11 UTC
svn commit: r1504925 [7/12] - in /openoffice/branches/rejuvenate01:
ext_libraries/apr-util/ ext_libraries/coinmp/ ext_libraries/serf/
ext_libraries/serf/win/ ext_sources/ main/
main/accessibility/bridge/org/openoffice/java/accessibility/
main/basctl/so...
Modified: openoffice/branches/rejuvenate01/main/svtools/source/control/ctrlbox.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/svtools/source/control/ctrlbox.cxx?rev=1504925&r1=1504924&r2=1504925&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/svtools/source/control/ctrlbox.cxx (original)
+++ openoffice/branches/rejuvenate01/main/svtools/source/control/ctrlbox.cxx Fri Jul 19 15:59:04 2013
@@ -232,16 +232,14 @@ void ColorListBox::UserDraw( const UserD
if(nEdgeBlendingPercent)
{
- Bitmap aBitmap(rUDEvt.GetDevice()->GetBitmap(aRect.TopLeft(), aRect.GetSize()));
+ const Color& rTopLeft(rStyleSettings.GetEdgeBlendingTopLeftColor());
+ const Color& rBottomRight(rStyleSettings.GetEdgeBlendingBottomRightColor());
+ const sal_uInt8 nAlpha((nEdgeBlendingPercent * 255) / 100);
+ const BitmapEx aBlendFrame(createBlendFrame(aRect.GetSize(), nAlpha, rTopLeft, rBottomRight));
- if(!aBitmap.IsEmpty())
+ if(!aBlendFrame.IsEmpty())
{
- const Color& rTopLeft(rStyleSettings.GetEdgeBlendingTopLeftColor());
- const Color& rBottomRight(rStyleSettings.GetEdgeBlendingBottomRightColor());
- const sal_uInt8 nAlpha((nEdgeBlendingPercent * 255) / 100);
-
- aBitmap.DrawBlendFrame(nAlpha, rTopLeft, rBottomRight);
- rUDEvt.GetDevice()->DrawBitmap(aRect.TopLeft(), aBitmap);
+ rUDEvt.GetDevice()->DrawBitmapEx(aRect.TopLeft(), aBlendFrame);
}
}
Modified: openoffice/branches/rejuvenate01/main/svtools/source/control/valueset.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/svtools/source/control/valueset.cxx?rev=1504925&r1=1504924&r2=1504925&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/svtools/source/control/valueset.cxx (original)
+++ openoffice/branches/rejuvenate01/main/svtools/source/control/valueset.cxx Fri Jul 19 15:59:04 2013
@@ -330,16 +330,14 @@ void ValueSet::ImplFormatItem( ValueSetI
if(nEdgeBlendingPercent)
{
- Bitmap aBitmap(maVirDev.GetBitmap(aRect.TopLeft(), aRect.GetSize()));
+ const Color& rTopLeft(rStyleSettings.GetEdgeBlendingTopLeftColor());
+ const Color& rBottomRight(rStyleSettings.GetEdgeBlendingBottomRightColor());
+ const sal_uInt8 nAlpha((nEdgeBlendingPercent * 255) / 100);
+ const BitmapEx aBlendFrame(createBlendFrame(aRect.GetSize(), nAlpha, rTopLeft, rBottomRight));
- if(!aBitmap.IsEmpty())
+ if(!aBlendFrame.IsEmpty())
{
- const Color& rTopLeft(rStyleSettings.GetEdgeBlendingTopLeftColor());
- const Color& rBottomRight(rStyleSettings.GetEdgeBlendingBottomRightColor());
- const sal_uInt8 nAlpha((nEdgeBlendingPercent * 255) / 100);
-
- aBitmap.DrawBlendFrame(nAlpha, rTopLeft, rBottomRight);
- maVirDev.DrawBitmap(aRect.TopLeft(), aBitmap);
+ maVirDev.DrawBitmapEx(aRect.TopLeft(), aBlendFrame);
}
}
}
Modified: openoffice/branches/rejuvenate01/main/svtools/source/table/tablecontrol_impl.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/svtools/source/table/tablecontrol_impl.cxx?rev=1504925&r1=1504924&r2=1504925&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/svtools/source/table/tablecontrol_impl.cxx (original)
+++ openoffice/branches/rejuvenate01/main/svtools/source/table/tablecontrol_impl.cxx Fri Jul 19 15:59:04 2013
@@ -2072,6 +2072,7 @@ namespace svt { namespace table
case TableAreaAll:
m_pDataWindow->Invalidate();
+ m_pDataWindow->GetParent()->Invalidate( INVALIDATE_TRANSPARENT );
break;
}
}
@@ -2346,7 +2347,10 @@ namespace svt { namespace table
m_pDataWindow->Scroll( 0, (long)-nPixelDelta, aDataArea, SCROLL_CLIP | SCROLL_UPDATE | SCROLL_CHILDREN);
}
else
+ {
m_pDataWindow->Invalidate( INVALIDATE_UPDATE );
+ m_pDataWindow->GetParent()->Invalidate( INVALIDATE_TRANSPARENT );
+ }
// update the position at the vertical scrollbar
if ( m_pVScroll != NULL )
@@ -2423,7 +2427,10 @@ namespace svt { namespace table
m_pDataWindow->Scroll( nPixelDelta, 0, aDataArea, SCROLL_CLIP | SCROLL_UPDATE );
}
else
+ {
m_pDataWindow->Invalidate( INVALIDATE_UPDATE );
+ m_pDataWindow->GetParent()->Invalidate( INVALIDATE_TRANSPARENT );
+ }
// update the position at the horizontal scrollbar
if ( m_pHScroll != NULL )
Modified: openoffice/branches/rejuvenate01/main/svx/inc/svx/svdmodel.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/svx/inc/svx/svdmodel.hxx?rev=1504925&r1=1504924&r2=1504925&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/svx/inc/svx/svdmodel.hxx (original)
+++ openoffice/branches/rejuvenate01/main/svx/inc/svx/svdmodel.hxx Fri Jul 19 15:59:04 2013
@@ -219,6 +219,7 @@ protected:
sal_uInt32 nMaxUndoCount;
FASTBOOL bSaveNative;
sal_Bool bStarDrawPreviewMode;
+ bool mbDisableTextEditUsesCommonUndoManager;
//////////////////////////////////////////////////////////////////////////////
@@ -671,6 +672,9 @@ public:
void SetStarDrawPreviewMode(sal_Bool bPreview);
sal_Bool IsStarDrawPreviewMode() { return bStarDrawPreviewMode; }
+ bool GetDisableTextEditUsesCommonUndoManager() const { return mbDisableTextEditUsesCommonUndoManager; }
+ void SetDisableTextEditUsesCommonUndoManager(bool bNew) { mbDisableTextEditUsesCommonUndoManager = bNew; }
+
SotStorage* GetModelStorage() const { return pModelStorage; }
void SetModelStorage( SotStorage* pStor ) { pModelStorage = pStor; }
Modified: openoffice/branches/rejuvenate01/main/svx/inc/svx/svdobj.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/svx/inc/svx/svdobj.hxx?rev=1504925&r1=1504924&r2=1504925&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/svx/inc/svx/svdobj.hxx (original)
+++ openoffice/branches/rejuvenate01/main/svx/inc/svx/svdobj.hxx Fri Jul 19 15:59:04 2013
@@ -1125,6 +1125,9 @@ public:
Rectangle GetBLIPSizeRectangle() const;
void SetBLIPSizeRectangle( const Rectangle& aRect );
+ // #121917#
+ virtual bool HasText() const;
+
protected:
void impl_setUnoShape( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxUnoShape );
Modified: openoffice/branches/rejuvenate01/main/svx/inc/svx/svdotable.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/svx/inc/svx/svdotable.hxx?rev=1504925&r1=1504924&r2=1504925&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/svx/inc/svx/svdotable.hxx (original)
+++ openoffice/branches/rejuvenate01/main/svx/inc/svx/svdotable.hxx Fri Jul 19 15:59:04 2013
@@ -184,7 +184,9 @@ public:
/** returns the index of the text that contains the given point or -1 */
virtual sal_Int32 CheckTextHit(const Point& rPnt) const;
- virtual bool HasText() const;
+ // #121917#
+ virtual bool HasText() const;
+
sal_Bool IsTextEditActive() const { return (pEdtOutl != 0L); }
bool IsTextEditActive( const sdr::table::CellPos& rPos );
Modified: openoffice/branches/rejuvenate01/main/svx/inc/svx/svdotext.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/svx/inc/svx/svdotext.hxx?rev=1504925&r1=1504924&r2=1504925&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/svx/inc/svx/svdotext.hxx (original)
+++ openoffice/branches/rejuvenate01/main/svx/inc/svx/svdotext.hxx Fri Jul 19 15:59:04 2013
@@ -338,7 +338,9 @@ public:
FASTBOOL IsOutlText() const { return bTextFrame && (eTextKind==OBJ_OUTLINETEXT || eTextKind==OBJ_TITLETEXT); }
SdrObjKind GetTextKind() const { return eTextKind; }
- virtual bool HasText() const;
+ // #121917#
+ virtual bool HasText() const;
+
FASTBOOL HasEditText() const;
sal_Bool IsTextEditActive() const { return (pEdtOutl != 0L); }
Modified: openoffice/branches/rejuvenate01/main/svx/source/sidebar/area/AreaPropertyPanel.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/svx/source/sidebar/area/AreaPropertyPanel.cxx?rev=1504925&r1=1504924&r2=1504925&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/svx/source/sidebar/area/AreaPropertyPanel.cxx (original)
+++ openoffice/branches/rejuvenate01/main/svx/source/sidebar/area/AreaPropertyPanel.cxx Fri Jul 19 15:59:04 2013
@@ -25,6 +25,7 @@
#include <sfx2/sidebar/ResourceDefinitions.hrc>
#include <sfx2/sidebar/Theme.hxx>
#include <sfx2/sidebar/ControlFactory.hxx>
+#include <sfx2/sidebar/Layouter.hxx>
#include <AreaPropertyPanel.hxx>
#include <AreaPropertyPanel.hrc>
#include <svx/dialogs.hrc>
@@ -47,6 +48,7 @@
using namespace css;
using namespace cssu;
+using ::sfx2::sidebar::Layouter;
using ::sfx2::sidebar::Theme;
#define A2S(pString) (::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(pString)))
@@ -130,10 +132,41 @@ AreaPropertyPanel::AreaPropertyPanel(
mpTransparanceItem(),
mxFrame(rxFrame),
mpBindings(pBindings),
- mbColorAvail(true)
+ mbColorAvail(true),
+ maLayouter(*this)
{
Initialize();
FreeResource();
+
+ // Setup the grid layouter.
+ const sal_Int32 nMappedMboxWidth (Layouter::MapWidth(*this, MBOX_WIDTH));
+
+ maLayouter.GetCell(0,0).SetControl(*mpColorTextFT).SetGridWidth(3);
+ maLayouter.GetCell(1,0).SetControl(*mpLbFillType);
+ maLayouter.GetCell(1,2,0).SetControl(*mpToolBoxColorBackground).SetFixedWidth();
+ maLayouter.GetCell(1,2,1).SetControl(*mpLbFillAttr);
+
+ maLayouter.GetCell(2,0).SetControl(*mpTrspTextFT).SetGridWidth(3);
+ maLayouter.GetCell(3,0).SetControl(*mpLBTransType);
+ maLayouter.GetCell(3,2,0).SetControl(*mpMTRTransparent);
+ maLayouter.GetCell(3,2,1).SetControl(*mpBTNGradient);
+
+ maLayouter.GetColumn(0)
+ .SetWeight(1)
+ .SetLeftPadding(Layouter::MapWidth(*this,SECTIONPAGE_MARGIN_HORIZONTAL))
+ .SetMinimumWidth(nMappedMboxWidth);
+ maLayouter.GetColumn(1)
+ .SetWeight(0)
+ .SetMinimumWidth(Layouter::MapWidth(*this, CONTROL_SPACING_HORIZONTAL));
+ maLayouter.GetColumn(2)
+ .SetWeight(1)
+ .SetMinimumWidth(nMappedMboxWidth)
+ .SetRightPadding(Layouter::MapWidth(*this,SECTIONPAGE_MARGIN_HORIZONTAL));
+
+ // Make controls that display text handle short widths more
+ // graceful.
+ Layouter::PrepareForLayouting(*mpColorTextFT);
+ Layouter::PrepareForLayouting(*mpTrspTextFT);
}
@@ -282,8 +315,11 @@ IMPL_LINK( AreaPropertyPanel, SelectFill
mpLbFillAttr->Clear();
SfxObjectShell* pSh = SfxObjectShell::Current();
const XFillStyleItem aXFillStyleItem(eXFS);
- GetBindings()->GetDispatcher()->Execute(SID_ATTR_FILL_STYLE, SFX_CALLMODE_RECORD, &aXFillStyleItem, 0L);
+ // #122676# Do no longer trigger two Execute calls, one for SID_ATTR_FILL_STYLE
+ // and one for setting the fill attribute itself, but add two SfxPoolItems to the
+ // call to get just one action at the SdrObject and to create only one Undo action, too.
+ // Checked that this works in all apps.
switch( eXFS )
{
case XFILL_NONE:
@@ -292,6 +328,10 @@ IMPL_LINK( AreaPropertyPanel, SelectFill
mpToolBoxColor->Hide();
mpLbFillType->Selected();
mpLbFillAttr->Disable();
+
+ // #122676# need to call a single SID_ATTR_FILL_STYLE change
+ GetBindings()->GetDispatcher()->Execute(
+ SID_ATTR_FILL_STYLE, SFX_CALLMODE_RECORD, &aXFillStyleItem, 0L);
break;
}
case XFILL_SOLID:
@@ -301,7 +341,10 @@ IMPL_LINK( AreaPropertyPanel, SelectFill
const String aTmpStr;
const Color aColor = maLastColor;
const XFillColorItem aXFillColorItem( aTmpStr, aColor );
- GetBindings()->GetDispatcher()->Execute(SID_ATTR_FILL_COLOR, SFX_CALLMODE_RECORD, &aXFillColorItem, 0L);
+
+ // #122676# change FillStyle and Color in one call
+ GetBindings()->GetDispatcher()->Execute(
+ SID_ATTR_FILL_COLOR, SFX_CALLMODE_RECORD, &aXFillColorItem, &aXFillStyleItem, 0L);
break;
}
case XFILL_GRADIENT:
@@ -329,7 +372,10 @@ IMPL_LINK( AreaPropertyPanel, SelectFill
{
const XGradient aGradient = aItem.GetGradientList()->GetGradient(mnLastPosGradient)->GetGradient();
const XFillGradientItem aXFillGradientItem(mpLbFillAttr->GetEntry(mnLastPosGradient), aGradient);
- GetBindings()->GetDispatcher()->Execute(SID_ATTR_FILL_GRADIENT, SFX_CALLMODE_RECORD, &aXFillGradientItem, 0L);
+
+ // #122676# change FillStyle and Gradient in one call
+ GetBindings()->GetDispatcher()->Execute(
+ SID_ATTR_FILL_GRADIENT, SFX_CALLMODE_RECORD, &aXFillGradientItem, &aXFillStyleItem, 0L);
mpLbFillAttr->SelectEntryPos(mnLastPosGradient);
}
}
@@ -365,7 +411,10 @@ IMPL_LINK( AreaPropertyPanel, SelectFill
{
const XHatch aHatch = aItem.GetHatchList()->GetHatch(mnLastPosHatch)->GetHatch();
const XFillHatchItem aXFillHatchItem(mpLbFillAttr->GetSelectEntry(), aHatch);
- GetBindings()->GetDispatcher()->Execute(SID_ATTR_FILL_HATCH, SFX_CALLMODE_RECORD, &aXFillHatchItem, 0L);
+
+ // #122676# change FillStyle and Hatch in one call
+ GetBindings()->GetDispatcher()->Execute(
+ SID_ATTR_FILL_HATCH, SFX_CALLMODE_RECORD, &aXFillHatchItem, &aXFillStyleItem, 0L);
mpLbFillAttr->SelectEntryPos(mnLastPosHatch);
}
}
@@ -401,7 +450,10 @@ IMPL_LINK( AreaPropertyPanel, SelectFill
{
const XBitmapEntry* pXBitmapEntry = aItem.GetBitmapList()->GetBitmap(mnLastPosBitmap);
const XFillBitmapItem aXFillBitmapItem(mpLbFillAttr->GetSelectEntry(), pXBitmapEntry->GetGraphicObject());
- GetBindings()->GetDispatcher()->Execute(SID_ATTR_FILL_BITMAP, SFX_CALLMODE_RECORD, &aXFillBitmapItem, 0L);
+
+ // #122676# change FillStyle and Bitmap in one call
+ GetBindings()->GetDispatcher()->Execute(
+ SID_ATTR_FILL_BITMAP, SFX_CALLMODE_RECORD, &aXFillBitmapItem, &aXFillStyleItem, 0L);
mpLbFillAttr->SelectEntryPos(mnLastPosBitmap);
}
}
@@ -423,6 +475,8 @@ IMPL_LINK( AreaPropertyPanel, SelectFill
mpLbFillType->Selected();
}
}
+
+ maLayouter.Layout();
}
return 0;
@@ -438,26 +492,21 @@ IMPL_LINK( AreaPropertyPanel, SelectFill
if(pToolBox)
{
- if((XFillStyle) meLastXFS != eXFS)
- {
- GetBindings()->GetDispatcher()->Execute(SID_ATTR_FILL_STYLE, SFX_CALLMODE_RECORD, &aXFillStyleItem, 0L);
- }
+ // #122676# dependent from bFillStyleChange, do execute a single or two
+ // changes in one Execute call
+ const bool bFillStyleChange((XFillStyle) meLastXFS != eXFS);
switch(eXFS)
{
case XFILL_SOLID:
- //{
- // //String aTmpStr = mpLbFillAttr->GetSelectEntry();
- // //Color aColor = mpLbFillAttr->GetSelectEntryColor();
- // //if(aColor.GetColor() == 0 && aTmpStr.Equals(String::CreateFromAscii("")))
- // String aTmpStr;
- // Color aColor = maLastColor;
- // XFillColorItem aXFillColorItem( aTmpStr, aColor );
- // GetBindings()->GetDispatcher()->Execute(SID_ATTR_FILL_COLOR, SFX_CALLMODE_RECORD, &aXFillColorItem, 0L);
- // maLastColor = aColor;
- //}
- break;
-
+ {
+ if(bFillStyleChange)
+ {
+ // #122676# Single FillStyle change call needed here
+ GetBindings()->GetDispatcher()->Execute(SID_ATTR_FILL_STYLE, SFX_CALLMODE_RECORD, &aXFillStyleItem, 0L);
+ }
+ break;
+ }
case XFILL_GRADIENT:
{
sal_uInt16 nPos = mpLbFillAttr->GetSelectEntryPos();
@@ -475,7 +524,11 @@ IMPL_LINK( AreaPropertyPanel, SelectFill
{
const XGradient aGradient = aItem.GetGradientList()->GetGradient(nPos)->GetGradient();
const XFillGradientItem aXFillGradientItem(mpLbFillAttr->GetSelectEntry(), aGradient);
- GetBindings()->GetDispatcher()->Execute(SID_ATTR_FILL_GRADIENT, SFX_CALLMODE_RECORD, &aXFillGradientItem, 0L);
+
+ // #122676# Change FillStale and Gradinet in one call
+ GetBindings()->GetDispatcher()->Execute(
+ SID_ATTR_FILL_GRADIENT, SFX_CALLMODE_RECORD, &aXFillGradientItem,
+ bFillStyleChange ? &aXFillStyleItem : 0L, 0L);
}
}
@@ -502,7 +555,11 @@ IMPL_LINK( AreaPropertyPanel, SelectFill
{
const XHatch aHatch = aItem.GetHatchList()->GetHatch(nPos)->GetHatch();
const XFillHatchItem aXFillHatchItem( mpLbFillAttr->GetSelectEntry(), aHatch);
- GetBindings()->GetDispatcher()->Execute(SID_ATTR_FILL_HATCH, SFX_CALLMODE_RECORD, &aXFillHatchItem, 0L);
+
+ // #122676# Change FillStale and Hatch in one call
+ GetBindings()->GetDispatcher()->Execute(
+ SID_ATTR_FILL_HATCH, SFX_CALLMODE_RECORD, &aXFillHatchItem,
+ bFillStyleChange ? &aXFillStyleItem : 0L, 0L);
}
}
@@ -529,7 +586,11 @@ IMPL_LINK( AreaPropertyPanel, SelectFill
{
const XBitmapEntry* pXBitmapEntry = aItem.GetBitmapList()->GetBitmap(nPos);
const XFillBitmapItem aXFillBitmapItem(mpLbFillAttr->GetSelectEntry(), pXBitmapEntry->GetGraphicObject());
- GetBindings()->GetDispatcher()->Execute(SID_ATTR_FILL_BITMAP, SFX_CALLMODE_RECORD, &aXFillBitmapItem, 0L);
+
+ // #122676# Change FillStale and Bitmap in one call
+ GetBindings()->GetDispatcher()->Execute(
+ SID_ATTR_FILL_BITMAP, SFX_CALLMODE_RECORD, &aXFillBitmapItem,
+ bFillStyleChange ? &aXFillStyleItem : 0L, 0L);
}
}
@@ -667,6 +728,7 @@ void AreaPropertyPanel::ImpUpdateTranspa
else if(nValue <= 100)
{
mpLBTransType->Enable();
+ mpTrspTextFT->Enable();
mpLBTransType->SelectEntryPos(1);
mpBTNGradient->Hide();
mpMTRTransparent->Show();
@@ -690,6 +752,7 @@ void AreaPropertyPanel::ImpUpdateTranspa
Image* pImage = 0;
mpLBTransType->Enable();
+ mpTrspTextFT->Enable();
mpMTRTransparent->Hide();
mpBTNGradient->Enable();
mpBTNGradient->Show();
@@ -747,6 +810,7 @@ void AreaPropertyPanel::ImpUpdateTranspa
if(bZeroValue)
{
mpLBTransType->Enable();
+ mpTrspTextFT->Enable();
mpLBTransType->SelectEntryPos(0);
mpBTNGradient->Hide();
mpMTRTransparent->Enable();
@@ -758,6 +822,8 @@ void AreaPropertyPanel::ImpUpdateTranspa
{
// no transparency at all
mpLBTransType->SetNoSelection();
+ mpLBTransType->Disable();
+ mpTrspTextFT->Disable();
mpMTRTransparent->Disable();
mpMTRTransparent->Show();
mpBTNGradient->Disable();
@@ -840,6 +906,7 @@ void AreaPropertyPanel::NotifyItemUpdate
if(bDisabled)
{
mpLbFillType->Disable();
+ mpColorTextFT->Disable();
mpLbFillType->SetNoSelection();
mpLbFillAttr->Show();
mpLbFillAttr->Disable();
@@ -857,6 +924,7 @@ void AreaPropertyPanel::NotifyItemUpdate
{
mpStyleItem.reset(dynamic_cast< XFillStyleItem* >(pItem->Clone()));
mpLbFillType->Enable();
+ mpColorTextFT->Enable();
XFillStyle eXFS = (XFillStyle)mpStyleItem->GetValue();
meLastXFS = eXFS;
mpLbFillType->SelectEntryPos(sal::static_int_cast< sal_uInt16 >(eXFS));
@@ -1102,6 +1170,8 @@ void AreaPropertyPanel::NotifyItemUpdate
break;
}
}
+
+ maLayouter.Layout();
}
@@ -1432,6 +1502,16 @@ sal_Int32 AreaPropertyPanel::GetSelected
return mpLBTransType->GetSelectEntryPos();
}
+
+
+
+void AreaPropertyPanel::Resize (void)
+{
+ maLayouter.Layout();
+}
+
+
+
} } // end of namespace svx::sidebar
// eof
Modified: openoffice/branches/rejuvenate01/main/svx/source/sidebar/area/AreaPropertyPanel.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/svx/source/sidebar/area/AreaPropertyPanel.hxx?rev=1504925&r1=1504924&r2=1504925&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/svx/source/sidebar/area/AreaPropertyPanel.hxx (original)
+++ openoffice/branches/rejuvenate01/main/svx/source/sidebar/area/AreaPropertyPanel.hxx Fri Jul 19 15:59:04 2013
@@ -27,6 +27,7 @@
#include <vcl/ctrl.hxx>
#include <sfx2/sidebar/SidebarPanelBase.hxx>
#include <sfx2/sidebar/ControllerItem.hxx>
+#include <sfx2/sidebar/GridLayouter.hxx>
#include <svx/xgrad.hxx>
#include <svx/itemwin.hxx>
#include <svx/xfillit0.hxx>
@@ -85,6 +86,8 @@ public:
void SetGradient (const XGradient& rGradient);
sal_Int32 GetSelectedTransparencyTypeIndex (void) const;
+ virtual void Resize (void);
+
private:
sal_uInt16 meLastXFS;
Color maLastColor;
@@ -165,6 +168,8 @@ private:
/// bitfield
bool mbColorAvail : 1;
+ ::sfx2::sidebar::GridLayouter maLayouter;
+
DECL_LINK(SelectFillTypeHdl, ListBox* );
DECL_LINK(SelectFillAttrHdl, ListBox* );
DECL_LINK(ChangeTrgrTypeHdl_Impl, void*);
Modified: openoffice/branches/rejuvenate01/main/svx/source/sidebar/graphic/GraphicPropertyPanel.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/svx/source/sidebar/graphic/GraphicPropertyPanel.cxx?rev=1504925&r1=1504924&r2=1504925&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/svx/source/sidebar/graphic/GraphicPropertyPanel.cxx (original)
+++ openoffice/branches/rejuvenate01/main/svx/source/sidebar/graphic/GraphicPropertyPanel.cxx Fri Jul 19 15:59:04 2013
@@ -22,6 +22,7 @@
#include <sfx2/sidebar/ResourceDefinitions.hrc>
#include <sfx2/sidebar/Theme.hxx>
#include <sfx2/sidebar/ControlFactory.hxx>
+#include <sfx2/sidebar/Layouter.hxx>
#include <GraphicPropertyPanel.hxx>
#include <GraphicPropertyPanel.hrc>
#include <svx/dialogs.hrc>
@@ -35,12 +36,13 @@
using namespace css;
using namespace cssu;
+using ::sfx2::sidebar::Layouter;
using ::sfx2::sidebar::Theme;
#define A2S(pString) (::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(pString)))
//////////////////////////////////////////////////////////////////////////////
-// namespace open
+
namespace svx { namespace sidebar {
@@ -78,10 +80,58 @@ GraphicPropertyPanel::GraphicPropertyPan
maImgBlue(this, SVX_RES(IMG_BLUE)),
maImgGamma(this, SVX_RES(IMG_GAMMA)),
mxFrame(rxFrame),
- mpBindings(pBindings)
+ mpBindings(pBindings),
+ maLayouter(*this)
{
Initialize();
FreeResource();
+
+ // Setup the grid layouter.
+ maLayouter.GetCell(0,0).SetControl(*mpFtBrightness).SetGridWidth(2);
+ maLayouter.GetCell(1,0).SetControl(*mpMtrBrightness).SetGridWidth(2);
+
+ maLayouter.GetCell(0,3).SetControl(*mpFtContrast).SetGridWidth(2);
+ maLayouter.GetCell(1,3).SetControl(*mpMtrContrast).SetGridWidth(2);
+
+ maLayouter.GetCell(2,0).SetControl(*mpFtColorMode).SetGridWidth(2);
+ maLayouter.GetCell(3,0).SetControl(*mpLBColorMode).SetGridWidth(2);
+
+ maLayouter.GetCell(2,3).SetControl(*mpFtTrans).SetGridWidth(2);
+ maLayouter.GetCell(3,3).SetControl(*mpMtrTrans).SetGridWidth(2);
+
+ maLayouter.GetCell(4,0).SetControl(maImgRed).SetFixedWidth();
+ maLayouter.GetCell(4,1).SetControl(*mpMtrRed);
+
+ maLayouter.GetCell(5,0).SetControl(maImgBlue).SetFixedWidth();
+ maLayouter.GetCell(5,1).SetControl(*mpMtrBlue);
+
+ maLayouter.GetCell(4,3).SetControl(maImgGreen).SetFixedWidth();
+ maLayouter.GetCell(4,4).SetControl(*mpMtrGreen);
+ maLayouter.GetCell(5,3).SetControl(maImgGamma).SetFixedWidth();
+ maLayouter.GetCell(5,4).SetControl(*mpMtrGamma);
+
+ maLayouter.GetColumn(0)
+ .SetWeight(0)
+ .SetLeftPadding(Layouter::MapWidth(*this,SECTIONPAGE_MARGIN_HORIZONTAL));
+ maLayouter.GetColumn(1)
+ .SetWeight(1)
+ .SetMinimumWidth(Layouter::MapWidth(*this, MBOX_WIDTH - 10));
+ maLayouter.GetColumn(2)
+ .SetWeight(0)
+ .SetMinimumWidth(Layouter::MapWidth(*this, CONTROL_SPACING_HORIZONTAL));
+ maLayouter.GetColumn(3)
+ .SetWeight(0);
+ maLayouter.GetColumn(4)
+ .SetWeight(1)
+ .SetMinimumWidth(Layouter::MapWidth(*this, MBOX_WIDTH - 10))
+ .SetRightPadding(Layouter::MapWidth(*this,SECTIONPAGE_MARGIN_HORIZONTAL));
+
+ // Make controls that display text handle short widths more
+ // graceful.
+ Layouter::PrepareForLayouting(*mpFtBrightness);
+ Layouter::PrepareForLayouting(*mpFtContrast);
+ Layouter::PrepareForLayouting(*mpFtColorMode);
+ Layouter::PrepareForLayouting(*mpFtTrans);
}
//////////////////////////////////////////////////////////////////////////////
@@ -486,17 +536,19 @@ void GraphicPropertyPanel::NotifyItemUpd
-//////////////////////////////////////////////////////////////////////////////
-
SfxBindings* GraphicPropertyPanel::GetBindings()
{
return mpBindings;
}
-//////////////////////////////////////////////////////////////////////////////
-// namespace close
-}} // end of namespace ::svx::sidebar
-//////////////////////////////////////////////////////////////////////////////
-// eof
+
+void GraphicPropertyPanel::Resize (void)
+{
+ maLayouter.Layout();
+}
+
+
+
+}} // end of namespace ::svx::sidebar
Modified: openoffice/branches/rejuvenate01/main/svx/source/sidebar/graphic/GraphicPropertyPanel.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/svx/source/sidebar/graphic/GraphicPropertyPanel.hxx?rev=1504925&r1=1504924&r2=1504925&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/svx/source/sidebar/graphic/GraphicPropertyPanel.hxx (original)
+++ openoffice/branches/rejuvenate01/main/svx/source/sidebar/graphic/GraphicPropertyPanel.hxx Fri Jul 19 15:59:04 2013
@@ -25,6 +25,7 @@
#include <vcl/ctrl.hxx>
#include <sfx2/sidebar/SidebarPanelBase.hxx>
#include <sfx2/sidebar/ControllerItem.hxx>
+#include <sfx2/sidebar/GridLayouter.hxx>
#include <vcl/fixed.hxx>
#include <boost/scoped_ptr.hpp>
@@ -57,6 +58,8 @@ public:
SfxBindings* GetBindings();
+ virtual void Resize (void);
+
private:
//ui controls
::boost::scoped_ptr< FixedText > mpFtBrightness;
@@ -98,7 +101,8 @@ private:
cssu::Reference<css::frame::XFrame> mxFrame;
SfxBindings* mpBindings;
-
+ ::sfx2::sidebar::GridLayouter maLayouter;
+
DECL_LINK( ModifyBrightnessHdl, void * );
DECL_LINK( ModifyContrastHdl, void * );
DECL_LINK( ModifyTransHdl, void * );
Modified: openoffice/branches/rejuvenate01/main/svx/source/sidebar/line/LinePropertyPanel.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/svx/source/sidebar/line/LinePropertyPanel.cxx?rev=1504925&r1=1504924&r2=1504925&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/svx/source/sidebar/line/LinePropertyPanel.cxx (original)
+++ openoffice/branches/rejuvenate01/main/svx/source/sidebar/line/LinePropertyPanel.cxx Fri Jul 19 15:59:04 2013
@@ -22,6 +22,7 @@
#include <sfx2/sidebar/ResourceDefinitions.hrc>
#include <sfx2/sidebar/Theme.hxx>
#include <sfx2/sidebar/ControlFactory.hxx>
+#include <sfx2/sidebar/Layouter.hxx>
#include <LinePropertyPanel.hxx>
#include <LinePropertyPanel.hrc>
#include <svx/dialogs.hrc>
@@ -59,8 +60,10 @@
using namespace css;
using namespace cssu;
+using ::sfx2::sidebar::Layouter;
using ::sfx2::sidebar::Theme;
+
#define A2S(pString) (::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(pString)))
namespace {
@@ -231,10 +234,58 @@ LinePropertyPanel::LinePropertyPanel(
mxFrame(rxFrame),
mpBindings(pBindings),
mbColorAvailable(true),
- mbWidthValuable(true)
+ mbWidthValuable(true),
+ maLayouter(*this)
{
Initialize();
FreeResource();
+
+ // Setup the grid layouter.
+ const sal_Int32 nMappedToolBoxWidth (Layouter::MapWidth(*this, TOOLBOX_WIDTH));
+
+ maLayouter.GetCell(0,0).SetControl(*mpFTWidth);
+ maLayouter.GetCell(1,0).SetControl(*mpTBWidthBackground).SetFixedWidth();
+
+ maLayouter.GetCell(0,2).SetControl(*mpFTColor);
+ maLayouter.GetCell(1,2).SetControl(*mpTBColorBackground).SetFixedWidth();
+
+ maLayouter.GetCell(2,0).SetControl(*mpFTStyle);
+ maLayouter.GetCell(3,0).SetControl(*mpLBStyle);
+
+ maLayouter.GetCell(2,2).SetControl(*mpFTTrancparency);
+ maLayouter.GetCell(3,2).SetControl(*mpMFTransparent);
+
+ maLayouter.GetCell(4,0).SetControl(*mpFTArrow).SetGridWidth(3);
+ maLayouter.GetCell(5,0).SetControl(*mpLBStart);
+ maLayouter.GetCell(5,2).SetControl(*mpLBEnd);
+
+ maLayouter.GetCell(6,0).SetControl(*mpFTEdgeStyle);
+ maLayouter.GetCell(7,0).SetControl(*mpLBEdgeStyle);
+
+ maLayouter.GetCell(6,2).SetControl(*mpFTCapStyle);
+ maLayouter.GetCell(7,2).SetControl(*mpLBCapStyle);
+
+ maLayouter.GetColumn(0)
+ .SetWeight(1)
+ .SetLeftPadding(Layouter::MapWidth(*this,SECTIONPAGE_MARGIN_HORIZONTAL))
+ .SetMinimumWidth(nMappedToolBoxWidth);
+ maLayouter.GetColumn(1)
+ .SetWeight(0)
+ .SetMinimumWidth(Layouter::MapWidth(*this, CONTROL_SPACING_HORIZONTAL));
+ maLayouter.GetColumn(2)
+ .SetWeight(1)
+ .SetRightPadding(Layouter::MapWidth(*this,SECTIONPAGE_MARGIN_HORIZONTAL))
+ .SetMinimumWidth(nMappedToolBoxWidth);
+
+ // Make controls that display text handle short widths more
+ // graceful.
+ Layouter::PrepareForLayouting(*mpFTWidth);
+ Layouter::PrepareForLayouting(*mpFTColor);
+ Layouter::PrepareForLayouting(*mpFTStyle);
+ Layouter::PrepareForLayouting(*mpFTTrancparency);
+ Layouter::PrepareForLayouting(*mpFTArrow);
+ Layouter::PrepareForLayouting(*mpFTEdgeStyle);
+ Layouter::PrepareForLayouting(*mpFTCapStyle);
}
@@ -618,10 +669,12 @@ void LinePropertyPanel::NotifyItemUpdate
if(bDisabled)
{
mpLBEdgeStyle->Disable();
+ mpFTEdgeStyle->Disable();
}
else
{
mpLBEdgeStyle->Enable();
+ mpFTEdgeStyle->Enable();
}
if(eState >= SFX_ITEM_DEFAULT)
@@ -676,10 +729,12 @@ void LinePropertyPanel::NotifyItemUpdate
if(bDisabled)
{
mpLBCapStyle->Disable();
+ mpFTCapStyle->Disable();
}
else
{
mpLBCapStyle->Enable();
+ mpLBCapStyle->Enable();
}
if(eState >= SFX_ITEM_DEFAULT)
@@ -978,6 +1033,14 @@ void LinePropertyPanel::EndLineWidthPopu
+void LinePropertyPanel::Resize (void)
+{
+ maLayouter.Layout();
+}
+
+
+
+
void LinePropertyPanel::SetWidthIcon(int n)
{
if(n==0)
@@ -1093,6 +1156,7 @@ void LinePropertyPanel::SelectLineStyle(
if( !mpStyleItem.get() || !mpDashItem.get() )
{
mpLBStyle->SetNoSelection();
+ mpLBStyle->Disable();
return;
}
@@ -1138,6 +1202,7 @@ void LinePropertyPanel::SelectEndStyle(b
if( !mpStartItem.get() )
{
mpLBStart->SetNoSelection();
+ mpLBStart->Disable();
return;
}
@@ -1166,6 +1231,7 @@ void LinePropertyPanel::SelectEndStyle(b
if( !mpEndItem.get() )
{
mpLBEnd->SetNoSelection();
+ mpLBEnd->Disable();
return;
}
Modified: openoffice/branches/rejuvenate01/main/svx/source/sidebar/line/LinePropertyPanel.hrc
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/svx/source/sidebar/line/LinePropertyPanel.hrc?rev=1504925&r1=1504924&r2=1504925&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/svx/source/sidebar/line/LinePropertyPanel.hrc (original)
+++ openoffice/branches/rejuvenate01/main/svx/source/sidebar/line/LinePropertyPanel.hrc Fri Jul 19 15:59:04 2013
@@ -25,6 +25,10 @@
#define CUSTOM_W 74
#define CUSTOM_H POPUPPANEL_MARGIN_LARGE * 2 + TEXT_HEIGHT + 12 + TEXT_CONTROL_SPACING_VERTICAL
+#define TOOLBOX_WIDTH 50
+#define TOOLBOX_HEIGHT 14
+#define LISTBOX_HEIGHT 99
+
#define FT_COLOR 1
#define TB_COLOR 2
#define FT_WIDTH 3
Modified: openoffice/branches/rejuvenate01/main/svx/source/sidebar/line/LinePropertyPanel.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/svx/source/sidebar/line/LinePropertyPanel.hxx?rev=1504925&r1=1504924&r2=1504925&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/svx/source/sidebar/line/LinePropertyPanel.hxx (original)
+++ openoffice/branches/rejuvenate01/main/svx/source/sidebar/line/LinePropertyPanel.hxx Fri Jul 19 15:59:04 2013
@@ -26,6 +26,7 @@
#include <vcl/ctrl.hxx>
#include <sfx2/sidebar/SidebarPanelBase.hxx>
#include <sfx2/sidebar/ControllerItem.hxx>
+#include <sfx2/sidebar/GridLayouter.hxx>
#include <vcl/fixed.hxx>
#include <vcl/field.hxx>
#include <boost/scoped_ptr.hpp>
@@ -92,6 +93,8 @@ public:
void EndLineWidthPopupMode (void);
+ virtual void Resize (void);
+
private:
//ui controls
::boost::scoped_ptr< FixedText > mpFTWidth;
@@ -156,6 +159,8 @@ private:
bool mbColorAvailable : 1;
bool mbWidthValuable : 1;
+ ::sfx2::sidebar::GridLayouter maLayouter;
+
void SetupIcons(void);
void Initialize();
void FillLineEndList();
Modified: openoffice/branches/rejuvenate01/main/svx/source/sidebar/line/LinePropertyPanel.src
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/svx/source/sidebar/line/LinePropertyPanel.src?rev=1504925&r1=1504924&r2=1504925&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/svx/source/sidebar/line/LinePropertyPanel.src (original)
+++ openoffice/branches/rejuvenate01/main/svx/source/sidebar/line/LinePropertyPanel.src Fri Jul 19 15:59:04 2013
@@ -24,10 +24,6 @@
#include <svx/dialogs.hrc>
#include "helpid.hrc"
-#define TOOLBOX_WIDTH 50
-#define TOOLBOX_HEIGHT 14
-#define LISTBOX_HEIGHT 99
-
Control RID_SIDEBAR_LINE_PANEL
{
OutputSize = TRUE;
Modified: openoffice/branches/rejuvenate01/main/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/rejuvenate01/main/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx?rev=1504925&r1=1504924&r2=1504925&view=diff
==============================================================================
--- openoffice/branches/rejuvenate01/main/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx (original)
+++ openoffice/branches/rejuvenate01/main/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx Fri Jul 19 15:59:04 2013
@@ -54,39 +54,39 @@ namespace svx { namespace sidebar {
ParaLineSpacingControl::ParaLineSpacingControl(Window* pParent, svx::sidebar::ParaPropertyPanel& rPanel)
-: PopupControl( pParent,SVX_RES(RID_POPUPPANEL_PARAPAGE_LINESPACING))
-, mrParaPropertyPanel(rPanel)
-, mpBindings(NULL)
-,aLineDist ( this, SVX_RES( LB_LINE_SPACING )),
-aLineDistAtPercentBox ( this, SVX_RES( ED_SBINDE_LINEDISTPERCENT ) ),
-aLineDistAtMetricBox ( this, SVX_RES( ED_SBINDE_LINEDISTPOINT ) ),
-maCustomFT ( this, SVX_RES( FT_CUSTOM ) ),
-maLSpacingFT ( this, SVX_RES( FT_LINE_SPACING ) ),
-maOfFT ( this, SVX_RES( FT_OF ) ),
-maSpacing1 (SVX_RES(IMG_SPACING1)),
-maSpacing115 (SVX_RES(IMG_SPACING115)),
-maSpacing15 (SVX_RES(IMG_SPACING15)),
-maSpacing2 (SVX_RES(IMG_SPACING2)),
-maSelSpacing1 (SVX_RES(IMG_SEL_SPACING1)),
-maSelSpacing115 (SVX_RES(IMG_SEL_SPACING115)),
-maSelSpacing15 (SVX_RES(IMG_SEL_SPACING15)),
-maSelSpacing2 (SVX_RES(IMG_SEL_SPACING2)),
-maImgCusGrey (SVX_RES(IMG_CUSTOM_GRAY)),
-maImgCus (SVX_RES(IMG_CUSTOM)),
-maStrCus (SVX_RES(STR_LCVALUE)),
-pActLineDistFld ( &aLineDistAtPercentBox ),
-nMinFixDist ( BEGIN_VALUE ),
-maValue ( 0 ),
-maPos ( 0 ),
-maLineSpacing (ValueSetWithTextControl::IMAGE_TEXT,this, SVX_RES( LINE_SPACING ) ),
-mpImg (NULL),
-mpImgSel (NULL),
-mpStr (NULL),
-mpStrTip (NULL),
-maLine (SVX_RES(STR_LSPACING)),
-maOf (SVX_RES(STR_LS_OF))
-, mbUseLineSPCustom (0)
-, mbLineSPDisable (0)
+: PopupControl( pParent,SVX_RES(RID_POPUPPANEL_PARAPAGE_LINESPACING)),
+ mbUseLineSPCustom (0),
+ mbLineSPDisable (0),
+ mrParaPropertyPanel (rPanel),
+ mpBindings (NULL),
+ nMinFixDist (BEGIN_VALUE),
+ pActLineDistFld (&aLineDistAtPercentBox),
+ maLineSpacing (ValueSetWithTextControl::IMAGE_TEXT,this, SVX_RES(LINE_SPACING)),
+ maCustomFT (this, SVX_RES(FT_CUSTOM)),
+ maLSpacingFT (this, SVX_RES(FT_LINE_SPACING)),
+ aLineDist (this, SVX_RES(LB_LINE_SPACING)),
+ maOfFT (this, SVX_RES(FT_OF)),
+ aLineDistAtPercentBox (this, SVX_RES(ED_SBINDE_LINEDISTPERCENT)),
+ aLineDistAtMetricBox (this, SVX_RES(ED_SBINDE_LINEDISTPOINT)),
+ maSpacing1 (SVX_RES(IMG_SPACING1)),
+ maSpacing115 (SVX_RES(IMG_SPACING115)),
+ maSpacing15 (SVX_RES(IMG_SPACING15)),
+ maSpacing2 (SVX_RES(IMG_SPACING2)),
+ maSelSpacing1 (SVX_RES(IMG_SEL_SPACING1)),
+ maSelSpacing115 (SVX_RES(IMG_SEL_SPACING115)),
+ maSelSpacing15 (SVX_RES(IMG_SEL_SPACING15)),
+ maSelSpacing2 (SVX_RES(IMG_SEL_SPACING2)),
+ maImgCus (SVX_RES(IMG_CUSTOM)),
+ maImgCusGrey (SVX_RES(IMG_CUSTOM_GRAY)),
+ maStrCus (SVX_RES(STR_LCVALUE)),
+ mpImg (NULL),
+ mpImgSel (NULL),
+ mpStr (NULL),
+ mpStrTip (NULL),
+ maLine (SVX_RES(STR_LSPACING)),
+ maOf (SVX_RES(STR_LS_OF)),
+ maValue (0),
+ maPos (0)
{
initial();
FreeResource();