summaryrefslogtreecommitdiff
path: root/vcl/source/app
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2014-05-05 11:54:16 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-05-05 12:27:51 +0200
commitb4107411900f5bb4c215e2d9db09fc2b2b82939b (patch)
treedb49676210a90fbc4dd56213029394a6d128c0ea /vcl/source/app
parent8f08def4aefc6b92366536fb1fb6620527474129 (diff)
Revert "Move ImplInitAppFontData from Window to Application"
This reverts commit f76026a43acc65465882924796d93e635c35fd90. This brings back the paragraph style and font name combo boxes in Writer. Change-Id: Idb28253797ef842d575fe10537f6e70faa34fe75
Diffstat (limited to 'vcl/source/app')
-rw-r--r--vcl/source/app/svapp.cxx52
1 files changed, 2 insertions, 50 deletions
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index 0185558141b5..dd213197d482 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -322,12 +322,12 @@ void Application::Abort( const OUString& rErrorText )
SalAbort( rErrorText, dumpCore );
}
-sal_uLong Application::GetReservedKeyCodeCount()
+sal_uLong Application::GetReservedKeyCodeCount()
{
return ImplReservedKeys::get()->second;
}
-const KeyCode* Application::GetReservedKeyCode( sal_uLong i )
+const KeyCode* Application::GetReservedKeyCode( sal_uLong i )
{
if( i >= GetReservedKeyCodeCount() )
return NULL;
@@ -1669,52 +1669,4 @@ Application::createFolderPicker( const Reference< uno::XComponentContext >& xSM
return pSVData->mpDefInst->createFolderPicker( xSM );
}
-void Application::InitAppFontData()
-{
- ImplSVData* pSVData = ImplGetSVData();
-
- Window *pWindow = pSVData->mpDefaultWin;
-
- long nTextHeight = pWindow->GetTextHeight();
- long nTextWidth = pWindow->approximate_char_width() * 8;
- long nSymHeight = nTextHeight*4;
- // Make the basis wider if the font is too narrow
- // such that the dialog looks symmetrical and does not become too narrow.
- // Add some extra space when the dialog has the same width,
- // as a little more space is better.
- if ( nSymHeight > nTextWidth )
- nTextWidth = nSymHeight;
- else if ( nSymHeight+5 > nTextWidth )
- nTextWidth = nSymHeight+5;
- pSVData->maGDIData.mnAppFontX = nTextWidth * 10 / 8;
- pSVData->maGDIData.mnAppFontY = nTextHeight * 10;
-
- // FIXME: this is currently only on OS X, check with other
- // platforms
- if( pSVData->maNWFData.mbNoFocusRects )
- {
- // try to find out whether there is a large correction
- // of control sizes, if yes, make app font scalings larger
- // so dialog positioning is not completely off
- ImplControlValue aControlValue;
- Rectangle aCtrlRegion( Point(), Size( nTextWidth < 10 ? 10 : nTextWidth, nTextHeight < 10 ? 10 : nTextHeight ) );
- Rectangle aBoundingRgn( aCtrlRegion );
- Rectangle aContentRgn( aCtrlRegion );
- if( pWindow->GetNativeControlRegion( CTRL_EDITBOX, PART_ENTIRE_CONTROL, aCtrlRegion,
- CTRL_STATE_ENABLED, aControlValue, OUString(),
- aBoundingRgn, aContentRgn ) )
- {
- // comment: the magical +6 is for the extra border in bordered
- // (which is the standard) edit fields
- if( aContentRgn.GetHeight() - nTextHeight > (nTextHeight+4)/4 )
- pSVData->maGDIData.mnAppFontY = (aContentRgn.GetHeight()-4) * 10;
- }
- }
-
- pSVData->maGDIData.mnRealAppFontX = pSVData->maGDIData.mnAppFontX;
- if ( pSVData->maAppData.mnDialogScaleX )
- pSVData->maGDIData.mnAppFontX += (pSVData->maGDIData.mnAppFontX*pSVData->maAppData.mnDialogScaleX)/100;
-}
-
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */