diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2011-03-07 23:39:33 -0600 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2011-03-07 23:39:33 -0600 |
commit | 03d66a5f89e5a6f5f6faa84c6697de11ff3d9073 (patch) | |
tree | 9040736651439a0f799fc2a4d600e7b5f2f133c6 /sw/source/ui | |
parent | fb7f1fe153699524da1d217143600c2748d6d98a (diff) |
fix mis-merge and missing source in the buildintegration/dev300_m98
Diffstat (limited to 'sw/source/ui')
-rw-r--r-- | sw/source/ui/fldui/flddinf.cxx | 5 | ||||
-rw-r--r-- | sw/source/ui/shells/navsh.cxx | 2 | ||||
-rwxr-xr-x | sw/source/ui/uiview/viewling.cxx | 129 | ||||
-rw-r--r-- | sw/source/ui/uiview/viewtab.cxx | 1 |
4 files changed, 13 insertions, 124 deletions
diff --git a/sw/source/ui/fldui/flddinf.cxx b/sw/source/ui/fldui/flddinf.cxx index 77dfdb4798..a485e1f2c2 100644 --- a/sw/source/ui/fldui/flddinf.cxx +++ b/sw/source/ui/fldui/flddinf.cxx @@ -48,14 +48,9 @@ #include <fldui.hrc> -#ifndef _FLDTDLG_HRC #include <fldtdlg.hrc> -#endif -#ifndef _FLDDINF_HXX #include <flddinf.hxx> -#endif #include <swmodule.hxx> -#ifndef _VIEW_HXX #include <view.hxx> #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/util/Time.hpp> diff --git a/sw/source/ui/shells/navsh.cxx b/sw/source/ui/shells/navsh.cxx index 055f8165bc..f4855ffede 100644 --- a/sw/source/ui/shells/navsh.cxx +++ b/sw/source/ui/shells/navsh.cxx @@ -33,7 +33,7 @@ #include "cmdid.h" #include <svx/svdview.hxx> -#include <svx/srchitem.hxx> +#include <svl/srchitem.hxx> #include <svl/eitem.hxx> #include <svl/whiter.hxx> #include <svx/svdopath.hxx> diff --git a/sw/source/ui/uiview/viewling.cxx b/sw/source/ui/uiview/viewling.cxx index b05ca41d8e..1ff2555926 100755 --- a/sw/source/ui/uiview/viewling.cxx +++ b/sw/source/ui/uiview/viewling.cxx @@ -844,120 +844,6 @@ sal_Bool SwView::ExecSmartTagPopup( const Point& rPt ) return bRet; } -class SwFieldDialog : public Dialog -{ -private: - SwFieldListBox aListBox; - Edit aText; - int selection; - - DECL_LINK( MyListBoxHandler, ListBox * ); - -public: - SwFieldDialog(Window* parent, IFieldmark *fieldBM) : Dialog(parent, WB_BORDER | WB_SYSTEMWINDOW | WB_NOSHADOW ), aListBox(this), aText(this, WB_RIGHT | WB_READONLY), selection(-1) { - - assert(fieldBM!=NULL); - if (fieldBM!=NULL) { - const IFieldmark::parameter_map_t* const pParameters = fieldBM->GetParameters(); - IFieldmark::parameter_map_t::const_iterator pListEntries = pParameters->find(::rtl::OUString::createFromAscii(ODF_FORMDROPDOWN_LISTENTRY)); - if(pListEntries != pParameters->end()) - { - Sequence< ::rtl::OUString> vListEntries; - pListEntries->second >>= vListEntries; - for( ::rtl::OUString* pCurrent = vListEntries.getArray(); - pCurrent != vListEntries.getArray() + vListEntries.getLength(); - ++pCurrent) - { - aListBox.InsertEntry(*pCurrent); - } - } - } - Size lbSize=aListBox.GetOptimalSize(WINDOWSIZE_PREFERRED); - lbSize.Width()+=50; - lbSize.Height()+=20; - aListBox.SetSizePixel(lbSize); - aListBox.SetSelectHdl( LINK( this, SwFieldDialog, MyListBoxHandler ) ); - aListBox.Show(); - aText.SetText(rtl::OUString::createFromAscii("Cancel")); - Size tSize=aText.GetOptimalSize(WINDOWSIZE_PREFERRED); - aText.SetSizePixel(Size(lbSize.Width(), tSize.Height())); - aText.SetPosPixel(Point(0, lbSize.Height())); - aText.Show(); - SetSizePixel(Size(lbSize.Width(), lbSize.Height()+tSize.Height())); -// SetSizePixel(Size(200, 200)); - } - - int getSelection() { - return selection; - } -protected: - /* - virtual void LoseFocus() { - printf("lose focus!!\n"); - Dialog::LoseFocus(); - printf("close:\n"); - EndDialog(8); - } - */ - - virtual long PreNotify( NotifyEvent& rNEvt ) { - if (rNEvt.GetType() == EVENT_LOSEFOCUS && aListBox.GetImplWin()==rNEvt.GetWindow()) { - EndDialog(8); - return 1; - } - if (rNEvt.GetType() == EVENT_KEYINPUT) { -// printf("PreNotify::KEYINPUT\n"); - } - return Dialog::PreNotify(rNEvt); - } -}; - -IMPL_LINK( SwFieldDialog, MyListBoxHandler, ListBox *, pBox ) -{ -// printf("### DROP DOWN SELECT... IsTravelSelect=%i\n", pBox->IsTravelSelect()); - if (pBox->IsTravelSelect()) { - return 0; - } else { - this->selection=pBox->GetSelectEntryPos(); - EndDialog(9); //@TODO have meaningfull returns... - return 1; - } -} - - -BOOL SwView::ExecFieldPopup( const Point& rPt, IFieldmark *fieldBM ) -{ - sal_Bool bRet = sal_False; - const sal_Bool bOldViewLock = pWrtShell->IsViewLocked(); - pWrtShell->LockView( sal_True ); - pWrtShell->Push(); - - bRet=sal_True; - const Point aPixPos = GetEditWin().LogicToPixel( rPt ); - - SwFieldDialog aFldDlg(pEditWin, fieldBM); - aFldDlg.SetPosPixel(pEditWin->OutputToScreenPixel(aPixPos)); - - /*short ret=*/aFldDlg.Execute(); - sal_Int32 selection=aFldDlg.getSelection(); - if (selection>=0) { - (*fieldBM->GetParameters())[::rtl::OUString::createFromAscii(ODF_FORMDROPDOWN_RESULT)] = makeAny(selection); - } - - pWrtShell->Pop( sal_False ); - pWrtShell->LockView( bOldViewLock ); - - return bRet; -} - -class SwFieldPopup : public PopupMenu -{ -public: - SwFieldPopup() { - InsertItem(1, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Hello"))); - } -}; - class SwFieldListBox : public ListBox { public: @@ -994,7 +880,7 @@ public: assert(fieldBM!=NULL); if (fieldBM!=NULL) { const IFieldmark::parameter_map_t* const pParameters = fieldBM->GetParameters(); - IFieldmark::parameter_map_t::const_iterator pListEntries = pParameters->find(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ODF_FORMDROPDOWN_LISTENTRY))); + IFieldmark::parameter_map_t::const_iterator pListEntries = pParameters->find(::rtl::OUString::createFromAscii(ODF_FORMDROPDOWN_LISTENTRY)); if(pListEntries != pParameters->end()) { Sequence< ::rtl::OUString> vListEntries; @@ -1013,7 +899,7 @@ public: aListBox.SetSizePixel(lbSize); aListBox.SetSelectHdl( LINK( this, SwFieldDialog, MyListBoxHandler ) ); aListBox.Show(); - aText.SetText(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Cancel"))); + aText.SetText(rtl::OUString::createFromAscii("Cancel")); Size tSize=aText.GetOptimalSize(WINDOWSIZE_PREFERRED); aText.SetSizePixel(Size(lbSize.Width(), tSize.Height())); aText.SetPosPixel(Point(0, lbSize.Height())); @@ -1049,6 +935,7 @@ IMPL_LINK( SwFieldDialog, MyListBoxHandler, ListBox *, pBox ) } } + BOOL SwView::ExecFieldPopup( const Point& rPt, IFieldmark *fieldBM ) { sal_Bool bRet = sal_False; @@ -1065,7 +952,7 @@ BOOL SwView::ExecFieldPopup( const Point& rPt, IFieldmark *fieldBM ) /*short ret=*/aFldDlg.Execute(); sal_Int32 selection=aFldDlg.getSelection(); if (selection>=0) { - (*fieldBM->GetParameters())[::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ODF_FORMDROPDOWN_RESULT))] = makeAny(selection); + (*fieldBM->GetParameters())[::rtl::OUString::createFromAscii(ODF_FORMDROPDOWN_RESULT)] = makeAny(selection); } pWrtShell->Pop( sal_False ); @@ -1074,4 +961,12 @@ BOOL SwView::ExecFieldPopup( const Point& rPt, IFieldmark *fieldBM ) return bRet; } +class SwFieldPopup : public PopupMenu +{ +public: + SwFieldPopup() { + InsertItem(1, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Hello"))); + } +}; + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/uiview/viewtab.cxx b/sw/source/ui/uiview/viewtab.cxx index 31a62cf16f..2033b0f925 100644 --- a/sw/source/ui/uiview/viewtab.cxx +++ b/sw/source/ui/uiview/viewtab.cxx @@ -1262,7 +1262,6 @@ void SwView::StateTabWin(SfxItemSet& rSet) if( ( (SID_RULER_BORDERS_VERTICAL == nWhich) && ((bHasTable && !bTableVertical) || (!bVerticalWriting && !bFrmSelection && !bHasTable ) || (bFrmSelection && !bFrameHasVerticalColumns)) ) || - ( bFrmSelection && !bFrameHasVerticalColumns))) || ((SID_RULER_BORDERS == nWhich) && ((bHasTable && bTableVertical) || (bVerticalWriting && !bFrmSelection&& !bHasTable) || bFrameHasVerticalColumns))) |