Kaydet (Commit) 67608078 authored tarafından Armin Le Grand's avatar Armin Le Grand Kaydeden (comit) Caolán McNamara

Resolves: #i121463# Enhanced handle visualization..

and some fixes in that region

(cherry picked from commit 2ece2411)

Conflicts:
	default_images/svx/res/cropmarkers.png
	default_images/svx/res/cropmarkers2.png
	default_images/svx/res/cropmarkersACC.png
	default_images/svx/res/markers.png
	default_images/svx/res/markers2.png
	default_images/svx/res/markersACC.png
	officecfg/registry/schema/org/openoffice/Office/Calc.xcs
	officecfg/registry/schema/org/openoffice/Office/Draw.xcs
	officecfg/registry/schema/org/openoffice/Office/Impress.xcs
	officecfg/registry/schema/org/openoffice/Office/Writer.xcs
	officecfg/registry/schema/org/openoffice/Office/WriterWeb.xcs
	sc/source/core/tool/viewopti.cxx
	sd/source/ui/app/optsitem.cxx
	svx/inc/svx/svdhdl.hxx
	svx/source/svdraw/svdhdl.cxx
	svx/source/svdraw/svdstr.src
	sw/source/ui/config/viewopt.cxx
	sw/source/ui/docvw/edtwin.cxx

Change-Id: I4094c2ca18a3c29e8e24a15ddeb040808ce4605d
üst de435e74
......@@ -133,6 +133,9 @@ DrawViewWrapper::DrawViewWrapper( SdrModel* pSdrModel, OutputDevice* pOut, bool
pOutlinerPool->SetPoolDefaultItem( SvxFontHeightItem( 423, 100, EE_CHAR_FONTHEIGHT ) ); // 12pt
}
// #i121463# Use big handles by default
SetMarkHdlSizePixel(9);
ReInit();
}
......
......@@ -128,7 +128,9 @@ enum BitmapMarkerKind
AnchorPressedTR,
// for SJ and the CustomShapeHandles:
Customshape1
Customshape_7x7,
Customshape_9x9,
Customshape_11x11
};
////////////////////////////////////////////////////////////////////////////////////////////////////
......
......@@ -320,7 +320,7 @@
<!-- OldLocation: Soffice.cfg -->
<!-- UIHints: Tools - Options -Spreadsheets - Layout - [Section] Lines -->
<info>
<desc>Specifies whether control points are displayed as simple squares without 3D effect.</desc>
<desc>Specifies whether control points are displayed simple or enhanced.</desc>
<label>Simple control points</label>
</info>
<value>false</value>
......@@ -333,7 +333,7 @@
<desc>Specifies whether control points are displayed as larger than the default size.</desc>
<label>Large control points</label>
</info>
<value>false</value>
<value>true</value>
</prop>
</group>
<group oor:name="Window">
......
......@@ -1233,20 +1233,20 @@
<!-- OldLocation: Soffice.cfg -->
<!-- UIHints: Tools - Options - Text document - Layout - [Section] Lines -->
<info>
<desc>Displays the control points as simple squares without a 3D effect.</desc>
<desc>Specifies whether control points are displayed simple or enhanced.</desc>
<label>Simple control points</label>
</info>
<value>false</value>
<value>true</value>
</prop>
<prop oor:name="LargeControlPoint" oor:type="xs:boolean">
<!-- OldPath: Writer/Layout/Lines -->
<!-- OldLocation: Soffice.cfg -->
<!-- UIHints: Tools - Options - Text document - Layout - [Section] Lines -->
<info>
<desc>Displays larger control points.</desc>
<desc>Specifies whether control points are displayed as larger than the default size.</desc>
<label>Large control points</label>
</info>
<value>false</value>
<value>true</value>
</prop>
</group>
<group oor:name="Window">
......
......@@ -192,20 +192,20 @@
<!-- OldLocation: Soffice.cfg -->
<!-- UIHints: Tools - Option - HTML-Document - Layout - [Section] Lines -->
<info>
<desc>Displays the control points as simple squares without a 3D effect.</desc>
<desc>Specifies whether control points are displayed simple or enhanced.</desc>
<label>Simple control points</label>
</info>
<value>false</value>
<value>true</value>
</prop>
<prop oor:name="LargeControlPoint" oor:type="xs:boolean">
<!-- OldPath: HTML_Editor/Layout/Lines -->
<!-- OldLocation: Soffice.cfg -->
<!-- UIHints: Tools - Option - HTML-Document - Layout - [Section] Lines -->
<info>
<desc>Displays larger control points.</desc>
<desc>Specifies whether control points are displayed as larger than the default size.</desc>
<label>Large control points</label>
</info>
<value>false</value>
<value>true</value>
</prop>
</group>
<group oor:name="Window">
......
......@@ -175,17 +175,19 @@ const BitmapEx& SdrHdlBitmapSet::GetBitmapEx(BitmapMarkerKind eKindOfMarker, sal
}
case Circ_7x7:
case Customshape_7x7:
{
return impGetOrCreateTargetBitmap((4 * INDEX_COUNT) + nInd, Rectangle(Point(27, nYPos), Size(7, 7)));
}
case Circ_9x9:
case Customshape1:
case Customshape_9x9:
{
return impGetOrCreateTargetBitmap((5 * INDEX_COUNT) + nInd, Rectangle(Point(34, nYPos), Size(9, 9)));
}
case Circ_11x11:
case Customshape_11x11:
{
return impGetOrCreateTargetBitmap((6 * INDEX_COUNT) + nInd, Rectangle(Point(43, nYPos), Size(11, 11)));
}
......@@ -523,7 +525,7 @@ void SdrHdl::CreateB2dIAObject()
// for SJ and the CustomShapeHandles:
case HDL_CUSTOMSHAPE1:
{
eKindOfMarker = Customshape1;
eKindOfMarker = (b1PixMore) ? Customshape_7x7 : Customshape_9x9;
eColIndex = Yellow;
break;
}
......@@ -597,6 +599,10 @@ BitmapMarkerKind SdrHdl::GetNextBigger(BitmapMarkerKind eKnd) const
case Circ_7x7: eRetval = Circ_9x9; break;
case Circ_9x9: eRetval = Circ_11x11; break;
case Customshape_7x7: eRetval = Customshape_9x9; break;
case Customshape_9x9: eRetval = Customshape_11x11; break;
//case Customshape_11x11: eRetval = ; break;
case Elli_7x9: eRetval = Elli_9x11; break;
case Elli_9x7: eRetval = Elli_11x9; break;
......@@ -633,7 +639,27 @@ BitmapEx SdrHdl::ImpGetBitmapEx( BitmapMarkerKind eKindOfMarker, sal_uInt16 nInd
if(pHdlList->GetHdlSize() > 3)
{
bForceBiggerSize = true;
switch(eKindOfMarker)
{
case Anchor:
case AnchorPressed:
case AnchorTR:
case AnchorPressedTR:
{
// #i121463# For anchor, do not simply make bigger because of HdlSize,
// do it dependent of IsSelected() which Writer can set in drag mode
if(IsSelected())
{
bForceBiggerSize = true;
}
break;
}
default:
{
bForceBiggerSize = true;
break;
}
}
}
if(bForceBiggerSize)
......
......@@ -171,14 +171,25 @@ SwViewOption::SwViewOption() :
{
// Initialisation is a little simpler now
// all Bits to 0
nCoreOptions = VIEWOPT_1_HARDBLANK | VIEWOPT_1_SOFTHYPH |
VIEWOPT_1_REF |
VIEWOPT_1_GRAPHIC |
VIEWOPT_1_TABLE | VIEWOPT_1_DRAW | VIEWOPT_1_CONTROL |
VIEWOPT_1_PAGEBACK |
VIEWOPT_1_POSTITS;
nCore2Options = VIEWOPT_CORE2_BLACKFONT | VIEWOPT_CORE2_HIDDENPARA;
nUIOptions = VIEWOPT_2_MODIFIED | VIEWOPT_2_GRFKEEPZOOM |VIEWOPT_2_ANY_RULER;
nCoreOptions =
VIEWOPT_1_HARDBLANK |
VIEWOPT_1_SOFTHYPH |
VIEWOPT_1_REF |
VIEWOPT_1_GRAPHIC |
VIEWOPT_1_TABLE |
VIEWOPT_1_DRAW |
VIEWOPT_1_CONTROL |
VIEWOPT_1_PAGEBACK |
VIEWOPT_1_POSTITS;
nCore2Options =
VIEWOPT_CORE2_BLACKFONT |
VIEWOPT_CORE2_HIDDENPARA;
nUIOptions =
VIEWOPT_2_MODIFIED |
VIEWOPT_2_GRFKEEPZOOM |
VIEWOPT_2_ANY_RULER;
if(MEASURE_METRIC != SvtSysLocale().GetLocaleData().getMeasurementSystemEnum())
aSnapSize.Width() = aSnapSize.Height() = 720; // 1/2"
......
......@@ -206,6 +206,7 @@ public:
void SetPos( const Point& rNew ) { pHdl->SetPos( rNew ); }
const Point& GetPos() { return pHdl->GetPos(); }
const Point& GetHdlPos() { return aHdlPos; }
SdrHdl* GetHdl() const { return pHdl; }
void ChgHdl( SdrHdl* pNew )
{
pHdl = pNew;
......@@ -2981,6 +2982,8 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
( pHdl->GetKind() == HDL_ANCHOR ||
pHdl->GetKind() == HDL_ANCHOR_TR ) )
{
// #i121463# Set selected during drag
pHdl->SetSelected(true);
m_pAnchorMarker = new SwAnchorMarker( pHdl );
UpdatePointer( aDocPos, rMEvt.GetModifier() );
return;
......@@ -4165,6 +4168,12 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
if( m_pAnchorMarker )
{
if(m_pAnchorMarker->GetHdl())
{
// #i121463# delete selected after drag
m_pAnchorMarker->GetHdl()->SetSelected(false);
}
Point aPnt( m_pAnchorMarker->GetLastPos() );
DELETEZ( m_pAnchorMarker );
if( aPnt.X() || aPnt.Y() )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment