summaryrefslogtreecommitdiff
path: root/vcl/source/window
diff options
context:
space:
mode:
authorChris Sherlock <chris.sherlock79@gmail.com>2014-03-23 18:51:13 +1100
committerChris Sherlock <chris.sherlock79@gmail.com>2014-03-25 12:17:01 +0000
commit977aae0cdec71577cbdc74baea228a5f267e7fd8 (patch)
tree6423514964bef1da9d829c91ba104e08ac68efa5 /vcl/source/window
parentb53ba68b6b4a070ec56d02aaacccc6f649ec9482 (diff)
fdo#74702 Moved EnableRTL() logic to specific classes where appropriate
OutputDevice::EnableRTL() is a bit of a mess. It uses a runtime variable to see if it is using a VirtualDevice, and it uses a dynamic_cast to see if the object is a Window or a Control! I have made it virtual and moved the knowledge of class specific functionality from OutputDevice to VirtualDevice, Window and Control as needed. OutputDevice::EnableRTL() functionality is then called. Also: small formatting change to outdev.hxx, also included a note that WindowImpl is a pimpl in window.hxx. Change-Id: I44b66601c4457fb2e0bbc1014fb7acf8f6942f80 Reviewed-on: https://gerrit.libreoffice.org/8721 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
Diffstat (limited to 'vcl/source/window')
-rw-r--r--vcl/source/window/window.cxx19
1 files changed, 6 insertions, 13 deletions
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index abe769a3af65..6736c54995c4 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -106,11 +106,8 @@ using namespace ::com::sun::star::datatransfer::dnd;
using namespace ::com::sun::star;
using namespace com::sun;
-
using ::com::sun::star::awt::XTopWindow;
-
-
#define IMPL_PAINT_PAINT ((sal_uInt16)0x0001)
#define IMPL_PAINT_PAINTALL ((sal_uInt16)0x0002)
#define IMPL_PAINT_PAINTALLCHILDREN ((sal_uInt16)0x0004)
@@ -118,8 +115,6 @@ using ::com::sun::star::awt::XTopWindow;
#define IMPL_PAINT_ERASE ((sal_uInt16)0x0010)
#define IMPL_PAINT_CHECKRTL ((sal_uInt16)0x0020)
-
-
struct ImplCalcToTopData
{
ImplCalcToTopData* mpNext;
@@ -144,7 +139,6 @@ ImplAccessibleInfos::~ImplAccessibleInfos()
}
-
WindowImpl::WindowImpl( WindowType nType )
{
maZoom = Fraction( 1, 1 );
@@ -303,9 +297,6 @@ WindowImpl::~WindowImpl()
delete mpControlFont;
}
-
-
-
// helper method to allow inline constructor even for pWindow!=NULL case
void ImplDelData::AttachToWindow( const Window* pWindow )
{
@@ -313,8 +304,6 @@ void ImplDelData::AttachToWindow( const Window* pWindow )
const_cast<Window*>(pWindow)->ImplAddDel( this );
}
-
-
// define dtor for ImplDelData
ImplDelData::~ImplDelData()
{
@@ -328,8 +317,6 @@ ImplDelData::~ImplDelData()
}
}
-
-
#ifdef DBG_UTIL
const char* ImplDbgCheckWindow( const void* pObj )
{
@@ -420,6 +407,12 @@ bool Window::ImplInitGraphics() const
return mpGraphics ? true : false;
}
+void Window::EnableRTL ( bool bEnable )
+{
+ StateChanged( STATE_CHANGE_MIRRORING );
+ OutputDevice::EnableRTL(bEnable);
+}
+
void Window::CopyAreaFinal( SalTwoRect& aPosAry, sal_uInt32 nFlags )
{
if (aPosAry.mnSrcWidth == 0 || aPosAry.mnSrcHeight == 0 || aPosAry.mnDestWidth == 0 || aPosAry.mnDestHeight == 0)