Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
fc1762f9
Kaydet (Commit)
fc1762f9
authored
Ock 09, 2014
tarafından
Matúš Kukan
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Merge these source files. Also move a function to where it's used.
Change-Id: Ia0378a58c63364a73c40dd901d93e20a596a4c29
üst
27014f48
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
75 deletions
+39
-75
Library_swd.mk
sw/Library_swd.mk
+0
-1
iodetect.cxx
sw/source/filter/basflt/iodetect.cxx
+5
-1
swdet2.cxx
sw/source/ui/uno/swdet2.cxx
+0
-71
swdetect.cxx
sw/source/ui/uno/swdetect.cxx
+34
-2
No files found.
sw/Library_swd.mk
Dosyayı görüntüle @
fc1762f9
...
@@ -56,7 +56,6 @@ $(eval $(call gb_Library_use_libraries,swd,\
...
@@ -56,7 +56,6 @@ $(eval $(call gb_Library_use_libraries,swd,\
$(eval $(call gb_Library_add_exception_objects,swd,\
$(eval $(call gb_Library_add_exception_objects,swd,\
sw/source/filter/basflt/iodetect \
sw/source/filter/basflt/iodetect \
sw/source/ui/uno/detreg \
sw/source/ui/uno/detreg \
sw/source/ui/uno/swdet2 \
sw/source/ui/uno/swdetect \
sw/source/ui/uno/swdetect \
))
))
...
...
sw/source/filter/basflt/iodetect.cxx
Dosyayı görüntüle @
fc1762f9
...
@@ -24,8 +24,12 @@
...
@@ -24,8 +24,12 @@
#include <sot/storage.hxx>
#include <sot/storage.hxx>
#include <svtools/parhtml.hxx>
#include <svtools/parhtml.hxx>
#include <tools/urlobj.hxx>
#include <tools/urlobj.hxx>
#include <unotools/moduleoptions.hxx>
bool
IsDocShellRegistered
();
static
bool
IsDocShellRegistered
()
{
return
SvtModuleOptions
().
IsWriter
();
}
SwIoDetect
aFilterDetect
[]
=
SwIoDetect
aFilterDetect
[]
=
{
{
...
...
sw/source/ui/uno/swdet2.cxx
deleted
100644 → 0
Dosyayı görüntüle @
27014f48
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include "rtl/ustring.hxx" // for OUString, operator==
#include "sal/types.h" // for sal_Bool
#include "tools/errcode.hxx" // for ERRCODE_ABORT, ERRCODE_NONE
#include "tools/solar.h" // for sal_uLong
#include <sfx2/docfilt.hxx>
#include <sfx2/fcontnr.hxx>
#include <sfx2/docfile.hxx>
#include <iodetect.hxx>
#include <swdetect.hxx>
#include <unotools/moduleoptions.hxx>
bool
IsDocShellRegistered
()
{
return
SvtModuleOptions
().
IsWriter
();
}
sal_uLong
SwFilterDetect
::
DetectFilter
(
SfxMedium
&
rMedium
,
const
SfxFilter
**
ppFilter
)
{
sal_uLong
nRet
=
ERRCODE_NONE
;
if
(
*
ppFilter
)
{
// verify the given filter
OUString
aPrefFlt
=
(
*
ppFilter
)
->
GetUserData
();
// detection for TextFilter needs an additional checking
sal_Bool
bDetected
=
SwIoSystem
::
IsFileFilter
(
rMedium
,
aPrefFlt
);
return
bDetected
?
nRet
:
ERRCODE_ABORT
;
}
// mba: without preselection there is no PrefFlt
OUString
aPrefFlt
;
const
SfxFilter
*
pTmp
=
SwIoSystem
::
GetFileFilter
(
rMedium
.
GetPhysicalName
(),
aPrefFlt
,
&
rMedium
);
if
(
!
pTmp
)
return
ERRCODE_ABORT
;
else
{
//Bug 41417: JP 09.07.97: HTML documents should be loaded by WebWriter
SfxFilterContainer
aFilterContainer
(
OUString
(
"swriter/web"
)
);
if
(
!
pTmp
->
GetUserData
().
equals
(
sHTML
)
||
pTmp
->
GetServiceName
()
==
"com.sun.star.text.WebDocument"
||
0
==
(
(
*
ppFilter
)
=
SwIoSystem
::
GetFilterOfFormat
(
OUString
(
sHTML
),
&
aFilterContainer
)
)
)
*
ppFilter
=
pTmp
;
}
return
nRet
;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sw/source/ui/uno/swdetect.cxx
Dosyayı görüntüle @
fc1762f9
...
@@ -56,8 +56,7 @@
...
@@ -56,8 +56,7 @@
#include <vcl/FilterConfigItem.hxx>
#include <vcl/FilterConfigItem.hxx>
#include <unotools/moduleoptions.hxx>
#include <unotools/moduleoptions.hxx>
#include <comphelper/ihwrapnofilter.hxx>
#include <comphelper/ihwrapnofilter.hxx>
#include <iodetect.hxx>
#include <swdll.hxx>
using
namespace
::
com
::
sun
::
star
;
using
namespace
::
com
::
sun
::
star
;
using
namespace
::
com
::
sun
::
star
::
uno
;
using
namespace
::
com
::
sun
::
star
::
uno
;
...
@@ -418,6 +417,39 @@ OUString SAL_CALL SwFilterDetect::detect( Sequence< PropertyValue >& lDescriptor
...
@@ -418,6 +417,39 @@ OUString SAL_CALL SwFilterDetect::detect( Sequence< PropertyValue >& lDescriptor
return
aTypeName
;
return
aTypeName
;
}
}
sal_uLong
SwFilterDetect
::
DetectFilter
(
SfxMedium
&
rMedium
,
const
SfxFilter
**
ppFilter
)
{
sal_uLong
nRet
=
ERRCODE_NONE
;
if
(
*
ppFilter
)
{
// verify the given filter
OUString
aPrefFlt
=
(
*
ppFilter
)
->
GetUserData
();
// detection for TextFilter needs an additional checking
sal_Bool
bDetected
=
SwIoSystem
::
IsFileFilter
(
rMedium
,
aPrefFlt
);
return
bDetected
?
nRet
:
ERRCODE_ABORT
;
}
// mba: without preselection there is no PrefFlt
OUString
aPrefFlt
;
const
SfxFilter
*
pTmp
=
SwIoSystem
::
GetFileFilter
(
rMedium
.
GetPhysicalName
(),
aPrefFlt
,
&
rMedium
);
if
(
!
pTmp
)
return
ERRCODE_ABORT
;
else
{
//Bug 41417: JP 09.07.97: HTML documents should be loaded by WebWriter
SfxFilterContainer
aFilterContainer
(
OUString
(
"swriter/web"
)
);
if
(
!
pTmp
->
GetUserData
().
equals
(
sHTML
)
||
pTmp
->
GetServiceName
()
==
"com.sun.star.text.WebDocument"
||
0
==
(
(
*
ppFilter
)
=
SwIoSystem
::
GetFilterOfFormat
(
OUString
(
sHTML
),
&
aFilterContainer
)
)
)
*
ppFilter
=
pTmp
;
}
return
nRet
;
}
/* XServiceInfo */
/* XServiceInfo */
OUString
SAL_CALL
SwFilterDetect
::
getImplementationName
()
throw
(
RuntimeException
)
OUString
SAL_CALL
SwFilterDetect
::
getImplementationName
()
throw
(
RuntimeException
)
{
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment