This is an automated email from the ASF dual-hosted git repository.
mseidel pushed a commit to branch AOO41X
in repository https://gitbox.apache.org/repos/asf/openoffice.git
The following commit(s) were added to refs/heads/AOO41X by this push:
new 7658c3995f Fix typos (backbround, backgroud), cleanup
7658c3995f is described below
commit 7658c3995f9aa968b8e8009cb10ccebf8945d7c0
Author: mseidel <[email protected]>
AuthorDate: Thu Feb 13 19:19:18 2025 +0100
Fix typos (backbround, backgroud), cleanup
(cherry picked from commit 119ad366f73ace8570aa3efa6989a1ac3bf86a57)
---
.../source/layoutmanager/toolbarlayoutmanager.hxx | 48 ++---
.../sidebar/tools/ValueSetWithTextControl.cxx | 178 +++++++++---------
main/svx/source/tbxctrls/grafctrl.cxx | 206 ++++++++++-----------
3 files changed, 216 insertions(+), 216 deletions(-)
diff --git a/main/framework/source/layoutmanager/toolbarlayoutmanager.hxx
b/main/framework/source/layoutmanager/toolbarlayoutmanager.hxx
index b57e32d02c..84f1ece870 100644
--- a/main/framework/source/layoutmanager/toolbarlayoutmanager.hxx
+++ b/main/framework/source/layoutmanager/toolbarlayoutmanager.hxx
@@ -1,5 +1,5 @@
/**************************************************************
- *
+ *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -7,20 +7,18 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
+ *
*************************************************************/
-
-
#ifndef __FRAMEWORK_LAYOUTMANAGER_TOOLBARLAYOUTMANAGER_HXX_
#define __FRAMEWORK_LAYOUTMANAGER_TOOLBARLAYOUTMANAGER_HXX_
@@ -96,15 +94,15 @@ class ToolbarLayoutManager : public
::cppu::WeakImplHelper3< ::com::sun::star::a
const ::com::sun::star::uno::Reference<
::com::sun::star::ui::XUIConfigurationManager >& xModuleCfgMgr,
const ::com::sun::star::uno::Reference<
::com::sun::star::ui::XUIConfigurationManager >& xDocCfgMgr,
const ::com::sun::star::uno::Reference<
::com::sun::star::container::XNameAccess >& xPersistentWindowState );
-
+
void setParentWindow( const ::com::sun::star::uno::Reference<
::com::sun::star::awt::XWindowPeer >& xParentWindow );
void setDockingAreaOffsets( const ::Rectangle aOffsets );
void resetDockingArea();
-
+
::com::sun::star::awt::Rectangle getDockingArea();
void setDockingArea( const ::com::sun::star::awt::Rectangle&
rDockingArea );
-
+
// layouting
bool isLayoutDirty();
void doLayout(const ::Size& aContainerSize);
@@ -112,7 +110,7 @@ class ToolbarLayoutManager : public
::cppu::WeakImplHelper3< ::com::sun::star::a
// creation/destruction
void createStaticToolbars();
void destroyToolbars();
-
+
bool requestToolbar( const ::rtl::OUString& rResourceURL );
bool createToolbar( const ::rtl::OUString& rResourceURL );
bool destroyToolbar( const ::rtl::OUString& rResourceURL );
@@ -129,10 +127,10 @@ class ToolbarLayoutManager : public
::cppu::WeakImplHelper3< ::com::sun::star::a
// docking and further functions
bool dockToolbar( const ::rtl::OUString& rResourceURL,
::com::sun::star::ui::DockingArea eDockingArea, const
::com::sun::star::awt::Point& aPos );
bool dockAllToolbars();
- bool floatToolbar( const ::rtl::OUString& rResoureURL );
+ bool floatToolbar( const ::rtl::OUString& rResourceURL );
bool lockToolbar( const ::rtl::OUString& rResourceURL );
bool unlockToolbar( const ::rtl::OUString& rResourceURL );
- void setToolbarPos( const ::rtl::OUString& rResourceURL, const
::com::sun::star::awt::Point& aPos );
+ void setToolbarPos( const ::rtl::OUString& rResourceURL, const
::com::sun::star::awt::Point& aPos );
void setToolbarSize( const ::rtl::OUString& rResourceURL, const
::com::sun::star::awt::Size& aSize );
void setToolbarPosSize( const ::rtl::OUString& rResourceURL, const
::com::sun::star::awt::Point& aPos, const ::com::sun::star::awt::Size& aSize );
bool isToolbarVisible( const ::rtl::OUString& rResourceURL );
@@ -153,12 +151,12 @@ class ToolbarLayoutManager : public
::cppu::WeakImplHelper3< ::com::sun::star::a
virtual void SAL_CALL acquire() throw();
virtual void SAL_CALL release() throw();
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const
::com::sun::star::uno::Type & rType ) throw(
::com::sun::star::uno::RuntimeException );
-
+
//---------------------------------------------------------------------------------------------------------
// XEventListener
//---------------------------------------------------------------------------------------------------------
virtual void SAL_CALL disposing( const css::lang::EventObject& aEvent
) throw( css::uno::RuntimeException );
-
+
//---------------------------------------------------------------------------------------------------------
// XWindowListener
//---------------------------------------------------------------------------------------------------------
@@ -174,7 +172,7 @@ class ToolbarLayoutManager : public
::cppu::WeakImplHelper3< ::com::sun::star::a
virtual ::com::sun::star::awt::DockingData SAL_CALL docking( const
::com::sun::star::awt::DockingEvent& e ) throw
(::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL endDocking( const
::com::sun::star::awt::EndDockingEvent& e ) throw
(::com::sun::star::uno::RuntimeException);
virtual sal_Bool SAL_CALL prepareToggleFloatingMode( const
::com::sun::star::lang::EventObject& e ) throw
(::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL toggleFloatingMode( const
::com::sun::star::lang::EventObject& e ) throw
(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL toggleFloatingMode( const
::com::sun::star::lang::EventObject& e ) throw
(::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL closed( const
::com::sun::star::lang::EventObject& e ) throw
(::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL endPopupMode( const
::com::sun::star::awt::EndPopupModeEvent& e ) throw
(::com::sun::star::uno::RuntimeException);
@@ -183,7 +181,7 @@ class ToolbarLayoutManager : public
::cppu::WeakImplHelper3< ::com::sun::star::a
//---------------------------------------------------------------------------------------------------------
virtual void SAL_CALL elementInserted( const
::com::sun::star::ui::ConfigurationEvent& Event ) throw
(::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL elementRemoved( const
::com::sun::star::ui::ConfigurationEvent& Event ) throw
(::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL elementReplaced( const
::com::sun::star::ui::ConfigurationEvent& Event ) throw
(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL elementReplaced( const
::com::sun::star::ui::ConfigurationEvent& Event ) throw
(::com::sun::star::uno::RuntimeException);
private:
enum DockingOperation
@@ -192,7 +190,7 @@ class ToolbarLayoutManager : public
::cppu::WeakImplHelper3< ::com::sun::star::a
DOCKOP_ON_COLROW,
DOCKOP_AFTER_COLROW
};
-
+
typedef std::vector< UIElement > UIElementVector;
struct SingleRowColumnWindowData
{
@@ -254,12 +252,12 @@ class ToolbarLayoutManager : public
::cppu::WeakImplHelper3< ::com::sun::star::a
void implts_calcDockingPosSize( UIElement& aUIElement,
DockingOperation& eDockOperation, ::Rectangle& rTrackingRect, const Point&
rMousePos );
DockingOperation implts_determineDockingOperation(
::com::sun::star::ui::DockingArea DockingArea, const ::Rectangle& rRowColRect,
const Point& rMousePos );
::Rectangle implts_getWindowRectFromRowColumn(
::com::sun::star::ui::DockingArea DockingArea, const SingleRowColumnWindowData&
rRowColumnWindowData, const ::Point& rMousePos, const rtl::OUString&
rExcludeElementName );
- ::Rectangle implts_determineFrontDockingRect(
::com::sun::star::ui::DockingArea eDockingArea,
- sal_Int32 nRowCol,
+ ::Rectangle implts_determineFrontDockingRect(
::com::sun::star::ui::DockingArea eDockingArea,
+ sal_Int32 nRowCol,
const ::Rectangle&
rDockedElementRect,
const
::rtl::OUString& rMovedElementName,
const ::Rectangle&
rMovedElementRect );
- ::Rectangle implts_calcTrackingAndElementRect(
::com::sun::star::ui::DockingArea eDockingArea,
+ ::Rectangle implts_calcTrackingAndElementRect(
::com::sun::star::ui::DockingArea eDockingArea,
sal_Int32 nRowCol,
UIElement&
rUIElement,
const ::Rectangle&
rTrackingRect,
@@ -304,17 +302,17 @@ class ToolbarLayoutManager : public
::cppu::WeakImplHelper3< ::com::sun::star::a
css::uno::Reference< ::com::sun::star::awt::XToolkit >
m_xToolkit;
css::uno::Reference< ::com::sun::star::container::XNameAccess >
m_xPersistentWindowState;
ILayoutNotifications*
m_pParentLayouter;
-
+
UIElementVector
m_aUIElements;
UIElement
m_aDockUIElement;
Point
m_aStartDockMousePos;
Rectangle
m_aDockingArea;
Rectangle
m_aDockingAreaOffsets;
DockingOperation
m_eDockOperation;
-
+
AddonsOptions*
m_pAddonOptions;
GlobalSettings*
m_pGlobalSettings;
-
+
bool
m_bComponentAttached;
bool
m_bMustLayout;
bool
m_bLayoutDirty;
@@ -324,7 +322,7 @@ class ToolbarLayoutManager : public
::cppu::WeakImplHelper3< ::com::sun::star::a
bool
m_bVisible;
bool
m_bLayoutInProgress;
bool
m_bToolbarCreation;
-
+
::rtl::OUString
m_aFullAddonTbxPrefix;
::rtl::OUString
m_aCustomTbxPrefix;
::rtl::OUString
m_aCustomizeCmd;
@@ -335,3 +333,5 @@ class ToolbarLayoutManager : public
::cppu::WeakImplHelper3< ::com::sun::star::a
} // namespace framework
#endif // __FRAMEWORK_LAYOUTMANAGER_TOOLBARLAYOUTMANAGER_HXX_
+
+/* vim: set noet sw=4 ts=4: */
diff --git a/main/svx/source/sidebar/tools/ValueSetWithTextControl.cxx
b/main/svx/source/sidebar/tools/ValueSetWithTextControl.cxx
index fa4474bf95..5849d1e7ff 100644
--- a/main/svx/source/sidebar/tools/ValueSetWithTextControl.cxx
+++ b/main/svx/source/sidebar/tools/ValueSetWithTextControl.cxx
@@ -1,5 +1,5 @@
/**************************************************************
- *
+ *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -7,16 +7,16 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
+ *
*************************************************************/
#include "svx/sidebar/ValueSetWithTextControl.hxx"
@@ -65,7 +65,7 @@ static Font& lcl_GetDefaultBulletFont()
String(), Size(
0, 14 ) );
if(!bInit)
{
- aDefBulletFont.SetCharSet( RTL_TEXTENCODING_SYMBOL );
+ aDefBulletFont.SetCharSet( RTL_TEXTENCODING_SYMBOL );
aDefBulletFont.SetFamily( FAMILY_DONTKNOW );
aDefBulletFont.SetPitch( PITCH_DONTKNOW );
aDefBulletFont.SetWeight( WEIGHT_DONTKNOW );
@@ -76,32 +76,30 @@ static Font& lcl_GetDefaultBulletFont()
}
ValueSetWithTextControl::ValueSetWithTextControl(
- const tControlType eControlType,
- Window* pParent,
- const ResId& rResId)
- : ValueSet( pParent, rResId )
- , meControlType( eControlType )
- , maItems()
+ const tControlType eControlType,
+ Window* pParent,
+ const ResId& rResId)
+ : ValueSet( pParent, rResId )
+ , meControlType( eControlType )
+ , maItems()
{
- SetColCount( 1 );
+ SetColCount( 1 );
}
-
ValueSetWithTextControl::~ValueSetWithTextControl(void)
{
}
-
void ValueSetWithTextControl::AddItem(
- const Image& rItemImage,
- const Image* pSelectedItemImage,
- const XubString& rItemText,
- const XubString* pItemHelpText )
+ const Image& rItemImage,
+ const Image* pSelectedItemImage,
+ const XubString& rItemText,
+ const XubString* pItemHelpText )
{
- if ( meControlType != IMAGE_TEXT )
- {
- return;
- }
+ if ( meControlType != IMAGE_TEXT )
+ {
+ return;
+ }
ValueSetWithTextItem aItem;
aItem.maItemImage = rItemImage;
@@ -162,7 +160,7 @@ void ValueSetWithTextControl::ReplaceItemImages(
: rItemImage;
}
-
+
void ValueSetWithTextControl::UserDraw( const UserDrawEvent& rUDEvt )
{
const Rectangle aRect = rUDEvt.GetRect();
@@ -181,7 +179,7 @@ void ValueSetWithTextControl::UserDraw( const
UserDrawEvent& rUDEvt )
}
{
- //draw backgroud
+ // draw background
if ( GetSelectItemId() == nItemId )
{
Rectangle aBackRect = aRect;
@@ -196,7 +194,7 @@ void ValueSetWithTextControl::UserDraw( const
UserDrawEvent& rUDEvt )
pDev->DrawRect(aRect);
}
- //draw image + text resp. text + text
+ // draw image + text resp. text + text
Image* pImage = 0;
if ( GetSelectItemId() == nItemId )
{
@@ -239,21 +237,21 @@ void ValueSetWithTextControl::UserDraw( const
UserDrawEvent& rUDEvt )
pDev->DrawText(aStrRect, maItems[nItemId-1].maItemText2,
TEXT_DRAW_ENDELLIPSIS);
}
break;
- }
- }
+ }
+ }
- Invalidate( aRect );
- pDev->Pop();
+ Invalidate( aRect );
+ pDev->Pop();
}
SvxNumValueSet2::SvxNumValueSet2( Window* pParent, const ResId& rResId) :
ValueSet( pParent, rResId ),
- aLineColor ( COL_LIGHTGRAY ),
- pVDev ( NULL )
+ aLineColor ( COL_LIGHTGRAY ),
+ pVDev ( NULL )
{
SetColCount( 3 );
- SetLineCount( 3 );
- SetStyle( GetStyle() | WB_ITEMBORDER );
+ SetLineCount( 3 );
+ SetStyle( GetStyle() | WB_ITEMBORDER );
}
SvxNumValueSet2::~SvxNumValueSet2()
@@ -269,8 +267,8 @@ void SvxNumValueSet2::SetNumberingSettings(
aNumSettings = aNum;
xFormatter = xFormat;
aLocale = rLocale;
- if(aNum.getLength() > 9)
- SetStyle( GetStyle()|WB_VSCROLL);
+ if(aNum.getLength() > 9)
+ SetStyle( GetStyle()|WB_VSCROLL);
InsertItem( DEFAULT_NONE, DEFAULT_NONE - 1 );
SetItemText( DEFAULT_NONE, SVX_RESSTR( RID_SVXSTR_NUMBULLET_NONE ));
@@ -278,8 +276,8 @@ void SvxNumValueSet2::SetNumberingSettings(
{
InsertItem( i + 1);
if( i < 8 )
- {
- NBOTypeMgrBase* pNumbering =
NBOutlineTypeMgrFact::CreateInstance(eNBOType::NUMBERING);
+ {
+ NBOTypeMgrBase* pNumbering =
NBOutlineTypeMgrFact::CreateInstance(eNBOType::NUMBERING);
if ( pNumbering )
{
SetItemText( i + 1,
pNumbering->GetDescription(i));
@@ -290,11 +288,11 @@ void SvxNumValueSet2::SetNumberingSettings(
void SvxNumValueSet2::UserDraw( const UserDrawEvent& rUDEvt )
{
- const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
- const Color aBackColor = rStyleSettings.GetFieldColor();
- const Color aTextColor = rStyleSettings.GetFieldTextColor();
+ const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
+ const Color aBackColor = rStyleSettings.GetFieldColor();
+ const Color aTextColor = rStyleSettings.GetFieldTextColor();
- OutputDevice* pDev = rUDEvt.GetDevice();
+ OutputDevice* pDev = rUDEvt.GetDevice();
Rectangle aRect = rUDEvt.GetRect();
sal_uInt32 nItemId = rUDEvt.GetItemId();
long nRectWidth = aRect.GetWidth();
@@ -303,11 +301,11 @@ void SvxNumValueSet2::UserDraw( const UserDrawEvent&
rUDEvt )
Point aBLPos = aRect.TopLeft();
Font aOldFont = pDev->GetFont();
Color aOldColor = pDev->GetLineColor();
- pDev->SetLineColor(aBackColor);
- Font aFont(OutputDevice::GetDefaultFont(
+ pDev->SetLineColor(aBackColor);
+ Font aFont(OutputDevice::GetDefaultFont(
DEFAULTFONT_UI_SANS, MsLangId::getSystemLanguage(),
DEFAULTFONT_FLAGS_ONLYONE));
- Size aSize = aFont.GetSize();
+ Size aSize = aFont.GetSize();
aSize.Height() = nRectHeight/5;
aFont.SetColor(aTextColor);
aFont.SetFillColor(aBackColor);
@@ -323,13 +321,13 @@ void SvxNumValueSet2::UserDraw( const UserDrawEvent&
rUDEvt )
pVDev->EnableRTL( IsRTLEnabled() );
pVDev->SetOutputSize( aRectSize );
aOrgRect = aRect;
-
+
pVDev->SetLineColor( aBackColor );
pVDev->SetFillColor( aBackColor );
- pVDev->DrawRect(aOrgRect);
+ pVDev->DrawRect(aOrgRect);
- if(aBackColor == aLineColor)
- aLineColor.Invert();
+ if(aBackColor == aLineColor)
+ aLineColor.Invert();
if(GetSettings().GetStyleSettings().GetHighContrastMode())
pVDev->SetLineColor(aTextColor);
else
@@ -339,44 +337,44 @@ void SvxNumValueSet2::UserDraw( const UserDrawEvent&
rUDEvt )
Point aEnd(aBLPos.X() + nRectWidth * 9 / 10,0);
for( sal_uInt32 i = 11; i < 100; i += 33)
{
- aStart.Y() = aEnd.Y() = aBLPos.Y() + nRectHeight * i /
100;
+ aStart.Y() = aEnd.Y() = aBLPos.Y() + nRectHeight * i /
100;
pVDev->DrawLine(aStart, aEnd);
- aStart.Y() = aEnd.Y() = aBLPos.Y() + nRectHeight * (i
+ 11) / 100;
+ aStart.Y() = aEnd.Y() = aBLPos.Y() + nRectHeight * (i +
11) / 100;
pVDev->DrawLine(aStart, aEnd);
- }
+ }
}
if ( nItemId != DEFAULT_NONE)
pDev->DrawOutDev( aRect.TopLeft(), aRectSize,
aOrgRect.TopLeft(),
aRectSize,
*pVDev );
const OUString sValue(C2U(cValue));
-
+
Point aStart(aBLPos.X() + nRectWidth / 9,0);
if ( nItemId == DEFAULT_NONE)
- {
+ {
String sText(SVX_RESSTR( RID_SVXSTR_NUMBULLET_NONE));
- Font aFont = pDev->GetFont();
- Size aSize = aFont.GetSize();
+ Font aFont = pDev->GetFont();
+ Size aSize = aFont.GetSize();
aSize.Height() = nRectHeight/4;
aFont.SetSize( aSize );
pDev->SetFont(aFont);
- long nTextWidth = pDev->GetTextWidth(sText);
- long nTextHeight = pDev->GetTextHeight();
+ long nTextWidth = pDev->GetTextWidth(sText);
+ long nTextHeight = pDev->GetTextHeight();
//GVT refine
while (nTextWidth>nRectWidth && aSize.Height()>4) {
aSize.Height() = aSize.Height()*0.9;
aFont.SetSize( aSize );
pDev->SetFont(aFont);
- nTextWidth = pDev->GetTextWidth(sText);
+ nTextWidth = pDev->GetTextWidth(sText);
}
Point aSStart(aBLPos.X()+(nRectWidth-nTextWidth)/2, aBLPos.Y()
+(nRectHeight-nTextHeight)/2);
- pDev->DrawText(aSStart, sText);
+ pDev->DrawText(aSStart, sText);
pDev->SetFont(aOldFont);
}
else
{
NBOTypeMgrBase* pNumbering =
NBOutlineTypeMgrFact::CreateInstance(eNBOType::NUMBERING);
- if ( pNumbering && nItemId <= DEFAULT_BULLET_TYPES )
+ if ( pNumbering && nItemId <= DEFAULT_BULLET_TYPES )
{
for( sal_uInt32 i = 0; i < 3; i++ )
{
@@ -392,7 +390,7 @@ void SvxNumValueSet2::UserDraw( const UserDrawEvent&
rUDEvt )
sText += aNumFmt.GetSuffix();
aStart.X() = aBLPos.X() + 2;
aStart.Y() -= pDev->GetTextHeight()/2;
- pDev->DrawText(aStart, sText);
+ pDev->DrawText(aStart, sText);
}
}
pDev->SetFont(aOldFont);
@@ -404,15 +402,15 @@ void SvxNumValueSet2::UserDraw( const UserDrawEvent&
rUDEvt )
//===============================================================================================
SvxNumValueSet3::SvxNumValueSet3( Window* pParent, const ResId& rResId) :
- ValueSet( pParent, rResId )
+ ValueSet( pParent, rResId )
{
SetColCount( 3 );
SetLineCount( 4 );
- SetStyle( GetStyle() | WB_ITEMBORDER );
+ SetStyle( GetStyle() | WB_ITEMBORDER );
}
SvxNumValueSet3::~SvxNumValueSet3()
-{
+{
}
void SvxNumValueSet3::UserDraw( const UserDrawEvent& rUDEvt )
@@ -420,11 +418,11 @@ void SvxNumValueSet3::UserDraw( const UserDrawEvent&
rUDEvt )
Rectangle aRect = rUDEvt.GetRect();
OutputDevice* pDev = rUDEvt.GetDevice();
sal_uInt32 nItemId = rUDEvt.GetItemId();
-
+
long nRectHeight = aRect.GetHeight();
- long nRectWidth = aRect.GetWidth();
- Point aBLPos = aRect.TopLeft();
- NBOTypeMgrBase* pBullets =
NBOutlineTypeMgrFact::CreateInstance(eNBOType::MIXBULLETS);
+ long nRectWidth = aRect.GetWidth();
+ Point aBLPos = aRect.TopLeft();
+ NBOTypeMgrBase* pBullets =
NBOutlineTypeMgrFact::CreateInstance(eNBOType::MIXBULLETS);
if ( pBullets )
{
if ( nItemId <= DEFAULT_BULLET_TYPES ) {
@@ -438,82 +436,84 @@ void SvxNumValueSet3::UserDraw( const UserDrawEvent&
rUDEvt )
sal_Unicode cChar = aFmt.GetBulletChar();
//End
const StyleSettings& rStyleSettings =
GetSettings().GetStyleSettings();
- const Color aBackColor =
rStyleSettings.GetFieldColor();
+ const Color aBackColor =
rStyleSettings.GetFieldColor();
const Color aTextColor =
rStyleSettings.GetFieldTextColor();
Font aOldFont = pDev->GetFont();
Font aFont( lcl_GetDefaultBulletFont() );
- Size aSize = aFont.GetSize();
+ Size aSize = aFont.GetSize();
aSize.Height() = nRectHeight*3/6;
aFont.SetColor(aTextColor);
aFont.SetFillColor(aBackColor);
aFont.SetSize( aSize );
pDev->SetFont(aFont);
pDev->SetFillColor( aBackColor ); //wj
-
+
String sText;
sText = cChar;
Font aOldBulletFont = pDev->GetFont();
Font aBulletFnt(aFmt.GetBulletFont() ?
*aFmt.GetBulletFont() : aOldBulletFont);
- Size aBulSize = aOldBulletFont.GetSize();
+ Size aBulSize = aOldBulletFont.GetSize();
aBulletFnt.SetSize(aBulSize);
pDev->SetFont(aBulletFnt);
- long nTextWidth = pDev->GetTextWidth(sText);
+ long nTextWidth = pDev->GetTextWidth(sText);
long nTextHeight = pDev->GetTextHeight();
Point
aStart(aBLPos.X()+(nRectWidth-nTextWidth)/2, aBLPos.Y()
+(nRectHeight-nTextHeight)/2);
- pDev->DrawText(aStart, sText);
+ pDev->DrawText(aStart, sText);
pDev->SetFont(aOldFont);
}else if ( eNumType == SVX_NUM_BITMAP )
{
- const SvxBrushItem* pBrushItem =
aFmt.GetBrush();
+ const SvxBrushItem* pBrushItem =
aFmt.GetBrush();
if(pBrushItem)
{
const Graphic* pGrf =
pBrushItem->GetGraphic();
if(pGrf)
- {
+ {
Size aSize(nRectHeight*6/20,
nRectHeight*6/20);
- Point aStart(aBLPos.X() +
nRectWidth*7/20, aBLPos.Y() + nRectHeight*7/20);
+ Point aStart(aBLPos.X() +
nRectWidth*7/20, aBLPos.Y() + nRectHeight*7/20);
pGrf->Draw( pDev, aStart, aSize
);
}
}
}
}else if ( nItemId == DEFAULT_NONE)
- {
+ {
const StyleSettings& rStyleSettings =
GetSettings().GetStyleSettings();
- const Color aBackColor =
rStyleSettings.GetFieldColor();
+ const Color aBackColor = rStyleSettings.GetFieldColor();
const Color aTextColor =
rStyleSettings.GetFieldTextColor();
- Font aOldFont = pDev->GetFont();
+ Font aOldFont = pDev->GetFont();
Font
aFont(OutputDevice::GetDefaultFont(DEFAULTFONT_UI_SANS,
MsLangId::getSystemLanguage(), DEFAULTFONT_FLAGS_ONLYONE));
- Size aSize = aFont.GetSize();
+ Size aSize = aFont.GetSize();
//aSize.Height() = nRectHeight/5;
aSize.Height() = nRectHeight/4;
aFont.SetColor(aTextColor);
aFont.SetFillColor(aBackColor);
aFont.SetSize( aSize );
pDev->SetFont(aFont);
- pDev->SetFillColor( aBackColor );
-
+ pDev->SetFillColor( aBackColor );
+
String sText(SVX_RESSTR( RID_SVXSTR_NUMBULLET_NONE));
-
- long nTextWidth = pDev->GetTextWidth(sText);
+
+ long nTextWidth = pDev->GetTextWidth(sText);
long nTextHeight = pDev->GetTextHeight();
//GVT refine
while (nTextWidth>nRectWidth && aSize.Height()>4) {
aSize.Height() = aSize.Height()*0.9;
aFont.SetSize( aSize );
pDev->SetFont(aFont);
- nTextWidth = pDev->GetTextWidth(sText);
+ nTextWidth = pDev->GetTextWidth(sText);
}
Point aStart(aBLPos.X()+(nRectWidth-nTextWidth)/2,
aBLPos.Y() +(nRectHeight-nTextHeight)/2);
- pDev->DrawText(aStart, sText);
-
+ pDev->DrawText(aStart, sText);
+
pDev->SetFont(aOldFont);
}
}
-
+
}
} } // end of namespace svx::sidebar
+
+/* vim: set noet sw=4 ts=4: */
diff --git a/main/svx/source/tbxctrls/grafctrl.cxx
b/main/svx/source/tbxctrls/grafctrl.cxx
index a7cc8db737..ac370bb1d8 100644
--- a/main/svx/source/tbxctrls/grafctrl.cxx
+++ b/main/svx/source/tbxctrls/grafctrl.cxx
@@ -1,5 +1,5 @@
/**************************************************************
- *
+ *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -7,20 +7,18 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
+ *
*************************************************************/
-
-
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_svx.hxx"
@@ -118,7 +116,7 @@ class ImplGrafMetricField : public MetricField
private:
Timer maTimer;
OUString maCommand;
- Reference< XFrame > mxFrame;
+ Reference< XFrame > mxFrame;
DECL_LINK( ImplModifyHdl, Timer* );
@@ -128,7 +126,7 @@ protected:
public:
- ImplGrafMetricField( Window* pParent, const rtl::OUString&
aCmd, const Reference< XFrame >& rFrame );
+ ImplGrafMetricField( Window* pParent,
const rtl::OUString& aCmd, const Reference< XFrame >& rFrame );
~ImplGrafMetricField();
void Update( const SfxPoolItem* pItem );
@@ -140,15 +138,15 @@ public:
ImplGrafMetricField::ImplGrafMetricField( Window* pParent, const
rtl::OUString& rCmd, const Reference< XFrame >& rFrame ) :
MetricField( pParent, WB_BORDER | WB_SPIN | WB_REPEAT | WB_3DLOOK ),
maCommand( rCmd ),
- mxFrame( rFrame )
+ mxFrame( rFrame )
{
Size aSize( GetTextWidth( String::CreateFromAscii("-100 %") ),
GetTextHeight() );
aSize.Width() += 20, aSize.Height() += 6;
SetSizePixel( aSize );
- if ( maCommand.equalsAscii( ".uno:GrafGamma" ))
- {
+ if ( maCommand.equalsAscii( ".uno:GrafGamma" ))
+ {
SetDecimalDigits( 2 );
SetMin( 10 );
@@ -159,7 +157,7 @@ ImplGrafMetricField::ImplGrafMetricField( Window* pParent,
const rtl::OUString&
}
else
{
- const long nMinVal = ( maCommand.equalsAscii( ".uno:GrafTransparence"
)) ? 0 : -100;
+ const long nMinVal = ( maCommand.equalsAscii(
".uno:GrafTransparence" )) ? 0 : -100;
SetUnit( FUNIT_CUSTOM );
SetCustomUnitText( String::CreateFromAscii(" %") );
@@ -195,25 +193,25 @@ IMPL_LINK( ImplGrafMetricField, ImplModifyHdl, Timer*,
EMPTYARG )
{
const sal_Int64 nVal = GetValue();
- // Convert value to an any to be usable with dispatch API
- Any a;
- if ( maCommand.equalsAscii( ".uno:GrafRed" ) ||
- maCommand.equalsAscii( ".uno:GrafGreen" ) ||
- maCommand.equalsAscii( ".uno:GrafBlue" ) ||
- maCommand.equalsAscii( ".uno:GrafLuminance" ) ||
- maCommand.equalsAscii( ".uno:GrafContrast" ))
- a = makeAny( sal_Int16( nVal ));
- else if ( maCommand.equalsAscii( ".uno:GrafGamma" ) ||
- maCommand.equalsAscii( ".uno:GrafTransparence" ))
- a = makeAny( sal_Int32( nVal ));
+ // Convert value to an any to be usable with dispatch API
+ Any a;
+ if ( maCommand.equalsAscii( ".uno:GrafRed" ) ||
+ maCommand.equalsAscii( ".uno:GrafGreen" ) ||
+ maCommand.equalsAscii( ".uno:GrafBlue" ) ||
+ maCommand.equalsAscii( ".uno:GrafLuminance" ) ||
+ maCommand.equalsAscii( ".uno:GrafContrast" ))
+ a = makeAny( sal_Int16( nVal ));
+ else if ( maCommand.equalsAscii( ".uno:GrafGamma" ) ||
+ maCommand.equalsAscii( ".uno:GrafTransparence" ))
+ a = makeAny( sal_Int32( nVal ));
if ( a.hasValue() )
{
- INetURLObject aObj( maCommand );
+ INetURLObject aObj( maCommand );
- Sequence< PropertyValue > aArgs( 1 );
- aArgs[0].Name = aObj.GetURLPath();
- aArgs[0].Value = a;
+ Sequence< PropertyValue > aArgs( 1 );
+ aArgs[0].Name = aObj.GetURLPath();
+ aArgs[0].Value = a;
SfxToolBoxControl::Dispatch(
Reference< XDispatchProvider >( mxFrame->getController(),
UNO_QUERY ),
@@ -231,11 +229,11 @@ void ImplGrafMetricField::Update( const SfxPoolItem*
pItem )
{
long nValue;
- if ( maCommand.equalsAscii( ".uno:GrafTransparence" ))
+ if ( maCommand.equalsAscii( ".uno:GrafTransparence" ))
nValue = ( (SfxUInt16Item*) pItem )->GetValue();
- else if ( maCommand.equalsAscii( ".uno:GrafGamma" ))
+ else if ( maCommand.equalsAscii( ".uno:GrafGamma" ))
nValue = ( (SfxUInt32Item*) pItem )->GetValue();
- else
+ else
nValue = ( (SfxInt16Item*) pItem )->GetValue();
SetValue( nValue );
@@ -245,45 +243,45 @@ void ImplGrafMetricField::Update( const SfxPoolItem*
pItem )
}
// --------------------
-// - ImplGrafControl -
+// - ImplGrafControl -
// --------------------
struct CommandToRID
{
- const char* pCommand;
- sal_uInt16 nResId;
- sal_uInt16 nHCResId;
+ const char* pCommand;
+ sal_uInt16 nResId;
+ sal_uInt16 nHCResId;
};
static sal_uInt16 ImplGetRID( const OUString& aCommand, bool bHighContrast )
{
static const CommandToRID aImplCommandToResMap[] =
{
- { ".uno:GrafRed", RID_SVXIMG_GRAF_RED, RID_SVXIMG_GRAF_RED_H },
- { ".uno:GrafGreen", RID_SVXIMG_GRAF_GREEN, RID_SVXIMG_GRAF_GREEN_H },
- { ".uno:GrafBlue", RID_SVXIMG_GRAF_BLUE, RID_SVXIMG_GRAF_BLUE_H },
- { ".uno:GrafLuminance", RID_SVXIMG_GRAF_LUMINANCE,
RID_SVXIMG_GRAF_LUMINANCE_H },
- { ".uno:GrafContrast", RID_SVXIMG_GRAF_CONTRAST,
RID_SVXIMG_GRAF_CONTRAST_H },
- { ".uno:GrafGamma", RID_SVXIMG_GRAF_GAMMA, RID_SVXIMG_GRAF_GAMMA_H },
- { ".uno:GrafTransparence", RID_SVXIMG_GRAF_TRANSPARENCE,
RID_SVXIMG_GRAF_TRANSPARENCE_H },
- { 0, 0, 0 }
+ { ".uno:GrafRed", RID_SVXIMG_GRAF_RED, RID_SVXIMG_GRAF_RED_H },
+ { ".uno:GrafGreen", RID_SVXIMG_GRAF_GREEN,
RID_SVXIMG_GRAF_GREEN_H },
+ { ".uno:GrafBlue", RID_SVXIMG_GRAF_BLUE, RID_SVXIMG_GRAF_BLUE_H
},
+ { ".uno:GrafLuminance", RID_SVXIMG_GRAF_LUMINANCE,
RID_SVXIMG_GRAF_LUMINANCE_H },
+ { ".uno:GrafContrast", RID_SVXIMG_GRAF_CONTRAST,
RID_SVXIMG_GRAF_CONTRAST_H },
+ { ".uno:GrafGamma", RID_SVXIMG_GRAF_GAMMA,
RID_SVXIMG_GRAF_GAMMA_H },
+ { ".uno:GrafTransparence", RID_SVXIMG_GRAF_TRANSPARENCE,
RID_SVXIMG_GRAF_TRANSPARENCE_H },
+ { 0, 0, 0 }
};
sal_uInt16 nRID = 0;
- sal_Int32 i( 0 );
- while ( aImplCommandToResMap[ i ].pCommand )
- {
+ sal_Int32 i( 0 );
+ while ( aImplCommandToResMap[ i ].pCommand )
+ {
if ( aCommand.equalsAscii( aImplCommandToResMap[ i ].pCommand ))
{
- if ( bHighContrast )
- nRID = aImplCommandToResMap[ i ].nHCResId;
- else
- nRID = aImplCommandToResMap[ i ].nResId;
+ if ( bHighContrast )
+ nRID = aImplCommandToResMap[ i ].nHCResId;
+ else
+ nRID = aImplCommandToResMap[ i ].nResId;
break;
}
- ++i;
- }
+ ++i;
+ }
return nRID;
}
@@ -303,7 +301,7 @@ protected:
public:
- ImplGrafControl( Window* pParent, sal_uInt16
nSlotId, const rtl::OUString& rCmd, const Reference< XFrame >& rFrame );
+ ImplGrafControl(
Window* pParent, sal_uInt16 nSlotId, const rtl::OUString& rCmd, const
Reference< XFrame >& rFrame );
~ImplGrafControl();
void Update( const SfxPoolItem*
pItem ) { maField.Update( pItem ); }
@@ -330,7 +328,7 @@ ImplGrafControl::ImplGrafControl( Window* pParent,
sal_uInt16, const rtl::OUStri
maImage.SetImage( aImage );
maImage.SetModeImage( aImageHC, BMP_COLOR_HIGHCONTRAST );
maImage.SetSizePixel( aImgSize );
- // we want to see the backbround of the toolbox, not of the FixedImage
or Control
+ // we want to see the background of the toolbox, not of the FixedImage
or Control
maImage.SetBackground( Wallpaper( COL_TRANSPARENT ) );
SetBackground( Wallpaper( COL_TRANSPARENT ) );
@@ -345,11 +343,11 @@ ImplGrafControl::ImplGrafControl( Window* pParent,
sal_uInt16, const rtl::OUStri
SetSizePixel( Size( aImgSize.Width() + aFldSize.Width() +
SYMBOL_TO_FIELD_OFFSET + nOffset,
Max( aImgSize.Height(), aFldSize.Height() ) )
);
- SetBackground( Wallpaper() ); // transparent background
-
+ SetBackground( Wallpaper() ); // transparent background
+
maImage.Show();
- maField.SetHelpId( rtl::OUStringToOString( rCmd, RTL_TEXTENCODING_UTF8 ) );
+ maField.SetHelpId( rtl::OUStringToOString( rCmd, RTL_TEXTENCODING_UTF8
) );
maField.Show();
}
@@ -375,7 +373,7 @@ class ImplGrafModeControl : public ListBox
using Window::Update;
private:
sal_uInt16 mnCurPos;
- Reference< XFrame > mxFrame;
+ Reference< XFrame > mxFrame;
virtual void Select();
virtual long PreNotify( NotifyEvent& rNEvt );
@@ -395,7 +393,7 @@ public:
ImplGrafModeControl::ImplGrafModeControl( Window* pParent, const Reference<
XFrame >& rFrame ) :
ListBox( pParent, WB_BORDER | WB_DROPDOWN | WB_AUTOHSCROLL ),
mnCurPos( 0 ),
- mxFrame( rFrame )
+ mxFrame( rFrame )
{
SetSizePixel( Size( 100, 260 ) );
@@ -512,7 +510,7 @@ class ImplGrafFilterPopup : public SfxPopupWindow
private:
SvxGrafFilterToolBoxControl* mpParent;
- Reference< XConfigurableUIElement > m_xToolBar;
+ Reference< XConfigurableUIElement > m_xToolBar;
// SfxToolBoxManager maTbxMgr;
ResId maResIdWin;
ResId maResIdTbx;
@@ -542,9 +540,9 @@ ImplGrafFilterPopup::ImplGrafFilterPopup( sal_uInt16 nId,
SvxGrafFilterToolBoxCo
const ResId& rResIdWin, const ResId& rResIdTbx ) :
SfxPopupWindow ( nId, rResIdWin ),
mpParent ( pParent ),
- maTbxMgr ( this, GetBindings(), rResIdTbx ),
- maResIdWin ( rResIdWin ),
- maResIdTbx ( rResIdTbx ),
+ maTbxMgr ( this, GetBindings(), rResIdTbx ),
+ maResIdWin ( rResIdWin ),
+ maResIdTbx ( rResIdTbx ),
meTbxAlign ( eAlign )
{
maTbxMgr.UseDefault();
@@ -644,11 +642,11 @@ SfxPopupWindowType
SvxGrafFilterToolBoxControl::GetPopupWindowType() const
SfxPopupWindow* SvxGrafFilterToolBoxControl::CreatePopupWindow()
{
- rtl::OUString aSubTbxResName(
- RTL_CONSTASCII_USTRINGPARAM( "private:resource/toolbar/graffilterbar"
) );
- createAndPositionSubToolBar( aSubTbxResName );
+ rtl::OUString aSubTbxResName(
+ RTL_CONSTASCII_USTRINGPARAM(
"private:resource/toolbar/graffilterbar" ) );
+ createAndPositionSubToolBar( aSubTbxResName );
- return NULL;
+ return NULL;
}
// -------------------------
@@ -852,9 +850,9 @@ void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest& rReq,
SdrView& rView )
{
SfxItemPool& rPool = rView.GetModel()->GetItemPool();
SfxItemSet aSet( rPool, SDRATTR_GRAF_FIRST,
SDRATTR_GRAF_LAST );
- String aUndoStr;
- const bool bUndo = rView.IsUndoEnabled();
-
+ String aUndoStr;
+ const bool bUndo = rView.IsUndoEnabled();
+
if( bUndo )
{
aUndoStr = rView.GetDescriptionOfMarkedObjects();
@@ -862,12 +860,12 @@ void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest&
rReq, SdrView& rView )
}
const SfxItemSet* pArgs = rReq.GetArgs();
- const SfxPoolItem* pItem;
- sal_uInt16 nSlot = rReq.GetSlot();
+ const SfxPoolItem* pItem;
+ sal_uInt16 nSlot = rReq.GetSlot();
if( !pArgs || SFX_ITEM_SET != pArgs->GetItemState( nSlot, sal_False,
&pItem ))
pItem = 0;
-
+
switch( nSlot )
{
case SID_ATTR_GRAF_RED:
@@ -960,47 +958,47 @@ void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest&
rReq, SdrView& rView )
case( SID_ATTR_GRAF_CROP ):
{
- const SdrMarkList& rMarkList = rView.GetMarkedObjectList();
+ const SdrMarkList& rMarkList =
rView.GetMarkedObjectList();
- if( 0 < rMarkList.GetMarkCount() )
- {
- SdrGrafObj* pObj = (SdrGrafObj*) rMarkList.GetMark( 0
)->GetMarkedSdrObj();
-
- if( pObj && pObj->ISA( SdrGrafObj ) &&
+ if( 0 < rMarkList.GetMarkCount() )
+ {
+ SdrGrafObj* pObj = (SdrGrafObj*)
rMarkList.GetMark( 0 )->GetMarkedSdrObj();
+
+ if( pObj && pObj->ISA( SdrGrafObj ) &&
( pObj->GetGraphicType() != GRAPHIC_NONE ) &&
( pObj->GetGraphicType() != GRAPHIC_DEFAULT ) )
- {
+ {
SfxItemSet aGrfAttr( rPool,
SDRATTR_GRAFCROP, SDRATTR_GRAFCROP, 0 );
const SfxMapUnit eOldMetric = rPool.GetMetric( 0 );
const MapMode aMap100( MAP_100TH_MM );
const MapMode aMapTwip( MAP_TWIP );
-
+
aGrfAttr.Put(pObj->GetMergedItemSet());
rPool.SetDefaultMetric( SFX_MAPUNIT_TWIP );
-
+
SfxItemSet aCropDlgAttr( rPool,
SDRATTR_GRAFCROP, SDRATTR_GRAFCROP,
SID_ATTR_GRAF_GRAPHIC,
SID_ATTR_GRAF_GRAPHIC,
SID_ATTR_PAGE_SIZE,
SID_ATTR_PAGE_SIZE,
SID_ATTR_GRAF_FRMSIZE,
SID_ATTR_GRAF_FRMSIZE,
SID_ATTR_GRAF_CROP,
SID_ATTR_GRAF_CROP, 0 );
-
+
aCropDlgAttr.Put( SvxBrushItem( pObj->GetGraphic(),
GPOS_MM, SID_ATTR_GRAF_GRAPHIC ) );
aCropDlgAttr.Put( SvxSizeItem( SID_ATTR_PAGE_SIZE,
Size(
OutputDevice::LogicToLogic(
Size( 200000, 200000
), aMap100, aMapTwip ) ) ) );
aCropDlgAttr.Put( SvxSizeItem( SID_ATTR_GRAF_FRMSIZE,
OutputDevice::LogicToLogic(
pObj->GetLogicRect().GetSize(), aMap100, aMapTwip ) ) );
-
+
const SdrGrafCropItem& rCrop = (const
SdrGrafCropItem&) aGrfAttr.Get( SDRATTR_GRAFCROP );
Size aLTSize(
OutputDevice::LogicToLogic(
Size( rCrop.GetLeft(),
rCrop.GetTop() ), aMap100, aMapTwip ) );
Size aRBSize(
OutputDevice::LogicToLogic(
Size( rCrop.GetRight(),
rCrop.GetBottom() ), aMap100, aMapTwip ) );
-
+
aCropDlgAttr.Put( SdrGrafCropItem( aLTSize.Width(),
aLTSize.Height(),
aRBSize.Width(),
aRBSize.Height() ) );
-
+
SfxSingleTabDialog aCropDialog( SfxViewShell::Current() ?
SfxViewShell::Current()->GetWindow() : NULL,
aCropDlgAttr, 950 );
const String aCropStr = SVX_RESSTR(
RID_SVXSTR_GRAFCROP );
@@ -1013,25 +1011,25 @@ void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest&
rReq, SdrView& rView )
//CHINA001 end
pTabPage->SetText( aCropStr );
aCropDialog.SetTabPage( pTabPage );
-
+
if( aCropDialog.Execute() == RET_OK )
{
const SfxItemSet* pOutAttr =
aCropDialog.GetOutputItemSet();
-
+
if( pOutAttr )
{
aUndoStr.Append( String( SVX_RESSTR(
RID_SVXSTR_UNDO_GRAFCROP ) ) );
-
+
// set crop attributes
if( SFX_ITEM_SET <= pOutAttr->GetItemState(
SDRATTR_GRAFCROP ) )
{
const SdrGrafCropItem& rNewCrop = (const
SdrGrafCropItem&) pOutAttr->Get( SDRATTR_GRAFCROP );
-
+
aLTSize = OutputDevice::LogicToLogic( Size(
rNewCrop.GetLeft(), rNewCrop.GetTop() ), aMapTwip, aMap100 );
aRBSize = OutputDevice::LogicToLogic( Size(
rNewCrop.GetRight(), rNewCrop.GetBottom() ), aMapTwip, aMap100 );
aSet.Put( SdrGrafCropItem( aLTSize.Width(),
aLTSize.Height(), aRBSize.Width(), aRBSize.Height() ) );
}
-
+
// set new logic rect
if( SFX_ITEM_SET <= pOutAttr->GetItemState(
SID_ATTR_GRAF_FRMSIZE ) )
{
@@ -1039,18 +1037,18 @@ void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest&
rReq, SdrView& rView )
const Size& rGrfSize = ( (const
SvxSizeItem&) pOutAttr->Get( SID_ATTR_GRAF_FRMSIZE ) ).GetSize();
Size aNewGrfSize(
OutputDevice::LogicToLogic( rGrfSize, aMapTwip, aMap100 ) );
Size aOldGrfSize(
pObj->GetLogicRect().GetSize() );
-
+
Rectangle aNewRect( aNewOrigin, aNewGrfSize );
Point aOffset( (aNewGrfSize.Width() -
aOldGrfSize.Width()) >> 1,
(aNewGrfSize.Height() -
aOldGrfSize.Height()) >> 1 );
-
+
// #106181# rotate snap rect before setting it
const GeoStat& aGeo = pObj->GetGeoStat();
-
+
if (aGeo.nDrehWink!=0 || aGeo.nShearWink!=0)
{
Polygon aPol(aNewRect);
-
+
// also transform origin offset
if (aGeo.nShearWink!=0)
{
@@ -1066,7 +1064,7 @@ void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest&
rReq, SdrView& rView )
aGeo.nSin,aGeo.nCos);
RotatePoint(aOffset, Point(0,0),
aGeo.nSin,aGeo.nCos);
}
-
+
// apply offset
aPol.Move( -aOffset.X(), -aOffset.Y() );
aNewRect=aPol.GetBoundRect();
@@ -1075,7 +1073,7 @@ void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest&
rReq, SdrView& rView )
{
aNewRect.Move( -aOffset.X(), -aOffset.Y()
);
}
-
+
if( !aSet.Count() )
rView.SetMarkedObjRect( aNewRect );
else
@@ -1095,7 +1093,7 @@ void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest&
rReq, SdrView& rView )
}
}
}
-
+
rPool.SetDefaultMetric( eOldMetric );
}
}
@@ -1145,7 +1143,7 @@ void SvxGrafAttrHelper::GetGrafAttrState( SfxItemSet&
rSet, SdrView& rView )
if( !pGrafObj ||
( pGrafObj->GetGraphicType() == GRAPHIC_NONE ) ||
- ( pGrafObj->GetGraphicType() == GRAPHIC_DEFAULT ))
+ ( pGrafObj->GetGraphicType() == GRAPHIC_DEFAULT ))
{
bEnableColors = bEnableTransparency = bEnableCrop = false;
break;
@@ -1278,7 +1276,7 @@ void SvxGrafAttrHelper::GetGrafAttrState( SfxItemSet&
rSet, SdrView& rView )
else
{
rSet.DisableItem(
SID_ATTR_GRAF_GAMMA );
- }
+ }
}
}
break;
@@ -1288,14 +1286,14 @@ void SvxGrafAttrHelper::GetGrafAttrState( SfxItemSet&
rSet, SdrView& rView )
if( SFX_ITEM_AVAILABLE <=
aAttrSet.GetItemState( SDRATTR_GRAFTRANSPARENCE ) )
{
if( bEnableTransparency )
- {
+ {
rSet.Put( SfxUInt16Item(
nSlotId,
ITEMVALUE( aAttrSet,
SDRATTR_GRAFTRANSPARENCE, SdrGrafTransparenceItem ) ) );
- }
+ }
else
- {
+ {
rSet.DisableItem(
SID_ATTR_GRAF_TRANSPARENCE );
- }
+ }
}
}
break;
@@ -1321,3 +1319,5 @@ void SvxGrafAttrHelper::GetGrafAttrState( SfxItemSet&
rSet, SdrView& rView )
nWhich = aIter.NextWhich();
}
}
+
+/* vim: set noet sw=4 ts=4: */