[Libreoffice-commits] core.git: 5 commits - include/editeng svx/sdi svx/source xmloff/source
Tomaž Vajngerl
tomaz.vajngerl at collabora.co.uk
Sat Apr 18 00:55:24 PDT 2015
include/editeng/colritem.hxx | 69 +++++++---------
include/editeng/fontitem.hxx | 115 ++++++++++++++++------------
svx/sdi/svxitems.sdi | 108 ++++----------------------
svx/source/dialog/compressgraphicdialog.cxx | 2
xmloff/source/style/StyleMap.cxx | 48 +++++------
5 files changed, 139 insertions(+), 203 deletions(-)
New commits:
commit 6d449f7ce236898e332b95468c5707829fc9cb83
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
Date: Sat Apr 18 12:37:12 2015 +0900
cleanup fontitem.hxx
Change-Id: Ie42766d5340083f0c14184738867375c648f9464
diff --git a/include/editeng/fontitem.hxx b/include/editeng/fontitem.hxx
index 38e7d41..f762256 100644
--- a/include/editeng/fontitem.hxx
+++ b/include/editeng/fontitem.hxx
@@ -26,19 +26,14 @@
class SvXMLUnitConverter;
-// class SvxFontItem -----------------------------------------------------
-
-/* [Description]
-
- This item describes a Font.
+/** This item describes a Font.
*/
-
class EDITENG_DLLPUBLIC SvxFontItem : public SfxPoolItem
{
- OUString aFamilyName;
- OUString aStyleName;
- FontFamily eFamily;
- FontPitch ePitch;
+ OUString aFamilyName;
+ OUString aStyleName;
+ FontFamily eFamily;
+ FontPitch ePitch;
rtl_TextEncoding eTextEncoding;
static bool bEnableStoreUnicodeNames;
@@ -46,54 +41,82 @@ class EDITENG_DLLPUBLIC SvxFontItem : public SfxPoolItem
public:
TYPEINFO_OVERRIDE();
- explicit SvxFontItem( const sal_uInt16 nId );
- SvxFontItem( const FontFamily eFam, const OUString& rFamilyName,
- const OUString& rStyleName,
- const FontPitch eFontPitch /*= PITCH_DONTKNOW*/,
- const rtl_TextEncoding eFontTextEncoding /*= RTL_TEXTENCODING_DONTKNOW*/,
- const sal_uInt16 nId );
+ explicit SvxFontItem(const sal_uInt16 nId);
+ SvxFontItem(const FontFamily eFam, const OUString& rFamilyName,
+ const OUString& rStyleName,
+ const FontPitch eFontPitch /*= PITCH_DONTKNOW*/,
+ const rtl_TextEncoding eFontTextEncoding /*= RTL_TEXTENCODING_DONTKNOW*/,
+ const sal_uInt16 nId);
// "pure virtual Methods" from SfxPoolItem
- virtual bool operator==( const SfxPoolItem& ) const SAL_OVERRIDE;
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const SAL_OVERRIDE;
- virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const SAL_OVERRIDE;
- virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const SAL_OVERRIDE;
- virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const SAL_OVERRIDE;
- virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) SAL_OVERRIDE;
-
- virtual bool GetPresentation( SfxItemPresentation ePres,
- SfxMapUnit eCoreMetric,
- SfxMapUnit ePresMetric,
- OUString &rText, const IntlWrapper * = 0 ) const SAL_OVERRIDE;
-
- // Access methods:
- void SetFamilyName( const OUString& rFamilyName ) { aFamilyName = rFamilyName; }
- const OUString &GetFamilyName() const { return aFamilyName; }
+ virtual bool operator==(const SfxPoolItem& rItem) const SAL_OVERRIDE;
+ virtual SfxPoolItem* Clone(SfxItemPool *pPool = 0) const SAL_OVERRIDE;
+ virtual SfxPoolItem* Create(SvStream& rStream, sal_uInt16) const SAL_OVERRIDE;
+ virtual SvStream& Store(SvStream& rStream, sal_uInt16 nItemVersion) const SAL_OVERRIDE;
+ virtual bool QueryValue(css::uno::Any& rVal, sal_uInt8 nMemberId = 0) const SAL_OVERRIDE;
+ virtual bool PutValue(const css::uno::Any& rVal, sal_uInt8 nMemberId = 0) SAL_OVERRIDE;
- void SetStyleName(const OUString &rStyleName ) { aStyleName = rStyleName; }
- const OUString &GetStyleName() const { return aStyleName; }
+ virtual bool GetPresentation(SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric,
+ OUString &rText, const IntlWrapper* = 0) const SAL_OVERRIDE;
- void SetFamily( FontFamily _eFamily ) { eFamily = _eFamily; }
- FontFamily GetFamily() const { return eFamily; }
-
- void SetPitch(FontPitch _ePitch ) { ePitch = _ePitch; }
- FontPitch GetPitch() const { return ePitch; }
-
- void SetCharSet(rtl_TextEncoding _eEncoding) { eTextEncoding = _eEncoding; }
-
- rtl_TextEncoding GetCharSet() const { return eTextEncoding; }
+ // Access methods:
+ void SetFamilyName(const OUString& rFamilyName)
+ {
+ aFamilyName = rFamilyName;
+ }
+ const OUString &GetFamilyName() const
+ {
+ return aFamilyName;
+ }
+
+ void SetStyleName(const OUString &rStyleName)
+ {
+ aStyleName = rStyleName;
+ }
+ const OUString &GetStyleName() const
+ {
+ return aStyleName;
+ }
+
+ void SetFamily(FontFamily _eFamily)
+ {
+ eFamily = _eFamily;
+ }
+ FontFamily GetFamily() const
+ {
+ return eFamily;
+ }
+
+ void SetPitch(FontPitch _ePitch)
+ {
+ ePitch = _ePitch;
+ }
+ FontPitch GetPitch() const
+ {
+ return ePitch;
+ }
+
+ void SetCharSet(rtl_TextEncoding _eEncoding)
+ {
+ eTextEncoding = _eEncoding;
+ }
+ rtl_TextEncoding GetCharSet() const
+ {
+ return eTextEncoding;
+ }
SvxFontItem& operator=(const SvxFontItem& rFont);
- static void EnableStoreUnicodeNames( bool bEnable );
+ static void EnableStoreUnicodeNames(bool bEnable);
void dumpAsXml(struct _xmlTextWriter* pWriter) const SAL_OVERRIDE;
};
-EDITENG_DLLPUBLIC void GetDefaultFonts( SvxFontItem& rLatin, SvxFontItem& rAsian,
- SvxFontItem& rComplex );
+EDITENG_DLLPUBLIC void GetDefaultFonts(SvxFontItem& rLatin,
+ SvxFontItem& rAsian,
+ SvxFontItem& rComplex);
#endif // INCLUDED_EDITENG_FONTITEM_HXX
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit ab0cd9b481c8af1954faf7a54c4b1d2c2fbb5577
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
Date: Sat Apr 18 11:32:58 2015 +0900
cleanup colritem.hxx
Change-Id: I8e703012fe5693251aea6ec1f7a7997c4d6b0edc
diff --git a/include/editeng/colritem.hxx b/include/editeng/colritem.hxx
index 31a7af4..64d8a56 100644
--- a/include/editeng/colritem.hxx
+++ b/include/editeng/colritem.hxx
@@ -25,75 +25,64 @@
class SvXMLUnitConverter;
-// class SvxColorItem ----------------------------------------------------
-
-/* [Description]
-
- This item describes a color.
-*/
-
#define VERSION_USEAUTOCOLOR 1
+/** SvxColorItem item describes a color.
+*/
class EDITENG_DLLPUBLIC SvxColorItem : public SfxPoolItem
{
private:
- Color mColor;
+ Color mColor;
public:
TYPEINFO_OVERRIDE();
- explicit SvxColorItem( const sal_uInt16 nId );
- SvxColorItem( const Color& aColor, const sal_uInt16 nId );
- SvxColorItem( SvStream& rStrm, const sal_uInt16 nId );
- SvxColorItem( const SvxColorItem& rCopy );
+ explicit SvxColorItem(const sal_uInt16 nId);
+ SvxColorItem(const Color& aColor, const sal_uInt16 nId);
+ SvxColorItem(SvStream& rStream, const sal_uInt16 nId);
+ SvxColorItem(const SvxColorItem& rCopy);
virtual ~SvxColorItem();
// "pure virtual Methods" from SfxPoolItem
- virtual bool operator==( const SfxPoolItem& ) const SAL_OVERRIDE;
- virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const SAL_OVERRIDE;
- virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) SAL_OVERRIDE;
- virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const SAL_OVERRIDE;
+ virtual bool operator==(const SfxPoolItem& rPoolItem) const SAL_OVERRIDE;
+ virtual bool QueryValue(css::uno::Any& rVal, sal_uInt8 nMemberId = 0) const SAL_OVERRIDE;
+ virtual bool PutValue(const css::uno::Any& rVal, sal_uInt8 nMemberId = 0) SAL_OVERRIDE;
+ virtual sal_uInt16 GetVersion(sal_uInt16 nFileVersion) const SAL_OVERRIDE;
- virtual bool GetPresentation( SfxItemPresentation ePres,
- SfxMapUnit eCoreMetric,
- SfxMapUnit ePresMetric,
- OUString &rText, const IntlWrapper * = 0 ) const SAL_OVERRIDE;
+ virtual bool GetPresentation(SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric,
+ OUString &rText, const IntlWrapper* pIntlWrapper = 0) const SAL_OVERRIDE;
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const SAL_OVERRIDE;
- virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const SAL_OVERRIDE;
- virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const SAL_OVERRIDE;
+ virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const SAL_OVERRIDE;
+ virtual SfxPoolItem* Create(SvStream& rStream, sal_uInt16 nVersion) const SAL_OVERRIDE;
+ virtual SvStream& Store(SvStream& rStream, sal_uInt16 nVersion) const SAL_OVERRIDE;
inline SvxColorItem& operator=(const SvxColorItem& rColor)
{
- SetValue( rColor.GetValue() );
+ SetValue(rColor.GetValue());
return *this;
}
- const Color& GetValue() const
- {
- return mColor;
- }
- void SetValue( const Color& rNewCol );
-
+ const Color& GetValue() const
+ {
+ return mColor;
+ }
+ void SetValue(const Color& rNewColor);
};
-// class SvxBackgroundColorItem
-
// XXX: to be moved in a separate header.
class EDITENG_DLLPUBLIC SvxBackgroundColorItem : public SvxColorItem
{
public:
TYPEINFO_OVERRIDE();
- SvxBackgroundColorItem( const sal_uInt16 nId );
- SvxBackgroundColorItem( const Color& rCol,
- const sal_uInt16 nId );
- SvxBackgroundColorItem( SvStream& rStrm, const sal_uInt16 nId );
- SvxBackgroundColorItem( const SvxBackgroundColorItem& rCopy );
-
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const SAL_OVERRIDE;
- virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const SAL_OVERRIDE;
+ SvxBackgroundColorItem(const sal_uInt16 nId);
+ SvxBackgroundColorItem(const Color& rCol, const sal_uInt16 nId);
+ SvxBackgroundColorItem(SvStream& rStrm, const sal_uInt16 nId);
+ SvxBackgroundColorItem(const SvxBackgroundColorItem& rCopy);
+ virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const SAL_OVERRIDE;
+ virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const SAL_OVERRIDE;
};
#endif
commit ac1ca7a9e3200642248c402202bbca94f61c90c8
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
Date: Tue Apr 14 16:46:59 2015 +0900
cleanup svxitems.sdi
Change-Id: Id154295e7f241acf986d9c3078c9ca18dbcce0e7
diff --git a/svx/sdi/svxitems.sdi b/svx/sdi/svxitems.sdi
index cdfea24..6ee2105 100644
--- a/svx/sdi/svxitems.sdi
+++ b/svx/sdi/svxitems.sdi
@@ -16,7 +16,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
enum SvxCellHorJustifyEnum
{
SVX_HOR_JUSTIFY_STANDARD,
@@ -37,8 +36,6 @@ enum SvxCellVerJustifyEnum
};
item SvxCellVerJustifyEnum SvxCellVerJustifyEnumItem;
-
-
enum SvxCellOrientationEnum
{
SVX_ORIENTATION_STANDARD,
@@ -76,11 +73,9 @@ enum SvxChooseControlEnum
SVX_SNAP_PATTERNFIELD,
SVX_SNAP_FILECONTROL,
SVX_SNAP_TREECONTROL
-}
+};
item SvxChooseControlEnum SvxChooseControlItem;
-
-
enum SvxDrawToolEnum
{
SVX_SNAP_DRAW_SELECT,
@@ -99,11 +94,9 @@ enum SvxDrawToolEnum
SVX_SNAP_DRAW_TEXT_MARQUEE,
SVX_SNAP_DRAW_CAPTION,
SVX_SNAP_DRAW_CAPTION_VERTICAL
-}
+};
item SvxDrawToolEnum SvxDrawToolEnumItem;
-
-
enum SvxDrawAlignEnum
{
SVX_OBJECT_ALIGN_LEFT,
@@ -112,11 +105,9 @@ enum SvxDrawAlignEnum
SVX_OBJECT_ALIGN_UP,
SVX_OBJECT_ALIGN_MIDDLE,
SVX_OBJECT_ALIGN_DOWN
-}
+};
item SvxDrawAlignEnum SvxDrawAlignEnumItem;
-
-
enum SvxDrawBezierEnum
{
SVX_BEZIER_MOVE,
@@ -129,7 +120,7 @@ enum SvxDrawBezierEnum
SVX_BEZIER_SYMMTR,
SVX_BEZIER_CLOSE,
SVX_BEZIER_ELIMINATE_POINTS
-}
+};
item SvxDrawBezierEnum SvxDrawBezierEnumItem;
enum SvxAdjust
@@ -150,8 +141,6 @@ struct SvxAdjustStruct
};
item SvxAdjustStruct SvxAdjustItem;
-
-
enum SvxCaseMap
{
SVX_CASEMAP_NOT_MAPPED,
@@ -163,8 +152,6 @@ enum SvxCaseMap
};
item SvxCaseMap SvxCaseMapItem;
-
-
enum CharSet
{
CHARSET_DONTKNOW,
@@ -180,8 +167,6 @@ enum CharSet
CHARSET_SYMBOL
};
-
-
enum FontFamily
{
FAMILY_DONTKNOW,
@@ -193,8 +178,6 @@ enum FontFamily
FAMILY_SYSTEM
};
-
-
enum FontPitch
{
PITCH_DONTKNOW,
@@ -202,8 +185,6 @@ enum FontPitch
PITCH_VARIABLE
};
-
-
struct SvxFont
{
String StyleName MID_FONT_STYLE_NAME;
@@ -214,8 +195,6 @@ struct SvxFont
};
item SvxFont SvxFontItem;
-
-
enum FontWeight
{
WEIGHT_DONTKNOW,
@@ -232,8 +211,6 @@ enum FontWeight
};
item FontWeight SvxWeightItem;
-
-
enum FontUnderline
{
UNDERLINE_NONE,
@@ -242,8 +219,6 @@ enum FontUnderline
UNDERLINE_DOTTED
};
-
-
enum FontStrikeout
{
STRIKEOUT_NONE,
@@ -251,8 +226,6 @@ enum FontStrikeout
STRIKEOUT_DOUBLE
};
-
-
enum FontItalic
{
ITALIC_NONE,
@@ -261,8 +234,6 @@ enum FontItalic
};
item FontItalic SvxPostureItem;
-
-
enum SvxDbType
{
DBTYPE_STARBASE,
@@ -271,8 +242,6 @@ enum SvxDbType
};
item SvxDbType SvxDbTypeItem;
-
-
enum SvxLineSpace
{
SVX_LINE_SPACE_AUTO,
@@ -282,8 +251,6 @@ enum SvxLineSpace
};
item SvxLineSpace SvxLineSpaceItem;
-
-
enum SvxInterLineSpace
{
SVX_INTER_LINE_SPACE_OFF,
@@ -293,8 +260,6 @@ enum SvxInterLineSpace
};
item SvxInterLineSpace SvxInterLineSpaceItem;
-
-
enum SvxBreak
{
SVX_BREAK_NONE,
@@ -308,8 +273,6 @@ enum SvxBreak
};
item SvxBreak SvxBreakItem;
-
-
enum BrushStyle
{
BRUSH_NULL,
@@ -327,8 +290,6 @@ enum BrushStyle
};
item BrushStyle BrushStyleItem;
-
-
enum SvxNumType
{
SVX_CHARS_UPPER_LETTER,
@@ -342,8 +303,6 @@ enum SvxNumType
};
item SvxNumType SvxNumTypeItem;
-
-
enum SvxShadowLocation
{
SVX_SHADOW_NONE,
@@ -355,8 +314,6 @@ enum SvxShadowLocation
};
item SvxShadowLocation SvxShadowLocationItem;
-
-
item INT16 SvxCharScaleWidthItem;
item INT16 SvxParaVertAlignItem;
item INT16 SvxCharReliefItem;
@@ -407,8 +364,6 @@ item String avmedia_MediaItem;
item BYTE SfxGlobalNameItem;
-
-
struct SvxCrossedOut
{
FontStrikeout Kind MID_CROSS_OUT;
@@ -433,8 +388,6 @@ struct SvxBrush
};
item SvxBrush SvxBrushItem;
-
-
struct SvxEscapement
{
INT16 Escapement MID_ESC;
@@ -443,8 +396,6 @@ struct SvxEscapement
};
item SvxEscapement SvxEscapementItem;
-
-
struct SvxFontHeight
{
float Height MID_FONTHEIGHT; // may be converted to INT32
@@ -453,8 +404,6 @@ struct SvxFontHeight
};
item SvxFontHeight SvxFontHeightItem;
-
-
struct SvxHyphenZone
{
BOOL Hyphen MID_IS_HYPHEN;
@@ -464,7 +413,6 @@ struct SvxHyphenZone
};
item SvxHyphenZone SvxHyphenZoneItem;
-
struct SvxLine
{
INT32 LineFGColor MID_FG_COLOR;
@@ -474,8 +422,6 @@ struct SvxLine
};
item SvxLine SvxLineItem;
-
-
struct SvxLRSpace
{
INT32 LeftMargin MID_L_MARGIN; // % or direct
@@ -489,8 +435,6 @@ struct SvxLRSpace
};
item SvxLRSpace SvxLRSpaceItem;
-
-
struct SvxLineSpacing
{
INT16 Mode MID_LINESPACE;
@@ -498,8 +442,6 @@ struct SvxLineSpacing
};
item SvxLineSpacing SvxLineSpacingItem;
-
-
struct SvxPage
{
BOOL Landscape MID_PAGE_ORIENTATION;
@@ -508,19 +450,15 @@ struct SvxPage
};
item SvxPage SvxPageItem;
-
-
struct SvxPagePosSize
{
- INT32 XPos MID_X; // ???
- INT32 YPos MID_Y; // ???
- INT32 Width MID_WIDTH; // ???
- INT32 Height MID_HEIGHT; // ???
+ INT32 XPos MID_X; // ???
+ INT32 YPos MID_Y; // ???
+ INT32 Width MID_WIDTH; // ???
+ INT32 Height MID_HEIGHT; // ???
};
item SvxPagePosSize SvxPagePosSizeItem;
-
-
struct SvxShadow
{
SvxShadowLocation Location MID_LOCATION;
@@ -530,9 +468,6 @@ struct SvxShadow
};
item SvxShadow SvxShadowItem;
-
-
-
struct SvxULSpace
{
INT32 TopMargin MID_UP_MARGIN; // % or direct
@@ -543,26 +478,20 @@ struct SvxULSpace
};
item SvxULSpace SvxULSpaceItem
-
-
struct SvxLongLRSpace
{
- INT32 Left MID_LEFT; // ???
- INT32 Right MID_RIGHT; // ???
+ INT32 Left MID_LEFT; // ???
+ INT32 Right MID_RIGHT; // ???
};
item SvxLongLRSpace SvxLongLRSpaceItem;
-
-
struct SvxLongULSpace
{
- INT32 Upper MID_UPPER; // ???
- INT32 Lower MID_LOWER; // ???
+ INT32 Upper MID_UPPER; // ???
+ INT32 Lower MID_LOWER; // ???
};
item SvxLongULSpace SvxLongULSpaceItem;
-
-
struct SvxHyperlink
{
String Text MID_HLINK_TEXT;
@@ -573,8 +502,6 @@ struct SvxHyperlink
};
item SvxHyperlink SvxHyperlinkItem;
-
-
struct PageModel
{
BOOL Auto MID_AUTO;
@@ -650,9 +577,9 @@ struct SvxCharRotate
};
item SvxCharRotate SvxCharRotateItem;
-item String SfxSetItem; // dummy
-item INT16 SvxRotateModeItem; // enum
-item INT16 SvxOrientationItem; // enum
+item String SfxSetItem; // dummy
+item INT16 SvxRotateModeItem; // enum
+item INT16 SvxOrientationItem; // enum
struct SvxMargin
{
@@ -669,10 +596,9 @@ struct SvxEmphasisMark
};
item SvxEmphasisMark SvxEmphasisMarkItem;
-item String SvxSmartTagItem; // dummy for sequence
-
+item String SvxSmartTagItem; // dummy for sequence
-item String Points; // dummy for sequence
+item String Points; // dummy for sequence
struct ZoomSlider
{
INT16 CurrentZoom MID_ZOOMSLIDER_CURRENTZOOM;
commit 6f683280159a7186cea5aadb5a7fc15e32fbe237
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
Date: Mon Apr 13 22:37:17 2015 +0900
remove stdio.h include from compressgraphicdialog
Change-Id: I510995b55f69b7541f3cf11f0af66b73657af1ca
diff --git a/svx/source/dialog/compressgraphicdialog.cxx b/svx/source/dialog/compressgraphicdialog.cxx
index 70b82e5..f69b554 100644
--- a/svx/source/dialog/compressgraphicdialog.cxx
+++ b/svx/source/dialog/compressgraphicdialog.cxx
@@ -37,8 +37,6 @@
using namespace com::sun::star::uno;
using namespace com::sun::star::beans;
-#include <stdio.h>
-
CompressGraphicsDialog::CompressGraphicsDialog( vcl::Window* pParent, SdrGrafObj* pGraphicObj, SfxBindings& rBindings ) :
ModalDialog ( pParent, "CompressGraphicDialog", "svx/ui/compressgraphicdialog.ui" ),
m_pGraphicObj ( pGraphicObj ),
commit a88a8ca0d2b3f5a807ade539ef7609aa31b6742c
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
Date: Mon Apr 13 19:57:16 2015 +0900
xmloff: cleanup StyleMap
Change-Id: I487ab62f412512b0437e6b46a01a3be7c88f5760
diff --git a/xmloff/source/style/StyleMap.cxx b/xmloff/source/style/StyleMap.cxx
index 05cd078..339f8e8 100644
--- a/xmloff/source/style/StyleMap.cxx
+++ b/xmloff/source/style/StyleMap.cxx
@@ -24,53 +24,53 @@
#include "StyleMap.hxx"
-using namespace ::osl;
-using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::lang;
+using namespace osl;
+using namespace css::uno;
+using namespace css::lang;
-
-StyleMap::StyleMap()
+namespace
{
-}
+class theStyleMapUnoTunnelId : public rtl::Static< UnoTunnelIdInit, theStyleMapUnoTunnelId>
+{};
+} // end anonymous namespace
-StyleMap::~StyleMap()
+StyleMap::StyleMap()
{
}
-namespace
+StyleMap::~StyleMap()
{
- class theStyleMapUnoTunnelId : public rtl::Static< UnoTunnelIdInit, theStyleMapUnoTunnelId> {};
}
// XUnoTunnel & co
-const Sequence< sal_Int8 > & StyleMap::getUnoTunnelId() throw()
+const Sequence<sal_Int8>& StyleMap::getUnoTunnelId() throw()
{
return theStyleMapUnoTunnelId::get().getSeq();
}
-StyleMap* StyleMap::getImplementation( Reference< XInterface > xInt ) throw()
+StyleMap* StyleMap::getImplementation(Reference<XInterface> xInterface) throw()
{
- Reference< XUnoTunnel > xUT( xInt, UNO_QUERY );
- if( xUT.is() )
- return reinterpret_cast<StyleMap *>(
- xUT->getSomething( StyleMap::getUnoTunnelId() ) );
- else
- return 0;
+ Reference<XUnoTunnel> xUnoTunnel(xInterface, UNO_QUERY);
+ if (xUnoTunnel.is())
+ {
+ return reinterpret_cast<StyleMap*>(xUnoTunnel->getSomething(StyleMap::getUnoTunnelId()));
+ }
+
+ return 0;
}
// XUnoTunnel
-sal_Int64 SAL_CALL StyleMap::getSomething(
- const Sequence< sal_Int8 >& rId )
- throw( RuntimeException, std::exception )
+sal_Int64 SAL_CALL StyleMap::getSomething(const Sequence<sal_Int8>& rId)
+ throw(RuntimeException, std::exception)
{
- if( rId.getLength() == 16 &&
- 0 == memcmp( getUnoTunnelId().getConstArray(),
- rId.getConstArray(), 16 ) )
+ if (rId.getLength() == 16 &&
+ memcmp(getUnoTunnelId().getConstArray(), rId.getConstArray(), 16) == 0)
{
- return reinterpret_cast<sal_Int64>( this );
+ return reinterpret_cast<sal_Int64>(this);
}
+
return 0;
}
More information about the Libreoffice-commits
mailing list