Kaydet (Commit) 078ee756 authored tarafından Noel Grandin's avatar Noel Grandin

sal_uIntPtr->sal_Int32 in SdrModel

Change-Id: I7cf53514641c52f3ebb503251e25df90bd6db8c7
Reviewed-on: https://gerrit.libreoffice.org/46310Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst cf4cf3ed
......@@ -164,7 +164,7 @@ protected:
SdrOutliner* pDrawOutliner; // an Outliner for outputting text
SdrOutliner* pHitTestOutliner;// an Outliner for the HitTest
SdrOutliner* pChainingOutliner; // an Outliner for chaining overflowing text
sal_uIntPtr nDefTextHgt; // Default text height in logical units
sal_Int32 mnDefTextHgt; // Default text height in logical units
VclPtr<OutputDevice> pRefOutDev; // ReferenceDevice for the EditEngine
rtl::Reference< SfxStyleSheetBasePool > mxStyleSheetPool;
SfxStyleSheet* pDefaultStyleSheet;
......@@ -287,7 +287,7 @@ public:
const SdrTextObj* GetFormattingTextObj() const;
// put the TextDefaults (Font,Height,Color) in a Set
void SetTextDefaults() const;
static void SetTextDefaults( SfxItemPool* pItemPool, sal_uIntPtr nDefTextHgt );
static void SetTextDefaults( SfxItemPool* pItemPool, sal_Int32 nDefTextHgt );
SdrOutliner& GetChainingOutliner(const SdrTextObj* pObj) const;
TextChain * GetTextChain() const;
......@@ -298,8 +298,8 @@ public:
// If a new MapMode is set on the RefDevice (or similar)
void RefDeviceChanged(); // not yet implemented
// default font height in logical units
void SetDefaultFontHeight(sal_uIntPtr nVal);
sal_uIntPtr GetDefaultFontHeight() const { return nDefTextHgt; }
void SetDefaultFontHeight(sal_Int32 nVal);
sal_Int32 GetDefaultFontHeight() const { return mnDefTextHgt; }
// default tabulator width for the EditEngine
void SetDefaultTabulator(sal_uInt16 nVal);
sal_uInt16 GetDefaultTabulator() const { return nDefaultTabulator; }
......
......@@ -185,9 +185,9 @@ void SdrModel::ImpCtor(SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* _pEmbe
// using static SdrEngineDefaults only if default SvxFontHeight item is not available
const SfxPoolItem* pPoolItem = pItemPool->GetPoolDefaultItem( EE_CHAR_FONTHEIGHT );
if ( pPoolItem )
nDefTextHgt = static_cast<const SvxFontHeightItem*>(pPoolItem)->GetHeight();
mnDefTextHgt = static_cast<const SvxFontHeightItem*>(pPoolItem)->GetHeight();
else
nDefTextHgt = SdrEngineDefaults::GetFontHeight();
mnDefTextHgt = SdrEngineDefaults::GetFontHeight();
pItemPool->SetPoolDefaultItem( makeSdrTextWordWrapItem( false ) );
......@@ -689,10 +689,10 @@ SdrPage* SdrModel::AllocPage(bool bMasterPage)
void SdrModel::SetTextDefaults() const
{
SetTextDefaults( pItemPool, nDefTextHgt );
SetTextDefaults( pItemPool, mnDefTextHgt );
}
void SdrModel::SetTextDefaults( SfxItemPool* pItemPool, sal_uIntPtr nDefTextHgt )
void SdrModel::SetTextDefaults( SfxItemPool* pItemPool, sal_Int32 nDefTextHgt )
{
// set application-language specific dynamic pool language defaults
SvxFontItem aSvxFontItem( EE_CHAR_FONTINFO) ;
......@@ -889,10 +889,10 @@ void SdrModel::RefDeviceChanged()
ImpReformatAllTextObjects();
}
void SdrModel::SetDefaultFontHeight(sal_uIntPtr nVal)
void SdrModel::SetDefaultFontHeight(sal_Int32 nVal)
{
if (nVal!=nDefTextHgt) {
nDefTextHgt=nVal;
if (nVal!=mnDefTextHgt) {
mnDefTextHgt=nVal;
Broadcast(SdrHint(SdrHintKind::DefaultFontHeightChange));
ImpReformatAllTextObjects();
}
......
......@@ -137,8 +137,8 @@ void SdrText::SetModel( SdrModel* pNewModel )
// Now move the OutlinerParaObject into a new Pool.
// TODO: We should compare the DefTab and RefDevice of both Models to
// see whether we need to use AutoGrow!
sal_uIntPtr nOldFontHgt=pOldModel->GetDefaultFontHeight();
sal_uIntPtr nNewFontHgt=pNewModel->GetDefaultFontHeight();
sal_Int32 nOldFontHgt=pOldModel->GetDefaultFontHeight();
sal_Int32 nNewFontHgt=pNewModel->GetDefaultFontHeight();
bool bDefHgtChanged=nNewFontHgt!=nOldFontHgt;
bool bSetHgtItem=bDefHgtChanged && !bHgtSet;
if (bSetHgtItem)
......
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